altcha 3.1.0 → 3.2.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.
Files changed (171) hide show
  1. package/dist/external/altcha.js +2 -4
  2. package/dist/external/altcha.min.js +1 -1
  3. package/dist/external/altcha.umd.cjs +2 -4
  4. package/dist/external/altcha.umd.min.cjs +1 -1
  5. package/dist/i18n/af.js +109 -3
  6. package/dist/i18n/af.umd.cjs +109 -3
  7. package/dist/i18n/africa.js +115 -21
  8. package/dist/i18n/africa.umd.cjs +115 -21
  9. package/dist/i18n/all.js +169 -183
  10. package/dist/i18n/all.umd.cjs +169 -183
  11. package/dist/i18n/am.js +109 -3
  12. package/dist/i18n/am.umd.cjs +109 -3
  13. package/dist/i18n/americas.js +111 -9
  14. package/dist/i18n/americas.umd.cjs +111 -9
  15. package/dist/i18n/ar.js +109 -3
  16. package/dist/i18n/ar.umd.cjs +109 -3
  17. package/dist/i18n/asia.js +132 -72
  18. package/dist/i18n/asia.umd.cjs +132 -72
  19. package/dist/i18n/az.js +109 -3
  20. package/dist/i18n/az.umd.cjs +109 -3
  21. package/dist/i18n/be.js +109 -3
  22. package/dist/i18n/be.umd.cjs +109 -3
  23. package/dist/i18n/bg.js +109 -3
  24. package/dist/i18n/bg.umd.cjs +109 -3
  25. package/dist/i18n/bn.js +109 -3
  26. package/dist/i18n/bn.umd.cjs +109 -3
  27. package/dist/i18n/bs.js +109 -3
  28. package/dist/i18n/bs.umd.cjs +109 -3
  29. package/dist/i18n/ca.js +109 -3
  30. package/dist/i18n/ca.umd.cjs +109 -3
  31. package/dist/i18n/cs.js +109 -3
  32. package/dist/i18n/cs.umd.cjs +109 -3
  33. package/dist/i18n/da.js +109 -3
  34. package/dist/i18n/da.umd.cjs +109 -3
  35. package/dist/i18n/de.js +109 -3
  36. package/dist/i18n/de.umd.cjs +109 -3
  37. package/dist/i18n/el.js +109 -3
  38. package/dist/i18n/el.umd.cjs +109 -3
  39. package/dist/i18n/en.js +109 -3
  40. package/dist/i18n/en.umd.cjs +109 -3
  41. package/dist/i18n/es-419.js +109 -3
  42. package/dist/i18n/es-419.umd.cjs +109 -3
  43. package/dist/i18n/es-es.js +109 -3
  44. package/dist/i18n/es-es.umd.cjs +109 -3
  45. package/dist/i18n/et.js +109 -3
  46. package/dist/i18n/et.umd.cjs +109 -3
  47. package/dist/i18n/eu.js +109 -3
  48. package/dist/i18n/eu.umd.cjs +109 -3
  49. package/dist/i18n/europe.js +145 -111
  50. package/dist/i18n/europe.umd.cjs +145 -111
  51. package/dist/i18n/fa.js +109 -3
  52. package/dist/i18n/fa.umd.cjs +109 -3
  53. package/dist/i18n/fi.js +109 -3
  54. package/dist/i18n/fi.umd.cjs +109 -3
  55. package/dist/i18n/fr-ca.js +109 -3
  56. package/dist/i18n/fr-ca.umd.cjs +109 -3
  57. package/dist/i18n/fr-fr.js +109 -3
  58. package/dist/i18n/fr-fr.umd.cjs +109 -3
  59. package/dist/i18n/ga.js +109 -3
  60. package/dist/i18n/ga.umd.cjs +109 -3
  61. package/dist/i18n/he.js +109 -3
  62. package/dist/i18n/he.umd.cjs +109 -3
  63. package/dist/i18n/hi.js +109 -3
  64. package/dist/i18n/hi.umd.cjs +109 -3
  65. package/dist/i18n/hr.js +109 -3
  66. package/dist/i18n/hr.umd.cjs +109 -3
  67. package/dist/i18n/hu.js +109 -3
  68. package/dist/i18n/hu.umd.cjs +109 -3
  69. package/dist/i18n/hy.js +109 -3
  70. package/dist/i18n/hy.umd.cjs +109 -3
  71. package/dist/i18n/id.js +109 -3
  72. package/dist/i18n/id.umd.cjs +109 -3
  73. package/dist/i18n/is.js +109 -3
  74. package/dist/i18n/is.umd.cjs +109 -3
  75. package/dist/i18n/it.js +109 -3
  76. package/dist/i18n/it.umd.cjs +109 -3
  77. package/dist/i18n/ja.js +109 -3
  78. package/dist/i18n/ja.umd.cjs +109 -3
  79. package/dist/i18n/ka.js +109 -3
  80. package/dist/i18n/ka.umd.cjs +109 -3
  81. package/dist/i18n/kk.js +109 -3
  82. package/dist/i18n/kk.umd.cjs +109 -3
  83. package/dist/i18n/ko.js +109 -3
  84. package/dist/i18n/ko.umd.cjs +109 -3
  85. package/dist/i18n/lb.js +109 -3
  86. package/dist/i18n/lb.umd.cjs +109 -3
  87. package/dist/i18n/lt.js +109 -3
  88. package/dist/i18n/lt.umd.cjs +109 -3
  89. package/dist/i18n/lv.js +109 -3
  90. package/dist/i18n/lv.umd.cjs +109 -3
  91. package/dist/i18n/me.js +109 -3
  92. package/dist/i18n/me.umd.cjs +109 -3
  93. package/dist/i18n/mk.js +109 -3
  94. package/dist/i18n/mk.umd.cjs +109 -3
  95. package/dist/i18n/mr.js +109 -3
  96. package/dist/i18n/mr.umd.cjs +109 -3
  97. package/dist/i18n/mt.js +109 -3
  98. package/dist/i18n/mt.umd.cjs +109 -3
  99. package/dist/i18n/nb.js +109 -3
  100. package/dist/i18n/nb.umd.cjs +109 -3
  101. package/dist/i18n/nl.js +109 -3
  102. package/dist/i18n/nl.umd.cjs +109 -3
  103. package/dist/i18n/pl.js +109 -3
  104. package/dist/i18n/pl.umd.cjs +109 -3
  105. package/dist/i18n/pt-br.js +109 -3
  106. package/dist/i18n/pt-br.umd.cjs +109 -3
  107. package/dist/i18n/pt-pt.js +109 -3
  108. package/dist/i18n/pt-pt.umd.cjs +109 -3
  109. package/dist/i18n/ro.js +109 -3
  110. package/dist/i18n/ro.umd.cjs +109 -3
  111. package/dist/i18n/ru.js +109 -3
  112. package/dist/i18n/ru.umd.cjs +109 -3
  113. package/dist/i18n/sk.js +109 -3
  114. package/dist/i18n/sk.umd.cjs +109 -3
  115. package/dist/i18n/sl.js +109 -3
  116. package/dist/i18n/sl.umd.cjs +109 -3
  117. package/dist/i18n/sq.js +109 -3
  118. package/dist/i18n/sq.umd.cjs +109 -3
  119. package/dist/i18n/sr.js +109 -3
  120. package/dist/i18n/sr.umd.cjs +109 -3
  121. package/dist/i18n/sv.js +109 -3
  122. package/dist/i18n/sv.umd.cjs +109 -3
  123. package/dist/i18n/sw.js +109 -3
  124. package/dist/i18n/sw.umd.cjs +109 -3
  125. package/dist/i18n/ta.js +109 -3
  126. package/dist/i18n/ta.umd.cjs +109 -3
  127. package/dist/i18n/te.js +109 -3
  128. package/dist/i18n/te.umd.cjs +109 -3
  129. package/dist/i18n/th.js +109 -3
  130. package/dist/i18n/th.umd.cjs +109 -3
  131. package/dist/i18n/tk.js +109 -3
  132. package/dist/i18n/tk.umd.cjs +109 -3
  133. package/dist/i18n/tr.js +109 -3
  134. package/dist/i18n/tr.umd.cjs +109 -3
  135. package/dist/i18n/uk.js +109 -3
  136. package/dist/i18n/uk.umd.cjs +109 -3
  137. package/dist/i18n/ur.js +109 -3
  138. package/dist/i18n/ur.umd.cjs +109 -3
  139. package/dist/i18n/uz.js +109 -3
  140. package/dist/i18n/uz.umd.cjs +109 -3
  141. package/dist/i18n/vi.js +109 -3
  142. package/dist/i18n/vi.umd.cjs +109 -3
  143. package/dist/i18n/yo.js +109 -3
  144. package/dist/i18n/yo.umd.cjs +109 -3
  145. package/dist/i18n/zh-cn.js +109 -3
  146. package/dist/i18n/zh-cn.umd.cjs +109 -3
  147. package/dist/i18n/zh-hk.js +109 -3
  148. package/dist/i18n/zh-hk.umd.cjs +109 -3
  149. package/dist/i18n/zh-tw.js +109 -3
  150. package/dist/i18n/zh-tw.umd.cjs +109 -3
  151. package/dist/lib/index.js +2 -0
  152. package/dist/lib/index.min.js +1 -1
  153. package/dist/lib/index.umd.cjs +2 -0
  154. package/dist/lib/index.umd.min.cjs +1 -1
  155. package/dist/main/altcha.i18n.js +67 -187
  156. package/dist/main/altcha.i18n.min.js +1 -1
  157. package/dist/main/altcha.i18n.umd.cjs +67 -187
  158. package/dist/main/altcha.i18n.umd.min.cjs +1 -1
  159. package/dist/main/altcha.js +6 -4
  160. package/dist/main/altcha.min.js +1 -1
  161. package/dist/main/altcha.umd.cjs +6 -4
  162. package/dist/main/altcha.umd.min.cjs +1 -1
  163. package/dist/plugins/obfuscation.plugin.js +3 -0
  164. package/dist/plugins/obfuscation.plugin.min.js +1 -1
  165. package/dist/plugins/obfuscation.plugin.umd.cjs +3 -0
  166. package/dist/plugins/obfuscation.plugin.umd.min.cjs +1 -1
  167. package/dist/workers/argon2id.js +2 -0
  168. package/dist/workers/pbkdf2.js +2 -0
  169. package/dist/workers/scrypt.js +2 -0
  170. package/dist/workers/sha.js +2 -0
  171. package/package.json +4 -2
