altcha 2.3.0 → 3.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (494) hide show
  1. package/LICENSE.txt +1 -1
  2. package/README.md +149 -204
  3. package/dist/external/altcha.css +1 -0
  4. package/dist/external/altcha.js +6681 -0
  5. package/dist/external/altcha.min.js +1 -0
  6. package/dist/external/altcha.umd.cjs +6687 -0
  7. package/dist/external/altcha.umd.min.cjs +1 -0
  8. package/dist/external/index.d.ts +1 -0
  9. package/dist/i18n/419.d.ts +1 -0
  10. package/dist/i18n/af.d.ts +1 -0
  11. package/dist/i18n/af.js +22 -0
  12. package/dist/i18n/af.umd.cjs +27 -0
  13. package/dist/i18n/africa.d.ts +1 -0
  14. package/{dist_i18n → dist/i18n}/africa.js +52 -97
  15. package/dist/i18n/africa.umd.cjs +159 -0
  16. package/dist/i18n/all.d.ts +1 -0
  17. package/{dist_i18n → dist/i18n}/all.js +465 -299
  18. package/dist/i18n/all.umd.cjs +1325 -0
  19. package/dist/i18n/am.d.ts +1 -0
  20. package/dist/i18n/am.js +22 -0
  21. package/dist/i18n/am.umd.cjs +27 -0
  22. package/dist/i18n/americas.d.ts +1 -0
  23. package/{dist_i18n → dist/i18n}/americas.js +24 -85
  24. package/dist/i18n/americas.umd.cjs +71 -0
  25. package/dist/i18n/ar.d.ts +1 -0
  26. package/dist/i18n/ar.js +22 -0
  27. package/dist/i18n/ar.umd.cjs +27 -0
  28. package/dist/i18n/asia.d.ts +1 -0
  29. package/{dist_i18n → dist/i18n}/asia.js +177 -158
  30. package/dist/i18n/asia.umd.cjs +511 -0
  31. package/dist/i18n/az.d.ts +1 -0
  32. package/dist/i18n/az.js +22 -0
  33. package/dist/i18n/az.umd.cjs +27 -0
  34. package/dist/i18n/be.d.ts +1 -0
  35. package/dist/i18n/be.js +22 -0
  36. package/dist/i18n/be.umd.cjs +27 -0
  37. package/dist/i18n/bg.d.ts +1 -0
  38. package/dist/i18n/bg.js +22 -0
  39. package/dist/i18n/bg.umd.cjs +27 -0
  40. package/dist/i18n/bn.d.ts +1 -0
  41. package/dist/i18n/bn.js +22 -0
  42. package/dist/i18n/bn.umd.cjs +27 -0
  43. package/dist/i18n/br.d.ts +1 -0
  44. package/dist/i18n/bs.d.ts +1 -0
  45. package/dist/i18n/bs.js +22 -0
  46. package/dist/i18n/bs.umd.cjs +27 -0
  47. package/dist/i18n/ca.d.ts +1 -0
  48. package/dist/i18n/ca.js +22 -0
  49. package/dist/i18n/ca.umd.cjs +27 -0
  50. package/dist/i18n/cn.d.ts +1 -0
  51. package/dist/i18n/cs.d.ts +1 -0
  52. package/dist/i18n/cs.js +22 -0
  53. package/dist/i18n/cs.umd.cjs +27 -0
  54. package/dist/i18n/da.d.ts +1 -0
  55. package/dist/i18n/da.js +22 -0
  56. package/dist/i18n/da.umd.cjs +27 -0
  57. package/dist/i18n/de.d.ts +1 -0
  58. package/dist/i18n/de.js +22 -0
  59. package/dist/i18n/de.umd.cjs +27 -0
  60. package/dist/i18n/el.d.ts +1 -0
  61. package/dist/i18n/el.js +22 -0
  62. package/dist/i18n/el.umd.cjs +27 -0
  63. package/dist/i18n/en.d.ts +1 -0
  64. package/dist/i18n/en.js +22 -0
  65. package/dist/i18n/en.umd.cjs +27 -0
  66. package/dist/i18n/es-419.js +22 -0
  67. package/dist/i18n/es-419.umd.cjs +27 -0
  68. package/dist/i18n/es-es.js +22 -0
  69. package/dist/i18n/es-es.umd.cjs +27 -0
  70. package/dist/i18n/es.d.ts +1 -0
  71. package/dist/i18n/et.d.ts +1 -0
  72. package/dist/i18n/et.js +22 -0
  73. package/dist/i18n/et.umd.cjs +27 -0
  74. package/dist/i18n/eu.d.ts +1 -0
  75. package/dist/i18n/eu.js +22 -0
  76. package/dist/i18n/eu.umd.cjs +27 -0
  77. package/dist/i18n/europe.d.ts +1 -0
  78. package/{dist_i18n → dist/i18n}/europe.js +283 -209
  79. package/dist/i18n/europe.umd.cjs +819 -0
  80. package/dist/i18n/fa.d.ts +1 -0
  81. package/dist/i18n/fa.js +22 -0
  82. package/dist/i18n/fa.umd.cjs +27 -0
  83. package/dist/i18n/fi.d.ts +1 -0
  84. package/dist/i18n/fi.js +22 -0
  85. package/dist/i18n/fi.umd.cjs +27 -0
  86. package/dist/i18n/fr-ca.js +22 -0
  87. package/dist/i18n/fr-ca.umd.cjs +27 -0
  88. package/dist/i18n/fr-fr.js +22 -0
  89. package/dist/i18n/fr-fr.umd.cjs +27 -0
  90. package/dist/i18n/fr.d.ts +1 -0
  91. package/dist/i18n/ga.d.ts +1 -0
  92. package/dist/i18n/ga.js +22 -0
  93. package/dist/i18n/ga.umd.cjs +27 -0
  94. package/dist/i18n/he.d.ts +1 -0
  95. package/dist/i18n/he.js +22 -0
  96. package/dist/i18n/he.umd.cjs +27 -0
  97. package/dist/i18n/hi.d.ts +1 -0
  98. package/dist/i18n/hi.js +22 -0
  99. package/dist/i18n/hi.umd.cjs +27 -0
  100. package/dist/i18n/hr.d.ts +1 -0
  101. package/dist/i18n/hr.js +22 -0
  102. package/dist/i18n/hr.umd.cjs +27 -0
  103. package/dist/i18n/hu.d.ts +1 -0
  104. package/dist/i18n/hu.js +22 -0
  105. package/dist/i18n/hu.umd.cjs +27 -0
  106. package/dist/i18n/hy.d.ts +1 -0
  107. package/dist/i18n/hy.js +22 -0
  108. package/dist/i18n/hy.umd.cjs +27 -0
  109. package/dist/i18n/id.d.ts +1 -0
  110. package/dist/i18n/id.js +22 -0
  111. package/dist/i18n/id.umd.cjs +27 -0
  112. package/dist/i18n/is.d.ts +1 -0
  113. package/dist/i18n/is.js +22 -0
  114. package/dist/i18n/is.umd.cjs +27 -0
  115. package/dist/i18n/it.d.ts +1 -0
  116. package/dist/i18n/it.js +22 -0
  117. package/dist/i18n/it.umd.cjs +27 -0
  118. package/dist/i18n/ja.d.ts +1 -0
  119. package/dist/i18n/ja.js +22 -0
  120. package/dist/i18n/ja.umd.cjs +27 -0
  121. package/dist/i18n/ka.d.ts +1 -0
  122. package/dist/i18n/ka.js +22 -0
  123. package/dist/i18n/ka.umd.cjs +27 -0
  124. package/dist/i18n/kk.d.ts +1 -0
  125. package/dist/i18n/kk.js +22 -0
  126. package/dist/i18n/kk.umd.cjs +27 -0
  127. package/dist/i18n/ko.d.ts +1 -0
  128. package/dist/i18n/ko.js +22 -0
  129. package/dist/i18n/ko.umd.cjs +27 -0
  130. package/dist/i18n/lb.d.ts +1 -0
  131. package/dist/i18n/lb.js +22 -0
  132. package/dist/i18n/lb.umd.cjs +27 -0
  133. package/dist/i18n/lt.d.ts +1 -0
  134. package/dist/i18n/lt.js +22 -0
  135. package/dist/i18n/lt.umd.cjs +27 -0
  136. package/dist/i18n/lv.d.ts +1 -0
  137. package/dist/i18n/lv.js +22 -0
  138. package/dist/i18n/lv.umd.cjs +27 -0
  139. package/dist/i18n/me.d.ts +1 -0
  140. package/dist/i18n/me.js +22 -0
  141. package/dist/i18n/me.umd.cjs +27 -0
  142. package/dist/i18n/mk.d.ts +1 -0
  143. package/dist/i18n/mk.js +22 -0
  144. package/dist/i18n/mk.umd.cjs +27 -0
  145. package/dist/i18n/mr.d.ts +1 -0
  146. package/dist/i18n/mr.js +22 -0
  147. package/dist/i18n/mr.umd.cjs +27 -0
  148. package/dist/i18n/mt.d.ts +1 -0
  149. package/dist/i18n/mt.js +22 -0
  150. package/dist/i18n/mt.umd.cjs +27 -0
  151. package/dist/i18n/nb.d.ts +1 -0
  152. package/dist/i18n/nb.js +22 -0
  153. package/dist/i18n/nb.umd.cjs +27 -0
  154. package/dist/i18n/nl.d.ts +1 -0
  155. package/dist/i18n/nl.js +22 -0
  156. package/dist/i18n/nl.umd.cjs +27 -0
  157. package/dist/i18n/pl.d.ts +1 -0
  158. package/dist/i18n/pl.js +22 -0
  159. package/dist/i18n/pl.umd.cjs +27 -0
  160. package/dist/i18n/pt-br.js +22 -0
  161. package/dist/i18n/pt-br.umd.cjs +27 -0
  162. package/dist/i18n/pt-pt.js +22 -0
  163. package/dist/i18n/pt-pt.umd.cjs +27 -0
  164. package/dist/i18n/pt.d.ts +1 -0
  165. package/dist/i18n/ro.d.ts +1 -0
  166. package/dist/i18n/ro.js +22 -0
  167. package/dist/i18n/ro.umd.cjs +27 -0
  168. package/dist/i18n/ru.d.ts +1 -0
  169. package/dist/i18n/ru.js +22 -0
  170. package/dist/i18n/ru.umd.cjs +27 -0
  171. package/dist/i18n/sk.d.ts +1 -0
  172. package/dist/i18n/sk.js +22 -0
  173. package/dist/i18n/sk.umd.cjs +27 -0
  174. package/dist/i18n/sl.d.ts +1 -0
  175. package/dist/i18n/sl.js +22 -0
  176. package/dist/i18n/sl.umd.cjs +27 -0
  177. package/dist/i18n/sq.d.ts +1 -0
  178. package/dist/i18n/sq.js +22 -0
  179. package/dist/i18n/sq.umd.cjs +27 -0
  180. package/dist/i18n/sr.d.ts +1 -0
  181. package/dist/i18n/sr.js +22 -0
  182. package/dist/i18n/sr.umd.cjs +27 -0
  183. package/dist/i18n/sv.d.ts +1 -0
  184. package/dist/i18n/sv.js +22 -0
  185. package/dist/i18n/sv.umd.cjs +27 -0
  186. package/dist/i18n/sw.d.ts +1 -0
  187. package/dist/i18n/sw.js +22 -0
  188. package/dist/i18n/sw.umd.cjs +27 -0
  189. package/dist/i18n/ta.d.ts +1 -0
  190. package/dist/i18n/ta.js +22 -0
  191. package/dist/i18n/ta.umd.cjs +27 -0
  192. package/dist/i18n/te.d.ts +1 -0
  193. package/dist/i18n/te.js +22 -0
  194. package/dist/i18n/te.umd.cjs +27 -0
  195. package/dist/i18n/th.d.ts +1 -0
  196. package/dist/i18n/th.js +22 -0
  197. package/dist/i18n/th.umd.cjs +27 -0
  198. package/dist/i18n/tk.d.ts +1 -0
  199. package/dist/i18n/tk.js +22 -0
  200. package/dist/i18n/tk.umd.cjs +27 -0
  201. package/dist/i18n/tr.d.ts +1 -0
  202. package/dist/i18n/tr.js +22 -0
  203. package/dist/i18n/tr.umd.cjs +27 -0
  204. package/dist/i18n/tw.d.ts +1 -0
  205. package/dist/i18n/uk.d.ts +1 -0
  206. package/dist/i18n/uk.js +22 -0
  207. package/dist/i18n/uk.umd.cjs +27 -0
  208. package/dist/i18n/ur.d.ts +1 -0
  209. package/dist/i18n/ur.js +22 -0
  210. package/dist/i18n/ur.umd.cjs +27 -0
  211. package/dist/i18n/uz.d.ts +1 -0
  212. package/dist/i18n/uz.js +22 -0
  213. package/dist/i18n/uz.umd.cjs +27 -0
  214. package/dist/i18n/vi.d.ts +1 -0
  215. package/dist/i18n/vi.js +22 -0
  216. package/dist/i18n/vi.umd.cjs +27 -0
  217. package/dist/i18n/yo.d.ts +1 -0
  218. package/dist/i18n/yo.js +22 -0
  219. package/dist/i18n/yo.umd.cjs +27 -0
  220. package/dist/i18n/zh-cn.js +22 -0
  221. package/dist/i18n/zh-cn.umd.cjs +27 -0
  222. package/dist/i18n/zh-tw.js +22 -0
  223. package/dist/i18n/zh-tw.umd.cjs +27 -0
  224. package/dist/lib/index.d.ts +143 -0
  225. package/dist/lib/index.js +1344 -0
  226. package/dist/lib/index.min.js +1 -0
  227. package/dist/lib/index.umd.cjs +1348 -0
  228. package/dist/lib/index.umd.min.cjs +1 -0
  229. package/dist/main/altcha.i18n.js +8389 -0
  230. package/dist/main/altcha.i18n.min.js +1 -0
  231. package/dist/main/altcha.i18n.umd.cjs +8392 -0
  232. package/dist/main/altcha.i18n.umd.min.cjs +1 -0
  233. package/dist/main/altcha.js +7069 -0
  234. package/dist/main/altcha.min.js +1 -0
  235. package/dist/main/altcha.umd.cjs +7072 -0
  236. package/dist/main/altcha.umd.min.cjs +1 -0
  237. package/dist/plugins/obfuscation.plugin.d.ts +1 -0
  238. package/dist/plugins/obfuscation.plugin.js +320 -0
  239. package/dist/plugins/obfuscation.plugin.min.js +1 -0
  240. package/dist/plugins/obfuscation.plugin.umd.cjs +325 -0
  241. package/dist/plugins/obfuscation.plugin.umd.min.cjs +1 -0
  242. package/dist/themes/aqua.css +19 -0
  243. package/dist/themes/aqua.min.css +1 -0
  244. package/dist/themes/business.css +15 -0
  245. package/dist/themes/business.min.css +1 -0
  246. package/dist/themes/caramel.css +19 -0
  247. package/dist/themes/caramel.min.css +1 -0
  248. package/dist/themes/cupcake.css +16 -0
  249. package/dist/themes/cupcake.min.css +1 -0
  250. package/dist/themes/cyberpunk.css +24 -0
  251. package/dist/themes/cyberpunk.min.css +1 -0
  252. package/dist/themes/lime.css +13 -0
  253. package/dist/themes/lime.min.css +1 -0
  254. package/dist/themes/wireframe.css +17 -0
  255. package/dist/themes/wireframe.min.css +1 -0
  256. package/dist/types/generic.d.ts +25 -0
  257. package/dist/types/generic.js +1 -0
  258. package/dist/types/global.d.ts +5 -0
  259. package/dist/types/global.js +1 -0
  260. package/dist/types/index.d.ts +352 -0
  261. package/dist/types/index.js +23 -0
  262. package/dist/types/jsx.d.ts +13 -0
  263. package/dist/types/jsx.js +1 -0
  264. package/dist/types/react.d.ts +35 -0
  265. package/dist/types/react.js +1 -0
  266. package/dist/types/svelte.d.ts +26 -0
  267. package/dist/types/svelte.js +1 -0
  268. package/dist/workers/argon2id.js +786 -0
  269. package/dist/workers/pbkdf2.js +166 -0
  270. package/dist/workers/scrypt.js +739 -0
  271. package/dist/workers/sha.js +160 -0
  272. package/package.json +115 -81
  273. package/dist/altcha.d.ts +0 -183
  274. package/dist/altcha.i18n.d.ts +0 -183
  275. package/dist/altcha.i18n.js +0 -4182
  276. package/dist/altcha.i18n.umd.js +0 -4
  277. package/dist/altcha.js +0 -3105
  278. package/dist/altcha.umd.cjs +0 -4
  279. package/dist_external/altcha.css +0 -1
  280. package/dist_external/altcha.d.ts +0 -183
  281. package/dist_external/altcha.js +0 -3075
  282. package/dist_external/altcha.umd.cjs +0 -3
  283. package/dist_external/worker.js +0 -1
  284. package/dist_i18n/af.d.ts +0 -1
  285. package/dist_i18n/af.js +0 -94
  286. package/dist_i18n/af.umd.cjs +0 -1
  287. package/dist_i18n/africa.d.ts +0 -1
  288. package/dist_i18n/africa.umd.cjs +0 -1
  289. package/dist_i18n/all.d.ts +0 -1
  290. package/dist_i18n/all.umd.cjs +0 -1
  291. package/dist_i18n/am.d.ts +0 -1
  292. package/dist_i18n/am.js +0 -94
  293. package/dist_i18n/am.umd.cjs +0 -1
  294. package/dist_i18n/americas.d.ts +0 -1
  295. package/dist_i18n/americas.umd.cjs +0 -1
  296. package/dist_i18n/ar.d.ts +0 -1
  297. package/dist_i18n/ar.js +0 -94
  298. package/dist_i18n/ar.umd.cjs +0 -1
  299. package/dist_i18n/asia.d.ts +0 -1
  300. package/dist_i18n/asia.umd.cjs +0 -1
  301. package/dist_i18n/az.d.ts +0 -1
  302. package/dist_i18n/az.js +0 -94
  303. package/dist_i18n/az.umd.cjs +0 -1
  304. package/dist_i18n/be.d.ts +0 -1
  305. package/dist_i18n/be.js +0 -94
  306. package/dist_i18n/be.umd.cjs +0 -1
  307. package/dist_i18n/bg.d.ts +0 -1
  308. package/dist_i18n/bg.js +0 -94
  309. package/dist_i18n/bg.umd.cjs +0 -1
  310. package/dist_i18n/bn.d.ts +0 -1
  311. package/dist_i18n/bn.js +0 -94
  312. package/dist_i18n/bn.umd.cjs +0 -1
  313. package/dist_i18n/bs.d.ts +0 -1
  314. package/dist_i18n/bs.js +0 -94
  315. package/dist_i18n/bs.umd.cjs +0 -1
  316. package/dist_i18n/ca.d.ts +0 -1
  317. package/dist_i18n/ca.js +0 -94
  318. package/dist_i18n/ca.umd.cjs +0 -1
  319. package/dist_i18n/cs.d.ts +0 -1
  320. package/dist_i18n/cs.js +0 -94
  321. package/dist_i18n/cs.umd.cjs +0 -1
  322. package/dist_i18n/da.d.ts +0 -1
  323. package/dist_i18n/da.js +0 -94
  324. package/dist_i18n/da.umd.cjs +0 -1
  325. package/dist_i18n/de.d.ts +0 -1
  326. package/dist_i18n/de.js +0 -94
  327. package/dist_i18n/de.umd.cjs +0 -1
  328. package/dist_i18n/el.d.ts +0 -1
  329. package/dist_i18n/el.js +0 -94
  330. package/dist_i18n/el.umd.cjs +0 -1
  331. package/dist_i18n/en.d.ts +0 -1
  332. package/dist_i18n/en.js +0 -94
  333. package/dist_i18n/en.umd.cjs +0 -1
  334. package/dist_i18n/es-419.d.ts +0 -1
  335. package/dist_i18n/es-419.js +0 -94
  336. package/dist_i18n/es-419.umd.cjs +0 -1
  337. package/dist_i18n/es-es.d.ts +0 -1
  338. package/dist_i18n/es-es.js +0 -94
  339. package/dist_i18n/es-es.umd.cjs +0 -1
  340. package/dist_i18n/et.d.ts +0 -1
  341. package/dist_i18n/et.js +0 -94
  342. package/dist_i18n/et.umd.cjs +0 -1
  343. package/dist_i18n/eu.d.ts +0 -1
  344. package/dist_i18n/eu.js +0 -94
  345. package/dist_i18n/eu.umd.cjs +0 -1
  346. package/dist_i18n/europe.d.ts +0 -1
  347. package/dist_i18n/europe.umd.cjs +0 -1
  348. package/dist_i18n/fa.d.ts +0 -1
  349. package/dist_i18n/fa.js +0 -94
  350. package/dist_i18n/fa.umd.cjs +0 -1
  351. package/dist_i18n/fi.d.ts +0 -1
  352. package/dist_i18n/fi.js +0 -94
  353. package/dist_i18n/fi.umd.cjs +0 -1
  354. package/dist_i18n/fr-ca.d.ts +0 -1
  355. package/dist_i18n/fr-ca.js +0 -94
  356. package/dist_i18n/fr-ca.umd.cjs +0 -1
  357. package/dist_i18n/fr-fr.d.ts +0 -1
  358. package/dist_i18n/fr-fr.js +0 -94
  359. package/dist_i18n/fr-fr.umd.cjs +0 -1
  360. package/dist_i18n/ga.d.ts +0 -1
  361. package/dist_i18n/ga.js +0 -94
  362. package/dist_i18n/ga.umd.cjs +0 -1
  363. package/dist_i18n/he.d.ts +0 -1
  364. package/dist_i18n/he.js +0 -94
  365. package/dist_i18n/he.umd.cjs +0 -1
  366. package/dist_i18n/hi.d.ts +0 -1
  367. package/dist_i18n/hi.js +0 -94
  368. package/dist_i18n/hi.umd.cjs +0 -1
  369. package/dist_i18n/hr.d.ts +0 -1
  370. package/dist_i18n/hr.js +0 -94
  371. package/dist_i18n/hr.umd.cjs +0 -1
  372. package/dist_i18n/hu.d.ts +0 -1
  373. package/dist_i18n/hu.js +0 -94
  374. package/dist_i18n/hu.umd.cjs +0 -1
  375. package/dist_i18n/hy.d.ts +0 -1
  376. package/dist_i18n/hy.js +0 -94
  377. package/dist_i18n/hy.umd.cjs +0 -1
  378. package/dist_i18n/id.d.ts +0 -1
  379. package/dist_i18n/id.js +0 -94
  380. package/dist_i18n/id.umd.cjs +0 -1
  381. package/dist_i18n/is.d.ts +0 -1
  382. package/dist_i18n/is.js +0 -94
  383. package/dist_i18n/is.umd.cjs +0 -1
  384. package/dist_i18n/it.d.ts +0 -1
  385. package/dist_i18n/it.js +0 -94
  386. package/dist_i18n/it.umd.cjs +0 -1
  387. package/dist_i18n/ja.d.ts +0 -1
  388. package/dist_i18n/ja.js +0 -94
  389. package/dist_i18n/ja.umd.cjs +0 -1
  390. package/dist_i18n/ka.d.ts +0 -1
  391. package/dist_i18n/ka.js +0 -94
  392. package/dist_i18n/ka.umd.cjs +0 -1
  393. package/dist_i18n/kk.d.ts +0 -1
  394. package/dist_i18n/kk.js +0 -94
  395. package/dist_i18n/kk.umd.cjs +0 -1
  396. package/dist_i18n/ko.d.ts +0 -1
  397. package/dist_i18n/ko.js +0 -94
  398. package/dist_i18n/ko.umd.cjs +0 -1
  399. package/dist_i18n/lb.d.ts +0 -1
  400. package/dist_i18n/lb.js +0 -94
  401. package/dist_i18n/lb.umd.cjs +0 -1
  402. package/dist_i18n/lt.d.ts +0 -1
  403. package/dist_i18n/lt.js +0 -94
  404. package/dist_i18n/lt.umd.cjs +0 -1
  405. package/dist_i18n/lv.d.ts +0 -1
  406. package/dist_i18n/lv.js +0 -94
  407. package/dist_i18n/lv.umd.cjs +0 -1
  408. package/dist_i18n/me.d.ts +0 -1
  409. package/dist_i18n/me.js +0 -94
  410. package/dist_i18n/me.umd.cjs +0 -1
  411. package/dist_i18n/mk.d.ts +0 -1
  412. package/dist_i18n/mk.js +0 -94
  413. package/dist_i18n/mk.umd.cjs +0 -1
  414. package/dist_i18n/mr.d.ts +0 -1
  415. package/dist_i18n/mr.js +0 -94
  416. package/dist_i18n/mr.umd.cjs +0 -1
  417. package/dist_i18n/mt.d.ts +0 -1
  418. package/dist_i18n/mt.js +0 -94
  419. package/dist_i18n/mt.umd.cjs +0 -1
  420. package/dist_i18n/nb.d.ts +0 -1
  421. package/dist_i18n/nb.js +0 -95
  422. package/dist_i18n/nb.umd.cjs +0 -1
  423. package/dist_i18n/nl.d.ts +0 -1
  424. package/dist_i18n/nl.js +0 -94
  425. package/dist_i18n/nl.umd.cjs +0 -1
  426. package/dist_i18n/pl.d.ts +0 -1
  427. package/dist_i18n/pl.js +0 -94
  428. package/dist_i18n/pl.umd.cjs +0 -1
  429. package/dist_i18n/pt-br.d.ts +0 -1
  430. package/dist_i18n/pt-br.js +0 -94
  431. package/dist_i18n/pt-br.umd.cjs +0 -1
  432. package/dist_i18n/pt-pt.d.ts +0 -1
  433. package/dist_i18n/pt-pt.js +0 -94
  434. package/dist_i18n/pt-pt.umd.cjs +0 -1
  435. package/dist_i18n/ro.d.ts +0 -1
  436. package/dist_i18n/ro.js +0 -94
  437. package/dist_i18n/ro.umd.cjs +0 -1
  438. package/dist_i18n/ru.d.ts +0 -1
  439. package/dist_i18n/ru.js +0 -94
  440. package/dist_i18n/ru.umd.cjs +0 -1
  441. package/dist_i18n/sk.d.ts +0 -1
  442. package/dist_i18n/sk.js +0 -94
  443. package/dist_i18n/sk.umd.cjs +0 -1
  444. package/dist_i18n/sl.d.ts +0 -1
  445. package/dist_i18n/sl.js +0 -94
  446. package/dist_i18n/sl.umd.cjs +0 -1
  447. package/dist_i18n/sq.d.ts +0 -1
  448. package/dist_i18n/sq.js +0 -94
  449. package/dist_i18n/sq.umd.cjs +0 -1
  450. package/dist_i18n/sr.d.ts +0 -1
  451. package/dist_i18n/sr.js +0 -94
  452. package/dist_i18n/sr.umd.cjs +0 -1
  453. package/dist_i18n/sv.d.ts +0 -1
  454. package/dist_i18n/sv.js +0 -94
  455. package/dist_i18n/sv.umd.cjs +0 -1
  456. package/dist_i18n/sw.d.ts +0 -1
  457. package/dist_i18n/sw.js +0 -94
  458. package/dist_i18n/sw.umd.cjs +0 -1
  459. package/dist_i18n/ta.d.ts +0 -1
  460. package/dist_i18n/ta.js +0 -94
  461. package/dist_i18n/ta.umd.cjs +0 -1
  462. package/dist_i18n/te.d.ts +0 -1
  463. package/dist_i18n/te.js +0 -94
  464. package/dist_i18n/te.umd.cjs +0 -1
  465. package/dist_i18n/th.d.ts +0 -1
  466. package/dist_i18n/th.js +0 -94
  467. package/dist_i18n/th.umd.cjs +0 -1
  468. package/dist_i18n/tk.d.ts +0 -1
  469. package/dist_i18n/tk.js +0 -94
  470. package/dist_i18n/tk.umd.cjs +0 -1
  471. package/dist_i18n/tr.d.ts +0 -1
  472. package/dist_i18n/tr.js +0 -94
  473. package/dist_i18n/tr.umd.cjs +0 -1
  474. package/dist_i18n/uk.d.ts +0 -1
  475. package/dist_i18n/uk.js +0 -94
  476. package/dist_i18n/uk.umd.cjs +0 -1
  477. package/dist_i18n/ur.d.ts +0 -1
  478. package/dist_i18n/ur.js +0 -94
  479. package/dist_i18n/ur.umd.cjs +0 -1
  480. package/dist_i18n/uz.d.ts +0 -1
  481. package/dist_i18n/uz.js +0 -94
  482. package/dist_i18n/uz.umd.cjs +0 -1
  483. package/dist_i18n/vi.d.ts +0 -1
  484. package/dist_i18n/vi.js +0 -94
  485. package/dist_i18n/vi.umd.cjs +0 -1
  486. package/dist_i18n/yo.d.ts +0 -1
  487. package/dist_i18n/yo.js +0 -94
  488. package/dist_i18n/yo.umd.cjs +0 -1
  489. package/dist_i18n/zh-cn.d.ts +0 -1
  490. package/dist_i18n/zh-cn.js +0 -94
  491. package/dist_i18n/zh-cn.umd.cjs +0 -1
  492. package/dist_i18n/zh-tw.d.ts +0 -1
  493. package/dist_i18n/zh-tw.js +0 -94
  494. package/dist_i18n/zh-tw.umd.cjs +0 -1
