@prosopo/procaptcha-bundle 3.1.6 → 3.2.3

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 (174) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/dist/cjs/index.cjs +10 -1
  3. package/dist/cjs/util/configCreator.cjs +0 -1
  4. package/dist/index.js +10 -1
  5. package/dist/util/configCreator.js +0 -1
  6. package/package.json +16 -16
  7. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +0 -5
  8. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +0 -1
  9. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/components.js +0 -5
  10. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +0 -1
  11. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +0 -16
  12. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +0 -1
  13. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js +0 -135
  14. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +0 -1
  15. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts +0 -2
  16. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -1
  17. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +0 -36
  18. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +0 -1
  19. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts +0 -2
  20. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts.map +0 -1
  21. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js +0 -69
  22. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js.map +0 -1
  23. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts +0 -2
  24. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -1
  25. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +0 -136
  26. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +0 -1
  27. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -8
  28. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +0 -1
  29. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +0 -15
  30. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +0 -1
  31. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -6
  32. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -1
  33. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js +0 -11
  34. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +0 -1
  35. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts +0 -10
  36. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +0 -1
  37. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +0 -2
  38. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +0 -1
  39. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +0 -24
  40. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +0 -1
  41. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +0 -49
  42. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +0 -1
  43. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +0 -3
  44. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +0 -1
  45. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js +0 -8
  46. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +0 -1
  47. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -4
  48. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
  49. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +0 -14
  50. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +0 -1
  51. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -4
  52. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -1
  53. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js +0 -9
  54. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +0 -1
  55. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -4
  56. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -1
  57. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js +0 -9
  58. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +0 -1
  59. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -6
  60. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +0 -1
  61. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -13
  62. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +0 -1
  63. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +0 -5
  64. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +0 -1
  65. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +0 -24
  66. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +0 -1
  67. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts +0 -3
  68. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts.map +0 -1
  69. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js +0 -17
  70. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +0 -1
  71. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts +0 -3
  72. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts.map +0 -1
  73. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js +0 -9
  74. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js.map +0 -1
  75. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +0 -18
  76. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +0 -1
  77. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +0 -66
  78. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +0 -1
  79. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +0 -9
  80. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -1
  81. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +0 -19
  82. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +0 -1
  83. package/dist/bundle/ProcaptchaWidget-CJ-4hVS1.js +0 -187
  84. package/dist/bundle/ProcaptchaWidget-Cw3s7cGX.js +0 -1014
  85. package/dist/bundle/Signer-DP9drQ55.js +0 -23
  86. package/dist/bundle/bnChunk-DRlDxTFg.js +0 -1137
  87. package/dist/bundle/browser-ponyfill-CvzSbL_o.js +0 -339
  88. package/dist/bundle/builder-ByZ5z580.js +0 -46
  89. package/dist/bundle/captchaComponentProvider-Cn75EmSH.js +0 -1002
  90. package/dist/bundle/captchaRenderer-s4QuLEen.js +0 -71
  91. package/dist/bundle/commonChunk-BjvuHlB1.js +0 -180
  92. package/dist/bundle/components.d.ts +0 -5
  93. package/dist/bundle/components.d.ts.map +0 -1
  94. package/dist/bundle/emotion-element-c39617d8.browser.esm-BNNnmykm.js +0 -916
  95. package/dist/bundle/fp.esm-DYWeNGcH.js +0 -1654
  96. package/dist/bundle/index-BuQg3Zno.js +0 -1884
  97. package/dist/bundle/index-DIdd2cUz.js +0 -5416
  98. package/dist/bundle/index-IgqrmVIs.js +0 -601
  99. package/dist/bundle/index.d.ts +0 -16
  100. package/dist/bundle/index.d.ts.map +0 -1
  101. package/dist/bundle/locales/ar/translation.json +0 -57
  102. package/dist/bundle/locales/az/translation.json +0 -57
  103. package/dist/bundle/locales/cs/translation.json +0 -57
  104. package/dist/bundle/locales/de/translation.json +0 -57
  105. package/dist/bundle/locales/el/translation.json +0 -57
  106. package/dist/bundle/locales/en/translation.json +0 -57
  107. package/dist/bundle/locales/es/translation.json +0 -57
  108. package/dist/bundle/locales/fi/translation.json +0 -57
  109. package/dist/bundle/locales/fr/translation.json +0 -57
  110. package/dist/bundle/locales/hi/translation.json +0 -57
  111. package/dist/bundle/locales/hu/translation.json +0 -57
  112. package/dist/bundle/locales/id/translation.json +0 -57
  113. package/dist/bundle/locales/it/translation.json +0 -57
  114. package/dist/bundle/locales/ja/translation.json +0 -57
  115. package/dist/bundle/locales/jv/translation.json +0 -57
  116. package/dist/bundle/locales/ko/translation.json +0 -57
  117. package/dist/bundle/locales/ml/translation.json +0 -57
  118. package/dist/bundle/locales/ms/translation.json +0 -57
  119. package/dist/bundle/locales/nl/translation.json +0 -57
  120. package/dist/bundle/locales/no/translation.json +0 -57
  121. package/dist/bundle/locales/pl/translation.json +0 -57
  122. package/dist/bundle/locales/pt/translation.json +0 -57
  123. package/dist/bundle/locales/pt-BR/translation.json +0 -57
  124. package/dist/bundle/locales/ro/translation.json +0 -57
  125. package/dist/bundle/locales/ru/translation.json +0 -57
  126. package/dist/bundle/locales/sr/translation.json +0 -57
  127. package/dist/bundle/locales/sv/translation.json +0 -57
  128. package/dist/bundle/locales/th/translation.json +0 -57
  129. package/dist/bundle/locales/tr/translation.json +0 -57
  130. package/dist/bundle/locales/uk/translation.json +0 -57
  131. package/dist/bundle/locales/vi/translation.json +0 -57
  132. package/dist/bundle/locales/zh-CN/translation.json +0 -57
  133. package/dist/bundle/nobleChunk-Bbltwf44.js +0 -2728
  134. package/dist/bundle/procaptcha.bundle.js +0 -8
  135. package/dist/bundle/tests/util/captchaType.test.d.ts +0 -2
  136. package/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -1
  137. package/dist/bundle/tests/util/config.test.d.ts +0 -2
  138. package/dist/bundle/tests/util/config.test.d.ts.map +0 -1
  139. package/dist/bundle/tests/util/renderLogic.test.d.ts +0 -2
  140. package/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -1
  141. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -8
  142. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +0 -1
  143. package/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -6
  144. package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -1
  145. package/dist/bundle/util/captcha/captchaProps.d.ts +0 -10
  146. package/dist/bundle/util/captcha/captchaProps.d.ts.map +0 -1
  147. package/dist/bundle/util/captcha/captchaRenderer.d.ts +0 -24
  148. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +0 -1
  149. package/dist/bundle/util/captcha/captchaType.d.ts +0 -3
  150. package/dist/bundle/util/captcha/captchaType.d.ts.map +0 -1
  151. package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -4
  152. package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
  153. package/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -4
  154. package/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -1
  155. package/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -4
  156. package/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -1
  157. package/dist/bundle/util/config.d.ts +0 -6
  158. package/dist/bundle/util/config.d.ts.map +0 -1
  159. package/dist/bundle/util/configCreator.d.ts +0 -5
  160. package/dist/bundle/util/configCreator.d.ts.map +0 -1
  161. package/dist/bundle/util/language.d.ts +0 -3
  162. package/dist/bundle/util/language.d.ts.map +0 -1
  163. package/dist/bundle/util/timeout.d.ts +0 -3
  164. package/dist/bundle/util/timeout.d.ts.map +0 -1
  165. package/dist/bundle/util/widgetFactory.d.ts +0 -18
  166. package/dist/bundle/util/widgetFactory.d.ts.map +0 -1
  167. package/dist/bundle/util/widgetThemeResolver.d.ts +0 -9
  168. package/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -1
  169. package/dist/bundle/utilChunk-DPr6oTOj.js +0 -317
  170. package/dist/bundle/utilCryptoChunk-D6ZLkbFV.js +0 -1236
  171. package/dist/bundle/web2Chunk-CNoojUDK.js +0 -3967
  172. package/dist/bundle/web3Chunk-BlYvY4Ea.js +0 -525
  173. package/dist/bundle/zodChunk-aEfPZzrp.js +0 -2882
  174. package/stats.html +0 -4842
