altcha 0.6.3 → 0.6.4
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 +3 -2
- package/dist/altcha.d.ts +35 -0
- package/dist/altcha.js +566 -549
- package/dist/altcha.umd.cjs +2 -2
- package/dist_external/altcha.d.ts +35 -0
- package/dist_external/altcha.js +563 -546
- package/dist_external/altcha.umd.cjs +2 -2
- package/package.json +3 -3
package/dist/altcha.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
function
|
|
1
|
+
var _t = Object.defineProperty;
|
|
2
|
+
var kt = (r, e, t) => e in r ? _t(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var U = (r, e, t) => kt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
const tt = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IGY9bmV3IFRleHRFbmNvZGVyO2Z1bmN0aW9uIGQoZSl7cmV0dXJuWy4uLm5ldyBVaW50OEFycmF5KGUpXS5tYXAodD0+dC50b1N0cmluZygxNikucGFkU3RhcnQoMiwiMCIpKS5qb2luKCIiKX1hc3luYyBmdW5jdGlvbiBwKGUsdCxvKXtyZXR1cm4gZChhd2FpdCBjcnlwdG8uc3VidGxlLmRpZ2VzdChvLnRvVXBwZXJDYXNlKCksZi5lbmNvZGUoZSt0KSkpfWZ1bmN0aW9uIGcoZSx0LG89IlNIQS0yNTYiLGw9MWU2LGM9MCl7Y29uc3QgYT1uZXcgQWJvcnRDb250cm9sbGVyLGk9RGF0ZS5ub3coKTtyZXR1cm57cHJvbWlzZTooYXN5bmMoKT0+e2ZvcihsZXQgbj1jO248PWw7bis9MSl7aWYoYS5zaWduYWwuYWJvcnRlZClyZXR1cm4gbnVsbDtpZihhd2FpdCBwKHQsbixvKT09PWUpcmV0dXJue251bWJlcjpuLHRvb2s6RGF0ZS5ub3coKS1pfX1yZXR1cm4gbnVsbH0pKCksY29udHJvbGxlcjphfX1sZXQgcjtvbm1lc3NhZ2U9YXN5bmMgZT0+e2NvbnN0e3R5cGU6dCxwYXlsb2FkOm99PWUuZGF0YTtpZih0PT09ImFib3J0IilyPT1udWxsfHxyLmFib3J0KCkscj12b2lkIDA7ZWxzZSBpZih0PT09IndvcmsiKXtjb25zdHthbGc6bCxjaGFsbGVuZ2U6YyxtYXg6YSxzYWx0Omksc3RhcnQ6dX09b3x8e30sbj1nKGMsaSxsLGEsdSk7cj1uLmNvbnRyb2xsZXIsbi5wcm9taXNlLnRoZW4ocz0+e3NlbGYucG9zdE1lc3NhZ2UocyYmey4uLnMsd29ya2VyOiEwfSl9KX19fSkoKTsK", xt = (r) => Uint8Array.from(atob(r), (e) => e.charCodeAt(0)), Be = typeof window < "u" && window.Blob && new Blob([xt(tt)], { type: "text/javascript;charset=utf-8" });
|
|
5
|
+
function Et(r) {
|
|
6
6
|
let e;
|
|
7
7
|
try {
|
|
8
|
-
if (e =
|
|
8
|
+
if (e = Be && (window.URL || window.webkitURL).createObjectURL(Be), !e) throw "";
|
|
9
9
|
const t = new Worker(e, {
|
|
10
10
|
name: r == null ? void 0 : r.name
|
|
11
11
|
});
|
|
@@ -14,7 +14,7 @@ function kt(r) {
|
|
|
14
14
|
}), t;
|
|
15
15
|
} catch {
|
|
16
16
|
return new Worker(
|
|
17
|
-
"data:text/javascript;base64," +
|
|
17
|
+
"data:text/javascript;base64," + tt,
|
|
18
18
|
{
|
|
19
19
|
name: r == null ? void 0 : r.name
|
|
20
20
|
}
|
|
@@ -23,37 +23,37 @@ function kt(r) {
|
|
|
23
23
|
e && (window.URL || window.webkitURL).revokeObjectURL(e);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function ie() {
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function rt(r) {
|
|
29
29
|
return r();
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function He() {
|
|
32
32
|
return /* @__PURE__ */ Object.create(null);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
r.forEach(
|
|
34
|
+
function fe(r) {
|
|
35
|
+
r.forEach(rt);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function nt(r) {
|
|
38
38
|
return typeof r == "function";
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Ct(r, e) {
|
|
41
41
|
return r != r ? e == e : r !== e || r && typeof r == "object" || typeof r == "function";
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Lt(r) {
|
|
44
44
|
return Object.keys(r).length === 0;
|
|
45
45
|
}
|
|
46
46
|
function _(r, e) {
|
|
47
47
|
r.appendChild(e);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const i =
|
|
49
|
+
function Rt(r, e, t) {
|
|
50
|
+
const i = It(r);
|
|
51
51
|
if (!i.getElementById(e)) {
|
|
52
52
|
const o = A("style");
|
|
53
|
-
o.id = e, o.textContent = t,
|
|
53
|
+
o.id = e, o.textContent = t, zt(i, o);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function It(r) {
|
|
57
57
|
if (!r) return document;
|
|
58
58
|
const e = r.getRootNode ? r.getRootNode() : r.ownerDocument;
|
|
59
59
|
return e && /** @type {ShadowRoot} */
|
|
@@ -62,47 +62,47 @@ function Lt(r) {
|
|
|
62
62
|
e
|
|
63
63
|
) : r.ownerDocument;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function zt(r, e) {
|
|
66
66
|
return _(
|
|
67
67
|
/** @type {Document} */
|
|
68
68
|
r.head || r,
|
|
69
69
|
e
|
|
70
70
|
), e.sheet;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function D(r, e, t) {
|
|
73
73
|
r.insertBefore(e, t || null);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function j(r) {
|
|
76
76
|
r.parentNode && r.parentNode.removeChild(r);
|
|
77
77
|
}
|
|
78
78
|
function A(r) {
|
|
79
79
|
return document.createElement(r);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function O(r) {
|
|
82
82
|
return document.createElementNS("http://www.w3.org/2000/svg", r);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function At(r) {
|
|
85
85
|
return document.createTextNode(r);
|
|
86
86
|
}
|
|
87
87
|
function Y() {
|
|
88
|
-
return
|
|
88
|
+
return At(" ");
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function xe(r, e, t, i) {
|
|
91
91
|
return r.addEventListener(e, t, i), () => r.removeEventListener(e, t, i);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function s(r, e, t) {
|
|
94
94
|
t == null ? r.removeAttribute(e) : r.getAttribute(e) !== t && r.setAttribute(e, t);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function St(r) {
|
|
97
97
|
return Array.from(r.childNodes);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Oe(r, e, t) {
|
|
100
100
|
r.classList.toggle(e, !!t);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Nt(r, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
103
103
|
return new CustomEvent(r, { detail: e, bubbles: t, cancelable: i });
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function Zt(r) {
|
|
106
106
|
const e = {};
|
|
107
107
|
return r.childNodes.forEach(
|
|
108
108
|
/** @param {Element} node */
|
|
@@ -111,167 +111,167 @@ function Nt(r) {
|
|
|
111
111
|
}
|
|
112
112
|
), e;
|
|
113
113
|
}
|
|
114
|
-
let
|
|
115
|
-
function
|
|
116
|
-
|
|
114
|
+
let ae;
|
|
115
|
+
function ce(r) {
|
|
116
|
+
ae = r;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
if (!
|
|
120
|
-
return
|
|
121
|
-
}
|
|
122
|
-
function St(r) {
|
|
123
|
-
Le().$$.on_mount.push(r);
|
|
118
|
+
function Re() {
|
|
119
|
+
if (!ae) throw new Error("Function called outside component initialization");
|
|
120
|
+
return ae;
|
|
124
121
|
}
|
|
125
122
|
function jt(r) {
|
|
126
|
-
|
|
123
|
+
Re().$$.on_mount.push(r);
|
|
124
|
+
}
|
|
125
|
+
function Mt(r) {
|
|
126
|
+
Re().$$.on_destroy.push(r);
|
|
127
127
|
}
|
|
128
128
|
function Tt() {
|
|
129
|
-
const r =
|
|
129
|
+
const r = Re();
|
|
130
130
|
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
131
131
|
const o = r.$$.callbacks[e];
|
|
132
132
|
if (o) {
|
|
133
|
-
const l =
|
|
133
|
+
const l = Nt(
|
|
134
134
|
/** @type {string} */
|
|
135
135
|
e,
|
|
136
136
|
t,
|
|
137
137
|
{ cancelable: i }
|
|
138
138
|
);
|
|
139
|
-
return o.slice().forEach((
|
|
140
|
-
|
|
139
|
+
return o.slice().forEach((c) => {
|
|
140
|
+
c.call(r, l);
|
|
141
141
|
}), !l.defaultPrevented;
|
|
142
142
|
}
|
|
143
143
|
return !0;
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
const
|
|
147
|
-
let
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
function
|
|
151
|
-
|
|
146
|
+
const re = [], we = [];
|
|
147
|
+
let ne = [];
|
|
148
|
+
const We = [], it = /* @__PURE__ */ Promise.resolve();
|
|
149
|
+
let Ce = !1;
|
|
150
|
+
function ot() {
|
|
151
|
+
Ce || (Ce = !0, it.then(y));
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
return
|
|
153
|
+
function Vt() {
|
|
154
|
+
return ot(), it;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
156
|
+
function Le(r) {
|
|
157
|
+
ne.push(r);
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
let
|
|
161
|
-
function
|
|
162
|
-
if (
|
|
159
|
+
const Ee = /* @__PURE__ */ new Set();
|
|
160
|
+
let te = 0;
|
|
161
|
+
function y() {
|
|
162
|
+
if (te !== 0)
|
|
163
163
|
return;
|
|
164
|
-
const r =
|
|
164
|
+
const r = ae;
|
|
165
165
|
do {
|
|
166
166
|
try {
|
|
167
|
-
for (;
|
|
168
|
-
const e = te
|
|
169
|
-
|
|
167
|
+
for (; te < re.length; ) {
|
|
168
|
+
const e = re[te];
|
|
169
|
+
te++, ce(e), Dt(e.$$);
|
|
170
170
|
}
|
|
171
171
|
} catch (e) {
|
|
172
|
-
throw
|
|
172
|
+
throw re.length = 0, te = 0, e;
|
|
173
173
|
}
|
|
174
|
-
for (
|
|
175
|
-
for (let e = 0; e <
|
|
176
|
-
const t =
|
|
177
|
-
|
|
174
|
+
for (ce(null), re.length = 0, te = 0; we.length; ) we.pop()();
|
|
175
|
+
for (let e = 0; e < ne.length; e += 1) {
|
|
176
|
+
const t = ne[e];
|
|
177
|
+
Ee.has(t) || (Ee.add(t), t());
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
} while (
|
|
181
|
-
for (;
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
ne.length = 0;
|
|
180
|
+
} while (re.length);
|
|
181
|
+
for (; We.length; )
|
|
182
|
+
We.pop()();
|
|
183
|
+
Ce = !1, Ee.clear(), ce(r);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function Dt(r) {
|
|
186
186
|
if (r.fragment !== null) {
|
|
187
|
-
r.update(),
|
|
187
|
+
r.update(), fe(r.before_update);
|
|
188
188
|
const e = r.dirty;
|
|
189
|
-
r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, e), r.after_update.forEach(
|
|
189
|
+
r.dirty = [-1], r.fragment && r.fragment.p(r.ctx, e), r.after_update.forEach(Le);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ft(r) {
|
|
193
193
|
const e = [], t = [];
|
|
194
|
-
|
|
194
|
+
ne.forEach((i) => r.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), ne = e;
|
|
195
195
|
}
|
|
196
196
|
const $t = /* @__PURE__ */ new Set();
|
|
197
|
-
function
|
|
197
|
+
function Ut(r, e) {
|
|
198
198
|
r && r.i && ($t.delete(r), r.i(e));
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function Gt(r, e, t) {
|
|
201
201
|
const { fragment: i, after_update: o } = r.$$;
|
|
202
|
-
i && i.m(e, t),
|
|
203
|
-
const l = r.$$.on_mount.map(
|
|
204
|
-
r.$$.on_destroy ? r.$$.on_destroy.push(...l) :
|
|
205
|
-
}), o.forEach(
|
|
202
|
+
i && i.m(e, t), Le(() => {
|
|
203
|
+
const l = r.$$.on_mount.map(rt).filter(nt);
|
|
204
|
+
r.$$.on_destroy ? r.$$.on_destroy.push(...l) : fe(l), r.$$.on_mount = [];
|
|
205
|
+
}), o.forEach(Le);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Xt(r, e) {
|
|
208
208
|
const t = r.$$;
|
|
209
|
-
t.fragment !== null && (
|
|
209
|
+
t.fragment !== null && (Ft(t.after_update), fe(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
r.$$.dirty[0] === -1 && (
|
|
211
|
+
function Bt(r, e) {
|
|
212
|
+
r.$$.dirty[0] === -1 && (re.push(r), ot(), r.$$.dirty.fill(0)), r.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
const
|
|
214
|
+
function Ht(r, e, t, i, o, l, c = null, a = [-1]) {
|
|
215
|
+
const d = ae;
|
|
216
|
+
ce(r);
|
|
217
|
+
const f = r.$$ = {
|
|
218
218
|
fragment: null,
|
|
219
219
|
ctx: [],
|
|
220
220
|
// state
|
|
221
221
|
props: l,
|
|
222
|
-
update:
|
|
222
|
+
update: ie,
|
|
223
223
|
not_equal: o,
|
|
224
|
-
bound:
|
|
224
|
+
bound: He(),
|
|
225
225
|
// lifecycle
|
|
226
226
|
on_mount: [],
|
|
227
227
|
on_destroy: [],
|
|
228
228
|
on_disconnect: [],
|
|
229
229
|
before_update: [],
|
|
230
230
|
after_update: [],
|
|
231
|
-
context: new Map(e.context || (
|
|
231
|
+
context: new Map(e.context || (d ? d.$$.context : [])),
|
|
232
232
|
// everything else
|
|
233
|
-
callbacks:
|
|
234
|
-
dirty:
|
|
233
|
+
callbacks: He(),
|
|
234
|
+
dirty: a,
|
|
235
235
|
skip_bound: !1,
|
|
236
|
-
root: e.target ||
|
|
236
|
+
root: e.target || d.$$.root
|
|
237
237
|
};
|
|
238
|
-
|
|
239
|
-
let
|
|
240
|
-
if (
|
|
241
|
-
const
|
|
242
|
-
return
|
|
243
|
-
}) : [],
|
|
238
|
+
c && c(f.root);
|
|
239
|
+
let $ = !1;
|
|
240
|
+
if (f.ctx = t ? t(r, e.props || {}, (N, G, ...F) => {
|
|
241
|
+
const k = F.length ? F[0] : G;
|
|
242
|
+
return f.ctx && o(f.ctx[N], f.ctx[N] = k) && (!f.skip_bound && f.bound[N] && f.bound[N](k), $ && Bt(r, N)), G;
|
|
243
|
+
}) : [], f.update(), $ = !0, fe(f.before_update), f.fragment = i ? i(f.ctx) : !1, e.target) {
|
|
244
244
|
if (e.hydrate) {
|
|
245
|
-
const
|
|
246
|
-
|
|
245
|
+
const N = St(e.target);
|
|
246
|
+
f.fragment && f.fragment.l(N), N.forEach(j);
|
|
247
247
|
} else
|
|
248
|
-
|
|
249
|
-
e.intro &&
|
|
248
|
+
f.fragment && f.fragment.c();
|
|
249
|
+
e.intro && Ut(r.$$.fragment), Gt(r, e.target, e.anchor), y();
|
|
250
250
|
}
|
|
251
|
-
|
|
251
|
+
ce(d);
|
|
252
252
|
}
|
|
253
|
-
let
|
|
254
|
-
typeof HTMLElement == "function" && (
|
|
253
|
+
let lt;
|
|
254
|
+
typeof HTMLElement == "function" && (lt = class extends HTMLElement {
|
|
255
255
|
constructor(e, t, i) {
|
|
256
256
|
super();
|
|
257
257
|
/** The Svelte component constructor */
|
|
258
|
-
|
|
258
|
+
U(this, "$$ctor");
|
|
259
259
|
/** Slots */
|
|
260
|
-
|
|
260
|
+
U(this, "$$s");
|
|
261
261
|
/** The Svelte component instance */
|
|
262
|
-
|
|
262
|
+
U(this, "$$c");
|
|
263
263
|
/** Whether or not the custom element is connected */
|
|
264
|
-
|
|
264
|
+
U(this, "$$cn", !1);
|
|
265
265
|
/** Component props data */
|
|
266
|
-
|
|
266
|
+
U(this, "$$d", {});
|
|
267
267
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
268
|
-
|
|
268
|
+
U(this, "$$r", !1);
|
|
269
269
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
270
|
-
|
|
270
|
+
U(this, "$$p_d", {});
|
|
271
271
|
/** @type {Record<string, Function[]>} Event listeners */
|
|
272
|
-
|
|
272
|
+
U(this, "$$l", {});
|
|
273
273
|
/** @type {Map<Function, Function>} Event listener unsubscribe functions */
|
|
274
|
-
|
|
274
|
+
U(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
275
275
|
this.$$ctor = e, this.$$s = t, i && this.attachShadow({ mode: "open" });
|
|
276
276
|
}
|
|
277
277
|
addEventListener(e, t, i) {
|
|
@@ -291,32 +291,32 @@ typeof HTMLElement == "function" && (ot = class extends HTMLElement {
|
|
|
291
291
|
if (this.$$cn = !0, !this.$$c) {
|
|
292
292
|
let e = function(l) {
|
|
293
293
|
return () => {
|
|
294
|
-
let
|
|
294
|
+
let c;
|
|
295
295
|
return {
|
|
296
296
|
c: function() {
|
|
297
|
-
|
|
297
|
+
c = A("slot"), l !== "default" && s(c, "name", l);
|
|
298
298
|
},
|
|
299
299
|
/**
|
|
300
300
|
* @param {HTMLElement} target
|
|
301
301
|
* @param {HTMLElement} [anchor]
|
|
302
302
|
*/
|
|
303
|
-
m: function(
|
|
304
|
-
|
|
303
|
+
m: function(f, $) {
|
|
304
|
+
D(f, c, $);
|
|
305
305
|
},
|
|
306
|
-
d: function(
|
|
307
|
-
|
|
306
|
+
d: function(f) {
|
|
307
|
+
f && j(c);
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
};
|
|
311
311
|
};
|
|
312
312
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
313
313
|
return;
|
|
314
|
-
const t = {}, i =
|
|
314
|
+
const t = {}, i = Zt(this);
|
|
315
315
|
for (const l of this.$$s)
|
|
316
316
|
l in i && (t[l] = [e(l)]);
|
|
317
317
|
for (const l of this.attributes) {
|
|
318
|
-
const
|
|
319
|
-
|
|
318
|
+
const c = this.$$g_p(l.name);
|
|
319
|
+
c in this.$$d || (this.$$d[c] = ve(c, l.value, this.$$p_d, "toProp"));
|
|
320
320
|
}
|
|
321
321
|
for (const l in this.$$p_d)
|
|
322
322
|
!(l in this.$$d) && this[l] !== void 0 && (this.$$d[l] = this[l], delete this[l]);
|
|
@@ -334,21 +334,21 @@ typeof HTMLElement == "function" && (ot = class extends HTMLElement {
|
|
|
334
334
|
this.$$r = !0;
|
|
335
335
|
for (const l in this.$$p_d)
|
|
336
336
|
if (this.$$d[l] = this.$$c.$$.ctx[this.$$c.$$.props[l]], this.$$p_d[l].reflect) {
|
|
337
|
-
const
|
|
337
|
+
const c = ve(
|
|
338
338
|
l,
|
|
339
339
|
this.$$d[l],
|
|
340
340
|
this.$$p_d,
|
|
341
341
|
"toAttribute"
|
|
342
342
|
);
|
|
343
|
-
|
|
343
|
+
c == null ? this.removeAttribute(this.$$p_d[l].attribute || l) : this.setAttribute(this.$$p_d[l].attribute || l, c);
|
|
344
344
|
}
|
|
345
345
|
this.$$r = !1;
|
|
346
346
|
};
|
|
347
347
|
this.$$c.$$.after_update.push(o), o();
|
|
348
348
|
for (const l in this.$$l)
|
|
349
|
-
for (const
|
|
350
|
-
const
|
|
351
|
-
this.$$l_u.set(
|
|
349
|
+
for (const c of this.$$l[l]) {
|
|
350
|
+
const a = this.$$c.$on(l, c);
|
|
351
|
+
this.$$l_u.set(c, a);
|
|
352
352
|
}
|
|
353
353
|
this.$$l = {};
|
|
354
354
|
}
|
|
@@ -357,7 +357,7 @@ typeof HTMLElement == "function" && (ot = class extends HTMLElement {
|
|
|
357
357
|
// and setting attributes through setAttribute etc, this is helpful
|
|
358
358
|
attributeChangedCallback(e, t, i) {
|
|
359
359
|
var o;
|
|
360
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
360
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = ve(e, i, this.$$p_d, "toProp"), (o = this.$$c) == null || o.$set({ [e]: this.$$d[e] }));
|
|
361
361
|
}
|
|
362
362
|
disconnectedCallback() {
|
|
363
363
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -370,7 +370,7 @@ typeof HTMLElement == "function" && (ot = class extends HTMLElement {
|
|
|
370
370
|
) || e;
|
|
371
371
|
}
|
|
372
372
|
});
|
|
373
|
-
function
|
|
373
|
+
function ve(r, e, t, i) {
|
|
374
374
|
var l;
|
|
375
375
|
const o = (l = t[r]) == null ? void 0 : l.type;
|
|
376
376
|
if (e = o === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !t[r])
|
|
@@ -400,38 +400,38 @@ function me(r, e, t, i) {
|
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
let
|
|
403
|
+
function Ot(r, e, t, i, o, l) {
|
|
404
|
+
let c = class extends lt {
|
|
405
405
|
constructor() {
|
|
406
406
|
super(r, t, o), this.$$p_d = e;
|
|
407
407
|
}
|
|
408
408
|
static get observedAttributes() {
|
|
409
409
|
return Object.keys(e).map(
|
|
410
|
-
(
|
|
410
|
+
(a) => (e[a].attribute || a).toLowerCase()
|
|
411
411
|
);
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
return Object.keys(e).forEach((
|
|
415
|
-
Object.defineProperty(
|
|
414
|
+
return Object.keys(e).forEach((a) => {
|
|
415
|
+
Object.defineProperty(c.prototype, a, {
|
|
416
416
|
get() {
|
|
417
|
-
return this.$$c &&
|
|
417
|
+
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
418
418
|
},
|
|
419
|
-
set(
|
|
420
|
-
var
|
|
421
|
-
|
|
419
|
+
set(d) {
|
|
420
|
+
var f;
|
|
421
|
+
d = ve(a, d, e), this.$$d[a] = d, (f = this.$$c) == null || f.$set({ [a]: d });
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
|
-
}), i.forEach((
|
|
425
|
-
Object.defineProperty(
|
|
424
|
+
}), i.forEach((a) => {
|
|
425
|
+
Object.defineProperty(c.prototype, a, {
|
|
426
426
|
get() {
|
|
427
|
-
var
|
|
428
|
-
return (
|
|
427
|
+
var d;
|
|
428
|
+
return (d = this.$$c) == null ? void 0 : d[a];
|
|
429
429
|
}
|
|
430
430
|
});
|
|
431
|
-
}), l && (
|
|
432
|
-
|
|
431
|
+
}), l && (c = l(c)), r.element = /** @type {any} */
|
|
432
|
+
c, c;
|
|
433
433
|
}
|
|
434
|
-
class
|
|
434
|
+
class Wt {
|
|
435
435
|
constructor() {
|
|
436
436
|
/**
|
|
437
437
|
* ### PRIVATE API
|
|
@@ -440,7 +440,7 @@ class Bt {
|
|
|
440
440
|
*
|
|
441
441
|
* @type {any}
|
|
442
442
|
*/
|
|
443
|
-
|
|
443
|
+
U(this, "$$");
|
|
444
444
|
/**
|
|
445
445
|
* ### PRIVATE API
|
|
446
446
|
*
|
|
@@ -448,11 +448,11 @@ class Bt {
|
|
|
448
448
|
*
|
|
449
449
|
* @type {any}
|
|
450
450
|
*/
|
|
451
|
-
|
|
451
|
+
U(this, "$$set");
|
|
452
452
|
}
|
|
453
453
|
/** @returns {void} */
|
|
454
454
|
$destroy() {
|
|
455
|
-
|
|
455
|
+
Xt(this, 1), this.$destroy = ie;
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -461,8 +461,8 @@ class Bt {
|
|
|
461
461
|
* @returns {() => void}
|
|
462
462
|
*/
|
|
463
463
|
$on(e, t) {
|
|
464
|
-
if (!
|
|
465
|
-
return
|
|
464
|
+
if (!nt(t))
|
|
465
|
+
return ie;
|
|
466
466
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
467
467
|
return i.push(t), () => {
|
|
468
468
|
const o = i.indexOf(t);
|
|
@@ -474,19 +474,19 @@ class Bt {
|
|
|
474
474
|
* @returns {void}
|
|
475
475
|
*/
|
|
476
476
|
$set(e) {
|
|
477
|
-
this.$$set && !
|
|
477
|
+
this.$$set && !Lt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
const
|
|
481
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
482
|
-
const
|
|
483
|
-
function
|
|
480
|
+
const Pt = "4";
|
|
481
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Pt);
|
|
482
|
+
const Yt = new TextEncoder();
|
|
483
|
+
function Kt(r) {
|
|
484
484
|
return [...new Uint8Array(r)].map((e) => e.toString(16).padStart(2, "0")).join("");
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
486
|
+
async function Jt(r, e = "SHA-256", t = 1e5) {
|
|
487
487
|
const i = Date.now().toString(16);
|
|
488
488
|
r || (r = Math.round(Math.random() * t));
|
|
489
|
-
const o = await
|
|
489
|
+
const o = await st(i, r, e);
|
|
490
490
|
return {
|
|
491
491
|
algorithm: e,
|
|
492
492
|
challenge: o,
|
|
@@ -494,25 +494,25 @@ async function Pt(r, e = "SHA-256", t = 1e5) {
|
|
|
494
494
|
signature: ""
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
|
-
async function
|
|
498
|
-
return
|
|
497
|
+
async function st(r, e, t) {
|
|
498
|
+
return Kt(
|
|
499
499
|
await crypto.subtle.digest(
|
|
500
500
|
t.toUpperCase(),
|
|
501
|
-
|
|
501
|
+
Yt.encode(r + e)
|
|
502
502
|
)
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
const l = new AbortController(),
|
|
505
|
+
function qt(r, e, t = "SHA-256", i = 1e6, o = 0) {
|
|
506
|
+
const l = new AbortController(), c = Date.now();
|
|
507
507
|
return {
|
|
508
508
|
promise: (async () => {
|
|
509
|
-
for (let
|
|
509
|
+
for (let d = o; d <= i; d += 1) {
|
|
510
510
|
if (l.signal.aborted)
|
|
511
511
|
return null;
|
|
512
|
-
if (await
|
|
512
|
+
if (await st(e, d, t) === r)
|
|
513
513
|
return {
|
|
514
|
-
number:
|
|
515
|
-
took: Date.now() -
|
|
514
|
+
number: d,
|
|
515
|
+
took: Date.now() - c
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
return null;
|
|
@@ -521,49 +521,49 @@ function Kt(r, e, t = "SHA-256", i = 1e6, o = 0) {
|
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
523
|
var b = /* @__PURE__ */ ((r) => (r.ERROR = "error", r.VERIFIED = "verified", r.VERIFYING = "verifying", r.UNVERIFIED = "unverified", r.EXPIRED = "expired", r))(b || {});
|
|
524
|
-
function
|
|
525
|
-
|
|
524
|
+
function Qt(r) {
|
|
525
|
+
Rt(r, "svelte-ddsc3z", '.altcha.svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, transparent);border:var(--altcha-border-width, 1px) solid var(--altcha-color-border, #a0a0a0);border-radius:var(--altcha-border-radius, 3px);color:var(--altcha-color-text, currentColor);display:flex;flex-direction:column;max-width:var(--altcha-max-width, 260px);position:relative;text-align:left}.altcha.svelte-ddsc3z.svelte-ddsc3z:focus-within{border-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z{background:var(--altcha-color-base, white);display:none;filter:drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.2));left:-100%;position:fixed;top:-100%;width:var(--altcha-max-width, 260px);z-index:999999}.altcha[data-floating=top].svelte-ddsc3z .altcha-anchor-arrow.svelte-ddsc3z{border-bottom-color:transparent;border-top-color:var(--altcha-color-border, #a0a0a0);bottom:-12px;top:auto}.altcha[data-floating=bottom].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-bottom-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating=top].svelte-ddsc3z.svelte-ddsc3z:focus-within::after{border-top-color:var(--altcha-color-border-focus, currentColor)}.altcha[data-floating].svelte-ddsc3z.svelte-ddsc3z:not([data-state=unverified]){display:block}.altcha-anchor-arrow.svelte-ddsc3z.svelte-ddsc3z{border:6px solid transparent;border-bottom-color:var(--altcha-color-border, #a0a0a0);content:"";height:0;left:12px;position:absolute;top:-12px;width:0}.altcha-main.svelte-ddsc3z.svelte-ddsc3z{align-items:center;display:flex;gap:0.4rem;padding:0.7rem}.altcha-label.svelte-ddsc3z.svelte-ddsc3z{flex-grow:1}.altcha-label.svelte-ddsc3z label.svelte-ddsc3z{cursor:pointer}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z{color:currentColor;opacity:0.3}.altcha-logo.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-error.svelte-ddsc3z.svelte-ddsc3z{color:var(--altcha-color-error-text, #f23939);display:flex;font-size:0.85rem;gap:0.3rem;padding:0 0.7rem 0.7rem}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z{align-items:center;background-color:var(--altcha-color-footer-bg, transparent);display:flex;font-size:0.75rem;opacity:0.4;padding:0.2rem 0.7rem;text-align:right}.altcha-footer.svelte-ddsc3z.svelte-ddsc3z:hover{opacity:1}.altcha-footer.svelte-ddsc3z>.svelte-ddsc3z:first-child{flex-grow:1}.altcha-footer.svelte-ddsc3z a{color:currentColor}.altcha-checkbox.svelte-ddsc3z.svelte-ddsc3z{display:flex;align-items:center;height:24px;width:24px}.altcha-checkbox.svelte-ddsc3z input.svelte-ddsc3z{width:18px;height:18px;margin:0}.altcha-hidden.svelte-ddsc3z.svelte-ddsc3z{display:none}.altcha-spinner.svelte-ddsc3z.svelte-ddsc3z{animation:svelte-ddsc3z-altcha-spinner 0.75s infinite linear;transform-origin:center}@keyframes svelte-ddsc3z-altcha-spinner{100%{transform:rotate(360deg)}}');
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function Pe(r) {
|
|
528
528
|
let e, t, i;
|
|
529
529
|
return {
|
|
530
530
|
c() {
|
|
531
|
-
e =
|
|
531
|
+
e = O("svg"), t = O("path"), i = O("path"), s(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"), s(t, "fill", "currentColor"), s(t, "opacity", ".25"), s(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"), s(i, "fill", "currentColor"), s(i, "class", "altcha-spinner svelte-ddsc3z"), s(e, "width", "24"), s(e, "height", "24"), s(e, "viewBox", "0 0 24 24"), s(e, "xmlns", "http://www.w3.org/2000/svg");
|
|
532
532
|
},
|
|
533
533
|
m(o, l) {
|
|
534
|
-
|
|
534
|
+
D(o, e, l), _(e, t), _(e, i);
|
|
535
535
|
},
|
|
536
536
|
d(o) {
|
|
537
|
-
o &&
|
|
537
|
+
o && j(e);
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function er(r) {
|
|
542
542
|
let e, t = (
|
|
543
543
|
/*_strings*/
|
|
544
544
|
r[11].label + ""
|
|
545
545
|
), i;
|
|
546
546
|
return {
|
|
547
547
|
c() {
|
|
548
|
-
e = A("label"),
|
|
549
|
-
r[4] + "_checkbox"),
|
|
548
|
+
e = A("label"), s(e, "for", i = /*name*/
|
|
549
|
+
r[4] + "_checkbox"), s(e, "class", "svelte-ddsc3z");
|
|
550
550
|
},
|
|
551
551
|
m(o, l) {
|
|
552
|
-
|
|
552
|
+
D(o, e, l), e.innerHTML = t;
|
|
553
553
|
},
|
|
554
554
|
p(o, l) {
|
|
555
555
|
l[0] & /*_strings*/
|
|
556
556
|
2048 && t !== (t = /*_strings*/
|
|
557
557
|
o[11].label + "") && (e.innerHTML = t), l[0] & /*name*/
|
|
558
558
|
16 && i !== (i = /*name*/
|
|
559
|
-
o[4] + "_checkbox") &&
|
|
559
|
+
o[4] + "_checkbox") && s(e, "for", i);
|
|
560
560
|
},
|
|
561
561
|
d(o) {
|
|
562
|
-
o &&
|
|
562
|
+
o && j(e);
|
|
563
563
|
}
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function tr(r) {
|
|
567
567
|
let e, t = (
|
|
568
568
|
/*_strings*/
|
|
569
569
|
r[11].verifying + ""
|
|
@@ -573,7 +573,7 @@ function Qt(r) {
|
|
|
573
573
|
e = A("span");
|
|
574
574
|
},
|
|
575
575
|
m(i, o) {
|
|
576
|
-
|
|
576
|
+
D(i, e, o), e.innerHTML = t;
|
|
577
577
|
},
|
|
578
578
|
p(i, o) {
|
|
579
579
|
o[0] & /*_strings*/
|
|
@@ -581,18 +581,18 @@ function Qt(r) {
|
|
|
581
581
|
i[11].verifying + "") && (e.innerHTML = t);
|
|
582
582
|
},
|
|
583
583
|
d(i) {
|
|
584
|
-
i &&
|
|
584
|
+
i && j(e);
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function rr(r) {
|
|
589
589
|
let e, t = (
|
|
590
590
|
/*_strings*/
|
|
591
591
|
r[11].verified + ""
|
|
592
592
|
), i, o;
|
|
593
593
|
return {
|
|
594
594
|
c() {
|
|
595
|
-
e = A("span"), i = Y(), o = A("input"),
|
|
595
|
+
e = A("span"), i = Y(), o = A("input"), s(o, "type", "hidden"), s(
|
|
596
596
|
o,
|
|
597
597
|
"name",
|
|
598
598
|
/*name*/
|
|
@@ -600,79 +600,79 @@ function er(r) {
|
|
|
600
600
|
), o.value = /*payload*/
|
|
601
601
|
r[5];
|
|
602
602
|
},
|
|
603
|
-
m(l,
|
|
604
|
-
|
|
603
|
+
m(l, c) {
|
|
604
|
+
D(l, e, c), e.innerHTML = t, D(l, i, c), D(l, o, c);
|
|
605
605
|
},
|
|
606
|
-
p(l,
|
|
607
|
-
|
|
606
|
+
p(l, c) {
|
|
607
|
+
c[0] & /*_strings*/
|
|
608
608
|
2048 && t !== (t = /*_strings*/
|
|
609
|
-
l[11].verified + "") && (e.innerHTML = t),
|
|
610
|
-
16 &&
|
|
609
|
+
l[11].verified + "") && (e.innerHTML = t), c[0] & /*name*/
|
|
610
|
+
16 && s(
|
|
611
611
|
o,
|
|
612
612
|
"name",
|
|
613
613
|
/*name*/
|
|
614
614
|
l[4]
|
|
615
|
-
),
|
|
615
|
+
), c[0] & /*payload*/
|
|
616
616
|
32 && (o.value = /*payload*/
|
|
617
617
|
l[5]);
|
|
618
618
|
},
|
|
619
619
|
d(l) {
|
|
620
|
-
l && (
|
|
620
|
+
l && (j(e), j(i), j(o));
|
|
621
621
|
}
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
624
|
function Ye(r) {
|
|
625
|
-
let e, t, i, o, l,
|
|
625
|
+
let e, t, i, o, l, c, a;
|
|
626
626
|
return {
|
|
627
627
|
c() {
|
|
628
|
-
e = A("div"), t = A("a"), i =
|
|
628
|
+
e = A("div"), t = A("a"), i = O("svg"), o = O("path"), l = O("path"), c = O("path"), s(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"), s(o, "fill", "currentColor"), s(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"), s(l, "fill", "currentColor"), s(c, "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"), s(c, "fill", "currentColor"), s(i, "width", "22"), s(i, "height", "22"), s(i, "viewBox", "0 0 20 20"), s(i, "fill", "none"), s(i, "xmlns", "http://www.w3.org/2000/svg"), s(t, "href", ct), s(t, "target", "_blank"), s(t, "class", "altcha-logo svelte-ddsc3z"), s(t, "aria-label", a = /*_strings*/
|
|
629
629
|
r[11].ariaLinkLabel);
|
|
630
630
|
},
|
|
631
|
-
m(
|
|
632
|
-
|
|
631
|
+
m(d, f) {
|
|
632
|
+
D(d, e, f), _(e, t), _(t, i), _(i, o), _(i, l), _(i, c);
|
|
633
633
|
},
|
|
634
|
-
p(
|
|
635
|
-
|
|
636
|
-
2048 &&
|
|
637
|
-
|
|
634
|
+
p(d, f) {
|
|
635
|
+
f[0] & /*_strings*/
|
|
636
|
+
2048 && a !== (a = /*_strings*/
|
|
637
|
+
d[11].ariaLinkLabel) && s(t, "aria-label", a);
|
|
638
638
|
},
|
|
639
|
-
d(
|
|
640
|
-
|
|
639
|
+
d(d) {
|
|
640
|
+
d && j(e);
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Ke(r) {
|
|
645
645
|
let e, t, i, o;
|
|
646
|
-
function l(
|
|
646
|
+
function l(d, f) {
|
|
647
647
|
return (
|
|
648
648
|
/*state*/
|
|
649
|
-
|
|
649
|
+
d[6] === b.EXPIRED ? ir : nr
|
|
650
650
|
);
|
|
651
651
|
}
|
|
652
|
-
let
|
|
652
|
+
let c = l(r), a = c(r);
|
|
653
653
|
return {
|
|
654
654
|
c() {
|
|
655
|
-
e = A("div"), t =
|
|
655
|
+
e = A("div"), t = O("svg"), i = O("path"), o = Y(), a.c(), s(i, "stroke-linecap", "round"), s(i, "stroke-linejoin", "round"), s(i, "d", "M6 18L18 6M6 6l12 12"), s(t, "width", "14"), s(t, "height", "14"), s(t, "xmlns", "http://www.w3.org/2000/svg"), s(t, "fill", "none"), s(t, "viewBox", "0 0 24 24"), s(t, "stroke-width", "1.5"), s(t, "stroke", "currentColor"), s(e, "class", "altcha-error svelte-ddsc3z");
|
|
656
656
|
},
|
|
657
|
-
m(
|
|
658
|
-
|
|
657
|
+
m(d, f) {
|
|
658
|
+
D(d, e, f), _(e, t), _(t, i), _(e, o), a.m(e, null);
|
|
659
659
|
},
|
|
660
|
-
p(
|
|
661
|
-
|
|
660
|
+
p(d, f) {
|
|
661
|
+
c === (c = l(d)) && a ? a.p(d, f) : (a.d(1), a = c(d), a && (a.c(), a.m(e, null)));
|
|
662
662
|
},
|
|
663
|
-
d(
|
|
664
|
-
|
|
663
|
+
d(d) {
|
|
664
|
+
d && j(e), a.d();
|
|
665
665
|
}
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function nr(r) {
|
|
669
669
|
let e, t = (
|
|
670
670
|
/*_strings*/
|
|
671
671
|
r[11].error + ""
|
|
672
672
|
);
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e = A("div"),
|
|
675
|
+
e = A("div"), s(
|
|
676
676
|
e,
|
|
677
677
|
"title",
|
|
678
678
|
/*error*/
|
|
@@ -680,13 +680,13 @@ function tr(r) {
|
|
|
680
680
|
);
|
|
681
681
|
},
|
|
682
682
|
m(i, o) {
|
|
683
|
-
|
|
683
|
+
D(i, e, o), e.innerHTML = t;
|
|
684
684
|
},
|
|
685
685
|
p(i, o) {
|
|
686
686
|
o[0] & /*_strings*/
|
|
687
687
|
2048 && t !== (t = /*_strings*/
|
|
688
688
|
i[11].error + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
689
|
-
1024 &&
|
|
689
|
+
1024 && s(
|
|
690
690
|
e,
|
|
691
691
|
"title",
|
|
692
692
|
/*error*/
|
|
@@ -694,18 +694,18 @@ function tr(r) {
|
|
|
694
694
|
);
|
|
695
695
|
},
|
|
696
696
|
d(i) {
|
|
697
|
-
i &&
|
|
697
|
+
i && j(e);
|
|
698
698
|
}
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function ir(r) {
|
|
702
702
|
let e, t = (
|
|
703
703
|
/*_strings*/
|
|
704
704
|
r[11].expired + ""
|
|
705
705
|
);
|
|
706
706
|
return {
|
|
707
707
|
c() {
|
|
708
|
-
e = A("div"),
|
|
708
|
+
e = A("div"), s(
|
|
709
709
|
e,
|
|
710
710
|
"title",
|
|
711
711
|
/*error*/
|
|
@@ -713,13 +713,13 @@ function rr(r) {
|
|
|
713
713
|
);
|
|
714
714
|
},
|
|
715
715
|
m(i, o) {
|
|
716
|
-
|
|
716
|
+
D(i, e, o), e.innerHTML = t;
|
|
717
717
|
},
|
|
718
718
|
p(i, o) {
|
|
719
719
|
o[0] & /*_strings*/
|
|
720
720
|
2048 && t !== (t = /*_strings*/
|
|
721
721
|
i[11].expired + "") && (e.innerHTML = t), o[0] & /*error*/
|
|
722
|
-
1024 &&
|
|
722
|
+
1024 && s(
|
|
723
723
|
e,
|
|
724
724
|
"title",
|
|
725
725
|
/*error*/
|
|
@@ -727,21 +727,21 @@ function rr(r) {
|
|
|
727
727
|
);
|
|
728
728
|
},
|
|
729
729
|
d(i) {
|
|
730
|
-
i &&
|
|
730
|
+
i && j(e);
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function Je(r) {
|
|
735
735
|
let e, t, i = (
|
|
736
736
|
/*_strings*/
|
|
737
737
|
r[11].footer + ""
|
|
738
738
|
);
|
|
739
739
|
return {
|
|
740
740
|
c() {
|
|
741
|
-
e = A("div"), t = A("div"),
|
|
741
|
+
e = A("div"), t = A("div"), s(t, "class", "svelte-ddsc3z"), s(e, "class", "altcha-footer svelte-ddsc3z");
|
|
742
742
|
},
|
|
743
743
|
m(o, l) {
|
|
744
|
-
|
|
744
|
+
D(o, e, l), _(e, t), t.innerHTML = i;
|
|
745
745
|
},
|
|
746
746
|
p(o, l) {
|
|
747
747
|
l[0] & /*_strings*/
|
|
@@ -749,182 +749,186 @@ function Ke(r) {
|
|
|
749
749
|
o[11].footer + "") && (t.innerHTML = i);
|
|
750
750
|
},
|
|
751
751
|
d(o) {
|
|
752
|
-
o &&
|
|
752
|
+
o && j(e);
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function qe(r) {
|
|
757
757
|
let e;
|
|
758
758
|
return {
|
|
759
759
|
c() {
|
|
760
|
-
e = A("div"),
|
|
760
|
+
e = A("div"), s(e, "class", "altcha-anchor-arrow svelte-ddsc3z");
|
|
761
761
|
},
|
|
762
762
|
m(t, i) {
|
|
763
|
-
|
|
763
|
+
D(t, e, i), r[37](e);
|
|
764
764
|
},
|
|
765
|
-
p:
|
|
765
|
+
p: ie,
|
|
766
766
|
d(t) {
|
|
767
|
-
t &&
|
|
767
|
+
t && j(e), r[37](null);
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
let e, t, i, o, l,
|
|
771
|
+
function or(r) {
|
|
772
|
+
let e, t, i, o, l, c, a, d, f, $, N, G, F, k, W, S = (
|
|
773
773
|
/*state*/
|
|
774
|
-
r[6] === b.VERIFYING &&
|
|
774
|
+
r[6] === b.VERIFYING && Pe()
|
|
775
775
|
);
|
|
776
|
-
function
|
|
776
|
+
function K(h, v) {
|
|
777
777
|
return (
|
|
778
778
|
/*state*/
|
|
779
|
-
h[6] === b.VERIFIED ?
|
|
779
|
+
h[6] === b.VERIFIED ? rr : (
|
|
780
780
|
/*state*/
|
|
781
|
-
h[6] === b.VERIFYING ?
|
|
781
|
+
h[6] === b.VERIFYING ? tr : er
|
|
782
782
|
)
|
|
783
783
|
);
|
|
784
784
|
}
|
|
785
|
-
let H =
|
|
785
|
+
let H = K(r), M = H(r), E = (
|
|
786
786
|
/*hidelogo*/
|
|
787
|
-
r[3] !== !0
|
|
787
|
+
(r[3] !== !0 || /*isFreeSaaS*/
|
|
788
|
+
r[12]) && Ye(r)
|
|
788
789
|
), R = (
|
|
789
790
|
/*error*/
|
|
790
791
|
(r[10] || /*state*/
|
|
791
|
-
r[6] === b.EXPIRED) &&
|
|
792
|
-
),
|
|
792
|
+
r[6] === b.EXPIRED) && Ke(r)
|
|
793
|
+
), I = (
|
|
793
794
|
/*_strings*/
|
|
794
795
|
r[11].footer && /*hidefooter*/
|
|
795
|
-
r[2] !== !0
|
|
796
|
-
|
|
796
|
+
(r[2] !== !0 || /*isFreeSaaS*/
|
|
797
|
+
r[12]) && Je(r)
|
|
798
|
+
), w = (
|
|
797
799
|
/*floating*/
|
|
798
|
-
r[1] &&
|
|
800
|
+
r[1] && qe(r)
|
|
799
801
|
);
|
|
800
802
|
return {
|
|
801
803
|
c() {
|
|
802
|
-
e = A("div"), t = A("div"),
|
|
803
|
-
r[4] + "_checkbox"), l.required =
|
|
804
|
-
r[0] !== "onsubmit",
|
|
804
|
+
e = A("div"), t = A("div"), S && S.c(), i = Y(), o = A("div"), l = A("input"), d = Y(), f = A("div"), M.c(), $ = Y(), E && E.c(), N = Y(), R && R.c(), G = Y(), I && I.c(), F = Y(), w && w.c(), s(l, "type", "checkbox"), s(l, "id", c = /*name*/
|
|
805
|
+
r[4] + "_checkbox"), l.required = a = /*auto*/
|
|
806
|
+
r[0] !== "onsubmit", s(l, "class", "svelte-ddsc3z"), s(o, "class", "altcha-checkbox svelte-ddsc3z"), Oe(
|
|
805
807
|
o,
|
|
806
808
|
"altcha-hidden",
|
|
807
809
|
/*state*/
|
|
808
810
|
r[6] === b.VERIFYING
|
|
809
|
-
),
|
|
811
|
+
), s(f, "class", "altcha-label svelte-ddsc3z"), s(t, "class", "altcha-main svelte-ddsc3z"), s(e, "class", "altcha svelte-ddsc3z"), s(
|
|
810
812
|
e,
|
|
811
813
|
"data-state",
|
|
812
814
|
/*state*/
|
|
813
815
|
r[6]
|
|
814
|
-
),
|
|
816
|
+
), s(
|
|
815
817
|
e,
|
|
816
818
|
"data-floating",
|
|
817
819
|
/*floating*/
|
|
818
820
|
r[1]
|
|
819
821
|
);
|
|
820
822
|
},
|
|
821
|
-
m(h,
|
|
822
|
-
|
|
823
|
-
r[7], _(t,
|
|
824
|
-
|
|
823
|
+
m(h, v) {
|
|
824
|
+
D(h, e, v), _(e, t), S && S.m(t, null), _(t, i), _(t, o), _(o, l), l.checked = /*checked*/
|
|
825
|
+
r[7], _(t, d), _(t, f), M.m(f, null), _(t, $), E && E.m(t, null), _(e, N), R && R.m(e, null), _(e, G), I && I.m(e, null), _(e, F), w && w.m(e, null), r[38](e), k || (W = [
|
|
826
|
+
xe(
|
|
825
827
|
l,
|
|
826
828
|
"change",
|
|
827
829
|
/*input_change_handler*/
|
|
828
|
-
r[
|
|
830
|
+
r[36]
|
|
829
831
|
),
|
|
830
|
-
|
|
832
|
+
xe(
|
|
831
833
|
l,
|
|
832
834
|
"change",
|
|
833
835
|
/*onCheckedChange*/
|
|
834
|
-
r[
|
|
836
|
+
r[13]
|
|
835
837
|
),
|
|
836
|
-
|
|
838
|
+
xe(
|
|
837
839
|
l,
|
|
838
840
|
"invalid",
|
|
839
841
|
/*onInvalid*/
|
|
840
|
-
r[
|
|
842
|
+
r[14]
|
|
841
843
|
)
|
|
842
|
-
],
|
|
844
|
+
], k = !0);
|
|
843
845
|
},
|
|
844
|
-
p(h,
|
|
846
|
+
p(h, v) {
|
|
845
847
|
/*state*/
|
|
846
|
-
h[6] === b.VERIFYING ?
|
|
847
|
-
16 &&
|
|
848
|
-
h[4] + "_checkbox") &&
|
|
849
|
-
1 &&
|
|
850
|
-
h[0] !== "onsubmit") && (l.required =
|
|
848
|
+
h[6] === b.VERIFYING ? S || (S = Pe(), S.c(), S.m(t, i)) : S && (S.d(1), S = null), v[0] & /*name*/
|
|
849
|
+
16 && c !== (c = /*name*/
|
|
850
|
+
h[4] + "_checkbox") && s(l, "id", c), v[0] & /*auto*/
|
|
851
|
+
1 && a !== (a = /*auto*/
|
|
852
|
+
h[0] !== "onsubmit") && (l.required = a), v[0] & /*checked*/
|
|
851
853
|
128 && (l.checked = /*checked*/
|
|
852
|
-
h[7]),
|
|
853
|
-
64 &&
|
|
854
|
+
h[7]), v[0] & /*state*/
|
|
855
|
+
64 && Oe(
|
|
854
856
|
o,
|
|
855
857
|
"altcha-hidden",
|
|
856
858
|
/*state*/
|
|
857
859
|
h[6] === b.VERIFYING
|
|
858
|
-
), H === (H =
|
|
859
|
-
h[3] !== !0
|
|
860
|
+
), H === (H = K(h)) && M ? M.p(h, v) : (M.d(1), M = H(h), M && (M.c(), M.m(f, null))), /*hidelogo*/
|
|
861
|
+
h[3] !== !0 || /*isFreeSaaS*/
|
|
862
|
+
h[12] ? E ? E.p(h, v) : (E = Ye(h), E.c(), E.m(t, null)) : E && (E.d(1), E = null), /*error*/
|
|
860
863
|
h[10] || /*state*/
|
|
861
|
-
h[6] === b.EXPIRED ? R ? R.p(h,
|
|
864
|
+
h[6] === b.EXPIRED ? R ? R.p(h, v) : (R = Ke(h), R.c(), R.m(e, G)) : R && (R.d(1), R = null), /*_strings*/
|
|
862
865
|
h[11].footer && /*hidefooter*/
|
|
863
|
-
h[2] !== !0
|
|
864
|
-
h[
|
|
865
|
-
|
|
866
|
+
(h[2] !== !0 || /*isFreeSaaS*/
|
|
867
|
+
h[12]) ? I ? I.p(h, v) : (I = Je(h), I.c(), I.m(e, F)) : I && (I.d(1), I = null), /*floating*/
|
|
868
|
+
h[1] ? w ? w.p(h, v) : (w = qe(h), w.c(), w.m(e, null)) : w && (w.d(1), w = null), v[0] & /*state*/
|
|
869
|
+
64 && s(
|
|
866
870
|
e,
|
|
867
871
|
"data-state",
|
|
868
872
|
/*state*/
|
|
869
873
|
h[6]
|
|
870
|
-
),
|
|
871
|
-
2 &&
|
|
874
|
+
), v[0] & /*floating*/
|
|
875
|
+
2 && s(
|
|
872
876
|
e,
|
|
873
877
|
"data-floating",
|
|
874
878
|
/*floating*/
|
|
875
879
|
h[1]
|
|
876
880
|
);
|
|
877
881
|
},
|
|
878
|
-
i:
|
|
879
|
-
o:
|
|
882
|
+
i: ie,
|
|
883
|
+
o: ie,
|
|
880
884
|
d(h) {
|
|
881
|
-
h &&
|
|
885
|
+
h && j(e), S && S.d(), M.d(), E && E.d(), R && R.d(), I && I.d(), w && w.d(), r[38](null), k = !1, fe(W);
|
|
882
886
|
}
|
|
883
887
|
};
|
|
884
888
|
}
|
|
885
|
-
const
|
|
886
|
-
function
|
|
889
|
+
const Qe = "Visit Altcha.org", ct = "https://altcha.org/";
|
|
890
|
+
function et(r) {
|
|
887
891
|
return JSON.parse(r);
|
|
888
892
|
}
|
|
889
|
-
function
|
|
893
|
+
function lr() {
|
|
890
894
|
try {
|
|
891
895
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
892
896
|
} catch {
|
|
893
897
|
}
|
|
894
898
|
}
|
|
895
|
-
function
|
|
896
|
-
var
|
|
897
|
-
let i, o, l, { auto:
|
|
898
|
-
const
|
|
899
|
-
let
|
|
900
|
-
|
|
901
|
-
m && (m.removeEventListener("submit",
|
|
902
|
-
}),
|
|
903
|
-
|
|
899
|
+
function sr(r, e, t) {
|
|
900
|
+
var Ge, Xe;
|
|
901
|
+
let i, o, l, c, { auto: a = void 0 } = e, { blockspam: d = void 0 } = e, { challengeurl: f = void 0 } = e, { challengejson: $ = void 0 } = e, { debug: N = !1 } = e, { delay: G = 0 } = e, { expire: F = void 0 } = e, { floating: k = void 0 } = e, { floatinganchor: W = void 0 } = e, { floatingoffset: S = void 0 } = e, { hidefooter: K = !1 } = e, { hidelogo: H = !1 } = e, { name: M = "altcha" } = e, { maxnumber: E = 1e6 } = e, { mockerror: R = !1 } = e, { refetchonexpire: I = !0 } = e, { spamfilter: w = !1 } = e, { strings: h = void 0 } = e, { test: v = !1 } = e, { verifyurl: J = void 0 } = e, { workers: oe = Math.min(16, navigator.hardwareConcurrency || 8) } = e, { workerurl: ue = void 0 } = e;
|
|
902
|
+
const ye = Tt(), Ie = ["SHA-256", "SHA-384", "SHA-512"], ze = (Xe = (Ge = document.documentElement.lang) == null ? void 0 : Ge.split("-")) == null ? void 0 : Xe[0];
|
|
903
|
+
let P = !1, C, q = null, de = null, m = null, pe = null, Q = null, T = b.UNVERIFIED, X = null;
|
|
904
|
+
Mt(() => {
|
|
905
|
+
m && (m.removeEventListener("submit", Se), m.removeEventListener("reset", Ne), m.removeEventListener("focusin", Ae), m = null), X && (clearTimeout(X), X = null), document.removeEventListener("click", Te), document.removeEventListener("scroll", Ve), window.removeEventListener("resize", Fe);
|
|
906
|
+
}), jt(() => {
|
|
907
|
+
x("mounted", "0.6.4"), x("workers", oe), v && x("using test mode"), F && he(F), a !== void 0 && x("auto", a), k !== void 0 && $e(k), m = C.closest("form"), m && (m.addEventListener("submit", Se, { capture: !0 }), m.addEventListener("reset", Ne), a === "onfocus" && m.addEventListener("focusin", Ae)), a === "onload" && ee(), i && (K || H) && x("Attributes hidefooter and hidelogo ignored because usage with free API Keys require attribution.");
|
|
904
908
|
});
|
|
905
|
-
function
|
|
906
|
-
(
|
|
907
|
-
}
|
|
908
|
-
function Ie(n) {
|
|
909
|
-
M === b.UNVERIFIED && q();
|
|
909
|
+
function x(...n) {
|
|
910
|
+
(N || n.some((u) => u instanceof Error)) && console[n[0] instanceof Error ? "error" : "log"]("ALTCHA", ...n);
|
|
910
911
|
}
|
|
911
912
|
function Ae(n) {
|
|
912
|
-
|
|
913
|
+
T === b.UNVERIFIED && ee();
|
|
914
|
+
}
|
|
915
|
+
function Se(n) {
|
|
916
|
+
m && a === "onsubmit" && (T === b.UNVERIFIED ? (n.preventDefault(), n.stopPropagation(), ee().then(() => {
|
|
913
917
|
m == null || m.requestSubmit();
|
|
914
|
-
})) :
|
|
918
|
+
})) : T !== b.VERIFIED && (n.preventDefault(), n.stopPropagation(), T === b.VERIFYING && De()));
|
|
915
919
|
}
|
|
916
920
|
function Ne() {
|
|
917
|
-
|
|
921
|
+
ge();
|
|
918
922
|
}
|
|
919
|
-
function
|
|
923
|
+
function Ze(n, u) {
|
|
920
924
|
return btoa(JSON.stringify({
|
|
921
925
|
algorithm: n.algorithm,
|
|
922
926
|
challenge: n.challenge,
|
|
923
|
-
number:
|
|
927
|
+
number: u.number,
|
|
924
928
|
salt: n.salt,
|
|
925
929
|
signature: n.signature,
|
|
926
|
-
test:
|
|
927
|
-
took:
|
|
930
|
+
test: v ? !0 : void 0,
|
|
931
|
+
took: u.took
|
|
928
932
|
}));
|
|
929
933
|
}
|
|
930
934
|
function je(n) {
|
|
@@ -932,322 +936,335 @@ function or(r, e, t) {
|
|
|
932
936
|
throw new Error("Invalid challenge. Property algorithm is missing.");
|
|
933
937
|
if (n.signature === void 0)
|
|
934
938
|
throw new Error("Invalid challenge. Property signature is missing.");
|
|
935
|
-
if (!
|
|
936
|
-
throw new Error(`Unknown algorithm value. Allowed values: ${
|
|
939
|
+
if (!Ie.includes(n.algorithm.toUpperCase()))
|
|
940
|
+
throw new Error(`Unknown algorithm value. Allowed values: ${Ie.join(", ")}`);
|
|
937
941
|
if (!n.challenge || n.challenge.length < 40)
|
|
938
942
|
throw new Error("Challenge is too short. Min. 40 chars.");
|
|
939
943
|
if (!n.salt || n.salt.length < 10)
|
|
940
944
|
throw new Error("Salt is too short. Min. 10 chars.");
|
|
941
945
|
}
|
|
942
|
-
async function
|
|
946
|
+
async function at() {
|
|
943
947
|
var n;
|
|
944
|
-
if (
|
|
945
|
-
throw
|
|
946
|
-
if (
|
|
947
|
-
return
|
|
948
|
-
if (
|
|
949
|
-
return
|
|
948
|
+
if (R)
|
|
949
|
+
throw x("mocking error"), new Error("Mocked error.");
|
|
950
|
+
if (o)
|
|
951
|
+
return x("using provided json data"), o;
|
|
952
|
+
if (v)
|
|
953
|
+
return x("generating test challenge", { test: v }), Jt(typeof v != "boolean" ? +v : void 0);
|
|
950
954
|
{
|
|
951
955
|
if (!f)
|
|
952
956
|
throw new Error("Attribute challengeurl not set.");
|
|
953
|
-
|
|
954
|
-
const
|
|
957
|
+
x("fetching challenge from", f);
|
|
958
|
+
const u = await fetch(f, {
|
|
955
959
|
headers: {
|
|
956
960
|
"x-altcha-spam-filter": w ? "1" : "0"
|
|
957
961
|
}
|
|
958
962
|
});
|
|
959
|
-
if (
|
|
960
|
-
throw new Error(`Server responded with ${
|
|
961
|
-
const g =
|
|
962
|
-
if (
|
|
963
|
-
const p = new Date(+
|
|
964
|
-
|
|
963
|
+
if (u.status !== 200)
|
|
964
|
+
throw new Error(`Server responded with ${u.status}.`);
|
|
965
|
+
const g = u.headers.get("Expires"), z = u.headers.get("X-Altcha-Config"), V = await u.json(), Z = new URLSearchParams((n = V.salt.split("?")) == null ? void 0 : n[1]), B = Z.get("expires") || Z.get("expire");
|
|
966
|
+
if (B) {
|
|
967
|
+
const p = new Date(+B * 1e3), L = isNaN(p.getTime()) ? 0 : p.getTime() - Date.now();
|
|
968
|
+
L > 0 && he(L);
|
|
965
969
|
}
|
|
966
|
-
if (
|
|
970
|
+
if (z)
|
|
967
971
|
try {
|
|
968
|
-
const p = JSON.parse(
|
|
972
|
+
const p = JSON.parse(z);
|
|
969
973
|
p && typeof p == "object" && (p.verifyurl && (p.verifyurl = new URL(p.verifyurl, new URL(f)).toString()), Ue(p));
|
|
970
974
|
} catch (p) {
|
|
971
|
-
|
|
975
|
+
x("unable to configure from X-Altcha-Config", p);
|
|
972
976
|
}
|
|
973
|
-
if (!
|
|
977
|
+
if (!F && (g != null && g.length)) {
|
|
974
978
|
const p = Date.parse(g);
|
|
975
979
|
if (p) {
|
|
976
|
-
const
|
|
977
|
-
|
|
980
|
+
const L = p - Date.now();
|
|
981
|
+
L > 0 && he(L);
|
|
978
982
|
}
|
|
979
983
|
}
|
|
980
984
|
return V;
|
|
981
985
|
}
|
|
982
986
|
}
|
|
983
|
-
function
|
|
984
|
-
f &&
|
|
987
|
+
function Me() {
|
|
988
|
+
f && I && T === b.VERIFIED ? ee() : ge(b.EXPIRED, c.expired);
|
|
985
989
|
}
|
|
986
|
-
async function
|
|
987
|
-
let
|
|
990
|
+
async function ft(n) {
|
|
991
|
+
let u = null;
|
|
988
992
|
if ("Worker" in window) {
|
|
989
993
|
try {
|
|
990
|
-
|
|
994
|
+
u = await ut(n.challenge, n.salt, n.algorithm, n.maxnumber);
|
|
991
995
|
} catch (g) {
|
|
992
|
-
|
|
996
|
+
x(g);
|
|
993
997
|
}
|
|
994
|
-
if ((
|
|
995
|
-
return { data: n, solution:
|
|
998
|
+
if ((u == null ? void 0 : u.number) !== void 0)
|
|
999
|
+
return { data: n, solution: u };
|
|
996
1000
|
}
|
|
997
1001
|
return {
|
|
998
1002
|
data: n,
|
|
999
|
-
solution: await
|
|
1003
|
+
solution: await qt(n.challenge, n.salt, n.algorithm, n.maxnumber || E).promise
|
|
1000
1004
|
};
|
|
1001
1005
|
}
|
|
1002
|
-
async function
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
le !== C && le.postMessage({ type: "abort" });
|
|
1017
|
-
he(ge.data);
|
|
1018
|
-
}), C.postMessage({
|
|
1006
|
+
async function ut(n, u, g, z = typeof v == "number" ? v : E, V = Math.ceil(oe)) {
|
|
1007
|
+
const Z = [];
|
|
1008
|
+
V = Math.min(16, Math.max(1, V));
|
|
1009
|
+
for (let L = 0; L < V; L++)
|
|
1010
|
+
Z.push(createAltchaWorker(ue));
|
|
1011
|
+
const B = Math.ceil(z / V), p = await Promise.all(Z.map((L, ke) => {
|
|
1012
|
+
const le = ke * B;
|
|
1013
|
+
return new Promise((me) => {
|
|
1014
|
+
L.addEventListener("message", (be) => {
|
|
1015
|
+
if (be.data)
|
|
1016
|
+
for (const se of Z)
|
|
1017
|
+
se !== L && se.postMessage({ type: "abort" });
|
|
1018
|
+
me(be.data);
|
|
1019
|
+
}), L.postMessage({
|
|
1019
1020
|
payload: {
|
|
1020
1021
|
alg: g,
|
|
1021
1022
|
challenge: n,
|
|
1022
|
-
max:
|
|
1023
|
-
salt:
|
|
1024
|
-
start:
|
|
1023
|
+
max: le + B,
|
|
1024
|
+
salt: u,
|
|
1025
|
+
start: le
|
|
1025
1026
|
},
|
|
1026
1027
|
type: "work"
|
|
1027
1028
|
});
|
|
1028
1029
|
});
|
|
1029
1030
|
}));
|
|
1030
|
-
for (const
|
|
1031
|
-
|
|
1032
|
-
return p.find((
|
|
1031
|
+
for (const L of Z)
|
|
1032
|
+
L.terminate();
|
|
1033
|
+
return p.find((L) => !!L) || null;
|
|
1033
1034
|
}
|
|
1034
|
-
function
|
|
1035
|
-
[b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(
|
|
1035
|
+
function dt() {
|
|
1036
|
+
[b.UNVERIFIED, b.ERROR, b.EXPIRED].includes(T) ? w && (m == null ? void 0 : m.reportValidity()) === !1 ? t(7, P = !1) : ee() : t(7, P = !0);
|
|
1036
1037
|
}
|
|
1037
|
-
function
|
|
1038
|
-
const
|
|
1039
|
-
k &&
|
|
1040
|
-
}
|
|
1041
|
-
function Me() {
|
|
1042
|
-
k && pe();
|
|
1038
|
+
function Te(n) {
|
|
1039
|
+
const u = n.target;
|
|
1040
|
+
k && u && !C.contains(u) && T === b.VERIFIED && t(8, C.style.display = "none", C);
|
|
1043
1041
|
}
|
|
1044
1042
|
function Ve() {
|
|
1045
|
-
|
|
1043
|
+
k && _e();
|
|
1046
1044
|
}
|
|
1047
|
-
function
|
|
1048
|
-
|
|
1049
|
-
|
|
1045
|
+
function De() {
|
|
1046
|
+
T === b.VERIFYING && c.waitAlert && alert(c.waitAlert);
|
|
1047
|
+
}
|
|
1048
|
+
function ht(n) {
|
|
1049
|
+
k && T !== b.UNVERIFIED && requestAnimationFrame(() => {
|
|
1050
|
+
_e();
|
|
1050
1051
|
});
|
|
1051
1052
|
}
|
|
1052
|
-
function
|
|
1053
|
-
k &&
|
|
1053
|
+
function Fe() {
|
|
1054
|
+
k && _e();
|
|
1054
1055
|
}
|
|
1055
|
-
function
|
|
1056
|
-
|
|
1056
|
+
function he(n) {
|
|
1057
|
+
x("expire", n), X && (clearTimeout(X), X = null), n < 1 ? Me() : X = setTimeout(Me, n);
|
|
1057
1058
|
}
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1059
|
+
function $e(n) {
|
|
1060
|
+
x("floating", n), k !== n && (t(8, C.style.left = "", C), t(8, C.style.top = "", C)), t(1, k = n === !0 || n === "" ? "auto" : n === !1 || n === "false" ? void 0 : k), k ? (a || t(0, a = "onsubmit"), document.addEventListener("scroll", Ve), document.addEventListener("click", Te), window.addEventListener("resize", Fe)) : a === "onsubmit" && t(0, a = void 0);
|
|
1060
1061
|
}
|
|
1061
|
-
function
|
|
1062
|
+
function gt(n) {
|
|
1062
1063
|
var g;
|
|
1063
|
-
const
|
|
1064
|
-
return ((g =
|
|
1064
|
+
const u = m == null ? void 0 : m.querySelector(typeof n == "string" ? `input[name="${n}"]` : 'input[type="email"]:not([data-no-spamfilter])');
|
|
1065
|
+
return ((g = u == null ? void 0 : u.value) == null ? void 0 : g.slice(u.value.indexOf("@"))) || void 0;
|
|
1065
1066
|
}
|
|
1066
|
-
function
|
|
1067
|
+
function mt(n) {
|
|
1067
1068
|
return [
|
|
1068
1069
|
...(m == null ? void 0 : m.querySelectorAll(n != null && n.length ? n.map((g) => `input[name="${g}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])')) || []
|
|
1069
1070
|
].reduce(
|
|
1070
|
-
(g,
|
|
1071
|
-
const V =
|
|
1072
|
-
return V &&
|
|
1073
|
-
`) :
|
|
1071
|
+
(g, z) => {
|
|
1072
|
+
const V = z.name, Z = z.value;
|
|
1073
|
+
return V && Z && (g[V] = /\n/.test(Z) ? Z.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
|
|
1074
|
+
`) : Z), g;
|
|
1074
1075
|
},
|
|
1075
1076
|
{}
|
|
1076
1077
|
);
|
|
1077
1078
|
}
|
|
1078
|
-
async function
|
|
1079
|
-
if (!
|
|
1079
|
+
async function bt(n) {
|
|
1080
|
+
if (!J)
|
|
1080
1081
|
throw new Error("Attribute verifyurl not set.");
|
|
1081
|
-
|
|
1082
|
-
const
|
|
1082
|
+
x("requesting server verification from", J);
|
|
1083
|
+
const u = { payload: n };
|
|
1083
1084
|
if (w) {
|
|
1084
|
-
const { blockedCountries: V, classifier:
|
|
1085
|
-
|
|
1086
|
-
classifier: void 0,
|
|
1087
|
-
disableRules: void 0,
|
|
1088
|
-
email: void 0,
|
|
1089
|
-
expectedCountries: void 0,
|
|
1090
|
-
expectedLanguages: void 0,
|
|
1091
|
-
fields: void 0,
|
|
1092
|
-
ipAddress: void 0,
|
|
1093
|
-
text: void 0,
|
|
1094
|
-
timeZone: void 0
|
|
1095
|
-
};
|
|
1096
|
-
a.blockedCountries = V, a.classifier = T, a.disableRules = X, a.email = p === !1 ? void 0 : ht(p), a.expectedCountries = _e, a.expectedLanguages = C || (ze ? [ze] : void 0), a.fields = oe === !1 ? void 0 : gt(oe), a.ipAddress = he === !1 ? void 0 : he || "auto", a.text = ge, a.timeZone = le === !1 ? void 0 : le || ir();
|
|
1085
|
+
const { blockedCountries: V, classifier: Z, disableRules: B, email: p, expectedLanguages: L, expectedCountries: ke, fields: le, ipAddress: me, text: be, timeZone: se } = vt();
|
|
1086
|
+
u.blockedCountries = V, u.classifier = Z, u.disableRules = B, u.email = p === !1 ? void 0 : gt(p), u.expectedCountries = ke, u.expectedLanguages = L || (ze ? [ze] : void 0), u.fields = le === !1 ? void 0 : mt(le), u.ipAddress = me === !1 ? void 0 : me || "auto", u.text = be, u.timeZone = se === !1 ? void 0 : se || lr();
|
|
1097
1087
|
}
|
|
1098
|
-
const g = await fetch(
|
|
1099
|
-
body: JSON.stringify(
|
|
1088
|
+
const g = await fetch(J, {
|
|
1089
|
+
body: JSON.stringify(u),
|
|
1100
1090
|
headers: { "content-type": "application/json" },
|
|
1101
1091
|
method: "POST"
|
|
1102
1092
|
});
|
|
1103
1093
|
if (g.status !== 200)
|
|
1104
1094
|
throw new Error(`Server responded with ${g.status}.`);
|
|
1105
|
-
const
|
|
1106
|
-
if (
|
|
1095
|
+
const z = await g.json();
|
|
1096
|
+
if (z != null && z.payload && t(5, Q = z.payload), ye("serververification", z), d && z.classification === "BAD")
|
|
1107
1097
|
throw new Error("SpamFilter returned negative classification.");
|
|
1108
1098
|
}
|
|
1109
|
-
function
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1099
|
+
function vt() {
|
|
1100
|
+
return w === "ipAddress" ? {
|
|
1101
|
+
blockedCountries: void 0,
|
|
1102
|
+
classifier: void 0,
|
|
1103
|
+
disableRules: void 0,
|
|
1104
|
+
email: !1,
|
|
1105
|
+
expectedCountries: void 0,
|
|
1106
|
+
expectedLanguages: void 0,
|
|
1107
|
+
fields: !1,
|
|
1108
|
+
ipAddress: void 0,
|
|
1109
|
+
text: void 0,
|
|
1110
|
+
timeZone: void 0
|
|
1111
|
+
} : typeof w == "object" ? w : {
|
|
1112
|
+
blockedCountries: void 0,
|
|
1113
|
+
classifier: void 0,
|
|
1114
|
+
disableRules: void 0,
|
|
1115
|
+
email: void 0,
|
|
1116
|
+
expectedCountries: void 0,
|
|
1117
|
+
expectedLanguages: void 0,
|
|
1118
|
+
fields: void 0,
|
|
1119
|
+
ipAddress: void 0,
|
|
1120
|
+
text: void 0,
|
|
1121
|
+
timeZone: void 0
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
function _e(n = 20) {
|
|
1125
|
+
if (C)
|
|
1126
|
+
if (de || (de = (W ? document.querySelector(W) : m == null ? void 0 : m.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || m), de) {
|
|
1127
|
+
const u = parseInt(S, 10) || 12, g = de.getBoundingClientRect(), z = C.getBoundingClientRect(), V = document.documentElement.clientHeight, Z = document.documentElement.clientWidth, B = k === "auto" ? g.bottom + z.height + u + n > V : k === "top", p = Math.max(n, Math.min(Z - n - z.width, g.left + g.width / 2 - z.width / 2));
|
|
1128
|
+
if (B ? t(8, C.style.top = `${g.top - (z.height + u)}px`, C) : t(8, C.style.top = `${g.bottom + u}px`, C), t(8, C.style.left = `${p}px`, C), C.setAttribute("data-floating", B ? "top" : "bottom"), q) {
|
|
1129
|
+
const L = q.getBoundingClientRect();
|
|
1130
|
+
t(9, q.style.left = g.left - p + g.width / 2 - L.width / 2 + "px", q);
|
|
1116
1131
|
}
|
|
1117
1132
|
} else
|
|
1118
|
-
|
|
1133
|
+
x("unable to find floating anchor element");
|
|
1119
1134
|
}
|
|
1120
1135
|
function Ue(n) {
|
|
1121
|
-
n.auto !== void 0 && (t(0,
|
|
1136
|
+
n.auto !== void 0 && (t(0, a = n.auto), a === "onload" && ee()), n.floatinganchor !== void 0 && t(19, W = n.floatinganchor), n.delay !== void 0 && t(17, G = n.delay), n.floatingoffset !== void 0 && t(20, S = n.floatingoffset), n.floating !== void 0 && $e(n.floating), n.expire !== void 0 && (he(n.expire), t(18, F = n.expire)), n.challenge && (je(n.challenge), o = n.challenge), n.challengeurl !== void 0 && t(15, f = n.challengeurl), n.debug !== void 0 && t(16, N = !!n.debug), n.hidefooter !== void 0 && t(2, K = !!n.hidefooter), n.hidelogo !== void 0 && t(3, H = !!n.hidelogo), n.maxnumber !== void 0 && t(21, E = +n.maxnumber), n.mockerror !== void 0 && t(22, R = !!n.mockerror), n.name !== void 0 && t(4, M = n.name), n.refetchonexpire !== void 0 && t(23, I = !!n.refetchonexpire), n.spamfilter !== void 0 && t(24, w = typeof n.spamfilter == "object" ? n.spamfilter : !!n.spamfilter), n.strings && t(35, l = n.strings), n.test !== void 0 && t(25, v = typeof n.test == "number" ? n.test : !!n.test), n.verifyurl !== void 0 && t(26, J = n.verifyurl), n.workers !== void 0 && t(27, oe = +n.workers), n.workerurl !== void 0 && t(28, ue = n.workerurl);
|
|
1122
1137
|
}
|
|
1123
|
-
function
|
|
1124
|
-
|
|
1138
|
+
function ge(n = b.UNVERIFIED, u = null) {
|
|
1139
|
+
X && (clearTimeout(X), X = null), t(7, P = !1), t(10, pe = u), t(5, Q = null), t(6, T = n);
|
|
1125
1140
|
}
|
|
1126
|
-
async function
|
|
1127
|
-
return
|
|
1128
|
-
if (
|
|
1129
|
-
if (
|
|
1130
|
-
return
|
|
1131
|
-
t(5,
|
|
1141
|
+
async function ee() {
|
|
1142
|
+
return ge(b.VERIFYING), await new Promise((n) => setTimeout(n, G || 0)), at().then((n) => (je(n), x("challenge", n), ft(n))).then(({ data: n, solution: u }) => {
|
|
1143
|
+
if (x("solution", u), (u == null ? void 0 : u.number) !== void 0) {
|
|
1144
|
+
if (J)
|
|
1145
|
+
return bt(Ze(n, u));
|
|
1146
|
+
t(5, Q = Ze(n, u)), x("payload", Q);
|
|
1132
1147
|
} else
|
|
1133
|
-
throw
|
|
1148
|
+
throw x("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
|
|
1134
1149
|
}).then(() => {
|
|
1135
|
-
|
|
1136
|
-
t(6,
|
|
1150
|
+
Vt().then(() => {
|
|
1151
|
+
t(6, T = b.VERIFIED), t(7, P = !0), x("verified"), ye("verified", { payload: Q });
|
|
1137
1152
|
});
|
|
1138
1153
|
}).catch((n) => {
|
|
1139
|
-
|
|
1154
|
+
x(n), t(6, T = b.ERROR), t(7, P = !1), t(10, pe = n.message);
|
|
1140
1155
|
});
|
|
1141
1156
|
}
|
|
1142
|
-
function
|
|
1143
|
-
|
|
1157
|
+
function wt() {
|
|
1158
|
+
P = this.checked, t(7, P);
|
|
1144
1159
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1147
|
-
|
|
1160
|
+
function yt(n) {
|
|
1161
|
+
we[n ? "unshift" : "push"](() => {
|
|
1162
|
+
q = n, t(9, q);
|
|
1148
1163
|
});
|
|
1149
1164
|
}
|
|
1150
|
-
function
|
|
1151
|
-
|
|
1152
|
-
|
|
1165
|
+
function pt(n) {
|
|
1166
|
+
we[n ? "unshift" : "push"](() => {
|
|
1167
|
+
C = n, t(8, C);
|
|
1153
1168
|
});
|
|
1154
1169
|
}
|
|
1155
1170
|
return r.$$set = (n) => {
|
|
1156
|
-
"auto" in n && t(0,
|
|
1171
|
+
"auto" in n && t(0, a = n.auto), "blockspam" in n && t(29, d = n.blockspam), "challengeurl" in n && t(15, f = n.challengeurl), "challengejson" in n && t(30, $ = n.challengejson), "debug" in n && t(16, N = n.debug), "delay" in n && t(17, G = n.delay), "expire" in n && t(18, F = n.expire), "floating" in n && t(1, k = n.floating), "floatinganchor" in n && t(19, W = n.floatinganchor), "floatingoffset" in n && t(20, S = n.floatingoffset), "hidefooter" in n && t(2, K = n.hidefooter), "hidelogo" in n && t(3, H = n.hidelogo), "name" in n && t(4, M = n.name), "maxnumber" in n && t(21, E = n.maxnumber), "mockerror" in n && t(22, R = n.mockerror), "refetchonexpire" in n && t(23, I = n.refetchonexpire), "spamfilter" in n && t(24, w = n.spamfilter), "strings" in n && t(31, h = n.strings), "test" in n && t(25, v = n.test), "verifyurl" in n && t(26, J = n.verifyurl), "workers" in n && t(27, oe = n.workers), "workerurl" in n && t(28, ue = n.workerurl);
|
|
1157
1172
|
}, r.$$.update = () => {
|
|
1158
|
-
r.$$.dirty[0] & /*
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1173
|
+
r.$$.dirty[0] & /*challengeurl*/
|
|
1174
|
+
32768 && t(12, i = !!(f != null && f.includes(".altcha.org")) && !!(f != null && f.includes("apiKey=ckey_"))), r.$$.dirty[0] & /*challengejson*/
|
|
1175
|
+
1073741824 && (o = $ ? et($) : void 0), r.$$.dirty[1] & /*strings*/
|
|
1176
|
+
1 && t(35, l = h ? et(h) : {}), r.$$.dirty[1] & /*parsedStrings*/
|
|
1177
|
+
16 && t(11, c = {
|
|
1178
|
+
ariaLinkLabel: Qe,
|
|
1163
1179
|
error: "Verification failed. Try again later.",
|
|
1164
1180
|
expired: "Verification expired. Try again.",
|
|
1165
|
-
footer: `Protected by <a href="${
|
|
1181
|
+
footer: `Protected by <a href="${ct}" target="_blank" aria-label="${l.ariaLinkLabel || Qe}">ALTCHA</a>`,
|
|
1166
1182
|
label: "I'm not a robot",
|
|
1167
1183
|
verified: "Verified",
|
|
1168
1184
|
verifying: "Verifying...",
|
|
1169
1185
|
waitAlert: "Verifying... please wait.",
|
|
1170
|
-
...
|
|
1186
|
+
...l
|
|
1171
1187
|
}), r.$$.dirty[0] & /*payload, state*/
|
|
1172
|
-
96 &&
|
|
1173
|
-
64 &&
|
|
1188
|
+
96 && ye("statechange", { payload: Q, state: T }), r.$$.dirty[0] & /*state*/
|
|
1189
|
+
64 && ht();
|
|
1174
1190
|
}, [
|
|
1175
|
-
|
|
1191
|
+
a,
|
|
1176
1192
|
k,
|
|
1177
|
-
|
|
1178
|
-
Q,
|
|
1193
|
+
K,
|
|
1179
1194
|
H,
|
|
1180
|
-
J,
|
|
1181
1195
|
M,
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1196
|
+
Q,
|
|
1197
|
+
T,
|
|
1198
|
+
P,
|
|
1199
|
+
C,
|
|
1200
|
+
q,
|
|
1201
|
+
pe,
|
|
1202
|
+
c,
|
|
1203
|
+
i,
|
|
1204
|
+
dt,
|
|
1205
|
+
De,
|
|
1189
1206
|
f,
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
D,
|
|
1207
|
+
N,
|
|
1208
|
+
G,
|
|
1193
1209
|
F,
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1210
|
+
W,
|
|
1211
|
+
S,
|
|
1212
|
+
E,
|
|
1197
1213
|
R,
|
|
1214
|
+
I,
|
|
1198
1215
|
w,
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1216
|
+
v,
|
|
1217
|
+
J,
|
|
1218
|
+
oe,
|
|
1219
|
+
ue,
|
|
1203
1220
|
d,
|
|
1204
|
-
|
|
1205
|
-
|
|
1221
|
+
$,
|
|
1222
|
+
h,
|
|
1206
1223
|
Ue,
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1224
|
+
ge,
|
|
1225
|
+
ee,
|
|
1226
|
+
l,
|
|
1227
|
+
wt,
|
|
1228
|
+
yt,
|
|
1229
|
+
pt
|
|
1213
1230
|
];
|
|
1214
1231
|
}
|
|
1215
|
-
class
|
|
1232
|
+
class cr extends Wt {
|
|
1216
1233
|
constructor(e) {
|
|
1217
|
-
super(),
|
|
1234
|
+
super(), Ht(
|
|
1218
1235
|
this,
|
|
1219
1236
|
e,
|
|
1237
|
+
sr,
|
|
1220
1238
|
or,
|
|
1221
|
-
|
|
1222
|
-
xt,
|
|
1239
|
+
Ct,
|
|
1223
1240
|
{
|
|
1224
1241
|
auto: 0,
|
|
1225
|
-
blockspam:
|
|
1226
|
-
challengeurl:
|
|
1227
|
-
challengejson:
|
|
1228
|
-
debug:
|
|
1229
|
-
delay:
|
|
1230
|
-
expire:
|
|
1242
|
+
blockspam: 29,
|
|
1243
|
+
challengeurl: 15,
|
|
1244
|
+
challengejson: 30,
|
|
1245
|
+
debug: 16,
|
|
1246
|
+
delay: 17,
|
|
1247
|
+
expire: 18,
|
|
1231
1248
|
floating: 1,
|
|
1232
|
-
floatinganchor:
|
|
1233
|
-
floatingoffset:
|
|
1249
|
+
floatinganchor: 19,
|
|
1250
|
+
floatingoffset: 20,
|
|
1234
1251
|
hidefooter: 2,
|
|
1235
1252
|
hidelogo: 3,
|
|
1236
1253
|
name: 4,
|
|
1237
|
-
maxnumber:
|
|
1238
|
-
mockerror:
|
|
1239
|
-
refetchonexpire:
|
|
1240
|
-
spamfilter:
|
|
1241
|
-
strings:
|
|
1242
|
-
test:
|
|
1243
|
-
verifyurl:
|
|
1244
|
-
workers:
|
|
1245
|
-
workerurl:
|
|
1246
|
-
configure:
|
|
1247
|
-
reset:
|
|
1248
|
-
verify:
|
|
1254
|
+
maxnumber: 21,
|
|
1255
|
+
mockerror: 22,
|
|
1256
|
+
refetchonexpire: 23,
|
|
1257
|
+
spamfilter: 24,
|
|
1258
|
+
strings: 31,
|
|
1259
|
+
test: 25,
|
|
1260
|
+
verifyurl: 26,
|
|
1261
|
+
workers: 27,
|
|
1262
|
+
workerurl: 28,
|
|
1263
|
+
configure: 32,
|
|
1264
|
+
reset: 33,
|
|
1265
|
+
verify: 34
|
|
1249
1266
|
},
|
|
1250
|
-
|
|
1267
|
+
Qt,
|
|
1251
1268
|
[-1, -1, -1]
|
|
1252
1269
|
);
|
|
1253
1270
|
}
|
|
@@ -1255,146 +1272,146 @@ class lr extends Bt {
|
|
|
1255
1272
|
return this.$$.ctx[0];
|
|
1256
1273
|
}
|
|
1257
1274
|
set auto(e) {
|
|
1258
|
-
this.$$set({ auto: e }),
|
|
1275
|
+
this.$$set({ auto: e }), y();
|
|
1259
1276
|
}
|
|
1260
1277
|
get blockspam() {
|
|
1261
|
-
return this.$$.ctx[
|
|
1278
|
+
return this.$$.ctx[29];
|
|
1262
1279
|
}
|
|
1263
1280
|
set blockspam(e) {
|
|
1264
|
-
this.$$set({ blockspam: e }),
|
|
1281
|
+
this.$$set({ blockspam: e }), y();
|
|
1265
1282
|
}
|
|
1266
1283
|
get challengeurl() {
|
|
1267
|
-
return this.$$.ctx[
|
|
1284
|
+
return this.$$.ctx[15];
|
|
1268
1285
|
}
|
|
1269
1286
|
set challengeurl(e) {
|
|
1270
|
-
this.$$set({ challengeurl: e }),
|
|
1287
|
+
this.$$set({ challengeurl: e }), y();
|
|
1271
1288
|
}
|
|
1272
1289
|
get challengejson() {
|
|
1273
|
-
return this.$$.ctx[
|
|
1290
|
+
return this.$$.ctx[30];
|
|
1274
1291
|
}
|
|
1275
1292
|
set challengejson(e) {
|
|
1276
|
-
this.$$set({ challengejson: e }),
|
|
1293
|
+
this.$$set({ challengejson: e }), y();
|
|
1277
1294
|
}
|
|
1278
1295
|
get debug() {
|
|
1279
|
-
return this.$$.ctx[
|
|
1296
|
+
return this.$$.ctx[16];
|
|
1280
1297
|
}
|
|
1281
1298
|
set debug(e) {
|
|
1282
|
-
this.$$set({ debug: e }),
|
|
1299
|
+
this.$$set({ debug: e }), y();
|
|
1283
1300
|
}
|
|
1284
1301
|
get delay() {
|
|
1285
|
-
return this.$$.ctx[
|
|
1302
|
+
return this.$$.ctx[17];
|
|
1286
1303
|
}
|
|
1287
1304
|
set delay(e) {
|
|
1288
|
-
this.$$set({ delay: e }),
|
|
1305
|
+
this.$$set({ delay: e }), y();
|
|
1289
1306
|
}
|
|
1290
1307
|
get expire() {
|
|
1291
|
-
return this.$$.ctx[
|
|
1308
|
+
return this.$$.ctx[18];
|
|
1292
1309
|
}
|
|
1293
1310
|
set expire(e) {
|
|
1294
|
-
this.$$set({ expire: e }),
|
|
1311
|
+
this.$$set({ expire: e }), y();
|
|
1295
1312
|
}
|
|
1296
1313
|
get floating() {
|
|
1297
1314
|
return this.$$.ctx[1];
|
|
1298
1315
|
}
|
|
1299
1316
|
set floating(e) {
|
|
1300
|
-
this.$$set({ floating: e }),
|
|
1317
|
+
this.$$set({ floating: e }), y();
|
|
1301
1318
|
}
|
|
1302
1319
|
get floatinganchor() {
|
|
1303
|
-
return this.$$.ctx[
|
|
1320
|
+
return this.$$.ctx[19];
|
|
1304
1321
|
}
|
|
1305
1322
|
set floatinganchor(e) {
|
|
1306
|
-
this.$$set({ floatinganchor: e }),
|
|
1323
|
+
this.$$set({ floatinganchor: e }), y();
|
|
1307
1324
|
}
|
|
1308
1325
|
get floatingoffset() {
|
|
1309
|
-
return this.$$.ctx[
|
|
1326
|
+
return this.$$.ctx[20];
|
|
1310
1327
|
}
|
|
1311
1328
|
set floatingoffset(e) {
|
|
1312
|
-
this.$$set({ floatingoffset: e }),
|
|
1329
|
+
this.$$set({ floatingoffset: e }), y();
|
|
1313
1330
|
}
|
|
1314
1331
|
get hidefooter() {
|
|
1315
1332
|
return this.$$.ctx[2];
|
|
1316
1333
|
}
|
|
1317
1334
|
set hidefooter(e) {
|
|
1318
|
-
this.$$set({ hidefooter: e }),
|
|
1335
|
+
this.$$set({ hidefooter: e }), y();
|
|
1319
1336
|
}
|
|
1320
1337
|
get hidelogo() {
|
|
1321
1338
|
return this.$$.ctx[3];
|
|
1322
1339
|
}
|
|
1323
1340
|
set hidelogo(e) {
|
|
1324
|
-
this.$$set({ hidelogo: e }),
|
|
1341
|
+
this.$$set({ hidelogo: e }), y();
|
|
1325
1342
|
}
|
|
1326
1343
|
get name() {
|
|
1327
1344
|
return this.$$.ctx[4];
|
|
1328
1345
|
}
|
|
1329
1346
|
set name(e) {
|
|
1330
|
-
this.$$set({ name: e }),
|
|
1347
|
+
this.$$set({ name: e }), y();
|
|
1331
1348
|
}
|
|
1332
1349
|
get maxnumber() {
|
|
1333
|
-
return this.$$.ctx[
|
|
1350
|
+
return this.$$.ctx[21];
|
|
1334
1351
|
}
|
|
1335
1352
|
set maxnumber(e) {
|
|
1336
|
-
this.$$set({ maxnumber: e }),
|
|
1353
|
+
this.$$set({ maxnumber: e }), y();
|
|
1337
1354
|
}
|
|
1338
1355
|
get mockerror() {
|
|
1339
|
-
return this.$$.ctx[
|
|
1356
|
+
return this.$$.ctx[22];
|
|
1340
1357
|
}
|
|
1341
1358
|
set mockerror(e) {
|
|
1342
|
-
this.$$set({ mockerror: e }),
|
|
1359
|
+
this.$$set({ mockerror: e }), y();
|
|
1343
1360
|
}
|
|
1344
1361
|
get refetchonexpire() {
|
|
1345
|
-
return this.$$.ctx[
|
|
1362
|
+
return this.$$.ctx[23];
|
|
1346
1363
|
}
|
|
1347
1364
|
set refetchonexpire(e) {
|
|
1348
|
-
this.$$set({ refetchonexpire: e }),
|
|
1365
|
+
this.$$set({ refetchonexpire: e }), y();
|
|
1349
1366
|
}
|
|
1350
1367
|
get spamfilter() {
|
|
1351
|
-
return this.$$.ctx[
|
|
1368
|
+
return this.$$.ctx[24];
|
|
1352
1369
|
}
|
|
1353
1370
|
set spamfilter(e) {
|
|
1354
|
-
this.$$set({ spamfilter: e }),
|
|
1371
|
+
this.$$set({ spamfilter: e }), y();
|
|
1355
1372
|
}
|
|
1356
1373
|
get strings() {
|
|
1357
|
-
return this.$$.ctx[
|
|
1374
|
+
return this.$$.ctx[31];
|
|
1358
1375
|
}
|
|
1359
1376
|
set strings(e) {
|
|
1360
|
-
this.$$set({ strings: e }),
|
|
1377
|
+
this.$$set({ strings: e }), y();
|
|
1361
1378
|
}
|
|
1362
1379
|
get test() {
|
|
1363
|
-
return this.$$.ctx[
|
|
1380
|
+
return this.$$.ctx[25];
|
|
1364
1381
|
}
|
|
1365
1382
|
set test(e) {
|
|
1366
|
-
this.$$set({ test: e }),
|
|
1383
|
+
this.$$set({ test: e }), y();
|
|
1367
1384
|
}
|
|
1368
1385
|
get verifyurl() {
|
|
1369
|
-
return this.$$.ctx[
|
|
1386
|
+
return this.$$.ctx[26];
|
|
1370
1387
|
}
|
|
1371
1388
|
set verifyurl(e) {
|
|
1372
|
-
this.$$set({ verifyurl: e }),
|
|
1389
|
+
this.$$set({ verifyurl: e }), y();
|
|
1373
1390
|
}
|
|
1374
1391
|
get workers() {
|
|
1375
|
-
return this.$$.ctx[
|
|
1392
|
+
return this.$$.ctx[27];
|
|
1376
1393
|
}
|
|
1377
1394
|
set workers(e) {
|
|
1378
|
-
this.$$set({ workers: e }),
|
|
1395
|
+
this.$$set({ workers: e }), y();
|
|
1379
1396
|
}
|
|
1380
1397
|
get workerurl() {
|
|
1381
|
-
return this.$$.ctx[
|
|
1398
|
+
return this.$$.ctx[28];
|
|
1382
1399
|
}
|
|
1383
1400
|
set workerurl(e) {
|
|
1384
|
-
this.$$set({ workerurl: e }),
|
|
1401
|
+
this.$$set({ workerurl: e }), y();
|
|
1385
1402
|
}
|
|
1386
1403
|
get configure() {
|
|
1387
|
-
return this.$$.ctx[
|
|
1404
|
+
return this.$$.ctx[32];
|
|
1388
1405
|
}
|
|
1389
1406
|
get reset() {
|
|
1390
|
-
return this.$$.ctx[
|
|
1407
|
+
return this.$$.ctx[33];
|
|
1391
1408
|
}
|
|
1392
1409
|
get verify() {
|
|
1393
|
-
return this.$$.ctx[
|
|
1410
|
+
return this.$$.ctx[34];
|
|
1394
1411
|
}
|
|
1395
1412
|
}
|
|
1396
|
-
customElements.define("altcha-widget",
|
|
1397
|
-
globalThis.createAltchaWorker = (r) => r ? new Worker(new URL(r)) : new
|
|
1413
|
+
customElements.define("altcha-widget", Ot(cr, { auto: {}, blockspam: {}, challengeurl: {}, challengejson: {}, debug: { type: "Boolean" }, delay: {}, expire: {}, floating: {}, floatinganchor: {}, floatingoffset: {}, hidefooter: { type: "Boolean" }, hidelogo: { type: "Boolean" }, name: {}, maxnumber: {}, mockerror: { type: "Boolean" }, refetchonexpire: { type: "Boolean" }, spamfilter: { type: "Boolean" }, strings: {}, test: { type: "Boolean" }, verifyurl: {}, workers: {}, workerurl: {} }, [], ["configure", "reset", "verify"], !1));
|
|
1414
|
+
globalThis.createAltchaWorker = (r) => r ? new Worker(new URL(r)) : new Et();
|
|
1398
1415
|
export {
|
|
1399
|
-
|
|
1416
|
+
cr as Altcha
|
|
1400
1417
|
};
|