@prosopo/procaptcha-bundle 3.0.13 → 3.2.2

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 (232) hide show
  1. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
  2. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/index.js +10 -1
  3. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -0
  4. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.d.ts +2 -0
  5. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.d.ts.map +1 -0
  6. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.js +32 -0
  7. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.js.map +1 -0
  8. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +19 -9
  9. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -0
  10. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  11. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +1 -1
  12. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -1
  13. package/{dist → .rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist}/bundle/util/captcha/captchaProps.d.ts +1 -0
  14. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -1
  15. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -1
  16. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  17. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +2 -1
  18. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -0
  19. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
  20. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +2 -2
  21. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +1 -0
  22. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
  23. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +0 -1
  24. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
  25. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -1
  26. package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +6 -2
  27. package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -0
  28. package/CHANGELOG.md +440 -0
  29. package/coverage/base.css +224 -0
  30. package/coverage/block-navigation.js +87 -0
  31. package/coverage/clover.xml +599 -0
  32. package/coverage/coverage-final.json +17 -0
  33. package/coverage/favicon.png +0 -0
  34. package/coverage/index.html +161 -0
  35. package/coverage/prettify.css +1 -0
  36. package/coverage/prettify.js +2 -0
  37. package/coverage/sort-arrow-sprite.png +0 -0
  38. package/coverage/sorter.js +210 -0
  39. package/coverage/src/components.ts.html +139 -0
  40. package/coverage/src/index.html +131 -0
  41. package/coverage/src/index.ts.html +844 -0
  42. package/coverage/src/util/captcha/captchaComponentProvider.tsx.html +214 -0
  43. package/coverage/src/util/captcha/captchaComponentsList.ts.html +178 -0
  44. package/coverage/src/util/captcha/captchaProps.ts.html +166 -0
  45. package/coverage/src/util/captcha/captchaRenderer.tsx.html +481 -0
  46. package/coverage/src/util/captcha/captchaType.ts.html +181 -0
  47. package/coverage/src/util/captcha/components/frictionlessCaptcha.tsx.html +205 -0
  48. package/coverage/src/util/captcha/components/imageCaptcha.tsx.html +178 -0
  49. package/coverage/src/util/captcha/components/index.html +146 -0
  50. package/coverage/src/util/captcha/components/powCaptcha.tsx.html +178 -0
  51. package/coverage/src/util/captcha/index.html +176 -0
  52. package/coverage/src/util/config.ts.html +172 -0
  53. package/coverage/src/util/configCreator.ts.html +241 -0
  54. package/coverage/src/util/index.html +191 -0
  55. package/coverage/src/util/language.ts.html +244 -0
  56. package/coverage/src/util/timeout.ts.html +214 -0
  57. package/coverage/src/util/widgetFactory.ts.html +532 -0
  58. package/coverage/src/util/widgetThemeResolver.ts.html +205 -0
  59. package/dist/bundle/{ProcaptchaWidget-CXxnCzl2.js → ProcaptchaWidget-CuMH13Bh.js} +340 -320
  60. package/dist/bundle/{ProcaptchaWidget-BIt2pcrz.js → ProcaptchaWidget-DsflBBn_.js} +25 -25
  61. package/dist/bundle/{browser-ponyfill-CvzSbL_o.js → browser-ponyfill-DXriyH6D.js} +4 -4
  62. package/dist/bundle/{builder-DNHtDoNG.js → builder-ByZ5z580.js} +3 -1
  63. package/dist/bundle/captchaComponentProvider-D02Su4nd.js +1013 -0
  64. package/dist/bundle/captchaRenderer-BV-WgbEA.js +70 -0
  65. package/dist/bundle/{commonChunk-BKceWhtS.js → commonChunk-PB26mndo.js} +66 -69
  66. package/dist/bundle/{emotion-element-5486c51c.browser.esm-CimrRZxS.js → emotion-element-c39617d8.browser.esm-DG1XhEZ1.js} +343 -345
  67. package/dist/bundle/{index-KHTbPva_.js → index-B9KeZfID.js} +3 -3
  68. package/dist/bundle/{index-hrOz2CPm.js → index-Calnfnac.js} +97 -87
  69. package/dist/bundle/index-DU371vQ0.js +1634 -0
  70. package/dist/bundle/index.d.ts.map +1 -1
  71. package/dist/bundle/nobleChunk-Bbltwf44.js +2728 -0
  72. package/dist/bundle/procaptcha.bundle.js +2 -2
  73. package/dist/bundle/tests/procaptchaReady.unit.test.d.ts.map +1 -0
  74. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  75. package/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -1
  76. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  77. package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
  78. package/dist/bundle/util/configCreator.d.ts.map +1 -1
  79. package/dist/bundle/util/widgetFactory.d.ts.map +1 -1
  80. package/dist/bundle/{utilChunk-DPr6oTOj.js → utilChunk-WRTGKXbU.js} +109 -102
  81. package/dist/bundle/{utilCryptoChunk-BKe3CKqn.js → utilCryptoChunk-B4ZdOwus.js} +252 -243
  82. package/dist/bundle/{web2Chunk-Cqw91v-J.js → web2Chunk-BGN6Hv-C.js} +1097 -1002
  83. package/dist/bundle/web3Chunk-BIX2T9Eo.js +525 -0
  84. package/dist/bundle/{zodChunk-wTu9ZHzV.js → zodChunk-CaINhWMQ.js} +10 -10
  85. package/dist/cjs/index.cjs +10 -1
  86. package/dist/cjs/util/captcha/captchaComponentProvider.cjs +3 -2
  87. package/dist/cjs/util/captcha/captchaRenderer.cjs +4 -3
  88. package/dist/cjs/util/captcha/components/frictionlessCaptcha.cjs +4 -3
  89. package/dist/cjs/util/captcha/components/imageCaptcha.cjs +1 -1
  90. package/dist/cjs/util/captcha/components/powCaptcha.cjs +1 -1
  91. package/dist/cjs/util/configCreator.cjs +0 -1
  92. package/dist/cjs/util/widgetFactory.cjs +7 -2
  93. package/dist/components.d.ts.map +1 -0
  94. package/dist/components.js +5 -0
  95. package/dist/components.js.map +1 -0
  96. package/dist/index.d.ts.map +1 -0
  97. package/dist/index.js +10 -1
  98. package/dist/index.js.map +1 -0
  99. package/dist/tests/procaptchaReady.unit.test.d.ts +2 -0
  100. package/dist/tests/procaptchaReady.unit.test.d.ts.map +1 -0
  101. package/dist/tests/procaptchaReady.unit.test.js +32 -0
  102. package/dist/tests/procaptchaReady.unit.test.js.map +1 -0
  103. package/dist/tests/util/captchaType.test.d.ts.map +1 -0
  104. package/dist/tests/util/captchaType.test.js +36 -0
  105. package/dist/tests/util/captchaType.test.js.map +1 -0
  106. package/dist/tests/util/config.test.d.ts.map +1 -0
  107. package/dist/tests/util/config.test.js +69 -0
  108. package/dist/tests/util/config.test.js.map +1 -0
  109. package/dist/tests/util/renderLogic.test.d.ts.map +1 -0
  110. package/dist/tests/util/renderLogic.test.js +136 -0
  111. package/dist/tests/util/renderLogic.test.js.map +1 -0
  112. package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -0
  113. package/dist/util/captcha/captchaComponentProvider.js +3 -2
  114. package/dist/util/captcha/captchaComponentProvider.js.map +1 -0
  115. package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -0
  116. package/dist/util/captcha/captchaComponentsList.js.map +1 -0
  117. package/{.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle → dist}/util/captcha/captchaProps.d.ts +1 -0
  118. package/dist/util/captcha/captchaProps.d.ts.map +1 -0
  119. package/dist/util/captcha/captchaProps.js +2 -0
  120. package/dist/util/captcha/captchaProps.js.map +1 -0
  121. package/dist/{bundle/util → util}/captcha/captchaRenderer.d.ts +1 -1
  122. package/dist/util/captcha/captchaRenderer.d.ts.map +1 -0
  123. package/dist/util/captcha/captchaRenderer.js +4 -3
  124. package/dist/util/captcha/captchaRenderer.js.map +1 -0
  125. package/dist/util/captcha/captchaType.d.ts.map +1 -0
  126. package/dist/util/captcha/captchaType.js.map +1 -0
  127. package/dist/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
  128. package/dist/util/captcha/components/frictionlessCaptcha.js +4 -3
  129. package/dist/util/captcha/components/frictionlessCaptcha.js.map +1 -0
  130. package/dist/util/captcha/components/imageCaptcha.d.ts.map +1 -0
  131. package/dist/util/captcha/components/imageCaptcha.js +1 -1
  132. package/dist/util/captcha/components/imageCaptcha.js.map +1 -0
  133. package/dist/util/captcha/components/powCaptcha.d.ts.map +1 -0
  134. package/dist/util/captcha/components/powCaptcha.js +1 -1
  135. package/dist/util/captcha/components/powCaptcha.js.map +1 -0
  136. package/dist/util/config.d.ts.map +1 -0
  137. package/dist/util/config.js.map +1 -0
  138. package/dist/util/configCreator.d.ts.map +1 -0
  139. package/dist/util/configCreator.js +0 -1
  140. package/dist/util/configCreator.js.map +1 -0
  141. package/dist/util/language.d.ts.map +1 -0
  142. package/dist/util/language.js.map +1 -0
  143. package/dist/util/timeout.d.ts.map +1 -0
  144. package/dist/util/timeout.js.map +1 -0
  145. package/dist/util/widgetFactory.d.ts.map +1 -0
  146. package/dist/util/widgetFactory.js +7 -2
  147. package/dist/util/widgetFactory.js.map +1 -0
  148. package/dist/util/widgetThemeResolver.d.ts.map +1 -0
  149. package/dist/util/widgetThemeResolver.js.map +1 -0
  150. package/package.json +24 -25
  151. package/stats.html +2239 -2132
  152. package/vite.test.config.ts +3 -2
  153. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +0 -1
  154. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +0 -1
  155. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +0 -1
  156. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +0 -1
  157. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +0 -1
  158. package/dist/bundle/captchaComponentProvider-BGEAkC9Y.js +0 -968
  159. package/dist/bundle/captchaRenderer-CqnUYyKY.js +0 -70
  160. package/dist/bundle/index-7Xh-Mf8v.js +0 -1318
  161. package/dist/bundle/nobleChunk-CQ4ENyKh.js +0 -3769
  162. package/dist/bundle/web3Chunk-BcwDKvjL.js +0 -517
  163. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +0 -0
  164. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +0 -0
  165. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.js +0 -0
  166. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +0 -0
  167. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +0 -0
  168. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts +0 -0
  169. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -0
  170. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +0 -0
  171. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +0 -0
  172. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts +0 -0
  173. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts.map +0 -0
  174. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js +0 -0
  175. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js.map +0 -0
  176. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts +0 -0
  177. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -0
  178. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -0
  179. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -0
  180. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -0
  181. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js +0 -0
  182. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +0 -0
  183. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +0 -0
  184. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +0 -0
  185. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +0 -0
  186. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +0 -0
  187. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js +0 -0
  188. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +0 -0
  189. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -0
  190. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -0
  191. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -0
  192. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js +0 -0
  193. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +0 -0
  194. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -0
  195. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -0
  196. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js +0 -0
  197. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +0 -0
  198. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -0
  199. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +0 -0
  200. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -0
  201. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +0 -0
  202. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +0 -0
  203. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts +0 -0
  204. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts.map +0 -0
  205. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js +0 -0
  206. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +0 -0
  207. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts +0 -0
  208. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts.map +0 -0
  209. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js +0 -0
  210. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js.map +0 -0
  211. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +0 -0
  212. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +0 -0
  213. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -0
  214. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +0 -0
  215. /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +0 -0
  216. /package/dist/{bundle/components.d.ts → components.d.ts} +0 -0
  217. /package/dist/{bundle/index.d.ts → index.d.ts} +0 -0
  218. /package/dist/{bundle/tests → tests}/util/captchaType.test.d.ts +0 -0
  219. /package/dist/{bundle/tests → tests}/util/config.test.d.ts +0 -0
  220. /package/dist/{bundle/tests → tests}/util/renderLogic.test.d.ts +0 -0
  221. /package/dist/{bundle/util → util}/captcha/captchaComponentProvider.d.ts +0 -0
  222. /package/dist/{bundle/util → util}/captcha/captchaComponentsList.d.ts +0 -0
  223. /package/dist/{bundle/util → util}/captcha/captchaType.d.ts +0 -0
  224. /package/dist/{bundle/util → util}/captcha/components/frictionlessCaptcha.d.ts +0 -0
  225. /package/dist/{bundle/util → util}/captcha/components/imageCaptcha.d.ts +0 -0
  226. /package/dist/{bundle/util → util}/captcha/components/powCaptcha.d.ts +0 -0
  227. /package/dist/{bundle/util → util}/config.d.ts +0 -0
  228. /package/dist/{bundle/util → util}/configCreator.d.ts +0 -0
  229. /package/dist/{bundle/util → util}/language.d.ts +0 -0
  230. /package/dist/{bundle/util → util}/timeout.d.ts +0 -0
  231. /package/dist/{bundle/util → util}/widgetFactory.d.ts +0 -0
  232. /package/dist/{bundle/util → util}/widgetThemeResolver.d.ts +0 -0
