@verbb/formie-browser 1.0.12 → 1.0.14

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 (383) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/chunks/{address-country-Rx6GQTND.js → address-country-Dn71jroa.js} +10 -4
  3. package/dist/chunks/{address-finder-k7_BXaRe.js → address-finder-O49uDRoR.js} +2 -2
  4. package/dist/chunks/{address-state-BwE01m2_.js → address-state-ByYatUur.js} +154 -143
  5. package/dist/chunks/{api-DqpfkZWL.js → api-D6kJ7kXZ.js} +183 -179
  6. package/dist/chunks/{api-BUb6P-xu.js → api-DYYsVIub.js} +77 -47
  7. package/dist/chunks/{api-sPqGbOww.js → api-ghNr2uxX.js} +15 -9
  8. package/dist/chunks/{bpoint-Dlq34XH1.js → bpoint-D0RKFM4F.js} +3 -3
  9. package/dist/chunks/calculations-YEoVCG2q.js +310 -0
  10. package/dist/chunks/{captcha-eu-CGm8Lbrj.js → captcha-eu-DERJbXnH.js} +5 -4
  11. package/dist/chunks/{checkbox-radio-BY2aTCOG.js → checkbox-radio-gsm8QPJg.js} +74 -75
  12. package/dist/chunks/{combobox-C0EuExSI.js → combobox-CWNdx4Fk.js} +290 -279
  13. package/dist/chunks/conditions-DqNHLTbN.js +464 -0
  14. package/dist/chunks/country-from-ip-DDj_mFki.js +29 -0
  15. package/dist/chunks/csrf-DxHg_ZYt.js +61 -0
  16. package/dist/chunks/{custom-google-maps-BsaSirEZ.js → custom-google-maps-C4l2S3GO.js} +9 -3
  17. package/dist/chunks/{custom-link-CJ1-FjEM.js → custom-link-CLazgKYH.js} +8 -2
  18. package/dist/chunks/{custom-maps-DYW_pBid.js → custom-maps-DqcAlD0v.js} +10 -4
  19. package/dist/chunks/{date-picker-5CA_-zGb.js → date-picker-RUnevF7l.js} +456 -430
  20. package/dist/chunks/{dist-BdUy8m_p.js → dist-ZLeW0zZ3.js} +1280 -452
  21. package/dist/chunks/{eway-D9_m8ooj.js → eway-or6dtjoT.js} +3 -3
  22. package/dist/chunks/field-references.resolver-Ca8MguFv.js +104 -0
  23. package/dist/chunks/{file-upload-rqfZNqlH.js → file-upload-Bm-TXyNB.js} +104 -96
  24. package/dist/chunks/friendly-captcha-v1-GFqCt1Mh.js +34 -0
  25. package/dist/chunks/{friendly-captcha-v2-CLSAbkqx.js → friendly-captcha-v2-WoW246JG.js} +6 -5
  26. package/dist/chunks/{friendly-challenge-8uPatWqk.js → friendly-challenge-DPG9MJb1.js} +111 -102
  27. package/dist/chunks/{go-cardless-DAT3ZaQf.js → go-cardless-DzJ-0FKg.js} +2 -2
  28. package/dist/chunks/google-address-C1P1nTDM.js +163 -0
  29. package/dist/chunks/{hcaptcha-CGLAmgjO.js → hcaptcha-D0T8aIHz.js} +3 -3
  30. package/dist/chunks/{hidden-D7_Ch-QN.js → hidden-BZhXnNPe.js} +8 -2
  31. package/dist/chunks/http-C2QdHuWO.js +27 -0
  32. package/dist/chunks/{leaflet-src-j-lHNmhR.js → leaflet-src-DE6rv6M-.js} +42 -46
  33. package/dist/chunks/{loqate-CJPzBmSm.js → loqate-DD1S7PY9.js} +2 -2
  34. package/dist/chunks/{mollie-Bibhl67p.js → mollie-DG8Ju83x.js} +2 -2
  35. package/dist/chunks/{moneris-H2wSqk9h.js → moneris-C8m3Fvqu.js} +3 -3
  36. package/dist/chunks/opayo-B3EvrVxw.js +188 -0
  37. package/dist/chunks/{paddle-DkvIxQdG.js → paddle-BIYR9Um3.js} +3 -3
  38. package/dist/chunks/{password-validation-T0vDQPCr.js → password-validation-C8_uO_c_.js} +18 -12
  39. package/dist/chunks/{paypal-CQpAF7Ua.js → paypal-B_yxIo2d.js} +7 -5
  40. package/dist/chunks/{payway-CwDkC7YZ.js → payway-CeOzS0sL.js} +3 -3
  41. package/dist/chunks/{phone-country-D3ayr60L.js → phone-country-bAqje17P.js} +80 -63
  42. package/dist/chunks/{place-kit-BGHklIZ-.js → place-kit-BE5gi3vo.js} +3 -3
  43. package/dist/chunks/{placekit-autocomplete.esm-DWVabQlq.js → placekit-autocomplete.esm-CZZERYur.js} +11 -15
  44. package/dist/chunks/{recaptcha-enterprise-XPId5-bS.js → recaptcha-enterprise-CruXddZq.js} +4 -4
  45. package/dist/chunks/{recaptcha-shared-CLYJvojk.js → recaptcha-shared-AQRMDMme.js} +1 -1
  46. package/dist/chunks/{recaptcha-v2-checkbox-Cy-0PEPc.js → recaptcha-v2-checkbox-CCnJYCnG.js} +4 -4
  47. package/dist/chunks/{recaptcha-v2-invisible-BwRH540O.js → recaptcha-v2-invisible-BuVqRRYn.js} +4 -4
  48. package/dist/chunks/{recaptcha-v3-No4Ykrhk.js → recaptcha-v3-CloqhO2A.js} +4 -4
  49. package/dist/chunks/{repeater-BVnPUqTj.js → repeater-DwE27jI1.js} +25 -19
  50. package/dist/chunks/request-profile-DhwkeCpS.js +10 -0
  51. package/dist/chunks/rich-text-uV4o_pGk.js +361 -0
  52. package/dist/chunks/{chunk-3b4jIN3o.js → rolldown-runtime-DtPi1Y-2.js} +2 -2
  53. package/dist/chunks/{sdk-BhHAYgga.js → sdk-lkwSvlpM.js} +282 -234
  54. package/dist/chunks/{shared-Bx9s0i0P.js → shared-OKhSay59.js} +27 -21
  55. package/dist/chunks/{signature-xz4QO7CR.js → signature-7cldFbqj.js} +160 -112
  56. package/dist/chunks/{snaptcha-DKx98oon.js → snaptcha-C04kNGYQ.js} +2 -2
  57. package/dist/chunks/{square-DwdcOI1G.js → square-DEzxv9D9.js} +8 -6
  58. package/dist/chunks/{stripe-DaoG2FT1.js → stripe-CVPQGDz3.js} +10 -11
  59. package/dist/chunks/{summary-Dks0gXS3.js → summary-BF_8mrXI.js} +47 -45
  60. package/dist/chunks/{survey-likert-DkE6bR7B.js → survey-likert-fk1hUPff.js} +7 -1
  61. package/dist/chunks/{survey-rank-DN6x4IZM.js → survey-rank-BsLGl2LX.js} +37 -25
  62. package/dist/chunks/{survey-rating-BnsNL9U5.js → survey-rating-DVS6e6fM.js} +17 -5
  63. package/dist/chunks/{table-CAjCJHrL.js → table-DnIBdeKF.js} +21 -15
  64. package/dist/chunks/{text-limit-Bn18WrPU.js → text-limit-LGMPhFuC.js} +40 -34
  65. package/dist/chunks/{theme-classes-Tv7q7ToE.js → theme-classes-DAQuEqdP.js} +1 -1
  66. package/dist/chunks/{turnstile-DJakPzQD.js → turnstile-n9DNyPxi.js} +3 -3
  67. package/dist/chunks/{upload-manager-W-QDgxKD.js → upload-manager-BbiUosZq.js} +410 -350
  68. package/dist/chunks/{utils-Vqp8i_RM.js → utils-DpUBPadZ.js} +20 -14
  69. package/dist/css/formie-base.css +104 -1
  70. package/dist/css/theme/_messages.css +2 -0
  71. package/dist/css/theme/_tokens.css +31 -25
  72. package/dist/css/theme/fields/_signature.css +2 -1
  73. package/dist/css/theme/forms/_form.css +5 -1
  74. package/dist/index.d.ts +5 -4
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +1778 -1425
  77. package/dist/js/contracts/client.d.ts +5 -3
  78. package/dist/js/contracts/client.d.ts.map +1 -1
  79. package/dist/js/contracts/common.d.ts +2 -2
  80. package/dist/js/contracts/common.d.ts.map +1 -1
  81. package/dist/js/contracts/modules.d.ts +37 -12
  82. package/dist/js/contracts/modules.d.ts.map +1 -1
  83. package/dist/js/contracts/schema.d.ts +20 -38
  84. package/dist/js/contracts/schema.d.ts.map +1 -1
  85. package/dist/js/contracts/theme.d.ts +4 -1
  86. package/dist/js/contracts/theme.d.ts.map +1 -1
  87. package/dist/js/core/client-rendered-modules.d.ts +17 -0
  88. package/dist/js/core/client-rendered-modules.d.ts.map +1 -0
  89. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  90. package/dist/js/core/field-error-aria.d.ts +23 -0
  91. package/dist/js/core/field-error-aria.d.ts.map +1 -0
  92. package/dist/js/core/hydrate-modules.d.ts +10 -8
  93. package/dist/js/core/hydrate-modules.d.ts.map +1 -1
  94. package/dist/js/core/submit-result-state.d.ts.map +1 -1
  95. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  96. package/dist/js/core/validation-focus.d.ts.map +1 -1
  97. package/dist/js/modules/address/address-finder.d.ts +1 -1
  98. package/dist/js/modules/address/address-finder.d.ts.map +1 -1
  99. package/dist/js/modules/address/factories.d.ts +3 -3
  100. package/dist/js/modules/address/factories.d.ts.map +1 -1
  101. package/dist/js/modules/address/google-address.d.ts +2 -1
  102. package/dist/js/modules/address/google-address.d.ts.map +1 -1
  103. package/dist/js/modules/address/index.d.ts +2 -2
  104. package/dist/js/modules/address/index.d.ts.map +1 -1
  105. package/dist/js/modules/address/loqate.d.ts +1 -1
  106. package/dist/js/modules/address/loqate.d.ts.map +1 -1
  107. package/dist/js/modules/address/place-kit.d.ts +1 -1
  108. package/dist/js/modules/address/place-kit.d.ts.map +1 -1
  109. package/dist/js/modules/captchas/captcha-eu.d.ts +1 -1
  110. package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -1
  111. package/dist/js/modules/captchas/factories.d.ts +11 -11
  112. package/dist/js/modules/captchas/factories.d.ts.map +1 -1
  113. package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +1 -1
  114. package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -1
  115. package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +1 -1
  116. package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -1
  117. package/dist/js/modules/captchas/hcaptcha.d.ts +1 -1
  118. package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -1
  119. package/dist/js/modules/captchas/index.d.ts +2 -2
  120. package/dist/js/modules/captchas/index.d.ts.map +1 -1
  121. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +1 -1
  122. package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -1
  123. package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +1 -1
  124. package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -1
  125. package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +1 -1
  126. package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -1
  127. package/dist/js/modules/captchas/recaptcha-v3.d.ts +1 -1
  128. package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
  129. package/dist/js/modules/captchas/snaptcha.d.ts +1 -1
  130. package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -1
  131. package/dist/js/modules/captchas/turnstile.d.ts +1 -1
  132. package/dist/js/modules/captchas/turnstile.d.ts.map +1 -1
  133. package/dist/js/modules/fields/address-country.d.ts +2 -2
  134. package/dist/js/modules/fields/address-country.d.ts.map +1 -1
  135. package/dist/js/modules/fields/address-state.d.ts +2 -2
  136. package/dist/js/modules/fields/address-state.d.ts.map +1 -1
  137. package/dist/js/modules/fields/calculations.d.ts +2 -2
  138. package/dist/js/modules/fields/calculations.d.ts.map +1 -1
  139. package/dist/js/modules/fields/checkbox-radio.d.ts +2 -2
  140. package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -1
  141. package/dist/js/modules/fields/combobox.d.ts +2 -2
  142. package/dist/js/modules/fields/combobox.d.ts.map +1 -1
  143. package/dist/js/modules/fields/conditions/config.d.ts.map +1 -1
  144. package/dist/js/modules/fields/conditions/effects.d.ts +1 -0
  145. package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
  146. package/dist/js/modules/fields/conditions/evaluator.d.ts +4 -1
  147. package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -1
  148. package/dist/js/modules/fields/conditions/references.d.ts.map +1 -1
  149. package/dist/js/modules/fields/conditions/submission-context.d.ts +15 -0
  150. package/dist/js/modules/fields/conditions/submission-context.d.ts.map +1 -0
  151. package/dist/js/modules/fields/conditions/types.d.ts +3 -1
  152. package/dist/js/modules/fields/conditions/types.d.ts.map +1 -1
  153. package/dist/js/modules/fields/conditions/values.d.ts +1 -1
  154. package/dist/js/modules/fields/conditions/values.d.ts.map +1 -1
  155. package/dist/js/modules/fields/conditions.d.ts +2 -2
  156. package/dist/js/modules/fields/conditions.d.ts.map +1 -1
  157. package/dist/js/modules/fields/custom-google-maps.d.ts +2 -2
  158. package/dist/js/modules/fields/custom-google-maps.d.ts.map +1 -1
  159. package/dist/js/modules/fields/custom-link.d.ts +2 -2
  160. package/dist/js/modules/fields/custom-link.d.ts.map +1 -1
  161. package/dist/js/modules/fields/custom-maps.d.ts +2 -2
  162. package/dist/js/modules/fields/custom-maps.d.ts.map +1 -1
  163. package/dist/js/modules/fields/date-picker.d.ts +2 -2
  164. package/dist/js/modules/fields/date-picker.d.ts.map +1 -1
  165. package/dist/js/modules/fields/file-upload.d.ts +2 -2
  166. package/dist/js/modules/fields/file-upload.d.ts.map +1 -1
  167. package/dist/js/modules/fields/hidden.d.ts +2 -2
  168. package/dist/js/modules/fields/hidden.d.ts.map +1 -1
  169. package/dist/js/modules/fields/index.d.ts +2 -2
  170. package/dist/js/modules/fields/index.d.ts.map +1 -1
  171. package/dist/js/modules/fields/password-validation.d.ts +2 -2
  172. package/dist/js/modules/fields/password-validation.d.ts.map +1 -1
  173. package/dist/js/modules/fields/phone-country.d.ts +2 -2
  174. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  175. package/dist/js/modules/fields/repeater.d.ts +2 -2
  176. package/dist/js/modules/fields/repeater.d.ts.map +1 -1
  177. package/dist/js/modules/fields/rich-text.d.ts +2 -2
  178. package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
  179. package/dist/js/modules/fields/shared.d.ts +1 -0
  180. package/dist/js/modules/fields/shared.d.ts.map +1 -1
  181. package/dist/js/modules/fields/signature.d.ts +2 -2
  182. package/dist/js/modules/fields/signature.d.ts.map +1 -1
  183. package/dist/js/modules/fields/summary.d.ts +2 -2
  184. package/dist/js/modules/fields/summary.d.ts.map +1 -1
  185. package/dist/js/modules/fields/survey-likert.d.ts +2 -2
  186. package/dist/js/modules/fields/survey-likert.d.ts.map +1 -1
  187. package/dist/js/modules/fields/survey-rank.d.ts +2 -2
  188. package/dist/js/modules/fields/survey-rank.d.ts.map +1 -1
  189. package/dist/js/modules/fields/survey-rating.d.ts +2 -2
  190. package/dist/js/modules/fields/survey-rating.d.ts.map +1 -1
  191. package/dist/js/modules/fields/table.d.ts +2 -2
  192. package/dist/js/modules/fields/table.d.ts.map +1 -1
  193. package/dist/js/modules/fields/text-limit.d.ts +2 -2
  194. package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
  195. package/dist/js/modules/fields/upload-manager.d.ts +2 -2
  196. package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
  197. package/dist/js/modules/loader.d.ts +10 -4
  198. package/dist/js/modules/loader.d.ts.map +1 -1
  199. package/dist/js/modules/payments/bpoint.d.ts +1 -1
  200. package/dist/js/modules/payments/bpoint.d.ts.map +1 -1
  201. package/dist/js/modules/payments/eway.d.ts +1 -1
  202. package/dist/js/modules/payments/eway.d.ts.map +1 -1
  203. package/dist/js/modules/payments/factories.d.ts +7 -7
  204. package/dist/js/modules/payments/factories.d.ts.map +1 -1
  205. package/dist/js/modules/payments/go-cardless.d.ts +1 -1
  206. package/dist/js/modules/payments/go-cardless.d.ts.map +1 -1
  207. package/dist/js/modules/payments/index.d.ts +2 -2
  208. package/dist/js/modules/payments/index.d.ts.map +1 -1
  209. package/dist/js/modules/payments/mollie.d.ts +1 -1
  210. package/dist/js/modules/payments/mollie.d.ts.map +1 -1
  211. package/dist/js/modules/payments/moneris.d.ts +1 -1
  212. package/dist/js/modules/payments/moneris.d.ts.map +1 -1
  213. package/dist/js/modules/payments/opayo.d.ts +1 -1
  214. package/dist/js/modules/payments/opayo.d.ts.map +1 -1
  215. package/dist/js/modules/payments/paddle.d.ts +1 -1
  216. package/dist/js/modules/payments/paddle.d.ts.map +1 -1
  217. package/dist/js/modules/payments/paypal.d.ts +1 -1
  218. package/dist/js/modules/payments/paypal.d.ts.map +1 -1
  219. package/dist/js/modules/payments/payway.d.ts +1 -1
  220. package/dist/js/modules/payments/payway.d.ts.map +1 -1
  221. package/dist/js/modules/payments/square.d.ts +1 -1
  222. package/dist/js/modules/payments/square.d.ts.map +1 -1
  223. package/dist/js/modules/payments/stripe.d.ts +1 -1
  224. package/dist/js/modules/payments/stripe.d.ts.map +1 -1
  225. package/dist/js/modules/payments/utils.d.ts +6 -0
  226. package/dist/js/modules/payments/utils.d.ts.map +1 -1
  227. package/dist/js/modules/registry.d.ts +6 -4
  228. package/dist/js/modules/registry.d.ts.map +1 -1
  229. package/dist/js/submit/pipeline.d.ts.map +1 -1
  230. package/dist/js/theme/browser-theme-state.generated.d.ts +24 -0
  231. package/dist/js/theme/browser-theme-state.generated.d.ts.map +1 -0
  232. package/dist/js/theme/theme-classes.d.ts +3 -3
  233. package/dist/js/theme/theme-classes.d.ts.map +1 -1
  234. package/dist/js/transport/forms-api.d.ts +5 -3
  235. package/dist/js/transport/forms-api.d.ts.map +1 -1
  236. package/dist/js/utils/country-from-ip.d.ts +2 -2
  237. package/dist/js/utils/country-from-ip.d.ts.map +1 -1
  238. package/dist/js/utils/csrf.d.ts +17 -0
  239. package/dist/js/utils/csrf.d.ts.map +1 -0
  240. package/dist/js/utils/field-references.parser.d.ts +1 -0
  241. package/dist/js/utils/field-references.parser.d.ts.map +1 -1
  242. package/dist/js/utils/field-references.resolver.d.ts.map +1 -1
  243. package/dist/js/utils/field-references.types.d.ts +1 -0
  244. package/dist/js/utils/field-references.types.d.ts.map +1 -1
  245. package/dist/js/utils/http.d.ts +3 -1
  246. package/dist/js/utils/http.d.ts.map +1 -1
  247. package/dist/js/utils/request-profile.d.ts +4 -0
  248. package/dist/js/utils/request-profile.d.ts.map +1 -0
  249. package/dist/js/utils/unload-warning.d.ts.map +1 -1
  250. package/dist/js/validation/rules/email.d.ts.map +1 -1
  251. package/dist/js/validation/rules/match.d.ts.map +1 -1
  252. package/dist/js/validation/rules/number.d.ts.map +1 -1
  253. package/dist/js/validation/rules/required.d.ts.map +1 -1
  254. package/dist/js/validation/rules/shared.d.ts.map +1 -1
  255. package/dist/js/validation/rules/url.d.ts.map +1 -1
  256. package/dist/js/validation/skip.d.ts +7 -0
  257. package/dist/js/validation/skip.d.ts.map +1 -0
  258. package/dist/js/validation/submit-readiness.d.ts.map +1 -1
  259. package/dist/js/validation/validator.d.ts.map +1 -1
  260. package/package.json +43 -12
  261. package/src/css/formie-base.css +104 -1
  262. package/src/css/theme/_messages.css +2 -0
  263. package/src/css/theme/_tokens.css +31 -25
  264. package/src/css/theme/fields/_signature.css +2 -1
  265. package/src/css/theme/forms/_form.css +5 -1
  266. package/src/index.ts +13 -8
  267. package/src/js/contracts/client.ts +5 -3
  268. package/src/js/contracts/common.ts +5 -6
  269. package/src/js/contracts/modules.ts +41 -12
  270. package/src/js/contracts/schema.ts +21 -43
  271. package/src/js/contracts/theme.ts +6 -1
  272. package/src/js/core/client-rendered-modules.ts +69 -0
  273. package/src/js/core/create-formie-client.ts +119 -73
  274. package/src/js/core/field-error-aria.ts +93 -0
  275. package/src/js/core/hydrate-modules.ts +54 -29
  276. package/src/js/core/submit-result-state.ts +34 -45
  277. package/src/js/core/submit-result-ui.ts +21 -65
  278. package/src/js/core/validation-focus.ts +20 -20
  279. package/src/js/modules/address/address-finder.ts +1 -1
  280. package/src/js/modules/address/factories.ts +15 -13
  281. package/src/js/modules/address/google-address.ts +10 -6
  282. package/src/js/modules/address/index.ts +2 -2
  283. package/src/js/modules/address/loqate.ts +1 -1
  284. package/src/js/modules/address/place-kit.ts +1 -1
  285. package/src/js/modules/captchas/captcha-eu.ts +2 -2
  286. package/src/js/modules/captchas/factories.ts +66 -42
  287. package/src/js/modules/captchas/friendly-captcha-v1.ts +12 -2
  288. package/src/js/modules/captchas/friendly-captcha-v2.ts +4 -2
  289. package/src/js/modules/captchas/hcaptcha.ts +5 -5
  290. package/src/js/modules/captchas/index.ts +2 -2
  291. package/src/js/modules/captchas/recaptcha-enterprise.ts +2 -2
  292. package/src/js/modules/captchas/recaptcha-v2-checkbox.ts +3 -3
  293. package/src/js/modules/captchas/recaptcha-v2-invisible.ts +2 -2
  294. package/src/js/modules/captchas/recaptcha-v3.ts +2 -2
  295. package/src/js/modules/captchas/snaptcha.ts +1 -1
  296. package/src/js/modules/captchas/turnstile.ts +3 -3
  297. package/src/js/modules/fields/address-country.ts +6 -4
  298. package/src/js/modules/fields/address-state.ts +20 -12
  299. package/src/js/modules/fields/calculations.ts +5 -3
  300. package/src/js/modules/fields/checkbox-radio.ts +24 -42
  301. package/src/js/modules/fields/combobox.ts +25 -9
  302. package/src/js/modules/fields/conditions/config.ts +17 -20
  303. package/src/js/modules/fields/conditions/effects.ts +23 -26
  304. package/src/js/modules/fields/conditions/evaluator.ts +21 -29
  305. package/src/js/modules/fields/conditions/references.ts +16 -5
  306. package/src/js/modules/fields/conditions/submission-context.ts +80 -0
  307. package/src/js/modules/fields/conditions/types.ts +3 -1
  308. package/src/js/modules/fields/conditions/values.ts +31 -6
  309. package/src/js/modules/fields/conditions.ts +59 -18
  310. package/src/js/modules/fields/custom-google-maps.ts +5 -3
  311. package/src/js/modules/fields/custom-link.ts +5 -3
  312. package/src/js/modules/fields/custom-maps.ts +5 -3
  313. package/src/js/modules/fields/date-picker.ts +40 -4
  314. package/src/js/modules/fields/file-upload.ts +19 -10
  315. package/src/js/modules/fields/hidden.ts +5 -3
  316. package/src/js/modules/fields/index.ts +2 -2
  317. package/src/js/modules/fields/password-validation.ts +5 -3
  318. package/src/js/modules/fields/phone-country.ts +33 -6
  319. package/src/js/modules/fields/repeater.ts +5 -3
  320. package/src/js/modules/fields/rich-text.ts +20 -4
  321. package/src/js/modules/fields/shared.ts +13 -0
  322. package/src/js/modules/fields/signature.ts +64 -6
  323. package/src/js/modules/fields/summary.ts +8 -20
  324. package/src/js/modules/fields/survey-likert.ts +5 -3
  325. package/src/js/modules/fields/survey-rank.ts +21 -3
  326. package/src/js/modules/fields/survey-rating.ts +17 -3
  327. package/src/js/modules/fields/table.ts +5 -3
  328. package/src/js/modules/fields/text-limit.ts +5 -3
  329. package/src/js/modules/fields/upload-manager.ts +190 -49
  330. package/src/js/modules/loader.ts +345 -281
  331. package/src/js/modules/payments/bpoint.ts +2 -2
  332. package/src/js/modules/payments/eway.ts +2 -2
  333. package/src/js/modules/payments/factories.ts +53 -52
  334. package/src/js/modules/payments/go-cardless.ts +1 -1
  335. package/src/js/modules/payments/index.ts +2 -2
  336. package/src/js/modules/payments/mollie.ts +1 -1
  337. package/src/js/modules/payments/moneris.ts +2 -2
  338. package/src/js/modules/payments/opayo.ts +21 -8
  339. package/src/js/modules/payments/paddle.ts +10 -6
  340. package/src/js/modules/payments/payment.ts +22 -18
  341. package/src/js/modules/payments/paypal.ts +1 -1
  342. package/src/js/modules/payments/payway.ts +2 -2
  343. package/src/js/modules/payments/square.ts +2 -2
  344. package/src/js/modules/payments/stripe.ts +5 -5
  345. package/src/js/modules/payments/utils.ts +14 -0
  346. package/src/js/modules/registry.ts +19 -11
  347. package/src/js/submit/pipeline.ts +10 -11
  348. package/src/js/theme/browser-theme-state.generated.ts +25 -0
  349. package/src/js/theme/theme-classes.ts +3 -3
  350. package/src/js/transport/forms-api.ts +66 -67
  351. package/src/js/utils/country-from-ip.ts +14 -9
  352. package/src/js/utils/csrf.ts +136 -0
  353. package/src/js/utils/field-references.parser.ts +13 -113
  354. package/src/js/utils/field-references.resolver.ts +27 -64
  355. package/src/js/utils/field-references.row-scope.ts +1 -1
  356. package/src/js/utils/field-references.types.ts +1 -0
  357. package/src/js/utils/http.ts +5 -5
  358. package/src/js/utils/request-profile.ts +10 -0
  359. package/src/js/utils/unload-warning.ts +12 -4
  360. package/src/js/validation/rules/email.ts +3 -5
  361. package/src/js/validation/rules/match.ts +2 -1
  362. package/src/js/validation/rules/minmax.ts +4 -43
  363. package/src/js/validation/rules/number.ts +3 -47
  364. package/src/js/validation/rules/pattern.ts +3 -8
  365. package/src/js/validation/rules/required.ts +2 -1
  366. package/src/js/validation/rules/shared.ts +5 -1
  367. package/src/js/validation/rules/url.ts +3 -10
  368. package/src/js/validation/skip.ts +9 -0
  369. package/src/js/validation/submit-readiness.ts +9 -2
  370. package/src/js/validation/validator.ts +35 -59
  371. package/dist/chunks/calculations-DERi2xaC.js +0 -299
  372. package/dist/chunks/conditions-65kBcFWW.js +0 -424
  373. package/dist/chunks/country-from-ip-BwxKaBuJ.js +0 -26
  374. package/dist/chunks/field-references.resolver-CHwn0G0L.js +0 -145
  375. package/dist/chunks/friendly-captcha-v1-C_2reOXr.js +0 -31
  376. package/dist/chunks/google-address-BH3Zhi06.js +0 -161
  377. package/dist/chunks/http-D-JExro7.js +0 -27
  378. package/dist/chunks/opayo-CR0DtsLa.js +0 -179
  379. package/dist/chunks/rich-text-Bg_--4TG.js +0 -349
  380. package/dist/js/modules/fields/conditions/transforms.d.ts +0 -3
  381. package/dist/js/modules/fields/conditions/transforms.d.ts.map +0 -1
  382. package/src/js/modules/fields/conditions/transforms.ts +0 -206
  383. package/src/js/modules/payments/stub-payment-module.ts +0 -87
