@verbb/formie-browser 1.0.15 → 1.0.16

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 (135) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/chunks/{address-country-BcEQKw0T.js → address-country-DLJF-OkC.js} +4 -8
  3. package/dist/chunks/{address-finder-BWGINCSA.js → address-finder-QK1m1eyv.js} +1 -1
  4. package/dist/chunks/{address-state-DI3ndhMU.js → address-state-CHKit8AW.js} +26 -35
  5. package/dist/chunks/{api-BK9b340y.js → api-BPtH5RBA.js} +152 -120
  6. package/dist/chunks/{api-Dxl_CKw-.js → api-BR2Gqy37.js} +306 -301
  7. package/dist/chunks/{api-ghNr2uxX.js → api-CmuOZ0i3.js} +1 -1
  8. package/dist/chunks/{bpoint-BwtuyN_O.js → bpoint-GvYfyPjD.js} +1 -1
  9. package/dist/chunks/{calculations-YEoVCG2q.js → calculations-DeEmdUDq.js} +5 -7
  10. package/dist/chunks/{captcha-eu-DWLoQFKB.js → captcha-eu-eU_M6snp.js} +1 -1
  11. package/dist/chunks/{checkbox-radio-gsm8QPJg.js → checkbox-radio-CSXo6svm.js} +4 -12
  12. package/dist/chunks/{combobox-Ba08_cHL.js → combobox-CJh2DoSO.js} +292 -333
  13. package/dist/chunks/{conditions-Ceeg6ReZ.js → conditions-Dz3068K0.js} +56 -72
  14. package/dist/chunks/{country-from-ip-DDj_mFki.js → country-from-ip-BqQ-BqLH.js} +1 -1
  15. package/dist/chunks/{custom-google-maps-C4l2S3GO.js → custom-google-maps-rNm5VFbb.js} +2 -6
  16. package/dist/chunks/{custom-link-CLazgKYH.js → custom-link-CLqFCssQ.js} +1 -1
  17. package/dist/chunks/{custom-maps-DqcAlD0v.js → custom-maps-DgjYQDLj.js} +4 -8
  18. package/dist/chunks/{date-picker-DaPvMrop.js → date-picker-BVJxJVYT.js} +30 -47
  19. package/dist/chunks/{debug-BV0DvdHx.js → debug-rhzqP1j2.js} +2 -14
  20. package/dist/chunks/{dist-ZLeW0zZ3.js → dist-CJReDlDK.js} +13 -8
  21. package/dist/chunks/{eway-uw0DzU-L.js → eway-BZuTBAUW.js} +1 -1
  22. package/dist/chunks/{field-references.resolver-Ca8MguFv.js → field-references.resolver-uSHf5-NP.js} +1 -1
  23. package/dist/chunks/{file-upload-B8_mH012.js → file-upload-vEUr_EuP.js} +114 -108
  24. package/dist/chunks/{friendly-captcha-v1-CVXaXgDO.js → friendly-captcha-v1-C_cF1WD2.js} +2 -2
  25. package/dist/chunks/{friendly-captcha-v2-DkeIVTKI.js → friendly-captcha-v2-BenESH-n.js} +2 -2
  26. package/dist/chunks/{friendly-challenge-DPG9MJb1.js → friendly-challenge-BgPBEMXx.js} +21 -35
  27. package/dist/chunks/{go-cardless-c4wLJdOt.js → go-cardless-DWZeB0Bq.js} +2 -6
  28. package/dist/chunks/{google-address-JHYvjwgN.js → google-address-DQR6rsbh.js} +2 -2
  29. package/dist/chunks/{hcaptcha-Dt3ELLlP.js → hcaptcha-COilLmRT.js} +1 -1
  30. package/dist/chunks/{hidden-BZhXnNPe.js → hidden-Bc2TpcgF.js} +1 -1
  31. package/dist/chunks/{http-C2QdHuWO.js → http-Dj_skqaa.js} +1 -1
  32. package/dist/chunks/{leaflet-src-DE6rv6M-.js → leaflet-src-Cg-LUOD8.js} +74 -122
  33. package/dist/chunks/{loqate-m51iPyO1.js → loqate-ZZClcacr.js} +1 -1
  34. package/dist/chunks/{mollie-Bn0PX173.js → mollie-8OMXIYa8.js} +2 -6
  35. package/dist/chunks/{moneris-BRbUvI4t.js → moneris-qYHJ9EFy.js} +1 -1
  36. package/dist/chunks/opayo-DlWPEnla.js +159 -0
  37. package/dist/chunks/{paddle-CympHVvd.js → paddle-CArfWih0.js} +1 -1
  38. package/dist/chunks/{password-validation-C8_uO_c_.js → password-validation-HGOU9kf3.js} +2 -2
  39. package/dist/chunks/{paypal-h75h6wae.js → paypal-BcaMCMGY.js} +1 -1
  40. package/dist/chunks/{payway-C9rHTCC_.js → payway-vxC7_bfR.js} +3 -11
  41. package/dist/chunks/{phone-country-B8fv-L5_.js → phone-country-Bx9EG50h.js} +123 -140
  42. package/dist/chunks/{place-kit-BnZGQ-L1.js → place-kit-BKk8xDXf.js} +2 -2
  43. package/dist/chunks/{placekit-autocomplete.esm-CZZERYur.js → placekit-autocomplete.esm-D2A_0iVU.js} +2 -5
  44. package/dist/chunks/{recaptcha-enterprise-CUs8BO6V.js → recaptcha-enterprise-Cx6HUpMa.js} +6 -12
  45. package/dist/chunks/recaptcha-shared-CcMI-r8t.js +33 -0
  46. package/dist/chunks/{recaptcha-v2-checkbox-P1McW4Pv.js → recaptcha-v2-checkbox-DQ9BJzcv.js} +2 -2
  47. package/dist/chunks/{recaptcha-v2-invisible-FGDqozSP.js → recaptcha-v2-invisible-BP0T8Pan.js} +2 -2
  48. package/dist/chunks/recaptcha-v3-DKMGQ27K.js +38 -0
  49. package/dist/chunks/{repeater-CyhDbozO.js → repeater-BR0RUvTs.js} +3 -7
  50. package/dist/chunks/{rich-text-uV4o_pGk.js → rich-text-H2A6cm1t.js} +33 -11
  51. package/dist/chunks/{rolldown-runtime-DtPi1Y-2.js → rolldown-runtime-VHNaYcLd.js} +1 -1
  52. package/dist/chunks/{sdk-lkwSvlpM.js → sdk-_cmrRYgp.js} +4 -16
  53. package/dist/chunks/{shared-OKhSay59.js → shared-CJ1LIEh3.js} +1 -3
  54. package/dist/chunks/{signature-7cldFbqj.js → signature-CfKA_poI.js} +9 -41
  55. package/dist/chunks/{snaptcha-C3QLYxFT.js → snaptcha-P3EoSQud.js} +1 -1
  56. package/dist/chunks/{square-C1z5DPVw.js → square-Dyz0p_GU.js} +1 -1
  57. package/dist/chunks/{stripe-Dmkdkq1y.js → stripe-Bfd_jp_k.js} +3 -6
  58. package/dist/chunks/{summary-Bn-g5SDx.js → summary-B3CAebLV.js} +44 -36
  59. package/dist/chunks/{survey-likert-fk1hUPff.js → survey-likert-CEtUceag.js} +1 -1
  60. package/dist/chunks/{survey-rank-BsLGl2LX.js → survey-rank-Dtt97y6s.js} +3 -7
  61. package/dist/chunks/{survey-rating-DVS6e6fM.js → survey-rating-mlDMI0uq.js} +9 -23
  62. package/dist/chunks/{table-j7MlLLCc.js → table-0k6Md0IO.js} +1 -1
  63. package/dist/chunks/{text-limit-LGMPhFuC.js → text-limit-CTVML6s7.js} +10 -10
  64. package/dist/chunks/{turnstile-ptihQfLl.js → turnstile-Sp4ubowK.js} +1 -1
  65. package/dist/chunks/{upload-manager-BW7l-BhF.js → upload-manager-Ccg3d_4I.js} +11 -25
  66. package/dist/index.d.ts +1 -0
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +752 -756
  69. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  70. package/dist/js/core/dom-events.d.ts +5 -0
  71. package/dist/js/core/dom-events.d.ts.map +1 -1
  72. package/dist/js/core/page-client-event.d.ts.map +1 -1
  73. package/dist/js/core/submit-result-state.d.ts.map +1 -1
  74. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  75. package/dist/js/core/validation-focus.d.ts.map +1 -1
  76. package/dist/js/modules/captchas/factories.d.ts.map +1 -1
  77. package/dist/js/modules/captchas/host.d.ts +4 -1
  78. package/dist/js/modules/captchas/host.d.ts.map +1 -1
  79. package/dist/js/modules/captchas/recaptcha-shared.d.ts +1 -1
  80. package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -1
  81. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
  82. package/dist/js/modules/fields/address-state.d.ts.map +1 -1
  83. package/dist/js/modules/fields/combobox.d.ts +2 -0
  84. package/dist/js/modules/fields/combobox.d.ts.map +1 -1
  85. package/dist/js/modules/fields/conditions.d.ts.map +1 -1
  86. package/dist/js/modules/fields/file-upload.d.ts.map +1 -1
  87. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  88. package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
  89. package/dist/js/modules/fields/summary.d.ts.map +1 -1
  90. package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
  91. package/dist/js/modules/payments/factories.d.ts.map +1 -1
  92. package/dist/js/modules/payments/opayo.d.ts.map +1 -1
  93. package/dist/js/submit/pipeline.d.ts +2 -0
  94. package/dist/js/submit/pipeline.d.ts.map +1 -1
  95. package/dist/js/utils/form-started-at.d.ts +1 -0
  96. package/dist/js/utils/form-started-at.d.ts.map +1 -1
  97. package/dist/js/utils/unload-warning.d.ts +4 -0
  98. package/dist/js/utils/unload-warning.d.ts.map +1 -1
  99. package/dist/js/validation/rules/required.d.ts.map +1 -1
  100. package/dist/js/validation/submit-readiness.d.ts.map +1 -1
  101. package/dist/js/validation/validator.d.ts +1 -0
  102. package/dist/js/validation/validator.d.ts.map +1 -1
  103. package/package.json +3 -3
  104. package/src/index.ts +1 -0
  105. package/src/js/core/create-formie-client.ts +20 -18
  106. package/src/js/core/dom-events.ts +30 -1
  107. package/src/js/core/page-client-event.ts +5 -7
  108. package/src/js/core/submit-result-state.ts +13 -2
  109. package/src/js/core/submit-result-ui.ts +21 -0
  110. package/src/js/core/validation-focus.ts +17 -3
  111. package/src/js/modules/captchas/factories.ts +241 -101
  112. package/src/js/modules/captchas/host.ts +16 -0
  113. package/src/js/modules/captchas/recaptcha-enterprise.ts +1 -1
  114. package/src/js/modules/captchas/recaptcha-shared.ts +23 -5
  115. package/src/js/modules/captchas/recaptcha-v3.ts +23 -14
  116. package/src/js/modules/fields/address-state.ts +6 -4
  117. package/src/js/modules/fields/combobox.ts +19 -1
  118. package/src/js/modules/fields/conditions.ts +3 -0
  119. package/src/js/modules/fields/file-upload.ts +11 -4
  120. package/src/js/modules/fields/phone-country.ts +23 -0
  121. package/src/js/modules/fields/rich-text.ts +33 -0
  122. package/src/js/modules/fields/summary.ts +63 -10
  123. package/src/js/modules/fields/text-limit.ts +11 -0
  124. package/src/js/modules/payments/factories.ts +87 -54
  125. package/src/js/modules/payments/opayo.ts +7 -0
  126. package/src/js/submit/pipeline.ts +16 -9
  127. package/src/js/utils/form-started-at.ts +19 -4
  128. package/src/js/utils/unload-warning.ts +63 -7
  129. package/src/js/validation/rules/required.ts +6 -0
  130. package/src/js/validation/submit-readiness.ts +2 -0
  131. package/src/js/validation/validator.ts +15 -4
  132. package/src/vendor.d.ts +2 -0
  133. package/dist/chunks/opayo-BwWdInEP.js +0 -188
  134. package/dist/chunks/recaptcha-shared-DTbTw-MF.js +0 -27
  135. package/dist/chunks/recaptcha-v3-CflUHeZD.js +0 -28