@@ -2,6 +2,114 @@
2
2
  typeof define === "function" && define.amd ? define(factory) : factory();
3
3
  })((function() {
4
4
  "use strict";
5
+ const noop = () => {
6
+ };
7
+ function safe_not_equal(a, b) {
8
+ return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
9
+ }
10
+ function subscribe_to_store(store2, run, invalidate) {
11
+ if (store2 == null) {
12
+ run(void 0);
13
+ return noop;
14
+ }
15
+ const unsub = untrack(
16
+ () => store2.subscribe(
17
+ run,
18
+ // @ts-expect-error
19
+ invalidate
20
+ )
21
+ );
22
+ return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
23
+ }
24
+ const subscriber_queue = [];
25
+ function writable(value, start = noop) {
26
+ let stop = null;
27
+ const subscribers = /* @__PURE__ */ new Set();
28
+ function set(new_value) {
29
+ if (safe_not_equal(value, new_value)) {
30
+ value = new_value;
31
+ if (stop) {
32
+ const run_queue = !subscriber_queue.length;
33
+ for (const subscriber of subscribers) {
34
+ subscriber[1]();
35
+ subscriber_queue.push(subscriber, value);
36
+ }
37
+ if (run_queue) {
38
+ for (let i = 0; i < subscriber_queue.length; i += 2) {
39
+ subscriber_queue[i][0](subscriber_queue[i + 1]);
40
+ }
41
+ subscriber_queue.length = 0;
42
+ }
43
+ }
44
+ }
45
+ }
46
+ function update(fn) {
47
+ set(fn(
48
+ /** @type {T} */
49
+ value
50
+ ));
51
+ }
52
+ function subscribe(run, invalidate = noop) {
53
+ const subscriber = [run, invalidate];
54
+ subscribers.add(subscriber);
55
+ if (subscribers.size === 1) {
56
+ stop = start(set, update) || noop;
57
+ }
58
+ run(
59
+ /** @type {T} */
60
+ value
61
+ );
62
+ return () => {
63
+ subscribers.delete(subscriber);
64
+ if (subscribers.size === 0 && stop) {
65
+ stop();
66
+ stop = null;
67
+ }
68
+ };
69
+ }
70
+ return { set, update, subscribe };
71
+ }
72
+ function get(store2) {
73
+ let value;
74
+ subscribe_to_store(store2, (_) => value = _)();
75
+ return value;
76
+ }
77
+ let untracking = false;
78
+ function untrack(fn) {
79
+ var previous_untracking = untracking;
80
+ try {
81
+ untracking = true;
82
+ return fn();
83
+ } finally {
84
+ untracking = previous_untracking;
85
+ }
86
+ }
87
+ function store(defaultValue) {
88
+ const scope = {
89
+ get: (name) => {
90
+ return get(scope.store)[name];
91
+ },
92
+ set: (name, value) => {
93
+ if (typeof name === "string") {
94
+ Object.assign(get(scope.store), {
95
+ [name]: value
96
+ });
97
+ } else {
98
+ Object.assign(get(scope.store), name);
99
+ }
100
+ scope.store.set(get(scope.store));
101
+ },
102
+ store: writable(defaultValue)
103
+ };
104
+ return scope;
105
+ }
106
+ globalThis.$altcha = globalThis.$altcha || {
107
+ algorithms: /* @__PURE__ */ new Map(),
108
+ defaults: store({}),
109
+ i18n: store({}),
110
+ instances: /* @__PURE__ */ new Set(),
111
+ plugins: /* @__PURE__ */ new Set()
112
+ };
5
113
  const i18n$A = {
6
114
  ariaLinkLabel: "Altcha (lloc web oficial)",
7
115
  enterCode: "Introdueix el codi",
@@ -21,9 +129,7 @@
21
129
  cancel: "Cancel·la",
22
130
  enterCodeFromImage: "Per continuar, si us plau, introdueix el codi de la imatge següent."
23
131
  };
24
- if ("$altcha" in globalThis) {
25
- globalThis.$altcha.i18n.set("ca", i18n$A);
26
- }
132
+ globalThis.$altcha.i18n.set("ca", i18n$A);
27
133
  const i18n$z = {
28
134
  ariaLinkLabel: "Altcha (site officiel)",
29
135
  enterCode: "Entrez le code",
@@ -43,9 +149,7 @@
43
149
  cancel: "Annuler",
44
150
  enterCodeFromImage: "Pour continuer, veuillez entrer le code de l'image ci-dessous."
45
151
  };
46
- if ("$altcha" in globalThis) {
47
- globalThis.$altcha.i18n.set("fr-fr", i18n$z);
48
- }
152
+ globalThis.$altcha.i18n.set("fr-fr", i18n$z);
49
153
  const i18n$y = {
50
154
  ariaLinkLabel: "Altcha (offizielle Website)",
51
155
  enterCode: "Code eingeben",
@@ -65,9 +169,7 @@
65
169
  cancel: "Abbrechen",
66
170
  enterCodeFromImage: "Um fortzufahren, geben Sie bitte den Code aus dem Bild unten ein."
67
171
  };
68
- if ("$altcha" in globalThis) {
69
- globalThis.$altcha.i18n.set("de", i18n$y);
70
- }
172
+ globalThis.$altcha.i18n.set("de", i18n$y);
71
173
  const i18n$x = {
72
174
  ariaLinkLabel: "Altcha (offiziell Websäit)",
73
175
  enterCode: "Code aginn",
@@ -87,9 +189,7 @@
87
189
  cancel: "Ofbriechen",
88
190
  enterCodeFromImage: "Fir virun ze fueren, gitt wgl. de Code aus dem Bild hei drënner an."
89
191
  };
90
- if ("$altcha" in globalThis) {
91
- globalThis.$altcha.i18n.set("lb", i18n$x);
92
- }
192
+ globalThis.$altcha.i18n.set("lb", i18n$x);
93
193
  const i18n$w = {
94
194
  ariaLinkLabel: "Altcha (officiële website)",
95
195
  enterCode: "Voer code in",
@@ -109,9 +209,7 @@
109
209
  cancel: "Annuleren",
110
210
  enterCodeFromImage: "Om door te gaan, voert u de code uit de onderstaande afbeelding in."
111
211
  };
112
- if ("$altcha" in globalThis) {
113
- globalThis.$altcha.i18n.set("nl", i18n$w);
114
- }
212
+ globalThis.$altcha.i18n.set("nl", i18n$w);
115
213
  const i18n$v = {
116
214
  ariaLinkLabel: "Altcha (láithreán gréasáin oifigiúil)",
117
215
  enterCode: "Iontráil cód",
@@ -131,9 +229,7 @@
131
229
  cancel: "Cealaigh",
132
230
  enterCodeFromImage: "Chun dul ar aghaidh, le do thoil cuir isteach an cód ón íomhá thíos."
133
231
  };
134
- if ("$altcha" in globalThis) {
135
- globalThis.$altcha.i18n.set("ga", i18n$v);
136
- }
232
+ globalThis.$altcha.i18n.set("ga", i18n$v);
137
233
  const i18n$u = {
138
234
  ariaLinkLabel: "Altcha (sito ufficiale)",
139
235
  enterCode: "Inserisci il codice",
@@ -153,9 +249,7 @@
153
249
  cancel: "Annulla",
154
250
  enterCodeFromImage: "Per procedere, inserisci il codice dall'immagine sottostante."
155
251
  };
156
- if ("$altcha" in globalThis) {
157
- globalThis.$altcha.i18n.set("it", i18n$u);
158
- }
252
+ globalThis.$altcha.i18n.set("it", i18n$u);
159
253
  const i18n$t = {
160
254
  ariaLinkLabel: "Altcha (site oficial)",
161
255
  enterCode: "Introduza o código",
@@ -175,9 +269,7 @@
175
269
  cancel: "Cancelar",
176
270
  enterCodeFromImage: "Para prosseguir, introduza o código da imagem abaixo."
177
271
  };
178
- if ("$altcha" in globalThis) {
179
- globalThis.$altcha.i18n.set("pt-pt", i18n$t);
180
- }
272
+ globalThis.$altcha.i18n.set("pt-pt", i18n$t);
181
273
  const i18n$s = {
182
274
  ariaLinkLabel: "Altcha (sitio web oficial)",
183
275
  enterCode: "Introduce el código",
@@ -197,9 +289,7 @@
197
289
  cancel: "Cancelar",
198
290
  enterCodeFromImage: "Para continuar, introduzca el código de la imagen de abajo."
199
291
  };
200
- if ("$altcha" in globalThis) {
201
- globalThis.$altcha.i18n.set("es-es", i18n$s);
202
- }
292
+ globalThis.$altcha.i18n.set("es-es", i18n$s);
203
293
  const i18n$r = {
204
294
  ariaLinkLabel: "Altcha (webgune ofiziala)",
205
295
  enterCode: "Sartu kodea",
@@ -219,9 +309,7 @@
219
309
  cancel: "Utzi",
220
310
  enterCodeFromImage: "Jarraitzeko, idatzi beheko irudiko kodea."
221
311
  };
222
- if ("$altcha" in globalThis) {
223
- globalThis.$altcha.i18n.set("eu", i18n$r);
224
- }
312
+ globalThis.$altcha.i18n.set("eu", i18n$r);
225
313
  const i18n$q = {
226
314
  ariaLinkLabel: "Altcha (official website)",
227
315
  cancel: "Cancel",
@@ -241,9 +329,7 @@
241
329
  verifying: "Verifying...",
242
330
  waitAlert: "Verifying... please wait."
243
331
  };
244
- if ("$altcha" in globalThis) {
245
- globalThis.$altcha.i18n.set("en", i18n$q);
246
- }
332
+ globalThis.$altcha.i18n.set("en", i18n$q);
247
333
  const i18n$p = {
248
334
  ariaLinkLabel: "Altcha (officiel hjemmeside)",
249
335
  enterCode: "Indtast kode",
@@ -263,9 +349,7 @@
263
349
  cancel: "Annuller",
264
350
  enterCodeFromImage: "For at fortsætte, bedes du indtaste koden fra billedet herunder."
265
351
  };
266
- if ("$altcha" in globalThis) {
267
- globalThis.$altcha.i18n.set("da", i18n$p);
268
- }
352
+ globalThis.$altcha.i18n.set("da", i18n$p);
269
353
  const i18n$o = {
270
354
  ariaLinkLabel: "Altcha (officiell webbplats)",
271
355
  enterCode: "Ange kod",
@@ -285,9 +369,7 @@
285
369
  cancel: "Avbryt",
286
370
  enterCodeFromImage: "För att fortsätta, ange koden från bilden nedan."
287
371
  };
288
- if ("$altcha" in globalThis) {
289
- globalThis.$altcha.i18n.set("sv", i18n$o);
290
- }
372
+ globalThis.$altcha.i18n.set("sv", i18n$o);
291
373
  const i18n$n = {
292
374
  ariaLinkLabel: "Altcha (virallinen verkkosivusto)",
293
375
  enterCode: "Syötä koodi",
@@ -307,9 +389,7 @@
307
389
  cancel: "Peruuta",
308
390
  enterCodeFromImage: "Jatkaaksesi, syötä alla olevan kuvan koodi."
309
391
  };
310
- if ("$altcha" in globalThis) {
311
- globalThis.$altcha.i18n.set("fi", i18n$n);
312
- }
392
+ globalThis.$altcha.i18n.set("fi", i18n$n);
313
393
  const i18n$m = {
314
394
  ariaLinkLabel: "Altcha (ametlik veebisait)",
315
395
  enterCode: "Sisesta kood",
@@ -329,9 +409,7 @@
329
409
  cancel: "Tühista",
330
410
  enterCodeFromImage: "Jätkamiseks sisestage alloleval pildil olev kood."
331
411
  };
332
- if ("$altcha" in globalThis) {
333
- globalThis.$altcha.i18n.set("et", i18n$m);
334
- }
412
+ globalThis.$altcha.i18n.set("et", i18n$m);
335
413
  const i18n$l = {
336
414
  ariaLinkLabel: "Altcha (offisiell nettside)",
337
415
  enterCode: "Skriv inn kode",
@@ -351,9 +429,7 @@
351
429
  cancel: "Avbryt",
352
430
  enterCodeFromImage: "For å fortsette, vennligst skriv inn koden fra bildet nedenfor."
353
431
  };
354
- if ("$altcha" in globalThis) {
355
- globalThis.$altcha.i18n.set("nb", i18n$l);
356
- }
432
+ globalThis.$altcha.i18n.set("nb", i18n$l);
357
433
  const i18n$k = {
358
434
  ariaLinkLabel: "Altcha (opinber vefsíða)",
359
435
  enterCode: "Sláðu inn kóða",
@@ -373,9 +449,7 @@
373
449
  cancel: "Hætta við",
374
450
  enterCodeFromImage: "Til að halda áfram, vinsamlegast sláðu inn kóðann af myndinni hér að neðan."
375
451
  };
376
- if ("$altcha" in globalThis) {
377
- globalThis.$altcha.i18n.set("is", i18n$k);
378
- }
452
+ globalThis.$altcha.i18n.set("is", i18n$k);
379
453
  const i18n$j = {
380
454
  ariaLinkLabel: "Altcha (oficiali svetainė)",
381
455
  enterCode: "Įveskite kodą",
@@ -395,9 +469,7 @@
395
469
  cancel: "Atšaukti",
396
470
  enterCodeFromImage: "Norėdami tęsti, įveskite kodą iš paveikslėlio žemiau."
397
471
  };
398
- if ("$altcha" in globalThis) {
399
- globalThis.$altcha.i18n.set("lt", i18n$j);
400
- }
472
+ globalThis.$altcha.i18n.set("lt", i18n$j);
401
473
  const i18n$i = {
402
474
  ariaLinkLabel: "Altcha (oficiālā tīmekļa vietne)",
403
475
  enterCode: "Ievadiet kodu",
@@ -417,9 +489,7 @@
417
489
  cancel: "Atcelt",
418
490
  enterCodeFromImage: "Lai turpinātu, lūdzu, ievadiet zemāk redzamo attēlu kodu."
419
491
  };
420
- if ("$altcha" in globalThis) {
421
- globalThis.$altcha.i18n.set("lv", i18n$i);
422
- }
492
+ globalThis.$altcha.i18n.set("lv", i18n$i);
423
493
  const i18n$h = {
424
494
  ariaLinkLabel: "Altcha (афіцыйны сайт)",
425
495
  enterCode: "Увядзіце код",
@@ -439,9 +509,7 @@
439
509
  cancel: "Скасаваць",
440
510
  enterCodeFromImage: "Каб працягнуць, увядзіце код з малюнка ніжэй."
441
511
  };
442
- if ("$altcha" in globalThis) {
443
- globalThis.$altcha.i18n.set("be", i18n$h);
444
- }
512
+ globalThis.$altcha.i18n.set("be", i18n$h);
445
513
  const i18n$g = {
446
514
  ariaLinkLabel: "Altcha (službena web stranica)",
447
515
  enterCode: "Unesite kod",
@@ -461,9 +529,7 @@
461
529
  cancel: "Odustani",
462
530
  enterCodeFromImage: "Za nastavak, molimo unesite kod sa slike ispod."
463
531
  };
464
- if ("$altcha" in globalThis) {
465
- globalThis.$altcha.i18n.set("bs", i18n$g);
466
- }
532
+ globalThis.$altcha.i18n.set("bs", i18n$g);
467
533
  const i18n$f = {
468
534
  ariaLinkLabel: "Altcha (oficiální web)",
469
535
  enterCode: "Zadejte kód",
@@ -483,9 +549,7 @@
483
549
  cancel: "Zrušit",
484
550
  enterCodeFromImage: "Pro pokračování zadejte kód z obrázku níže."
485
551
  };
486
- if ("$altcha" in globalThis) {
487
- globalThis.$altcha.i18n.set("cs", i18n$f);
488
- }
552
+ globalThis.$altcha.i18n.set("cs", i18n$f);
489
553
  const i18n$e = {
490
554
  ariaLinkLabel: "Altcha (oficjalna strona internetowa)",
491
555
  enterCode: "Wprowadź kod",
@@ -505,9 +569,7 @@
505
569
  cancel: "Anuluj",
506
570
  enterCodeFromImage: "Aby kontynuować, wprowadź kod z poniższego obrazka."
507
571
  };
508
- if ("$altcha" in globalThis) {
509
- globalThis.$altcha.i18n.set("pl", i18n$e);
510
- }
572
+ globalThis.$altcha.i18n.set("pl", i18n$e);
511
573
  const i18n$d = {
512
574
  ariaLinkLabel: "Altcha (hivatalos weboldal)",
513
575
  enterCode: "Írja be a kódot",
@@ -527,9 +589,7 @@
527
589
  cancel: "Mégse",
528
590
  enterCodeFromImage: "A folytatáshoz, kérjük, adja meg az alábbi kép kódját."
529
591
  };
530
- if ("$altcha" in globalThis) {
531
- globalThis.$altcha.i18n.set("hu", i18n$d);
532
- }
592
+ globalThis.$altcha.i18n.set("hu", i18n$d);
533
593
  const i18n$c = {
534
594
  ariaLinkLabel: "Altcha (oficiálna webová stránka)",
535
595
  enterCode: "Zadajte kód",
@@ -549,9 +609,7 @@
549
609
  cancel: "Zrušiť",
550
610
  enterCodeFromImage: "Na pokračovanie, prosím, zadajte kód z obrázka nižšie."
551
611
  };
552
- if ("$altcha" in globalThis) {
553
- globalThis.$altcha.i18n.set("sk", i18n$c);
554
- }
612
+ globalThis.$altcha.i18n.set("sk", i18n$c);
555
613
  const i18n$b = {
556
614
  ariaLinkLabel: "Altcha (uradna spletna stran)",
557
615
  enterCode: "Vnesite kodo",
@@ -571,9 +629,7 @@
571
629
  cancel: "Preklic",
572
630
  enterCodeFromImage: "Za nadaljevanje, prosimo, vnesite kodo s slike spodaj."
573
631
  };
574
- if ("$altcha" in globalThis) {
575
- globalThis.$altcha.i18n.set("sl", i18n$b);
576
- }
632
+ globalThis.$altcha.i18n.set("sl", i18n$b);
577
633
  const i18n$a = {
578
634
  ariaLinkLabel: "Altcha (službena web stranica)",
579
635
  enterCode: "Unesite kod",
@@ -593,9 +649,7 @@
593
649
  cancel: "Odustani",
594
650
  enterCodeFromImage: "Za nastavak molimo unesite kod sa slike ispod."
595
651
  };
596
- if ("$altcha" in globalThis) {
597
- globalThis.$altcha.i18n.set("hr", i18n$a);
598
- }
652
+ globalThis.$altcha.i18n.set("hr", i18n$a);
599
653
  const i18n$9 = {
600
654
  ariaLinkLabel: "Altcha (site oficial)",
601
655
  enterCode: "Introduceți codul",
@@ -615,9 +669,7 @@
615
669
  cancel: "Anulare",
616
670
  enterCodeFromImage: "Pentru a continua, vă rugăm să introduceți codul din imaginea de mai jos."
617
671
  };
618
- if ("$altcha" in globalThis) {
619
- globalThis.$altcha.i18n.set("ro", i18n$9);
620
- }
672
+ globalThis.$altcha.i18n.set("ro", i18n$9);
621
673
  const i18n$8 = {
622
674
  ariaLinkLabel: "Altcha (официален уебсайт)",
623
675
  enterCode: "Въведете код",
@@ -637,9 +689,7 @@
637
689
  cancel: "Отказ",
638
690
  enterCodeFromImage: "За да продължите, моля, въведете кода от изображението по-долу."
639
691
  };
640
- if ("$altcha" in globalThis) {
641
- globalThis.$altcha.i18n.set("bg", i18n$8);
642
- }
692
+ globalThis.$altcha.i18n.set("bg", i18n$8);
643
693
  const i18n$7 = {
644
694
  ariaLinkLabel: "Altcha (επίσημος ιστότοπος)",
645
695
  enterCode: "Εισαγάγετε κωδικό",
@@ -659,9 +709,7 @@
659
709
  cancel: "Ακύρωση",
660
710
  enterCodeFromImage: "Για να συνεχίσετε, εισάγετε τον κωδικό από την παρακάτω εικόνα."
661
711
  };
662
- if ("$altcha" in globalThis) {
663
- globalThis.$altcha.i18n.set("el", i18n$7);
664
- }
712
+ globalThis.$altcha.i18n.set("el", i18n$7);
665
713
  const i18n$6 = {
666
714
  ariaLinkLabel: "Altcha (zvanična web stranica)",
667
715
  enterCode: "Unesite kod",
@@ -681,9 +729,7 @@
681
729
  cancel: "Откажи",
682
730
  enterCodeFromImage: "Да бисте наставили, унесите код са слике испод."
683
731
  };
684
- if ("$altcha" in globalThis) {
685
- globalThis.$altcha.i18n.set("sr", i18n$6);
686
- }
732
+ globalThis.$altcha.i18n.set("sr", i18n$6);
687
733
  const i18n$5 = {
688
734
  ariaLinkLabel: "Altcha (официальный сайт)",
689
735
  enterCode: "Введите код",
@@ -703,9 +749,7 @@
703
749
  cancel: "Отмена",
704
750
  enterCodeFromImage: "Чтобы продолжить, пожалуйста, введите код с изображения ниже."
705
751
  };
706
- if ("$altcha" in globalThis) {
707
- globalThis.$altcha.i18n.set("ru", i18n$5);
708
- }
752
+ globalThis.$altcha.i18n.set("ru", i18n$5);
709
753
  const i18n$4 = {
710
754
  ariaLinkLabel: "Altcha (zvanična web stranica)",
711
755
  enterCode: "Unesite kod",
@@ -725,9 +769,7 @@
725
769
  cancel: "Odustani",
726
770
  enterCodeFromImage: "Za nastavak, molimo unesite kod sa slike ispod."
727
771
  };
728
- if ("$altcha" in globalThis) {
729
- globalThis.$altcha.i18n.set("me", i18n$4);
730
- }
772
+ globalThis.$altcha.i18n.set("me", i18n$4);
731
773
  const i18n$3 = {
732
774
  ariaLinkLabel: "Altcha (официјален веб-сајт)",
733
775
  enterCode: "Внесете код",
@@ -747,9 +789,7 @@
747
789
  cancel: "Откажи",
748
790
  enterCodeFromImage: "За да продолжите, ве молиме внесете го кодот од сликата подолу."
749
791
  };
750
- if ("$altcha" in globalThis) {
751
- globalThis.$altcha.i18n.set("mk", i18n$3);
752
- }
792
+ globalThis.$altcha.i18n.set("mk", i18n$3);
753
793
  const i18n$2 = {
754
794
  ariaLinkLabel: "Altcha (faqja zyrtare)",
755
795
  enterCode: "Fut kodin",
@@ -769,9 +809,7 @@
769
809
  cancel: "Anuloje",
770
810
  enterCodeFromImage: "Për të vazhduar, ju lutemi fusni kodin nga imazhi më poshtë."
771
811
  };
772
- if ("$altcha" in globalThis) {
773
- globalThis.$altcha.i18n.set("sq", i18n$2);
774
- }
812
+ globalThis.$altcha.i18n.set("sq", i18n$2);
775
813
  const i18n$1 = {
776
814
  ariaLinkLabel: "Altcha (amptelike webwerf)",
777
815
  enterCode: "Voer kode in",
@@ -791,9 +829,7 @@
791
829
  cancel: "Kanselleer",
792
830
  enterCodeFromImage: "Om voort te gaan, voer asseblief die kode vanaf die onderstaande prentjie in."
793
831
  };
794
- if ("$altcha" in globalThis) {
795
- globalThis.$altcha.i18n.set("af", i18n$1);
796
- }
832
+ globalThis.$altcha.i18n.set("af", i18n$1);
797
833
  const i18n = {
798
834
  ariaLinkLabel: "Altcha (sit uffiċjali)",
799
835
  enterCode: "Idħol il-kodiċi",
@@ -813,7 +849,5 @@
813
849
  cancel: "Ikkanċella",
814
850
  enterCodeFromImage: "Biex tipproċedi, jekk jogħġbok daħħal il-kodiċi mill-immaġni hawn taħt."
815
851
  };
816
- if ("$altcha" in globalThis) {
817
- globalThis.$altcha.i18n.set("mt", i18n);
818
- }
852
+ globalThis.$altcha.i18n.set("mt", i18n);
819
853
  }));