@@ -0,0 +1,464 @@
1
+ import { c as e, d as t, l as n } from "./dist-ZLeW0zZ3.js";
2
+ import { t as r } from "./debug-BV0DvdHx.js";
3
+ import { n as i } from "./theme-classes-DAQuEqdP.js";
4
+ import { t as a } from "./field-references.keys-58ZSTrCW.js";
5
+ import { r as o } from "./shared-OKhSay59.js";
6
+ //#region src/js/modules/fields/conditions/config.ts
7
+ var s = "[data-formie-conditions]";
8
+ function c(e) {
9
+ if (!e || typeof e != "object") return null;
10
+ let t = e, n = t.transformerParams;
11
+ return {
12
+ raw: typeof t.raw == "string" ? t.raw : "",
13
+ target: typeof t.target == "string" ? t.target : "",
14
+ handle: typeof t.domHandle == "string" ? t.domHandle : typeof t.handle == "string" ? t.handle : "",
15
+ selector: typeof t.selector == "string" ? t.selector : "",
16
+ defaultValue: typeof t.defaultValue == "string" ? t.defaultValue : "",
17
+ transformerId: typeof t.transformerId == "string" ? t.transformerId : "",
18
+ transformerParams: n && typeof n == "object" ? Object.fromEntries(Object.entries(n).map(([e, t]) => [e, String(t ?? "")])) : {},
19
+ isValid: t.isValid !== !1
20
+ };
21
+ }
22
+ function l(e) {
23
+ let t = Array.from(e.querySelectorAll(s));
24
+ return e.matches("[data-formie-conditions]") ? [e, ...t] : t;
25
+ }
26
+ function u(e) {
27
+ let t = e.getAttribute("data-formie-conditions");
28
+ if (!t) return null;
29
+ try {
30
+ let e = JSON.parse(t), n = String(e.effect ?? e.showRule ?? "show"), r = (e.version == null || e.version === 1) && ["all", "any"].includes(String(e.mode ?? e.conditionRule ?? "all")) && [
31
+ "show",
32
+ "hide",
33
+ "enable",
34
+ "disable"
35
+ ].includes(n) ? e.rules ?? e.conditions : [null], i = Array.isArray(r) ? r.map((e) => {
36
+ let t = e && typeof e == "object" ? e : {};
37
+ return {
38
+ field: typeof t.field == "string" ? t.field : "",
39
+ source: c(t.source),
40
+ condition: String(t.operator ?? t.condition ?? ""),
41
+ valueType: t.valueType,
42
+ browserSafe: t.browserSafe !== !1,
43
+ value: t.value
44
+ };
45
+ }) : [{
46
+ field: "",
47
+ condition: "",
48
+ value: null,
49
+ browserSafe: !1
50
+ }];
51
+ return {
52
+ showRule: [
53
+ "hide",
54
+ "enable",
55
+ "disable"
56
+ ].includes(n) ? n : "show",
57
+ conditionRule: (e.mode ?? e.conditionRule) === "any" ? "any" : "all",
58
+ clearOnHide: e.clearOnHide !== !1,
59
+ isNested: !!e.isNested,
60
+ conditions: i
61
+ };
62
+ } catch {
63
+ return console.error("[formie] Invalid condition JSON."), {
64
+ showRule: "show",
65
+ conditionRule: "all",
66
+ clearOnHide: !0,
67
+ isNested: !1,
68
+ conditions: [{
69
+ field: "",
70
+ condition: "",
71
+ browserSafe: !1
72
+ }]
73
+ };
74
+ }
75
+ }
76
+ //#endregion
77
+ //#region src/js/modules/fields/conditions/effects.ts
78
+ var d = "data-formie-conditions-disabled", f = "data-formie-preserve-disabled", p = "data-formie-conditionally-hidden", m = "data-formie-page-hidden", h = "fui-cp-muted-conditional-field", g = "fui-cp-muted-conditional-field--expanded", _ = "data-formie-cp-muted", v = "data-formie-row-hidden", y = "data-formie-field-count", b = "[data-formie-row], [data-formie-subfield-row], [data-formie-nested-field-row]", x = ":scope > [data-formie-field]";
79
+ function S(e) {
80
+ e.querySelectorAll("input, select, textarea").forEach((e) => {
81
+ (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) && (e instanceof HTMLInputElement && (e.type === "checkbox" || e.type === "radio" ? e.checked = !1 : e.type !== "hidden" && (e.value = "")), e instanceof HTMLSelectElement && (e.multiple ? Array.from(e.options).forEach((e) => {
82
+ e.selected = !1;
83
+ }) : e.selectedIndex = -1), e instanceof HTMLTextAreaElement && (e.value = ""));
84
+ }), e.dispatchEvent(new CustomEvent("formie:field:clear", { bubbles: !0 }));
85
+ }
86
+ function C(e, t) {
87
+ let n = e.hasAttribute("data-formie-page"), r = n ? m : p, a = i(e, n ? "pageHidden" : "conditionalHidden"), o = e.hasAttribute(r);
88
+ return t ? (o || e.setAttribute(r, "true"), e.classList.add(...a)) : (o && e.removeAttribute(r), e.classList.remove(...a)), o !== t;
89
+ }
90
+ var w = "button[type=\"submit\"], button[data-formie-action], input[type=\"submit\"]";
91
+ function T(e, t) {
92
+ if (e instanceof HTMLButtonElement || e instanceof HTMLInputElement) {
93
+ if (t) {
94
+ e.hasAttribute(d) || (e.hasAttribute("disabled") && e.setAttribute(f, "true"), e.setAttribute(d, "true")), e.setAttribute("disabled", "true");
95
+ return;
96
+ }
97
+ e.hasAttribute(d) && (e.hasAttribute(f) ? (e.setAttribute("disabled", "true"), e.removeAttribute(f)) : e.removeAttribute("disabled"), e.removeAttribute(d));
98
+ }
99
+ }
100
+ function E(e, t) {
101
+ e.matches(w) && T(e, t), e.querySelectorAll(w).forEach((e) => {
102
+ T(e, t);
103
+ }), e.querySelectorAll("input, textarea, select").forEach((e) => {
104
+ if (t) {
105
+ e.hasAttribute(d) || (e.hasAttribute("disabled") && e.setAttribute(f, "true"), e.setAttribute(d, "true")), e.setAttribute("disabled", "true");
106
+ return;
107
+ }
108
+ e.hasAttribute(d) && (e.hasAttribute(f) ? (e.setAttribute("disabled", "true"), e.removeAttribute(f)) : e.removeAttribute("disabled"), e.removeAttribute(d));
109
+ });
110
+ }
111
+ function D(e) {
112
+ return !e.hasAttribute(p) && !e.hasAttribute(m) && !e.hasAttribute(v) && !e.hasAttribute("hidden");
113
+ }
114
+ function O(e) {
115
+ let t = i(e, "rowHidden"), n = Array.from(e.querySelectorAll(x)).filter((e) => D(e)).length;
116
+ if (n > 0) {
117
+ let r = String(n);
118
+ e.getAttribute(y) !== r && e.setAttribute(y, r), e.hasAttribute(v) && e.removeAttribute(v), e.classList.remove(...t);
119
+ return;
120
+ }
121
+ e.hasAttribute(y) && e.removeAttribute(y), e.hasAttribute(v) || e.setAttribute(v, "true"), e.classList.add(...t);
122
+ }
123
+ function k(e) {
124
+ e.removeAttribute(_), e.classList.remove(h), e.classList.remove(g);
125
+ }
126
+ function A(e) {
127
+ e.removeAttribute(p), e.removeAttribute(m), e.classList.remove(...i(e, "conditionalHidden")), e.classList.remove(...i(e, "pageHidden"));
128
+ }
129
+ function j(e) {
130
+ let t = e.closest(b);
131
+ for (; t;) O(t), t = t.parentElement?.closest(b) || null;
132
+ }
133
+ function ee(e, t, n, r = {}) {
134
+ if (r.disabledOnly) {
135
+ let r = e.hasAttribute("data-formie-conditionally-disabled") !== t;
136
+ return e.toggleAttribute("data-formie-conditionally-disabled", t), E(e, t), t && n && r && S(e), r;
137
+ }
138
+ if (r.displayMode === "muted") return M(e, t);
139
+ let i = !1;
140
+ return (e.hasAttribute(_) || e.classList.contains(h) || e.classList.contains(g)) && (k(e), i = !0), i = C(e, t) || i, E(e, t), j(e), t && n && i && S(e), i;
141
+ }
142
+ function M(e, t) {
143
+ let n = !1;
144
+ return t ? ((e.hasAttribute(p) || e.hasAttribute(m)) && (A(e), n = !0), e.hasAttribute(_) || (e.setAttribute(_, "true"), n = !0), e.classList.contains(h) || (e.classList.add(h), n = !0)) : ((e.hasAttribute(_) || e.classList.contains(h) || e.classList.contains(g)) && (k(e), n = !0), (e.hasAttribute(p) || e.hasAttribute(m)) && (A(e), n = !0)), j(e), n;
145
+ }
146
+ //#endregion
147
+ //#region src/js/modules/fields/conditions/references.ts
148
+ var N = "input, select, textarea", P = "[data-formie-repeater-item], [data-formie-table-row]";
149
+ function F(e) {
150
+ return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement;
151
+ }
152
+ function I(e) {
153
+ let t = e.querySelector(N);
154
+ if (!t) return null;
155
+ let n = t.getAttribute("name") || "", r = Array.from(n.matchAll(/\[(\d+)\]/g));
156
+ return r.length && r[r.length - 1]?.[1] || null;
157
+ }
158
+ function L(e) {
159
+ return e.closest(P);
160
+ }
161
+ function te(e) {
162
+ return Array.from(e.querySelectorAll(N)).filter((e) => F(e) && !!e.name);
163
+ }
164
+ function ne(e) {
165
+ let t = e.getAttribute("name") || "";
166
+ return Array.from(t.matchAll(/\[([^\]]+)\]/g)).map((e) => e[1] || "").filter(Boolean);
167
+ }
168
+ function re(e, t) {
169
+ if (!t) return !0;
170
+ let n = t.split(/[.:]/).filter(Boolean);
171
+ if (!n.length) return !0;
172
+ let r = ne(e);
173
+ return r.length < n.length ? !1 : n.every((e, t) => r[r.length - n.length + t] === e);
174
+ }
175
+ function ie(e, t) {
176
+ if (!t) return e;
177
+ let n = e.filter((e) => re(e, t));
178
+ return n.length ? n : e;
179
+ }
180
+ function R(e, t) {
181
+ let n = L(e);
182
+ if (!n) return t;
183
+ let r = t.filter((e) => L(e) === n);
184
+ return r.length ? r : t;
185
+ }
186
+ function z(e) {
187
+ return !e.source?.target || !e.source.handle ? null : e.source.target === "field" || e.source.target === "submission" ? e.source : null;
188
+ }
189
+ function B(e, t, n) {
190
+ let r = z(n);
191
+ if (!r || r.target !== "field" || !r.handle) return [];
192
+ let i = o(r.handle), s = !!r.transformerParams.scope, c = Array.from(e.querySelectorAll(`[data-formie-field-handle="${i}"]`));
193
+ if (c.length) return (s ? c : R(t, c)).flatMap((e) => ie(te(e), r.selector));
194
+ let l = a(r.handle), u = o(l), d = Array.from(e.querySelectorAll(`[name="${u}"]`)).filter((e) => F(e)), f = Array.from(e.querySelectorAll(`[name="${u}[]"]`)).filter((e) => F(e));
195
+ if (d.length || f.length) return s ? [...d, ...f] : R(t, [...d, ...f]);
196
+ if (!r.handle.includes("__ROW__")) return [];
197
+ let p = I(t);
198
+ if (p && !s) {
199
+ let t = a(r.handle.replace(/__ROW__/g, p)), n = o(t), i = Array.from(e.querySelectorAll(`[name="${n}"]`)).filter((e) => F(e)), s = Array.from(e.querySelectorAll(`[name="${n}[]"]`)).filter((e) => F(e));
200
+ if (i.length || s.length) return [...i, ...s];
201
+ }
202
+ if (!s) return [];
203
+ let m = a(r.handle).replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/__ROW__/g, "\\d+"), h = new RegExp(m);
204
+ return Array.from(e.querySelectorAll("[name]")).filter((e) => F(e) && h.test(e.getAttribute("name") || ""));
205
+ }
206
+ //#endregion
207
+ //#region src/js/modules/fields/conditions/submission-context.ts
208
+ var V = "data-formie-submission", H = "formie:submission-context-change";
209
+ function U(e) {
210
+ return !!e && typeof e == "object" && !Array.isArray(e);
211
+ }
212
+ function W(e, t = e) {
213
+ return t.closest(`[${V}]`) || (e instanceof Element && e.hasAttribute("data-formie-submission") ? e : e.querySelector(`[${V}]`));
214
+ }
215
+ function G(e, t = e) {
216
+ let n = W(e, t)?.getAttribute(V);
217
+ if (!n) return {};
218
+ try {
219
+ let e = JSON.parse(n);
220
+ return U(e) ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t == null ? "" : String(t)])) : {};
221
+ } catch (e) {
222
+ return console.error("[formie] Invalid submission context JSON.", e), {};
223
+ }
224
+ }
225
+ function K(e, t, n = e) {
226
+ let r = G(e, n), i = String(t.handle || "").trim(), a = "";
227
+ return i !== "" && (a = Object.prototype.hasOwnProperty.call(r, i) ? r[i] ?? "" : r[`submission${i.charAt(0).toUpperCase()}${i.slice(1)}`] ?? ""), a === "" && t.defaultValue && (a = t.defaultValue), [a];
228
+ }
229
+ //#endregion
230
+ //#region src/js/modules/fields/conditions/values.ts
231
+ function q(e, t) {
232
+ return e.name || `__condition_input_${t}`;
233
+ }
234
+ function J(e) {
235
+ return (e.id ? e.ownerDocument.querySelector(`label[for="${e.id}"]`)?.textContent?.trim() : "") || e.closest("label")?.textContent?.trim() || "";
236
+ }
237
+ function ae(e, t = "") {
238
+ let n = e[0];
239
+ if (!n) return [];
240
+ if (n instanceof HTMLInputElement) {
241
+ if (n.type === "checkbox") {
242
+ let n = e.filter((e) => e instanceof HTMLInputElement && e.checked);
243
+ return t === "label" ? n.map((e) => J(e)).filter(Boolean) : n.map((e) => e.value);
244
+ }
245
+ if (n.type === "radio") {
246
+ let n = e.filter((e) => e instanceof HTMLInputElement && e.checked);
247
+ return t === "label" ? n.map((e) => J(e)).filter(Boolean) : n.map((e) => e.value);
248
+ }
249
+ if (n.type === "file") return Array.from(n.files || []).map((e) => e.name);
250
+ }
251
+ return n instanceof HTMLSelectElement && n.multiple ? t === "label" ? Array.from(n.selectedOptions).map((e) => e.label || e.text) : Array.from(n.selectedOptions).map((e) => e.value) : n instanceof HTMLSelectElement && t === "label" ? Array.from(n.selectedOptions).map((e) => e.label || e.text) : e.map((e) => e.value);
252
+ }
253
+ function Y(e) {
254
+ return ["input", "change"];
255
+ }
256
+ function X(e, t = null) {
257
+ let n = /* @__PURE__ */ new Map();
258
+ e.forEach((e, t) => {
259
+ let r = q(e, t), i = n.get(r) || [];
260
+ i.push(e), n.set(r, i);
261
+ });
262
+ let r = Array.from(n.values()).flatMap((e) => ae(e, t?.selector || ""));
263
+ return (r.length === 0 || r.every((e) => e === "")) && t?.defaultValue ? [t.defaultValue] : r;
264
+ }
265
+ function Z(e, n, r, i) {
266
+ if (n?.transformerParams.scope) {
267
+ let a = /* @__PURE__ */ new Map();
268
+ for (let t of e) {
269
+ let e = t.name.match(/\[([0-9]+)\]/)?.[1];
270
+ e != null && a.set(e, [...a.get(e) ?? [], t]);
271
+ }
272
+ let o = [...a.values()].map((e) => Z(e, {
273
+ ...n,
274
+ transformerParams: {}
275
+ }, r === "collection" ? e.length > 1 ? "collection" : "text" : r)), s = t(o, n.transformerParams, i);
276
+ return s.diagnostic ? { conditionDiagnostic: s.diagnostic } : n.transformerParams.scope === "rows" && !Array.isArray(s.value) ? [s.value] : s.value;
277
+ }
278
+ if (r === "boolean") {
279
+ let t = e.find((e) => e instanceof HTMLInputElement && e.type === "checkbox");
280
+ if (t) return t.checked;
281
+ }
282
+ if ([
283
+ "date",
284
+ "time",
285
+ "datetime"
286
+ ].includes(r)) {
287
+ let t = {};
288
+ for (let n of e) {
289
+ let e = n.name.match(/\[(year|month|day|hour|minute|second|ampm|timezone)\]$/)?.[1];
290
+ e && n.value !== "" && (t[e] = n.value);
291
+ }
292
+ if (Object.keys(t).length) return t;
293
+ }
294
+ let a = X(e, n);
295
+ return r === "collection" ? a.filter((e) => e !== "") : a[0] ?? null;
296
+ }
297
+ //#endregion
298
+ //#region src/js/modules/fields/conditions/evaluator.ts
299
+ function oe(t, r, i = {}) {
300
+ let a = i.root, o = i.from || a, s = t.conditions.map((t) => {
301
+ let n = r(t), i = z(t), s = i?.target === "submission" && a && o ? K(a, i, o) : X(n, i);
302
+ if (t.browserSafe === !1 || i?.transformerId || i?.isValid === !1 || !n.length && i?.target !== "submission") return {
303
+ value: null,
304
+ diagnostics: [{ code: "unresolvedReference" }]
305
+ };
306
+ let c = t.valueType ?? (s.length > 1 ? "collection" : "text"), l = i?.target === "submission" ? c === "collection" ? s : s[0] ?? null : Z(n, i, c, Number(o?.querySelector("input,select,textarea")?.getAttribute("name")?.match(/\[([0-9]+)\]/)?.[1]));
307
+ return l && typeof l == "object" && "conditionDiagnostic" in l ? {
308
+ value: null,
309
+ diagnostics: [{ code: String(l.conditionDiagnostic) }]
310
+ } : e(t.condition, l, t.value, c);
311
+ });
312
+ return n(t, s);
313
+ }
314
+ //#endregion
315
+ //#region src/js/modules/fields/conditions.ts
316
+ var Q = r("conditions");
317
+ function $(e) {
318
+ let t = /* @__PURE__ */ new Set();
319
+ return e.filter((e) => !t.has(e) && (t.add(e), !0));
320
+ }
321
+ var se = {
322
+ moduleId: "formie:conditions",
323
+ version: 2,
324
+ surfaces: [
325
+ "server-rendered",
326
+ "client-rendered",
327
+ "cp-edit"
328
+ ],
329
+ kind: "core",
330
+ match: (e) => e.target instanceof HTMLElement && (e.target.matches("[data-formie-conditions]") || !!e.target.querySelector("[data-formie-conditions]")),
331
+ setup: async (e) => {
332
+ let t = e.target instanceof HTMLElement ? e.target : e.root;
333
+ if (!l(t).length) {
334
+ Q.log("No condition nodes in scope.");
335
+ return;
336
+ }
337
+ let n = [], r = [], i = /* @__PURE__ */ new Set(), a = !1, o = !1, c = () => {
338
+ n.forEach((e) => {
339
+ e();
340
+ }), n.length = 0;
341
+ }, d = () => l(t).flatMap((e) => {
342
+ let n = u(e);
343
+ return n ? [{
344
+ node: e,
345
+ settings: n,
346
+ sourceInputs: $(n.conditions.flatMap((n) => B(t, e, n)))
347
+ }] : [];
348
+ }), f = (e) => {
349
+ let t = new Map(e.map((e) => [e.node, e])), n = /* @__PURE__ */ new Set(), r = [], a = [];
350
+ i = /* @__PURE__ */ new Set();
351
+ let o = (e) => {
352
+ if (n.has(e.node)) return;
353
+ let c = r.indexOf(e.node);
354
+ if (c >= 0) {
355
+ r.slice(c).forEach((e) => i.add(e));
356
+ return;
357
+ }
358
+ r.push(e.node);
359
+ let l = (e) => {
360
+ for (let n = e?.closest(s); n; n = n.parentElement?.closest(s)) {
361
+ let e = t.get(n);
362
+ e && o(e);
363
+ }
364
+ };
365
+ l(e.node.parentElement), e.sourceInputs.forEach((e) => l(e)), r.pop(), n.add(e.node), a.push(e);
366
+ };
367
+ return e.forEach(o), i.size && Q.warn("Condition dependency cycle.", { count: i.size }), a;
368
+ }, p = e.options?.cpDisplayMode === "muted" ? "muted" : "hide", m = !1, h = () => {
369
+ let n = !1;
370
+ return r.forEach((r) => {
371
+ let a = i.has(r.node) ? {
372
+ finalResult: !1,
373
+ shouldHide: ["show", "enable"].includes(r.settings.showRule),
374
+ diagnostics: [{ code: "dependencyCycle" }]
375
+ } : oe(r.settings, (e) => B(t, r.node, e), {
376
+ root: t,
377
+ from: r.node
378
+ }), o = r.node.hasAttribute("data-formie-page") ? "hide" : p, s = ee(r.node, a.shouldHide, r.settings.clearOnHide, {
379
+ displayMode: o,
380
+ disabledOnly: ["enable", "disable"].includes(r.settings.showRule)
381
+ });
382
+ n ||= s, Q.log("Condition evaluated.", {
383
+ shouldHide: a.shouldHide,
384
+ finalResult: a.finalResult,
385
+ stateChanged: s
386
+ }), e.emit("formie:conditions:evaluated", {
387
+ node: r.node,
388
+ shouldHide: a.shouldHide,
389
+ finalResult: a.finalResult,
390
+ clearOnHide: r.settings.clearOnHide,
391
+ diagnostics: i.has(r.node) ? [{ code: "dependencyCycle" }] : []
392
+ });
393
+ }), n;
394
+ }, g = () => {
395
+ if (!m) {
396
+ m = !0;
397
+ try {
398
+ h();
399
+ } finally {
400
+ m = !1;
401
+ }
402
+ }
403
+ }, _ = () => {
404
+ m || a || (a = !0, requestAnimationFrame(() => {
405
+ a = !1, !m && g();
406
+ }));
407
+ }, v = () => {
408
+ if ($(r.flatMap((e) => e.sourceInputs)).forEach((e) => {
409
+ let t = () => {
410
+ _();
411
+ };
412
+ Y(e).forEach((n) => {
413
+ e.addEventListener(n, t);
414
+ }), n.push(() => {
415
+ Y(e).forEach((n) => {
416
+ e.removeEventListener(n, t);
417
+ });
418
+ });
419
+ }), e.form) {
420
+ let t = () => {
421
+ window.setTimeout(() => {
422
+ _();
423
+ }, 0);
424
+ };
425
+ e.form.addEventListener("reset", t), n.push(() => {
426
+ e.form?.removeEventListener("reset", t);
427
+ });
428
+ let r = () => {
429
+ _();
430
+ };
431
+ e.form.addEventListener(H, r), n.push(() => {
432
+ e.form?.removeEventListener(H, r);
433
+ });
434
+ }
435
+ }, y = () => {
436
+ c(), r = f(d()), v(), Q.log("Rebuilt condition graph.", { entryCount: r.length }), _();
437
+ }, b = () => {
438
+ m || o || (o = !0, requestAnimationFrame(() => {
439
+ o = !1, !m && y();
440
+ }));
441
+ }, x = new MutationObserver((e) => {
442
+ if (m) return;
443
+ let t = e.some((e) => e.type === "childList" && (e.addedNodes.length > 0 || e.removedNodes.length > 0)), n = e.some((e) => e.type === "attributes");
444
+ t ? b() : n && _();
445
+ });
446
+ return x.observe(t, {
447
+ childList: !0,
448
+ subtree: !0,
449
+ attributes: !0,
450
+ attributeFilter: [
451
+ "hidden",
452
+ "aria-hidden",
453
+ "data-formie-conditionally-hidden",
454
+ "data-formie-page-hidden",
455
+ "data-formie-row-hidden",
456
+ V
457
+ ]
458
+ }), y(), await e.emit("formie:module:conditions:init", { count: r.length }), Q.log("Module setup complete.", { entryCount: r.length }), { destroy: () => {
459
+ c(), x.disconnect(), Q.log("Module destroy."), e.emit("formie:module:conditions:destroy", {});
460
+ } };
461
+ }
462
+ };
463
+ //#endregion
464
+ export { se as conditionsModule };
@@ -0,0 +1,29 @@
1
+ import { t as e } from "./request-profile-DhwkeCpS.js";
2
+ import { t } from "./dist-ZLeW0zZ3.js";
3
+ //#region src/js/utils/country-from-ip.ts
4
+ var n = "formie/address/country-from-ip", r = /* @__PURE__ */ new Map();
5
+ function i(e) {
6
+ return new URL(/^https?:\/\//.test(e) || e.startsWith("/") ? e : `/actions/${e}`, window.location.origin).toString();
7
+ }
8
+ async function a(a = n, o) {
9
+ let s = i(a);
10
+ return r.has(s) || r.set(s, (async () => {
11
+ try {
12
+ let n = await t(s, { headers: { Accept: "application/json" } }, e(o));
13
+ if (!n.ok) return null;
14
+ let r = await n.json();
15
+ return r?.countryCode ? r : null;
16
+ } catch {
17
+ return null;
18
+ }
19
+ })()), r.get(s);
20
+ }
21
+ function o(e = n, t) {
22
+ return (n) => {
23
+ a(e, t).then((e) => {
24
+ n(e?.countryCode?.toLowerCase() || "");
25
+ });
26
+ };
27
+ }
28
+ //#endregion
29
+ export { a as n, o as t };
@@ -0,0 +1,61 @@
1
+ //#region src/js/utils/csrf.ts
2
+ var e = "CRAFT_CSRF_TOKEN", t = "data-formie-csrf-param";
3
+ function n() {
4
+ let e = globalThis.Craft?.csrfTokenName;
5
+ return typeof e == "string" && e.trim() ? e.trim() : null;
6
+ }
7
+ function r(e) {
8
+ return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
9
+ }
10
+ function i(e, t) {
11
+ let n = e.querySelector(`input[name="${r(t)}"]`);
12
+ return n instanceof HTMLInputElement ? n : null;
13
+ }
14
+ function a(r) {
15
+ if (!r) return null;
16
+ let a = r.querySelector("input[data-formie-csrf]");
17
+ if (a instanceof HTMLInputElement && a.name.trim()) return a;
18
+ if (r instanceof Element) {
19
+ let e = r.getAttribute(t)?.trim();
20
+ if (e) {
21
+ let t = i(r, e);
22
+ if (t) return t;
23
+ }
24
+ }
25
+ let o = n();
26
+ if (o) {
27
+ let e = i(r, o);
28
+ if (e) return e;
29
+ }
30
+ return i(r, e);
31
+ }
32
+ function o(e) {
33
+ let t = a(e), n = t?.name?.trim() || "", r = t?.value?.trim() || "";
34
+ return !n || !r ? null : {
35
+ name: n,
36
+ value: r
37
+ };
38
+ }
39
+ function s(e, t) {
40
+ let n = o(t);
41
+ n && e.append(n.name, n.value);
42
+ }
43
+ function c(e, t) {
44
+ let n = o(t);
45
+ n && (e[n.name] = n.value);
46
+ }
47
+ function l(r, i) {
48
+ let a = r.endsWith("[]") ? r.slice(0, -2) : r;
49
+ if (!a) return !1;
50
+ if (a === e) return !0;
51
+ let s = n();
52
+ if (s && a === s) return !0;
53
+ if (i instanceof Element) {
54
+ let e = i.getAttribute(t)?.trim();
55
+ if (e && a === e) return !0;
56
+ }
57
+ let c = o(i);
58
+ return !!c && a === c.name;
59
+ }
60
+ //#endregion
61
+ export { l as i, c as n, o as r, s as t };
@@ -1,4 +1,4 @@
1
- import { i as e, s as t } from "./shared-Bx9s0i0P.js";
1
+ import { a as e, c as t } from "./shared-OKhSay59.js";
2
2
  //#region src/js/modules/fields/custom-google-maps.ts
3
3
  var n = "custom-google-maps", r = "[data-formie-custom-google-maps]", i = null;
4
4
  function a(e) {
@@ -127,7 +127,7 @@ async function y(e, t) {
127
127
  draggable: !0
128
128
  }), a.addListener("click", (t) => {
129
129
  let n = t.latLng?.lat(), r = t.latLng?.lng();
130
- n === void 0 || r === void 0 || v(e, {
130
+ n !== void 0 && r !== void 0 && v(e, {
131
131
  lat: n,
132
132
  lng: r,
133
133
  zoom: a?.getZoom() || i
@@ -182,7 +182,13 @@ function b(e) {
182
182
  };
183
183
  }
184
184
  var x = {
185
- id: n,
185
+ moduleId: `formie:${n}`,
186
+ version: 2,
187
+ surfaces: [
188
+ "server-rendered",
189
+ "client-rendered",
190
+ "cp-edit"
191
+ ],
186
192
  kind: "field",
187
193
  match: ({ target: e }) => e instanceof Element && (e.matches(r) || !!e.querySelector(r)),
188
194
  setup: async (n) => {
@@ -1,4 +1,4 @@
1
- import { i as e, s as t } from "./shared-Bx9s0i0P.js";
1
+ import { a as e, c as t } from "./shared-OKhSay59.js";
2
2
  //#region src/js/modules/fields/custom-link.ts
3
3
  var n = "custom-link", r = "[data-formie-custom-link]";
4
4
  function i(e, t) {
@@ -34,7 +34,13 @@ function s(e) {
34
34
  };
35
35
  }
36
36
  var c = {
37
- id: n,
37
+ moduleId: `formie:${n}`,
38
+ version: 2,
39
+ surfaces: [
40
+ "server-rendered",
41
+ "client-rendered",
42
+ "cp-edit"
43
+ ],
38
44
  kind: "field",
39
45
  match: ({ target: e }) => e instanceof Element && (e.matches(r) || !!e.querySelector(r)),
40
46
  setup: async (n) => {
@@ -1,6 +1,6 @@
1
- import { n as e } from "./chunk-3b4jIN3o.js";
1
+ import { n as e } from "./rolldown-runtime-DtPi1Y-2.js";
2
2
  import { t } from "./styles-BfoIZwJp.js";
3
- import { i as n, s as r } from "./shared-Bx9s0i0P.js";
3
+ import { a as n, c as r } from "./shared-OKhSay59.js";
4
4
  //#region ../../node_modules/leaflet/dist/leaflet.css?inline
5
5
  var i = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:\"\";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}", a = "custom-maps", o = "[data-formie-custom-maps]";
6
6
  t(a, [i]);
@@ -51,7 +51,7 @@ function h(e, t, n) {
51
51
  m(e.latInput, t.lat), m(e.lngInput, t.lng), n !== void 0 && m(e.zoomInput, n);
52
52
  }
53
53
  function g() {
54
- return s ||= import("./leaflet-src-j-lHNmhR.js").then((t) => /* @__PURE__ */ e(t.default, 1)), s;
54
+ return s ||= import("./leaflet-src-DE6rv6M-.js").then((t) => /* @__PURE__ */ e(t.default, 1)), s;
55
55
  }
56
56
  function _(e) {
57
57
  switch (e.mapTiles) {
@@ -149,7 +149,13 @@ function S(e) {
149
149
  };
150
150
  }
151
151
  var C = {
152
- id: a,
152
+ moduleId: `formie:${a}`,
153
+ version: 2,
154
+ surfaces: [
155
+ "server-rendered",
156
+ "client-rendered",
157
+ "cp-edit"
158
+ ],
153
159
  kind: "field",
154
160
  match: ({ target: e }) => e instanceof Element && (e.matches(o) || !!e.querySelector(o)),
155
161
  setup: async (e) => {