@@ -1,8 +0,0 @@
1
- import { a as s, e as t, r as o, b as d } from "./index-IgqrmVIs.js";
2
- import "./web2Chunk-CNoojUDK.js";
3
- export {
4
- s as default,
5
- t as execute,
6
- o as render,
7
- d as reset
8
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=captchaType.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"captchaType.test.d.ts","sourceRoot":"","sources":["../../../../src/tests/util/captchaType.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=config.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.test.d.ts","sourceRoot":"","sources":["../../../../src/tests/util/config.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=renderLogic.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderLogic.test.d.ts","sourceRoot":"","sources":["../../../../src/tests/util/renderLogic.test.tsx"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import { CaptchaType } from "@prosopo/types";
2
- import type { ReactNode } from "react";
3
- import type { CaptchaProps } from "./captchaProps.js";
4
- declare class CaptchaComponentProvider {
5
- getCaptchaComponent(captchaType: CaptchaType, captchaProps: CaptchaProps): ReactNode;
6
- }
7
- export { CaptchaComponentProvider };
8
- //# sourceMappingURL=captchaComponentProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"captchaComponentProvider.d.ts","sourceRoot":"","sources":["../../../../src/util/captcha/captchaComponentProvider.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,cAAM,wBAAwB;IACtB,mBAAmB,CACzB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,GACxB,SAAS;CAkBZ;AAED,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,6 +0,0 @@
1
- import { CaptchaType } from "@prosopo/types";
2
- import type React from "react";
3
- import type { CaptchaProps } from "./captchaProps.js";
4
- declare const captchaComponentsList: Pick<Record<CaptchaType, React.ComponentType<CaptchaProps>>, CaptchaType.image | CaptchaType.pow | CaptchaType.frictionless>;
5
- export { captchaComponentsList };
6
- //# sourceMappingURL=captchaComponentsList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"captchaComponentsList.d.ts","sourceRoot":"","sources":["../../../../src/util/captcha/captchaComponentsList.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,QAAA,MAAM,qBAAqB,EAAE,IAAI,CAChC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,EACtD,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,YAAY,CAK9D,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { Ti18n } from "@prosopo/locale";
2
- import type { ProcaptchaCallbacks, ProcaptchaClientConfigInput } from "@prosopo/types";
3
- interface CaptchaProps {
4
- config: ProcaptchaClientConfigInput;
5
- callbacks: ProcaptchaCallbacks;
6
- i18n: Ti18n;
7
- container: HTMLElement;
8
- }
9
- export type { CaptchaProps };
10
- //# sourceMappingURL=captchaProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"captchaProps.d.ts","sourceRoot":"","sources":["../../../../src/util/captcha/captchaProps.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EACX,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,gBAAgB,CAAC;AAExB,UAAU,YAAY;IACrB,MAAM,EAAE,2BAA2B,CAAC;IACpC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,WAAW,CAAC;CACvB;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -1,24 +0,0 @@
1
- import { type EmotionCache } from "@emotion/cache";
2
- import type { Ti18n } from "@prosopo/locale";
3
- import type { Callbacks, ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
4
- import type { CaptchaType } from "@prosopo/types";
5
- import type { ReactNode } from "react";
6
- import { type Root } from "react-dom/client";
7
- import type { CaptchaComponentProvider } from "./captchaComponentProvider.js";
8
- interface RenderSettings {
9
- identifierPrefix: string;
10
- emotionCacheKey: string;
11
- webComponentTag: string;
12
- defaultCaptchaType: CaptchaType;
13
- }
14
- declare class CaptchaRenderer {
15
- private readonly captchaComponentProvider;
16
- constructor(captchaComponentProvider: CaptchaComponentProvider);
17
- renderCaptcha(settings: RenderSettings, container: HTMLElement, renderOptions: ProcaptchaRenderOptions, callbacks: Callbacks, isWeb2: boolean, i18n: Ti18n, invisible: boolean, widgetContainer: HTMLElement): Root;
18
- protected readAndValidateSettings(element: Element, config: ProcaptchaClientConfigOutput, renderOptions: ProcaptchaRenderOptions): void;
19
- protected makeEmotionCache(cacheKey: string, container: HTMLElement): EmotionCache;
20
- protected createReactRoot(container: HTMLElement, identifierPrefix: string): Root;
21
- protected renderCaptchaComponent(reactRoot: Root, emotionCache: EmotionCache, captchaComponent: ReactNode): void;
22
- }
23
- export { CaptchaRenderer };
24
- //# sourceMappingURL=captchaRenderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":"AAcA,OAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EACX,SAAS,EACT,4BAA4B,EAC5B,uBAAuB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,kBAAkB,CAAC;AAIzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E,UAAU,cAAc;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,WAAW,CAAC;CAChC;AAED,cAAM,eAAe;IACpB,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAA2B;gBAExD,wBAAwB,EAAE,wBAAwB;IAIvD,aAAa,CACnB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,WAAW,EACtB,aAAa,EAAE,uBAAuB,EACtC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,OAAO,EAClB,eAAe,EAAE,WAAW,GAC1B,IAAI;IAwCP,SAAS,CAAC,uBAAuB,CAChC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,4BAA4B,EACpC,aAAa,EAAE,uBAAuB,GACpC,IAAI;IAKP,SAAS,CAAC,gBAAgB,CACzB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,WAAW,GACpB,YAAY;IAQf,SAAS,CAAC,eAAe,CACxB,SAAS,EAAE,WAAW,EACtB,gBAAgB,EAAE,MAAM,GACtB,IAAI;IAMP,SAAS,CAAC,sBAAsB,CAC/B,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,SAAS,GACzB,IAAI;CAKP;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { CaptchaType } from "@prosopo/types";
2
- export declare function getCaptchaType(elements: Element[]): CaptchaType;
3
- //# sourceMappingURL=captchaType.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"captchaType.d.ts","sourceRoot":"","sources":["../../../../src/util/captcha/captchaType.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAS7C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,eAQjD"}
@@ -1,4 +0,0 @@
1
- import type { CaptchaProps } from "../captchaProps.js";
2
- declare const FrictionlessCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
3
- export { FrictionlessCaptcha };
4
- //# sourceMappingURL=frictionlessCaptcha.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frictionlessCaptcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/captcha/components/frictionlessCaptcha.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,QAAA,MAAM,mBAAmB,UAAW,YAAY,4CAmB/C,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { CaptchaProps } from "../captchaProps.js";
2
- declare const ImageCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
3
- export { ImageCaptcha };
4
- //# sourceMappingURL=imageCaptcha.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"imageCaptcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/captcha/components/imageCaptcha.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,QAAA,MAAM,YAAY,UAAW,YAAY,4CAUxC,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { CaptchaProps } from "../captchaProps.js";
2
- declare const PowCaptcha: (props: CaptchaProps) => import("react/jsx-runtime").JSX.Element;
3
- export { PowCaptcha };
4
- //# sourceMappingURL=powCaptcha.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"powCaptcha.d.ts","sourceRoot":"","sources":["../../../../../src/util/captcha/components/powCaptcha.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,QAAA,MAAM,UAAU,UAAW,YAAY,4CAUtC,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,6 +0,0 @@
1
- export declare const getProcaptchaScript: (name: string) => HTMLScriptElement | null;
2
- export declare const extractParams: (name: string) => {
3
- onloadUrlCallback: string | undefined;
4
- renderExplicit: string | undefined;
5
- };
6
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/util/config.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,mBAAmB,SAAU,MAAM,6BACoB,CAAC;AAErE,eAAO,MAAM,aAAa,SAAU,MAAM;;;CAWzC,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { Languages } from "@prosopo/locale";
2
- import { type ProcaptchaClientConfigOutput } from "@prosopo/types";
3
- declare function createConfig(siteKey?: string, theme?: "light" | "dark", language?: (typeof Languages)[keyof typeof Languages], web2?: boolean, invisible?: boolean, userAccountAddress?: string): ProcaptchaClientConfigOutput;
4
- export { createConfig };
5
- //# sourceMappingURL=configCreator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configCreator.d.ts","sourceRoot":"","sources":["../../../src/util/configCreator.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,iBAAS,YAAY,CACpB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,OAAO,GAAG,MAAgB,EACjC,QAAQ,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,EACrD,IAAI,UAAO,EACX,SAAS,UAAQ,EACjB,kBAAkB,CAAC,EAAE,MAAM,GACzB,4BAA4B,CAqB9B;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ProcaptchaClientConfigInput, ProcaptchaRenderOptions } from "@prosopo/types";
2
- export declare const setLanguage: (renderOptions: ProcaptchaRenderOptions | undefined, element: Element, config: ProcaptchaClientConfigInput) => void;
3
- //# sourceMappingURL=language.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../src/util/language.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACX,2BAA2B,EAC3B,uBAAuB,EACvB,MAAM,gBAAgB,CAAC;AAcxB,eAAO,MAAM,WAAW,kBACR,uBAAuB,GAAG,SAAS,WACzC,OAAO,UACR,2BAA2B,SAQnC,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ProcaptchaClientConfigOutput, ProcaptchaRenderOptions } from "@prosopo/types";
2
- export declare const setValidChallengeLength: (renderOptions: ProcaptchaRenderOptions | undefined, element: Element, config: ProcaptchaClientConfigOutput) => void;
3
- //# sourceMappingURL=timeout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeout.d.ts","sourceRoot":"","sources":["../../../src/util/timeout.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACX,4BAA4B,EAC5B,uBAAuB,EACvB,MAAM,gBAAgB,CAAC;AASxB,eAAO,MAAM,uBAAuB,kBACpB,uBAAuB,GAAG,SAAS,WACzC,OAAO,UACR,4BAA4B,KAClC,IAaF,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { Ti18n } from "@prosopo/locale";
2
- import { type Callbacks, type ProcaptchaRenderOptions } from "@prosopo/types";
3
- import type { Root } from "react-dom/client";
4
- import type { CaptchaRenderer } from "./captcha/captchaRenderer.js";
5
- import type { WidgetThemeResolver } from "./widgetThemeResolver.js";
6
- declare class WidgetFactory {
7
- private readonly widgetThemeResolver;
8
- private captchaRenderer;
9
- private _i18n;
10
- constructor(widgetThemeResolver: WidgetThemeResolver);
11
- get i18n(): Ti18n;
12
- createWidgets(containers: Element[], renderOptions: ProcaptchaRenderOptions, isWeb2?: boolean, invisible?: boolean): Promise<Root[]>;
13
- createWidget(container: Element, renderOptions: ProcaptchaRenderOptions, callbacks: Callbacks, isWeb2?: boolean, invisible?: boolean): Promise<Root>;
14
- protected getCaptchaRenderer(): Promise<CaptchaRenderer>;
15
- protected createCaptchaRenderer(): Promise<CaptchaRenderer>;
16
- }
17
- export { WidgetFactory };
18
- //# sourceMappingURL=widgetFactory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widgetFactory.d.ts","sourceRoot":"","sources":["../../../src/util/widgetFactory.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAK7C,OAAO,EACN,KAAK,SAAS,EAGd,KAAK,uBAAuB,EAC5B,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,cAAM,aAAa;IAKjB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAJrC,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,KAAK,CAAsB;gBAGjB,mBAAmB,EAAE,mBAAmB;IAG1D,IAAI,IAAI,IAAI,KAAK,CAKhB;IAEY,aAAa,CACzB,UAAU,EAAE,OAAO,EAAE,EACrB,aAAa,EAAE,uBAAuB,EACtC,MAAM,UAAO,EACb,SAAS,UAAQ,GACf,OAAO,CAAC,IAAI,EAAE,CAAC;IAgBL,YAAY,CACxB,SAAS,EAAE,OAAO,EAClB,aAAa,EAAE,uBAAuB,EACtC,SAAS,EAAE,SAAS,EACpB,MAAM,UAAO,EACb,SAAS,UAAQ,GACf,OAAO,CAAC,IAAI,CAAC;cAoDA,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;cAY9C,qBAAqB,IAAI,OAAO,CAAC,eAAe,CAAC;CAUjE;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { ProcaptchaRenderOptions } from "@prosopo/types";
2
- declare class WidgetThemeResolver {
3
- private readonly themesSet;
4
- private readonly defaultTheme;
5
- resolveWidgetTheme(element: Element, renderOptions: ProcaptchaRenderOptions): "light" | "dark";
6
- protected validateTheme(themeAttribute: string): "light" | "dark";
7
- }
8
- export { WidgetThemeResolver };
9
- //# sourceMappingURL=widgetThemeResolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widgetThemeResolver.d.ts","sourceRoot":"","sources":["../../../src/util/widgetThemeResolver.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE9D,cAAM,mBAAmB;IACxB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IACxD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAW;IAEjC,kBAAkB,CACxB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,uBAAuB,GACpC,OAAO,GAAG,MAAM;IASnB,SAAS,CAAC,aAAa,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM;CAKjE;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,317 +0,0 @@
1
- var P = Object.defineProperty;
2
- var D = (n, t, e) => t in n ? P(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var l = (n, t, e) => D(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { B as s } from "./bnChunk-DRlDxTFg.js";
5
- function $(n) {
6
- return n("return this");
7
- }
8
- const g = typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : $(Function);
9
- function S(n, t) {
10
- return typeof g[n] > "u" ? t : g[n];
11
- }
12
- let W = class {
13
- constructor(t) {
14
- l(this, "__encoding");
15
- this.__encoding = t;
16
- }
17
- decode(t) {
18
- let e = "";
19
- for (let r = 0, o = t.length; r < o; r++)
20
- e += String.fromCharCode(t[r]);
21
- return e;
22
- }
23
- };
24
- const j = /* @__PURE__ */ S("TextDecoder", W);
25
- let H = class {
26
- encode(t) {
27
- const e = t.length, r = new Uint8Array(e);
28
- for (let o = 0; o < e; o++)
29
- r[o] = t.charCodeAt(o);
30
- return r;
31
- }
32
- };
33
- const G = /* @__PURE__ */ S("TextEncoder", H);
34
- function _(n) {
35
- return typeof n == "function";
36
- }
37
- const p = "0123456789abcdef", y = new Uint8Array(256), N = new Uint8Array(256 * 256);
38
- for (let n = 0, t = p.length; n < t; n++)
39
- y[p[n].charCodeAt(0) | 0] = n | 0, n > 9 && (y[p[n].toUpperCase().charCodeAt(0) | 0] = n | 0);
40
- for (let n = 0; n < 256; n++) {
41
- const t = n << 8;
42
- for (let e = 0; e < 256; e++)
43
- N[t | e] = y[n] << 4 | y[e];
44
- }
45
- function k(n, t = -1) {
46
- if (!n)
47
- return new Uint8Array();
48
- let e = n.startsWith("0x") ? 2 : 0;
49
- const r = Math.ceil((n.length - e) / 2), o = Math.ceil(t === -1 ? r : t / 8), c = new Uint8Array(o), f = o > r ? o - r : 0;
50
- for (let h = f; h < o; h++, e += 2)
51
- c[h] = N[n.charCodeAt(e) << 8 | n.charCodeAt(e + 1)];
52
- return c;
53
- }
54
- function bn(n) {
55
- return s.isBN(n);
56
- }
57
- const I = /^0x[\da-fA-F]+$/, q = /^[\da-fA-F]+$/;
58
- function M(n, t = -1, e) {
59
- return typeof n == "string" && (n === "0x" || I.test(n)) && (t === -1 ? e || n.length % 2 === 0 : n.length === 2 + Math.ceil(t / 4));
60
- }
61
- function V(n) {
62
- return !!n && typeof n == "object";
63
- }
64
- function L(...n) {
65
- return (t) => (V(t) || _(t)) && n.every((e) => _(t[e]));
66
- }
67
- const z = /* @__PURE__ */ L("toBigInt"), J = /* @__PURE__ */ L("toBn"), K = typeof g.Buffer == "function" && typeof g.Buffer.isBuffer == "function";
68
- function Q(n) {
69
- return K && !!n && _(n.readDoubleLE) && g.Buffer.isBuffer(n);
70
- }
71
- function Y(n) {
72
- return (n && n.constructor) === Uint8Array || n instanceof Uint8Array;
73
- }
74
- const Z = new G();
75
- function R(n) {
76
- return n ? Z.encode(n.toString()) : new Uint8Array();
77
- }
78
- function w(n) {
79
- return Y(n) ? Q(n) ? new Uint8Array(n) : n : M(n) ? k(n) : Array.isArray(n) ? new Uint8Array(n) : R(n);
80
- }
81
- function Un(...n) {
82
- const t = n.length, e = new Array(t);
83
- let r = 0;
84
- for (let o = 0; o < t; o++)
85
- e[o] = w(n[o]), r += e[o].length;
86
- return A(e, r);
87
- }
88
- function A(n, t = 0) {
89
- const e = n.length;
90
- let r = 0;
91
- if (!t)
92
- for (let c = 0; c < e; c++)
93
- t += n[c].length;
94
- const o = new Uint8Array(t);
95
- for (let c = 0; c < e; c++)
96
- o.set(n[c], r), r += n[c].length;
97
- return o;
98
- }
99
- function pn(n) {
100
- const t = n.length | 0;
101
- for (let e = 0; e < t; e++)
102
- if (n[e] | 0)
103
- return !1;
104
- return !0;
105
- }
106
- function B(n, t) {
107
- const e = w(n), r = w(t);
108
- if (e.length === r.length) {
109
- const o = new DataView(e.buffer, e.byteOffset), c = new DataView(r.buffer, r.byteOffset), f = e.length % 4 | 0, h = e.length - f | 0;
110
- for (let i = 0; i < h; i += 4)
111
- if (o.getUint32(i) !== c.getUint32(i))
112
- return !1;
113
- for (let i = h, O = e.length; i < O; i++)
114
- if (e[i] !== r[i])
115
- return !1;
116
- return !0;
117
- }
118
- return !1;
119
- }
120
- function Bn(n, t = -1, e = !1) {
121
- const r = Math.ceil(t / 8);
122
- if (t === -1 || n.length === r)
123
- return n;
124
- if (n.length > r)
125
- return n.subarray(0, r);
126
- const o = new Uint8Array(r);
127
- return o.set(n, e ? 0 : r - n.length), o;
128
- }
129
- function Tn(n, { isLe: t = !0, isNegative: e = !1 } = {}) {
130
- t || (n = n.slice().reverse());
131
- const r = n.length;
132
- if (e && r && n[r - 1] & 128)
133
- switch (r) {
134
- case 0:
135
- return new s(0);
136
- case 1:
137
- return new s((n[0] ^ 255) * -1 - 1);
138
- case 2:
139
- return new s((n[0] + (n[1] << 8) ^ 65535) * -1 - 1);
140
- case 3:
141
- return new s((n[0] + (n[1] << 8) + (n[2] << 16) ^ 16777215) * -1 - 1);
142
- case 4:
143
- return new s((n[0] + (n[1] << 8) + (n[2] << 16) + n[3] * 16777216 ^ 4294967295) * -1 - 1);
144
- case 5:
145
- return new s(((n[0] + (n[1] << 8) + (n[2] << 16) + n[3] * 16777216 ^ 4294967295) + (n[4] ^ 255) * 4294967296) * -1 - 1);
146
- case 6:
147
- return new s(((n[0] + (n[1] << 8) + (n[2] << 16) + n[3] * 16777216 ^ 4294967295) + (n[4] + (n[5] << 8) ^ 65535) * 4294967296) * -1 - 1);
148
- default:
149
- return new s(n, "le").fromTwos(r * 8);
150
- }
151
- switch (r) {
152
- case 0:
153
- return new s(0);
154
- case 1:
155
- return new s(n[0]);
156
- case 2:
157
- return new s(n[0] + (n[1] << 8));
158
- case 3:
159
- return new s(n[0] + (n[1] << 8) + (n[2] << 16));
160
- case 4:
161
- return new s(n[0] + (n[1] << 8) + (n[2] << 16) + n[3] * 16777216);
162
- case 5:
163
- return new s(n[0] + (n[1] << 8) + (n[2] << 16) + (n[3] + (n[4] << 8)) * 16777216);
164
- case 6:
165
- return new s(n[0] + (n[1] << 8) + (n[2] << 16) + (n[3] + (n[4] << 8) + (n[5] << 16)) * 16777216);
166
- default:
167
- return new s(n, "le");
168
- }
169
- }
170
- const a = new Array(256), X = new Array(256 * 256);
171
- for (let n = 0; n < 256; n++)
172
- a[n] = n.toString(16).padStart(2, "0");
173
- for (let n = 0; n < 256; n++) {
174
- const t = n << 8;
175
- for (let e = 0; e < 256; e++)
176
- X[t | e] = a[n] + a[e];
177
- }
178
- function T(n, t) {
179
- const e = n.length % 2 | 0, r = n.length - e | 0;
180
- for (let o = 0; o < r; o += 2)
181
- t += X[n[o] << 8 | n[o + 1]];
182
- return e && (t += a[n[r] | 0]), t;
183
- }
184
- function v(n, t = -1, e = !0) {
185
- const r = e ? "0x" : "";
186
- if (n != null && n.length) {
187
- if (t > 0) {
188
- const o = Math.ceil(t / 8);
189
- if (n.length > o)
190
- return `${T(n.subarray(0, o / 2), r)}…${T(n.subarray(n.length - o / 2), "")}`;
191
- }
192
- } else return r;
193
- return T(n, r);
194
- }
195
- const nn = new j("utf-8");
196
- function xn(n) {
197
- return n ? nn.decode(n) : "";
198
- }
199
- const x = /* @__PURE__ */ w(`Ethereum Signed Message:
200
- `), u = /* @__PURE__ */ w("<Bytes>"), d = /* @__PURE__ */ w("</Bytes>"), tn = u.length + d.length;
201
- function C(n, t) {
202
- return n.length >= tn && B(n.subarray(0, u.length), u) && B(n.slice(-d.length), d) || t && n.length >= x.length && B(n.subarray(0, x.length), x);
203
- }
204
- function En(n) {
205
- const t = w(n);
206
- return C(t, !1) ? t.subarray(u.length, t.length - d.length) : t;
207
- }
208
- function _n(n) {
209
- const t = w(n);
210
- return C(t, !0) ? t : A([u, t, d]);
211
- }
212
- function en(n) {
213
- if (!n || n === "0x")
214
- return "";
215
- if (I.test(n))
216
- return n.substring(2);
217
- if (q.test(n))
218
- return n;
219
- throw new Error(`Expected hex value to convert, found '${n}'`);
220
- }
221
- function rn(n, { isLe: t = !1, isNegative: e = !1 } = {}) {
222
- if (!n || n === "0x")
223
- return new s(0);
224
- const r = en(n), o = new s(r, 16, t ? "le" : "be");
225
- return e ? o.fromTwos(r.length * 4) : o;
226
- }
227
- const b = /* @__PURE__ */ new s(1), U = /* @__PURE__ */ new s(2), m = /* @__PURE__ */ new s(1e9);
228
- m.mul(m);
229
- Number.MAX_SAFE_INTEGER;
230
- function on(n) {
231
- return typeof n == "bigint";
232
- }
233
- function F(n) {
234
- return n ? s.isBN(n) ? n : M(n) ? rn(n.toString()) : on(n) ? new s(n.toString()) : J(n) ? n.toBn() : z(n) ? new s(n.toBigInt().toString()) : new s(n) : new s(0);
235
- }
236
- const sn = { bitLength: -1, isLe: !0, isNegative: !1 };
237
- function E(n, { bitLength: t = -1, isLe: e = !0, isNegative: r = !1 } = sn) {
238
- const o = F(n), c = Math.ceil(t === -1 ? o.bitLength() / 8 : (t || 0) / 8);
239
- if (!n)
240
- return t === -1 ? new Uint8Array(1) : new Uint8Array(c);
241
- const f = new Uint8Array(c), h = r ? o.toTwos(c * 8) : o;
242
- return f.set(h.toArray(e ? "le" : "be", c), 0), f;
243
- }
244
- const cn = U.pow(new s(6)).isub(b), fn = U.pow(new s(14)).isub(b), hn = U.pow(new s(30)).isub(b), wn = { bitLength: 16 }, gn = { bitLength: 32 };
245
- function un(n) {
246
- const t = F(n);
247
- if (t.lte(cn))
248
- return new Uint8Array([t.toNumber() << 2]);
249
- if (t.lte(fn))
250
- return E(t.shln(2).iadd(b), wn);
251
- if (t.lte(hn))
252
- return E(t.shln(2).iadd(U), gn);
253
- const e = E(t);
254
- let r = e.length;
255
- for (; e[r - 1] === 0; )
256
- r--;
257
- if (r < 4)
258
- throw new Error("Invalid length, previous checks match anything less than 2^30");
259
- return A([
260
- // subtract 4 as minimum (also catered for in decoding)
261
- new Uint8Array([(r - 4 << 2) + 3]),
262
- e.subarray(0, r)
263
- ]);
264
- }
265
- function ln(n) {
266
- return A([
267
- un(n.length),
268
- n
269
- ]);
270
- }
271
- function mn(n) {
272
- return typeof n == "string" || n instanceof String;
273
- }
274
- function Sn(n) {
275
- return typeof n == "number";
276
- }
277
- function Nn(n, ...t) {
278
- for (let e = 0, r = t.length; e < r; e++) {
279
- const o = t[e];
280
- if (o)
281
- if (typeof o.entries == "function")
282
- for (const [c, f] of o.entries())
283
- n[c] = f;
284
- else
285
- Object.assign(n, o);
286
- }
287
- return n;
288
- }
289
- function In(n) {
290
- return v(R(n));
291
- }
292
- export {
293
- v as a,
294
- Un as b,
295
- M as c,
296
- Tn as d,
297
- E as e,
298
- Bn as f,
299
- Sn as g,
300
- bn as h,
301
- Y as i,
302
- on as j,
303
- k,
304
- mn as l,
305
- ln as m,
306
- C as n,
307
- Nn as o,
308
- En as p,
309
- _n as q,
310
- B as r,
311
- R as s,
312
- pn as t,
313
- w as u,
314
- xn as v,
315
- In as w,
316
- g as x
317
- };