@verbb/formie-browser 1.0.4 → 1.0.5

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 (182) hide show
  1. package/CHANGELOG.md +62 -22
  2. package/dist/chunks/address-country-Rx6GQTND.js +68 -0
  3. package/dist/chunks/address-finder-yXU5yMjG.js +30 -0
  4. package/dist/chunks/address-state-BQ0xGV9n.js +344 -0
  5. package/dist/chunks/api-CmwLRq_n.js +780 -0
  6. package/dist/chunks/api-DMK8NSUI.js +407 -0
  7. package/dist/chunks/api-sPqGbOww.js +125 -0
  8. package/dist/chunks/async-nPFRNQ06.js +25 -0
  9. package/dist/chunks/bpoint-DSjqRv63.js +24 -0
  10. package/dist/chunks/calculations-CgVJcQ2P.js +299 -0
  11. package/dist/chunks/captcha-eu-CWJb64_j.js +31 -0
  12. package/dist/chunks/checkbox-radio-DQ0H67Tj.js +125 -0
  13. package/dist/chunks/chunk-3b4jIN3o.js +13 -0
  14. package/dist/chunks/combobox-D-2b42wn.js +1954 -0
  15. package/dist/chunks/conditions-CZ3FU5QO.js +412 -0
  16. package/dist/chunks/constants-DVcJAvc5.js +38 -0
  17. package/dist/chunks/country-from-ip-BwxKaBuJ.js +26 -0
  18. package/dist/chunks/custom-google-maps-BsaSirEZ.js +194 -0
  19. package/dist/chunks/custom-link-CJ1-FjEM.js +46 -0
  20. package/dist/chunks/custom-maps-DYW_pBid.js +161 -0
  21. package/dist/chunks/date-picker-5CA_-zGb.js +5311 -0
  22. package/dist/chunks/debug-BV0DvdHx.js +41 -0
  23. package/dist/chunks/dist-BF5GU3_9.js +2674 -0
  24. package/dist/chunks/event-names-BCI2FLD8.js +51 -0
  25. package/dist/chunks/eway-D3ctTbEk.js +70 -0
  26. package/dist/chunks/field-references.keys-58ZSTrCW.js +21 -0
  27. package/dist/chunks/field-references.resolver-CHwn0G0L.js +145 -0
  28. package/dist/chunks/file-upload-D49m8-DR.js +287 -0
  29. package/dist/chunks/friendly-captcha-v1-ByXzENYZ.js +31 -0
  30. package/dist/chunks/friendly-captcha-v2-BPdlmhQu.js +36 -0
  31. package/dist/chunks/friendly-challenge-8uPatWqk.js +832 -0
  32. package/dist/chunks/go-cardless-BwASSYSK.js +23 -0
  33. package/dist/chunks/google-address-OhKilPWE.js +161 -0
  34. package/dist/chunks/hcaptcha-CdCd9oEi.js +54 -0
  35. package/dist/chunks/hidden-D7_Ch-QN.js +26 -0
  36. package/dist/chunks/http-D-JExro7.js +27 -0
  37. package/dist/chunks/i18n-BY1ds1BL.js +121 -0
  38. package/dist/chunks/leaflet-src-j-lHNmhR.js +4585 -0
  39. package/dist/chunks/loqate-Cp2zvwpE.js +76 -0
  40. package/dist/chunks/mollie-COG-ko2D.js +23 -0
  41. package/dist/chunks/moneris-CMH8PlRc.js +117 -0
  42. package/dist/chunks/opayo-D2jsR5vh.js +113 -0
  43. package/dist/chunks/paddle-DxF88RfC.js +55 -0
  44. package/dist/chunks/paypal-b5pnwrA2.js +95 -0
  45. package/dist/chunks/payway-BJYu9DIR.js +55 -0
  46. package/dist/chunks/phone-country-D3ayr60L.js +2645 -0
  47. package/dist/chunks/place-kit-BGHklIZ-.js +48 -0
  48. package/dist/chunks/placekit-autocomplete.esm-DWVabQlq.js +1236 -0
  49. package/dist/chunks/recaptcha-enterprise-BSwi8IVX.js +65 -0
  50. package/dist/chunks/recaptcha-shared-B4zAescW.js +15 -0
  51. package/dist/chunks/recaptcha-v2-checkbox-CnDQmsKa.js +40 -0
  52. package/dist/chunks/recaptcha-v2-invisible-Cz5uIlp-.js +53 -0
  53. package/dist/chunks/recaptcha-v3-BtbbP111.js +27 -0
  54. package/dist/chunks/repeater-B5leVxZU.js +102 -0
  55. package/dist/chunks/rich-text-Cv8ADyk-.js +349 -0
  56. package/dist/chunks/scripts-6CYSUGKQ.js +24 -0
  57. package/dist/chunks/sdk-BhHAYgga.js +1397 -0
  58. package/dist/chunks/shared-Bx9s0i0P.js +100 -0
  59. package/dist/chunks/signature-CpgqHCEx.js +463 -0
  60. package/dist/chunks/snaptcha-vz1RnZ15.js +8 -0
  61. package/dist/chunks/square-BP8RWAKB.js +40 -0
  62. package/dist/chunks/stripe-MihN63uC.js +184 -0
  63. package/dist/chunks/styles-BfoIZwJp.js +19 -0
  64. package/dist/chunks/summary-D3AjxpYN.js +114 -0
  65. package/dist/chunks/table-C-lkQN6I.js +78 -0
  66. package/dist/chunks/text-limit-B09elPDB.js +125 -0
  67. package/dist/chunks/theme-classes-Tv7q7ToE.js +44 -0
  68. package/dist/chunks/turnstile-D_Pi1CKM.js +58 -0
  69. package/dist/chunks/utils-Vqp8i_RM.js +49401 -0
  70. package/dist/css/formie-theme.css +2 -0
  71. package/dist/css/theme/fields/_address-state.css +94 -0
  72. package/dist/css/theme/fields/_combobox.css +246 -0
  73. package/dist/css/theme/fields/_select.css +13 -0
  74. package/dist/index.js +2447 -39
  75. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  76. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  77. package/dist/js/core/validation-focus.d.ts +4 -0
  78. package/dist/js/core/validation-focus.d.ts.map +1 -0
  79. package/dist/js/modules/address/api.d.ts +1 -0
  80. package/dist/js/modules/address/api.d.ts.map +1 -1
  81. package/dist/js/modules/address/constants.d.ts +22 -1
  82. package/dist/js/modules/address/constants.d.ts.map +1 -1
  83. package/dist/js/modules/address/host.d.ts +2 -2
  84. package/dist/js/modules/address/host.d.ts.map +1 -1
  85. package/dist/js/modules/address/loqate.d.ts.map +1 -1
  86. package/dist/js/modules/fields/address-country.d.ts +3 -0
  87. package/dist/js/modules/fields/address-country.d.ts.map +1 -0
  88. package/dist/js/modules/fields/address-state.d.ts +3 -0
  89. package/dist/js/modules/fields/address-state.d.ts.map +1 -0
  90. package/dist/js/modules/fields/calculations.d.ts.map +1 -1
  91. package/dist/js/modules/fields/combobox.d.ts +17 -0
  92. package/dist/js/modules/fields/combobox.d.ts.map +1 -0
  93. package/dist/js/modules/fields/custom-google-maps.d.ts +64 -0
  94. package/dist/js/modules/fields/custom-google-maps.d.ts.map +1 -0
  95. package/dist/js/modules/fields/custom-link.d.ts +3 -0
  96. package/dist/js/modules/fields/custom-link.d.ts.map +1 -0
  97. package/dist/js/modules/fields/custom-maps.d.ts +3 -0
  98. package/dist/js/modules/fields/custom-maps.d.ts.map +1 -0
  99. package/dist/js/modules/fields/date-picker.d.ts.map +1 -1
  100. package/dist/js/modules/fields/index.d.ts.map +1 -1
  101. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  102. package/dist/js/submit/pipeline.d.ts.map +1 -1
  103. package/dist/js/utils/country-from-ip.d.ts +7 -0
  104. package/dist/js/utils/country-from-ip.d.ts.map +1 -0
  105. package/dist/js/utils/field-references.d.ts +1 -0
  106. package/dist/js/utils/field-references.d.ts.map +1 -1
  107. package/dist/js/utils/field-references.row-scope.d.ts +11 -0
  108. package/dist/js/utils/field-references.row-scope.d.ts.map +1 -0
  109. package/package.json +6 -3
  110. package/src/css/formie-theme.css +2 -0
  111. package/src/css/theme/fields/_address-state.css +94 -0
  112. package/src/css/theme/fields/_combobox.css +246 -0
  113. package/src/css/theme/fields/_select.css +13 -0
  114. package/src/js/core/create-formie-client.ts +27 -0
  115. package/src/js/core/submit-result-ui.ts +4 -4
  116. package/src/js/core/validation-focus.ts +117 -0
  117. package/src/js/modules/address/api.ts +7 -0
  118. package/src/js/modules/address/constants.ts +82 -2
  119. package/src/js/modules/address/host.ts +16 -6
  120. package/src/js/modules/address/loqate.ts +3 -17
  121. package/src/js/modules/fields/address-country.ts +156 -0
  122. package/src/js/modules/fields/address-state.ts +946 -0
  123. package/src/js/modules/fields/calculations.ts +32 -0
  124. package/src/js/modules/fields/combobox.ts +188 -0
  125. package/src/js/modules/fields/custom-google-maps.ts +416 -0
  126. package/src/js/modules/fields/custom-link.ts +95 -0
  127. package/src/js/modules/fields/custom-maps.ts +339 -0
  128. package/src/js/modules/fields/date-picker.ts +96 -3
  129. package/src/js/modules/fields/index.ts +6 -0
  130. package/src/js/modules/fields/phone-country.ts +6 -0
  131. package/src/js/submit/pipeline.ts +11 -1
  132. package/src/js/utils/country-from-ip.ts +54 -0
  133. package/src/js/utils/field-references.row-scope.ts +303 -0
  134. package/src/js/utils/field-references.ts +1 -0
  135. package/dist/chunks/address-finder-BU4roxT6.js +0 -37
  136. package/dist/chunks/bpoint-uNg5j6rt.js +0 -26
  137. package/dist/chunks/calculations-C9t6Zop9.js +0 -147
  138. package/dist/chunks/captcha-eu-BAPzHNts.js +0 -34
  139. package/dist/chunks/checkbox-radio-CHeLNVIK.js +0 -141
  140. package/dist/chunks/conditions-DKxVCsjD.js +0 -459
  141. package/dist/chunks/date-picker-B3iQ797Z.js +0 -4994
  142. package/dist/chunks/eway-DCielIML.js +0 -74
  143. package/dist/chunks/file-upload-DP2TOUYV.js +0 -316
  144. package/dist/chunks/friendly-captcha-v1-DdlcGiFY.js +0 -33
  145. package/dist/chunks/friendly-captcha-v2-76w-YnFm.js +0 -38
  146. package/dist/chunks/go-cardless-rwCkzbNK.js +0 -24
  147. package/dist/chunks/google-address-BD8IZ86V.js +0 -181
  148. package/dist/chunks/hcaptcha-BNNTL6uf.js +0 -56
  149. package/dist/chunks/hidden-CW6Rcf1N.js +0 -31
  150. package/dist/chunks/index-BEsfee-D.js +0 -1839
  151. package/dist/chunks/index-BP7Unm5Y.js +0 -863
  152. package/dist/chunks/index-D6npYxvr.js +0 -4423
  153. package/dist/chunks/loqate-B-ZNS65B.js +0 -55
  154. package/dist/chunks/mollie-BDAZ-1X4.js +0 -24
  155. package/dist/chunks/moneris-B1b0uEtY.js +0 -101
  156. package/dist/chunks/opayo-CC5hraHo.js +0 -122
  157. package/dist/chunks/paddle-B4GmrDsq.js +0 -60
  158. package/dist/chunks/paypal-BFS6XsIS.js +0 -100
  159. package/dist/chunks/payway-DekoJead.js +0 -56
  160. package/dist/chunks/phone-country-Cm5YUeXI.js +0 -3765
  161. package/dist/chunks/place-kit-DizZWV_e.js +0 -42
  162. package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +0 -1299
  163. package/dist/chunks/recaptcha-enterprise-BbOvO7JZ.js +0 -71
  164. package/dist/chunks/recaptcha-shared-Dwg1eVFS.js +0 -15
  165. package/dist/chunks/recaptcha-v2-checkbox-SY3ti5iQ.js +0 -41
  166. package/dist/chunks/recaptcha-v2-invisible-DSmQnn6c.js +0 -59
  167. package/dist/chunks/recaptcha-v3-DNh7YCnR.js +0 -28
  168. package/dist/chunks/repeater-DM0vuFNQ.js +0 -124
  169. package/dist/chunks/rich-text-C8aGYp70.js +0 -304
  170. package/dist/chunks/scripts-CKTFtxPO.js +0 -36
  171. package/dist/chunks/sdk-3SicTWby.js +0 -1559
  172. package/dist/chunks/shared--BU5CFoL.js +0 -80
  173. package/dist/chunks/signature-pFhZfH7d.js +0 -550
  174. package/dist/chunks/snaptcha-VuOUOaLj.js +0 -8
  175. package/dist/chunks/square-BR9pvToy.js +0 -46
  176. package/dist/chunks/stripe-OHUwoV9g.js +0 -202
  177. package/dist/chunks/styles-C3aqgtek.js +0 -21
  178. package/dist/chunks/summary-Da7Ktg3N.js +0 -126
  179. package/dist/chunks/table-C0PmR9bI.js +0 -95
  180. package/dist/chunks/text-limit-mLEwZDIa.js +0 -144
  181. package/dist/chunks/turnstile-9tM7q_LK.js +0 -59
  182. package/dist/chunks/utils-BntI3W4S.js +0 -6149
