@verbb/formie-browser 1.0.14 → 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 (156) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/chunks/{address-country-Dn71jroa.js → address-country-DLJF-OkC.js} +5 -9
  3. package/dist/chunks/{address-finder-O49uDRoR.js → address-finder-QK1m1eyv.js} +2 -2
  4. package/dist/chunks/{address-state-ByYatUur.js → address-state-CHKit8AW.js} +113 -112
  5. package/dist/chunks/{api-DYYsVIub.js → api-BPtH5RBA.js} +162 -130
  6. package/dist/chunks/{api-D6kJ7kXZ.js → api-BR2Gqy37.js} +313 -303
  7. package/dist/chunks/{api-ghNr2uxX.js → api-CmuOZ0i3.js} +1 -1
  8. package/dist/chunks/{async-nPFRNQ06.js → async-2GdXNFCE.js} +18 -1
  9. package/dist/chunks/{bpoint-D0RKFM4F.js → bpoint-GvYfyPjD.js} +1 -1
  10. package/dist/chunks/{calculations-YEoVCG2q.js → calculations-DeEmdUDq.js} +5 -7
  11. package/dist/chunks/{captcha-eu-DERJbXnH.js → captcha-eu-eU_M6snp.js} +2 -2
  12. package/dist/chunks/{checkbox-radio-gsm8QPJg.js → checkbox-radio-CSXo6svm.js} +4 -12
  13. package/dist/chunks/{combobox-CWNdx4Fk.js → combobox-CJh2DoSO.js} +323 -363
  14. package/dist/chunks/{conditions-DqNHLTbN.js → conditions-Dz3068K0.js} +140 -153
  15. package/dist/chunks/{country-from-ip-DDj_mFki.js → country-from-ip-BqQ-BqLH.js} +1 -1
  16. package/dist/chunks/{custom-google-maps-C4l2S3GO.js → custom-google-maps-rNm5VFbb.js} +2 -6
  17. package/dist/chunks/{custom-link-CLazgKYH.js → custom-link-CLqFCssQ.js} +1 -1
  18. package/dist/chunks/{custom-maps-DqcAlD0v.js → custom-maps-DgjYQDLj.js} +4 -8
  19. package/dist/chunks/{date-picker-RUnevF7l.js → date-picker-BVJxJVYT.js} +42 -58
  20. package/dist/chunks/{debug-BV0DvdHx.js → debug-rhzqP1j2.js} +2 -14
  21. package/dist/chunks/{dist-ZLeW0zZ3.js → dist-CJReDlDK.js} +13 -8
  22. package/dist/chunks/{eway-or6dtjoT.js → eway-BZuTBAUW.js} +3 -3
  23. package/dist/chunks/{field-references.resolver-Ca8MguFv.js → field-references.resolver-uSHf5-NP.js} +1 -1
  24. package/dist/chunks/{file-upload-Bm-TXyNB.js → file-upload-vEUr_EuP.js} +131 -113
  25. package/dist/chunks/{friendly-captcha-v1-GFqCt1Mh.js → friendly-captcha-v1-C_cF1WD2.js} +2 -2
  26. package/dist/chunks/{friendly-captcha-v2-WoW246JG.js → friendly-captcha-v2-BenESH-n.js} +2 -2
  27. package/dist/chunks/{friendly-challenge-DPG9MJb1.js → friendly-challenge-BgPBEMXx.js} +21 -35
  28. package/dist/chunks/{go-cardless-DzJ-0FKg.js → go-cardless-DWZeB0Bq.js} +2 -6
  29. package/dist/chunks/{google-address-C1P1nTDM.js → google-address-DQR6rsbh.js} +15 -10
  30. package/dist/chunks/{hcaptcha-D0T8aIHz.js → hcaptcha-COilLmRT.js} +2 -2
  31. package/dist/chunks/{hidden-BZhXnNPe.js → hidden-Bc2TpcgF.js} +1 -1
  32. package/dist/chunks/{http-C2QdHuWO.js → http-Dj_skqaa.js} +1 -1
  33. package/dist/chunks/{leaflet-src-DE6rv6M-.js → leaflet-src-Cg-LUOD8.js} +74 -122
  34. package/dist/chunks/{loqate-DD1S7PY9.js → loqate-ZZClcacr.js} +2 -2
  35. package/dist/chunks/{mollie-DG8Ju83x.js → mollie-8OMXIYa8.js} +2 -6
  36. package/dist/chunks/{moneris-C8m3Fvqu.js → moneris-qYHJ9EFy.js} +1 -1
  37. package/dist/chunks/opayo-DlWPEnla.js +159 -0
  38. package/dist/chunks/{paddle-BIYR9Um3.js → paddle-CArfWih0.js} +2 -2
  39. package/dist/chunks/{password-validation-C8_uO_c_.js → password-validation-HGOU9kf3.js} +2 -2
  40. package/dist/chunks/{paypal-B_yxIo2d.js → paypal-BcaMCMGY.js} +2 -2
  41. package/dist/chunks/{payway-CeOzS0sL.js → payway-vxC7_bfR.js} +4 -12
  42. package/dist/chunks/{phone-country-bAqje17P.js → phone-country-Bx9EG50h.js} +124 -141
  43. package/dist/chunks/{place-kit-BE5gi3vo.js → place-kit-BKk8xDXf.js} +10 -10
  44. package/dist/chunks/{placekit-autocomplete.esm-CZZERYur.js → placekit-autocomplete.esm-D2A_0iVU.js} +2 -5
  45. package/dist/chunks/{recaptcha-enterprise-CruXddZq.js → recaptcha-enterprise-Cx6HUpMa.js} +6 -12
  46. package/dist/chunks/recaptcha-shared-CcMI-r8t.js +33 -0
  47. package/dist/chunks/{recaptcha-v2-checkbox-CCnJYCnG.js → recaptcha-v2-checkbox-DQ9BJzcv.js} +2 -2
  48. package/dist/chunks/{recaptcha-v2-invisible-BuVqRRYn.js → recaptcha-v2-invisible-BP0T8Pan.js} +2 -2
  49. package/dist/chunks/recaptcha-v3-DKMGQ27K.js +38 -0
  50. package/dist/chunks/{repeater-DwE27jI1.js → repeater-BR0RUvTs.js} +50 -40
  51. package/dist/chunks/{rich-text-uV4o_pGk.js → rich-text-H2A6cm1t.js} +33 -11
  52. package/dist/chunks/{rolldown-runtime-DtPi1Y-2.js → rolldown-runtime-VHNaYcLd.js} +1 -1
  53. package/dist/chunks/{scripts-CbQ7agX3.js → scripts-DrccjrFv.js} +1 -1
  54. package/dist/chunks/{sdk-lkwSvlpM.js → sdk-_cmrRYgp.js} +4 -16
  55. package/dist/chunks/{shared-OKhSay59.js → shared-CJ1LIEh3.js} +1 -3
  56. package/dist/chunks/{signature-7cldFbqj.js → signature-CfKA_poI.js} +9 -41
  57. package/dist/chunks/skip-CEW89ExY.js +7 -0
  58. package/dist/chunks/{snaptcha-C04kNGYQ.js → snaptcha-P3EoSQud.js} +1 -1
  59. package/dist/chunks/{square-DEzxv9D9.js → square-Dyz0p_GU.js} +2 -2
  60. package/dist/chunks/{stripe-CVPQGDz3.js → stripe-Bfd_jp_k.js} +4 -7
  61. package/dist/chunks/{summary-BF_8mrXI.js → summary-B3CAebLV.js} +45 -37
  62. package/dist/chunks/{survey-likert-fk1hUPff.js → survey-likert-CEtUceag.js} +1 -1
  63. package/dist/chunks/{survey-rank-BsLGl2LX.js → survey-rank-Dtt97y6s.js} +3 -7
  64. package/dist/chunks/{survey-rating-DVS6e6fM.js → survey-rating-mlDMI0uq.js} +9 -23
  65. package/dist/chunks/{table-DnIBdeKF.js → table-0k6Md0IO.js} +2 -2
  66. package/dist/chunks/{text-limit-LGMPhFuC.js → text-limit-CTVML6s7.js} +10 -10
  67. package/dist/chunks/{turnstile-n9DNyPxi.js → turnstile-Sp4ubowK.js} +2 -2
  68. package/dist/chunks/{upload-manager-BbiUosZq.js → upload-manager-Ccg3d_4I.js} +258 -260
  69. package/dist/index.d.ts +1 -0
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +743 -734
  72. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  73. package/dist/js/core/dom-events.d.ts +5 -0
  74. package/dist/js/core/dom-events.d.ts.map +1 -1
  75. package/dist/js/core/page-client-event.d.ts.map +1 -1
  76. package/dist/js/core/submit-result-state.d.ts.map +1 -1
  77. package/dist/js/core/submit-result-ui.d.ts +3 -1
  78. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  79. package/dist/js/core/validation-focus.d.ts.map +1 -1
  80. package/dist/js/modules/address/google-address.d.ts +10 -0
  81. package/dist/js/modules/address/google-address.d.ts.map +1 -1
  82. package/dist/js/modules/address/place-kit.d.ts.map +1 -1
  83. package/dist/js/modules/captchas/factories.d.ts.map +1 -1
  84. package/dist/js/modules/captchas/host.d.ts +4 -1
  85. package/dist/js/modules/captchas/host.d.ts.map +1 -1
  86. package/dist/js/modules/captchas/recaptcha-shared.d.ts +1 -1
  87. package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -1
  88. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
  89. package/dist/js/modules/fields/address-state.d.ts.map +1 -1
  90. package/dist/js/modules/fields/combobox.d.ts +2 -0
  91. package/dist/js/modules/fields/combobox.d.ts.map +1 -1
  92. package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
  93. package/dist/js/modules/fields/conditions.d.ts.map +1 -1
  94. package/dist/js/modules/fields/date-picker.d.ts.map +1 -1
  95. package/dist/js/modules/fields/file-upload.d.ts.map +1 -1
  96. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  97. package/dist/js/modules/fields/repeater.d.ts.map +1 -1
  98. package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
  99. package/dist/js/modules/fields/summary.d.ts.map +1 -1
  100. package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
  101. package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
  102. package/dist/js/modules/payments/factories.d.ts.map +1 -1
  103. package/dist/js/modules/payments/opayo.d.ts.map +1 -1
  104. package/dist/js/submit/pipeline.d.ts +2 -0
  105. package/dist/js/submit/pipeline.d.ts.map +1 -1
  106. package/dist/js/utils/async.d.ts +1 -0
  107. package/dist/js/utils/async.d.ts.map +1 -1
  108. package/dist/js/utils/form-started-at.d.ts +1 -0
  109. package/dist/js/utils/form-started-at.d.ts.map +1 -1
  110. package/dist/js/utils/unload-warning.d.ts +4 -0
  111. package/dist/js/utils/unload-warning.d.ts.map +1 -1
  112. package/dist/js/validation/rules/required.d.ts.map +1 -1
  113. package/dist/js/validation/submit-readiness.d.ts.map +1 -1
  114. package/dist/js/validation/validator.d.ts +1 -0
  115. package/dist/js/validation/validator.d.ts.map +1 -1
  116. package/package.json +3 -3
  117. package/src/index.ts +1 -0
  118. package/src/js/core/create-formie-client.ts +37 -28
  119. package/src/js/core/dom-events.ts +30 -1
  120. package/src/js/core/page-client-event.ts +5 -7
  121. package/src/js/core/submit-result-state.ts +30 -2
  122. package/src/js/core/submit-result-ui.ts +25 -3
  123. package/src/js/core/validation-focus.ts +17 -3
  124. package/src/js/modules/address/google-address.ts +95 -37
  125. package/src/js/modules/address/place-kit.ts +13 -7
  126. package/src/js/modules/captchas/factories.ts +241 -101
  127. package/src/js/modules/captchas/host.ts +16 -0
  128. package/src/js/modules/captchas/recaptcha-enterprise.ts +1 -1
  129. package/src/js/modules/captchas/recaptcha-shared.ts +23 -5
  130. package/src/js/modules/captchas/recaptcha-v3.ts +23 -14
  131. package/src/js/modules/fields/address-country.ts +5 -5
  132. package/src/js/modules/fields/address-state.ts +80 -27
  133. package/src/js/modules/fields/combobox.ts +22 -1
  134. package/src/js/modules/fields/conditions/effects.ts +4 -5
  135. package/src/js/modules/fields/conditions.ts +9 -0
  136. package/src/js/modules/fields/date-picker.ts +6 -3
  137. package/src/js/modules/fields/file-upload.ts +55 -18
  138. package/src/js/modules/fields/phone-country.ts +25 -2
  139. package/src/js/modules/fields/repeater.ts +55 -4
  140. package/src/js/modules/fields/rich-text.ts +33 -0
  141. package/src/js/modules/fields/summary.ts +63 -10
  142. package/src/js/modules/fields/text-limit.ts +11 -0
  143. package/src/js/modules/fields/upload-manager.ts +54 -18
  144. package/src/js/modules/payments/factories.ts +87 -54
  145. package/src/js/modules/payments/opayo.ts +7 -0
  146. package/src/js/submit/pipeline.ts +16 -9
  147. package/src/js/utils/async.ts +34 -0
  148. package/src/js/utils/form-started-at.ts +19 -4
  149. package/src/js/utils/unload-warning.ts +63 -7
  150. package/src/js/validation/rules/required.ts +18 -0
  151. package/src/js/validation/submit-readiness.ts +2 -0
  152. package/src/js/validation/validator.ts +29 -6
  153. package/src/vendor.d.ts +2 -0
  154. package/dist/chunks/opayo-B3EvrVxw.js +0 -188
  155. package/dist/chunks/recaptcha-shared-AQRMDMme.js +0 -27
  156. package/dist/chunks/recaptcha-v3-CloqhO2A.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)));