@@ -1,7 +1,7 @@
1
- import { t as e } from "./debug-BV0DvdHx.js";
1
+ import { t as e } from "./debug-rhzqP1j2.js";
2
2
  import { t } from "./styles-BfoIZwJp.js";
3
- import { i as n, l as r, n as i, u as a } from "./shared-OKhSay59.js";
4
- import { t as o } from "./country-from-ip-DDj_mFki.js";
3
+ import { i as n, l as r, n as i, u as a } from "./shared-CJ1LIEh3.js";
4
+ import { t as o } from "./country-from-ip-BqQ-BqLH.js";
5
5
  //#region ../../node_modules/intl-tel-input/dist/js/intlTelInput.mjs
6
6
  var s = [
7
7
  [
@@ -1339,120 +1339,115 @@ var l = new Set(c.map((e) => e.iso2)), u = (e) => l.has(e), d = c, f = {
1339
1339
  if (e === void 0) return {};
1340
1340
  if (!j(e)) return N(`The second argument must be an options object; got ${A(e)}. Using defaults.`), {};
1341
1341
  let t = {};
1342
- for (let [n, r] of Object.entries(e)) {
1343
- if (!Object.hasOwn(k, n)) {
1344
- N(`Unknown option '${n}'. Ignoring.`);
1345
- continue;
1346
- }
1347
- switch (n) {
1348
- case "allowDropdown":
1349
- case "allowNumberExtensions":
1350
- case "allowPhonewords":
1351
- case "countrySearch":
1352
- case "dropdownAlwaysOpen":
1353
- case "fixDropdownWidth":
1354
- case "formatAsYouType":
1355
- case "formatOnDisplay":
1356
- case "nationalMode":
1357
- case "showFlags":
1358
- case "separateDialCode":
1359
- case "strictMode":
1360
- case "strictRejectAnimation":
1361
- case "useFullscreenPopup":
1362
- if (typeof r != "boolean") {
1363
- P(n, "a boolean", r);
1364
- break;
1365
- }
1366
- t[n] = r;
1342
+ for (let [n, r] of Object.entries(e)) if (!Object.hasOwn(k, n)) N(`Unknown option '${n}'. Ignoring.`);
1343
+ else switch (n) {
1344
+ case "allowDropdown":
1345
+ case "allowNumberExtensions":
1346
+ case "allowPhonewords":
1347
+ case "countrySearch":
1348
+ case "dropdownAlwaysOpen":
1349
+ case "fixDropdownWidth":
1350
+ case "formatAsYouType":
1351
+ case "formatOnDisplay":
1352
+ case "nationalMode":
1353
+ case "showFlags":
1354
+ case "separateDialCode":
1355
+ case "strictMode":
1356
+ case "strictRejectAnimation":
1357
+ case "useFullscreenPopup":
1358
+ if (typeof r != "boolean") {
1359
+ P(n, "a boolean", r);
1367
1360
  break;
1368
- case "autoPlaceholder":
1369
- if (typeof r != "string" || !M.has(r)) {
1370
- P("autoPlaceholder", `one of ${Array.from(M).join(", ")}`, r);
1371
- break;
1372
- }
1373
- t[n] = r;
1361
+ }
1362
+ t[n] = r;
1363
+ break;
1364
+ case "autoPlaceholder":
1365
+ if (typeof r != "string" || !M.has(r)) {
1366
+ P("autoPlaceholder", `one of ${Array.from(M).join(", ")}`, r);
1374
1367
  break;
1375
- case "containerClass":
1376
- case "searchInputClass":
1377
- case "countryNameLocale":
1378
- if (typeof r != "string") {
1379
- P(n, "a string", r);
1380
- break;
1381
- }
1382
- t[n] = r;
1368
+ }
1369
+ t[n] = r;
1370
+ break;
1371
+ case "containerClass":
1372
+ case "searchInputClass":
1373
+ case "countryNameLocale":
1374
+ if (typeof r != "string") {
1375
+ P(n, "a string", r);
1383
1376
  break;
1384
- case "countryOrder":
1385
- if (r === null) t[n] = r;
1386
- else {
1387
- let e = F(n, r);
1388
- e !== !1 && (t[n] = e);
1389
- }
1377
+ }
1378
+ t[n] = r;
1379
+ break;
1380
+ case "countryOrder":
1381
+ if (r === null) t[n] = r;
1382
+ else {
1383
+ let e = F(n, r);
1384
+ e !== !1 && (t[n] = e);
1385
+ }
1386
+ break;
1387
+ case "customPlaceholder":
1388
+ case "geoIpLookup":
1389
+ case "hiddenInput":
1390
+ case "loadUtils":
1391
+ if (r !== null && !ne(r)) {
1392
+ P(n, "a function or null", r);
1390
1393
  break;
1391
- case "customPlaceholder":
1392
- case "geoIpLookup":
1393
- case "hiddenInput":
1394
- case "loadUtils":
1395
- if (r !== null && !ne(r)) {
1396
- P(n, "a function or null", r);
1397
- break;
1398
- }
1399
- t[n] = r;
1394
+ }
1395
+ t[n] = r;
1396
+ break;
1397
+ case "dropdownContainer":
1398
+ if (r !== null && !re(r)) {
1399
+ P("dropdownContainer", "an HTMLElement or null", r);
1400
1400
  break;
1401
- case "dropdownContainer":
1402
- if (r !== null && !re(r)) {
1403
- P("dropdownContainer", "an HTMLElement or null", r);
1404
- break;
1405
- }
1406
- t[n] = r;
1401
+ }
1402
+ t[n] = r;
1403
+ break;
1404
+ case "excludeCountries":
1405
+ case "onlyCountries":
1406
+ if (r === null) t[n] = r;
1407
+ else {
1408
+ let e = F(n, r);
1409
+ e !== !1 && (t[n] = e);
1410
+ }
1411
+ break;
1412
+ case "i18n":
1413
+ if (r && !j(r)) {
1414
+ P("i18n", "an object", r);
1407
1415
  break;
1408
- case "excludeCountries":
1409
- case "onlyCountries":
1410
- if (r === null) t[n] = r;
1411
- else {
1412
- let e = F(n, r);
1413
- e !== !1 && (t[n] = e);
1414
- }
1416
+ }
1417
+ t[n] = r;
1418
+ break;
1419
+ case "initialCountry": {
1420
+ if (typeof r != "string") {
1421
+ P("initialCountry", "a string", r);
1415
1422
  break;
1416
- case "i18n":
1417
- if (r && !j(r)) {
1418
- P("i18n", "an object", r);
1419
- break;
1420
- }
1421
- t[n] = r;
1423
+ }
1424
+ let e = r.toLowerCase();
1425
+ if (e && e !== C.AUTO && !u(e)) {
1426
+ P("initialCountry", "a valid iso2 country code or 'auto'", r);
1422
1427
  break;
1423
- case "initialCountry": {
1424
- if (typeof r != "string") {
1425
- P("initialCountry", "a string", r);
1426
- break;
1427
- }
1428
- let e = r.toLowerCase();
1429
- if (e && e !== C.AUTO && !u(e)) {
1430
- P("initialCountry", "a valid iso2 country code or 'auto'", r);
1431
- break;
1432
- }
1433
- t[n] = r;
1428
+ }
1429
+ t[n] = r;
1430
+ break;
1431
+ }
1432
+ case "placeholderNumberType":
1433
+ if (typeof r != "string" || !w.has(r)) {
1434
+ P("placeholderNumberType", `one of ${Array.from(w).join(", ")}`, r);
1434
1435
  break;
1435
1436
  }
1436
- case "placeholderNumberType":
1437
- if (typeof r != "string" || !w.has(r)) {
1438
- P("placeholderNumberType", `one of ${Array.from(w).join(", ")}`, r);
1439
- break;
1440
- }
1441
- t[n] = r;
1437
+ t[n] = r;
1438
+ break;
1439
+ case "allowedNumberTypes": if (r !== null) {
1440
+ if (!Array.isArray(r)) {
1441
+ P("allowedNumberTypes", "an array of number types or null", r);
1442
1442
  break;
1443
- case "allowedNumberTypes": if (r !== null) {
1444
- if (!Array.isArray(r)) {
1445
- P("allowedNumberTypes", "an array of number types or null", r);
1446
- break;
1447
- }
1448
- let e = !0;
1449
- for (let t of r) if (typeof t != "string" || !w.has(t)) {
1450
- P("allowedNumberTypes", `an array of valid number types (${Array.from(w).join(", ")})`, t), e = !1;
1451
- break;
1452
- }
1453
- e && (t[n] = r);
1454
- } else t[n] = null;
1455
- }
1443
+ }
1444
+ let e = !0;
1445
+ for (let t of r) if (typeof t != "string" || !w.has(t)) {
1446
+ P("allowedNumberTypes", `an array of valid number types (${Array.from(w).join(", ")})`, t), e = !1;
1447
+ break;
1448
+ }
1449
+ e && (t[n] = r);
1450
+ } else t[n] = null;
1456
1451
  }
1457
1452
  return t;
1458
1453
  }, ae = (e) => {
@@ -2122,16 +2117,12 @@ var l = new Set(c.map((e) => e.iso2)), u = (e) => l.has(e), d = c, f = {
2122
2117
  this.#g && (this.#l ? this.#g.resolve() : this.#E());
2123
2118
  }
2124
2119
  #E() {
2125
- if (J.autoCountry) {
2126
- this.#se();
2127
- return;
2128
- }
2129
- this.#e.setLoading(!0), !J.startedLoadingAutoCountry && (J.startedLoadingAutoCountry = !0, typeof this.#t.geoIpLookup == "function" && this.#t.geoIpLookup((t = "") => {
2120
+ J.autoCountry ? this.#se() : (this.#e.setLoading(!0), !J.startedLoadingAutoCountry && (J.startedLoadingAutoCountry = !0, typeof this.#t.geoIpLookup == "function" && this.#t.geoIpLookup((t = "") => {
2130
2121
  let n = t.toLowerCase();
2131
2122
  u(n) ? (J.autoCountry = n, setTimeout(() => e.forEachInstance("handleAutoCountryLoaded"))) : e.forEachInstance("handleAutoCountryFailure");
2132
2123
  }, () => {
2133
2124
  e.forEachInstance("handleAutoCountryFailure");
2134
- }));
2125
+ })));
2135
2126
  }
