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