@@ -2592,7 +2565,7 @@ function Oe(e, t) {
2592
2565
  formatOnDisplay: !1,
2593
2566
  formatAsYouType: !1,
2594
2567
  loadUtils: () => import("./utils-DpUBPadZ.js")
2595
- }, r = (e.countryAllowed || []).map((e) => e.toLowerCase()).filter(Boolean);
2568
+ }, r = (e.allowedCountryCodes || []).map((e) => e.toLowerCase()).filter(Boolean);
2596
2569
  if (r.length && (n.onlyCountries = r, n.initialCountry = r[0], r.length === 1 && (n.allowDropdown = !1, n.separateDialCode = !1, n.nationalMode = !0)), e.countryDefaultValue ? n.initialCountry = e.countryDefaultValue.toLowerCase() : e.countryPreselectFromIp && (n.initialCountry = "auto", n.geoIpLookup = o(e.countryFromIpAction, t)), Array.isArray(n.onlyCountries) && typeof n.initialCountry == "string") {
2597
2570
  let e = n.initialCountry.toLowerCase();
2598
2571
  n.onlyCountries.includes(e) || n.onlyCountries.push(e);
@@ -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 }) => {
@@ -26,13 +26,6 @@ var r = t({
26
26
  }));
27
27
  let s = t(i.apiKey, o);