@@ -1,12 +1,12 @@
1
- import { j as l, a as H, g as oe, p as U, b as ne, P as ae, E as re, c as se, C as ie } from "./captchaComponentProvider-BGEAkC9Y.js";
2
- import { r as m, u as V, a as b, A as w, f as ce, h as le, s as de, P as X, g as ue, l as pe } from "./web2Chunk-Cqw91v-J.js";
3
- import { b as _, c as W, P as v, a as N } from "./commonChunk-BKceWhtS.js";
4
- import { b as he, u as ge } from "./builder-DNHtDoNG.js";
5
- import { u as fe } from "./utilCryptoChunk-BKe3CKqn.js";
6
- import { w as me } from "./utilChunk-DPr6oTOj.js";
7
- import { l as M, d as D } from "./index-hrOz2CPm.js";
8
- import { r as xe } from "./index-KHTbPva_.js";
9
- const Ce = {
1
+ import { j as d, a as P, g as ie, p as z, b as ce, P as le, E as de, c as ue, C as he } from "./captchaComponentProvider-D02Su4nd.js";
2
+ import { r as C, u as Z, a as v, A, g as pe, h as ge, i as fe, s as me, P as Q, j as xe, l as Ce } from "./web2Chunk-BGN6Hv-C.js";
3
+ import { b as _, P as T, a as H } from "./commonChunk-PB26mndo.js";
4
+ import { b as we, u as be } from "./builder-ByZ5z580.js";
5
+ import { u as U, v as ye } from "./utilCryptoChunk-B4ZdOwus.js";
6
+ import { w as Ae } from "./utilChunk-WRTGKXbU.js";
7
+ import { l as M, d as D } from "./index-Calnfnac.js";
8
+ import { r as ve } from "./index-B9KeZfID.js";
9
+ const Ee = {
10
10
  border: "none",
11
11
  paddingTop: "6px",
12
12
  paddingBottom: "6px",
@@ -15,29 +15,29 @@ const Ce = {
15
15
  width: "39px",
16
16
  borderRadius: "50%",
17
17
  display: "flex"
18
- }, we = ({
18
+ }, Te = ({
19
19
  themeColor: r,
20
20
  onReload: e
21
21
  }) => {
22
- const o = m.useMemo(
22
+ const n = C.useMemo(
23
23
  () => r === "light" ? M : D,
24
24
  [r]
25
- ), [n, t] = m.useState(!1), i = m.useMemo(() => ({
25
+ ), [o, t] = C.useState(!1), i = C.useMemo(() => ({
26
26
  ...{
27
- ...Ce,
28
- backgroundColor: o.palette.background.default,
29
- color: n ? o.palette.primary.contrastText : o.palette.background.contrastText,
30
- border: `1px solid ${o.palette.grey[500]}`,
27
+ ...Ee,
28
+ backgroundColor: n.palette.background.default,
29
+ color: o ? n.palette.primary.contrastText : n.palette.background.contrastText,
30
+ border: `1px solid ${n.palette.grey[500]}`,
31
31
  borderRadius: "50%",
32
32
  transition: "background-color 0.3s",
33
- boxShadow: `0px 1px 3px 0px ${o.palette.grey[500]}`,
33
+ boxShadow: `0px 1px 3px 0px ${n.palette.grey[500]}`,
34
34
  justifyContent: "center",
35
35
  alignItems: "center",
36
36
  margin: "0 auto"
37
37
  },
38
- backgroundColor: n ? o.palette.grey[700] : o.palette.background.default
39
- }), [n, o]);
40
- return /* @__PURE__ */ l(
38
+ backgroundColor: o ? n.palette.grey[700] : n.palette.background.default
39
+ }), [o, n]);
40
+ return /* @__PURE__ */ d(
41
41
  "button",
42
42
  {
43
43
  className: "reload-button",
@@ -49,7 +49,7 @@ const Ce = {
49
49
  onClick: (a) => {
50
50
  a.preventDefault(), e();
51
51
  },
52
- children: /* @__PURE__ */ H(
52
+ children: /* @__PURE__ */ P(
53
53
  "svg",
54
54
  {
55
55
  width: "16px",
@@ -60,12 +60,12 @@ const Ce = {
60
60
  xmlnsXlink: "http://www.w3.org/1999/xlink",
61
61
  style: { display: "flex" },
62
62
  children: [
63
- /* @__PURE__ */ l("title", { children: "reload" }),
64
- /* @__PURE__ */ l(
63
+ /* @__PURE__ */ d("title", { children: "reload" }),
64
+ /* @__PURE__ */ d(
65
65
  "path",
66
66
  {
67
67
  shapeRendering: "optimizeQuality",
68
- fill: n ? o.palette.primary.contrastText : o.palette.grey[700],
68
+ fill: o ? n.palette.primary.contrastText : n.palette.grey[700],
69
69
  transform: "scale(0.0416)",
70
70
  d: "M234.666667,149.333333 L234.666667,106.666667 L314.564847,106.664112 C287.579138,67.9778918 242.745446,42.6666667 192,42.6666667 C109.525477,42.6666667 42.6666667,109.525477 42.6666667,192 C42.6666667,274.474523 109.525477,341.333333 192,341.333333 C268.201293,341.333333 331.072074,284.258623 340.195444,210.526102 L382.537159,215.817985 C370.807686,310.617565 289.973536,384 192,384 C85.961328,384 1.42108547e-14,298.038672 1.42108547e-14,192 C1.42108547e-14,85.961328 85.961328,1.42108547e-14 192,1.42108547e-14 C252.316171,1.42108547e-14 306.136355,27.8126321 341.335366,71.3127128 L341.333333,1.42108547e-14 L384,1.42108547e-14 L384,149.333333 L234.666667,149.333333 Z"
71
71
  }
@@ -75,23 +75,23 @@ const Ce = {
75
75
  )
76
76
  }
77
77
  );
78
- }, be = (r) => {
78
+ }, Ie = (r) => {
79
79
  if (!r.hash)
80
80
  throw new _("CAPTCHA.MISSING_ITEM_HASH", {
81
81
  context: { item: r }
82
82
  });
83
83
  return r.hash;
84
- }, Ae = ({
84
+ }, Ne = ({
85
85
  challenge: r,
86
86
  solution: e,
87
- onClick: o,
88
- themeColor: n
87
+ onClick: n,
88
+ themeColor: o
89
89
  }) => {
90
- const t = r.items, i = m.useMemo(
91
- () => n === "light" ? M : D,
92
- [n]
90
+ const t = r.items, i = C.useMemo(
91
+ () => o === "light" ? M : D,
92
+ [o]
93
93
  ), a = `${i.spacing.unit}px`;
94
- return /* @__PURE__ */ l(
94
+ return /* @__PURE__ */ d(
95
95
  "div",
96
96
  {
97
97
  style: {
@@ -107,16 +107,16 @@ const Ce = {
107
107
  paddingTop: a,
108
108
  gap: "10px"
109
109
  },
110
- children: t.map((s, d) => {
111
- const u = be(s);
112
- return /* @__PURE__ */ l("div", { style: {
110
+ children: t.map((s, l) => {
111
+ const h = Ie(s);
112
+ return /* @__PURE__ */ d("div", { style: {
113
113
  // enable the items in the grid to grow in width to use up excess space
114
114
  flexGrow: 1,
115
115
  // make the width of each item 1/3rd of the width overall, i.e. 3 columns
116
116
  flexBasis: "calc(33.333% - 10px)",
117
117
  // include the padding / margin / border in the width
118
118
  boxSizing: "border-box"
119
- }, children: /* @__PURE__ */ H(
119
+ }, children: /* @__PURE__ */ P(
120
120
  "div",
121
121
  {
122
122
  style: {
@@ -127,9 +127,21 @@ const Ce = {
127
127
  padding: 0,
128
128
  margin: 0
129
129
  },
130
- onClick: () => o(u),
130
+ onClick: (u) => {
131
+ if (u.isTrusted) {
132
+ if ("touches" in u && u.touches.length > 0 && u.touches[0]) {
133
+ n(h, u.touches[0].clientX, u.touches[0].clientY);
134
+ return;
135
+ }
136
+ if ("clientX" in u && "clientY" in u) {
137
+ n(h, u.clientX, u.clientY);
138
+ return;
139
+ }
140
+ n(h, 0, 0);
141
+ }
142
+ },
131
143
  children: [
132
- /* @__PURE__ */ l(
144
+ /* @__PURE__ */ d(
133
145
  "img",
134
146
  {
135
147
  style: {
@@ -149,10 +161,14 @@ const Ce = {
149
161
  borderColor: i.palette.grey[300]
150
162
  },
151
163
  src: s.data,
152
- alt: `Captcha image ${d + 1}`
164
+ alt: `Captcha image ${l + 1}`,
165
+ onError: (u) => {
166
+ const f = u.currentTarget;
167
+ f._retryCount = (f._retryCount || 0) + 1, f._retryCount <= 3 && (f.src = `${s.data}?retry=${Date.now()}`);
168
+ }
153
169
  }
154
170
  ),
155
- /* @__PURE__ */ l(
171
+ /* @__PURE__ */ d(
156
172
  "div",
157
173
  {
158
174
  style: {
@@ -169,9 +185,9 @@ const Ce = {
169
185
  justifyContent: "center",
170
186
  // make bg half opacity, i.e. shadowing the item's img
171
187
  backgroundColor: "rgba(0,0,0,0.5)",
172
- visibility: e.includes(u) ? "visible" : "hidden"
188
+ visibility: e.some((u) => u[0] === h) ? "visible" : "hidden"
173
189
  },
174
- children: /* @__PURE__ */ l(
190
+ children: /* @__PURE__ */ d(
175
191
  "svg",
176
192
  {
177
193
  style: {
@@ -191,7 +207,7 @@ const Ce = {
191
207
  viewBox: "0 0 24 24",
192
208
  "data-testid": "CheckIcon",
193
209
  "aria-label": "Check icon",
194
- children: /* @__PURE__ */ l("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
210
+ children: /* @__PURE__ */ d("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
195
211
  }
196
212
  )
197
213
  }
@@ -203,22 +219,22 @@ const Ce = {
203
219
  }
204
220
  );
205
221
  };
206
- function ye(r = {}) {
222
+ function He(r = {}) {
207
223
  return Object.keys(r).reduce(
208
224
  // biome-ignore lint/performance/noAccumulatingSpread: TODO fix
209
- (e, o) => ({ ...e, [`data-${o}`]: r[o] }),
225
+ (e, n) => ({ ...e, [`data-${n}`]: r[n] }),
210
226
  {}
211
227
  );
212
228
  }
213
- function q({
229
+ function J({
214
230
  general: r,
215
231
  dev: e
216
232
  }) {
217
233
  return {
218
- ...ye(r)
234
+ ...He(r)
219
235
  };
220
236
  }
221
- const ve = {
237
+ const Pe = {
222
238
  display: "inline-flex",
223
239
  alignItems: "center",
224
240
  justifyContent: "center",
@@ -241,18 +257,18 @@ const ve = {
241
257
  borderRadius: "4px",
242
258
  transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
243
259
  backgroundColor: "#ffffff"
244
- }, B = ({
260
+ }, F = ({
245
261
  themeColor: r,
246
262
  buttonType: e,
247
- text: o,
248
- onClick: n
263
+ text: n,
264
+ onClick: o
249
265
  }) => {
250
- const t = m.useMemo(
266
+ const t = C.useMemo(
251
267
  () => r === "light" ? M : D,
252
268
  [r]
253
- ), [i, a] = m.useState(!1), s = m.useMemo(() => {
254
- const d = {
255
- ...ve,
269
+ ), [i, a] = C.useState(!1), s = C.useMemo(() => {
270
+ const l = {
271
+ ...Pe,
256
272
  border: `1px solid ${t.palette.grey[500]}`,
257
273
  boxShadow: `0px 1px 3px 0px ${t.palette.grey[500]}`,
258
274
  fontFamily: t.font.fontFamily,
@@ -260,43 +276,43 @@ const ve = {
260
276
  color: i ? t.palette.primary.contrastText : t.palette.background.contrastText
261
277
  };
262
278
  return e === "cancel" ? {
263
- ...d,
279
+ ...l,
264
280
  backgroundColor: i ? t.palette.grey[600] : "transparent"
265
281
  } : {
266
- ...d,
282
+ ...l,
267
283
  backgroundColor: i ? t.palette.primary.main : t.palette.background.default
268
284
  };
269
285
  }, [e, i, t]);
270
- return /* @__PURE__ */ l(
286
+ return /* @__PURE__ */ d(
271
287
  "button",
272
288
  {
273
- ...q({ dev: {} }),
289
+ ...J({ dev: {} }),
274
290
  onMouseEnter: () => a(!0),
275
291
  onMouseLeave: () => a(!1),
276
292
  style: s,
277
- onClick: (d) => {
278
- d.preventDefault(), n();
293
+ onClick: (l) => {
294
+ l.isTrusted && (l.preventDefault(), o());
279
295
  },
280
- "aria-label": o,
281
- children: o
296
+ "aria-label": n,
297
+ children: n
282
298
  }
283
299
  );
284
- }, $ = ({
300
+ }, K = ({
285
301
  challenge: r,
286
302
  index: e,
287
- solutions: o,
288
- onSubmit: n,
303
+ solutions: n,
304
+ onSubmit: o,
289
305
  onCancel: t,
290
306
  onClick: i,
291
307
  onNext: a,
292
308
  onReload: s,
293
- themeColor: d
309
+ themeColor: l
294
310
  }) => {
295
- const { t: u } = V(), C = r.captchas ? b(r.captchas, e) : null, h = o ? b(o, e) : [], A = m.useMemo(
296
- () => d === "light" ? M : D,
297
- [d]
298
- ), k = `${A.spacing.unit * 2}px`, g = `${A.spacing.unit}px`;
299
- return /* @__PURE__ */ l(m.Suspense, { fallback: /* @__PURE__ */ l("div", { children: "Loading..." }), children: /* @__PURE__ */ l(
311
+ const { t: h } = Z(), b = r.captchas ? v(r.captchas, e) : null, u = n ? v(n, e) : [], f = C.useMemo(
312
+ () => l === "light" ? M : D,
313
+ [l]
314
+ ), R = `${f.spacing.unit * 2}px`, g = `${f.spacing.unit}px`;
315
+ return /* @__PURE__ */ d(C.Suspense, { fallback: /* @__PURE__ */ d("div", { children: "Loading..." }), children: /* @__PURE__ */ d(
300
316
  "div",
301
317
  {
302
318
  style: {
@@ -310,16 +326,16 @@ const ve = {
310
326
  border: "1px solid #dddddd",
311
327
  boxShadow: "rgba(255, 255, 255, 0.2) 0px 0px 4px",
312
328
  borderRadius: "4px",
313
- backgroundColor: A.palette.background.default,
329
+ backgroundColor: f.palette.background.default,
314
330
  userSelect: "none",
315
331
  touchAction: "none",
316
332
  overscrollBehavior: "none"
317
333
  },
318
- children: /* @__PURE__ */ H(
334
+ children: /* @__PURE__ */ P(
319
335
  "div",
320
336
  {
321
337
  style: {
322
- backgroundColor: A.palette.background.default,
338
+ backgroundColor: f.palette.background.default,
323
339
  display: "flex",
324
340
  flexDirection: "column",
325
341
  minWidth: "300px",
@@ -328,7 +344,7 @@ const ve = {
328
344
  justifyContent: "center"
329
345
  },
330
346
  children: [
331
- /* @__PURE__ */ l(
347
+ /* @__PURE__ */ d(
332
348
  "div",
333
349
  {
334
350
  style: {
@@ -336,23 +352,23 @@ const ve = {
336
352
  alignItems: "center",
337
353
  width: "100%"
338
354
  },
339
- children: /* @__PURE__ */ l(
355
+ children: /* @__PURE__ */ d(
340
356
  "div",
341
357
  {
342
358
  style: {
343
- backgroundColor: A.palette.primary.main,
359
+ backgroundColor: f.palette.primary.main,
344
360
  width: "100%",
345
361
  marginTop: g
346
362
  },
347
- children: /* @__PURE__ */ H(
363
+ children: /* @__PURE__ */ P(
348
364
  "div",
349
365
  {
350
366
  style: {
351
- padding: `${A.spacing.half}px`,
352
- fontFamily: A.font.fontFamily
367
+ padding: `${f.spacing.half}px`,
368
+ fontFamily: f.font.fontFamily
353
369
  },
354
370
  children: [
355
- /* @__PURE__ */ H(
371
+ /* @__PURE__ */ P(
356
372
  "p",
357
373
  {
358
374
  style: {
@@ -361,14 +377,14 @@ const ve = {
361
377
  lineHeight: 1.5
362
378
  },
363
379
  children: [
364
- u("WIDGET.SELECT_ALL"),
380
+ h("WIDGET.SELECT_ALL"),
365
381
  ":",
366
382
  " ",
367
- /* @__PURE__ */ l("span", { children: `${b(r.captchas, e).target} ` })
383
+ /* @__PURE__ */ d("span", { children: `${v(r.captchas, e).target} ` })
368
384
  ]
369
385
  }
370
386
  ),
371
- /* @__PURE__ */ l(
387
+ /* @__PURE__ */ d(
372
388
  "p",
373
389
  {
374
390
  style: {
@@ -377,7 +393,7 @@ const ve = {
377
393
  lineHeight: 0.8,
378
394
  fontSize: "0.8rem"
379
395
  },
380
- children: u("WIDGET.IF_NONE_CLICK_NEXT")
396
+ children: h("WIDGET.IF_NONE_CLICK_NEXT")
381
397
  }
382
398
  )
383
399
  ]
@@ -387,23 +403,23 @@ const ve = {
387
403
  )
388
404
  }
389
405
  ),
390
- /* @__PURE__ */ l(
406
+ /* @__PURE__ */ d(
391
407
  "div",
392
408
  {
393
- ...q({ dev: {} }),
409
+ ...J({ dev: {} }),
394
410
  style: { overflow: "hidden" },
395
- children: C && /* @__PURE__ */ l(
396
- Ae,
411
+ children: b && /* @__PURE__ */ d(
412
+ Ne,
397
413
  {
398
- challenge: C,
399
- solution: h,
414
+ challenge: b,
415
+ solution: u,
400
416
  onClick: i,
401
- themeColor: d
417
+ themeColor: l
402
418
  }
403
419
  )
404
420
  }
405
421
  ),
406
- /* @__PURE__ */ l(
422
+ /* @__PURE__ */ d(
407
423
  "div",
408
424
  {
409
425
  style: {
@@ -411,24 +427,23 @@ const ve = {
411
427
  alignItems: "center",
412
428
  justifyContent: "space-between",
413
429
  lineHeight: 1.75,
414
- padding: `${g} 0 ${k} 0`
430
+ padding: `${g} 0 ${R} 0`
415
431
  },
416
- children: /* @__PURE__ */ H(
432
+ children: /* @__PURE__ */ P(
417
433
  "div",
418
434
  {
419
435
  style: {
420
436
  // expand to full height / width of parent
421
437
  width: "100%",
422
438
  height: "100%",
423
- // display children in flex, spreading them evenly and wrapping when row length exceeded
439
+ // display children in flex, spreading them evenly
424
440
  display: "flex",
425
441
  flexDirection: "row",
426
- flexWrap: "wrap",
427
442
  justifyContent: "space-between",
428
443
  gap: "10px"
429
444
  },
430
445
  children: [
431
- /* @__PURE__ */ l(
446
+ /* @__PURE__ */ d(
432
447
  "div",
433
448
  {
434
449
  style: {
@@ -437,19 +452,19 @@ const ve = {
437
452
  // make the width of each item 1/3rd of the width overall, i.e. 3 columns
438
453
  flexBasis: "calc(33.333% - 10px)"
439
454
  },
440
- children: /* @__PURE__ */ l(
441
- B,
455
+ children: /* @__PURE__ */ d(
456
+ F,
442
457
  {
443
- themeColor: d,
458
+ themeColor: l,
444
459
  buttonType: "cancel",
445
460
  onClick: t,
446
- text: u("WIDGET.CANCEL"),
447
- "aria-label": u("WIDGET.CANCEL")
461
+ text: h("WIDGET.CANCEL"),
462
+ "aria-label": h("WIDGET.CANCEL")
448
463
  }
449
464
  )
450
465
  }
451
466
  ),
452
- /* @__PURE__ */ l(
467
+ /* @__PURE__ */ d(
453
468
  "div",
454
469
  {
455
470
  style: {
@@ -458,10 +473,10 @@ const ve = {
458
473
  // make the width of each item 1/3rd of the width overall, i.e. 3 columns
459
474
  flexBasis: "calc(33.333% - 10px)"
460
475
  },
461
- children: /* @__PURE__ */ l(we, { themeColor: d, onReload: s })
476
+ children: /* @__PURE__ */ d(Te, { themeColor: l, onReload: s })
462
477
  }
463
478
  ),
464
- /* @__PURE__ */ l(
479
+ /* @__PURE__ */ d(
465
480
  "div",
466
481
  {
467
482
  style: {
@@ -470,14 +485,14 @@ const ve = {
470
485
  // make the width of each item 1/3rd of the width overall, i.e. 3 columns
471
486
  flexBasis: "calc(33.333% - 10px)"
472
487
  },
473
- children: /* @__PURE__ */ l(
474
- B,
488
+ children: /* @__PURE__ */ d(
489
+ F,
475
490
  {
476
- themeColor: d,
491
+ themeColor: l,
477
492
  buttonType: "next",
478
- text: e < r.captchas.length - 1 ? u("WIDGET.NEXT") : u("WIDGET.SUBMIT"),
479
- onClick: e < r.captchas.length - 1 ? a : n,
480
- "aria-label": e < r.captchas.length - 1 ? u("WIDGET.NEXT") : u("WIDGET.SUBMIT"),
493
+ text: e < r.captchas.length - 1 ? h("WIDGET.NEXT") : h("WIDGET.SUBMIT"),
494
+ onClick: e < r.captchas.length - 1 ? a : o,
495
+ "aria-label": e < r.captchas.length - 1 ? h("WIDGET.NEXT") : h("WIDGET.SUBMIT"),
481
496
  "data-cy": "button-next"
482
497
  }
483
498
  )
@@ -494,26 +509,26 @@ const ve = {
494
509
  }
495
510
  ) });
496
511
  };
497
- function Ee(r) {
498
- return W([
512
+ function Re(r) {
513
+ return U([
499
514
  r.captchaId,
500
515
  r.captchaContentId,
501
516
  [...r.solution].sort(),
502
517
  r.salt
503
518
  ]);
504
519
  }
505
- class z {
520
+ class V {
506
521
  constructor(e) {
507
522
  this.hash = e, this.parent = null;
508
523
  }
509
524
  }
510
- class Te {
525
+ class ke {
511
526
  constructor() {
512
527
  this.leaves = [], this.layers = [];
513
528
  }
514
529
  getRoot() {
515
530
  if (this.root === void 0)
516
- throw new v("DATASET.MERKLE_ERROR", {
531
+ throw new T("DATASET.MERKLE_ERROR", {
517
532
  context: {
518
533
  error: "root undefined",
519
534
  failedFuncName: this.getRoot.name
@@ -523,114 +538,112 @@ class Te {
523
538
  }
524
539
  build(e) {
525
540
  this.layers.length && (this.layers = []);
526
- const o = [];
527
- for (const n of e) {
528
- const t = new z(n);
529
- this.leaves.push(t), o.push(t.hash);
541
+ const n = [];
542
+ for (const o of e) {
543
+ const t = new V(o);
544
+ this.leaves.push(t), n.push(t.hash);
530
545
  }
531
- this.layers.push(o), this.root = this.buildMerkleTree(this.leaves)[0];
546
+ this.layers.push(n), this.root = this.buildMerkleTree(this.leaves)[0];
532
547
  }
533
548
  buildMerkleTree(e) {
534
- const o = e.length;
535
- if (o === 1)
549
+ const n = e.length;
550
+ if (n === 1)
536
551
  return e;
537
- const n = [];
552
+ const o = [];
538
553
  let t = 0;
539
554
  const i = [];
540
- for (; t < o; ) {
555
+ for (; t < n; ) {
541
556
  const a = e[t];
542
557
  if (a === void 0)
543
- throw new v("DEVELOPER.GENERAL", {
558
+ throw new T("DEVELOPER.GENERAL", {
544
559
  context: { error: "leftChild undefined" }
545
560
  });
546
- const s = t + 1 < o ? b(e, t + 1) : a, d = this.createParent(a, s);
547
- i.push(d.hash), n.push(d), t += 2;
561
+ const s = t + 1 < n ? v(e, t + 1) : a, l = this.createParent(a, s);
562
+ i.push(l.hash), o.push(l), t += 2;
548
563
  }
549
- return this.layers.push(i), this.buildMerkleTree(n);
564
+ return this.layers.push(i), this.buildMerkleTree(o);
550
565
  }
551
- createParent(e, o) {
552
- const n = new z(
553
- W([e.hash, o.hash])
554
- );
555
- return e.parent = n.hash, o.parent = n.hash, n;
566
+ createParent(e, n) {
567
+ const o = new V(U([e.hash, n.hash]));
568
+ return e.parent = o.hash, n.parent = o.hash, o;
556
569
  }
557
570
  proof(e) {
558
- const o = [];
559
- let n = 0;
560
- for (; n < this.layers.length - 1; ) {
561
- const i = this.layers[n];
571
+ const n = [];
572
+ let o = 0;
573
+ for (; o < this.layers.length - 1; ) {
574
+ const i = this.layers[o];
562
575
  if (i === void 0)
563
- throw new v("DATASET.MERKLE_ERROR", {
576
+ throw new T("DATASET.MERKLE_ERROR", {
564
577
  context: {
565
578
  error: "layer undefined",
566
579
  failedFuncName: this.proof.name,
567
- layerNum: n
580
+ layerNum: o
568
581
  }
569
582
  });
570
583
  const a = i.indexOf(e);
571
584
  let s = a % 2 && a > 0 ? a - 1 : a + 1;
572
585
  s > i.length - 1 && (s = a);
573
- const d = [e], u = b(i, s);
574
- s > a ? d.push(u) : d.unshift(u), o.push([b(d, 0), b(d, 1)]), n += 1, e = W(d);
586
+ const l = [e], h = v(i, s);
587
+ s > a ? l.push(h) : l.unshift(h), n.push([v(l, 0), v(l, 1)]), o += 1, e = U(l);
575
588
  }
576
- const t = b(this.layers, this.layers.length - 1);
577
- return [...o, [b(t, 0)]];
589
+ const t = v(this.layers, this.layers.length - 1);
590
+ return [...n, [v(t, 0)]];
578
591
  }
579
592
  }
580
- class F {
581
- constructor(e, o, n, t, i) {
582
- this.userAccount = e, this.provider = o, this.providerApi = n, this._web2 = t, this.dappAccount = i;
593
+ class X {
594
+ constructor(e, n, o, t, i) {
595
+ this.userAccount = e, this.provider = n, this.providerApi = o, this._web2 = t, this.dappAccount = i;
583
596
  }
584
597
  get web2() {
585
598
  return this._web2;
586
599
  }
587
600
  async getCaptchaChallenge(e) {
588
601
  try {
589
- const o = await this.providerApi.getCaptchaChallenge(
602
+ const n = await this.providerApi.getCaptchaChallenge(
590
603
  this.userAccount,
591
604
  this.provider,
592
605
  e
593
606
  );
594
- if (o[w.error])
595
- return o;
596
- for (const n of o.captchas)
597
- for (const t of n.items)
607
+ if (n[A.error])
608
+ return n;
609
+ for (const o of n.captchas)
610
+ for (const t of o.items)
598
611
  t.data && (t.data = `https://${t.data.replace(/^http(s)*:\/\//, "")}`);
599
- return o;
600
- } catch (o) {
601
- throw new N("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
602
- context: { error: o }
612
+ return n;
613
+ } catch (n) {
614
+ throw new H("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
615
+ context: { error: n }
603
616
  });
604
617
  }
605
618
  }
606
- async submitCaptchaSolution(e, o, n, t, i) {
607
- const a = new Te(), s = n.map(
608
- (C) => Ee(C)
619
+ async submitCaptchaSolution(e, n, o, t, i) {
620
+ const a = new ke(), s = o.map(
621
+ (b) => Re(b)
609
622
  );
610
623
  if (a.build(s), !a.root)
611
624
  throw new _("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
612
625
  context: { error: "Merkle tree root is undefined" }
613
626
  });
614
- const d = a.root.hash;
615
- let u;
627
+ const l = a.root.hash;
628
+ let h;
616
629
  try {
617
- u = await this.providerApi.submitCaptchaSolution(
618
- n,
630
+ h = await this.providerApi.submitCaptchaSolution(
619
631
  o,
632
+ n,
620
633
  this.userAccount,
621
634
  t,
622
635
  i,
623
636
  e
624
637
  );
625
- } catch (C) {
638
+ } catch (b) {
626
639
  throw new _("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
627
- context: { error: C }
640
+ context: { error: b }
628
641
  });
629
642
  }
630
- return [u, d];
643
+ return [h, l];
631
644
  }
632
645
  }
633
- const Ie = () => ({
646
+ const Le = () => ({
634
647
  // note order matters! see buildUpdateState. These fields are set in order, so disable modal first, then set loading to false, etc.
635
648
  showModal: !1,
636
649
  loading: !1,
@@ -642,17 +655,17 @@ const Ie = () => ({
642
655
  account: void 0
643
656
  // don't handle timeout here, this should be handled by the state management
644
657
  });
645
- function Ne(r, e, o, n, t) {
646
- const i = oe(n), a = he(e, o), s = () => {
658
+ function _e(r, e, n, o, t) {
659
+ const i = ie(o), a = we(e, n), s = () => {
647
660
  const c = {
648
661
  userAccountAddress: "",
649
662
  ...r
650
663
  };
651
- return e.account && (c.userAccountAddress = e.account.account.address), X.parse(c);
652
- }, d = async () => {
653
- i.onOpen(), await U(
664
+ return e.account && (c.userAccountAddress = e.account.account.address), Q.parse(c);
665
+ }, l = async () => {
666
+ i.onOpen(), await z(
654
667
  async () => {
655
- var P;
668
+ var I;
656
669
  if (e.loading || e.isHuman)
657
670
  return;
658
671
  a({ loading: !0 }), a({
@@ -661,25 +674,25 @@ function Ne(r, e, o, n, t) {
661
674
  sessionId: t == null ? void 0 : t.sessionId
662
675
  });
663
676
  const c = s();
664
- a({ dappAccount: c.account.address }), await de(100);
665
- const f = await Y();
677
+ a({ dappAccount: c.account.address }), await me(100);
678
+ const m = await ee();
666
679
  let x = e.captchaApi;
667
680
  if (t != null && t.provider) {
668
- const I = t.provider.provider.url, y = await g(I);
669
- x = new F(
670
- f.account.address,
681
+ const w = t.provider.provider.url, y = await g(w);
682
+ x = new X(
683
+ m.account.address,
671
684
  t.provider,
672
685
  y,
673
686
  c.web2,
674
687
  c.account.address || ""
675
688
  ), a({ captchaApi: x });
676
689
  } else {
677
- const I = await ne(
678
- s()
679
- ), y = I.provider.url, E = await g(y);
680
- x = new F(
681
- f.account.address,
682
- I,
690
+ const w = await ce(
691
+ s().defaultEnvironment
692
+ ), y = w.provider.url, E = await g(y);
693
+ x = new X(
694
+ m.account.address,
695
+ w,
683
696
  E,
684
697
  c.web2,
685
698
  c.account.address || ""
@@ -695,15 +708,15 @@ function Ne(r, e, o, n, t) {
695
708
  message: p.error.message,
696
709
  key: p.error.key || "API.UNKNOWN_ERROR"
697
710
  }
698
- }), i.onError(new Error((P = p.error) == null ? void 0 : P.message));
711
+ }), i.onError(new Error((I = p.error) == null ? void 0 : I.message));
699
712
  else {
700
713
  if (p.captchas.length <= 0)
701
714
  throw new _("DEVELOPER.PROVIDER_NO_CAPTCHA");
702
- const I = p.captchas.map(
715
+ const w = p.captchas.map(
703
716
  (E) => E.timeLimitMs || c.captchas.image.challengeTimeout
704
- ).reduce((E, L) => E + L), y = setTimeout(() => {
717
+ ).reduce((E, W) => E + W), y = setTimeout(() => {
705
718
  i.onChallengeExpired(), a({ isHuman: !1, showModal: !1, loading: !1 });
706
- }, I);
719
+ }, w);
707
720
  a({
708
721
  index: 0,
709
722
  solutions: p.captchas.map(() => []),
@@ -714,169 +727,176 @@ function Ne(r, e, o, n, t) {
714
727
  });
715
728
  }
716
729
  },
717
- d,
718
- R,
730
+ l,
731
+ L,
719
732
  e.attemptCount,
720
733
  10
721
734
  );
722
- }, u = async () => {
723
- await U(
735
+ }, h = async () => {
736
+ await z(
724
737
  async () => {
725
- if (T(), !e.challenge)
726
- throw new v("CAPTCHA.NO_CAPTCHA", {
738
+ if (N(), !e.challenge)
739
+ throw new T("CAPTCHA.NO_CAPTCHA", {
727
740
  context: { error: "Cannot submit, no Captcha found in state" }
728
741
  });
729
742
  a({ showModal: !1 });
730
- const c = e.challenge, f = fe(), x = e.challenge.captchas.map(
731
- (O, ee) => {
732
- const te = b(e.solutions, ee);
743
+ const c = e.challenge, m = e.challenge.captchas.map(
744
+ (O, oe) => {
745
+ const B = v(e.solutions, oe), j = B.flatMap(([k, $, se]) => [$, se]), ae = ye(
746
+ j.map((k) => k.toString(16).length + 4).reduce((k, $) => k + $, 0)
747
+ ), re = pe(ae, j);
733
748
  return {
734
749
  captchaId: O.captchaId,
735
750
  captchaContentId: O.captchaContentId,
736
- salt: f,
737
- solution: te
751
+ salt: re,
752
+ solution: B.flatMap((k) => k[0])
738
753
  };
739
754
  }
740
- ), p = G(), P = Q(p).signer;
741
- if (!b(c.captchas, 0).datasetId)
755
+ ), x = G(), p = ne(x).signer;
756
+ if (!v(c.captchas, 0).datasetId)
742
757
  throw new _("CAPTCHA.INVALID_CAPTCHA_ID", {
743
758
  context: { error: "No datasetId set for challenge" }
744
759
  });
745
- const y = e.captchaApi;
746
- if (!y)
747
- throw new v("CAPTCHA.INVALID_TOKEN", {
760
+ const w = e.captchaApi;
761
+ if (!w)
762
+ throw new T("CAPTCHA.INVALID_TOKEN", {
748
763
  context: { error: "No Captcha API found in state" }
749
764
  });
750
- if (!P || !P.signRaw)
751
- throw new N("GENERAL.CANT_FIND_KEYRINGPAIR", {
765
+ if (!p || !p.signRaw)
766
+ throw new H("GENERAL.CANT_FIND_KEYRINGPAIR", {
752
767
  context: {
753
768
  error: "Signer is not defined, cannot sign message to prove account ownership"
754
769
  }
755
770
  });
756
- const E = await P.signRaw({
757
- address: p.account.address,
758
- data: me(c[w.timestamp]),
771
+ const y = await p.signRaw({
772
+ address: x.account.address,
773
+ data: Ae(c[A.timestamp]),
759
774
  type: "bytes"
760
- }), L = await y.submitCaptchaSolution(
761
- E.signature,
775
+ }), E = await w.submitCaptchaSolution(
776
+ y.signature,
762
777
  c.requestHash,
763
- x,
778
+ m,
764
779
  c.timestamp,
765
780
  c.signature.provider.requestHash
766
- ), J = L[0].verified;
781
+ ), W = E[0].verified;
767
782
  if (a({
768
- submission: L,
769
- isHuman: J,
783
+ submission: E,
784
+ isHuman: W,
770
785
  loading: !1
771
786
  }), e.isHuman) {
772
- const O = y.provider.provider.url;
787
+ const O = w.provider.provider.url;
773
788
  i.onHuman(
774
- ce({
775
- [w.providerUrl]: O,
776
- [w.user]: p.account.address,
777
- [w.dapp]: Z(),
778
- [w.commitmentId]: le(L[1]),
779
- [w.timestamp]: c.timestamp,
780
- [w.signature]: {
781
- [w.provider]: {
782
- [w.requestHash]: c.signature.provider.requestHash
789
+ ge({
790
+ [A.providerUrl]: O,
791
+ [A.user]: x.account.address,
792
+ [A.dapp]: te(),
793
+ [A.commitmentId]: fe(E[1]),
794
+ [A.timestamp]: c.timestamp,
795
+ [A.signature]: {
796
+ [A.provider]: {
797
+ [A.requestHash]: c.signature.provider.requestHash
783
798
  },
784
- [w.user]: {
785
- [w.timestamp]: E.signature
799
+ [A.user]: {
800
+ [A.timestamp]: y.signature
786
801
  }
787
802
  }
788
803
  })
789
804
  ), S();
790
805
  } else
791
- i.onFailed(), R(t == null ? void 0 : t.restart);
806
+ i.onFailed(), L(t == null ? void 0 : t.restart);
792
807
  },
793
- d,
794
- R,
808
+ l,
809
+ L,
795
810
  e.attemptCount,
796
811
  10
797
812
  );
798
- }, C = async () => {
799
- T(), R(t == null ? void 0 : t.restart), i.onClose();
800
- }, h = async () => {
801
- T(), i.onReload(), R(t == null ? void 0 : t.restart), t != null && t.restart || await d();
802
- }, A = (c) => {
813
+ }, b = async () => {
814
+ N(), L(t == null ? void 0 : t.restart), i.onClose();
815
+ }, u = async () => {
816
+ N(), i.onReload(), L(t == null ? void 0 : t.restart), t != null && t.restart || await l();
817
+ }, f = (c, m, x) => {
803
818
  if (!e.challenge)
804
- throw new v("CAPTCHA.NO_CAPTCHA", {
819
+ throw new T("CAPTCHA.NO_CAPTCHA", {
805
820
  context: { error: "Cannot select, no Captcha found in state" }
806
821
  });
807
822
  if (e.index >= e.challenge.captchas.length || e.index < 0)
808
- throw new v("CAPTCHA.NO_CAPTCHA", {
823
+ throw new T("CAPTCHA.NO_CAPTCHA", {
809
824
  context: {
810
825
  error: "Cannot select, index is out of range for this Captcha"
811
826
  }
812
827
  });
813
- const f = e.index, x = e.solutions, p = b(x, f);
814
- p.includes(c) ? p.splice(p.indexOf(c), 1) : p.push(c), a({ solutions: x });
815
- }, k = () => {
828
+ const p = e.index, I = e.solutions, w = v(I, p);
829
+ if (w.some((y) => y[0] === c)) {
830
+ const y = w.filter((E) => E[0] !== c);
831
+ I[p] = y;
832
+ } else
833
+ I[p] = [...w, [c, m || 0, x || 0]];
834
+ a({ solutions: I });
835
+ }, R = () => {
816
836
  if (!e.challenge)
817
- throw new v("CAPTCHA.NO_CAPTCHA", {
837
+ throw new T("CAPTCHA.NO_CAPTCHA", {
818
838
  context: { error: "Cannot select, no Captcha found in state" }
819
839
  });
820
840
  if (e.index + 1 >= e.challenge.captchas.length)
821
- throw new v("CAPTCHA.NO_CAPTCHA", {
841
+ throw new T("CAPTCHA.NO_CAPTCHA", {
822
842
  context: {
823
843
  error: "Cannot select, index is out of range for this Captcha"
824
844
  }
825
845
  });
826
846
  a({ index: e.index + 1 });
827
847
  }, g = async (c) => {
828
- const f = s();
829
- if (!f.account.address)
830
- throw new N("GENERAL.SITE_KEY_MISSING");
831
- return new ae(c, f.account.address);
832
- }, T = () => {
848
+ const m = s();
849
+ if (!m.account.address)
850
+ throw new H("GENERAL.SITE_KEY_MISSING");
851
+ return new le(c, m.account.address);
852
+ }, N = () => {
833
853
  window.clearTimeout(Number(e.timeout)), a({ timeout: void 0 });
834
854
  }, S = () => {
835
- const c = r.captchas.image.solutionTimeout, f = setTimeout(() => {
855
+ const c = r.captchas.image.solutionTimeout, m = setTimeout(() => {
836
856
  a({ isHuman: !1 }), i.onExpired();
837
857
  }, c);
838
- a({ successfullChallengeTimeout: f });
839
- }, R = (c) => {
840
- T(), a(Ie()), i.onReset(), c && c();
841
- }, Y = async () => {
858
+ a({ successfullChallengeTimeout: m });
859
+ }, L = (c) => {
860
+ N(), a(Le()), i.onReset(), c && c();
861
+ }, ee = async () => {
842
862
  const c = s();
843
863
  if (!c.web2 && !c.userAccountAddress)
844
- throw new N("GENERAL.ACCOUNT_NOT_FOUND", {
864
+ throw new H("GENERAL.ACCOUNT_NOT_FOUND", {
845
865
  context: { error: "Account address has not been set for web3 mode" }
846
866
  });
847
867
  const x = await (async () => {
848
- const p = new (await re(c.web2))();
868
+ const p = new (await de(c.web2))();
849
869
  return t ? t.userAccount : await p.getAccount(c);
850
870
  })();
851
871
  return a({ account: x }), G();
852
872
  }, G = () => {
853
873
  if (!e.account)
854
- throw new N("GENERAL.ACCOUNT_NOT_FOUND", {
874
+ throw new H("GENERAL.ACCOUNT_NOT_FOUND", {
855
875
  context: { error: "Account not loaded" }
856
876
  });
857
877
  return e.account;
858
- }, Z = () => {
878
+ }, te = () => {
859
879
  if (!e.dappAccount)
860
- throw new N("GENERAL.SITE_KEY_MISSING");
880
+ throw new H("GENERAL.SITE_KEY_MISSING");
861
881
  return e.dappAccount;
862
- }, Q = (c) => {
863
- const f = c || G();
864
- if (!f.extension)
865
- throw new N("ACCOUNT.NO_POLKADOT_EXTENSION", {
882
+ }, ne = (c) => {
883
+ const m = c || G();
884
+ if (!m.extension)
885
+ throw new H("ACCOUNT.NO_POLKADOT_EXTENSION", {
866
886
  context: { error: "Extension not loaded" }
867
887
  });
868
- return f.extension;
888
+ return m.extension;
869
889
  };
870
890
  return {
871
- start: d,
872
- cancel: C,
873
- submit: u,
874
- select: A,
875
- nextRound: k,
876
- reload: h
891
+ start: l,
892
+ cancel: b,
893
+ submit: h,
894
+ select: f,
895
+ nextRound: R,
896
+ reload: u
877
897
  };
878
898
  }
879
- const He = se`
899
+ const Me = ue`
880
900
  position: absolute;
881
901
  top: 50%;
882
902
  left: 50%;
@@ -895,8 +915,8 @@ const He = se`
895
915
  @supports (-webkit-touch-callout: none) {
896
916
  transform: translate(-50%, -100%);
897
917
  }
898
- `, j = ue.memo((r) => {
899
- const { show: e, children: o } = r, t = {
918
+ `, Y = xe.memo((r) => {
919
+ const { show: e, children: n } = r, t = {
900
920
  position: "fixed",
901
921
  zIndex: 2147483646,
902
922
  inset: 0,
@@ -905,88 +925,88 @@ const He = se`
905
925
  justifyContent: "center",
906
926
  minHeight: "100vh"
907
927
  };
908
- return xe.createPortal(
909
- /* @__PURE__ */ l("div", { className: "prosopo-modalOuter", style: t, children: /* @__PURE__ */ l("div", { className: "prosopo-modalInner", css: He, children: o }) }),
928
+ return ve.createPortal(
929
+ /* @__PURE__ */ d("div", { className: "prosopo-modalOuter", style: t, children: /* @__PURE__ */ d("div", { className: "prosopo-modalInner", css: Me, children: n }) }),
910
930
  document.body
911
931
  );
912
- }), K = "procaptcha:execute", Se = (r) => {
913
- var k;
914
- const { t: e, ready: o } = V(), n = X.parse(r.config), t = r.frictionlessState, i = r.i18n, a = r.callbacks || {}, [s, d] = ge(m.useState, m.useRef), [u, C] = m.useState(!1), h = Ne(
915
- n,
932
+ }), q = "procaptcha:execute", je = (r) => {
933
+ var R;
934
+ const { t: e, ready: n } = Z(), o = Q.parse(r.config), t = r.frictionlessState, i = r.i18n, a = r.callbacks || {}, [s, l] = be(C.useState, C.useRef), [h, b] = C.useState(!1), u = _e(
935
+ o,
916
936
  s,
917
- d,
937
+ l,
918
938
  a,
919
939
  t
920
- ), A = r.config.theme === "light" ? M : D;
921
- return m.useEffect(() => {
922
- n.language && (i ? i.language !== n.language && i.changeLanguage(n.language).then((g) => g) : pe().then((g) => {
923
- g.language !== n.language && g.changeLanguage(n.language).then((T) => T);
940
+ ), f = r.config.theme === "light" ? M : D;
941
+ return C.useEffect(() => {
942
+ o.language && (i ? i.language !== o.language && i.changeLanguage(o.language).then((g) => g) : Ce().then((g) => {
943
+ g.language !== o.language && g.changeLanguage(o.language).then((N) => N);
924
944
  }));
925
- }, [i, n.language]), m.useEffect(() => {
926
- s.error && (C(!1), s.error.key === "CAPTCHA.NO_SESSION_FOUND" && t && setTimeout(() => {
945
+ }, [i, o.language]), C.useEffect(() => {
946
+ s.error && (b(!1), s.error.key === "CAPTCHA.NO_SESSION_FOUND" && t && setTimeout(() => {
927
947
  t.restart();
928
948
  }, 3e3));
929
- }, [s.error, t]), m.useEffect(() => {
930
- const g = (T) => {
931
- if (d({
949
+ }, [s.error, t]), C.useEffect(() => {
950
+ const g = (N) => {
951
+ if (l({
932
952
  showModal: !0
933
- }), !s.challenge && h.start)
953
+ }), !s.challenge && u.start)
934
954
  try {
935
- h.start();
955
+ u.start();
936
956
  } catch (S) {
937
957
  console.error("Error starting verification:", S);
938
958
  }
939
959
  };
940
- return document.addEventListener(K, g), () => {
960
+ return document.addEventListener(q, g), () => {
941
961
  document.removeEventListener(
942
- K,
962
+ q,
943
963
  g
944
964
  );
945
965
  };
946
- }, [h, s.challenge, d]), n.mode === "invisible" ? /* @__PURE__ */ l(j, { show: s.showModal, children: s.challenge ? /* @__PURE__ */ l(
947
- $,
966
+ }, [u, s.challenge, l]), o.mode === "invisible" ? /* @__PURE__ */ d(Y, { show: s.showModal, children: s.challenge ? /* @__PURE__ */ d(
967
+ K,
948
968
  {
949
969
  challenge: s.challenge,
950
970
  index: s.index,
951
971
  solutions: s.solutions,
952
- onSubmit: h.submit,
953
- onCancel: h.cancel,
954
- onClick: h.select,
955
- onNext: h.nextRound,
956
- onReload: h.reload,
957
- themeColor: n.theme ?? "light"
972
+ onSubmit: u.submit,
973
+ onCancel: u.cancel,
974
+ onClick: u.select,
975
+ onNext: u.nextRound,
976
+ onReload: u.reload,
977
+ themeColor: o.theme ?? "light"
958
978
  }
959
- ) : null }) : /* @__PURE__ */ H("div", { className: "image-captcha", children: [
960
- /* @__PURE__ */ l(j, { show: s.showModal, children: s.challenge ? /* @__PURE__ */ l(
961
- $,
979
+ ) : null }) : /* @__PURE__ */ P("div", { className: "image-captcha", children: [
980
+ /* @__PURE__ */ d(Y, { show: s.showModal, children: s.challenge ? /* @__PURE__ */ d(
981
+ K,
962
982
  {
963
983
  challenge: s.challenge,
964
984
  index: s.index,
965
985
  solutions: s.solutions,
966
- onSubmit: h.submit,
967
- onCancel: h.cancel,
968
- onClick: h.select,
969
- onNext: h.nextRound,
970
- onReload: h.reload,
971
- themeColor: n.theme ?? "light"
986
+ onSubmit: u.submit,
987
+ onCancel: u.cancel,
988
+ onClick: u.select,
989
+ onNext: u.nextRound,
990
+ onReload: u.reload,
991
+ themeColor: o.theme ?? "light"
972
992
  }
973
- ) : /* @__PURE__ */ l("div", { children: "No challenge set." }) }),
974
- /* @__PURE__ */ l(
975
- ie,
993
+ ) : /* @__PURE__ */ d("div", { children: "No challenge set." }) }),
994
+ /* @__PURE__ */ d(
995
+ he,
976
996
  {
977
- theme: A,
978
- onChange: async () => {
979
- u || (C(!0), await h.start(), C(!1));
997
+ theme: f,
998
+ onChange: async (g) => {
999
+ g.isTrusted && (h || (b(!0), await u.start(), b(!1)));
980
1000
  },
981
1001
  checked: s.isHuman,
982
- labelText: o ? e("WIDGET.I_AM_HUMAN") : "",
983
- error: (k = s.error) == null ? void 0 : k.message,
1002
+ labelText: n ? e("WIDGET.I_AM_HUMAN") : "",
1003
+ error: (R = s.error) == null ? void 0 : R.message,
984
1004
  "aria-label": "human checkbox",
985
- loading: u
1005
+ loading: h
986
1006
  }
987
1007
  )
988
1008
  ] });
989
1009
  };
990
1010
  export {
991
- Se as default
1011
+ je as default
992
1012
  };