@@ -1,3075 +0,0 @@
1
- const $l = "5";
2
- typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add($l);
3
- const kl = 1, Sl = 4, Tl = 8, Nl = 16, Dl = 1, Ll = 2, Mn = "[", Gr = "[!", Zr = "]", pt = {}, oe = Symbol(), Pl = "http://www.w3.org/1999/xhtml", Nr = !1;
4
- function Wr(e) {
5
- throw new Error("https://svelte.dev/e/lifecycle_outside_component");
6
- }
7
- var Jr = Array.isArray, Ol = Array.prototype.indexOf, Fl = Array.from, ln = Object.keys, Vt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, Vl = Object.getOwnPropertyDescriptors, Ml = Object.prototype, ql = Array.prototype, Kr = Object.getPrototypeOf, Dr = Object.isExtensible;
8
- const yt = () => {
9
- };
10
- function Xr(e) {
11
- for (var t = 0; t < e.length; t++)
12
- e[t]();
13
- }
14
- function Ul(e, t, n = !1) {
15
- return e === void 0 ? n ? (
16
- /** @type {() => V} */
17
- t()
18
- ) : (
19
- /** @type {V} */
20
- t
21
- ) : e;
22
- }
23
- const me = 2, zr = 4, dn = 8, qn = 16, Ne = 32, lt = 64, on = 128, ce = 256, an = 512, ae = 1024, Re = 2048, ot = 4096, wt = 8192, vn = 16384, jl = 32768, Un = 65536, Bl = 1 << 19, Qr = 1 << 20, Tn = 1 << 21, Ot = Symbol("$state"), ei = Symbol("legacy props"), Hl = Symbol("");
24
- function Yl(e) {
25
- throw new Error("https://svelte.dev/e/effect_in_teardown");
26
- }
27
- function Gl() {
28
- throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
29
- }
30
- function Zl(e) {
31
- throw new Error("https://svelte.dev/e/effect_orphan");
32
- }
33
- function Wl() {
34
- throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
35
- }
36
- function Jl() {
37
- throw new Error("https://svelte.dev/e/hydration_failed");
38
- }
39
- function Kl(e) {
40
- throw new Error("https://svelte.dev/e/props_invalid_value");
41
- }
42
- function Xl() {
43
- throw new Error("https://svelte.dev/e/state_descriptors_fixed");
44
- }
45
- function zl() {
46
- throw new Error("https://svelte.dev/e/state_prototype_fixed");
47
- }
48
- function Ql() {
49
- throw new Error("https://svelte.dev/e/state_unsafe_mutation");
50
- }
51
- function hn(e) {
52
- console.warn("https://svelte.dev/e/hydration_mismatch");
53
- }
54
- let O = !1;
55
- function bt(e) {
56
- O = e;
57
- }
58
- let P;
59
- function qe(e) {
60
- if (e === null)
61
- throw hn(), pt;
62
- return P = e;
63
- }
64
- function Et() {
65
- return qe(
66
- /** @type {TemplateNode} */
67
- /* @__PURE__ */ Be(P)
68
- );
69
- }
70
- function W(e) {
71
- if (O) {
72
- if (/* @__PURE__ */ Be(P) !== null)
73
- throw hn(), pt;
74
- P = e;
75
- }
76
- }
77
- function eo() {
78
- for (var e = 0, t = P; ; ) {
79
- if (t.nodeType === 8) {
80
- var n = (
81
- /** @type {Comment} */
82
- t.data
83
- );
84
- if (n === Zr) {
85
- if (e === 0) return t;
86
- e -= 1;
87
- } else (n === Mn || n === Gr) && (e += 1);
88
- }
89
- var i = (
90
- /** @type {TemplateNode} */
91
- /* @__PURE__ */ Be(t)
92
- );
93
- t.remove(), t = i;
94
- }
95
- }
96
- let to = !1;
97
- function Ve(e) {
98
- if (typeof e != "object" || e === null || Ot in e)
99
- return e;
100
- const t = Kr(e);
101
- if (t !== Ml && t !== ql)
102
- return e;
103
- var n = /* @__PURE__ */ new Map(), i = Jr(e), a = /* @__PURE__ */ D(0), o = k, s = (f) => {
104
- var c = k;
105
- $e(o);
106
- var d = f();
107
- return $e(c), d;
108
- };
109
- return i && n.set("length", /* @__PURE__ */ D(
110
- /** @type {any[]} */
111
- e.length
112
- )), new Proxy(
113
- /** @type {any} */
114
- e,
115
- {
116
- defineProperty(f, c, d) {
117
- (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && Xl();
118
- var m = n.get(c);
119
- return m === void 0 ? (m = s(() => /* @__PURE__ */ D(d.value)), n.set(c, m)) : p(
120
- m,
121
- s(() => Ve(d.value))
122
- ), !0;
123
- },
124
- deleteProperty(f, c) {
125
- var d = n.get(c);
126
- if (d === void 0)
127
- c in f && (n.set(
128
- c,
129
- s(() => /* @__PURE__ */ D(oe))
130
- ), $n(a));
131
- else {
132
- if (i && typeof c == "string") {
133
- var m = (
134
- /** @type {Source<number>} */
135
- n.get("length")
136
- ), h = Number(c);
137
- Number.isInteger(h) && h < m.v && p(m, h);
138
- }
139
- p(d, oe), $n(a);
140
- }
141
- return !0;
142
- },
143
- get(f, c, d) {
144
- if (c === Ot)
145
- return e;
146
- var m = n.get(c), h = c in f;
147
- if (m === void 0 && (!h || nt(f, c)?.writable) && (m = s(() => /* @__PURE__ */ D(Ve(h ? f[c] : oe))), n.set(c, m)), m !== void 0) {
148
- var b = l(m);
149
- return b === oe ? void 0 : b;
150
- }
151
- return Reflect.get(f, c, d);
152
- },
153
- getOwnPropertyDescriptor(f, c) {
154
- var d = Reflect.getOwnPropertyDescriptor(f, c);
155
- if (d && "value" in d) {
156
- var m = n.get(c);
157
- m && (d.value = l(m));
158
- } else if (d === void 0) {
159
- var h = n.get(c), b = h?.v;
160
- if (h !== void 0 && b !== oe)
161
- return {
162
- enumerable: !0,
163
- configurable: !0,
164
- value: b,
165
- writable: !0
166
- };
167
- }
168
- return d;
169
- },
170
- has(f, c) {
171
- if (c === Ot)
172
- return !0;
173
- var d = n.get(c), m = d !== void 0 && d.v !== oe || Reflect.has(f, c);
174
- if (d !== void 0 || S !== null && (!m || nt(f, c)?.writable)) {
175
- d === void 0 && (d = s(() => /* @__PURE__ */ D(m ? Ve(f[c]) : oe)), n.set(c, d));
176
- var h = l(d);
177
- if (h === oe)
178
- return !1;
179
- }
180
- return m;
181
- },
182
- set(f, c, d, m) {
183
- var h = n.get(c), b = c in f;
184
- if (i && c === "length")
185
- for (var w = d; w < /** @type {Source<number>} */
186
- h.v; w += 1) {
187
- var F = n.get(w + "");
188
- F !== void 0 ? p(F, oe) : w in f && (F = s(() => /* @__PURE__ */ D(oe)), n.set(w + "", F));
189
- }
190
- h === void 0 ? (!b || nt(f, c)?.writable) && (h = s(() => /* @__PURE__ */ D(void 0)), p(
191
- h,
192
- s(() => Ve(d))
193
- ), n.set(c, h)) : (b = h.v !== oe, p(
194
- h,
195
- s(() => Ve(d))
196
- ));
197
- var V = Reflect.getOwnPropertyDescriptor(f, c);
198
- if (V?.set && V.set.call(m, d), !b) {
199
- if (i && typeof c == "string") {
200
- var q = (
201
- /** @type {Source<number>} */
202
- n.get("length")
203
- ), R = Number(c);
204
- Number.isInteger(R) && R >= q.v && p(q, R + 1);
205
- }
206
- $n(a);
207
- }
208
- return !0;
209
- },
210
- ownKeys(f) {
211
- l(a);
212
- var c = Reflect.ownKeys(f).filter((h) => {
213
- var b = n.get(h);
214
- return b === void 0 || b.v !== oe;
215
- });
216
- for (var [d, m] of n)
217
- m.v !== oe && !(d in f) && c.push(d);
218
- return c;
219
- },
220
- setPrototypeOf() {
221
- zl();
222
- }
223
- }
224
- );
225
- }
226
- function $n(e, t = 1) {
227
- p(e, e.v + t);
228
- }
229
- var Lr, ti, ni, ri;
230
- function Nn() {
231
- if (Lr === void 0) {
232
- Lr = window, ti = /Firefox/.test(navigator.userAgent);
233
- var e = Element.prototype, t = Node.prototype, n = Text.prototype;
234
- ni = nt(t, "firstChild").get, ri = nt(t, "nextSibling").get, Dr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Dr(n) && (n.__t = void 0);
235
- }
236
- }
237
- function gn(e = "") {
238
- return document.createTextNode(e);
239
- }
240
- // @__NO_SIDE_EFFECTS__
241
- function he(e) {
242
- return ni.call(e);
243
- }
244
- // @__NO_SIDE_EFFECTS__
245
- function Be(e) {
246
- return ri.call(e);
247
- }
248
- function J(e, t) {
249
- if (!O)
250
- return /* @__PURE__ */ he(e);
251
- var n = (
252
- /** @type {TemplateNode} */
253
- /* @__PURE__ */ he(P)
254
- );
255
- return n === null && (n = P.appendChild(gn())), qe(n), n;
256
- }
257
- function Dt(e, t) {
258
- if (!O) {
259
- var n = (
260
- /** @type {DocumentFragment} */
261
- /* @__PURE__ */ he(
262
- /** @type {Node} */
263
- e
264
- )
265
- );
266
- return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Be(n) : n;
267
- }
268
- return P;
269
- }
270
- function K(e, t = 1, n = !1) {
271
- let i = O ? P : e;
272
- for (var a; t--; )
273
- a = i, i = /** @type {TemplateNode} */
274
- /* @__PURE__ */ Be(i);
275
- if (!O)
276
- return i;
277
- var o = i?.nodeType;
278
- if (n && o !== 3) {
279
- var s = gn();
280
- return i === null ? a?.after(s) : i.before(s), qe(s), s;
281
- }
282
- return qe(i), /** @type {TemplateNode} */
283
- i;
284
- }
285
- function no(e) {
286
- e.textContent = "";
287
- }
288
- function ii(e) {
289
- return e === this.v;
290
- }
291
- function li(e, t) {
292
- return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
293
- }
294
- function jn(e) {
295
- return !li(e, this.v);
296
- }
297
- // @__NO_SIDE_EFFECTS__
298
- function _n(e) {
299
- var t = me | Re, n = k !== null && (k.f & me) !== 0 ? (
300
- /** @type {Derived} */
301
- k
302
- ) : null;
303
- return S === null || n !== null && (n.f & ce) !== 0 ? t |= ce : S.f |= Qr, {
304
- ctx: re,
305
- deps: null,
306
- effects: null,
307
- equals: ii,
308
- f: t,
309
- fn: e,
310
- reactions: null,
311
- rv: 0,
312
- v: (
313
- /** @type {V} */
314
- null
315
- ),
316
- wv: 0,
317
- parent: n ?? S
318
- };
319
- }
320
- // @__NO_SIDE_EFFECTS__
321
- function Lt(e) {
322
- const t = /* @__PURE__ */ _n(e);
323
- return bi(t), t;
324
- }
325
- // @__NO_SIDE_EFFECTS__
326
- function ro(e) {
327
- const t = /* @__PURE__ */ _n(e);
328
- return t.equals = jn, t;
329
- }
330
- function oi(e) {
331
- var t = e.effects;
332
- if (t !== null) {
333
- e.effects = null;
334
- for (var n = 0; n < t.length; n += 1)
335
- Ue(
336
- /** @type {Effect} */
337
- t[n]
338
- );
339
- }
340
- }
341
- function io(e) {
342
- for (var t = e.parent; t !== null; ) {
343
- if ((t.f & me) === 0)
344
- return (
345
- /** @type {Effect} */
346
- t
347
- );
348
- t = t.parent;
349
- }
350
- return null;
351
- }
352
- function ai(e) {
353
- var t, n = S;
354
- je(io(e));
355
- try {
356
- oi(e), t = Ei(e);
357
- } finally {
358
- je(n);
359
- }
360
- return t;
361
- }
362
- function si(e) {
363
- var t = ai(e), n = (Me || (e.f & ce) !== 0) && e.deps !== null ? ot : ae;
364
- be(e, n), e.equals(t) || (e.v = t, e.wv = yi());
365
- }
366
- function lo(e) {
367
- S === null && k === null && Zl(), k !== null && (k.f & ce) !== 0 && S === null && Gl(), jt && Yl();
368
- }
369
- function oo(e, t) {
370
- var n = t.last;
371
- n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
372
- }
373
- function at(e, t, n, i = !0) {
374
- var a = S, o = {
375
- ctx: re,
376
- deps: null,
377
- nodes_start: null,
378
- nodes_end: null,
379
- f: e | Re,
380
- first: null,
381
- fn: t,
382
- last: null,
383
- next: null,
384
- parent: a,
385
- prev: null,
386
- teardown: null,
387
- transitions: null,
388
- wv: 0
389
- };
390
- if (n)
391
- try {
392
- Zn(o), o.f |= jl;
393
- } catch (c) {
394
- throw Ue(o), c;
395
- }
396
- else t !== null && bn(o);
397
- var s = n && o.deps === null && o.first === null && o.nodes_start === null && o.teardown === null && (o.f & (Qr | on)) === 0;
398
- if (!s && i && (a !== null && oo(o, a), k !== null && (k.f & me) !== 0)) {
399
- var f = (
400
- /** @type {Derived} */
401
- k
402
- );
403
- (f.effects ??= []).push(o);
404
- }
405
- return o;
406
- }
407
- function Bn(e) {
408
- const t = at(dn, null, !1);
409
- return be(t, ae), t.teardown = e, t;
410
- }
411
- function Dn(e) {
412
- lo();
413
- var t = S !== null && (S.f & Ne) !== 0 && re !== null && !re.m;
414
- if (t) {
415
- var n = (
416
- /** @type {ComponentContext} */
417
- re
418
- );
419
- (n.e ??= []).push({
420
- fn: e,
421
- effect: S,
422
- reaction: k
423
- });
424
- } else {
425
- var i = Hn(e);
426
- return i;
427
- }
428
- }
429
- function ao(e) {
430
- const t = at(lt, e, !0);
431
- return () => {
432
- Ue(t);
433
- };
434
- }
435
- function so(e) {
436
- const t = at(lt, e, !0);
437
- return (n = {}) => new Promise((i) => {
438
- n.outro ? Pn(t, () => {
439
- Ue(t), i(void 0);
440
- }) : (Ue(t), i(void 0));
441
- });
442
- }
443
- function Hn(e) {
444
- return at(zr, e, !1);
445
- }
446
- function Yn(e) {
447
- return at(dn, e, !0);
448
- }
449
- function Ae(e, t = [], n = _n) {
450
- const i = t.map(n);
451
- return ui(() => e(...i.map(l)));
452
- }
453
- function ui(e, t = 0) {
454
- return at(dn | qn | t, e, !0);
455
- }
456
- function Ln(e, t = !0) {
457
- return at(dn | Ne, e, !0, t);
458
- }
459
- function fi(e) {
460
- var t = e.teardown;
461
- if (t !== null) {
462
- const n = jt, i = k;
463
- Or(!0), $e(null);
464
- try {
465
- t.call(null);
466
- } finally {
467
- Or(n), $e(i);
468
- }
469
- }
470
- }
471
- function ci(e, t = !1) {
472
- var n = e.first;
473
- for (e.first = e.last = null; n !== null; ) {
474
- var i = n.next;
475
- (n.f & lt) !== 0 ? n.parent = null : Ue(n, t), n = i;
476
- }
477
- }
478
- function uo(e) {
479
- for (var t = e.first; t !== null; ) {
480
- var n = t.next;
481
- (t.f & Ne) === 0 && Ue(t), t = n;
482
- }
483
- }
484
- function Ue(e, t = !0) {
485
- var n = !1;
486
- (t || (e.f & Bl) !== 0) && e.nodes_start !== null && (di(
487
- e.nodes_start,
488
- /** @type {TemplateNode} */
489
- e.nodes_end
490
- ), n = !0), ci(e, t && !n), cn(e, 0), be(e, vn);
491
- var i = e.transitions;
492
- if (i !== null)
493
- for (const o of i)
494
- o.stop();
495
- fi(e);
496
- var a = e.parent;
497
- a !== null && a.first !== null && vi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes_start = e.nodes_end = null;
498
- }
499
- function di(e, t) {
500
- for (; e !== null; ) {
501
- var n = e === t ? null : (
502
- /** @type {TemplateNode} */
503
- /* @__PURE__ */ Be(e)
504
- );
505
- e.remove(), e = n;
506
- }
507
- }
508
- function vi(e) {
509
- var t = e.parent, n = e.prev, i = e.next;
510
- n !== null && (n.next = i), i !== null && (i.prev = n), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = n));
511
- }
512
- function Pn(e, t) {
513
- var n = [];
514
- hi(e, n, !0), fo(n, () => {
515
- Ue(e), t && t();
516
- });
517
- }
518
- function fo(e, t) {
519
- var n = e.length;
520
- if (n > 0) {
521
- var i = () => --n || t();
522
- for (var a of e)
523
- a.out(i);
524
- } else
525
- t();
526
- }
527
- function hi(e, t, n) {
528
- if ((e.f & wt) === 0) {
529
- if (e.f ^= wt, e.transitions !== null)
530
- for (const s of e.transitions)
531
- (s.is_global || n) && t.push(s);
532
- for (var i = e.first; i !== null; ) {
533
- var a = i.next, o = (i.f & Un) !== 0 || (i.f & Ne) !== 0;
534
- hi(i, t, o ? n : !1), i = a;
535
- }
536
- }
537
- }
538
- function Pr(e) {
539
- gi(e, !0);
540
- }
541
- function gi(e, t) {
542
- if ((e.f & wt) !== 0) {
543
- e.f ^= wt, (e.f & ae) === 0 && (e.f ^= ae), Bt(e) && (be(e, Re), bn(e));
544
- for (var n = e.first; n !== null; ) {
545
- var i = n.next, a = (n.f & Un) !== 0 || (n.f & Ne) !== 0;
546
- gi(n, a ? t : !1), n = i;
547
- }
548
- if (e.transitions !== null)
549
- for (const o of e.transitions)
550
- (o.is_global || t) && o.in();
551
- }
552
- }
553
- const co = typeof requestIdleCallback > "u" ? (e) => setTimeout(e, 1) : requestIdleCallback;
554
- let Mt = [], qt = [];
555
- function _i() {
556
- var e = Mt;
557
- Mt = [], Xr(e);
558
- }
559
- function mi() {
560
- var e = qt;
561
- qt = [], Xr(e);
562
- }
563
- function Gn(e) {
564
- Mt.length === 0 && queueMicrotask(_i), Mt.push(e);
565
- }
566
- function vo(e) {
567
- qt.length === 0 && co(mi), qt.push(e);
568
- }
569
- function ho() {
570
- Mt.length > 0 && _i(), qt.length > 0 && mi();
571
- }
572
- let tn = !1, sn = !1, un = null, rt = !1, jt = !1;
573
- function Or(e) {
574
- jt = e;
575
- }
576
- let Ft = [];
577
- let k = null, Ie = !1;
578
- function $e(e) {
579
- k = e;
580
- }
581
- let S = null;
582
- function je(e) {
583
- S = e;
584
- }
585
- let Te = null;
586
- function bi(e) {
587
- k !== null && k.f & Tn && (Te === null ? Te = [e] : Te.push(e));
588
- }
589
- let ne = null, fe = 0, ve = null;
590
- function go(e) {
591
- ve = e;
592
- }
593
- let pi = 1, fn = 0, Me = !1;
594
- function yi() {
595
- return ++pi;
596
- }
597
- function Bt(e) {
598
- var t = e.f;
599
- if ((t & Re) !== 0)
600
- return !0;
601
- if ((t & ot) !== 0) {
602
- var n = e.deps, i = (t & ce) !== 0;
603
- if (n !== null) {
604
- var a, o, s = (t & an) !== 0, f = i && S !== null && !Me, c = n.length;
605
- if (s || f) {
606
- var d = (
607
- /** @type {Derived} */
608
- e
609
- ), m = d.parent;
610
- for (a = 0; a < c; a++)
611
- o = n[a], (s || !o?.reactions?.includes(d)) && (o.reactions ??= []).push(d);
612
- s && (d.f ^= an), f && m !== null && (m.f & ce) === 0 && (d.f ^= ce);
613
- }
614
- for (a = 0; a < c; a++)
615
- if (o = n[a], Bt(
616
- /** @type {Derived} */
617
- o
618
- ) && si(
619
- /** @type {Derived} */
620
- o
621
- ), o.wv > e.wv)
622
- return !0;
623
- }
624
- (!i || S !== null && !Me) && be(e, ae);
625
- }
626
- return !1;
627
- }
628
- function _o(e, t) {
629
- for (var n = t; n !== null; ) {
630
- if ((n.f & on) !== 0)
631
- try {
632
- n.fn(e);
633
- return;
634
- } catch {
635
- n.f ^= on;
636
- }
637
- n = n.parent;
638
- }
639
- throw tn = !1, e;
640
- }
641
- function Fr(e) {
642
- return (e.f & vn) === 0 && (e.parent === null || (e.parent.f & on) === 0);
643
- }
644
- function mn(e, t, n, i) {
645
- if (tn) {
646
- if (n === null && (tn = !1), Fr(t))
647
- throw e;
648
- return;
649
- }
650
- if (n !== null && (tn = !0), _o(e, t), Fr(t))
651
- throw e;
652
- }
653
- function wi(e, t, n = !0) {
654
- var i = e.reactions;
655
- if (i !== null)
656
- for (var a = 0; a < i.length; a++) {
657
- var o = i[a];
658
- Te?.includes(e) || ((o.f & me) !== 0 ? wi(
659
- /** @type {Derived} */
660
- o,
661
- t,
662
- !1
663
- ) : t === o && (n ? be(o, Re) : (o.f & ae) !== 0 && be(o, ot), bn(
664
- /** @type {Effect} */
665
- o
666
- )));
667
- }
668
- }
669
- function Ei(e) {
670
- var t = ne, n = fe, i = ve, a = k, o = Me, s = Te, f = re, c = Ie, d = e.f;
671
- ne = /** @type {null | Value[]} */
672
- null, fe = 0, ve = null, Me = (d & ce) !== 0 && (Ie || !rt || k === null), k = (d & (Ne | lt)) === 0 ? e : null, Te = null, Vr(e.ctx), Ie = !1, fn++, e.f |= Tn;
673
- try {
674
- var m = (
675
- /** @type {Function} */
676
- (0, e.fn)()
677
- ), h = e.deps;
678
- if (ne !== null) {
679
- var b;
680
- if (cn(e, fe), h !== null && fe > 0)
681
- for (h.length = fe + ne.length, b = 0; b < ne.length; b++)
682
- h[fe + b] = ne[b];
683
- else
684
- e.deps = h = ne;
685
- if (!Me)
686
- for (b = fe; b < h.length; b++)
687
- (h[b].reactions ??= []).push(e);
688
- } else h !== null && fe < h.length && (cn(e, fe), h.length = fe);
689
- if ($i() && ve !== null && !Ie && h !== null && (e.f & (me | ot | Re)) === 0)
690
- for (b = 0; b < /** @type {Source[]} */
691
- ve.length; b++)
692
- wi(
693
- ve[b],
694
- /** @type {Effect} */
695
- e
696
- );
697
- return a !== null && a !== e && (fn++, ve !== null && (i === null ? i = ve : i.push(.../** @type {Source[]} */
698
- ve))), m;
699
- } finally {
700
- ne = t, fe = n, ve = i, k = a, Me = o, Te = s, Vr(f), Ie = c, e.f ^= Tn;
701
- }
702
- }
703
- function mo(e, t) {
704
- let n = t.reactions;
705
- if (n !== null) {
706
- var i = Ol.call(n, e);
707
- if (i !== -1) {
708
- var a = n.length - 1;
709
- a === 0 ? n = t.reactions = null : (n[i] = n[a], n.pop());
710
- }
711
- }
712
- n === null && (t.f & me) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
713
- // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
714
- // allows us to skip the expensive work of disconnecting and immediately reconnecting it
715
- (ne === null || !ne.includes(t)) && (be(t, ot), (t.f & (ce | an)) === 0 && (t.f ^= an), oi(
716
- /** @type {Derived} **/
717
- t
718
- ), cn(
719
- /** @type {Derived} **/
720
- t,
721
- 0
722
- ));
723
- }
724
- function cn(e, t) {
725
- var n = e.deps;
726
- if (n !== null)
727
- for (var i = t; i < n.length; i++)
728
- mo(e, n[i]);
729
- }
730
- function Zn(e) {
731
- var t = e.f;
732
- if ((t & vn) === 0) {
733
- be(e, ae);
734
- var n = S, i = re, a = rt;
735
- S = e, rt = !0;
736
- try {
737
- (t & qn) !== 0 ? uo(e) : ci(e), fi(e);
738
- var o = Ei(e);
739
- e.teardown = typeof o == "function" ? o : null, e.wv = pi;
740
- var s = e.deps, f;
741
- Nr && to && e.f & Re;
742
- } catch (c) {
743
- mn(c, e, n, i || e.ctx);
744
- } finally {
745
- rt = a, S = n;
746
- }
747
- }
748
- }
749
- function bo() {
750
- try {
751
- Wl();
752
- } catch (e) {
753
- if (un !== null)
754
- mn(e, un, null);
755
- else
756
- throw e;
757
- }
758
- }
759
- function Ci() {
760
- var e = rt;
761
- try {
762
- var t = 0;
763
- for (rt = !0; Ft.length > 0; ) {
764
- t++ > 1e3 && bo();
765
- var n = Ft, i = n.length;
766
- Ft = [];
767
- for (var a = 0; a < i; a++) {
768
- var o = yo(n[a]);
769
- po(o);
770
- }
771
- Ut.clear();
772
- }
773
- } finally {
774
- sn = !1, rt = e, un = null;
775
- }
776
- }
777
- function po(e) {
778
- var t = e.length;
779
- if (t !== 0)
780
- for (var n = 0; n < t; n++) {
781
- var i = e[n];
782
- if ((i.f & (vn | wt)) === 0)
783
- try {
784
- Bt(i) && (Zn(i), i.deps === null && i.first === null && i.nodes_start === null && (i.teardown === null ? vi(i) : i.fn = null));
785
- } catch (a) {
786
- mn(a, i, null, i.ctx);
787
- }
788
- }
789
- }
790
- function bn(e) {
791
- sn || (sn = !0, queueMicrotask(Ci));
792
- for (var t = un = e; t.parent !== null; ) {
793
- t = t.parent;
794
- var n = t.f;
795
- if ((n & (lt | Ne)) !== 0) {
796
- if ((n & ae) === 0) return;
797
- t.f ^= ae;
798
- }
799
- }
800
- Ft.push(t);
801
- }
802
- function yo(e) {
803
- for (var t = [], n = e; n !== null; ) {
804
- var i = n.f, a = (i & (Ne | lt)) !== 0, o = a && (i & ae) !== 0;
805
- if (!o && (i & wt) === 0) {
806
- if ((i & zr) !== 0)
807
- t.push(n);
808
- else if (a)
809
- n.f ^= ae;
810
- else
811
- try {
812
- Bt(n) && Zn(n);
813
- } catch (c) {
814
- mn(c, n, null, n.ctx);
815
- }
816
- var s = n.first;
817
- if (s !== null) {
818
- n = s;
819
- continue;
820
- }
821
- }
822
- var f = n.parent;
823
- for (n = n.next; n === null && f !== null; )
824
- n = f.next, f = f.parent;
825
- }
826
- return t;
827
- }
828
- function E(e) {
829
- for (var t; ; ) {
830
- if (ho(), Ft.length === 0)
831
- return (
832
- /** @type {T} */
833
- t
834
- );
835
- sn = !0, Ci();
836
- }
837
- }
838
- async function kn() {
839
- await Promise.resolve(), E();
840
- }
841
- function l(e) {
842
- var t = e.f, n = (t & me) !== 0;
843
- if (k !== null && !Ie) {
844
- if (!Te?.includes(e)) {
845
- var i = k.deps;
846
- e.rv < fn && (e.rv = fn, ne === null && i !== null && i[fe] === e ? fe++ : ne === null ? ne = [e] : (!Me || !ne.includes(e)) && ne.push(e));
847
- }
848
- } else if (n && /** @type {Derived} */
849
- e.deps === null && /** @type {Derived} */
850
- e.effects === null) {
851
- var a = (
852
- /** @type {Derived} */
853
- e
854
- ), o = a.parent;
855
- o !== null && (o.f & ce) === 0 && (a.f ^= ce);
856
- }
857
- return n && (a = /** @type {Derived} */
858
- e, Bt(a) && si(a)), jt && Ut.has(e) ? Ut.get(e) : e.v;
859
- }
860
- function it(e) {
861
- var t = Ie;
862
- try {
863
- return Ie = !0, e();
864
- } finally {
865
- Ie = t;
866
- }
867
- }
868
- const wo = -7169;
869
- function be(e, t) {
870
- e.f = e.f & wo | t;
871
- }
872
- const Ut = /* @__PURE__ */ new Map();
873
- function Ai(e, t) {
874
- var n = {
875
- f: 0,
876
- // TODO ideally we could skip this altogether, but it causes type errors
877
- v: e,
878
- reactions: null,
879
- equals: ii,
880
- rv: 0,
881
- wv: 0
882
- };
883
- return n;
884
- }
885
- // @__NO_SIDE_EFFECTS__
886
- function D(e, t) {
887
- const n = Ai(e);
888
- return bi(n), n;
889
- }
890
- // @__NO_SIDE_EFFECTS__
891
- function Wn(e, t = !1) {
892
- const n = Ai(e);
893
- return t || (n.equals = jn), n;
894
- }
895
- function p(e, t, n = !1) {
896
- k !== null && !Ie && $i() && (k.f & (me | qn)) !== 0 && !Te?.includes(e) && Ql();
897
- let i = n ? Ve(t) : t;
898
- return Eo(e, i);
899
- }
900
- function Eo(e, t) {
901
- if (!e.equals(t)) {
902
- var n = e.v;
903
- jt ? Ut.set(e, t) : Ut.set(e, n), e.v = t, (e.f & me) !== 0 && ((e.f & Re) !== 0 && ai(
904
- /** @type {Derived} */
905
- e
906
- ), be(e, (e.f & ce) === 0 ? ae : ot)), e.wv = yi(), Ii(e, Re), S !== null && (S.f & ae) !== 0 && (S.f & (Ne | lt)) === 0 && (ve === null ? go([e]) : ve.push(e));
907
- }
908
- return t;
909
- }
910
- function Ii(e, t) {
911
- var n = e.reactions;
912
- if (n !== null)
913
- for (var i = n.length, a = 0; a < i; a++) {
914
- var o = n[a], s = o.f;
915
- (s & Re) === 0 && (be(o, t), (s & (ae | ce)) !== 0 && ((s & me) !== 0 ? Ii(
916
- /** @type {Derived} */
917
- o,
918
- ot
919
- ) : bn(
920
- /** @type {Effect} */
921
- o
922
- )));
923
- }
924
- }
925
- let re = null;
926
- function Vr(e) {
927
- re = e;
928
- }
929
- function xi(e, t = !1, n) {
930
- var i = re = {
931
- p: re,
932
- c: null,
933
- d: !1,
934
- e: null,
935
- m: !1,
936
- s: e,
937
- x: null,
938
- l: null
939
- };
940
- Bn(() => {
941
- i.d = !0;
942
- });
943
- }
944
- function Ri(e) {
945
- const t = re;
946
- if (t !== null) {
947
- e !== void 0 && (t.x = e);
948
- const s = t.e;
949
- if (s !== null) {
950
- var n = S, i = k;
951
- t.e = null;
952
- try {
953
- for (var a = 0; a < s.length; a++) {
954
- var o = s[a];
955
- je(o.effect), $e(o.reaction), Hn(o.fn);
956
- }
957
- } finally {
958
- je(n), $e(i);
959
- }
960
- }
961
- re = t.p, t.m = !0;
962
- }
963
- return e || /** @type {T} */
964
- {};
965
- }
966
- function $i() {
967
- return !0;
968
- }
969
- const Co = ["touchstart", "touchmove"];
970
- function Ao(e) {
971
- return Co.includes(e);
972
- }
973
- function Io(e, t) {
974
- if (t) {
975
- const n = document.body;
976
- e.autofocus = !0, Gn(() => {
977
- document.activeElement === n && e.focus();
978
- });
979
- }
980
- }
981
- let Mr = !1;
982
- function ki() {
983
- Mr || (Mr = !0, document.addEventListener(
984
- "reset",
985
- (e) => {
986
- Promise.resolve().then(() => {
987
- if (!e.defaultPrevented)
988
- for (
989
- const t of
990
- /**@type {HTMLFormElement} */
991
- e.target.elements
992
- )
993
- t.__on_r?.();
994
- });
995
- },
996
- // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
997
- { capture: !0 }
998
- ));
999
- }
1000
- function Si(e) {
1001
- var t = k, n = S;
1002
- $e(null), je(null);
1003
- try {
1004
- return e();
1005
- } finally {
1006
- $e(t), je(n);
1007
- }
1008
- }
1009
- function xo(e, t, n, i = n) {
1010
- e.addEventListener(t, () => Si(n));
1011
- const a = e.__on_r;
1012
- a ? e.__on_r = () => {
1013
- a(), i(!0);
1014
- } : e.__on_r = () => i(!0), ki();
1015
- }
1016
- const Ti = /* @__PURE__ */ new Set(), On = /* @__PURE__ */ new Set();
1017
- function Ro(e, t, n, i = {}) {
1018
- function a(o) {
1019
- if (i.capture || Pt.call(t, o), !o.cancelBubble)
1020
- return Si(() => n?.call(this, o));
1021
- }
1022
- return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Gn(() => {
1023
- t.addEventListener(e, a, i);
1024
- }) : t.addEventListener(e, a, i), a;
1025
- }
1026
- function Fe(e, t, n, i, a) {
1027
- var o = { capture: i, passive: a }, s = Ro(e, t, n, o);
1028
- (t === document.body || t === window || t === document) && Bn(() => {
1029
- t.removeEventListener(e, s, o);
1030
- });
1031
- }
1032
- function $o(e) {
1033
- for (var t = 0; t < e.length; t++)
1034
- Ti.add(e[t]);
1035
- for (var n of On)
1036
- n(e);
1037
- }
1038
- function Pt(e) {
1039
- var t = this, n = (
1040
- /** @type {Node} */
1041
- t.ownerDocument
1042
- ), i = e.type, a = e.composedPath?.() || [], o = (
1043
- /** @type {null | Element} */
1044
- a[0] || e.target
1045
- ), s = 0, f = e.__root;
1046
- if (f) {
1047
- var c = a.indexOf(f);
1048
- if (c !== -1 && (t === document || t === /** @type {any} */
1049
- window)) {
1050
- e.__root = t;
1051
- return;
1052
- }
1053
- var d = a.indexOf(t);
1054
- if (d === -1)
1055
- return;
1056
- c <= d && (s = c);
1057
- }
1058
- if (o = /** @type {Element} */
1059
- a[s] || e.target, o !== t) {
1060
- Vt(e, "currentTarget", {
1061
- configurable: !0,
1062
- get() {
1063
- return o || n;
1064
- }
1065
- });
1066
- var m = k, h = S;
1067
- $e(null), je(null);
1068
- try {
1069
- for (var b, w = []; o !== null; ) {
1070
- var F = o.assignedSlot || o.parentNode || /** @type {any} */
1071
- o.host || null;
1072
- try {
1073
- var V = o["__" + i];
1074
- if (V != null && (!/** @type {any} */
1075
- o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1076
- // -> the target could not have been disabled because it emits the event in the first place
1077
- e.target === o))
1078
- if (Jr(V)) {
1079
- var [q, ...R] = V;
1080
- q.apply(o, [e, ...R]);
1081
- } else
1082
- V.call(o, e);
1083
- } catch (ee) {
1084
- b ? w.push(ee) : b = ee;
1085
- }
1086
- if (e.cancelBubble || F === t || F === null)
1087
- break;
1088
- o = F;
1089
- }
1090
- if (b) {
1091
- for (let ee of w)
1092
- queueMicrotask(() => {
1093
- throw ee;
1094
- });
1095
- throw b;
1096
- }
1097
- } finally {
1098
- e.__root = t, delete e.currentTarget, $e(m), je(h);
1099
- }
1100
- }
1101
- }
1102
- function Jn(e) {
1103
- var t = document.createElement("template");
1104
- return t.innerHTML = e, t.content;
1105
- }
1106
- function xe(e, t) {
1107
- var n = (
1108
- /** @type {Effect} */
1109
- S
1110
- );
1111
- n.nodes_start === null && (n.nodes_start = e, n.nodes_end = t);
1112
- }
1113
- // @__NO_SIDE_EFFECTS__
1114
- function pe(e, t) {
1115
- var n = (t & Dl) !== 0, i = (t & Ll) !== 0, a, o = !e.startsWith("<!>");
1116
- return () => {
1117
- if (O)
1118
- return xe(P, null), P;
1119
- a === void 0 && (a = Jn(o ? e : "<!>" + e), n || (a = /** @type {Node} */
1120
- /* @__PURE__ */ he(a)));
1121
- var s = (
1122
- /** @type {TemplateNode} */
1123
- i || ti ? document.importNode(a, !0) : a.cloneNode(!0)
1124
- );
1125
- if (n) {
1126
- var f = (
1127
- /** @type {TemplateNode} */
1128
- /* @__PURE__ */ he(s)
1129
- ), c = (
1130
- /** @type {TemplateNode} */
1131
- s.lastChild
1132
- );
1133
- xe(f, c);
1134
- } else
1135
- xe(s, s);
1136
- return s;
1137
- };
1138
- }
1139
- // @__NO_SIDE_EFFECTS__
1140
- function pn(e, t, n = "svg") {
1141
- var i = !e.startsWith("<!>"), a = `<${n}>${i ? e : "<!>" + e}</${n}>`, o;
1142
- return () => {
1143
- if (O)
1144
- return xe(P, null), P;
1145
- if (!o) {
1146
- var s = (
1147
- /** @type {DocumentFragment} */
1148
- Jn(a)
1149
- ), f = (
1150
- /** @type {Element} */
1151
- /* @__PURE__ */ he(s)
1152
- );
1153
- o = /** @type {Element} */
1154
- /* @__PURE__ */ he(f);
1155
- }
1156
- var c = (
1157
- /** @type {TemplateNode} */
1158
- o.cloneNode(!0)
1159
- );
1160
- return xe(c, c), c;
1161
- };
1162
- }
1163
- function zt() {
1164
- if (O)
1165
- return xe(P, null), P;
1166
- var e = document.createDocumentFragment(), t = document.createComment(""), n = gn();
1167
- return e.append(t, n), xe(t, n), e;
1168
- }
1169
- function B(e, t) {
1170
- if (O) {
1171
- S.nodes_end = P, Et();
1172
- return;
1173
- }
1174
- e !== null && e.before(
1175
- /** @type {Node} */
1176
- t
1177
- );
1178
- }
1179
- function ko(e, t) {
1180
- var n = t == null ? "" : typeof t == "object" ? t + "" : t;
1181
- n !== (e.__t ??= e.nodeValue) && (e.__t = n, e.nodeValue = n + "");
1182
- }
1183
- function Ni(e, t) {
1184
- return Di(e, t);
1185
- }
1186
- function So(e, t) {
1187
- Nn(), t.intro = t.intro ?? !1;
1188
- const n = t.target, i = O, a = P;
1189
- try {
1190
- for (var o = (
1191
- /** @type {TemplateNode} */
1192
- /* @__PURE__ */ he(n)
1193
- ); o && (o.nodeType !== 8 || /** @type {Comment} */
1194
- o.data !== Mn); )
1195
- o = /** @type {TemplateNode} */
1196
- /* @__PURE__ */ Be(o);
1197
- if (!o)
1198
- throw pt;
1199
- bt(!0), qe(
1200
- /** @type {Comment} */
1201
- o
1202
- ), Et();
1203
- const s = Di(e, { ...t, anchor: o });
1204
- if (P === null || P.nodeType !== 8 || /** @type {Comment} */
1205
- P.data !== Zr)
1206
- throw hn(), pt;
1207
- return bt(!1), /** @type {Exports} */
1208
- s;
1209
- } catch (s) {
1210
- if (s === pt)
1211
- return t.recover === !1 && Jl(), Nn(), no(n), bt(!1), Ni(e, t);
1212
- throw s;
1213
- } finally {
1214
- bt(i), qe(a);
1215
- }
1216
- }
1217
- const _t = /* @__PURE__ */ new Map();
1218
- function Di(e, { target: t, anchor: n, props: i = {}, events: a, context: o, intro: s = !0 }) {
1219
- Nn();
1220
- var f = /* @__PURE__ */ new Set(), c = (h) => {
1221
- for (var b = 0; b < h.length; b++) {
1222
- var w = h[b];
1223
- if (!f.has(w)) {
1224
- f.add(w);
1225
- var F = Ao(w);
1226
- t.addEventListener(w, Pt, { passive: F });
1227
- var V = _t.get(w);
1228
- V === void 0 ? (document.addEventListener(w, Pt, { passive: F }), _t.set(w, 1)) : _t.set(w, V + 1);
1229
- }
1230
- }
1231
- };
1232
- c(Fl(Ti)), On.add(c);
1233
- var d = void 0, m = so(() => {
1234
- var h = n ?? t.appendChild(gn());
1235
- return Ln(() => {
1236
- if (o) {
1237
- xi({});
1238
- var b = (
1239
- /** @type {ComponentContext} */
1240
- re
1241
- );
1242
- b.c = o;
1243
- }
1244
- a && (i.$$events = a), O && xe(
1245
- /** @type {TemplateNode} */
1246
- h,
1247
- null
1248
- ), d = e(h, i) || {}, O && (S.nodes_end = P), o && Ri();
1249
- }), () => {
1250
- for (var b of f) {
1251
- t.removeEventListener(b, Pt);
1252
- var w = (
1253
- /** @type {number} */
1254
- _t.get(b)
1255
- );
1256
- --w === 0 ? (document.removeEventListener(b, Pt), _t.delete(b)) : _t.set(b, w);
1257
- }
1258
- On.delete(c), h !== n && h.parentNode?.removeChild(h);
1259
- };
1260
- });
1261
- return Fn.set(d, m), d;
1262
- }
1263
- let Fn = /* @__PURE__ */ new WeakMap();
1264
- function To(e, t) {
1265
- const n = Fn.get(e);
1266
- return n ? (Fn.delete(e), n(t)) : Promise.resolve();
1267
- }
1268
- function X(e, t, [n, i] = [0, 0]) {
1269
- O && n === 0 && Et();
1270
- var a = e, o = null, s = null, f = oe, c = n > 0 ? Un : 0, d = !1;
1271
- const m = (b, w = !0) => {
1272
- d = !0, h(w, b);
1273
- }, h = (b, w) => {
1274
- if (f === (f = b)) return;
1275
- let F = !1;
1276
- if (O && i !== -1) {
1277
- if (n === 0) {
1278
- const q = (
1279
- /** @type {Comment} */
1280
- a.data
1281
- );
1282
- q === Mn ? i = 0 : q === Gr ? i = 1 / 0 : (i = parseInt(q.substring(1)), i !== i && (i = f ? 1 / 0 : -1));
1283
- }
1284
- const V = i > n;
1285
- !!f === V && (a = eo(), qe(a), bt(!1), F = !0, i = -1);
1286
- }
1287
- f ? (o ? Pr(o) : w && (o = Ln(() => w(a))), s && Pn(s, () => {
1288
- s = null;
1289
- })) : (s ? Pr(s) : w && (s = Ln(() => w(a, [n + 1, i]))), o && Pn(o, () => {
1290
- o = null;
1291
- })), F && bt(!0);
1292
- };
1293
- ui(() => {
1294
- d = !1, t(m), d || h(null, null);
1295
- }, c), O && (a = P);
1296
- }
1297
- function tt(e, t, n = !1, i = !1, a = !1) {
1298
- var o = e, s = "";
1299
- Ae(() => {
1300
- var f = (
1301
- /** @type {Effect} */
1302
- S
1303
- );
1304
- if (s === (s = t() ?? "")) {
1305
- O && Et();
1306
- return;
1307
- }
1308
- if (f.nodes_start !== null && (di(
1309
- f.nodes_start,
1310
- /** @type {TemplateNode} */
1311
- f.nodes_end
1312
- ), f.nodes_start = f.nodes_end = null), s !== "") {
1313
- if (O) {
1314
- P.data;
1315
- for (var c = Et(), d = c; c !== null && (c.nodeType !== 8 || /** @type {Comment} */
1316
- c.data !== ""); )
1317
- d = c, c = /** @type {TemplateNode} */
1318
- /* @__PURE__ */ Be(c);
1319
- if (c === null)
1320
- throw hn(), pt;
1321
- xe(P, d), o = qe(c);
1322
- return;
1323
- }
1324
- var m = s + "";
1325
- n ? m = `<svg>${m}</svg>` : i && (m = `<math>${m}</math>`);
1326
- var h = Jn(m);
1327
- if ((n || i) && (h = /** @type {Element} */
1328
- /* @__PURE__ */ he(h)), xe(
1329
- /** @type {TemplateNode} */
1330
- /* @__PURE__ */ he(h),
1331
- /** @type {TemplateNode} */
1332
- h.lastChild
1333
- ), n || i)
1334
- for (; /* @__PURE__ */ he(h); )
1335
- o.before(
1336
- /** @type {Node} */
1337
- /* @__PURE__ */ he(h)
1338
- );
1339
- else
1340
- o.before(h);
1341
- }
1342
- });
1343
- }
1344
- function No(e, t, n, i, a) {
1345
- O && Et();
1346
- var o = t.$$slots?.[n], s = !1;
1347
- o === !0 && (o = t.children, s = !0), o === void 0 || o(e, s ? () => i : i);
1348
- }
1349
- const qr = [...`
1350
- \r\f \v\uFEFF`];
1351
- function Do(e, t, n) {
1352
- var i = "" + e;
1353
- if (n) {
1354
- for (var a in n)
1355
- if (n[a])
1356
- i = i ? i + " " + a : a;
1357
- else if (i.length)
1358
- for (var o = a.length, s = 0; (s = i.indexOf(a, s)) >= 0; ) {
1359
- var f = s + o;
1360
- (s === 0 || qr.includes(i[s - 1])) && (f === i.length || qr.includes(i[f])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(f + 1) : s = f;
1361
- }
1362
- }
1363
- return i === "" ? null : i;
1364
- }
1365
- function Lo(e, t, n, i, a, o) {
1366
- var s = e.__className;
1367
- if (O || s !== n || s === void 0) {
1368
- var f = Do(n, i, o);
1369
- (!O || f !== e.getAttribute("class")) && (f == null ? e.removeAttribute("class") : e.className = f), e.__className = n;
1370
- } else if (o && a !== o)
1371
- for (var c in o) {
1372
- var d = !!o[c];
1373
- (a == null || d !== !!a[c]) && e.classList.toggle(c, d);
1374
- }
1375
- return o;
1376
- }
1377
- const Po = Symbol("is custom element"), Oo = Symbol("is html");
1378
- function Ur(e) {
1379
- if (O) {
1380
- var t = !1, n = () => {
1381
- if (!t) {
1382
- if (t = !0, e.hasAttribute("value")) {
1383
- var i = e.value;
1384
- $(e, "value", null), e.value = i;
1385
- }
1386
- if (e.hasAttribute("checked")) {
1387
- var a = e.checked;
1388
- $(e, "checked", null), e.checked = a;
1389
- }
1390
- }
1391
- };
1392
- e.__on_r = n, vo(n), ki();
1393
- }
1394
- }
1395
- function Fo(e, t) {
1396
- var n = Li(e);
1397
- n.value === (n.value = // treat null and undefined the same for the initial value
1398
- t ?? void 0) || // @ts-expect-error
1399
- // `progress` elements always need their value set when it's `0`
1400
- e.value === t && (t !== 0 || e.nodeName !== "PROGRESS") || (e.value = t ?? "");
1401
- }
1402
- function $(e, t, n, i) {
1403
- var a = Li(e);
1404
- O && (a[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === "LINK") || a[t] !== (a[t] = n) && (t === "loading" && (e[Hl] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && Vo(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
1405
- }
1406
- function Li(e) {
1407
- return (
1408
- /** @type {Record<string | symbol, unknown>} **/
1409
- // @ts-expect-error
1410
- e.__attributes ??= {
1411
- [Po]: e.nodeName.includes("-"),
1412
- [Oo]: e.namespaceURI === Pl
1413
- }
1414
- );
1415
- }
1416
- var jr = /* @__PURE__ */ new Map();
1417
- function Vo(e) {
1418
- var t = jr.get(e.nodeName);
1419
- if (t) return t;
1420
- jr.set(e.nodeName, t = []);
1421
- for (var n, i = e, a = Element.prototype; a !== i; ) {
1422
- n = Vl(i);
1423
- for (var o in n)
1424
- n[o].set && t.push(o);
1425
- i = Kr(i);
1426
- }
1427
- return t;
1428
- }
1429
- function Mo(e, t, n = t) {
1430
- xo(e, "change", (i) => {
1431
- var a = i ? e.defaultChecked : e.checked;
1432
- n(a);
1433
- }), // If we are hydrating and the value has since changed,
1434
- // then use the update value from the input instead.
1435
- (O && e.defaultChecked !== e.checked || // If defaultChecked is set, then checked == defaultChecked
1436
- it(t) == null) && n(e.checked), Yn(() => {
1437
- var i = t();
1438
- e.checked = !!i;
1439
- });
1440
- }
1441
- function Br(e, t) {
1442
- return e === t || e?.[Ot] === t;
1443
- }
1444
- function Qt(e = {}, t, n, i) {
1445
- return Hn(() => {
1446
- var a, o;
1447
- return Yn(() => {
1448
- a = o, o = [], it(() => {
1449
- e !== n(...o) && (t(e, ...o), a && Br(n(...a), e) && t(null, ...a));
1450
- });
1451
- }), () => {
1452
- Gn(() => {
1453
- o && Br(n(...o), e) && t(null, ...o);
1454
- });
1455
- };
1456
- }), e;
1457
- }
1458
- function Pi(e) {
1459
- re === null && Wr(), Dn(() => {
1460
- const t = it(e);
1461
- if (typeof t == "function") return (
1462
- /** @type {() => void} */
1463
- t
1464
- );
1465
- });
1466
- }
1467
- function qo(e) {
1468
- re === null && Wr(), Pi(() => () => it(e));
1469
- }
1470
- function Oi(e, t, n) {
1471
- if (e == null)
1472
- return t(void 0), yt;
1473
- const i = it(
1474
- () => e.subscribe(
1475
- t,
1476
- // @ts-expect-error
1477
- n
1478
- )
1479
- );
1480
- return i.unsubscribe ? () => i.unsubscribe() : i;
1481
- }
1482
- const mt = [];
1483
- function Uo(e, t = yt) {
1484
- let n = null;
1485
- const i = /* @__PURE__ */ new Set();
1486
- function a(f) {
1487
- if (li(e, f) && (e = f, n)) {
1488
- const c = !mt.length;
1489
- for (const d of i)
1490
- d[1](), mt.push(d, e);
1491
- if (c) {
1492
- for (let d = 0; d < mt.length; d += 2)
1493
- mt[d][0](mt[d + 1]);
1494
- mt.length = 0;
1495
- }
1496
- }
1497
- }
1498
- function o(f) {
1499
- a(f(
1500
- /** @type {T} */
1501
- e
1502
- ));
1503
- }
1504
- function s(f, c = yt) {
1505
- const d = [f, c];
1506
- return i.add(d), i.size === 1 && (n = t(a, o) || yt), f(
1507
- /** @type {T} */
1508
- e
1509
- ), () => {
1510
- i.delete(d), i.size === 0 && n && (n(), n = null);
1511
- };
1512
- }
1513
- return { set: a, update: o, subscribe: s };
1514
- }
1515
- function nn(e) {
1516
- let t;
1517
- return Oi(e, (n) => t = n)(), t;
1518
- }
1519
- let en = !1, Vn = Symbol();
1520
- function jo(e, t, n) {
1521
- const i = n[t] ??= {
1522
- store: null,
1523
- source: /* @__PURE__ */ Wn(void 0),
1524
- unsubscribe: yt
1525
- };
1526
- if (i.store !== e && !(Vn in n))
1527
- if (i.unsubscribe(), i.store = e ?? null, e == null)
1528
- i.source.v = void 0, i.unsubscribe = yt;
1529
- else {
1530
- var a = !0;
1531
- i.unsubscribe = Oi(e, (o) => {
1532
- a ? i.source.v = o : p(i.source, o);
1533
- }), a = !1;
1534
- }
1535
- return e && Vn in n ? nn(e) : l(i.source);
1536
- }
1537
- function Bo() {
1538
- const e = {};
1539
- function t() {
1540
- Bn(() => {
1541
- for (var n in e)
1542
- e[n].unsubscribe();
1543
- Vt(e, Vn, {
1544
- enumerable: !1,
1545
- value: !0
1546
- });
1547
- });
1548
- }
1549
- return [e, t];
1550
- }
1551
- function Ho(e) {
1552
- var t = en;
1553
- try {
1554
- return en = !1, [e(), en];
1555
- } finally {
1556
- en = t;
1557
- }
1558
- }
1559
- function Hr(e) {
1560
- return e.ctx?.d ?? !1;
1561
- }
1562
- function C(e, t, n, i) {
1563
- var a = (n & kl) !== 0, o = !0, s = (n & Tl) !== 0, f = (n & Nl) !== 0, c = !1, d;
1564
- s ? [d, c] = Ho(() => (
1565
- /** @type {V} */
1566
- e[t]
1567
- )) : d = /** @type {V} */
1568
- e[t];
1569
- var m = Ot in e || ei in e, h = s && (nt(e, t)?.set ?? (m && t in e && ((U) => e[t] = U))) || void 0, b = (
1570
- /** @type {V} */
1571
- i
1572
- ), w = !0, F = !1, V = () => (F = !0, w && (w = !1, f ? b = it(
1573
- /** @type {() => V} */
1574
- i
1575
- ) : b = /** @type {V} */
1576
- i), b);
1577
- d === void 0 && i !== void 0 && (h && o && Kl(), d = V(), h && h(d));
1578
- var q;
1579
- if (q = () => {
1580
- var U = (
1581
- /** @type {V} */
1582
- e[t]
1583
- );
1584
- return U === void 0 ? V() : (w = !0, F = !1, U);
1585
- }, (n & Sl) === 0)
1586
- return q;
1587
- if (h) {
1588
- var R = e.$$legacy;
1589
- return function(U, se) {
1590
- return arguments.length > 0 ? ((!se || R || c) && h(se ? q() : U), U) : q();
1591
- };
1592
- }
1593
- var ee = !1, ke = /* @__PURE__ */ Wn(d), z = /* @__PURE__ */ _n(() => {
1594
- var U = q(), se = l(ke);
1595
- return ee ? (ee = !1, se) : ke.v = U;
1596
- });
1597
- return s && l(z), a || (z.equals = jn), function(U, se) {
1598
- if (arguments.length > 0) {
1599
- const He = se ? l(z) : s ? Ve(U) : U;
1600
- if (!z.equals(He)) {
1601
- if (ee = !0, p(ke, He), F && b !== void 0 && (b = He), Hr(z))
1602
- return U;
1603
- it(() => l(z));
1604
- }
1605
- return U;
1606
- }
1607
- return Hr(z) ? z.v : l(z);
1608
- };
1609
- }
1610
- function Yo(e) {
1611
- return new Go(e);
1612
- }
1613
- class Go {
1614
- /** @type {any} */
1615
- #t;
1616
- /** @type {Record<string, any>} */
1617
- #e;
1618
- /**
1619
- * @param {ComponentConstructorOptions & {
1620
- * component: any;
1621
- * }} options
1622
- */
1623
- constructor(t) {
1624
- var n = /* @__PURE__ */ new Map(), i = (o, s) => {
1625
- var f = /* @__PURE__ */ Wn(s);
1626
- return n.set(o, f), f;
1627
- };
1628
- const a = new Proxy(
1629
- { ...t.props || {}, $$events: {} },
1630
- {
1631
- get(o, s) {
1632
- return l(n.get(s) ?? i(s, Reflect.get(o, s)));
1633
- },
1634
- has(o, s) {
1635
- return s === ei ? !0 : (l(n.get(s) ?? i(s, Reflect.get(o, s))), Reflect.has(o, s));
1636
- },
1637
- set(o, s, f) {
1638
- return p(n.get(s) ?? i(s, f), f), Reflect.set(o, s, f);
1639
- }
1640
- }
1641
- );
1642
- this.#e = (t.hydrate ? So : Ni)(t.component, {
1643
- target: t.target,
1644
- anchor: t.anchor,
1645
- props: a,
1646
- context: t.context,
1647
- intro: t.intro ?? !1,
1648
- recover: t.recover
1649
- }), (!t?.props?.$$host || t.sync === !1) && E(), this.#t = a.$$events;
1650
- for (const o of Object.keys(this.#e))
1651
- o === "$set" || o === "$destroy" || o === "$on" || Vt(this, o, {
1652
- get() {
1653
- return this.#e[o];
1654
- },
1655
- /** @param {any} value */
1656
- set(s) {
1657
- this.#e[o] = s;
1658
- },
1659
- enumerable: !0
1660
- });
1661
- this.#e.$set = /** @param {Record<string, any>} next */
1662
- (o) => {
1663
- Object.assign(a, o);
1664
- }, this.#e.$destroy = () => {
1665
- To(this.#e);
1666
- };
1667
- }
1668
- /** @param {Record<string, any>} props */
1669
- $set(t) {
1670
- this.#e.$set(t);
1671
- }
1672
- /**
1673
- * @param {string} event
1674
- * @param {(...args: any[]) => any} callback
1675
- * @returns {any}
1676
- */
1677
- $on(t, n) {
1678
- this.#t[t] = this.#t[t] || [];
1679
- const i = (...a) => n.call(this, ...a);
1680
- return this.#t[t].push(i), () => {
1681
- this.#t[t] = this.#t[t].filter(
1682
- /** @param {any} fn */
1683
- (a) => a !== i
1684
- );
1685
- };
1686
- }
1687
- $destroy() {
1688
- this.#e.$destroy();
1689
- }
1690
- }
1691
- let Fi;
1692
- typeof HTMLElement == "function" && (Fi = class extends HTMLElement {
1693
- /** The Svelte component constructor */
1694
- $$ctor;
1695
- /** Slots */
1696
- $$s;
1697
- /** @type {any} The Svelte component instance */
1698
- $$c;
1699
- /** Whether or not the custom element is connected */
1700
- $$cn = !1;
1701
- /** @type {Record<string, any>} Component props data */
1702
- $$d = {};
1703
- /** `true` if currently in the process of reflecting component props back to attributes */
1704
- $$r = !1;
1705
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
1706
- $$p_d = {};
1707
- /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
1708
- $$l = {};
1709
- /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
1710
- $$l_u = /* @__PURE__ */ new Map();
1711
- /** @type {any} The managed render effect for reflecting attributes */
1712
- $$me;
1713
- /**
1714
- * @param {*} $$componentCtor
1715
- * @param {*} $$slots
1716
- * @param {*} use_shadow_dom
1717
- */
1718
- constructor(e, t, n) {
1719
- super(), this.$$ctor = e, this.$$s = t, n && this.attachShadow({ mode: "open" });
1720
- }
1721
- /**
1722
- * @param {string} type
1723
- * @param {EventListenerOrEventListenerObject} listener
1724
- * @param {boolean | AddEventListenerOptions} [options]
1725
- */
1726
- addEventListener(e, t, n) {
1727
- if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
1728
- const i = this.$$c.$on(e, t);
1729
- this.$$l_u.set(t, i);
1730
- }
1731
- super.addEventListener(e, t, n);
1732
- }
1733
- /**
1734
- * @param {string} type
1735
- * @param {EventListenerOrEventListenerObject} listener
1736
- * @param {boolean | AddEventListenerOptions} [options]
1737
- */
1738
- removeEventListener(e, t, n) {
1739
- if (super.removeEventListener(e, t, n), this.$$c) {
1740
- const i = this.$$l_u.get(t);
1741
- i && (i(), this.$$l_u.delete(t));
1742
- }
1743
- }
1744
- async connectedCallback() {
1745
- if (this.$$cn = !0, !this.$$c) {
1746
- let e = function(i) {
1747
- return (a) => {
1748
- const o = document.createElement("slot");
1749
- i !== "default" && (o.name = i), B(a, o);
1750
- };
1751
- };
1752
- if (await Promise.resolve(), !this.$$cn || this.$$c)
1753
- return;
1754
- const t = {}, n = Zo(this);
1755
- for (const i of this.$$s)
1756
- i in n && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
1757
- for (const i of this.attributes) {
1758
- const a = this.$$g_p(i.name);
1759
- a in this.$$d || (this.$$d[a] = rn(a, i.value, this.$$p_d, "toProp"));
1760
- }
1761
- for (const i in this.$$p_d)
1762
- !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
1763
- this.$$c = Yo({
1764
- component: this.$$ctor,
1765
- target: this.shadowRoot || this,
1766
- props: {
1767
- ...this.$$d,
1768
- $$slots: t,
1769
- $$host: this
1770
- }
1771
- }), this.$$me = ao(() => {
1772
- Yn(() => {
1773
- this.$$r = !0;
1774
- for (const i of ln(this.$$c)) {
1775
- if (!this.$$p_d[i]?.reflect) continue;
1776
- this.$$d[i] = this.$$c[i];
1777
- const a = rn(
1778
- i,
1779
- this.$$d[i],
1780
- this.$$p_d,
1781
- "toAttribute"
1782
- );
1783
- a == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, a);
1784
- }
1785
- this.$$r = !1;
1786
- });
1787
- });
1788
- for (const i in this.$$l)
1789
- for (const a of this.$$l[i]) {
1790
- const o = this.$$c.$on(i, a);
1791
- this.$$l_u.set(a, o);
1792
- }
1793
- this.$$l = {};
1794
- }
1795
- }
1796
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
1797
- // and setting attributes through setAttribute etc, this is helpful
1798
- /**
1799
- * @param {string} attr
1800
- * @param {string} _oldValue
1801
- * @param {string} newValue
1802
- */
1803
- attributeChangedCallback(e, t, n) {
1804
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = rn(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
1805
- }
1806
- disconnectedCallback() {
1807
- this.$$cn = !1, Promise.resolve().then(() => {
1808
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
1809
- });
1810
- }
1811
- /**
1812
- * @param {string} attribute_name
1813
- */
1814
- $$g_p(e) {
1815
- return ln(this.$$p_d).find(
1816
- (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
1817
- ) || e;
1818
- }
1819
- });
1820
- function rn(e, t, n, i) {
1821
- const a = n[e]?.type;
1822
- if (t = a === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !n[e])
1823
- return t;
1824
- if (i === "toAttribute")
1825
- switch (a) {
1826
- case "Object":
1827
- case "Array":
1828
- return t == null ? null : JSON.stringify(t);
1829
- case "Boolean":
1830
- return t ? "" : null;
1831
- case "Number":
1832
- return t ?? null;
1833
- default:
1834
- return t;
1835
- }
1836
- else
1837
- switch (a) {
1838
- case "Object":
1839
- case "Array":
1840
- return t && JSON.parse(t);
1841
- case "Boolean":
1842
- return t;
1843
- // conversion already handled above
1844
- case "Number":
1845
- return t != null ? +t : t;
1846
- default:
1847
- return t;
1848
- }
1849
- }
1850
- function Zo(e) {
1851
- const t = {};
1852
- return e.childNodes.forEach((n) => {
1853
- t[
1854
- /** @type {Element} node */
1855
- n.slot || "default"
1856
- ] = !0;
1857
- }), t;
1858
- }
1859
- function Wo(e, t, n, i, a, o) {
1860
- let s = class extends Fi {
1861
- constructor() {
1862
- super(e, n, a), this.$$p_d = t;
1863
- }
1864
- static get observedAttributes() {
1865
- return ln(t).map(
1866
- (f) => (t[f].attribute || f).toLowerCase()
1867
- );
1868
- }
1869
- };
1870
- return ln(t).forEach((f) => {
1871
- Vt(s.prototype, f, {
1872
- get() {
1873
- return this.$$c && f in this.$$c ? this.$$c[f] : this.$$d[f];
1874
- },
1875
- set(c) {
1876
- c = rn(f, c, t), this.$$d[f] = c;
1877
- var d = this.$$c;
1878
- if (d) {
1879
- var m = nt(d, f)?.get;
1880
- m ? d[f] = c : d.$set({ [f]: c });
1881
- }
1882
- }
1883
- });
1884
- }), i.forEach((f) => {
1885
- Vt(s.prototype, f, {
1886
- get() {
1887
- return this.$$c?.[f];
1888
- }
1889
- });
1890
- }), e.element = /** @type {any} */
1891
- s, s;
1892
- }
1893
- const Vi = new TextEncoder();
1894
- function Jo(e) {
1895
- return [...new Uint8Array(e)].map((t) => t.toString(16).padStart(2, "0")).join("");
1896
- }
1897
- async function Ko(e, t = "SHA-256", n = 1e5) {
1898
- const i = Date.now().toString(16);
1899
- e || (e = Math.round(Math.random() * n));
1900
- const a = await Mi(i, e, t);
1901
- return {
1902
- algorithm: t,
1903
- challenge: a,
1904
- salt: i,
1905
- signature: ""
1906
- };
1907
- }
1908
- async function Mi(e, t, n) {
1909
- if (typeof crypto > "u" || !("subtle" in crypto) || !("digest" in crypto.subtle))
1910
- throw new Error("Web Crypto is not available. Secure context is required (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");
1911
- return Jo(
1912
- await crypto.subtle.digest(
1913
- n.toUpperCase(),
1914
- Vi.encode(e + t)
1915
- )
1916
- );
1917
- }
1918
- function Xo(e, t, n = "SHA-256", i = 1e6, a = 0) {
1919
- const o = new AbortController(), s = Date.now();
1920
- return {
1921
- promise: (async () => {
1922
- for (let c = a; c <= i; c += 1) {
1923
- if (o.signal.aborted)
1924
- return null;
1925
- if (await Mi(t, c, n) === e)
1926
- return {
1927
- number: c,
1928
- took: Date.now() - s
1929
- };
1930
- }
1931
- return null;
1932
- })(),
1933
- controller: o
1934
- };
1935
- }
1936
- function Yr() {
1937
- try {
1938
- return Intl.DateTimeFormat().resolvedOptions().timeZone;
1939
- } catch {
1940
- }
1941
- }
1942
- function zo(e) {
1943
- const t = atob(e), n = new Uint8Array(t.length);
1944
- for (let i = 0; i < t.length; i++)
1945
- n[i] = t.charCodeAt(i);
1946
- return n;
1947
- }
1948
- function Qo(e, t = 12) {
1949
- const n = new Uint8Array(t);
1950
- for (let i = 0; i < t; i++)
1951
- n[i] = e % 256, e = Math.floor(e / 256);
1952
- return n;
1953
- }
1954
- async function ea(e, t = "", n = 1e6, i = 0) {
1955
- const a = "AES-GCM", o = new AbortController(), s = Date.now(), f = async () => {
1956
- for (let m = i; m <= n; m += 1) {
1957
- if (o.signal.aborted || !c || !d)
1958
- return null;
1959
- try {
1960
- const h = await crypto.subtle.decrypt(
1961
- {
1962
- name: a,
1963
- iv: Qo(m)
1964
- },
1965
- c,
1966
- d
1967
- );
1968
- if (h)
1969
- return {
1970
- clearText: new TextDecoder().decode(h),
1971
- took: Date.now() - s
1972
- };
1973
- } catch {
1974
- }
1975
- }
1976
- return null;
1977
- };
1978
- let c = null, d = null;
1979
- try {
1980
- d = zo(e);
1981
- const m = await crypto.subtle.digest(
1982
- "SHA-256",
1983
- Vi.encode(t)
1984
- );
1985
- c = await crypto.subtle.importKey(
1986
- "raw",
1987
- m,
1988
- a,
1989
- !1,
1990
- ["decrypt"]
1991
- );
1992
- } catch {
1993
- return {
1994
- promise: Promise.reject(),
1995
- controller: o
1996
- };
1997
- }
1998
- return {
1999
- promise: f(),
2000
- controller: o
2001
- };
2002
- }
2003
- var y = /* @__PURE__ */ ((e) => (e.CODE = "code", e.ERROR = "error", e.VERIFIED = "verified", e.VERIFYING = "verifying", e.UNVERIFIED = "unverified", e.EXPIRED = "expired", e))(y || {}), Q = /* @__PURE__ */ ((e) => (e.ERROR = "error", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.READY = "ready", e))(Q || {});
2004
- globalThis.altchaPlugins = globalThis.altchaPlugins || [];
2005
- globalThis.altchaI18n = globalThis.altchaI18n || {
2006
- get: (e) => nn(globalThis.altchaI18n.store)[e],
2007
- set: (e, t) => {
2008
- Object.assign(nn(globalThis.altchaI18n.store), {
2009
- [e]: t
2010
- }), globalThis.altchaI18n.store.set(nn(globalThis.altchaI18n.store));
2011
- },
2012
- store: Uo({})
2013
- };
2014
- const ta = {
2015
- ariaLinkLabel: "Visit Altcha.org",
2016
- enterCode: "Enter code",
2017
- enterCodeAria: "Enter code you hear. Press Space to play audio.",
2018
- error: "Verification failed. Try again later.",
2019
- expired: "Verification expired. Try again.",
2020
- footer: 'Protected by <a href="https://altcha.org/" target="_blank" aria-label="Visit Altcha.org">ALTCHA</a>',
2021
- getAudioChallenge: "Get an audio challenge",
2022
- label: "I'm not a robot",
2023
- loading: "Loading...",
2024
- reload: "Reload",
2025
- verify: "Verify",
2026
- verificationRequired: "Verification required!",
2027
- verified: "Verified",
2028
- verifying: "Verifying...",
2029
- waitAlert: "Verifying... please wait."
2030
- };
2031
- globalThis.altchaI18n.set("en", ta);
2032
- const Sn = (e, t) => {
2033
- let n = /* @__PURE__ */ ro(() => Ul(t?.(), 24));
2034
- var i = la();
2035
- Ae(() => {
2036
- $(i, "width", l(n)), $(i, "height", l(n));
2037
- }), B(e, i);
2038
- };
2039
- function na(e, t) {
2040
- e.code === "Space" && (e.preventDefault(), e.stopImmediatePropagation(), t());
2041
- }
2042
- function ra(e, t) {
2043
- e.preventDefault(), t();
2044
- }
2045
- function ia(e, t, n, i, a, o, s, f) {
2046
- [
2047
- y.UNVERIFIED,
2048
- y.ERROR,
2049
- y.EXPIRED,
2050
- y.CODE
2051
- ].includes(l(t)) ? n() !== !1 && l(i)?.reportValidity() === !1 ? p(a, !1) : o() ? s() : f() : p(a, !0);
2052
- }
2053
- var la = /* @__PURE__ */ pn('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="altcha-spinner"><path 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" fill="currentColor" opacity=".25"></path><path 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" fill="currentColor"></path></svg>'), oa = /* @__PURE__ */ pe('<input type="hidden">'), aa = /* @__PURE__ */ pe('<div><a target="_blank" class="altcha-logo" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path 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" fill="currentColor"></path><path 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" fill="currentColor"></path><path 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" fill="currentColor"></path></svg></a></div>'), sa = /* @__PURE__ */ pn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12.8659 3.00017L22.3922 19.5002C22.6684 19.9785 22.5045 20.5901 22.0262 20.8662C21.8742 20.954 21.7017 21.0002 21.5262 21.0002H2.47363C1.92135 21.0002 1.47363 20.5525 1.47363 20.0002C1.47363 19.8246 1.51984 19.6522 1.60761 19.5002L11.1339 3.00017C11.41 2.52187 12.0216 2.358 12.4999 2.63414C12.6519 2.72191 12.7782 2.84815 12.8659 3.00017ZM10.9999 16.0002V18.0002H12.9999V16.0002H10.9999ZM10.9999 9.00017V14.0002H12.9999V9.00017H10.9999Z"></path></svg>'), ua = /* @__PURE__ */ pn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15 7C15 6.44772 15.4477 6 16 6C16.5523 6 17 6.44772 17 7V17C17 17.5523 16.5523 18 16 18C15.4477 18 15 17.5523 15 17V7ZM7 7C7 6.44772 7.44772 6 8 6C8.55228 6 9 6.44772 9 7V17C9 17.5523 8.55228 18 8 18C7.44772 18 7 17.5523 7 17V7Z"></path></svg>'), fa = /* @__PURE__ */ pn('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M4 12H7C8.10457 12 9 12.8954 9 14V19C9 20.1046 8.10457 21 7 21H4C2.89543 21 2 20.1046 2 19V12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12V19C22 20.1046 21.1046 21 20 21H17C15.8954 21 15 20.1046 15 19V14C15 12.8954 15.8954 12 17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12Z"></path></svg>'), ca = /* @__PURE__ */ pe('<button type="button" class="altcha-code-challenge-audio"><!></button>'), da = /* @__PURE__ */ pe("<audio hidden autoplay><source></audio>"), va = /* @__PURE__ */ pe('<div class="altcha-code-challenge" role="dialog"><div class="altcha-code-challenge-arrow"></div> <form data-code-challenge-form="1"><img class="altcha-code-challenge-image" alt=""> <input type="text" autocomplete="off" name="code" class="altcha-code-challenge-input" required> <div class="altcha-code-challenge-buttons"><div class="altcha-code-challenge-buttons-left"><!> <button type="button" class="altcha-code-challenge-reload"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2V4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 9.25022 5.38734 6.82447 7.50024 5.38451L7.5 8H9.5V2L3.5 2V4L5.99918 3.99989C3.57075 5.82434 2 8.72873 2 12Z"></path></svg></button></div> <button type="submit" class="altcha-code-challenge-verify"><!> </button></div> <!></form></div>'), ha = /* @__PURE__ */ pe("<div><!></div>"), ga = /* @__PURE__ */ pe("<div><!></div>"), _a = /* @__PURE__ */ pe('<div class="altcha-error"><svg width="14" height="14" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg> <!></div>'), ma = /* @__PURE__ */ pe('<div class="altcha-footer"><div><!></div></div>'), ba = /* @__PURE__ */ pe('<div class="altcha-anchor-arrow"></div>'), pa = /* @__PURE__ */ pe('<!> <div class="altcha"><div class="altcha-main"><div><!> <input type="checkbox"></div> <label class="altcha-label"><!></label> <!> <!> <!></div> <!> <!> <!></div>', 1);
2054
- function ya(e, t) {
2055
- xi(t, !0);
2056
- const [n, i] = Bo(), a = () => jo(Ui, "$altchaI18nStore", n);
2057
- let o = C(t, "auto", 7, void 0), s = C(t, "blockspam", 7, void 0), f = C(t, "challengeurl", 7, void 0), c = C(t, "challengejson", 7, void 0), d = C(t, "credentials", 7, void 0), m = C(t, "customfetch", 7, void 0), h = C(t, "debug", 7, !1), b = C(t, "delay", 7, 0), w = C(t, "disableautofocus", 7, !1), F = C(t, "refetchonexpire", 7, !0), V = C(t, "disablerefetchonexpire", 23, () => !F()), q = C(t, "expire", 7, void 0), R = C(t, "floating", 7, void 0), ee = C(t, "floatinganchor", 7, void 0), ke = C(t, "floatingoffset", 7, void 0), z = C(t, "floatingpersist", 7, !1), U = C(t, "hidefooter", 7, !1), se = C(t, "hidelogo", 7, !1), He = C(t, "id", 7, void 0), Ht = C(t, "language", 7, void 0), Ye = C(t, "name", 7, "altcha"), Ge = C(t, "maxnumber", 7, 1e6), Ct = C(t, "mockerror", 7, !1), De = C(t, "obfuscated", 7, void 0), ge = C(t, "overlay", 7, void 0), At = C(t, "overlaycontent", 7, void 0), Yt = C(t, "plugins", 7, void 0), Ze = C(t, "sentinel", 7, void 0), ye = C(t, "spamfilter", 7, !1), st = C(t, "strings", 7, void 0), de = C(t, "test", 7, !1), te = C(t, "verifyurl", 7, void 0), ut = C(t, "workers", 23, () => Math.min(16, navigator.hardwareConcurrency || 8)), It = C(t, "workerurl", 7, void 0);
2058
- const { altchaI18n: qi } = globalThis, Ui = qi.store, Kn = ["SHA-256", "SHA-384", "SHA-512"], ji = "https://altcha.org/", Le = (r, u) => {
2059
- t.$$host.dispatchEvent(new CustomEvent(r, { detail: u }));
2060
- }, Xn = document.documentElement.lang?.split("-")?.[0], yn = /* @__PURE__ */ Lt(() => f() && new URL(f(), location.origin).host.endsWith(".altcha.org") && !!f()?.includes("apiKey=ckey_")), Gt = /* @__PURE__ */ Lt(() => c() ? cr(c()) : void 0), Bi = /* @__PURE__ */ Lt(() => st() ? cr(st()) : {}), L = /* @__PURE__ */ Lt(() => ({
2061
- ...er(a()),
2062
- ...l(Bi)
2063
- })), zn = /* @__PURE__ */ Lt(() => `${He() || Ye()}_checkbox_${Math.round(Math.random() * 1e8)}`);
2064
- let We = /* @__PURE__ */ D(null), xt = /* @__PURE__ */ D(!1), Y = /* @__PURE__ */ D(null), I = /* @__PURE__ */ D(Ve(y.UNVERIFIED)), M = /* @__PURE__ */ D(void 0), Rt = /* @__PURE__ */ D(null), Pe = /* @__PURE__ */ D(null), ue = /* @__PURE__ */ D(null), wn = /* @__PURE__ */ D(null), ft = /* @__PURE__ */ D(null), T = /* @__PURE__ */ D(null), $t = /* @__PURE__ */ D(null), Je = /* @__PURE__ */ D(null), we = null, G = /* @__PURE__ */ D(null), Ke = /* @__PURE__ */ D(!1), Oe = [], En = /* @__PURE__ */ D(!1), Ee = /* @__PURE__ */ D(null);
2065
- Dn(() => {
2066
- nl(l(Je));
2067
- }), Dn(() => {
2068
- rl(l(I));
2069
- }), qo(() => {
2070
- Hi(), p($t, null), l(T) && (l(T).removeEventListener("submit", or), l(T).removeEventListener("reset", ar), l(T).removeEventListener("focusin", lr), p(T, null)), we && (clearTimeout(we), we = null), document.removeEventListener("click", rr), document.removeEventListener("scroll", ir), window.removeEventListener("resize", fr);
2071
- }), Pi(() => {
2072
- x("mounted", "2.2.4"), x("workers", ut()), Wi(), x("plugins", Oe.length ? Oe.map((r) => r.constructor.pluginName).join(", ") : "none"), de() && x("using test mode"), q() && An(q()), o() !== void 0 && x("auto", o()), R() !== void 0 && gr(R()), p(T, l(M)?.closest("form"), !0), l(T) && (l(T).addEventListener("submit", or, { capture: !0 }), l(T).addEventListener("reset", ar), (o() === "onfocus" || z() === "focus") && l(T).addEventListener("focusin", lr)), ge() && _r(!0), o() === "onload" && (De() ? kt() : Se()), l(yn) && (U() || se()) && x("Attributes hidefooter and hidelogo ignored because usage with free API Keys requires attribution."), requestAnimationFrame(() => {
2073
- Le("load");
2074
- });
2075
- });
2076
- function Zt(r, u) {
2077
- return btoa(JSON.stringify({
2078
- algorithm: r.algorithm,
2079
- challenge: r.challenge,
2080
- number: u.number,
2081
- salt: r.salt,
2082
- signature: r.signature,
2083
- test: de() ? !0 : void 0,
2084
- took: u.took
2085
- }));
2086
- }
2087
- function Hi() {
2088
- for (const r of Oe)
2089
- r.destroy();
2090
- }
2091
- function Qn() {
2092
- f() && !V() && l(I) === y.VERIFIED ? Se() : Xe(y.EXPIRED, l(L).expired);
2093
- }
2094
- async function Yi() {
2095
- if (Ct())
2096
- throw x("mocking error"), new Error("Mocked error.");
2097
- if (l(Gt))
2098
- return x("using provided json data"), dr(l(Gt).salt), l(Gt);
2099
- if (de())
2100
- return x("generating test challenge", { test: de() }), Ko(typeof de() != "boolean" ? +de() : void 0);
2101
- {
2102
- if (!f() && l(T)) {
2103
- const g = l(T).getAttribute("action");
2104
- g?.includes("/form/") && f(g + "/altcha");
2105
- }
2106
- if (!f())
2107
- throw new Error("Attribute challengeurl not set.");
2108
- x("fetching challenge from", f());
2109
- const r = {
2110
- credentials: typeof d() == "boolean" ? "include" : d(),
2111
- headers: ye() !== !1 ? { "x-altcha-spam-filter": "1" } : {}
2112
- }, u = await Cn()(f(), r);
2113
- if (!u || !(u instanceof Response))
2114
- throw new Error("Custom fetch function did not return a response.");
2115
- if (u.status !== 200)
2116
- throw new Error(`Server responded with ${u.status}.`);
2117
- const v = u.headers.get("X-Altcha-Config"), _ = await u.json();
2118
- if (dr(_.salt), v)
2119
- try {
2120
- const g = JSON.parse(v);
2121
- g && typeof g == "object" && (g.verifyurl && !g.verifyurl.startsWith("fn:") && (g.verifyurl = nr(g.verifyurl)), pr(g));
2122
- } catch (g) {
2123
- x("unable to configure from X-Altcha-Config", g);
2124
- }
2125
- return _;
2126
- }
2127
- }
2128
- function Gi(r) {
2129
- const u = l(T)?.querySelector(typeof r == "string" ? `input[name="${r}"]` : 'input[type="email"]:not([data-no-spamfilter])');
2130
- return u?.value?.slice(u.value.indexOf("@")) || void 0;
2131
- }
2132
- function Cn() {
2133
- let r = fetch;
2134
- if (m())
2135
- if (x("using customfetch"), typeof m() == "string") {
2136
- if (r = globalThis[m()] || null, !r)
2137
- throw new Error(`Custom fetch function not found: ${m()}`);
2138
- } else
2139
- r = m();
2140
- return r;
2141
- }
2142
- function er(r, u = [
2143
- Ht() || "",
2144
- document.documentElement.lang || "",
2145
- ...navigator.languages
2146
- ]) {
2147
- const v = Object.keys(r).map((g) => g.toLowerCase()), _ = u.reduce(
2148
- (g, A) => (A = A.toLowerCase(), g || (r[A] ? A : null) || v.find((N) => A.split("-")[0] === N.split("-")[0]) || null),
2149
- null
2150
- );
2151
- return r[_ || "en"];
2152
- }
2153
- function Zi() {
2154
- return ye() === "ipAddress" ? {
2155
- blockedCountries: void 0,
2156
- classifier: void 0,
2157
- disableRules: void 0,
2158
- email: !1,
2159
- expectedCountries: void 0,
2160
- expectedLanguages: void 0,
2161
- fields: !1,
2162
- ipAddress: void 0,
2163
- text: void 0,
2164
- timeZone: void 0
2165
- } : typeof ye() == "object" ? ye() : {
2166
- blockedCountries: void 0,
2167
- classifier: void 0,
2168
- disableRules: void 0,
2169
- email: void 0,
2170
- expectedCountries: void 0,
2171
- expectedLanguages: void 0,
2172
- fields: void 0,
2173
- ipAddress: void 0,
2174
- text: void 0,
2175
- timeZone: void 0
2176
- };
2177
- }
2178
- function tr(r) {
2179
- return [
2180
- ...l(T)?.querySelectorAll(r?.length ? r.map((v) => `input[name="${v}"]`).join(", ") : 'input[type="text"]:not([data-no-spamfilter]), textarea:not([data-no-spamfilter])') || []
2181
- ].reduce(
2182
- (v, _) => {
2183
- const g = _.name, A = _.value;
2184
- return g && A && (v[g] = /\n/.test(A) ? A.replace(new RegExp("(?<!\\r)\\n", "g"), `\r
2185
- `) : A), v;
2186
- },
2187
- {}
2188
- );
2189
- }
2190
- function nr(r, u) {
2191
- const v = new URL(f() || location.origin), _ = new URL(r, v);
2192
- if (_.search || (_.search = v.search), u)
2193
- for (const g in u)
2194
- u[g] !== void 0 && u[g] !== null && _.searchParams.set(g, u[g]);
2195
- return _.toString();
2196
- }
2197
- function Wi() {
2198
- const r = Yt() !== void 0 ? Yt().split(",") : void 0;
2199
- for (const u of globalThis.altchaPlugins)
2200
- (!r || r.includes(u.pluginName)) && Oe.push(new u({
2201
- el: l(M),
2202
- clarify: kt,
2203
- dispatch: Le,
2204
- getConfiguration: yr,
2205
- getFloatingAnchor: wr,
2206
- getState: Er,
2207
- log: x,
2208
- reset: Xe,
2209
- solve: br,
2210
- setState: Ce,
2211
- setFloatingAnchor: Cr,
2212
- verify: Se
2213
- }));
2214
- }
2215
- function x(...r) {
2216
- (h() || r.some((u) => u instanceof Error)) && console[r[0] instanceof Error ? "error" : "log"]("ALTCHA", `[name=${Ye()}]`, ...r);
2217
- }
2218
- function Ji() {
2219
- p(G, Q.PAUSED, !0);
2220
- }
2221
- function Ki(r) {
2222
- p(G, Q.ERROR, !0);
2223
- }
2224
- function Xi() {
2225
- p(G, Q.READY, !0);
2226
- }
2227
- function zi() {
2228
- p(G, Q.LOADING, !0);
2229
- }
2230
- function Qi() {
2231
- p(G, Q.PLAYING, !0);
2232
- }
2233
- function el() {
2234
- p(G, Q.PAUSED, !0);
2235
- }
2236
- function tl(r) {
2237
- if (r.preventDefault(), r.stopPropagation(), l(Y)) {
2238
- const u = new FormData(r.target), v = String(u.get("code"));
2239
- if (te()?.startsWith("fn:")) {
2240
- const _ = te().replace(/^fn:/, "");
2241
- if (x(`calling ${_} function instead of verifyurl`), !(_ in globalThis))
2242
- throw new Error(`Global function "${_}" is undefined.`);
2243
- return globalThis[_]({
2244
- challenge: l(Y).challenge,
2245
- code: v,
2246
- solution: l(Y).solution
2247
- });
2248
- }
2249
- p(Ke, !0), vr(Zt(l(Y).challenge, l(Y).solution), v).then(({ reason: _, verified: g }) => {
2250
- g ? (p(Y, null), Ce(y.VERIFIED), x("verified"), kn().then(() => {
2251
- l(wn)?.focus(), Le("verified", { payload: l(Ee) }), o() === "onsubmit" ? hr(l($t)) : ge() && St();
2252
- })) : (Xe(), p(Je, _ || "Verification failed", !0));
2253
- }).catch((_) => {
2254
- p(Y, null), Ce(y.ERROR, _), x("sentinel verification failed:", _);
2255
- }).finally(() => {
2256
- p(Ke, !1);
2257
- });
2258
- }
2259
- }
2260
- function rr(r) {
2261
- const u = r.target;
2262
- R() && u && !l(M).contains(u) && (l(I) === y.VERIFIED && z() === !1 || l(I) === y.VERIFIED && z() === "focus" && !l(T)?.matches(":focus-within") || o() === "off" && l(I) === y.UNVERIFIED) && St();
2263
- }
2264
- function ir() {
2265
- R() && l(I) !== y.UNVERIFIED && Tt();
2266
- }
2267
- function nl(r) {
2268
- for (const u of Oe)
2269
- typeof u.onErrorChange == "function" && u.onErrorChange(l(Je));
2270
- }
2271
- function lr(r) {
2272
- l(I) === y.UNVERIFIED ? Se() : R() && z() === "focus" && l(I) === y.VERIFIED && Wt();
2273
- }
2274
- function or(r) {
2275
- r.target?.hasAttribute("data-code-challenge-form") || (p($t, r.submitter, !0), l(T) && o() === "onsubmit" ? (l($t)?.blur(), l(I) === y.UNVERIFIED ? (r.preventDefault(), r.stopPropagation(), Se().then(() => {
2276
- hr(l($t));
2277
- })) : l(I) !== y.VERIFIED && (r.preventDefault(), r.stopPropagation(), l(I) === y.VERIFYING && sr())) : l(T) && R() && o() === "off" && l(I) === y.UNVERIFIED && (r.preventDefault(), r.stopPropagation(), Wt()));
2278
- }
2279
- function ar() {
2280
- Xe();
2281
- }
2282
- function sr() {
2283
- l(I) === y.VERIFYING && l(L).waitAlert && alert(l(L).waitAlert);
2284
- }
2285
- function ur() {
2286
- l(Pe) ? l(Pe).paused ? (l(Pe).currentTime = 0, l(Pe).play()) : l(Pe).pause() : (p(En, !0), requestAnimationFrame(() => {
2287
- l(Pe)?.play();
2288
- }));
2289
- }
2290
- function rl(r) {
2291
- for (const u of Oe)
2292
- typeof u.onStateChange == "function" && u.onStateChange(l(I));
2293
- R() && l(I) !== y.UNVERIFIED && requestAnimationFrame(() => {
2294
- Tt();
2295
- }), p(xt, l(I) === y.VERIFIED), ge() && l(ue) && (l(I) !== y.UNVERIFIED ? Wt() : St());
2296
- }
2297
- function fr() {
2298
- R() && Tt();
2299
- }
2300
- function cr(r) {
2301
- return JSON.parse(r);
2302
- }
2303
- function dr(r) {
2304
- const u = new URLSearchParams(r.split("?")?.[1]), v = u.get("expires") || u.get("expire");
2305
- if (v) {
2306
- const _ = new Date(+v * 1e3), g = isNaN(_.getTime()) ? 0 : _.getTime() - Date.now();
2307
- g > 0 && An(g);
2308
- } else we && (clearTimeout(we), we = null);
2309
- }
2310
- async function il(r) {
2311
- if (!te())
2312
- throw new Error("Attribute verifyurl not set.");
2313
- x("requesting server verification from", te());
2314
- const u = { payload: r };
2315
- if (ye() !== !1) {
2316
- const {
2317
- blockedCountries: g,
2318
- classifier: A,
2319
- disableRules: N,
2320
- email: H,
2321
- expectedLanguages: j,
2322
- expectedCountries: ie,
2323
- fields: le,
2324
- ipAddress: Qe,
2325
- text: dt,
2326
- timeZone: et
2327
- } = Zi();
2328
- u.blockedCountries = g, u.classifier = A, u.disableRules = N, u.email = H === !1 ? void 0 : Gi(H), u.expectedCountries = ie, u.expectedLanguages = j || (Xn ? [Xn] : void 0), u.fields = le === !1 ? void 0 : tr(le), u.ipAddress = Qe === !1 ? void 0 : Qe || "auto", u.text = dt, u.timeZone = et === !1 ? void 0 : et || Yr();
2329
- }
2330
- const v = await Cn()(te(), {
2331
- body: JSON.stringify(u),
2332
- headers: { "content-type": "application/json" },
2333
- method: "POST"
2334
- });
2335
- if (!v || !(v instanceof Response))
2336
- throw new Error("Custom fetch function did not return a response.");
2337
- if (v.status !== 200)
2338
- throw new Error(`Server responded with ${v.status}.`);
2339
- const _ = await v.json();
2340
- if (_?.payload && p(Ee, _.payload, !0), Le("serververification", _), s() && _.classification === "BAD")
2341
- throw new Error("SpamFilter returned negative classification.");
2342
- }
2343
- async function vr(r, u) {
2344
- if (!te())
2345
- throw new Error("Attribute verifyurl not set.");
2346
- x("requesting sentinel verification from", te());
2347
- const v = { code: u, payload: r };
2348
- Ze() && (v.fields = Ze().fields ? tr() : void 0, v.timeZone = Ze().timeZone ? Yr() : void 0);
2349
- const _ = await Cn()(te(), {
2350
- body: JSON.stringify(v),
2351
- headers: { "content-type": "application/json" },
2352
- method: "POST"
2353
- });
2354
- if (!_ || !(_ instanceof Response))
2355
- throw new Error("Fetch function did not return a response.");
2356
- if (_.status !== 200)
2357
- throw new Error(`Server responded with ${_.status}.`);
2358
- const g = await _.json();
2359
- return g?.payload && p(Ee, g.payload, !0), Le("sentinelverification", g), g;
2360
- }
2361
- function hr(r) {
2362
- l(T) && "requestSubmit" in l(T) ? l(T).requestSubmit(r) : l(T)?.reportValidity() && (r ? r.click() : l(T).submit());
2363
- }
2364
- function An(r) {
2365
- x("expire", r), we && (clearTimeout(we), we = null), r < 1 ? Qn() : we = setTimeout(Qn, r);
2366
- }
2367
- function gr(r) {
2368
- x("floating", r), R() !== r && (l(M).style.left = "", l(M).style.top = ""), R(r === !0 || r === "" ? "auto" : r === !1 || r === "false" ? void 0 : R()), R() ? (o() || o("onsubmit"), document.addEventListener("scroll", ir), document.addEventListener("click", rr), window.addEventListener("resize", fr)) : o() === "onsubmit" && o(void 0);
2369
- }
2370
- function _r(r) {
2371
- if (x("overlay", r), ge(r), r) {
2372
- if (o() || o("onsubmit"), l(ue) && l(M).parentElement && l(ue).replaceWith(l(M).parentElement), l(M)?.parentElement?.parentElement) {
2373
- p(ue, document.createElement("div"), !0), l(M).parentElement.parentElement.appendChild(l(ue));
2374
- const u = document.createElement("div"), v = document.createElement("button");
2375
- v.type = "button", v.innerHTML = "&times;", v.addEventListener("click", (_) => {
2376
- _.preventDefault(), Xe();
2377
- }), l(ue).classList.add("altcha-overlay-backdrop"), v.classList.add("altcha-overlay-close-button"), u.classList.add("altcha-overlay"), l(ue).append(u), u.append(v), At() && u.append(...document.querySelectorAll(At())), u.append(l(M).parentElement);
2378
- }
2379
- } else l(ue) && l(M).parentElement && (l(ue).replaceWith(l(M).parentElement), l(M).style.display = "block");
2380
- }
2381
- function mr(r) {
2382
- if (!r.algorithm)
2383
- throw new Error("Invalid challenge. Property algorithm is missing.");
2384
- if (r.signature === void 0)
2385
- throw new Error("Invalid challenge. Property signature is missing.");
2386
- if (!Kn.includes(r.algorithm.toUpperCase()))
2387
- throw new Error(`Unknown algorithm value. Allowed values: ${Kn.join(", ")}`);
2388
- if (!r.challenge || r.challenge.length < 40)
2389
- throw new Error("Challenge is too short. Min. 40 chars.");
2390
- if (!r.salt || r.salt.length < 10)
2391
- throw new Error("Salt is too short. Min. 10 chars.");
2392
- }
2393
- async function br(r) {
2394
- let u = null, v = null;
2395
- if ("Worker" in window) {
2396
- try {
2397
- u = ll(r, r.maxNumber || r.maxnumber || Ge()), p(We, u.controller, !0), v = await u.promise;
2398
- } catch (_) {
2399
- x(_);
2400
- } finally {
2401
- p(We, null);
2402
- }
2403
- if (v === null || v?.number !== void 0 || "obfuscated" in r)
2404
- return { data: r, solution: v };
2405
- }
2406
- if ("obfuscated" in r) {
2407
- const _ = await ea(r.obfuscated, r.key, r.maxNumber || r.maxnumber);
2408
- return { data: r, solution: await _.promise };
2409
- }
2410
- u = Xo(r.challenge, r.salt, r.algorithm, r.maxNumber || r.maxnumber || Ge()), p(We, u.controller, !0);
2411
- try {
2412
- v = await u.promise;
2413
- } catch (_) {
2414
- x(_);
2415
- } finally {
2416
- p(We, null);
2417
- }
2418
- return { data: r, solution: v };
2419
- }
2420
- function ll(r, u = typeof de() == "number" ? de() : r.maxNumber || r.maxnumber || Ge(), v = Math.ceil(ut())) {
2421
- const _ = new AbortController(), g = [];
2422
- v = Math.min(16, u, Math.max(1, v));
2423
- for (let H = 0; H < v; H++)
2424
- g.push(altchaCreateWorker(It()));
2425
- const A = Math.ceil(u / v);
2426
- return { promise: (async () => {
2427
- const H = await Promise.all(g.map((j, ie) => {
2428
- const le = ie * A;
2429
- return _.signal.addEventListener("abort", () => {
2430
- j.postMessage({ type: "abort" });
2431
- }), new Promise((Qe) => {
2432
- j.addEventListener("message", (dt) => {
2433
- if (dt.data)
2434
- for (const et of g)
2435
- et !== j && et.postMessage({ type: "abort" });
2436
- Qe(dt.data);
2437
- }), j.postMessage({
2438
- payload: r,
2439
- max: le + A,
2440
- start: le,
2441
- type: "work"
2442
- });
2443
- });
2444
- }));
2445
- for (const j of g)
2446
- j.terminate();
2447
- return H.find((j) => !!j) || null;
2448
- })(), controller: _ };
2449
- }
2450
- async function kt() {
2451
- if (!De()) {
2452
- Ce(y.ERROR);
2453
- return;
2454
- }
2455
- const r = Oe.find((u) => u.constructor.pluginName === "obfuscation");
2456
- if (!r || !("clarify" in r)) {
2457
- Ce(y.ERROR), x("Plugin `obfuscation` not found. Import `altcha/plugins/obfuscation` to load it.");
2458
- return;
2459
- }
2460
- if ("clarify" in r && typeof r.clarify == "function")
2461
- return r.clarify();
2462
- }
2463
- function pr(r) {
2464
- r.obfuscated !== void 0 && De(r.obfuscated), r.auto !== void 0 && (o(r.auto), o() === "onload" && (De() ? kt() : Se())), r.blockspam !== void 0 && s(!!r.blockspam), r.customfetch !== void 0 && m(r.customfetch), r.floatinganchor !== void 0 && ee(r.floatinganchor), r.delay !== void 0 && b(r.delay), r.floatingoffset !== void 0 && ke(r.floatingoffset), r.floating !== void 0 && gr(r.floating), r.expire !== void 0 && (An(r.expire), q(r.expire)), r.challenge && (c(typeof r.challenge == "string" ? r.challenge : JSON.stringify(r.challenge)), mr(l(Gt))), r.challengeurl !== void 0 && f(r.challengeurl), r.debug !== void 0 && h(!!r.debug), r.hidefooter !== void 0 && U(!!r.hidefooter), r.hidelogo !== void 0 && se(!!r.hidelogo), r.language !== void 0 && st(er(a(), [r.language])), r.maxnumber !== void 0 && Ge(+r.maxnumber), r.mockerror !== void 0 && Ct(!!r.mockerror), r.name !== void 0 && Ye(r.name), r.overlaycontent !== void 0 && At(r.overlaycontent), r.overlay !== void 0 && _r(r.overlay), r.refetchonexpire !== void 0 && V(!r.refetchonexpire), r.disablerefetchonexpire !== void 0 && V(!r.disablerefetchonexpire), r.sentinel !== void 0 && typeof r.sentinel == "object" && Ze(r.sentinel), r.spamfilter !== void 0 && ye(typeof r.spamfilter == "object" ? r.spamfilter : !!r.spamfilter), r.strings && st(typeof r.strings == "string" ? r.strings : JSON.stringify(r.strings)), r.test !== void 0 && de(typeof r.test == "number" ? r.test : !!r.test), r.verifyurl !== void 0 && te(r.verifyurl), r.workers !== void 0 && ut(+r.workers), r.workerurl !== void 0 && It(r.workerurl);
2465
- }
2466
- function yr() {
2467
- return {
2468
- auto: o(),
2469
- blockspam: s(),
2470
- challengeurl: f(),
2471
- debug: h(),
2472
- delay: b(),
2473
- disableautofocus: w(),
2474
- disablerefetchonexpire: V(),
2475
- expire: q(),
2476
- floating: R(),
2477
- floatinganchor: ee(),
2478
- floatingoffset: ke(),
2479
- hidefooter: U(),
2480
- hidelogo: se(),
2481
- name: Ye(),
2482
- maxnumber: Ge(),
2483
- mockerror: Ct(),
2484
- obfuscated: De(),
2485
- overlay: ge(),
2486
- refetchonexpire: !V(),
2487
- spamfilter: ye(),
2488
- strings: l(L),
2489
- test: de(),
2490
- verifyurl: te(),
2491
- workers: ut(),
2492
- workerurl: It()
2493
- };
2494
- }
2495
- function wr() {
2496
- return l(ft);
2497
- }
2498
- function ol(r) {
2499
- return Oe.find((u) => u.constructor.pluginName === r);
2500
- }
2501
- function Er() {
2502
- return l(I);
2503
- }
2504
- function St() {
2505
- l(M).style.display = "none", ge() && l(ue) && (l(ue).style.display = "none");
2506
- }
2507
- function Tt(r = 20) {
2508
- if (l(M))
2509
- if (l(ft) || p(ft, (ee() ? document.querySelector(ee()) : l(T)?.querySelector('input[type="submit"], button[type="submit"], button:not([type="button"]):not([type="reset"])')) || l(T), !0), l(ft)) {
2510
- const u = parseInt(ke(), 10) || 12, v = l(ft).getBoundingClientRect(), _ = l(M).getBoundingClientRect(), g = document.documentElement.clientHeight, A = document.documentElement.clientWidth, N = R() === "auto" ? v.bottom + _.height + u + r > g : R() === "top", H = Math.max(r, Math.min(A - r - _.width, v.left + v.width / 2 - _.width / 2));
2511
- if (N ? l(M).style.top = `${v.top - (_.height + u)}px` : l(M).style.top = `${v.bottom + u}px`, l(M).style.left = `${H}px`, l(M).setAttribute("data-floating", N ? "top" : "bottom"), l(Rt)) {
2512
- const j = l(Rt).getBoundingClientRect();
2513
- l(Rt).style.left = v.left - H + v.width / 2 - j.width / 2 + "px";
2514
- }
2515
- } else
2516
- x("unable to find floating anchor element");
2517
- }
2518
- function Xe(r = y.UNVERIFIED, u = null) {
2519
- l(We) && (l(We).abort(), p(We, null)), p(xt, !1), p(Ee, null), p(Y, null), p(En, !1), p(G, null), Ce(r, u);
2520
- }
2521
- function Cr(r) {
2522
- p(ft, r, !0);
2523
- }
2524
- function Ce(r, u = null) {
2525
- p(I, r, !0), p(Je, u, !0), Le("statechange", {
2526
- payload: l(Ee),
2527
- state: l(I)
2528
- });
2529
- }
2530
- function Wt() {
2531
- l(M).style.display = "block", R() && Tt(), ge() && l(ue) && (l(ue).style.display = "flex");
2532
- }
2533
- async function Se() {
2534
- return Xe(y.VERIFYING), await new Promise((r) => setTimeout(r, b() || 0)), Yi().then((r) => (mr(r), x("challenge", r), br(r))).then(({ data: r, solution: u }) => {
2535
- if (x("solution", u), !u || r && "challenge" in r && !("clearText" in u)) {
2536
- if (u?.number !== void 0 && "challenge" in r)
2537
- if (te() && "codeChallenge" in r)
2538
- ["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(document.activeElement?.tagName || "") && w() === !1 && document.activeElement.blur(), p(Y, { challenge: r, solution: u }, !0);
2539
- else {
2540
- if (te() && Ze() !== void 0)
2541
- return vr(Zt(r, u));
2542
- if (te())
2543
- return il(Zt(r, u));
2544
- p(Ee, Zt(r, u), !0), x("payload", l(Ee));
2545
- }
2546
- else if (l(I) !== y.EXPIRED)
2547
- throw x("Unable to find a solution. Ensure that the 'maxnumber' attribute is greater than the randomly generated number."), new Error("Unexpected result returned.");
2548
- }
2549
- }).then(() => {
2550
- l(Y) ? (Ce(y.CODE), kn().then(() => {
2551
- Le("code", { codeChallenge: l(Y) });
2552
- })) : l(Ee) && (Ce(y.VERIFIED), x("verified"), kn().then(() => {
2553
- Le("verified", { payload: l(Ee) }), ge() && St();
2554
- }));
2555
- }).catch((r) => {
2556
- x(r), Ce(y.ERROR, r.message);
2557
- });
2558
- }
2559
- var Ar = pa(), Ir = Dt(Ar);
2560
- No(Ir, t, "default", {});
2561
- var ct = K(Ir, 2), In = J(ct), Jt = J(In);
2562
- let xr;
2563
- var Rr = J(Jt);
2564
- {
2565
- var al = (r) => {
2566
- Sn(r);
2567
- };
2568
- X(Rr, (r) => {
2569
- l(I) === y.VERIFYING && r(al);
2570
- });
2571
- }
2572
- var ze = K(Rr, 2);
2573
- Ur(ze), ze.__change = [
2574
- ia,
2575
- I,
2576
- ye,
2577
- T,
2578
- xt,
2579
- De,
2580
- kt,
2581
- Se
2582
- ], Qt(ze, (r) => p(wn, r), () => l(wn)), W(Jt);
2583
- var Kt = K(Jt, 2), sl = J(Kt);
2584
- {
2585
- var ul = (r) => {
2586
- var u = zt(), v = Dt(u);
2587
- tt(v, () => l(L).verified), B(r, u);
2588
- }, fl = (r, u) => {
2589
- {
2590
- var v = (g) => {
2591
- var A = zt(), N = Dt(A);
2592
- tt(N, () => l(L).verifying), B(g, A);
2593
- }, _ = (g, A) => {
2594
- {
2595
- var N = (j) => {
2596
- var ie = zt(), le = Dt(ie);
2597
- tt(le, () => l(L).verificationRequired), B(j, ie);
2598
- }, H = (j) => {
2599
- var ie = zt(), le = Dt(ie);
2600
- tt(le, () => l(L).label), B(j, ie);
2601
- };
2602
- X(
2603
- g,
2604
- (j) => {
2605
- l(I) === y.CODE ? j(N) : j(H, !1);
2606
- },
2607
- A
2608
- );
2609
- }
2610
- };
2611
- X(
2612
- r,
2613
- (g) => {
2614
- l(I) === y.VERIFYING ? g(v) : g(_, !1);
2615
- },
2616
- u
2617
- );
2618
- }
2619
- };
2620
- X(sl, (r) => {
2621
- l(I) === y.VERIFIED ? r(ul) : r(fl, !1);
2622
- });
2623
- }
2624
- W(Kt);
2625
- var $r = K(Kt, 2);
2626
- {
2627
- var cl = (r) => {
2628
- var u = oa();
2629
- Ur(u), Ae(() => {
2630
- $(u, "name", Ye()), Fo(u, l(Ee));
2631
- }), B(r, u);
2632
- };
2633
- X($r, (r) => {
2634
- l(I) === y.VERIFIED && r(cl);
2635
- });
2636
- }
2637
- var kr = K($r, 2);
2638
- {
2639
- var dl = (r) => {
2640
- var u = aa(), v = J(u);
2641
- $(v, "href", ji), W(u), Ae(() => $(v, "aria-label", l(L).ariaLinkLabel)), B(r, u);
2642
- };
2643
- X(kr, (r) => {
2644
- (se() !== !0 || l(yn)) && r(dl);
2645
- });
2646
- }
2647
- var vl = K(kr, 2);
2648
- {
2649
- var hl = (r) => {
2650
- var u = va(), v = K(J(u), 2), _ = J(v), g = K(_, 2);
2651
- Io(g, !w()), g.__keydown = [
2652
- na,
2653
- ur
2654
- ];
2655
- var A = K(g, 2), N = J(A), H = J(N);
2656
- {
2657
- var j = (_e) => {
2658
- var Z = ca();
2659
- Z.__click = ur;
2660
- var Xt = J(Z);
2661
- {
2662
- var Nt = (vt) => {
2663
- Sn(vt, () => 20);
2664
- }, El = (vt, Cl) => {
2665
- {
2666
- var Al = (ht) => {
2667
- var xn = sa();
2668
- B(ht, xn);
2669
- }, Il = (ht, xn) => {
2670
- {
2671
- var xl = (gt) => {
2672
- var Rn = ua();
2673
- B(gt, Rn);
2674
- }, Rl = (gt) => {
2675
- var Rn = fa();
2676
- B(gt, Rn);
2677
- };
2678
- X(
2679
- ht,
2680
- (gt) => {
2681
- l(G) === Q.PLAYING ? gt(xl) : gt(Rl, !1);
2682
- },
2683
- xn
2684
- );
2685
- }
2686
- };
2687
- X(
2688
- vt,
2689
- (ht) => {
2690
- l(G) === Q.ERROR ? ht(Al) : ht(Il, !1);
2691
- },
2692
- Cl
2693
- );
2694
- }
2695
- };
2696
- X(Xt, (vt) => {
2697
- l(G) === Q.LOADING ? vt(Nt) : vt(El, !1);
2698
- });
2699
- }
2700
- W(Z), Ae(() => {
2701
- $(Z, "title", l(L).getAudioChallenge), Z.disabled = l(G) === Q.LOADING || l(G) === Q.ERROR || l(Ke), $(Z, "aria-label", l(G) === Q.LOADING ? l(L).loading : l(L).getAudioChallenge);
2702
- }), B(_e, Z);
2703
- };
2704
- X(H, (_e) => {
2705
- l(Y).challenge.codeChallenge.audio && _e(j);
2706
- });
2707
- }
2708
- var ie = K(H, 2);
2709
- ie.__click = [ra, Se], W(N);
2710
- var le = K(N, 2), Qe = J(le);
2711
- {
2712
- var dt = (_e) => {
2713
- Sn(_e, () => 16);
2714
- };
2715
- X(Qe, (_e) => {
2716
- l(Ke) && _e(dt);
2717
- });
2718
- }
2719
- var et = K(Qe);
2720
- W(le), W(A);
2721
- var yl = K(A, 2);
2722
- {
2723
- var wl = (_e) => {
2724
- var Z = da(), Xt = J(Z);
2725
- W(Z), Qt(Z, (Nt) => p(Pe, Nt), () => l(Pe)), Ae((Nt) => $(Xt, "src", Nt), [
2726
- () => nr(l(Y).challenge.codeChallenge.audio, { language: Ht() })
2727
- ]), Fe("loadstart", Z, zi), Fe("canplay", Z, Xi), Fe("pause", Z, el), Fe("playing", Z, Qi), Fe("ended", Z, Ji), Fe("error", Xt, Ki), B(_e, Z);
2728
- };
2729
- X(yl, (_e) => {
2730
- l(Y).challenge.codeChallenge.audio && l(En) && _e(wl);
2731
- });
2732
- }
2733
- W(v), W(u), Ae(() => {
2734
- $(u, "aria-label", l(L).verificationRequired), $(_, "src", l(Y).challenge.codeChallenge.image), $(g, "minlength", l(Y).challenge.codeChallenge.length || 1), $(g, "maxlength", l(Y).challenge.codeChallenge.length), $(g, "placeholder", l(L).enterCode), $(g, "aria-label", l(G) === Q.LOADING ? l(L).loading : l(G) === Q.PLAYING ? "" : l(L).enterCodeAria), $(g, "aria-live", l(G) ? "assertive" : "polite"), $(g, "aria-busy", l(G) === Q.LOADING), g.disabled = l(Ke), $(ie, "aria-label", l(L).reload), $(ie, "title", l(L).reload), ie.disabled = l(Ke), le.disabled = l(Ke), $(le, "aria-label", l(L).verify), ko(et, ` ${l(L).verify ?? ""}`);
2735
- }), Fe("submit", v, tl, !0), B(r, u);
2736
- };
2737
- X(vl, (r) => {
2738
- l(Y)?.challenge.codeChallenge && r(hl);
2739
- });
2740
- }
2741
- W(In);
2742
- var Sr = K(In, 2);
2743
- {
2744
- var gl = (r) => {
2745
- var u = _a(), v = K(J(u), 2);
2746
- {
2747
- var _ = (A) => {
2748
- var N = ha(), H = J(N);
2749
- tt(H, () => l(L).expired), W(N), Ae(() => $(N, "title", l(Je))), B(A, N);
2750
- }, g = (A) => {
2751
- var N = ga(), H = J(N);
2752
- tt(H, () => l(L).error), W(N), Ae(() => $(N, "title", l(Je))), B(A, N);
2753
- };
2754
- X(v, (A) => {
2755
- l(I) === y.EXPIRED ? A(_) : A(g, !1);
2756
- });
2757
- }
2758
- W(u), B(r, u);
2759
- };
2760
- X(Sr, (r) => {
2761
- (l(Je) || l(I) === y.EXPIRED) && r(gl);
2762
- });
2763
- }
2764
- var Tr = K(Sr, 2);
2765
- {
2766
- var _l = (r) => {
2767
- var u = ma(), v = J(u), _ = J(v);
2768
- tt(_, () => l(L).footer), W(v), W(u), B(r, u);
2769
- };
2770
- X(Tr, (r) => {
2771
- l(L).footer && (U() !== !0 || l(yn)) && r(_l);
2772
- });
2773
- }
2774
- var ml = K(Tr, 2);
2775
- {
2776
- var bl = (r) => {
2777
- var u = ba();
2778
- Qt(u, (v) => p(Rt, v), () => l(Rt)), B(r, u);
2779
- };
2780
- X(ml, (r) => {
2781
- R() && r(bl);
2782
- });
2783
- }
2784
- W(ct), Qt(ct, (r) => p(M, r), () => l(M)), Ae(
2785
- (r) => {
2786
- $(ct, "data-state", l(I)), $(ct, "data-floating", R()), $(ct, "data-overlay", ge()), xr = Lo(Jt, 1, "altcha-checkbox", null, xr, r), $(ze, "id", l(zn)), ze.required = o() !== "onsubmit" && (!R() || o() !== "off"), $(Kt, "for", l(zn));
2787
- },
2788
- [
2789
- () => ({
2790
- "altcha-checkbox-verifying": l(I) === y.VERIFYING
2791
- })
2792
- ]
2793
- ), Fe("invalid", ze, sr), Mo(ze, () => l(xt), (r) => p(xt, r)), B(e, Ar);
2794
- var pl = Ri({
2795
- clarify: kt,
2796
- configure: pr,
2797
- getConfiguration: yr,
2798
- getFloatingAnchor: wr,
2799
- getPlugin: ol,
2800
- getState: Er,
2801
- hide: St,
2802
- repositionFloating: Tt,
2803
- reset: Xe,
2804
- setFloatingAnchor: Cr,
2805
- setState: Ce,
2806
- show: Wt,
2807
- verify: Se,
2808
- get auto() {
2809
- return o();
2810
- },
2811
- set auto(r = void 0) {
2812
- o(r), E();
2813
- },
2814
- get blockspam() {
2815
- return s();
2816
- },
2817
- set blockspam(r = void 0) {
2818
- s(r), E();
2819
- },
2820
- get challengeurl() {
2821
- return f();
2822
- },
2823
- set challengeurl(r = void 0) {
2824
- f(r), E();
2825
- },
2826
- get challengejson() {
2827
- return c();
2828
- },
2829
- set challengejson(r = void 0) {
2830
- c(r), E();
2831
- },
2832
- get credentials() {
2833
- return d();
2834
- },
2835
- set credentials(r = void 0) {
2836
- d(r), E();
2837
- },
2838
- get customfetch() {
2839
- return m();
2840
- },
2841
- set customfetch(r = void 0) {
2842
- m(r), E();
2843
- },
2844
- get debug() {
2845
- return h();
2846
- },
2847
- set debug(r = !1) {
2848
- h(r), E();
2849
- },
2850
- get delay() {
2851
- return b();
2852
- },
2853
- set delay(r = 0) {
2854
- b(r), E();
2855
- },
2856
- get disableautofocus() {
2857
- return w();
2858
- },
2859
- set disableautofocus(r = !1) {
2860
- w(r), E();
2861
- },
2862
- get refetchonexpire() {
2863
- return F();
2864
- },
2865
- set refetchonexpire(r = !0) {
2866
- F(r), E();
2867
- },
2868
- get disablerefetchonexpire() {
2869
- return V();
2870
- },
2871
- set disablerefetchonexpire(r = !F) {
2872
- V(r), E();
2873
- },
2874
- get expire() {
2875
- return q();
2876
- },
2877
- set expire(r = void 0) {
2878
- q(r), E();
2879
- },
2880
- get floating() {
2881
- return R();
2882
- },
2883
- set floating(r = void 0) {
2884
- R(r), E();
2885
- },
2886
- get floatinganchor() {
2887
- return ee();
2888
- },
2889
- set floatinganchor(r = void 0) {
2890
- ee(r), E();
2891
- },
2892
- get floatingoffset() {
2893
- return ke();
2894
- },
2895
- set floatingoffset(r = void 0) {
2896
- ke(r), E();
2897
- },
2898
- get floatingpersist() {
2899
- return z();
2900
- },
2901
- set floatingpersist(r = !1) {
2902
- z(r), E();
2903
- },
2904
- get hidefooter() {
2905
- return U();
2906
- },
2907
- set hidefooter(r = !1) {
2908
- U(r), E();
2909
- },
2910
- get hidelogo() {
2911
- return se();
2912
- },
2913
- set hidelogo(r = !1) {
2914
- se(r), E();
2915
- },
2916
- get id() {
2917
- return He();
2918
- },
2919
- set id(r = void 0) {
2920
- He(r), E();
2921
- },
2922
- get language() {
2923
- return Ht();
2924
- },
2925
- set language(r = void 0) {
2926
- Ht(r), E();
2927
- },
2928
- get name() {
2929
- return Ye();
2930
- },
2931
- set name(r = "altcha") {
2932
- Ye(r), E();
2933
- },
2934
- get maxnumber() {
2935
- return Ge();
2936
- },
2937
- set maxnumber(r = 1e6) {
2938
- Ge(r), E();
2939
- },
2940
- get mockerror() {
2941
- return Ct();
2942
- },
2943
- set mockerror(r = !1) {
2944
- Ct(r), E();
2945
- },
2946
- get obfuscated() {
2947
- return De();
2948
- },
2949
- set obfuscated(r = void 0) {
2950
- De(r), E();
2951
- },
2952
- get overlay() {
2953
- return ge();
2954
- },
2955
- set overlay(r = void 0) {
2956
- ge(r), E();
2957
- },
2958
- get overlaycontent() {
2959
- return At();
2960
- },
2961
- set overlaycontent(r = void 0) {
2962
- At(r), E();
2963
- },
2964
- get plugins() {
2965
- return Yt();
2966
- },
2967
- set plugins(r = void 0) {
2968
- Yt(r), E();
2969
- },
2970
- get sentinel() {
2971
- return Ze();
2972
- },
2973
- set sentinel(r = void 0) {
2974
- Ze(r), E();
2975
- },
2976
- get spamfilter() {
2977
- return ye();
2978
- },
2979
- set spamfilter(r = !1) {
2980
- ye(r), E();
2981
- },
2982
- get strings() {
2983
- return st();
2984
- },
2985
- set strings(r = void 0) {
2986
- st(r), E();
2987
- },
2988
- get test() {
2989
- return de();
2990
- },
2991
- set test(r = !1) {
2992
- de(r), E();
2993
- },
2994
- get verifyurl() {
2995
- return te();
2996
- },
2997
- set verifyurl(r = void 0) {
2998
- te(r), E();
2999
- },
3000
- get workers() {
3001
- return ut();
3002
- },
3003
- set workers(r = Math.min(16, navigator.hardwareConcurrency || 8)) {
3004
- ut(r), E();
3005
- },
3006
- get workerurl() {
3007
- return It();
3008
- },
3009
- set workerurl(r = void 0) {
3010
- It(r), E();
3011
- }
3012
- });
3013
- return i(), pl;
3014
- }
3015
- $o(["change", "keydown", "click"]);
3016
- customElements.define("altcha-widget", Wo(
3017
- ya,
3018
- {
3019
- blockspam: { type: "Boolean" },
3020
- debug: { type: "Boolean" },
3021
- delay: { type: "Number" },
3022
- disableautofocus: { type: "Boolean" },
3023
- disablerefetchonexpire: { type: "Boolean" },
3024
- expire: { type: "Number" },
3025
- floatingoffset: { type: "Number" },
3026
- hidefooter: { type: "Boolean" },
3027
- hidelogo: { type: "Boolean" },
3028
- maxnumber: { type: "Number" },
3029
- mockerror: { type: "Boolean" },
3030
- refetchonexpire: { type: "Boolean" },
3031
- test: { type: "Boolean" },
3032
- workers: { type: "Number" },
3033
- auto: {},
3034
- challengeurl: {},
3035
- challengejson: {},
3036
- credentials: {},
3037
- customfetch: {},
3038
- floating: {},
3039
- floatinganchor: {},
3040
- floatingpersist: {},
3041
- id: {},
3042
- language: {},
3043
- name: {},
3044
- obfuscated: {},
3045
- overlay: {},
3046
- overlaycontent: {},
3047
- plugins: {},
3048
- sentinel: {},
3049
- spamfilter: {},
3050
- strings: {},
3051
- verifyurl: {},
3052
- workerurl: {}
3053
- },
3054
- ["default"],
3055
- [
3056
- "clarify",
3057
- "configure",
3058
- "getConfiguration",
3059
- "getFloatingAnchor",
3060
- "getPlugin",
3061
- "getState",
3062
- "hide",
3063
- "repositionFloating",
3064
- "reset",
3065
- "setFloatingAnchor",
3066
- "setState",
3067
- "show",
3068
- "verify"
3069
- ],
3070
- !1
3071
- ));
3072
- globalThis.altchaCreateWorker = (e) => new Worker(new URL(e || "./worker.js", import.meta.url));
3073
- export {
3074
- ya as Altcha
3075
- };