package/dist/i18n/fa.js CHANGED
@@ -1,3 +1,111 @@
1
+ const noop = () => {
2
+ };
3
+ function safe_not_equal(a, b) {
4
+ return a != a ? b == b : a !== b || a !== null && typeof a === "object" || typeof a === "function";
5
+ }
6
+ function subscribe_to_store(store2, run, invalidate) {
7
+ if (store2 == null) {
8
+ run(void 0);
9
+ return noop;
10
+ }
11
+ const unsub = untrack(
12
+ () => store2.subscribe(
13
+ run,
14
+ // @ts-expect-error
15
+ invalidate
16
+ )
17
+ );
18
+ return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
19
+ }
20
+ const subscriber_queue = [];
21
+ function writable(value, start = noop) {
22
+ let stop = null;
23
+ const subscribers = /* @__PURE__ */ new Set();
24
+ function set(new_value) {
25
+ if (safe_not_equal(value, new_value)) {
26
+ value = new_value;
27
+ if (stop) {
28
+ const run_queue = !subscriber_queue.length;
29
+ for (const subscriber of subscribers) {
30
+ subscriber[1]();
31
+ subscriber_queue.push(subscriber, value);
32
+ }
33
+ if (run_queue) {
34
+ for (let i = 0; i < subscriber_queue.length; i += 2) {
35
+ subscriber_queue[i][0](subscriber_queue[i + 1]);
36
+ }
37
+ subscriber_queue.length = 0;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ function update(fn) {
43
+ set(fn(
44
+ /** @type {T} */
45
+ value
46
+ ));
47
+ }
48
+ function subscribe(run, invalidate = noop) {
49
+ const subscriber = [run, invalidate];
50
+ subscribers.add(subscriber);
51
+ if (subscribers.size === 1) {
52
+ stop = start(set, update) || noop;
53
+ }
54
+ run(
55
+ /** @type {T} */
56
+ value
57
+ );
58
+ return () => {
59
+ subscribers.delete(subscriber);
60
+ if (subscribers.size === 0 && stop) {
61
+ stop();
62
+ stop = null;
63
+ }
64
+ };
65
+ }
66
+ return { set, update, subscribe };
67
+ }
68
+ function get(store2) {
69
+ let value;
70
+ subscribe_to_store(store2, (_) => value = _)();
71
+ return value;
72
+ }
73
+ let untracking = false;
74
+ function untrack(fn) {
75
+ var previous_untracking = untracking;
76
+ try {
77
+ untracking = true;
78
+ return fn();
79
+ } finally {
80
+ untracking = previous_untracking;
81
+ }
82
+ }
83
+ function store(defaultValue) {
84
+ const scope = {
85
+ get: (name) => {
86
+ return get(scope.store)[name];
87
+ },
88
+ set: (name, value) => {
89
+ if (typeof name === "string") {
90
+ Object.assign(get(scope.store), {
91
+ [name]: value
92
+ });
93
+ } else {
94
+ Object.assign(get(scope.store), name);
95
+ }
96
+ scope.store.set(get(scope.store));
97
+ },
98
+ store: writable(defaultValue)
99
+ };
100
+ return scope;
101
+ }
102
+ globalThis.$altcha = globalThis.$altcha || {
103
+ algorithms: /* @__PURE__ */ new Map(),
104
+ defaults: store({}),
105
+ i18n: store({}),
106
+ instances: /* @__PURE__ */ new Set(),
107
+ plugins: /* @__PURE__ */ new Set()
108
+ };
1
109
  const i18n = {
2
110
  ariaLinkLabel: "Altcha (وب‌سایت رسمی)",
3
111
  enterCode: "کد را وارد کنید",
@@ -17,6 +125,4 @@ const i18n = {
17
125
  cancel: "لغو کردن",
18
126
  enterCodeFromImage: "برای ادامه، لطفاً کد تصویر زیر را وارد کنید."
19
127
  };
20
- if ("$altcha" in globalThis) {
21
- globalThis.$altcha.i18n.set("fa", i18n);
22
- }
128
+ globalThis.$altcha.i18n.set("fa", i18n);