@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.
- package/CHANGELOG.md +57 -0
- package/dist/chunks/{address-country-Rx6GQTND.js → address-country-Dn71jroa.js} +10 -4
- package/dist/chunks/{address-finder-k7_BXaRe.js → address-finder-O49uDRoR.js} +2 -2
- package/dist/chunks/{address-state-BwE01m2_.js → address-state-ByYatUur.js} +154 -143
- package/dist/chunks/{api-DqpfkZWL.js → api-D6kJ7kXZ.js} +183 -179
- package/dist/chunks/{api-BUb6P-xu.js → api-DYYsVIub.js} +77 -47
- package/dist/chunks/{api-sPqGbOww.js → api-ghNr2uxX.js} +15 -9
- package/dist/chunks/{bpoint-Dlq34XH1.js → bpoint-D0RKFM4F.js} +3 -3
- package/dist/chunks/calculations-YEoVCG2q.js +310 -0
- package/dist/chunks/{captcha-eu-CGm8Lbrj.js → captcha-eu-DERJbXnH.js} +5 -4
- package/dist/chunks/{checkbox-radio-BY2aTCOG.js → checkbox-radio-gsm8QPJg.js} +74 -75
- package/dist/chunks/{combobox-C0EuExSI.js → combobox-CWNdx4Fk.js} +290 -279
- package/dist/chunks/conditions-DqNHLTbN.js +464 -0
- package/dist/chunks/country-from-ip-DDj_mFki.js +29 -0
- package/dist/chunks/csrf-DxHg_ZYt.js +61 -0
- package/dist/chunks/{custom-google-maps-BsaSirEZ.js → custom-google-maps-C4l2S3GO.js} +9 -3
- package/dist/chunks/{custom-link-CJ1-FjEM.js → custom-link-CLazgKYH.js} +8 -2
- package/dist/chunks/{custom-maps-DYW_pBid.js → custom-maps-DqcAlD0v.js} +10 -4
- package/dist/chunks/{date-picker-5CA_-zGb.js → date-picker-RUnevF7l.js} +456 -430
- package/dist/chunks/{dist-BdUy8m_p.js → dist-ZLeW0zZ3.js} +1280 -452
- package/dist/chunks/{eway-D9_m8ooj.js → eway-or6dtjoT.js} +3 -3
- package/dist/chunks/field-references.resolver-Ca8MguFv.js +104 -0
- package/dist/chunks/{file-upload-rqfZNqlH.js → file-upload-Bm-TXyNB.js} +104 -96
- package/dist/chunks/friendly-captcha-v1-GFqCt1Mh.js +34 -0
- package/dist/chunks/{friendly-captcha-v2-CLSAbkqx.js → friendly-captcha-v2-WoW246JG.js} +6 -5
- package/dist/chunks/{friendly-challenge-8uPatWqk.js → friendly-challenge-DPG9MJb1.js} +111 -102
- package/dist/chunks/{go-cardless-DAT3ZaQf.js → go-cardless-DzJ-0FKg.js} +2 -2
- package/dist/chunks/google-address-C1P1nTDM.js +163 -0
- package/dist/chunks/{hcaptcha-CGLAmgjO.js → hcaptcha-D0T8aIHz.js} +3 -3
- package/dist/chunks/{hidden-D7_Ch-QN.js → hidden-BZhXnNPe.js} +8 -2
- package/dist/chunks/http-C2QdHuWO.js +27 -0
- package/dist/chunks/{leaflet-src-j-lHNmhR.js → leaflet-src-DE6rv6M-.js} +42 -46
- package/dist/chunks/{loqate-CJPzBmSm.js → loqate-DD1S7PY9.js} +2 -2
- package/dist/chunks/{mollie-Bibhl67p.js → mollie-DG8Ju83x.js} +2 -2
- package/dist/chunks/{moneris-H2wSqk9h.js → moneris-C8m3Fvqu.js} +3 -3
- package/dist/chunks/opayo-B3EvrVxw.js +188 -0
- package/dist/chunks/{paddle-DkvIxQdG.js → paddle-BIYR9Um3.js} +3 -3
- package/dist/chunks/{password-validation-T0vDQPCr.js → password-validation-C8_uO_c_.js} +18 -12
- package/dist/chunks/{paypal-CQpAF7Ua.js → paypal-B_yxIo2d.js} +7 -5
- package/dist/chunks/{payway-CwDkC7YZ.js → payway-CeOzS0sL.js} +3 -3
- package/dist/chunks/{phone-country-D3ayr60L.js → phone-country-bAqje17P.js} +80 -63
- package/dist/chunks/{place-kit-BGHklIZ-.js → place-kit-BE5gi3vo.js} +3 -3
- package/dist/chunks/{placekit-autocomplete.esm-DWVabQlq.js → placekit-autocomplete.esm-CZZERYur.js} +11 -15
- package/dist/chunks/{recaptcha-enterprise-XPId5-bS.js → recaptcha-enterprise-CruXddZq.js} +4 -4
- package/dist/chunks/{recaptcha-shared-CLYJvojk.js → recaptcha-shared-AQRMDMme.js} +1 -1
- package/dist/chunks/{recaptcha-v2-checkbox-Cy-0PEPc.js → recaptcha-v2-checkbox-CCnJYCnG.js} +4 -4
- package/dist/chunks/{recaptcha-v2-invisible-BwRH540O.js → recaptcha-v2-invisible-BuVqRRYn.js} +4 -4
- package/dist/chunks/{recaptcha-v3-No4Ykrhk.js → recaptcha-v3-CloqhO2A.js} +4 -4
- package/dist/chunks/{repeater-BVnPUqTj.js → repeater-DwE27jI1.js} +25 -19
- package/dist/chunks/request-profile-DhwkeCpS.js +10 -0
- package/dist/chunks/rich-text-uV4o_pGk.js +361 -0
- package/dist/chunks/{chunk-3b4jIN3o.js → rolldown-runtime-DtPi1Y-2.js} +2 -2
- package/dist/chunks/{sdk-BhHAYgga.js → sdk-lkwSvlpM.js} +282 -234
- package/dist/chunks/{shared-Bx9s0i0P.js → shared-OKhSay59.js} +27 -21
- package/dist/chunks/{signature-xz4QO7CR.js → signature-7cldFbqj.js} +160 -112
- package/dist/chunks/{snaptcha-DKx98oon.js → snaptcha-C04kNGYQ.js} +2 -2
- package/dist/chunks/{square-DwdcOI1G.js → square-DEzxv9D9.js} +8 -6
- package/dist/chunks/{stripe-DaoG2FT1.js → stripe-CVPQGDz3.js} +10 -11
- package/dist/chunks/{summary-Dks0gXS3.js → summary-BF_8mrXI.js} +47 -45
- package/dist/chunks/{survey-likert-DkE6bR7B.js → survey-likert-fk1hUPff.js} +7 -1
- package/dist/chunks/{survey-rank-DN6x4IZM.js → survey-rank-BsLGl2LX.js} +37 -25
- package/dist/chunks/{survey-rating-BnsNL9U5.js → survey-rating-DVS6e6fM.js} +17 -5
- package/dist/chunks/{table-CAjCJHrL.js → table-DnIBdeKF.js} +21 -15
- package/dist/chunks/{text-limit-Bn18WrPU.js → text-limit-LGMPhFuC.js} +40 -34
- package/dist/chunks/{theme-classes-Tv7q7ToE.js → theme-classes-DAQuEqdP.js} +1 -1
- package/dist/chunks/{turnstile-DJakPzQD.js → turnstile-n9DNyPxi.js} +3 -3
- package/dist/chunks/{upload-manager-W-QDgxKD.js → upload-manager-BbiUosZq.js} +410 -350
- package/dist/chunks/{utils-Vqp8i_RM.js → utils-DpUBPadZ.js} +20 -14
- package/dist/css/formie-base.css +104 -1
- package/dist/css/theme/_messages.css +2 -0
- package/dist/css/theme/_tokens.css +31 -25
- package/dist/css/theme/fields/_signature.css +2 -1
- package/dist/css/theme/forms/_form.css +5 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1778 -1425
- package/dist/js/contracts/client.d.ts +5 -3
- package/dist/js/contracts/client.d.ts.map +1 -1
- package/dist/js/contracts/common.d.ts +2 -2
- package/dist/js/contracts/common.d.ts.map +1 -1
- package/dist/js/contracts/modules.d.ts +37 -12
- package/dist/js/contracts/modules.d.ts.map +1 -1
- package/dist/js/contracts/schema.d.ts +20 -38
- package/dist/js/contracts/schema.d.ts.map +1 -1
- package/dist/js/contracts/theme.d.ts +4 -1
- package/dist/js/contracts/theme.d.ts.map +1 -1
- package/dist/js/core/client-rendered-modules.d.ts +17 -0
- package/dist/js/core/client-rendered-modules.d.ts.map +1 -0
- package/dist/js/core/create-formie-client.d.ts.map +1 -1
- package/dist/js/core/field-error-aria.d.ts +23 -0
- package/dist/js/core/field-error-aria.d.ts.map +1 -0
- package/dist/js/core/hydrate-modules.d.ts +10 -8
- package/dist/js/core/hydrate-modules.d.ts.map +1 -1
- package/dist/js/core/submit-result-state.d.ts.map +1 -1
- package/dist/js/core/submit-result-ui.d.ts.map +1 -1
- package/dist/js/core/validation-focus.d.ts.map +1 -1
- package/dist/js/modules/address/address-finder.d.ts +1 -1
- package/dist/js/modules/address/address-finder.d.ts.map +1 -1
- package/dist/js/modules/address/factories.d.ts +3 -3
- package/dist/js/modules/address/factories.d.ts.map +1 -1
- package/dist/js/modules/address/google-address.d.ts +2 -1
- package/dist/js/modules/address/google-address.d.ts.map +1 -1
- package/dist/js/modules/address/index.d.ts +2 -2
- package/dist/js/modules/address/index.d.ts.map +1 -1
- package/dist/js/modules/address/loqate.d.ts +1 -1
- package/dist/js/modules/address/loqate.d.ts.map +1 -1
- package/dist/js/modules/address/place-kit.d.ts +1 -1
- package/dist/js/modules/address/place-kit.d.ts.map +1 -1
- package/dist/js/modules/captchas/captcha-eu.d.ts +1 -1
- package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -1
- package/dist/js/modules/captchas/factories.d.ts +11 -11
- package/dist/js/modules/captchas/factories.d.ts.map +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +1 -1
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -1
- package/dist/js/modules/captchas/hcaptcha.d.ts +1 -1
- package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -1
- package/dist/js/modules/captchas/index.d.ts +2 -2
- package/dist/js/modules/captchas/index.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -1
- package/dist/js/modules/captchas/recaptcha-v3.d.ts +1 -1
- package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -1
- package/dist/js/modules/captchas/snaptcha.d.ts +1 -1
- package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -1
- package/dist/js/modules/captchas/turnstile.d.ts +1 -1
- package/dist/js/modules/captchas/turnstile.d.ts.map +1 -1
- package/dist/js/modules/fields/address-country.d.ts +2 -2
- package/dist/js/modules/fields/address-country.d.ts.map +1 -1
- package/dist/js/modules/fields/address-state.d.ts +2 -2
- package/dist/js/modules/fields/address-state.d.ts.map +1 -1
- package/dist/js/modules/fields/calculations.d.ts +2 -2
- package/dist/js/modules/fields/calculations.d.ts.map +1 -1
- package/dist/js/modules/fields/checkbox-radio.d.ts +2 -2
- package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -1
- package/dist/js/modules/fields/combobox.d.ts +2 -2
- package/dist/js/modules/fields/combobox.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/config.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/effects.d.ts +1 -0
- package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/evaluator.d.ts +4 -1
- package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/references.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/submission-context.d.ts +15 -0
- package/dist/js/modules/fields/conditions/submission-context.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/types.d.ts +3 -1
- package/dist/js/modules/fields/conditions/types.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions/values.d.ts +1 -1
- package/dist/js/modules/fields/conditions/values.d.ts.map +1 -1
- package/dist/js/modules/fields/conditions.d.ts +2 -2
- package/dist/js/modules/fields/conditions.d.ts.map +1 -1
- package/dist/js/modules/fields/custom-google-maps.d.ts +2 -2
- package/dist/js/modules/fields/custom-google-maps.d.ts.map +1 -1
- package/dist/js/modules/fields/custom-link.d.ts +2 -2
- package/dist/js/modules/fields/custom-link.d.ts.map +1 -1
- package/dist/js/modules/fields/custom-maps.d.ts +2 -2
- package/dist/js/modules/fields/custom-maps.d.ts.map +1 -1
- package/dist/js/modules/fields/date-picker.d.ts +2 -2
- package/dist/js/modules/fields/date-picker.d.ts.map +1 -1
- package/dist/js/modules/fields/file-upload.d.ts +2 -2
- package/dist/js/modules/fields/file-upload.d.ts.map +1 -1
- package/dist/js/modules/fields/hidden.d.ts +2 -2
- package/dist/js/modules/fields/hidden.d.ts.map +1 -1
- package/dist/js/modules/fields/index.d.ts +2 -2
- package/dist/js/modules/fields/index.d.ts.map +1 -1
- package/dist/js/modules/fields/password-validation.d.ts +2 -2
- package/dist/js/modules/fields/password-validation.d.ts.map +1 -1
- package/dist/js/modules/fields/phone-country.d.ts +2 -2
- package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
- package/dist/js/modules/fields/repeater.d.ts +2 -2
- package/dist/js/modules/fields/repeater.d.ts.map +1 -1
- package/dist/js/modules/fields/rich-text.d.ts +2 -2
- package/dist/js/modules/fields/rich-text.d.ts.map +1 -1
- package/dist/js/modules/fields/shared.d.ts +1 -0
- package/dist/js/modules/fields/shared.d.ts.map +1 -1
- package/dist/js/modules/fields/signature.d.ts +2 -2
- package/dist/js/modules/fields/signature.d.ts.map +1 -1
- package/dist/js/modules/fields/summary.d.ts +2 -2
- package/dist/js/modules/fields/summary.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-likert.d.ts +2 -2
- package/dist/js/modules/fields/survey-likert.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-rank.d.ts +2 -2
- package/dist/js/modules/fields/survey-rank.d.ts.map +1 -1
- package/dist/js/modules/fields/survey-rating.d.ts +2 -2
- package/dist/js/modules/fields/survey-rating.d.ts.map +1 -1
- package/dist/js/modules/fields/table.d.ts +2 -2
- package/dist/js/modules/fields/table.d.ts.map +1 -1
- package/dist/js/modules/fields/text-limit.d.ts +2 -2
- package/dist/js/modules/fields/text-limit.d.ts.map +1 -1
- package/dist/js/modules/fields/upload-manager.d.ts +2 -2
- package/dist/js/modules/fields/upload-manager.d.ts.map +1 -1
- package/dist/js/modules/loader.d.ts +10 -4
- package/dist/js/modules/loader.d.ts.map +1 -1
- package/dist/js/modules/payments/bpoint.d.ts +1 -1
- package/dist/js/modules/payments/bpoint.d.ts.map +1 -1
- package/dist/js/modules/payments/eway.d.ts +1 -1
- package/dist/js/modules/payments/eway.d.ts.map +1 -1
- package/dist/js/modules/payments/factories.d.ts +7 -7
- package/dist/js/modules/payments/factories.d.ts.map +1 -1
- package/dist/js/modules/payments/go-cardless.d.ts +1 -1
- package/dist/js/modules/payments/go-cardless.d.ts.map +1 -1
- package/dist/js/modules/payments/index.d.ts +2 -2
- package/dist/js/modules/payments/index.d.ts.map +1 -1
- package/dist/js/modules/payments/mollie.d.ts +1 -1
- package/dist/js/modules/payments/mollie.d.ts.map +1 -1
- package/dist/js/modules/payments/moneris.d.ts +1 -1
- package/dist/js/modules/payments/moneris.d.ts.map +1 -1
- package/dist/js/modules/payments/opayo.d.ts +1 -1
- package/dist/js/modules/payments/opayo.d.ts.map +1 -1
- package/dist/js/modules/payments/paddle.d.ts +1 -1
- package/dist/js/modules/payments/paddle.d.ts.map +1 -1
- package/dist/js/modules/payments/paypal.d.ts +1 -1
- package/dist/js/modules/payments/paypal.d.ts.map +1 -1
- package/dist/js/modules/payments/payway.d.ts +1 -1
- package/dist/js/modules/payments/payway.d.ts.map +1 -1
- package/dist/js/modules/payments/square.d.ts +1 -1
- package/dist/js/modules/payments/square.d.ts.map +1 -1
- package/dist/js/modules/payments/stripe.d.ts +1 -1
- package/dist/js/modules/payments/stripe.d.ts.map +1 -1
- package/dist/js/modules/payments/utils.d.ts +6 -0
- package/dist/js/modules/payments/utils.d.ts.map +1 -1
- package/dist/js/modules/registry.d.ts +6 -4
- package/dist/js/modules/registry.d.ts.map +1 -1
- package/dist/js/submit/pipeline.d.ts.map +1 -1
- package/dist/js/theme/browser-theme-state.generated.d.ts +24 -0
- package/dist/js/theme/browser-theme-state.generated.d.ts.map +1 -0
- package/dist/js/theme/theme-classes.d.ts +3 -3
- package/dist/js/theme/theme-classes.d.ts.map +1 -1
- package/dist/js/transport/forms-api.d.ts +5 -3
- package/dist/js/transport/forms-api.d.ts.map +1 -1
- package/dist/js/utils/country-from-ip.d.ts +2 -2
- package/dist/js/utils/country-from-ip.d.ts.map +1 -1
- package/dist/js/utils/csrf.d.ts +17 -0
- package/dist/js/utils/csrf.d.ts.map +1 -0
- package/dist/js/utils/field-references.parser.d.ts +1 -0
- package/dist/js/utils/field-references.parser.d.ts.map +1 -1
- package/dist/js/utils/field-references.resolver.d.ts.map +1 -1
- package/dist/js/utils/field-references.types.d.ts +1 -0
- package/dist/js/utils/field-references.types.d.ts.map +1 -1
- package/dist/js/utils/http.d.ts +3 -1
- package/dist/js/utils/http.d.ts.map +1 -1
- package/dist/js/utils/request-profile.d.ts +4 -0
- package/dist/js/utils/request-profile.d.ts.map +1 -0
- package/dist/js/utils/unload-warning.d.ts.map +1 -1
- package/dist/js/validation/rules/email.d.ts.map +1 -1
- package/dist/js/validation/rules/match.d.ts.map +1 -1
- package/dist/js/validation/rules/number.d.ts.map +1 -1
- package/dist/js/validation/rules/required.d.ts.map +1 -1
- package/dist/js/validation/rules/shared.d.ts.map +1 -1
- package/dist/js/validation/rules/url.d.ts.map +1 -1
- package/dist/js/validation/skip.d.ts +7 -0
- package/dist/js/validation/skip.d.ts.map +1 -0
- package/dist/js/validation/submit-readiness.d.ts.map +1 -1
- package/dist/js/validation/validator.d.ts.map +1 -1
- package/package.json +43 -12
- package/src/css/formie-base.css +104 -1
- package/src/css/theme/_messages.css +2 -0
- package/src/css/theme/_tokens.css +31 -25
- package/src/css/theme/fields/_signature.css +2 -1
- package/src/css/theme/forms/_form.css +5 -1
- package/src/index.ts +13 -8
- package/src/js/contracts/client.ts +5 -3
- package/src/js/contracts/common.ts +5 -6
- package/src/js/contracts/modules.ts +41 -12
- package/src/js/contracts/schema.ts +21 -43
- package/src/js/contracts/theme.ts +6 -1
- package/src/js/core/client-rendered-modules.ts +69 -0
- package/src/js/core/create-formie-client.ts +119 -73
- package/src/js/core/field-error-aria.ts +93 -0
- package/src/js/core/hydrate-modules.ts +54 -29
- package/src/js/core/submit-result-state.ts +34 -45
- package/src/js/core/submit-result-ui.ts +21 -65
- package/src/js/core/validation-focus.ts +20 -20
- package/src/js/modules/address/address-finder.ts +1 -1
- package/src/js/modules/address/factories.ts +15 -13
- package/src/js/modules/address/google-address.ts +10 -6
- package/src/js/modules/address/index.ts +2 -2
- package/src/js/modules/address/loqate.ts +1 -1
- package/src/js/modules/address/place-kit.ts +1 -1
- package/src/js/modules/captchas/captcha-eu.ts +2 -2
- package/src/js/modules/captchas/factories.ts +66 -42
- package/src/js/modules/captchas/friendly-captcha-v1.ts +12 -2
- package/src/js/modules/captchas/friendly-captcha-v2.ts +4 -2
- package/src/js/modules/captchas/hcaptcha.ts +5 -5
- package/src/js/modules/captchas/index.ts +2 -2
- package/src/js/modules/captchas/recaptcha-enterprise.ts +2 -2
- package/src/js/modules/captchas/recaptcha-v2-checkbox.ts +3 -3
- package/src/js/modules/captchas/recaptcha-v2-invisible.ts +2 -2
- package/src/js/modules/captchas/recaptcha-v3.ts +2 -2
- package/src/js/modules/captchas/snaptcha.ts +1 -1
- package/src/js/modules/captchas/turnstile.ts +3 -3
- package/src/js/modules/fields/address-country.ts +6 -4
- package/src/js/modules/fields/address-state.ts +20 -12
- package/src/js/modules/fields/calculations.ts +5 -3
- package/src/js/modules/fields/checkbox-radio.ts +24 -42
- package/src/js/modules/fields/combobox.ts +25 -9
- package/src/js/modules/fields/conditions/config.ts +17 -20
- package/src/js/modules/fields/conditions/effects.ts +23 -26
- package/src/js/modules/fields/conditions/evaluator.ts +21 -29
- package/src/js/modules/fields/conditions/references.ts +16 -5
- package/src/js/modules/fields/conditions/submission-context.ts +80 -0
- package/src/js/modules/fields/conditions/types.ts +3 -1
- package/src/js/modules/fields/conditions/values.ts +31 -6
- package/src/js/modules/fields/conditions.ts +59 -18
- package/src/js/modules/fields/custom-google-maps.ts +5 -3
- package/src/js/modules/fields/custom-link.ts +5 -3
- package/src/js/modules/fields/custom-maps.ts +5 -3
- package/src/js/modules/fields/date-picker.ts +40 -4
- package/src/js/modules/fields/file-upload.ts +19 -10
- package/src/js/modules/fields/hidden.ts +5 -3
- package/src/js/modules/fields/index.ts +2 -2
- package/src/js/modules/fields/password-validation.ts +5 -3
- package/src/js/modules/fields/phone-country.ts +33 -6
- package/src/js/modules/fields/repeater.ts +5 -3
- package/src/js/modules/fields/rich-text.ts +20 -4
- package/src/js/modules/fields/shared.ts +13 -0
- package/src/js/modules/fields/signature.ts +64 -6
- package/src/js/modules/fields/summary.ts +8 -20
- package/src/js/modules/fields/survey-likert.ts +5 -3
- package/src/js/modules/fields/survey-rank.ts +21 -3
- package/src/js/modules/fields/survey-rating.ts +17 -3
- package/src/js/modules/fields/table.ts +5 -3
- package/src/js/modules/fields/text-limit.ts +5 -3
- package/src/js/modules/fields/upload-manager.ts +190 -49
- package/src/js/modules/loader.ts +345 -281
- package/src/js/modules/payments/bpoint.ts +2 -2
- package/src/js/modules/payments/eway.ts +2 -2
- package/src/js/modules/payments/factories.ts +53 -52
- package/src/js/modules/payments/go-cardless.ts +1 -1
- package/src/js/modules/payments/index.ts +2 -2
- package/src/js/modules/payments/mollie.ts +1 -1
- package/src/js/modules/payments/moneris.ts +2 -2
- package/src/js/modules/payments/opayo.ts +21 -8
- package/src/js/modules/payments/paddle.ts +10 -6
- package/src/js/modules/payments/payment.ts +22 -18
- package/src/js/modules/payments/paypal.ts +1 -1
- package/src/js/modules/payments/payway.ts +2 -2
- package/src/js/modules/payments/square.ts +2 -2
- package/src/js/modules/payments/stripe.ts +5 -5
- package/src/js/modules/payments/utils.ts +14 -0
- package/src/js/modules/registry.ts +19 -11
- package/src/js/submit/pipeline.ts +10 -11
- package/src/js/theme/browser-theme-state.generated.ts +25 -0
- package/src/js/theme/theme-classes.ts +3 -3
- package/src/js/transport/forms-api.ts +66 -67
- package/src/js/utils/country-from-ip.ts +14 -9
- package/src/js/utils/csrf.ts +136 -0
- package/src/js/utils/field-references.parser.ts +13 -113
- package/src/js/utils/field-references.resolver.ts +27 -64
- package/src/js/utils/field-references.row-scope.ts +1 -1
- package/src/js/utils/field-references.types.ts +1 -0
- package/src/js/utils/http.ts +5 -5
- package/src/js/utils/request-profile.ts +10 -0
- package/src/js/utils/unload-warning.ts +12 -4
- package/src/js/validation/rules/email.ts +3 -5
- package/src/js/validation/rules/match.ts +2 -1
- package/src/js/validation/rules/minmax.ts +4 -43
- package/src/js/validation/rules/number.ts +3 -47
- package/src/js/validation/rules/pattern.ts +3 -8
- package/src/js/validation/rules/required.ts +2 -1
- package/src/js/validation/rules/shared.ts +5 -1
- package/src/js/validation/rules/url.ts +3 -10
- package/src/js/validation/skip.ts +9 -0
- package/src/js/validation/submit-readiness.ts +9 -2
- package/src/js/validation/validator.ts +35 -59
- package/dist/chunks/calculations-DERi2xaC.js +0 -299
- package/dist/chunks/conditions-65kBcFWW.js +0 -424
- package/dist/chunks/country-from-ip-BwxKaBuJ.js +0 -26
- package/dist/chunks/field-references.resolver-CHwn0G0L.js +0 -145
- package/dist/chunks/friendly-captcha-v1-C_2reOXr.js +0 -31
- package/dist/chunks/google-address-BH3Zhi06.js +0 -161
- package/dist/chunks/http-D-JExro7.js +0 -27
- package/dist/chunks/opayo-CR0DtsLa.js +0 -179
- package/dist/chunks/rich-text-Bg_--4TG.js +0 -349
- package/dist/js/modules/fields/conditions/transforms.d.ts +0 -3
- package/dist/js/modules/fields/conditions/transforms.d.ts.map +0 -1
- package/src/js/modules/fields/conditions/transforms.ts +0 -206
- package/src/js/modules/payments/stub-payment-module.ts +0 -87
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as e } from "./shared-OKhSay59.js";
|
|
2
2
|
//#region src/js/modules/fields/hidden.ts
|
|
3
3
|
var t = "input[data-formie-hidden-input]";
|
|
4
4
|
function n(e) {
|
|
@@ -10,7 +10,13 @@ function n(e) {
|
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
12
|
var r = {
|
|
13
|
-
|
|
13
|
+
moduleId: "formie:hidden",
|
|
14
|
+
version: 2,
|
|
15
|
+
surfaces: [
|
|
16
|
+
"server-rendered",
|
|
17
|
+
"client-rendered",
|
|
18
|
+
"cp-edit"
|
|
19
|
+
],
|
|
14
20
|
kind: "field",
|
|
15
21
|
match: (e) => !!e.target.querySelector(t),
|
|
16
22
|
setup: async (r) => {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as e } from "./dist-ZLeW0zZ3.js";
|
|
2
|
+
//#region src/js/utils/http.ts
|
|
3
|
+
async function t(t, n = {}) {
|
|
4
|
+
let r = {
|
|
5
|
+
Accept: "application/json",
|
|
6
|
+
...n.headers || {}
|
|
7
|
+
};
|
|
8
|
+
return delete r["X-Requested-With"], delete r["x-requested-with"], e(String(t), {
|
|
9
|
+
method: n.method || "GET",
|
|
10
|
+
body: n.body ?? null,
|
|
11
|
+
signal: n.signal,
|
|
12
|
+
cache: "no-store",
|
|
13
|
+
headers: r
|
|
14
|
+
}, n);
|
|
15
|
+
}
|
|
16
|
+
async function n(e, n = {}) {
|
|
17
|
+
let r = await t(e, n);
|
|
18
|
+
if (!r.ok) throw Error(`Request failed (${r.status}) for ${String(e)}`);
|
|
19
|
+
return r.json();
|
|
20
|
+
}
|
|
21
|
+
async function r(e, n = {}) {
|
|
22
|
+
let r = await t(e, n);
|
|
23
|
+
if (!r.ok) throw Error(`Request failed (${r.status}) for ${String(e)}`);
|
|
24
|
+
return r.text();
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { n, r, t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
1
|
+
import { t as e } from "./rolldown-runtime-DtPi1Y-2.js";
|
|
2
2
|
//#region ../../node_modules/leaflet/dist/leaflet-src.js
|
|
3
3
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
4
|
(function(n, r) {
|
|
@@ -6,8 +6,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
6
6
|
})(e, (function(e) {
|
|
7
7
|
var t = "1.9.4";
|
|
8
8
|
function n(e) {
|
|
9
|
-
var t, n, r, i;
|
|
10
|
-
for (n = 1, r = arguments.length; n < r; n++) for (t in i = arguments[n], i) e[t] = i[t];
|
|
9
|
+
for (var t, n = 1, r = arguments.length, i; n < r; n++) for (t in i = arguments[n], i) e[t] = i[t];
|
|
11
10
|
return e;
|
|
12
11
|
}
|
|
13
12
|
var r = Object.create || (function() {
|
|
@@ -601,8 +600,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
601
600
|
return document.createElementNS("http://www.w3.org/2000/svg", e);
|
|
602
601
|
}
|
|
603
602
|
function ye(e, t) {
|
|
604
|
-
var n = "", r, i, a, o, s, c;
|
|
605
|
-
for (r = 0, a = e.length; r < a; r++) {
|
|
603
|
+
for (var n = "", r = 0, i, a = e.length, o, s, c; r < a; r++) {
|
|
606
604
|
for (s = e[r], i = 0, o = s.length; i < o; i++) c = s[i], n += (i ? "L" : "M") + c.x + " " + c.y;
|
|
607
605
|
n += t ? M.svg ? "z" : "x" : "";
|
|
608
606
|
}
|
|
@@ -729,11 +727,11 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
729
727
|
}
|
|
730
728
|
if (!(e.pointerType === "mouse" || e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {
|
|
731
729
|
var i = on(e);
|
|
732
|
-
if (!
|
|
730
|
+
if (!i.some(function(e) {
|
|
733
731
|
return e instanceof HTMLLabelElement && e.attributes.for;
|
|
734
|
-
})
|
|
732
|
+
}) || i.some(function(e) {
|
|
735
733
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement;
|
|
736
|
-
}))
|
|
734
|
+
})) {
|
|
737
735
|
var a = Date.now();
|
|
738
736
|
a - n <= bt ? (r++, r === 2 && t(yt(e))) : r = 1, n = a;
|
|
739
737
|
}
|
|
@@ -1945,7 +1943,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1945
1943
|
return;
|
|
1946
1944
|
}
|
|
1947
1945
|
var t = e.touches && e.touches.length === 1 ? e.touches[0] : e, n = new x(t.clientX, t.clientY)._subtract(this._startPoint);
|
|
1948
|
-
|
|
1946
|
+
(n.x || n.y) && (Math.abs(n.x) + Math.abs(n.y) < this.options.clickTolerance || (n.x /= this._parentScale.x, n.y /= this._parentScale.y, U(e), this._moved || (this.fire("dragstart"), this._moved = !0, F(document.body, "leaflet-dragging"), this._lastTarget = e.target || e.srcElement, window.SVGElementInstance && this._lastTarget instanceof window.SVGElementInstance && (this._lastTarget = this._lastTarget.correspondingUseElement), F(this._lastTarget, "leaflet-drag-target")), this._newPos = this._startPos.add(n), this._moving = !0, this._lastEvent = e, this._updatePosition()));
|
|
1949
1947
|
}
|
|
1950
1948
|
},
|
|
1951
1949
|
_updatePosition: function() {
|
|
@@ -1965,13 +1963,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1965
1963
|
}
|
|
1966
1964
|
});
|
|
1967
1965
|
function Tn(e, t, n) {
|
|
1968
|
-
var r, i = [
|
|
1966
|
+
for (var r, i = [
|
|
1969
1967
|
1,
|
|
1970
1968
|
4,
|
|
1971
1969
|
2,
|
|
1972
1970
|
8
|
|
1973
|
-
], a, o, s, c, l, u, d, f;
|
|
1974
|
-
for (a = 0, u = e.length; a < u; a++) e[a]._code = Rn(e[a], t);
|
|
1971
|
+
], a = 0, o, s, c, l, u = e.length, d, f; a < u; a++) e[a]._code = Rn(e[a], t);
|
|
1975
1972
|
for (s = 0; s < 4; s++) {
|
|
1976
1973
|
for (d = i[s], r = [], a = 0, u = e.length, o = u - 1; a < u; o = a++) c = e[a], l = e[o], c._code & d ? l._code & d || (f = Ln(l, c, d, t, n), f._code = Rn(f, t), r.push(f)) : (l._code & d && (f = Ln(l, c, d, t, n), f._code = Rn(f, t), r.push(f)), r.push(c));
|
|
1977
1974
|
e = r;
|
|
@@ -2026,8 +2023,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2026
2023
|
return a;
|
|
2027
2024
|
}
|
|
2028
2025
|
function Nn(e, t, n, r, i) {
|
|
2029
|
-
var a = 0, o, s, c;
|
|
2030
|
-
for (s = r + 1; s <= i - 1; s++) c = Bn(e[s], e[r], e[i], !0), c > a && (o = s, a = c);
|
|
2026
|
+
for (var a = 0, o, s = r + 1, c; s <= i - 1; s++) c = Bn(e[s], e[r], e[i], !0), c > a && (o = s, a = c);
|
|
2031
2027
|
a > n && (t[o] = 1, Nn(e, t, n, r, o), Nn(e, t, n, o, i));
|
|
2032
2028
|
}
|
|
2033
2029
|
function Pn(e, t) {
|
|
@@ -2735,13 +2731,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2735
2731
|
},
|
|
2736
2732
|
_clipPoints: function() {
|
|
2737
2733
|
var e = this._renderer._bounds;
|
|
2738
|
-
if (this._parts = [],
|
|
2734
|
+
if (this._parts = [], this._pxBounds && this._pxBounds.intersects(e)) {
|
|
2739
2735
|
if (this.options.noClip) {
|
|
2740
2736
|
this._parts = this._rings;
|
|
2741
2737
|
return;
|
|
2742
2738
|
}
|
|
2743
|
-
var t = this._parts, n, r, i, a, o, s, c;
|
|
2744
|
-
for (n = 0, i = 0, a = this._rings.length; n < a; n++) for (c = this._rings[n], r = 0, o = c.length; r < o - 1; r++) s = In(c[r], c[r + 1], e, r, !0), s && (t[i] = t[i] || [], t[i].push(s[0]), (s[1] !== c[r + 1] || r === o - 2) && (t[i].push(s[1]), i++));
|
|
2739
|
+
for (var t = this._parts, n = 0, r, i = 0, a = this._rings.length, o, s, c; n < a; n++) for (c = this._rings[n], r = 0, o = c.length; r < o - 1; r++) s = In(c[r], c[r + 1], e, r, !0), s && (t[i] = t[i] || [], t[i].push(s[0]), (s[1] !== c[r + 1] || r === o - 2) && (t[i].push(s[1]), i++));
|
|
2745
2740
|
}
|
|
2746
2741
|
},
|
|
2747
2742
|
_simplifyPoints: function() {
|
|
@@ -2756,7 +2751,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2756
2751
|
_containsPoint: function(e, t) {
|
|
2757
2752
|
var n, r, i, a, o, s, c = this._clickTolerance();
|
|
2758
2753
|
if (!this._pxBounds || !this._pxBounds.contains(e)) return !1;
|
|
2759
|
-
for (n = 0, a = this._parts.length; n < a; n++) for (s = this._parts[n], r = 0, o = s.length, i = o - 1; r < o; i = r++) if (
|
|
2754
|
+
for (n = 0, a = this._parts.length; n < a; n++) for (s = this._parts[n], r = 0, o = s.length, i = o - 1; r < o; i = r++) if ((t || r !== 0) && An(e, s[i], s[r]) <= c) return !0;
|
|
2760
2755
|
return !1;
|
|
2761
2756
|
}
|
|
2762
2757
|
});
|
|
@@ -2785,7 +2780,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
2785
2780
|
},
|
|
2786
2781
|
_clipPoints: function() {
|
|
2787
2782
|
var e = this._renderer._bounds, t = this.options.weight, n = new x(t, t);
|
|
2788
|
-
if (e = new C(e.min.subtract(n), e.max.add(n)), this._parts = [],
|
|
2783
|
+
if (e = new C(e.min.subtract(n), e.max.add(n)), this._parts = [], this._pxBounds && this._pxBounds.intersects(e)) {
|
|
2789
2784
|
if (this.options.noClip) {
|
|
2790
2785
|
this._parts = this._rings;
|
|
2791
2786
|
return;
|
|
@@ -3138,10 +3133,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3138
3133
|
if (!t) return !1;
|
|
3139
3134
|
this._source = t;
|
|
3140
3135
|
}
|
|
3141
|
-
if (!e)
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3136
|
+
if (!e) {
|
|
3137
|
+
if (t.getCenter) e = t.getCenter();
|
|
3138
|
+
else if (t.getLatLng) e = t.getLatLng();
|
|
3139
|
+
else if (t.getBounds) e = t.getBounds().getCenter();
|
|
3140
|
+
else throw Error("Unable to get source layer LatLng.");
|
|
3141
|
+
}
|
|
3145
3142
|
return this.setLatLng(e), this._map && this.update(), !0;
|
|
3146
3143
|
},
|
|
3147
3144
|
_updateContent: function() {
|
|
@@ -3286,7 +3283,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3286
3283
|
return this._popup;
|
|
3287
3284
|
},
|
|
3288
3285
|
_openPopup: function(e) {
|
|
3289
|
-
if (
|
|
3286
|
+
if (this._popup && this._map) {
|
|
3290
3287
|
an(e);
|
|
3291
3288
|
var t = e.layer || e.target;
|
|
3292
3289
|
if (this._popup._source === t && !(t instanceof ar)) {
|
|
@@ -3364,7 +3361,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3364
3361
|
return this._tooltip &&= (this._initTooltipInteractions(!0), this.closeTooltip(), null), this;
|
|
3365
3362
|
},
|
|
3366
3363
|
_initTooltipInteractions: function(e) {
|
|
3367
|
-
if (
|
|
3364
|
+
if (e || !this._tooltipHandlersAdded) {
|
|
3368
3365
|
var t = e ? "off" : "on", n = {
|
|
3369
3366
|
remove: this.closeTooltip,
|
|
3370
3367
|
move: this._moveTooltip
|
|
@@ -3404,7 +3401,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3404
3401
|
t && t.setAttribute("aria-describedby", this._tooltip._container.id);
|
|
3405
3402
|
},
|
|
3406
3403
|
_openTooltip: function(e) {
|
|
3407
|
-
if (
|
|
3404
|
+
if (this._tooltip && this._map) {
|
|
3408
3405
|
if (this._map.dragging && this._map.dragging.moving() && !this._openOnceFlag) {
|
|
3409
3406
|
this._openOnceFlag = !0;
|
|
3410
3407
|
var t = this;
|
|
@@ -3529,7 +3526,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3529
3526
|
var e = +/* @__PURE__ */ new Date(), t = !1, n = !1;
|
|
3530
3527
|
for (var r in this._tiles) {
|
|
3531
3528
|
var i = this._tiles[r];
|
|
3532
|
-
if (
|
|
3529
|
+
if (i.current && i.loaded) {
|
|
3533
3530
|
var a = Math.min(1, (e - i.loaded) / 200);
|
|
3534
3531
|
R(i.el, a), a < 1 ? t = !0 : (i.active ? n = !0 : this._onOpaqueTile(i), i.active = !0);
|
|
3535
3532
|
}
|
|
@@ -3581,7 +3578,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3581
3578
|
var i = Math.floor(e / 2), a = Math.floor(t / 2), o = n - 1, s = new x(+i, +a);
|
|
3582
3579
|
s.z = +o;
|
|
3583
3580
|
var c = this._tileCoordsToKey(s), l = this._tiles[c];
|
|
3584
|
-
return l && l.active ? (l.retain = !0, !0) : (l && l.loaded && (l.retain = !0), o > r
|
|
3581
|
+
return l && l.active ? (l.retain = !0, !0) : (l && l.loaded && (l.retain = !0), o > r && this._retainParent(i, a, o, r));
|
|
3585
3582
|
},
|
|
3586
3583
|
_retainChildren: function(e, t, n, r) {
|
|
3587
3584
|
for (var i = 2 * e; i < 2 * e + 2; i++) for (var a = 2 * t; a < 2 * t + 2; a++) {
|
|
@@ -3591,8 +3588,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3591
3588
|
if (c && c.active) {
|
|
3592
3589
|
c.retain = !0;
|
|
3593
3590
|
continue;
|
|
3594
|
-
}
|
|
3595
|
-
n + 1 < r && this._retainChildren(i, a, n + 1, r);
|
|
3591
|
+
}
|
|
3592
|
+
c && c.loaded && (c.retain = !0), n + 1 < r && this._retainChildren(i, a, n + 1, r);
|
|
3596
3593
|
}
|
|
3597
3594
|
},
|
|
3598
3595
|
_resetView: function(e) {
|
|
@@ -3624,7 +3621,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3624
3621
|
i && (this._globalTileRange = this._pxBoundsToTileRange(i)), this._wrapX = t.wrapLng && !this.options.noWrap && [Math.floor(e.project([0, t.wrapLng[0]], r).x / n.x), Math.ceil(e.project([0, t.wrapLng[1]], r).x / n.y)], this._wrapY = t.wrapLat && !this.options.noWrap && [Math.floor(e.project([t.wrapLat[0], 0], r).y / n.x), Math.ceil(e.project([t.wrapLat[1], 0], r).y / n.y)];
|
|
3625
3622
|
},
|
|
3626
3623
|
_onMoveEnd: function() {
|
|
3627
|
-
|
|
3624
|
+
this._map && !this._map._animatingZoom && this._update();
|
|
3628
3625
|
},
|
|
3629
3626
|
_getTiledPixelBounds: function(e) {
|
|
3630
3627
|
var t = this._map, n = t._animatingZoom ? Math.max(t._animateToZoom, t.getZoom()) : t.getZoom(), r = t.getZoomScale(n, this._tileZoom), i = t.project(e, this._tileZoom).floor(), a = t.getSize().divideBy(r * 2);
|
|
@@ -3974,8 +3971,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
3974
3971
|
},
|
|
3975
3972
|
_updateDashArray: function(e) {
|
|
3976
3973
|
if (typeof e.options.dashArray == "string") {
|
|
3977
|
-
var t = e.options.dashArray.split(/[, ]+/), n = [], r, i;
|
|
3978
|
-
for (i = 0; i < t.length; i++) {
|
|
3974
|
+
for (var t = e.options.dashArray.split(/[, ]+/), n = [], r, i = 0; i < t.length; i++) {
|
|
3979
3975
|
if (r = Number(t[i]), isNaN(r)) return;
|
|
3980
3976
|
n.push(r);
|
|
3981
3977
|
}
|
|
@@ -4024,7 +4020,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4024
4020
|
}
|
|
4025
4021
|
},
|
|
4026
4022
|
_updateCircle: function(e) {
|
|
4027
|
-
if (
|
|
4023
|
+
if (this._drawing && !e._empty()) {
|
|
4028
4024
|
var t = e._point, n = this._ctx, r = Math.max(Math.round(e._radius), 1), i = (Math.max(Math.round(e._radiusY), 1) || r) / r;
|
|
4029
4025
|
i !== 1 && (n.save(), n.scale(1, i)), n.beginPath(), n.arc(t.x, t.y / i, r, 0, Math.PI * 2, !1), i !== 1 && n.restore(), this._fillStroke(n, e);
|
|
4030
4026
|
}
|
|
@@ -4034,7 +4030,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4034
4030
|
n.fill && (e.globalAlpha = n.fillOpacity, e.fillStyle = n.fillColor || n.color, e.fill(n.fillRule || "evenodd")), n.stroke && n.weight !== 0 && (e.setLineDash && e.setLineDash(t.options && t.options._dashArray || []), e.globalAlpha = n.opacity, e.lineWidth = n.weight, e.strokeStyle = n.color, e.lineCap = n.lineCap, e.lineJoin = n.lineJoin, e.stroke());
|
|
4035
4031
|
},
|
|
4036
4032
|
_onClick: function(e) {
|
|
4037
|
-
for (var t = this._map.mouseEventToLayerPoint(e), n, r, i = this._drawFirst; i; i = i.next) n = i.layer, n.options.interactive && n._containsPoint(t) && (
|
|
4033
|
+
for (var t = this._map.mouseEventToLayerPoint(e), n, r, i = this._drawFirst; i; i = i.next) n = i.layer, n.options.interactive && n._containsPoint(t) && (e.type !== "click" && e.type !== "preclick" || !this._map._draggableMoved(n)) && (r = n);
|
|
4038
4034
|
this._fireEvent(r ? [r] : !1, e);
|
|
4039
4035
|
},
|
|
4040
4036
|
_onMouseMove: function(e) {
|
|
@@ -4261,7 +4257,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4261
4257
|
}, this);
|
|
4262
4258
|
},
|
|
4263
4259
|
_onMouseUp: function(e) {
|
|
4264
|
-
if (
|
|
4260
|
+
if ((e.which === 1 || e.button === 1) && (this._finish(), this._moved)) {
|
|
4265
4261
|
this._clearDeferredResetState(), this._resetStateTimeout = setTimeout(i(this._resetState, this), 0);
|
|
4266
4262
|
var t = new T(this._map.containerPointToLatLng(this._startPoint), this._map.containerPointToLatLng(this._point));
|
|
4267
4263
|
this._map.fitBounds(t).fire("boxzoomend", { boxZoomBounds: t });
|
|
@@ -4340,7 +4336,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4340
4336
|
return e - (e - t) * this._viscosity;
|
|
4341
4337
|
},
|
|
4342
4338
|
_onPreDragLimit: function() {
|
|
4343
|
-
if (
|
|
4339
|
+
if (this._viscosity && this._offsetLimit) {
|
|
4344
4340
|
var e = this._draggable._newPos.subtract(this._draggable._startPos), t = this._offsetLimit;
|
|
4345
4341
|
e.x < t.min.x && (e.x = this._viscousLimit(e.x, t.min.x)), e.y < t.min.y && (e.y = this._viscousLimit(e.y, t.min.y)), e.x > t.max.x && (e.x = this._viscousLimit(e.x, t.max.x)), e.y > t.max.y && (e.y = this._viscousLimit(e.y, t.max.y)), this._draggable._newPos = this._draggable._startPos.add(e);
|
|
4346
4342
|
}
|
|
@@ -4426,15 +4422,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4426
4422
|
this._focused = !1, this._map.fire("blur");
|
|
4427
4423
|
},
|
|
4428
4424
|
_setPanDelta: function(e) {
|
|
4429
|
-
var t = this._panKeys = {}, n = this.keyCodes, r, i;
|
|
4430
|
-
for (r = 0, i = n.left.length; r < i; r++) t[n.left[r]] = [-1 * e, 0];
|
|
4425
|
+
for (var t = this._panKeys = {}, n = this.keyCodes, r = 0, i = n.left.length; r < i; r++) t[n.left[r]] = [-1 * e, 0];
|
|
4431
4426
|
for (r = 0, i = n.right.length; r < i; r++) t[n.right[r]] = [e, 0];
|
|
4432
4427
|
for (r = 0, i = n.down.length; r < i; r++) t[n.down[r]] = [0, e];
|
|
4433
4428
|
for (r = 0, i = n.up.length; r < i; r++) t[n.up[r]] = [0, -1 * e];
|
|
4434
4429
|
},
|
|
4435
4430
|
_setZoomDelta: function(e) {
|
|
4436
|
-
var t = this._zoomKeys = {}, n = this.keyCodes, r, i;
|
|
4437
|
-
for (r = 0, i = n.zoomIn.length; r < i; r++) t[n.zoomIn[r]] = e;
|
|
4431
|
+
for (var t = this._zoomKeys = {}, n = this.keyCodes, r = 0, i = n.zoomIn.length; r < i; r++) t[n.zoomIn[r]] = e;
|
|
4438
4432
|
for (r = 0, i = n.zoomOut.length; r < i; r++) t[n.zoomOut[r]] = -e;
|
|
4439
4433
|
},
|
|
4440
4434
|
_addHooks: function() {
|
|
@@ -4447,10 +4441,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4447
4441
|
if (!(e.altKey || e.ctrlKey || e.metaKey)) {
|
|
4448
4442
|
var t = e.keyCode, n = this._map, r;
|
|
4449
4443
|
if (t in this._panKeys) {
|
|
4450
|
-
if (!n._panAnim || !n._panAnim._inProgress)
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4444
|
+
if (!n._panAnim || !n._panAnim._inProgress) {
|
|
4445
|
+
if (r = this._panKeys[t], e.shiftKey && (r = S(r).multiplyBy(3)), n.options.maxBounds && (r = n._limitOffset(S(r), n.options.maxBounds)), n.options.worldCopyJump) {
|
|
4446
|
+
var i = n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(r)));
|
|
4447
|
+
n.panTo(i);
|
|
4448
|
+
} else n.panBy(r);
|
|
4449
|
+
}
|
|
4454
4450
|
} else if (t in this._zoomKeys) n.setZoom(n.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[t]);
|
|
4455
4451
|
else if (t === 27 && n._popup && n._popup.options.closeOnEscapeKey) n.closePopup();
|
|
4456
4452
|
else return;
|
|
@@ -4549,7 +4545,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
4549
4545
|
}
|
|
4550
4546
|
},
|
|
4551
4547
|
_onTouchMove: function(e) {
|
|
4552
|
-
if (
|
|
4548
|
+
if (e.touches && e.touches.length === 2 && this._zooming) {
|
|
4553
4549
|
var t = this._map, n = t.mouseEventToContainerPoint(e.touches[0]), r = t.mouseEventToContainerPoint(e.touches[1]), a = n.distanceTo(r) / this._startDist;
|
|
4554
4550
|
if (this._zoom = t.getScaleZoom(a, this._startZoom), !t.options.bounceAtZoomLimits && (this._zoom < t.getMinZoom() && a < 1 || this._zoom > t.getMaxZoom() && a > 1) && (this._zoom = t._limitZoom(this._zoom)), t.options.touchZoom === "center") {
|
|
4555
4551
|
if (this._center = this._startLatLng, a === 1) return;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as e } from "./constants-DVcJAvc5.js";
|
|
2
|
-
import { t } from "./api-
|
|
2
|
+
import { t } from "./api-ghNr2uxX.js";
|
|
3
3
|
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/address/loqate.ts
|
|
5
5
|
var r = "FORMIE_LOQATE_SCRIPT", i = t({
|
|
6
|
-
|
|
6
|
+
moduleId: "formie:loqate",
|
|
7
7
|
load: async () => {
|
|
8
8
|
await n("pca", {
|
|
9
9
|
id: r,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as e } from "./event-names-BCI2FLD8.js";
|
|
2
|
-
import { t } from "./api-
|
|
2
|
+
import { t } from "./api-D6kJ7kXZ.js";
|
|
3
3
|
//#region src/js/modules/payments/mollie.ts
|
|
4
4
|
var n = e("mollie", "redirect"), r = t({
|
|
5
|
-
|
|
5
|
+
moduleId: "formie:mollie",
|
|
6
6
|
defaultRequiredInputSuffixes: [],
|
|
7
7
|
load: async () => null,
|
|
8
8
|
setup: async ({ services: e, root: t }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./api-
|
|
1
|
+
import { t as e } from "./api-D6kJ7kXZ.js";
|
|
2
2
|
//#region src/js/modules/payments/moneris.ts
|
|
3
3
|
var t = {
|
|
4
4
|
940: "Invalid profile ID (tokenization request).",
|
|
@@ -66,10 +66,10 @@ var t = {
|
|
|
66
66
|
error: ""
|
|
67
67
|
};
|
|
68
68
|
}, r = e({
|
|
69
|
-
|
|
69
|
+
moduleId: "formie:moneris",
|
|
70
70
|
defaultRequiredInputSuffixes: ["monerisTokenId"],
|
|
71
71
|
load: async () => null,
|
|
72
|
-
|
|
72
|
+
onBeforePayment: async (e) => {
|
|
73
73
|
let { field: t, services: r, options: i } = e, a = t, o = (i.provider.endpointUrl || "").trim(), s = t.querySelector("[data-formie-moneris-frame]"), c = "";
|
|
74
74
|
try {
|
|
75
75
|
c = new URL(o, window.location.origin).origin;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { t as e } from "./request-profile-DhwkeCpS.js";
|
|
2
|
+
import { t } from "./dist-ZLeW0zZ3.js";
|
|
3
|
+
import { s as n } from "./event-names-BCI2FLD8.js";
|
|
4
|
+
import { t as r } from "./api-D6kJ7kXZ.js";
|
|
5
|
+
import { t as i } from "./debug-BV0DvdHx.js";
|
|
6
|
+
import { a } from "./theme-classes-DAQuEqdP.js";
|
|
7
|
+
import { t as o } from "./csrf-DxHg_ZYt.js";
|
|
8
|
+
import { r as s } from "./scripts-CbQ7agX3.js";
|
|
9
|
+
import { t as c } from "./styles-BfoIZwJp.js";
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/js/modules/payments/opayo.ts
|
|
12
|
+
c("opayo", ["@layer formie-theme{.formie-opayo-drop-in{box-sizing:border-box;width:100%;min-height:10rem}}"]);
|
|
13
|
+
var l = "FORMIE_OPAYO_SCRIPT", u = "https://live.opayo.eu.elavon.com/api/v1/js/sagepay.js", d = "https://sandbox.opayo.eu.elavon.com/api/v1/js/sagepay.js", f = "[data-formie-opayo-drop-in]", p = i("payments", "opayo"), m = n("opayo", "challenge"), h = "formie:payment:opayo:challenge:response";
|
|
14
|
+
function g(e) {
|
|
15
|
+
return e.checkoutMode === "dropIn";
|
|
16
|
+
}
|
|
17
|
+
async function _(n) {
|
|
18
|
+
let { form: r, handle: i, sessionToken: a, services: s } = n, c = new FormData();
|
|
19
|
+
o(c, r), c.set("action", "formie/payment-sessions/initialize"), c.append("handle", i), c.append("sessionToken", a);
|
|
20
|
+
try {
|
|
21
|
+
let i = await t(n.sessionEndpoint || r.action, {
|
|
22
|
+
method: "POST",
|
|
23
|
+
body: c
|
|
24
|
+
}, e(r));
|
|
25
|
+
return i.status < 200 || i.status >= 300 ? (s.addError(`${i.status}: ${i.statusText}`), p.warn("Merchant session request failed.", {
|
|
26
|
+
status: i.status,
|
|
27
|
+
statusText: i.statusText
|
|
28
|
+
}), null) : (await i.json()).merchantSessionKey || (s.addError("Unable to get merchant session."), p.warn("merchantSessionKey missing in session response."), null);
|
|
29
|
+
} catch {
|
|
30
|
+
return s.addError("Network error. Please try again."), p.warn("Network error requesting merchant session."), null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function v(e) {
|
|
34
|
+
return e.id ||= `formie-opayo-drop-in-${Math.random().toString(36).slice(2, 9)}`, e.id;
|
|
35
|
+
}
|
|
36
|
+
var y = r({
|
|
37
|
+
moduleId: "formie:opayo",
|
|
38
|
+
defaultRequiredInputSuffixes: ["opayoTokenId"],
|
|
39
|
+
load: async (e) => {
|
|
40
|
+
let { provider: t } = e.options, n = t.useSandbox ? d : u, r = g(t) ? "sagepayCheckout" : "sagepayOwnForm";
|
|
41
|
+
return await s(r, {
|
|
42
|
+
id: l,
|
|
43
|
+
src: n,
|
|
44
|
+
timeoutMs: 1e4
|
|
45
|
+
}), null;
|
|
46
|
+
},
|
|
47
|
+
mount: async ({ field: e, services: t, provider: n }) => {
|
|
48
|
+
if (!g(n)) return null;
|
|
49
|
+
let r = t.form, i = window.sagepayCheckout, a = e.querySelector(f);
|
|
50
|
+
if (!r?.action) return t.addError("Form action is missing."), p.warn("Missing form action before drop-in mount."), null;
|
|
51
|
+
if (!i) return t.addError("Opayo script failed to load."), p.warn("sagepayCheckout global not available."), null;
|
|
52
|
+
if (!a) return t.addError("Opayo drop-in container is missing."), p.warn("Drop-in container not found in payment field."), null;
|
|
53
|
+
let o = n.handle || "opayo", s = await _({
|
|
54
|
+
form: r,
|
|
55
|
+
handle: o,
|
|
56
|
+
sessionToken: n.sessionToken || "",
|
|
57
|
+
sessionEndpoint: n.sessionEndpoint,
|
|
58
|
+
services: t
|
|
59
|
+
});
|
|
60
|
+
if (!s) return null;
|
|
61
|
+
let c = v(a), l = {
|
|
62
|
+
checkout: null,
|
|
63
|
+
merchantSessionKey: s,
|
|
64
|
+
pendingAuthorize: null,
|
|
65
|
+
retriedTokenise: !1
|
|
66
|
+
};
|
|
67
|
+
return l.checkout = i({
|
|
68
|
+
merchantSessionKey: s,
|
|
69
|
+
containerSelector: `#${c}`,
|
|
70
|
+
onTokenise: (e) => {
|
|
71
|
+
let i = l.pendingAuthorize;
|
|
72
|
+
if (l.pendingAuthorize = null, !i) {
|
|
73
|
+
p.warn("Drop-in tokenisation completed without a pending authorize step.");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (e.success && e.cardIdentifier) {
|
|
77
|
+
t.updateInputs("opayoTokenId", e.cardIdentifier), t.updateInputs("opayoSessionKey", l.merchantSessionKey), p.log("Drop-in tokenization succeeded.", { hasCardIdentifier: !!e.cardIdentifier }), i(!0);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (!l.retriedTokenise) {
|
|
81
|
+
l.retriedTokenise = !0, _({
|
|
82
|
+
form: r,
|
|
83
|
+
handle: o,
|
|
84
|
+
sessionToken: n.sessionToken || "",
|
|
85
|
+
sessionEndpoint: n.sessionEndpoint,
|
|
86
|
+
services: t
|
|
87
|
+
}).then((n) => {
|
|
88
|
+
if (!n) {
|
|
89
|
+
t.addError(e.errors?.[0]?.message || "Tokenization failed."), p.warn("Drop-in tokenization failed after session refresh.", e), i(!1);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
l.merchantSessionKey = n, l.pendingAuthorize = i, l.checkout.tokenise({ newMerchantSessionKey: n });
|
|
93
|
+
});
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
t.addError(e.errors?.[0]?.message || "Tokenization failed."), p.warn("Drop-in tokenization failed.", e), i(!1);
|
|
97
|
+
}
|
|
98
|
+
}), p.log("Drop-in checkout mounted.", { containerId: c }), l;
|
|
99
|
+
},
|
|
100
|
+
unmount: async ({ widget: e }) => {
|
|
101
|
+
e?.checkout?.destroy?.();
|
|
102
|
+
},
|
|
103
|
+
onBeforePayment: async (e) => {
|
|
104
|
+
let { field: t, services: n, options: r, provider: i, widget: a } = e, o = i.handle || "opayo", s = n.form;
|
|
105
|
+
if (!s?.action) return n.addError("Form action is missing."), p.warn("Missing form action before authorize."), !1;
|
|
106
|
+
if (g(i)) return a ? (a.retriedTokenise = !1, new Promise((e) => {
|
|
107
|
+
a.pendingAuthorize = e, a.checkout.tokenise();
|
|
108
|
+
})) : (n.addError("Opayo drop-in checkout is not ready."), p.warn("Drop-in authorize requested before widget mount."), !1);
|
|
109
|
+
let c = window.sagepayOwnForm;
|
|
110
|
+
if (!c) return n.addError("Opayo script failed to load."), p.warn("sagepayOwnForm global not available."), !1;
|
|
111
|
+
let l = t.querySelector("[data-opayo-card=\"cardholder-name\"]")?.value ?? "", u = t.querySelector("[data-opayo-card=\"card-number\"]")?.value ?? "", d = t.querySelector("[data-opayo-card=\"expiry-date\"]")?.value ?? "", f = t.querySelector("[data-opayo-card=\"security-code\"]")?.value ?? "";
|
|
112
|
+
u = u.replace(/[\s/]/g, ""), d = d.replace(/[\s/]/g, "");
|
|
113
|
+
let m = await _({
|
|
114
|
+
form: s,
|
|
115
|
+
handle: o,
|
|
116
|
+
sessionToken: i.sessionToken || "",
|
|
117
|
+
sessionEndpoint: i.sessionEndpoint,
|
|
118
|
+
services: n
|
|
119
|
+
});
|
|
120
|
+
return m ? new Promise((e) => {
|
|
121
|
+
c({ merchantSessionKey: m }).tokeniseCardDetails({
|
|
122
|
+
cardDetails: {
|
|
123
|
+
cardholderName: l,
|
|
124
|
+
cardNumber: u,
|
|
125
|
+
expiryDate: d,
|
|
126
|
+
securityCode: f
|
|
127
|
+
},
|
|
128
|
+
onTokenised: (t) => {
|
|
129
|
+
t.success && t.cardIdentifier ? (n.updateInputs("opayoTokenId", t.cardIdentifier), n.updateInputs("opayoSessionKey", m), p.log("Tokenization succeeded.", { hasCardIdentifier: !!t.cardIdentifier }), e(!0)) : (n.addError(t.errors?.[0]?.message || "Tokenization failed."), p.warn("Tokenization failed.", t), e(!1));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}) : !1;
|
|
133
|
+
},
|
|
134
|
+
setup: async (e) => {
|
|
135
|
+
let { services: t } = e;
|
|
136
|
+
e.target;
|
|
137
|
+
let n = null, r = !1, i = () => {
|
|
138
|
+
n?.parentNode && n.parentNode.removeChild(n), n = null;
|
|
139
|
+
}, o = t.events.onForm(m, ((e) => {
|
|
140
|
+
let o = e.detail?.data;
|
|
141
|
+
if (!o?.acsUrl || !o?.creq) return;
|
|
142
|
+
r = !1, p.log("Received payment challenge event.", {
|
|
143
|
+
hasAcsUrl: !!o.acsUrl,
|
|
144
|
+
hasCreq: !!o.creq
|
|
145
|
+
});
|
|
146
|
+
let s = t.form, c = s?.querySelector("input[name*=\"opayoSessionKey\"]")?.value || "", l = document.createElement("div");
|
|
147
|
+
l.className = "formie-modal", l.id = `formie-opayo-dialog-${Math.random().toString(36).slice(2, 9)}`, l.innerHTML = "\n <div class=\"formie-modal-backdrop\" data-dialog-close></div>\n <div class=\"formie-modal-content\">\n <div data-formie-opayo-loading style=\"--formie-loading-width: 3rem; --formie-loading-height: 3rem; top: 50%; margin-top: -1.5rem;\"></div>\n <iframe width=\"100%\" height=\"100%\" style=\"width: 100%; height: 100%; position: relative; z-index: 1;\"></iframe>\n </div>\n ";
|
|
148
|
+
let u = l.querySelector("[data-formie-opayo-loading]");
|
|
149
|
+
u && a(u, s, "loading", !0);
|
|
150
|
+
let d = l.querySelector("iframe"), f = (e) => e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<"), m = o.returnUrl || o.redirectUrl || "", h = `<form action="${f(o.acsUrl)}" method="post">
|
|
151
|
+
<input type="hidden" name="creq" value="${f(o.creq || "")}" />
|
|
152
|
+
<input type="hidden" name="threeDSSessionData" value="${f(o.threeDSSessionData || "")}" />
|
|
153
|
+
<input type="hidden" name="MD" value="${f(c)}" />
|
|
154
|
+
<input type="hidden" name="TermUrl" value="${f(m)}" />
|
|
155
|
+
<input type="hidden" name="ThreeDSNotificationURL" value="${f(m)}" />
|
|
156
|
+
</form><script>document.forms[0].submit();<\/script>`;
|
|
157
|
+
i(), document.body.appendChild(l), n = l, d?.contentWindow && (d.contentWindow.document.open(), d.contentWindow.document.write(h), d.contentWindow.document.close());
|
|
158
|
+
})), s = (e) => {
|
|
159
|
+
if (e.data?.message === h) {
|
|
160
|
+
if (!n) {
|
|
161
|
+
p.log("Ignoring 3DS response without active dialog.");
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (r) {
|
|
165
|
+
p.warn("Ignoring duplicate 3DS response while processing.");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (r = !0, p.log("Received payment challenge response message.", e.data?.value), i(), t.removeError(), e.data?.value?.error) {
|
|
169
|
+
t.addError(e.data.value.error.message), t.releaseSubmitLoading(), r = !1;
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
t.updateInputs("opayo3DSComplete", e.data.value?.transactionId ?? ""), t.triggerSubmit();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
return window.addEventListener("message", s), { destroy: () => {
|
|
176
|
+
o(), window.removeEventListener("message", s), i(), r = !1;
|
|
177
|
+
} };
|
|
178
|
+
},
|
|
179
|
+
onAfterSubmit: async ({ services: e }) => {
|
|
180
|
+
e.updateInputs([
|
|
181
|
+
"opayoTokenId",
|
|
182
|
+
"opayoSessionKey",
|
|
183
|
+
"opayo3DSComplete"
|
|
184
|
+
], "");
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
//#endregion
|
|
188
|
+
export { y as opayoModule };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { s as e } from "./event-names-BCI2FLD8.js";
|
|
2
|
-
import { t } from "./api-
|
|
2
|
+
import { t } from "./api-D6kJ7kXZ.js";
|
|
3
3
|
import { r as n } from "./scripts-CbQ7agX3.js";
|
|
4
4
|
//#region src/js/modules/payments/paddle.ts
|
|
5
5
|
var r = "FORMIE_PADDLE_SCRIPT", i = e("paddle", "initialize"), a = t({
|
|
6
|
-
|
|
6
|
+
moduleId: "formie:paddle",
|
|
7
7
|
defaultRequiredInputSuffixes: ["paddleCheckoutData"],
|
|
8
8
|
load: async () => null,
|
|
9
9
|
setup: async (e) => {
|
|
@@ -33,7 +33,7 @@ var r = "FORMIE_PADDLE_SCRIPT", i = e("paddle", "initialize"), a = t({
|
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
let c = (e) => {
|
|
36
|
-
if (!e?.
|
|
36
|
+
if (!e?.transactionId) return t.addError("Missing Paddle checkout transaction."), !1;
|
|
37
37
|
try {
|
|
38
38
|
t.releaseSubmitLoading(), s.Checkout.open(e);
|
|
39
39
|
} catch (e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as r } from "./
|
|
1
|
+
import { p as e } from "./dist-ZLeW0zZ3.js";
|
|
2
|
+
import { a as t, l as n, u as r } from "./shared-OKhSay59.js";
|
|
3
3
|
//#region src/js/modules/fields/password-validation.ts
|
|
4
4
|
var i = "input[data-formie-password-input]", a = [
|
|
5
5
|
"passwordMinLength",
|
|
@@ -19,23 +19,29 @@ function l(e) {
|
|
|
19
19
|
function u(e) {
|
|
20
20
|
return e.value === "";
|
|
21
21
|
}
|
|
22
|
-
function d(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (!s(
|
|
26
|
-
let
|
|
27
|
-
return !
|
|
22
|
+
function d(t) {
|
|
23
|
+
r(t, o, (t) => {
|
|
24
|
+
t.addValidator("passwordMinLength", ({ input: t }) => {
|
|
25
|
+
if (!s(t)) return !0;
|
|
26
|
+
let n = c(t);
|
|
27
|
+
return !n || u(t) ? !0 : e(t.value).graphemeCount >= n;
|
|
28
28
|
}, ({ label: e, input: t, t: n }) => t.getAttribute("data-formie-validation-min-characters-message") || n("{label} must be no less than {min} characters.", {
|
|
29
29
|
label: e,
|
|
30
30
|
min: t.getAttribute("data-formie-password-min-length") || ""
|
|
31
|
-
})),
|
|
31
|
+
})), t.addValidator("passwordUppercase", ({ input: e }) => !s(e) || !e.hasAttribute("data-formie-password-require-uppercase") || u(e) ? !0 : /[A-Z]/.test(e.value), ({ label: e, input: t, t: n }) => t.getAttribute("data-formie-validation-password-uppercase-message") || n("{label} must contain at least one uppercase letter.", { label: e })), t.addValidator("passwordLowercase", ({ input: e }) => !s(e) || !e.hasAttribute("data-formie-password-require-lowercase") || u(e) ? !0 : /[a-z]/.test(e.value), ({ label: e, input: t, t: n }) => t.getAttribute("data-formie-validation-password-lowercase-message") || n("{label} must contain at least one lowercase letter.", { label: e })), t.addValidator("passwordSpecialCharacter", ({ input: e }) => !s(e) || !e.hasAttribute("data-formie-password-require-special-character") || u(e) ? !0 : /[^a-zA-Z0-9]/.test(e.value), ({ label: e, input: t, t: n }) => t.getAttribute("data-formie-validation-password-special-character-message") || n("{label} must contain at least one special character.", { label: e }));
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function f(
|
|
35
|
-
e
|
|
34
|
+
function f(e) {
|
|
35
|
+
n(e, o, a);
|
|
36
36
|
}
|
|
37
37
|
var p = {
|
|
38
|
-
|
|
38
|
+
moduleId: "formie:password-validation",
|
|
39
|
+
version: 2,
|
|
40
|
+
surfaces: [
|
|
41
|
+
"server-rendered",
|
|
42
|
+
"client-rendered",
|
|
43
|
+
"cp-edit"
|
|
44
|
+
],
|
|
39
45
|
kind: "field",
|
|
40
46
|
match: (e) => !!e.target.querySelector(`${i}[data-formie-password-min-length], ${i}[data-formie-password-require-uppercase], ${i}[data-formie-password-require-lowercase], ${i}[data-formie-password-require-special-character]`),
|
|
41
47
|
setup: async (e) => {
|