2136
2127
  #D() {
2137
2128
  this.#U(), this.#e.prefillSearchWithPlus();
@@ -2398,27 +2389,13 @@ var l = new Set(c.map((e) => e.iso2)), u = (e) => l.has(e), d = c, f = {
2398
2389
  this.#H(f.COUNTRY_CHANGE, e);
2399
2390
  }
2400
2391
  #se() {
2401
- if (this.#g && J.autoCountry) {
2402
- if (!this.#f) {
2403
- this.#g.resolve();
2404
- return;
2405
- }
2406
- this.#e.isLoading() ? this.setCountry(J.autoCountry) : this.#d = J.autoCountry, this.#e.setLoading(!1), this.#g.resolve();
2407
- }
2392
+ this.#g && J.autoCountry && (this.#f && (this.#e.isLoading() ? this.setCountry(J.autoCountry) : this.#d = J.autoCountry, this.#e.setLoading(!1)), this.#g.resolve());
2408
2393
  }
2409
2394
  #ce() {
2410
- if (!this.#f) {
2411
- this.#g?.reject();
2412
- return;
2413
- }
2414
- this.#C(!0), this.#e.setLoading(!1), this.#g?.reject();
2395
+ this.#f && (this.#C(!0), this.#e.setLoading(!1)), this.#g?.reject();
2415
2396
  }