28
28
  return s.on("pick", (t, i) => {
29
- n.dispatchEvent(new CustomEvent(e("place-kit", "populate"), {
30
- bubbles: !0,
31
- detail: {
32
- addressProvider: "place-kit",
33
- addressComponents: i
34
- }
35
- }));
36
29
  let a = "";
37
30
  i.street && (a = [
38
31
  i.street.number ?? "",
@@ -40,7 +33,14 @@ var r = t({
40
33
  i.street.suffix ?? ""
41
34
  ].filter(Boolean).join(" "));
42
35
  let o = Array.isArray(i.zipcode) ? i.zipcode[0] : i.zipcode, s = i.countrycode ? i.countrycode.toUpperCase() : i.country || "";
43
- r.input.setValue("address1", a), r.input.setValue("city", i.city || ""), r.input.setValue("state", i.administrative || ""), r.input.setValue("zip", typeof o == "string" ? o : ""), r.input.setValue("country", s || i.country || "");
36
+ r.input.setValue("address1", a), r.input.setValue("city", i.city || ""), r.input.setValue("state", i.administrative || ""), r.input.setValue("zip", typeof o == "string" ? o : ""), r.input.setValue("country", s || i.country || ""), n.dispatchEvent(new CustomEvent(e("place-kit", "populate"), {
37
+ bubbles: !0,
38
+ detail: {
39
+ addressProvider: "place-kit",
40
+ addressComponents: i,
41
+ state: i.administrative || ""
42
+ }
43
+ }));
44
44
  }), s;
45
45
  }
46
46
  });
@@ -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-DYYsVIub.js";
2
- import { n as t, t as n } from "./recaptcha-shared-AQRMDMme.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-DYYsVIub.js";
2
- import { t } from "./recaptcha-shared-AQRMDMme.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-DYYsVIub.js";
2
- import { t } from "./recaptcha-shared-AQRMDMme.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 };