@@ -0,0 +1,1397 @@
1
+ //#region ../../node_modules/@friendlycaptcha/sdk/sdk.js
2
+ function e(e) {
3
+ let t, n, r = new Promise((e, r) => {
4
+ t = e, n = r;
5
+ });
6
+ return e && e(t, n), {
7
+ promise: r,
8
+ resolve: t,
9
+ reject: n
10
+ };
11
+ }
12
+ function t(e, t) {
13
+ return e.lastIndexOf(t, 0) === 0;
14
+ }
15
+ var n = /^((?:\w+:)?\/\/([^\/]+))/;
16
+ function r(e) {
17
+ let t = [], n = Object.keys(e), r = encodeURIComponent;
18
+ for (let i = 0; i < n.length; i++) t.push(`${r(n[i])}=${r(e[n[i]])}`);
19
+ return t.join("&");
20
+ }
21
+ function i(e) {
22
+ let r = document.location;
23
+ if (t(e, "/") || t(e, ".")) return r.origin ? r.origin : r.protocol + "//" + r.host;
24
+ let i = e.match(n);
25
+ if (!i) throw Error("Invalid URL: " + e);
26
+ return i[1];
27
+ }
28
+ var a = class {
29
+ constructor(e) {
30
+ this.ready = !1, this.buffer = [], this.id = e.id, this.type = e.type, this.element = e.element, this.onReady = e.onReady, this.origin = i(e.element.src);
31
+ }
32
+ send(e) {
33
+ this.ready ? this.element.contentWindow.postMessage(e, this.origin) : this.buffer.push(e);
34
+ }
35
+ setReady(e) {
36
+ this.onReady(), this.ready = e, this.ready && this.flush();
37
+ }
38
+ flush() {
39
+ for (let e = 0; e < this.buffer.length; e++) this.element.contentWindow.postMessage(this.buffer[e], this.origin);
40
+ this.buffer = [];
41
+ }
42
+ };
43
+ function o(e, t) {
44
+ return e === "*" || t.has(e);
45
+ }
46
+ var s = class {
47
+ constructor() {
48
+ this.origins = /* @__PURE__ */ new Set(), this.targets = {}, this.answered = /* @__PURE__ */ new Set(), this.onReceiveRootMessage = () => {}, window.addEventListener("message", (e) => {
49
+ this.onReceive(e);
50
+ });
51
+ }
52
+ listen(e) {
53
+ let t = this.onReceiveRootMessage;
54
+ this.onReceiveRootMessage = (n) => {
55
+ t(n), e(n);
56
+ };
57
+ }
58
+ addOrigins(e) {
59
+ e.forEach((e) => this.origins.add(e));
60
+ }
61
+ send(e) {
62
+ if (e.from_id) {
63
+ let t = this.targets[e.from_id];
64
+ if (!t) {
65
+ console.error(`[bus] Unexpected message from unknown sender ${e.from_id}`, e);
66
+ return;
67
+ }
68
+ (e.type === "widget_announce" || e.type === "agent_announce") && t.setReady(!0);
69
+ }
70
+ let t = e.rid;
71
+ if (t) {
72
+ if (this.answered.has(t + e.to_id)) return;
73
+ this.answered.add(t + e.to_id);
74
+ }
75
+ if (e.to_id === "") {
76
+ this.onReceiveRootMessage(e);
77
+ return;
78
+ }
79
+ let n = this.targets[e.to_id];
80
+ if (!n) {
81
+ console.error(`[bus] Unexpected message to unknown target ${e.to_id}`, e);
82
+ return;
83
+ }
84
+ n.send(e);
85
+ }
86
+ onReceive(e) {
87
+ if (!o(e.origin, this.origins)) return;
88
+ let t = e.data;
89
+ !t || !t._frc || this.send(t);
90
+ }
91
+ registerTarget(e) {
92
+ this.targets[e.id] = e;
93
+ }
94
+ registerTargetIFrame(t, n, r, i) {
95
+ let o = e(), s = new Promise((e) => setTimeout(() => e("timeout"), i)), c = new a({
96
+ id: n,
97
+ element: r,
98
+ type: t,
99
+ onReady: () => o.resolve("registered")
100
+ });
101
+ return this.registerTarget(c), Promise.race([o.promise, s]);
102
+ }
103
+ removeTarget(e) {
104
+ delete this.targets[e];
105
+ }
106
+ };
107
+ function c(e, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") {
108
+ let n = "";
109
+ for (let r = 0; r < e; r++) n += t.charAt(Math.floor(Math.random() * t.length));
110
+ return n;
111
+ }
112
+ function l(e) {
113
+ let t = e.slice();
114
+ for (let e = t.length - 1; e > 0; e--) {
115
+ let n = Math.floor(Math.random() * (e + 1)), r = t[e];
116
+ t[e] = t[n], t[n] = r;
117
+ }
118
+ return t;
119
+ }
120
+ var u = "frc_sc", d = "frc_sid", f = "__", p = !1, m = "0", h = "__" + c(10);
121
+ function g(e) {
122
+ if (!p) {
123
+ let t = 0;
124
+ try {
125
+ t = parseInt(sessionStorage.getItem(u) || "", 10);
126
+ } catch {}
127
+ isNaN(t) && (t = 0), e && t++, m = t.toString();
128
+ try {
129
+ sessionStorage.setItem(u, m);
130
+ } catch {}
131
+ }
132
+ return m;
133
+ }
134
+ function _() {
135
+ let e;
136
+ try {
137
+ e = sessionStorage.getItem(d);
138
+ } catch {
139
+ return h;
140
+ }
141
+ return e || (e = c(12), sessionStorage.setItem(d, e)), e;
142
+ }
143
+ var v = class {
144
+ constructor(e) {
145
+ this.mem = /* @__PURE__ */ new Map(), this.storePrefix = e;
146
+ }
147
+ get(e) {
148
+ let t = this.storePrefix + f + e;
149
+ try {
150
+ let e = sessionStorage.getItem(t);
151
+ return e === null ? void 0 : e;
152
+ } catch {}
153
+ return this.mem.get(e);
154
+ }
155
+ set(e, t) {
156
+ let n = this.storePrefix + f + e;
157
+ try {
158
+ t === void 0 ? (this.mem.delete(e), sessionStorage.removeItem(n)) : (this.mem.set(e, t), sessionStorage.setItem(n, t));
159
+ } catch {}
160
+ }
161
+ }, y = typeof navigator < "u" && navigator.userAgentData !== void 0;
162
+ function b() {
163
+ return [document.querySelectorAll(".frc-captcha"), document.querySelectorAll(".frc-risk-intelligence")];
164
+ }
165
+ function x(e) {
166
+ let t = e;
167
+ for (; t;) {
168
+ if (t.tagName === "FORM") return t;
169
+ if (t.parentElement) {
170
+ t = t.parentElement;
171
+ continue;
172
+ }
173
+ let e = t.parentNode;
174
+ if (e && e.host) {
175
+ t = e.host;
176
+ continue;
177
+ }
178
+ t = null;
179
+ }
180
+ return null;
181
+ }
182
+ function S(e, t) {
183
+ e.addEventListener("focusin", t, {
184
+ once: !0,
185
+ passive: !0
186
+ });
187
+ }
188
+ function ee(e, t) {
189
+ let n = document.createElement("input");
190
+ return n.type = "hidden", n.style.display = "none", n.name = t, e.appendChild(n), n;
191
+ }
192
+ function te(e, t, n) {
193
+ e.style[t] === "" && (e.style[t] = n);
194
+ }
195
+ function ne(e) {
196
+ let t = te;
197
+ t(e, "position", "relative"), t(e, "height", "70px"), t(e, "padding", "0"), t(e, "width", "316px"), t(e, "maxWidth", "100%"), t(e, "maxHeight", "100%"), t(e, "overflow", "hidden"), t(e, "borderRadius", "4px");
198
+ }
199
+ function re(e) {
200
+ e.removeAttribute("style");
201
+ }
202
+ function C(e) {
203
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
204
+ }
205
+ function w(e, t) {
206
+ let n;
207
+ typeof window.CustomEvent == "function" ? n = new CustomEvent(t.name, {
208
+ bubbles: !0,
209
+ detail: t
210
+ }) : (n = document.createEvent("CustomEvent"), n.initCustomEvent(t.name, !0, !1, t)), e.dispatchEvent(n);
211
+ }
212
+ function ie(e) {
213
+ for (; !e.lang || typeof e.lang != "string";) if (e = e.parentElement, !e) return null;
214
+ return e.lang;
215
+ }
216
+ var T = {
217
+ ar: {
218
+ title: "التحقق من مكافحة الروبوتات",
219
+ connecting: "التحقق من مكافحة الروبوتات قيد الاتصال…",
220
+ retrying: "استغرق الاتصال بالتحقق من مكافحة الروبوتات وقتًا طويلاً.\n\nإعادة المحاولة…",
221
+ failed: "فشل الاتصال بالتحقق من مكافحة الروبوتات."
222
+ },
223
+ bg: {
224
+ title: "Проверка срещу роботи",
225
+ connecting: "Зарежда се задачата…",
226
+ retrying: "Неуспешно свързване.\n\nОпит за повторно свързване…",
227
+ failed: "Неуспешно свързване."
228
+ },
229
+ ca: {
230
+ title: "Verificació anti-robot",
231
+ connecting: "Carregant el desafiament…",
232
+ retrying: "Errada de conexió.\n\nReintentant…",
233
+ failed: "Errada de conexió."
234
+ },
235
+ cs: {
236
+ title: "Ověření proti robotům",
237
+ connecting: "Připojování kontroly proti robotům…",
238
+ retrying: "Připojení kontroly proti robotům trvalo příliš dlouho.\n\nOpakuji pokus…",
239
+ failed: "Kontrola proti robotům se nepodařilo připojit."
240
+ },
241
+ da: {
242
+ title: "Anti-robot-verifikation",
243
+ connecting: "Anti-robot-kontrol forbinder…",
244
+ retrying: "Anti-robot-kontrol tog for lang tid at oprette forbindelse.\n\nPrøver igen…",
245
+ failed: "Anti-robot-kontrol kunne ikke oprette forbindelse."
246
+ },
247
+ nl: {
248
+ title: "Anti-robotcheck",
249
+ connecting: "Verbinden met Anti-robotcheck…",
250
+ retrying: "Verbinden met Anti-robotcheck mislukt.\n\nOpnieuw aan het proberen…",
251
+ failed: "Verbinden met Anti-robotcheck mislukt."
252
+ },
253
+ en: {
254
+ title: "Anti-Robot verification",
255
+ connecting: "Anti-Robot check connecting…",
256
+ retrying: "Anti-Robot check took too long to connect.\n\nRetrying…",
257
+ failed: "Anti-Robot check failed to connect."
258
+ },
259
+ fi: {
260
+ title: "Robottien torjunnan vahvistus",
261
+ connecting: "Robottien torjunnan tarkistus käynnissä…",
262
+ retrying: "Robottien torjunnan tarkistus kesti liian kauan.\n\nYritetään uudelleen…",
263
+ failed: "Robottien torjunnan tarkistus epäonnistui."
264
+ },
265
+ fr: {
266
+ title: "Vérification anti-robot",
267
+ connecting: "Connexion à la vérification anti-robot…",
268
+ retrying: "La connexion à la vérification anti-robot a pris trop de temps.\n\nNouvelle tentative…",
269
+ failed: "Échec de la connexion à la vérification anti-robot."
270
+ },
271
+ de: {
272
+ title: "Anti-Roboter-Verifizierung",
273
+ connecting: "Verbindung zur Anti-Roboter-Verifizierung wird hergestellt…",
274
+ retrying: "Verbindung zur Anti-Roboter-Verifizierung hat zu lange gedauert.\n\nErneuter Versuch…",
275
+ failed: "Verbindung zur Anti-Roboter-Verifizierung ist fehlgeschlagen."
276
+ },
277
+ hi: {
278
+ title: "एंटी-रोबोट सत्यापन",
279
+ connecting: "चुनौती लोड हो रही है…",
280
+ retrying: "कनेक्शन विफल.\n\nपुनः प्रयास कर रहे हैं…",
281
+ failed: "कनेक्शन विफल."
282
+ },
283
+ hu: {
284
+ title: "Robotellenőrzés",
285
+ connecting: "Robotellenőrzés csatlakozás…",
286
+ retrying: "A robotellenőrzés túl sokáig tartott a csatlakozáshoz.\n\nÚjrapróbálom…",
287
+ failed: "A robotellenőrzés nem tudott csatlakozni."
288
+ },
289
+ id: {
290
+ title: "Verifikasi Anti-Robot",
291
+ connecting: "Pemeriksaan Anti-Robot sedang terhubung…",
292
+ retrying: "Pemeriksaan Anti-Robot memakan waktu terlalu lama untuk terhubung.\n\nMencoba lagi…",
293
+ failed: "Pemeriksaan Anti-Robot gagal terhubung."
294
+ },
295
+ ja: {
296
+ title: "ロボット防止認証",
297
+ connecting: "チャレンジを読み込んでいます…",
298
+ retrying: "接続失敗.\n\n再試行中…",
299
+ failed: "接続失敗."
300
+ },
301
+ it: {
302
+ title: "Verifica anti-robot",
303
+ connecting: "Connessione verifica anti-robot in corso…",
304
+ retrying: "La connessione alla verifica anti-robot ha richiesto troppo tempo.\n\nRiprovando…",
305
+ failed: "Impossibile connettersi alla verifica anti-robot."
306
+ },
307
+ nb: {
308
+ title: "Anti-robot-verifisering",
309
+ connecting: "Laster inn utfordring…",
310
+ retrying: "Klarte ikke å koble til.\n\nPrøver igjen…",
311
+ failed: "Klarte ikke å koble til."
312
+ },
313
+ pl: {
314
+ title: "Weryfikacja antyrobotowa",
315
+ connecting: "Łączenie się z kontrolą antyrobotową…",
316
+ retrying: "Łączenie się z kontrolą antyrobotową trwało zbyt długo. \n\nPonowna próba…",
317
+ failed: "Nie udało się połączyć z kontrolą antyrobotową."
318
+ },
319
+ ro: {
320
+ title: "Verificare anti-robot",
321
+ connecting: "Se incarca testul…",
322
+ retrying: "Conexiunea a esuat.\n\nReincercare…",
323
+ failed: "Conexiunea a esuat."
324
+ },
325
+ pt: {
326
+ title: "Verificação anti-robô",
327
+ connecting: "Verificação anti-robô a ligar…",
328
+ retrying: "A verificação anti-robô demorou demasiado tempo a ligar-se.\n\nA tentar novamente…",
329
+ failed: "A verificação anti-robô não conseguiu ligar-se."
330
+ },
331
+ ru: {
332
+ title: "Проверка антиробота",
333
+ connecting: "Подключение к проверке антиробота…",
334
+ retrying: "Подключение к проверке антиробота заняло слишком много времени.\n\nПовторяем попытку…",
335
+ failed: "Не удалось подключиться к проверке антиробота."
336
+ },
337
+ sk: {
338
+ title: "Overovanie proti robotom",
339
+ connecting: "Pripojenie kontroly proti robotom…",
340
+ retrying: "Pripojenie kontroly proti robotom trvalo príliš dlho.\n\nOpakujem pokus…",
341
+ failed: "Pripojenie kontroly proti robotom sa nepodarilo."
342
+ },
343
+ sl: {
344
+ title: "Preverjanje proti robotom",
345
+ connecting: "Nalaganje izziva…",
346
+ retrying: "Povezava ni uspela.\n\nPonovni poskus…",
347
+ failed: "Povezava ni uspela."
348
+ },
349
+ es: {
350
+ title: "Verificación antirrobot",
351
+ connecting: "Conectando verificación antirrobot…",
352
+ retrying: "La verificación antirrobot tardó demasiado en conectarse.\n\nReintentando…",
353
+ failed: "Error al conectar la verificación antirrobot."
354
+ },
355
+ sv: {
356
+ title: "Anti-robotverifiering",
357
+ connecting: "Anti-robotverifiering ansluter…",
358
+ retrying: "Anti-robotverifiering tog för lång tid att ansluta.\n\nFörsöker igen…",
359
+ failed: "Anti-robotverifiering kunde inte ansluta."
360
+ },
361
+ th: {
362
+ title: "การตรวจสอบป้องกันบอท",
363
+ connecting: "กำลังโหลดการท้าทาย…",
364
+ retrying: "เชื่อมต่อไม่สำเร็จ.\n\nกำลังลองใหม่…",
365
+ failed: "เชื่อมต่อไม่สำเร็จ."
366
+ },
367
+ tr: {
368
+ title: "Robot önleme doğrulaması",
369
+ connecting: "Robot önleme kontrolü bağlanıyor…",
370
+ retrying: "Robot önleme kontrolü bağlanmak için çok uzun sürdü.\n\nYeniden deniyor…",
371
+ failed: "Robot önleme kontrolü bağlanamadı."
372
+ },
373
+ vi: {
374
+ title: "Xác minh chống robot",
375
+ connecting: "Kiểm tra robot đang kết nối…",
376
+ retrying: "Kiểm tra chống robot mất quá nhiều thời gian để kết nối.\n\nĐang thử lại…",
377
+ failed: "Kiểm tra chống robot không thể kết nối."
378
+ },
379
+ zh: {
380
+ title: "反机器人验证",
381
+ connecting: "反机器人验证正在连接…",
382
+ retrying: "反机器人验证连接耗时过长。\n\n正在重试…",
383
+ failed: "反机器人验证连接失败。"
384
+ }
385
+ }, ae = [
386
+ "ar",
387
+ "he",
388
+ "fa",
389
+ "ur",
390
+ "ps",
391
+ "sd",
392
+ "yi"
393
+ ];
394
+ function E(e) {
395
+ return e.toLowerCase().split("-")[0].split("_")[0];
396
+ }
397
+ function D(e) {
398
+ return e = E(e), ae.indexOf(e) !== -1;
399
+ }
400
+ function O(e) {
401
+ return e = E(e), (T[e] || T.en).title + " - Widget";
402
+ }
403
+ function k(e, t) {
404
+ return e = E(e), (T[e] || T.en)[t];
405
+ }
406
+ var A = "FrcFrameId", j = "frc-i-agent", oe = "frc-i-widget", se = "frc-widget-placeholder";
407
+ function ce(e, t, n) {
408
+ let i = {
409
+ origin: document.location.origin,
410
+ sess_id: _(),
411
+ sess_c: g(!0),
412
+ comm_id: t,
413
+ sdk_v: "1.0.0",
414
+ v: "1",
415
+ agent_id: t,
416
+ ts: Date.now().toString()
417
+ }, a = document.createElement("iframe");
418
+ a.className = j, a.dataset[A] = t, a.src = n + "?" + r(i), a.frcSDK = e;
419
+ let o = a.style;
420
+ return o.width = o.height = o.border = o.visibility = "0", o.display = "none", a;
421
+ }
422
+ function le(e, t, n, i) {
423
+ let a = document.createElement("iframe"), o = N(i), s = {
424
+ origin: document.location.origin,
425
+ sess_id: _(),
426
+ sess_c: g(!0),
427
+ comm_id: t,
428
+ sdk_v: "1.0.0",
429
+ v: "1",
430
+ agent_id: e,
431
+ lang: o,
432
+ sitekey: i.sitekey || "",
433
+ ts: Date.now().toString()
434
+ };
435
+ i.theme && (s.theme = i.theme), y && (a.allow = "clipboard-write"), a.frameBorder = "0", a.src = n + "?" + r(s), a.className = oe, a.title = O(o), a.dataset[A] = t;
436
+ let c = a.style;
437
+ return c.border = c.visibility = "0", c.position = "absolute", c.height = c.width = "100%", c.userSelect = "none", c["-webkit-tap-highlight-color"] = "transparent", c.display = "none", i.element.appendChild(a), a;
438
+ }
439
+ function ue(e) {
440
+ let t = document.createElement("div");
441
+ t.classList.add(se);
442
+ let n = t.style, r = e.theme === "dark" || e.theme === "auto" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches;
443
+ return n.color = r ? "#fff" : "#222", n.backgroundColor = r ? "#171717" : "#fafafa", n.borderRadius = "4px", n.border = "1px solid", n.borderColor = "#ddd", n.padding = "8px", n.height = n.width = "100%", n.fontSize = "14px", n.boxSizing = "border-box", M(n), e.element.appendChild(t), t;
444
+ }
445
+ function M(e) {
446
+ e.textDecoration = e.fontStyle = "none", e.fontWeight = "500", e.fontFamily = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", e.lineHeight = "1", e.letterSpacing = "-0.0125rem";
447
+ }
448
+ function de(e) {
449
+ let t = document.createElement("div");
450
+ t.classList.add("frc-banner");
451
+ let n = N(e), r = e.theme === "dark" || e.theme === "auto" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches, i = "#565656", a = "#a2a2a2";
452
+ r && (i = "#a2a2a2", a = "#565656");
453
+ let o = t.style;
454
+ o.position = "absolute", o.bottom = "6px", D(n) ? o.left = "6px" : o.right = "6px", o.lineHeight = "1";
455
+ let s = document.createElement("a");
456
+ s.href = "https://friendlycaptcha.com", s.rel = "noopener";
457
+ let c = s.style;
458
+ M(c), c.color = i, c.fontSize = "10px", c.userSelect = "none", c.textDecorationLine = "underline", c.textDecorationThickness = "1px", c.textDecorationColor = a, c.letterSpacing = "-0.0125rem", s.target = "_blank", s.textContent = "Friendly Captcha", s.onmouseenter = () => c.textDecorationColor = i, s.onmouseleave = () => c.textDecorationColor = a, t.appendChild(s), e.element.appendChild(t);
459
+ }
460
+ function N(e) {
461
+ let t = e.language;
462
+ return (!t || t === "html") && (t = ie(e.element) || ""), t;
463
+ }
464
+ function fe(e, t, n) {
465
+ let r = (e, t) => {
466
+ let n = document.createElement("a");
467
+ n.href = e, n.target = "_blank", n.rel = "noopener", n.textContent = t;
468
+ let r = n.style;
469
+ return M(r), r.textDecoration = "underline", r.color = "#565656", n.onmouseenter = () => r.textDecoration = "none", n.onmouseleave = () => r.textDecoration = "underline", n;
470
+ }, i = k(n, "failed"), a = [r(`${t}/connectionTest`, i)];
471
+ e.textContent = "", a.forEach((t) => e.appendChild(t));
472
+ }
473
+ function P() {
474
+ let e = window.performance;
475
+ return e ? e.now() : 0;
476
+ }
477
+ function pe(e, t, n, r) {
478
+ let i = P(), a = n.getBoundingClientRect(), o = {
479
+ v: 1,
480
+ tt: e,
481
+ pnow: i,
482
+ sm: t,
483
+ el: {
484
+ bcr: [
485
+ a.left,
486
+ a.top,
487
+ a.width,
488
+ a.height
489
+ ],
490
+ con: document.body.contains(n)
491
+ },
492
+ stack: (/* @__PURE__ */ Error()).stack || "",
493
+ we: !!window.event,
494
+ weit: !!window.event && !!window.event.isTrusted
495
+ };
496
+ return r && (o.ev = {
497
+ ts: r.timeStamp,
498
+ rt: !!r.relatedTarget,
499
+ eot: !!r.explicitOriginalTarget,
500
+ it: r.isTrusted
501
+ }), o;
502
+ }
503
+ function F(e, ...t) {
504
+ for (let r = 0; r < t.length; r++) {
505
+ let i = t[r];
506
+ for (var n in i) i.hasOwnProperty(n) && (e[n] = i[n]);
507
+ }
508
+ return e;
509
+ }
510
+ var me = "frc-captcha-response", he = class {
511
+ constructor(e) {
512
+ this.state = "init", this.response = ".UNINITIALIZED", this.focusEventPending = !1, this.isDestroyed = !1, this.id = e.id;
513
+ let t = e.createOpts;
514
+ if (this.e = t.element, this.ready = e.registered, !this.e) throw Error("No element provided to mount widget under.");
515
+ this.e.frcWidget = this, this.formFieldName = t.formFieldName === void 0 ? me : t.formFieldName, this.sitekey = t.sitekey, this._reset = e.callbacks.onReset, this._destroy = e.callbacks.onDestroy, this._trigger = e.callbacks.onTrigger, this.startMode = e.createOpts.startMode || "focus", this.formFieldName !== null && (this.hiddenFormEl = ee(this.e, this.formFieldName)), this.setState({
516
+ response: ".UNCONNECTED",
517
+ state: "init"
518
+ }), this.ready.then(() => {
519
+ this.handleStartMode();
520
+ });
521
+ }
522
+ handleStartMode() {
523
+ if (this.startMode === "focus" && !this.focusEventPending && !this.isDestroyed) {
524
+ let e = x(this.e);
525
+ e && (this.focusEventPending = !0, S(e, (e) => {
526
+ this.trigger("focus", { ev: e }), this.focusEventPending = !1;
527
+ }));
528
+ } else this.startMode === "auto" && this.trigger("auto");
529
+ }
530
+ reset(e = { trigger: "root" }) {
531
+ if (this.isDestroyed) throw Error("Can not reset destroyed widget.");
532
+ this.setState({
533
+ response: ".RESET",
534
+ state: "reset",
535
+ resetTrigger: e.trigger
536
+ }), this._reset(e), this.handleStartMode();
537
+ }
538
+ destroy() {
539
+ this.isDestroyed = !0, this.hiddenFormEl && this.hiddenFormEl.remove(), this.hiddenFormEl = void 0, this.setState({
540
+ response: ".DESTROYED",
541
+ state: "destroyed"
542
+ }), this._destroy();
543
+ }
544
+ trigger(e, t = {}) {
545
+ if (this.isDestroyed) throw Error("Can not start destroyed widget.");
546
+ let n = pe(e, this.startMode, this.e, t.ev);
547
+ this._trigger({ trigger: n });
548
+ }
549
+ start() {
550
+ this.trigger("programmatic");
551
+ }
552
+ setState(e) {
553
+ let t = this.state !== e.state;
554
+ this.response = e.response, this.state = e.state, this.hiddenFormEl && this.e.isConnected !== !1 && (this.hiddenFormEl.value = e.response), t && this.dispatchWidgetEvent({
555
+ name: "frc:widget.statechange",
556
+ error: e.error,
557
+ mode: e.mode
558
+ }), this.state === "expired" ? this.dispatchWidgetEvent({ name: "frc:widget.expire" }) : this.state === "completed" ? this.dispatchWidgetEvent({ name: "frc:widget.complete" }) : this.state === "error" ? this.dispatchWidgetEvent({
559
+ name: "frc:widget.error",
560
+ error: e.error
561
+ }) : this.state === "reset" && this.dispatchWidgetEvent({
562
+ name: "frc:widget.reset",
563
+ trigger: e.resetTrigger
564
+ });
565
+ }
566
+ dispatchWidgetEvent(e) {
567
+ let t = {
568
+ response: this.response,
569
+ state: this.state,
570
+ id: this.id
571
+ };
572
+ F(t, e), w(this.e, t);
573
+ }
574
+ addEventListener(e, t, n) {
575
+ this.e.addEventListener(e, t, n);
576
+ }
577
+ removeEventListener(e, t, n) {
578
+ this.e.removeEventListener(e, t, n);
579
+ }
580
+ getState() {
581
+ return this.state;
582
+ }
583
+ getResponse() {
584
+ return this.response;
585
+ }
586
+ getElement() {
587
+ return this.e;
588
+ }
589
+ }, ge = function(e) {
590
+ return typeof e == "function";
591
+ }, _e = function(e) {
592
+ let t = [], n = /* @__PURE__ */ new Map(), r = function() {
593
+ return t.splice(0, t.length);
594
+ }, i = window, a = (function() {
595
+ try {
596
+ let e = document.createElement("iframe");
597
+ e.style.display = "none", (document.body || document.head).appendChild(e);
598
+ let t = e ? e.contentWindow : 0;
599
+ return e.remove(), t || i;
600
+ } catch {
601
+ return i;
602
+ }
603
+ })(), o = Function.prototype.toString, s = function(...e) {
604
+ let t = ge(this) ? n.get(this) : !1, r = this === s ? o : t || this;
605
+ return o.apply(r, e);
606
+ };
607
+ Function.prototype.toString = s;
608
+ let c = function() {
609
+ return (a.Error || i.Error)("FriendlyCaptcha_DummyTrace").stack || "";
610
+ }, l = "prototype", u = i.EventTarget ? i.EventTarget[l].dispatchEvent : {}, d = [
611
+ [
612
+ "Document.prototype.documentElement",
613
+ i.Document[l],
614
+ "documentElement"
615
+ ],
616
+ [
617
+ "Element.prototype.shadowRoot",
618
+ i.Element[l],
619
+ "shadowRoot"
620
+ ],
621
+ [
622
+ "Node.prototype.nodeType",
623
+ i.Node[l],
624
+ "nodeType"
625
+ ],
626
+ [
627
+ "Object.is",
628
+ i.Object,
629
+ "is"
630
+ ],
631
+ [
632
+ "Array.prototype.slice",
633
+ i.Array[l],
634
+ "slice"
635
+ ],
636
+ [
637
+ "Document.prototype.querySelectorAll",
638
+ i.Document[l],
639
+ "querySelectorAll"
640
+ ],
641
+ [
642
+ "Document.prototype.createElement",
643
+ i.Document[l],
644
+ "createElement"
645
+ ],
646
+ [
647
+ "EventTarget.prototype.dispatchEvent",
648
+ u,
649
+ "dispatchEvent"
650
+ ]
651
+ ];
652
+ return e.disableEvalPatching || d.push([
653
+ "eval",
654
+ i,
655
+ "eval"
656
+ ]), d.forEach(function([e, r, i]) {
657
+ let a = Object.getOwnPropertyDescriptor(r, i), o = a && (a.get || a.set);
658
+ if (!a) return;
659
+ if (o) {
660
+ if (!a.get) return;
661
+ } else if (typeof a.value != "object" && typeof a.value != "function") return;
662
+ let s = 0, l = 0, u = function(...n) {
663
+ let r = Date.now();
664
+ if (r - s >= 1e3 && (l = 0, s = r), l < 50) {
665
+ let n = {
666
+ d: r,
667
+ pnow: P(),
668
+ n: e,
669
+ st: c()
670
+ };
671
+ t.length > 2e4 && t.splice(0, 1e3), t.push(n), l++;
672
+ }
673
+ return (o ? a.get : a.value).apply(this, n);
674
+ };
675
+ try {
676
+ let e = o ? a.get ? a.get() : void 0 : a.value();
677
+ e && (u.length = e.length, u.name = e.name);
678
+ } catch {}
679
+ try {
680
+ let e = F({}, a);
681
+ o ? e.get = u : e.value = u, Object.defineProperty(r, i, e), n.set(u, o ? a.get : a.value);
682
+ } catch {}
683
+ }), r;
684
+ };
685
+ function I() {
686
+ let e = [
687
+ 0,
688
+ 0,
689
+ 0,
690
+ 0,
691
+ 0,
692
+ 0,
693
+ 0
694
+ ];
695
+ return {
696
+ s: e,
697
+ add(t) {
698
+ let n = ++e[0], r = t - e[1], i = r / n, a = i * i, o = r * i * (n - 1);
699
+ e[1] += i, e[4] += o * a * (n * n - 3 * n + 3) + 6 * a * e[2] - 4 * i * e[3], e[3] += o * i * (n - 2) - 3 * i * e[2], e[2] += o, n == 1 ? e[5] = e[6] = t : (t < e[5] && (e[5] = t), t > e[6] && (e[6] = t));
700
+ }
701
+ };
702
+ }
703
+ var L = "addEventListener", R = Math, ve;
704
+ function z() {
705
+ return /Android/i.test(navigator.userAgent);
706
+ }
707
+ function B(e, t, n = !1, r) {
708
+ let i = I(), a = !1, o;
709
+ return C(() => {
710
+ r ||= document.body, r[L](e, (e) => {
711
+ (!a || n) && (o = e.timeStamp, a = !0);
712
+ }), r[L](t, (e) => {
713
+ a &&= (i.add(e.timeStamp - o), !1);
714
+ });
715
+ }), i.s;
716
+ }
717
+ function ye(e) {
718
+ let t = [];
719
+ for (let n = 0; n < e.length; n++) t.push(0), document[L](e[n], (e) => t[n]++);
720
+ return t;
721
+ }
722
+ function be() {
723
+ let e = [
724
+ 0,
725
+ 0,
726
+ 0,
727
+ 0,
728
+ 0,
729
+ 0,
730
+ 0,
731
+ 0
732
+ ], t = {
733
+ 8: 1,
734
+ 46: 1,
735
+ 9: 2,
736
+ 45: 3,
737
+ 17: 4,
738
+ 13: 5,
739
+ 37: 6,
740
+ 38: 6,
741
+ 39: 6,
742
+ 40: 6,
743
+ 33: 7,
744
+ 34: 7
745
+ };
746
+ return document[L]("keydown", (n) => {
747
+ let r = n.keyCode;
748
+ t[r] ? e[t[r]]++ : r >= 112 && r <= 123 && e[0]++;
749
+ }), e;
750
+ }
751
+ function V(e, t, n, r) {
752
+ return R.sqrt(R.pow(e - t, 2) + R.pow(n - r, 2));
753
+ }
754
+ function H(e, t, n) {
755
+ return R.sqrt(R.pow(e, 2) + R.pow(t, 2) + R.pow(n, 2));
756
+ }
757
+ function U(e, t) {
758
+ let n = t - e;
759
+ return n += n > 180 ? -360 : n < -180 ? 360 : 0, n;
760
+ }
761
+ var xe = class {
762
+ constructor(e) {
763
+ this.rn = 0, this.i = 0, this.smel = {
764
+ n: 0,
765
+ ts: 0,
766
+ d: 0
767
+ };
768
+ let t = this.smel, n = (e) => {
769
+ t.n || (t.fts = e.timeStamp, t.fxy = [
770
+ e.clientX,
771
+ e.clientY,
772
+ e.screenX,
773
+ e.screenY
774
+ ]), t.n++, e.type === "mouseleave" && (t.d += e.timeStamp - t.ts), t.ts = e.timeStamp, t.xy = [e.clientX, e.clientY];
775
+ }, r = document;
776
+ C(() => {
777
+ let e = r.body;
778
+ e[L]("mouseenter", n), e[L]("mouseleave", n);
779
+ }), this.bh = {
780
+ onoff: {
781
+ kdu: B("keydown", "keyup"),
782
+ cse: B("compositionstart", "compositionend"),
783
+ mdu: B("mousedown", "mouseup"),
784
+ mle: B("mouseleave", "mouseenter"),
785
+ med: B("mouseenter", "mousedown", !0),
786
+ semd: B("scrollend", "mousedown", !0, r),
787
+ se: B("scroll", "scrollend", !1, r),
788
+ pdc: B("pointerdown", "pointercancel", !0),
789
+ mmc: B("mousemove", "click", !0),
790
+ tse: B("touchstart", "touchend"),
791
+ fikd: B("focusin", "keydown", !0)
792
+ },
793
+ nev: ye([
794
+ "mouseout",
795
+ "pointercancel",
796
+ "focus",
797
+ "focusin",
798
+ "blur",
799
+ "visibilitychange",
800
+ "copy",
801
+ "paste",
802
+ "cut",
803
+ "contextmenu",
804
+ "click",
805
+ "auxclick",
806
+ "wheel",
807
+ "resize"
808
+ ]),
809
+ nk: be(),
810
+ mov: this.setupMovementMetrics(),
811
+ dm: this.setupMotionMetrics(),
812
+ do: this.setupOrientationMetrics()
813
+ }, this.dep = e.disableEvalPatching || !1, this.takeTraceRecords = _e(e);
814
+ }
815
+ setupMovementMetrics() {
816
+ let e, t = [], n = I(), r = I(), i = I(), a = {
817
+ t: n.s,
818
+ v: i.s,
819
+ d: r.s,
820
+ ns: 0
821
+ }, o = () => {
822
+ let o = t[t.length - 1];
823
+ if (t.length >= 1e4 / 50 || o && (o[0] && this.tm.timeStamp === o[1] || !o[0] && this.mm.timeStamp === o[1])) {
824
+ if (clearInterval(e), e = void 0, t.length === 1) {
825
+ a.ns++, t = [];
826
+ return;
827
+ }
828
+ let s = t[0];
829
+ n.add(o[1] - s[1]), r.add(V(o[2], s[2], o[3], s[3]));
830
+ for (let e = 1; e < t.length; e++) {
831
+ let n = t[e], r = t[e - 1], a = V(n[2], r[2], n[3], r[3]) * 1e3, o = n[1] - r[1];
832
+ i.add(a / o);
833
+ }
834
+ t = [];
835
+ return;
836
+ }
837
+ let s = 0;
838
+ if (o ? s = o[0] : this.mm && this.tm ? s = this.mm.timeStamp > this.tm.timeStamp ? 0 : 1 : this.mm || (s = 1), s) {
839
+ let e = this.tm.touches[0];
840
+ e && t.push([
841
+ 1,
842
+ this.tm.timeStamp,
843
+ e.screenX,
844
+ e.screenY
845
+ ]);
846
+ } else t.push([
847
+ 0,
848
+ this.mm.timeStamp,
849
+ this.mm.screenX,
850
+ this.mm.screenY
851
+ ]);
852
+ }, s = -1;
853
+ return C(() => {
854
+ let t = document.body;
855
+ t[L]("mousemove", (t) => {
856
+ this.mm = t, e === void 0 && (o(), e = setInterval(o, 50));
857
+ }), t[L]("touchmove", (t) => {
858
+ this.tm = t;
859
+ let n = t.touches[0];
860
+ if (n) {
861
+ let e = n.radiusX + n.radiusY * 1.234;
862
+ e !== s && (s = e, this.rn++);
863
+ }
864
+ e === void 0 && (o(), e = setInterval(o, 50));
865
+ });
866
+ }), a;
867
+ }
868
+ setupMotionMetrics() {
869
+ let e = I(), t = I(), n = {
870
+ n: 0,
871
+ ts: 0,
872
+ ac: e.s,
873
+ rr: t.s,
874
+ i: 0,
875
+ g: !1
876
+ };
877
+ return z() && window[L]("devicemotion", (r) => {
878
+ n.ts = r.timeStamp, n.i = r.interval, n.g = !r.acceleration;
879
+ let i = r.acceleration || r.accelerationIncludingGravity;
880
+ i && e.add(H(i.x, i.y, i.z));
881
+ let a = r.rotationRate;
882
+ a && t.add(H(a.alpha, a.beta, a.gamma));
883
+ }), n;
884
+ }
885
+ setupOrientationMetrics() {
886
+ let e = I(), t = I(), n = {
887
+ fts: 0,
888
+ ts: 0,
889
+ gd: e.s,
890
+ bd: t.s
891
+ };
892
+ if (!z()) return n;
893
+ let r;
894
+ return window[L]("deviceorientation", (i) => {
895
+ i.gamma == null || i.beta == null || i.alpha == null || (n.ts = i.timeStamp, n.a = i.alpha, n.b = i.beta, n.g = i.gamma, r ? (e.add(U(i.gamma, n.g)), t.add(U(n.b, i.beta))) : (n.fts = n.ts, r = !0));
896
+ }), n;
897
+ }
898
+ gmm() {
899
+ let e = this.mm;
900
+ return e && {
901
+ xy: [
902
+ e.clientX,
903
+ e.clientY,
904
+ e.screenX,
905
+ e.screenY,
906
+ e.offsetX,
907
+ e.offsetY,
908
+ e.pageX,
909
+ e.pageY,
910
+ e.movementX,
911
+ e.movementY
912
+ ],
913
+ ts: e.timeStamp
914
+ };
915
+ }
916
+ gtm() {
917
+ let e = this.tm, t = e && e.touches, n = t && t[0];
918
+ return e && n && {
919
+ id: n.identifier,
920
+ xy: [
921
+ n.clientX,
922
+ n.clientY,
923
+ n.screenX,
924
+ n.screenY,
925
+ n.pageX,
926
+ n.pageY
927
+ ],
928
+ r: [
929
+ n.radiusX,
930
+ n.radiusX,
931
+ n.rotationAngle,
932
+ n.force
933
+ ],
934
+ n: t.length,
935
+ ts: e.timeStamp,
936
+ rn: this.rn
937
+ };
938
+ }
939
+ get(e) {
940
+ let t = document.body, n = window, r = n.performance;
941
+ return {
942
+ v: 1,
943
+ i: ++this.i,
944
+ hl: history.length,
945
+ fe: !!window.frameElement,
946
+ dep: this.dep,
947
+ wid: e,
948
+ sc: parseInt(g(!1)),
949
+ sid: _(),
950
+ conv: 0,
951
+ t: {
952
+ pnow: P(),
953
+ pto: r && r.timeOrigin || 0,
954
+ ts: Date.now()
955
+ },
956
+ dims: {
957
+ d: [
958
+ n.innerWidth,
959
+ n.innerHeight,
960
+ n.outerWidth,
961
+ n.outerHeight,
962
+ n.screenX,
963
+ n.screenY,
964
+ n.pageXOffset,
965
+ n.pageYOffset,
966
+ t.clientWidth,
967
+ t.clientHeight
968
+ ],
969
+ dpr: n.devicePixelRatio
970
+ },
971
+ mel: this.smel,
972
+ mm: this.gmm(),
973
+ tm: this.gtm(),
974
+ bh: this.bh,
975
+ stack: (/* @__PURE__ */ Error()).stack || "",
976
+ trc: this.takeTraceRecords()
977
+ };
978
+ }
979
+ };
980
+ function Se(e) {
981
+ return ve ||= new xe(e);
982
+ }
983
+ var W = (e) => e.map((e) => `https://${e}.frcapi.com`).join(","), G = {
984
+ eu: W([
985
+ "eu",
986
+ "eu0",
987
+ "eu1"
988
+ ]),
989
+ global: W([
990
+ "global",
991
+ "global0",
992
+ "global1"
993
+ ])
994
+ }, K = (e) => e.split(",").map((e) => e.trim()).filter((e) => !!e), Ce = (e) => K(G[e] || e);
995
+ function q(e) {
996
+ let t = K(e || G.global).reduce((e, t) => e.concat(Ce(t)), []).map(i);
997
+ return t.length > 0 ? t : K(G.global).map(i);
998
+ }
999
+ function we() {
1000
+ let e = document.querySelector("meta[name=\"frc-disable-eval-patching\"]");
1001
+ return e ? !!e.content : !1;
1002
+ }
1003
+ function J() {
1004
+ let e = document.querySelector("meta[name=\"frc-api-endpoint\"]");
1005
+ if (e) return e.content;
1006
+ let t = document.currentScript;
1007
+ if (t) {
1008
+ let e = t.dataset.frcApiEndpoint;
1009
+ if (e) return e;
1010
+ }
1011
+ let n = document.querySelector(".frc-captcha[data-api-endpoint]");
1012
+ if (n) {
1013
+ let e = n.dataset.apiEndpoint;
1014
+ if (e) return e;
1015
+ }
1016
+ }
1017
+ function Te() {
1018
+ let e = window.Intl;
1019
+ if (!e || !e.DateTimeFormat) return;
1020
+ let t = new e.DateTimeFormat();
1021
+ if (!(!t || !t.resolvedOptions)) return t.resolvedOptions().timeZone;
1022
+ }
1023
+ var Y = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
1024
+ function Ee(e) {
1025
+ return window.TextEncoder ? De(new TextEncoder().encode(e)) : "";
1026
+ }
1027
+ function De(e) {
1028
+ let t = e.length, n = "";
1029
+ for (let r = 0; r < t; r += 3) {
1030
+ let t = e[r + 0], i = e[r + 1], a = e[r + 2], o = "";
1031
+ o += Y.charAt(t >>> 2), o += Y.charAt((t & 3) << 4 | i >>> 4), o += Y.charAt((i & 15) << 2 | a >>> 6), o += Y.charAt(a & 63), n += o;
1032
+ }
1033
+ return t % 3 == 2 ? n = n.substring(0, n.length - 1) + "=" : t % 3 == 1 && (n = n.substring(0, n.length - 2) + "=="), n;
1034
+ }
1035
+ var Oe = "frc-risk-intelligence-token", ke = class {
1036
+ constructor(e) {
1037
+ if (this.timeout = null, this.data = null, this.e = e.element, !this.e) throw Error("No element provided for mounting Risk Intelligence handle.");
1038
+ this.e.frcRiskIntelligence = this, this.formFieldName = e.formFieldName === void 0 ? Oe : e.formFieldName, this.formFieldName !== null && (this.hiddenFormEl = ee(this.e, this.formFieldName)), this.startMode = e.startMode || "focus", this.requestRiskIntelligence = e.riskIntelligence, this.handleStartMode();
1039
+ }
1040
+ handleStartMode() {
1041
+ if (this.startMode === "none") console.warn("Risk Intelligence <div> found with data-start=\"none\" (no-op), skipping...", this.e);
1042
+ else if (this.startMode === "auto") this.request();
1043
+ else {
1044
+ let e = x(this.e);
1045
+ e ? S(e, () => {
1046
+ this.request();
1047
+ }) : console.warn("Risk Intelligence <div> with startMode of \"focus\" found without a parent <form> element, skipping...", this.e);
1048
+ }
1049
+ }
1050
+ request() {
1051
+ this.requestRiskIntelligence().then((e) => {
1052
+ this.timeout !== null && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
1053
+ w(this.e, { name: "frc:riskintelligence.expire" });
1054
+ }, e.expiresAt - Date.now()), this.data = {
1055
+ token: e.token,
1056
+ expiresAt: e.expiresAt
1057
+ }, this.hiddenFormEl && (this.hiddenFormEl.value = e.token), w(this.e, {
1058
+ name: "frc:riskintelligence.complete",
1059
+ token: e.token,
1060
+ expiresAt: e.expiresAt
1061
+ });
1062
+ }).catch((e) => {
1063
+ w(this.e, {
1064
+ name: "frc:riskintelligence.error",
1065
+ error: {
1066
+ code: e.code,
1067
+ detail: e.detail
1068
+ }
1069
+ });
1070
+ });
1071
+ }
1072
+ getData() {
1073
+ return this.data;
1074
+ }
1075
+ getElement() {
1076
+ return this.e;
1077
+ }
1078
+ addEventListener(e, t, n) {
1079
+ this.e.addEventListener(e, t, n);
1080
+ }
1081
+ removeEventListener(e, t, n) {
1082
+ this.e.removeEventListener(e, t, n);
1083
+ }
1084
+ };
1085
+ function Ae(e) {
1086
+ return e.length === 0 ? [] : [e[0]].concat(l(e.slice(1)));
1087
+ }
1088
+ function X(e, t) {
1089
+ let n = t.length;
1090
+ if (n === 0) return -1;
1091
+ if (e <= 2 || n === 1) return 0;
1092
+ let r = n - 1, i = e - 2;
1093
+ return i <= r ? i : 1 + Math.floor(Math.random() * r);
1094
+ }
1095
+ function je(e, n, r) {
1096
+ let a = i(e), o = i(n), s = t(e, a) ? e.slice(a.length) : e;
1097
+ s.length === 0 ? s = "/" : t(s, "/") || (s = "/" + s);
1098
+ let c = s.indexOf("?") === -1 ? "?" : "&";
1099
+ return o + s + c + "retry=" + r;
1100
+ }
1101
+ var Me = "/api/v2/captcha/agent", Ne = "/api/v2/captcha/widget", Z = "FrcFrameId", Pe = "FrcAgentOriginKey", Fe = 1e3 * 60 * 60 * 36, Ie = 5, Q, $ = 0, Le = class {
1102
+ constructor(t = {}) {
1103
+ if (this.agents = /* @__PURE__ */ new Map(), this.agentState = /* @__PURE__ */ new Map(), this.widgets = /* @__PURE__ */ new Map(), this._attached = e(), this.attached = this._attached.promise, this.riskIntelligencePromises = /* @__PURE__ */ new Map(), this.clearRiskIntelligencePromises = /* @__PURE__ */ new Map(), this.riskIntelligenceHandles = [], this.apiEndpoint = t.apiEndpoint, Q ||= new s(), Q.listen((e) => this.onReceiveMessage(e)), this.bus = Q, $++, $ > 1 && console.warn("Multiple Friendly Captcha SDKs created, this is not recommended. Please use a single SDK instance."), this.signals = Se({ disableEvalPatching: t.disableEvalPatching || we() }), t.startAgent) {
1104
+ let e = q(this.apiEndpoint || J()), t = this.getRetryOrigins(e);
1105
+ this.ensureAgentIFrame(t);
1106
+ }
1107
+ this.setupPeriodicRefresh();
1108
+ }
1109
+ getRetryOrigins(e) {
1110
+ return Ae(e);
1111
+ }
1112
+ onReceiveMessage(e) {
1113
+ if (e.type === "root_set_response") {
1114
+ let t = this.widgets.get(e.widget_id);
1115
+ if (!t) {
1116
+ $ === 1 && console.warn(`Received set response message for widget ${e.widget_id} that doesn't exist`);
1117
+ return;
1118
+ }
1119
+ t.setState(e);
1120
+ } else if (t(e.type, "root_store")) this.handleStoreMessage(e);
1121
+ else if (e.type === "root_signals_get") this.handleSignalsGetMessage(e);
1122
+ else if (e.type === "widget_language_change") this.handleWidgetLanguageChange(e);
1123
+ else if (e.type === "widget_reset") {
1124
+ let t = this.widgets.get(e.from_id);
1125
+ if (!t) {
1126
+ $ === 1 && console.warn(`Received reset message for widget ${e.from_id} that doesn't exist`);
1127
+ return;
1128
+ }
1129
+ t.reset({ trigger: "widget" });
1130
+ } else t(e.type, "root_risk_intelligence") && this.handleRiskIntelligenceMessage(e);
1131
+ }
1132
+ handleRiskIntelligenceMessage(e) {
1133
+ if (e.type === "root_risk_intelligence_generate_reply") {
1134
+ let t = this.riskIntelligencePromises.get(e.uid);
1135
+ t ? (e.data ? t.resolve(e.data) : e.error ? t.reject(e.error) : console.warn("Received risk intelligence generate reply message with no data"), this.riskIntelligencePromises.delete(e.uid)) : console.warn("Received risk intelligence generate reply message with no promise to resolve");
1136
+ } else if (e.type === "root_risk_intelligence_clear_reply") {
1137
+ let t = this.clearRiskIntelligencePromises.get(e.uid);
1138
+ t ? e.error ? t.reject(e.error) : t.resolve() : console.warn("Received risk intelligence clear reply message with no promise to resolve"), this.clearRiskIntelligencePromises.delete(e.uid);
1139
+ }
1140
+ }
1141
+ handleWidgetLanguageChange(e) {
1142
+ let t = this.widgets.get(e.from_id);
1143
+ if (!t) {
1144
+ $ === 1 && console.warn(`Received language change message for widget ${e.from_id} that doesn't exist`);
1145
+ return;
1146
+ }
1147
+ let n = t.getElement(), r = n.querySelector("iframe");
1148
+ r && (r.title = O(e.language));
1149
+ let i = n.querySelector(".frc-banner");
1150
+ if (i) {
1151
+ let t = i.style;
1152
+ D(e.language) ? (t.left = "6px", t.right = "auto") : (t.left = "auto", t.right = "6px");
1153
+ }
1154
+ }
1155
+ handleSignalsGetMessage(e) {
1156
+ let t = this.signals.get(e.widget_id);
1157
+ this.bus.send({
1158
+ type: "root_signals_get_reply",
1159
+ from_id: "",
1160
+ to_id: e.from_id,
1161
+ _frc: 1,
1162
+ rid: e.rid,
1163
+ value: t
1164
+ });
1165
+ }
1166
+ handleStoreMessage(e) {
1167
+ let t = e.from_id, n = this.agentState.get(t);
1168
+ if (!n) {
1169
+ console.error(`Store not found ${t}`);
1170
+ return;
1171
+ }
1172
+ e.type === "root_store_get" ? this.bus.send({
1173
+ type: "root_store_get_reply",
1174
+ from_id: "",
1175
+ to_id: t,
1176
+ _frc: 1,
1177
+ rid: e.rid,
1178
+ value: n.store.get(e.key),
1179
+ sa: !0
1180
+ }) : e.type === "root_store_set" && (n.store.set(e.key, e.value), this.bus.send({
1181
+ type: "root_store_set_reply",
1182
+ from_id: "",
1183
+ to_id: t,
1184
+ _frc: 1,
1185
+ rid: e.rid,
1186
+ sa: !0
1187
+ }));
1188
+ }
1189
+ ensureAgentIFrame(e) {
1190
+ let t = 1, n = e[X(t, e)], r = n + Me, i = Ie, a = this.agents.get(n);
1191
+ if (a && a.dataset[Z]) return a.dataset[Z];
1192
+ let o = document.getElementsByClassName(j);
1193
+ for (let e = 0; e < o.length; e++) {
1194
+ let t = o[e];
1195
+ if (t.dataset[Pe] === n && t.dataset[Z]) return this.agents.set(n, t), t.dataset[Z];
1196
+ }
1197
+ let s = "a_" + c(12), l = ce(this, s, r);
1198
+ l.dataset[Pe] = n;
1199
+ let u = l.src, d = n;
1200
+ this.agents.set(n, l), this.agentState.set(s, {
1201
+ store: new v(n),
1202
+ origin: n
1203
+ }), document.body.appendChild(l);
1204
+ let f = () => {
1205
+ this.bus.registerTargetIFrame("agent", s, l, this.getRetryTimeout(t)).then((r) => {
1206
+ if (r === "timeout") {
1207
+ if (t >= i) {
1208
+ console.error(`[Friendly Captcha] Failed to load agent iframe after ${t - 1} retries.`), l.remove(), this.agents.delete(n);
1209
+ return;
1210
+ }
1211
+ let r = t + 1;
1212
+ d = e[X(r, e)] || d, console.warn("[Friendly Captcha] Retrying agent iframe load."), l.src = je(u, d, r - 1), t = r, f();
1213
+ }
1214
+ });
1215
+ };
1216
+ return f(), s;
1217
+ }
1218
+ setupPeriodicRefresh() {
1219
+ let e = 1;
1220
+ setInterval(() => {
1221
+ let t = "&expire=" + e++;
1222
+ this.agents.forEach((e, n) => {
1223
+ e.src += t;
1224
+ }), this.widgets.forEach((e, n) => {
1225
+ let r = e.getElement().querySelector("iframe");
1226
+ r.src += t;
1227
+ });
1228
+ }, Fe);
1229
+ }
1230
+ getRetryTimeout(e) {
1231
+ return (1.5 + e ** 1.8) * 1e3;
1232
+ }
1233
+ attach(e) {
1234
+ let [t, n] = b();
1235
+ for (let e = 0; e < n.length; e++) {
1236
+ let t = n[e];
1237
+ if (t && !t.frcRiskIntelligence) {
1238
+ let e = t.dataset, n = e.sitekey;
1239
+ if (!n) {
1240
+ console.warn("Risk Intelligence <div> found with no sitekey, skipping...", t);
1241
+ continue;
1242
+ }
1243
+ this.riskIntelligenceHandles.push(new ke({
1244
+ element: t,
1245
+ formFieldName: e.formFieldName,
1246
+ startMode: e.start,
1247
+ riskIntelligence: () => this.riskIntelligence({
1248
+ sitekey: n,
1249
+ apiEndpoint: e.apiEndpoint
1250
+ })
1251
+ }));
1252
+ }
1253
+ }
1254
+ e === void 0 && (e = t), Array.isArray(e) || e instanceof NodeList || (e = [e]);
1255
+ let r = [];
1256
+ for (let t = 0; t < e.length; t++) {
1257
+ let n = e[t];
1258
+ if (n && !n.frcWidget) {
1259
+ let e = n.dataset, t = {
1260
+ element: n,
1261
+ sitekey: e.sitekey,
1262
+ formFieldName: e.formFieldName,
1263
+ apiEndpoint: e.apiEndpoint,
1264
+ language: e.lang,
1265
+ theme: e.theme,
1266
+ startMode: e.start
1267
+ };
1268
+ r.push(this.createWidget(t));
1269
+ }
1270
+ }
1271
+ let i = this.getAllWidgets();
1272
+ return this._attached.resolve(i), this.attached = Promise.resolve(i), r;
1273
+ }
1274
+ createWidget(t) {
1275
+ let n = q(t.apiEndpoint || this.apiEndpoint || J()), r = this.getRetryOrigins(n), a = 1;
1276
+ this.bus.addOrigins(n);
1277
+ let o = r[X(a, r)] || n[0], s = this.ensureAgentIFrame(r), l = "w_" + c(12), u = (e) => {
1278
+ let t = {
1279
+ from_id: l,
1280
+ to_id: s,
1281
+ _frc: 1
1282
+ };
1283
+ this.bus.send(F(t, e));
1284
+ }, d = {
1285
+ onDestroy: () => {
1286
+ u({ type: "root_destroy_widget" }), this.bus.removeTarget(l), this.widgets.delete(l), t.element.innerHTML = "", re(t.element);
1287
+ },
1288
+ onReset: () => {
1289
+ u({ type: "root_reset_widget" });
1290
+ },
1291
+ onTrigger: (e) => {
1292
+ u({
1293
+ type: "root_trigger_widget",
1294
+ trigger: e.trigger
1295
+ });
1296
+ }
1297
+ }, f = e(), p = new he({
1298
+ id: l,
1299
+ createOpts: t,
1300
+ callbacks: d,
1301
+ registered: f.promise
1302
+ });
1303
+ this.widgets.set(l, p);
1304
+ let m = le(s, l, o + Ne, t), h = Ie, g = m.src, _ = o, v = ue(t);
1305
+ ne(t.element), de(t);
1306
+ let y = N(t);
1307
+ D(y) && (t.element.dir = "rtl");
1308
+ let b = v.style;
1309
+ v.textContent = k(y, "connecting");
1310
+ function x(e) {
1311
+ let n = Ee(JSON.stringify({
1312
+ sdk_v: "1.0.0",
1313
+ sitekey: t.sitekey || "",
1314
+ retry: a + "",
1315
+ endpoint: _,
1316
+ ua: navigator.userAgent,
1317
+ tz: Te() || ""
1318
+ })), r = ".ERROR.UNREACHABLE";
1319
+ n && (r += "~" + n), p.setState({
1320
+ state: "error",
1321
+ response: r,
1322
+ error: {
1323
+ code: "network_error",
1324
+ detail: e
1325
+ }
1326
+ });
1327
+ }
1328
+ let S = () => {
1329
+ this.bus.registerTargetIFrame("widget", l, m, this.getRetryTimeout(a)).then((e) => {
1330
+ if (e === "timeout") {
1331
+ if (a >= h) {
1332
+ console.error(`[Friendly Captcha] Failed to load widget iframe after ${a - 1} retries.`), x("Widget load timeout, stopped retrying"), b.borderColor = "#f00", b.fontSize = "12px", fe(v, i(m.src), y);
1333
+ return;
1334
+ }
1335
+ let e = a + 1;
1336
+ _ = r[X(e, r)] || _, b.backgroundColor = "#fee", b.color = "#222", v.textContent = k(y, "retrying") + ` (${a})`, console.warn(`[Friendly Captcha] Retrying widget ${l} iframe load.`), x("Widget load timeout, will retry"), m.src = je(g, _, e - 1), a = e, S();
1337
+ } else e === "registered" && (t.element.removeChild(v), m.style.display = "");
1338
+ });
1339
+ };
1340
+ return S(), f.resolve(), p;
1341
+ }
1342
+ riskIntelligence(t) {
1343
+ let n = q(t.apiEndpoint || this.apiEndpoint || J()), r = this.getRetryOrigins(n);
1344
+ this.bus.addOrigins(n);
1345
+ let i = this.ensureAgentIFrame(r), a = c(8);
1346
+ this.bus.send({
1347
+ type: "root_risk_intelligence_generate",
1348
+ to_id: i,
1349
+ from_id: "",
1350
+ _frc: 1,
1351
+ sitekey: t.sitekey,
1352
+ bypassCache: t.bypassCache || !1,
1353
+ uid: a
1354
+ });
1355
+ let o = e();
1356
+ return this.riskIntelligencePromises.set(a, o), o.promise;
1357
+ }
1358
+ clearRiskIntelligence(t) {
1359
+ let n = q(t?.apiEndpoint || this.apiEndpoint || J()), r = this.getRetryOrigins(n);
1360
+ this.bus.addOrigins(n);
1361
+ let i = this.ensureAgentIFrame(r), a = c(8);
1362
+ this.bus.send({
1363
+ type: "root_risk_intelligence_clear",
1364
+ to_id: i,
1365
+ from_id: "",
1366
+ _frc: 1,
1367
+ sitekey: t?.sitekey,
1368
+ uid: a
1369
+ });
1370
+ let o = e();
1371
+ return this.clearRiskIntelligencePromises.set(a, o), o.promise;
1372
+ }
1373
+ getAllWidgets() {
1374
+ let e = [];
1375
+ return this.widgets.forEach((t) => {
1376
+ e.push(t);
1377
+ }), e;
1378
+ }
1379
+ getWidgetById(e) {
1380
+ return this.widgets.get(e);
1381
+ }
1382
+ getAllRiskIntelligenceHandles() {
1383
+ let e = [];
1384
+ return this.riskIntelligenceHandles.forEach((t) => {
1385
+ e.push(t);
1386
+ }), e;
1387
+ }
1388
+ clear() {
1389
+ this.widgets.forEach((e) => {
1390
+ e.destroy();
1391
+ }), this.agents.forEach((e) => {
1392
+ e.remove();
1393
+ }), this.agents.clear();
1394
+ }
1395
+ }, Re = "frc:widget.statechange", ze = "frc:widget.complete", Be = "frc:widget.expire", Ve = "frc:widget.error", He = "frc:widget.reset", Ue = "frc:riskintelligence.complete", We = "frc:riskintelligence.error", Ge = "frc:riskintelligence.expire";
1396
+ //#endregion
1397
+ export { Ue as FRCRiskIntelligenceCompleteEventName, We as FRCRiskIntelligenceErrorEventName, Ge as FRCRiskIntelligenceExpireEventName, ze as FRCWidgetCompleteEventName, Ve as FRCWidgetErrorEventName, Be as FRCWidgetExpireEventName, He as FRCWidgetResetEventName, Re as FRCWidgetStateChangeEventName, Le as FriendlyCaptchaSDK };