2416
2397
  #le() {
2417
- if (!this.#f) {
2418
- this.#_?.resolve();
2419
- return;
2420
- }
2421
- if (!J.utils) {
2398
+ if (!this.#f || !J.utils) {
2422
2399
  this.#_?.resolve();
2423
2400
  return;
2424
2401
  }
@@ -2426,11 +2403,7 @@ var l = new Set(c.map((e) => e.iso2)), u = (e) => l.has(e), d = c, f = {
2426
2403
  e && this.#W(e), this.#l && (this.#Z(), this.#X()), this.#_?.resolve();
2427
2404
  }
2428
2405
  #ue(e) {
2429
- if (!this.#f) {
2430
- this.#_?.reject(e);
2431
- return;
2432
- }
2433
- this.#_?.reject(e);
2406
+ this.#f, this.#_?.reject(e);
2434
2407
  }
2435
2408
  destroy() {
2436
2409
  this.#f && (this.#f = !1, this.#t.allowDropdown && this.#$(!0), this.#p.abort(), this.#e.destroy(), J.instances.delete(String(this.id)));
@@ -2612,15 +2585,25 @@ function ke(e, t, n) {
2612
2585
  e && (t.value = e.toUpperCase());
2613
2586
  };
2614
2587
  e.addEventListener("countrychange", s), e.addEventListener("blur", s), s();
2615
- let c = () => {
2588
+ let c = t.value, l = !1;
2589
+ a.promise.then(() => {
2590
+ l || (c ||= a.getSelectedCountryData()?.iso2?.toUpperCase() || "");
2591
+ }, () => {});
2592
+ let u = e.form, d = (t) => {
2593
+ queueMicrotask(() => {
2594
+ !l && !t.defaultPrevented && c && (a.setCountry(c.toLowerCase()), a.setNumber(e.defaultValue), s());
2595
+ });
2596
+ };
2597
+ u?.addEventListener("reset", d);
2598
+ let f = () => {
2616
2599
  let t = e.closest(".iti")?.querySelector(".iti__selected-country");
2617
2600
  t instanceof HTMLElement && (e.disabled ? t.setAttribute("disabled", "true") : t.removeAttribute("disabled"));
2618
2601
  };
2619
- c();
2620
- let l = new MutationObserver(() => {
2621
- c();
2602
+ f();
2603
+ let p = new MutationObserver(() => {
2604
+ f();
2622
2605
  });
2623
- return l.observe(e, {
2606
+ return p.observe(e, {
2624
2607
  attributes: !0,
2625
2608
  attributeFilter: ["disabled"]
2626
2609
  }), $.log("Initialized.", {
@@ -2631,7 +2614,7 @@ function ke(e, t, n) {
2631
2614
  validator: a,
2632
2615
  validatorOptions: r
2633
2616
  }), () => {
2634
- e.removeEventListener("countrychange", s), e.removeEventListener("blur", s), l.disconnect(), a.destroy(), delete e.allowedCountries, delete e.validator, delete e.$countryInput, delete e.restrictedCountries, $.log("Destroyed.", { inputName: e.name });
2617
+ l = !0, u?.removeEventListener("reset", d), e.removeEventListener("countrychange", s), e.removeEventListener("blur", s), p.disconnect(), a.destroy(), delete e.allowedCountries, delete e.validator, delete e.$countryInput, delete e.restrictedCountries, $.log("Destroyed.", { inputName: e.name });
2635
2618
  };
2636
2619
  }
2637
2620
  var Ae = {
@@ -1,5 +1,5 @@
1
1
  import { n as e } from "./event-names-BCI2FLD8.js";
2
- import { t } from "./api-ghNr2uxX.js";
2
+ import { t } from "./api-CmuOZ0i3.js";
3
3
  import { t as n } from "./styles-BfoIZwJp.js";
4
4
  //#endregion
5
5
  //#region src/js/modules/address/place-kit.ts
@@ -7,7 +7,7 @@ n("place-kit", ["/*! @placekit/autocomplete-js v2.2.1 | © placekit.io | MIT lic
7
7
  var r = t({
8
8
  moduleId: "formie:place-kit",
9
9
  load: async () => {
10
- let e = (await import("./placekit-autocomplete.esm-CZZERYur.js")).default;
10
+ let e = (await import("./placekit-autocomplete.esm-D2A_0iVU.js")).default;
11
11
  return (t, n) => e(t, n);
12
12
  },
13
13
  mount: async ({ api: t, field: n, services: r, provider: i }) => {
@@ -887,11 +887,8 @@ function Ze(e) {
887
887
  }, i.reset = !1, i.placement = i.options.placement, i.orderedModifiers.forEach(function(e) {
888
888
  return i.modifiersData[e.name] = Object.assign({}, e.data);
889
889
  });
890
- for (var r = 0; r < i.orderedModifiers.length; r++) {
891
- if (i.reset === !0) {
892
- i.reset = !1, r = -1;
893
- continue;
894
- }
890
+ for (var r = 0; r < i.orderedModifiers.length; r++) if (i.reset === !0) i.reset = !1, r = -1;
891
+ else {
895
892
  var a = i.orderedModifiers[r], o = a.fn, l = a.options, u = l === void 0 ? {} : l, d = a.name;
896
893
  typeof o == "function" && (i = o({
897
894
  state: i,
@@ -1,5 +1,5 @@
1
- import { t as e } from "./api-BK9b340y.js";
2
- import { n as t, t as n } from "./recaptcha-shared-DTbTw-MF.js";
1
+ import { t as e } from "./api-BPtH5RBA.js";
2
+ import { n as t, t as n } from "./recaptcha-shared-CcMI-r8t.js";
3
3
  //#region src/js/modules/captchas/recaptcha-enterprise.ts
4
4
  var r = e({
5
5
  moduleId: "formie:recaptcha-enterprise",
@@ -10,11 +10,7 @@ var r = e({
10
10
  let i = e.enterprise || e;
11
11
  return new Promise((e) => {
12
12
  i.ready(() => {
13
- if (n.enterpriseType !== "checkbox") {
14
- e(n.siteKey || `recaptcha-enterprise-${n.enterpriseType || "score"}`);
15
- return;
16
- }
17
- e(i.render(t, {
13
+ n.enterpriseType === "checkbox" ? e(i.render(t, {
18
14
  sitekey: n.siteKey || "",
19
15
  theme: n.theme || "light",
20
16
  badge: n.badge || "bottomright",
@@ -29,7 +25,7 @@ var r = e({
29
25
  "error-callback": () => {
30
26
  r.tokens.clear();
31
27
  }
32
- }));
28
+ })) : e(n.siteKey || `recaptcha-enterprise-${n.enterpriseType || "score"}`);
33
29
  });
34
30
  });
35
31
  },
@@ -39,14 +35,12 @@ var r = e({
39
35
  if (a.tokens.has()) return;
40
36
  let e = a.errors.getDefaultMessage();
41
37
  a.errors.show(e, i), o.abort(e);
42
- return;
43
- }
44
- if (!a.tokens.has() && (await t(e, async () => {
38
+ } else if (!a.tokens.has() && (await t(e, async () => {
45
39
  if (r.enterpriseType === "score" || r.enterpriseType === "policy") {
46
40
  let e = await s.execute(r.siteKey || "", { action: r.action || "submit" });
47
41
  typeof e == "string" && e.trim() !== "" && a.tokens.write(e.trim());
48
42
  } else s.execute(n);
49
- }), !await a.tokens.wait(12e4))) {
43
+ }, !0), !await a.tokens.wait(12e4))) {
50
44
  let e = a.errors.getDefaultMessage();
51
45
  a.errors.show(e, i), o.abort(e);
52
46
  }
@@ -0,0 +1,33 @@
1
+ import { r as e } from "./async-2GdXNFCE.js";
2
+ import { a as t, r as n } from "./api-BPtH5RBA.js";
3
+ import { n as r } from "./scripts-DrccjrFv.js";
4
+ //#region src/js/modules/captchas/recaptcha-shared.ts
5
+ async function i(i, a = !1, o) {
6
+ let s = typeof i.language == "string" && i.language.trim() !== "" ? i.language.trim() : "en", { async: c, defer: l } = n(i.loadingMethod), u = a ? "https://www.google.com/recaptcha/enterprise.js" : "https://www.recaptcha.net/recaptcha/api.js", d = typeof o == "string" && o.trim() !== "" ? o.trim() : "explicit", f = new URL(u);
7
+ f.searchParams.set("render", d), f.searchParams.set("hl", s), d !== "explicit" && typeof i.badge == "string" && i.badge.trim() !== "" && f.searchParams.set("badge", i.badge.trim());
8
+ let p = () => {
9
+ let e = window.grecaptcha, t = a ? e?.enterprise : e;
10
+ return e && t && typeof t.ready == "function" && typeof t.execute == "function" && typeof t.render == "function" ? e : null;
11
+ };
12
+ return p() || (await r({
13
+ id: a ? "FORMIE_RECAPTCHA_ENTERPRISE_SCRIPT" : "FORMIE_RECAPTCHA_SCRIPT",
14
+ src: f.toString(),
15
+ async: c,
16
+ defer: l
17
+ }), e(p, { timeoutMs: t }));
18
+ }
19
+ function a(e, t, n = !1) {
20
+ let r = n ? e.enterprise : e;
21
+ return new Promise((e, n) => {
22
+ try {
23
+ if (!r) throw Error("The reCAPTCHA API is unavailable.");
24
+ r.ready(() => {
25
+ Promise.resolve(t()).then(e).catch(n);
26
+ });
27
+ } catch (e) {
28
+ n(e);
29
+ }
30
+ });
31
+ }
32
+ //#endregion
33
+ export { a as n, i as t };
@@ -1,5 +1,5 @@
1
- import { t as e } from "./api-BK9b340y.js";
2
- import { t } from "./recaptcha-shared-DTbTw-MF.js";
1
+ import { t as e } from "./api-BPtH5RBA.js";
2
+ import { t } from "./recaptcha-shared-CcMI-r8t.js";
3
3
  //#region src/js/modules/captchas/recaptcha-v2-checkbox.ts
4
4
  var n = e({
5
5
  moduleId: "formie:recaptcha-v2-checkbox",
@@ -1,5 +1,5 @@
1
- import { t as e } from "./api-BK9b340y.js";
2
- import { t } from "./recaptcha-shared-DTbTw-MF.js";
1
+ import { t as e } from "./api-BPtH5RBA.js";
2
+ import { t } from "./recaptcha-shared-CcMI-r8t.js";
3
3
  //#region src/js/modules/captchas/recaptcha-v2-invisible.ts
4
4
  async function n(e, t, n = 1e3) {
5
5
  let r = Date.now() + n;
@@ -0,0 +1,38 @@
1
+ import { t as e } from "./api-BPtH5RBA.js";
2
+ import { n as t, t as n } from "./recaptcha-shared-CcMI-r8t.js";
3
+ //#region src/js/modules/captchas/recaptcha-v3.ts
4
+ var r = e({
5
+ moduleId: "formie:recaptcha-v3",
6
+ defaultPlaceholderSelector: "[data-recaptcha-placeholder]",
7
+ defaultTokenFieldNames: ["g-recaptcha-response"],
8
+ load: ({ options: e }) => n(e.provider),
9
+ mount: ({ api: e, container: n, provider: r, services: i }) => new Promise((a, o) => {
10
+ t(e, async () => {
11
+ a(e.render(n, {
12
+ sitekey: r.siteKey || "",
13
+ size: "invisible",
14
+ badge: r.badge || "bottomright",
15
+ theme: r.theme || "light",
16
+ "expired-callback": () => i.tokens.clear(),
17
+ "error-callback": () => i.tokens.clear()
18
+ }));
19
+ }).catch(o);
20
+ }),
21
+ challenge: async ({ api: e, widget: n, provider: r, placeholder: i, services: a, stageCtx: o }) => {
22
+ if (!a.tokens.has() && (await t(e, async () => {
23
+ let t = await e.execute(n, { action: r.action || "submit" });
24
+ typeof t == "string" && t.trim() !== "" && a.tokens.write(t.trim());
25
+ }), !await a.tokens.wait(12e4))) {
26
+ let e = a.errors.getDefaultMessage();
27
+ a.errors.show(e, i), o.abort(e);
28
+ }
29
+ },
30
+ reset: ({ api: e, widget: t, services: n }) => {
31
+ e.reset(t), n.tokens.clear();
32
+ },
33
+ unmount: ({ api: e, widget: t, services: n }) => {
34
+ e.reset(t), n.tokens.clear();
35
+ }
36
+ });
37
+ //#endregion
38
+ export { r as recaptchaV3Module };
@@ -1,7 +1,7 @@
1
- import { t as e } from "./debug-BV0DvdHx.js";
1
+ import { t as e } from "./debug-rhzqP1j2.js";
2
2
  import { n as t } from "./async-2GdXNFCE.js";
3
3
  import { t as n } from "./styles-BfoIZwJp.js";
4
- import { n as r, o as i, s as a } from "./shared-OKhSay59.js";
4
+ import { n as r, o as i, s as a } from "./shared-CJ1LIEh3.js";
5
5
  //#region src/css/theme/fields/_repeater.css?inline
6
6
  var o = "@layer formie-theme{.formie-repeater-container{gap:var(--formie-space-4);display:grid}.formie-repeater-item-wrapper{gap:var(--formie-space-4);padding:var(--formie-space-4);border:var(--formie-border-width) solid var(--formie-color-border-control);border-radius:var(--formie-radius-md);transition:border-color .15s,box-shadow .15s,background-color .15s;display:grid;position:relative}.formie-repeater-item-wrapper:focus-within{border-color:var(--formie-focus-ring-border-color);box-shadow:var(--formie-shadow-focus)}.formie-field-has-error .formie-repeater-item-wrapper{border-color:var(--formie-color-danger)}.formie-field-has-error .formie-repeater-item-wrapper:focus-within{box-shadow:var(--formie-shadow-danger-focus)}.formie-repeater-item-wrapper>.formie-repeater-remove-button{top:var(--formie-repeater-remove-button-top);right:var(--formie-repeater-remove-button-right);transform:var(--formie-repeater-remove-button-transform);font-size:0;line-height:0;position:absolute}.formie-button.formie-repeater-add-button{width:auto;max-width:100%;padding-left:var(--formie-repeater-add-button-padding-left);justify-content:center;justify-self:start;align-items:center;display:inline-flex;position:relative}.formie-button.formie-repeater-add-button:before{content:\"\";width:var(--formie-repeater-add-button-width);height:var(--formie-repeater-add-button-height);left:var(--formie-repeater-add-button-left);-webkit-mask-image:var(--formie-repeater-add-button-icon-mask);-webkit-mask-image:var(--formie-repeater-add-button-icon-mask);mask-image:var(--formie-repeater-add-button-icon-mask);background-color:currentColor;display:block;position:absolute;top:50%;transform:translateY(-50%);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}}", s = "[data-formie-repeater-field-layout]", c = "[data-formie-repeater-container]", l = "[data-formie-repeater-item]", u = "[data-formie-repeater-add]", d = "[data-formie-repeater-remove]", f = "data-formie-template-id", p = "repeater", m = e("fields", "repeater");
7
7
  n(p, [o]);
@@ -22,11 +22,7 @@ function v(e) {
22
22
  function y(e, t) {
23
23
  if (!e) return;
24
24
  let n = parseInt(e.getAttribute("data-formie-max-rows") || "", 10);
25
- if (n > 0 && t >= n) {
26
- e.disabled = !0;
27
- return;
28
- }
29
- e.disabled = !1;
25
+ e.disabled = n > 0 && t >= n;
30
26
  }
31
27
  function b(e, n) {
32
28
  let i = e.matches(c) ? e : e.querySelector(c), o = e.querySelector(u);
@@ -1,12 +1,12 @@
1
- import { t as e } from "./rolldown-runtime-DtPi1Y-2.js";
1
+ import { t as e } from "./rolldown-runtime-VHNaYcLd.js";
2
2
  import { t } from "./styles-BfoIZwJp.js";
3
- import { i as n, n as r } from "./shared-OKhSay59.js";
3
+ import { i as n, n as r } from "./shared-CJ1LIEh3.js";
4
4
  //#endregion
5
5
  //#region ../../node_modules/pell/dist/pell.min.css?inline
6
- var i = (/* @__PURE__ */ e(((e, t) => {
6
+ var i = (/* @__PURE__ */ e(((e, t, n) => {
7
7
  (function(n, r) {
8
8
  typeof e == "object" && t !== void 0 ? r(e) : typeof define == "function" && define.amd ? define(["exports"], r) : r(n.pell = {});
9
- })(e, function(e) {
9
+ })(n, function(e) {
10
10
  var t = Object.assign || function(e) {
11
11
  for (var t = 1; t < arguments.length; t++) {
12
12
  var n = arguments[t];
@@ -290,9 +290,7 @@ function M() {
290
290
  if (e) {
291
291
  let t = e.split("\n").join("<br>");
292
292
  (0, i.exec)("formatBlock", "<p>"), document.execCommand("insertHTML", !1, t);
293
- return;
294
- }
295
- (0, i.exec)("formatBlock", "<p>");
293
+ } else (0, i.exec)("formatBlock", "<p>");
296
294
  }
297
295
  }
298
296
  ];
@@ -325,14 +323,38 @@ function P(e, t, n) {
325
323
  options: a
326
324
  });
327
325
  let o = (0, i.init)(a);
328
- t.richText = o, o.content.innerHTML = t.value || "";
329
- let s = t.form, c = (e) => {
326
+ t.richText = o, o.content.innerHTML = t.value || "", o.content.setAttribute("role", "textbox"), o.content.setAttribute("aria-multiline", "true");
327
+ let s = Array.from(t.labels || []), c = [
328
+ "aria-label",
329
+ "aria-labelledby",
330
+ "aria-invalid",
331
+ "aria-describedby",
332
+ "aria-errormessage"
333
+ ], l = () => {
334
+ c.forEach((e) => {
335
+ let n = t.getAttribute(e);
336
+ n === null ? o.content.removeAttribute(e) : o.content.setAttribute(e, n);
337
+ }), !t.hasAttribute("aria-label") && !t.hasAttribute("aria-labelledby") && s.length && o.content.setAttribute("aria-label", s.map((e) => e.textContent?.trim() || "").join(" ")), o.content.setAttribute("aria-required", t.getAttribute("aria-required") || String(t.required));
338
+ };
339
+ l();
340
+ let u = new MutationObserver(l);
341
+ u.observe(t, {
342
+ attributes: !0,
343
+ attributeFilter: [
344
+ ...c,
345
+ "aria-required",
346
+ "required"
347
+ ]
348
+ });
349
+ let d = () => o.content.focus();
350
+ s.forEach((e) => e.addEventListener("click", d));
351
+ let f = t.form, p = (e) => {
330
352
  queueMicrotask(() => {
331
353
  e.defaultPrevented || (o.content.innerHTML = t.value || "");
332
354
  });
333
355
  };
334
- return s?.addEventListener("reset", c), t.placeholder && o.content.setAttribute("data-placeholder", t.placeholder), r(t, k, "after-init", { richText: o }), () => {
335
- s?.removeEventListener("reset", c), e.innerHTML = "", delete t.richText;
356
+ return f?.addEventListener("reset", p), t.placeholder && o.content.setAttribute("data-placeholder", t.placeholder), r(t, k, "after-init", { richText: o }), () => {
357
+ u.disconnect(), s.forEach((e) => e.removeEventListener("click", d)), f?.removeEventListener("reset", p), e.innerHTML = "", delete t.richText;
336
358
  };
337
359
  }
338
360
  var F = {
@@ -1,5 +1,5 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, i, o, s) => {
3
3
  if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
4
  get: ((e) => i[e]).bind(null, d),
5
5
  enumerable: !(s = n(i, d)) || s.enumerable
@@ -77,11 +77,7 @@ var s = class {
77
77
  return;
78
78
  }
79
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);
80
+ n ? n.send(e) : console.error(`[bus] Unexpected message to unknown target ${e.to_id}`, e);
85
81
  }
86
82
  onReceive(e) {
87
83
  if (!o(e.origin, this.origins)) return;
@@ -175,11 +171,7 @@ function b(e) {
175
171
  continue;
176
172
  }
177
173
  let e = t.parentNode;
178
- if (e && e.host) {
179
- t = e.host;
180
- continue;
181
- }
182
- t = null;
174
+ t = e && e.host ? e.host : null;
183
175
  }
184
176
  return null;
185
177
  }
@@ -1211,11 +1203,7 @@ var Pe = "/api/v2/captcha/agent", Fe = "/api/v2/captcha/widget", X = "FrcFrameId
1211
1203
  }
1212
1204
  handleStoreMessage(e) {
1213
1205
  let t = e.from_id, n = this.agentState.get(t);
1214
- if (!n) {
1215
- console.error(`Store not found ${t}`);
1216
- return;
1217
- }
1218
- e.type === "root_store_get" ? this.bus.send({
1206
+ n ? e.type === "root_store_get" ? this.bus.send({
1219
1207
  type: "root_store_get_reply",
1220
1208
  from_id: "",
1221
1209
  to_id: t,
@@ -1230,7 +1218,7 @@ var Pe = "/api/v2/captcha/agent", Fe = "/api/v2/captcha/widget", X = "FrcFrameId
1230
1218
  _frc: 1,
1231
1219
  rid: e.rid,
1232
1220
  sa: !0
1233
- }));
1221
+ })) : console.error(`Store not found ${t}`);
1234
1222
  }
1235
1223
  ensureAgentIFrame(e) {
1236
1224
  let t = 1, n = e[Y(t, e)], r = n + Pe, i = Z, a = this.agents.get(n);