@verbb/formie-browser 1.0.1 → 1.0.3
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 +16 -0
- package/dist/chunks/address-finder-BjMuEiwF.js +37 -0
- package/dist/chunks/bpoint-KudsBCo2.js +26 -0
- package/dist/chunks/calculations-DlGSkQ3W.js +147 -0
- package/dist/chunks/captcha-eu-CterYFok.js +34 -0
- package/dist/chunks/checkbox-radio-CBvgk3hR.js +136 -0
- package/dist/chunks/conditions-DYy1-Hwt.js +459 -0
- package/dist/chunks/date-picker-BlD--zfe.js +4994 -0
- package/dist/chunks/eway-qwc-B5Us.js +74 -0
- package/dist/chunks/file-upload-CIgHrXfp.js +316 -0
- package/dist/chunks/friendly-captcha-v1-EDFac33c.js +33 -0
- package/dist/chunks/friendly-captcha-v2-BDpSvFGR.js +38 -0
- package/dist/chunks/go-cardless-DuDMVsnz.js +24 -0
- package/dist/chunks/google-address-Bmjp01pH.js +181 -0
- package/dist/chunks/hcaptcha-BTQ6An6g.js +56 -0
- package/dist/chunks/hidden-DbPdOxKb.js +31 -0
- package/dist/chunks/index-BEsfee-D.js +1839 -0
- package/dist/chunks/index-BP7Unm5Y.js +863 -0
- package/dist/chunks/index-BcqwpPNE.js +4314 -0
- package/dist/chunks/loqate-BdNGv93o.js +55 -0
- package/dist/chunks/mollie-DFOjTuGX.js +24 -0
- package/dist/chunks/moneris-BbFfl-EL.js +101 -0
- package/dist/chunks/opayo-CmgYa9ya.js +122 -0
- package/dist/chunks/paddle-BUi7w1_o.js +60 -0
- package/dist/chunks/paypal-A-ePfh6k.js +100 -0
- package/dist/chunks/payway-BqFCbhyo.js +56 -0
- package/dist/chunks/phone-country-DPMiqk4L.js +3765 -0
- package/dist/chunks/place-kit-CX7tamAg.js +42 -0
- package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
- package/dist/chunks/recaptcha-enterprise-DxF6cW95.js +71 -0
- package/dist/chunks/recaptcha-shared-DhGcbiaq.js +15 -0
- package/dist/chunks/recaptcha-v2-checkbox-R9EfbZ4k.js +41 -0
- package/dist/chunks/recaptcha-v2-invisible-DV9hswAp.js +59 -0
- package/dist/chunks/recaptcha-v3-V0xc-Edh.js +28 -0
- package/dist/chunks/repeater-DKUT6TGI.js +124 -0
- package/dist/chunks/rich-text-SH7KiaKH.js +304 -0
- package/dist/chunks/scripts-D9N2d5rN.js +36 -0
- package/dist/chunks/sdk-3SicTWby.js +1559 -0
- package/dist/chunks/shared-BmntPmnW.js +80 -0
- package/dist/chunks/signature-BA3tQsGT.js +550 -0
- package/dist/chunks/snaptcha-DV7p6J9k.js +8 -0
- package/dist/chunks/square-Bs-ndqYK.js +46 -0
- package/dist/chunks/stripe-DkZAHxtn.js +202 -0
- package/dist/chunks/styles-C3aqgtek.js +21 -0
- package/dist/chunks/summary-Dq2i9TQk.js +126 -0
- package/dist/chunks/table-Cu4WfVcw.js +95 -0
- package/dist/chunks/text-limit-2ycmB-Ae.js +135 -0
- package/dist/chunks/turnstile-CId90tRr.js +59 -0
- package/dist/chunks/utils-BntI3W4S.js +6149 -0
- package/dist/css/theme/forms/_form.css +28 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -3205
- package/dist/js/compatibility/dom-adapter.d.ts +12 -0
- package/dist/js/compatibility/dom-adapter.d.ts.map +1 -0
- package/dist/js/compatibility/event-map.d.ts +25 -0
- package/dist/js/compatibility/event-map.d.ts.map +1 -0
- package/dist/js/compatibility/validator-adapter.d.ts +17 -0
- package/dist/js/compatibility/validator-adapter.d.ts.map +1 -0
- package/dist/js/contracts/client.d.ts +40 -0
- package/dist/js/contracts/client.d.ts.map +1 -0
- package/dist/js/contracts/common.d.ts +5 -0
- package/dist/js/contracts/common.d.ts.map +1 -0
- package/dist/js/contracts/modules.d.ts +47 -0
- package/dist/js/contracts/modules.d.ts.map +1 -0
- package/dist/js/contracts/schema.d.ts +79 -0
- package/dist/js/contracts/schema.d.ts.map +1 -0
- package/dist/js/contracts/theme.d.ts +2 -0
- package/dist/js/contracts/theme.d.ts.map +1 -0
- package/dist/js/core/create-formie-client.d.ts +3 -0
- package/dist/js/core/create-formie-client.d.ts.map +1 -0
- package/dist/js/core/dom-events.d.ts +2 -0
- package/dist/js/core/dom-events.d.ts.map +1 -0
- package/dist/js/core/formie.d.ts +27 -0
- package/dist/js/core/formie.d.ts.map +1 -0
- package/dist/js/core/hydrate-modules.d.ts +22 -0
- package/dist/js/core/hydrate-modules.d.ts.map +1 -0
- package/dist/js/core/page-client-event.d.ts +9 -0
- package/dist/js/core/page-client-event.d.ts.map +1 -0
- package/dist/js/core/page-tab-errors.d.ts +2 -0
- package/dist/js/core/page-tab-errors.d.ts.map +1 -0
- package/dist/js/core/submit-flow.d.ts +21 -0
- package/dist/js/core/submit-flow.d.ts.map +1 -0
- package/dist/js/core/submit-result-state.d.ts +8 -0
- package/dist/js/core/submit-result-state.d.ts.map +1 -0
- package/dist/js/core/submit-result-ui.d.ts +10 -0
- package/dist/js/core/submit-result-ui.d.ts.map +1 -0
- package/dist/js/events/event-bus.d.ts +21 -0
- package/dist/js/events/event-bus.d.ts.map +1 -0
- package/dist/js/modules/address/address-finder.d.ts +2 -0
- package/dist/js/modules/address/address-finder.d.ts.map +1 -0
- package/dist/js/modules/address/api.d.ts +8 -0
- package/dist/js/modules/address/api.d.ts.map +1 -0
- package/dist/js/modules/address/constants.d.ts +15 -0
- package/dist/js/modules/address/constants.d.ts.map +1 -0
- package/dist/js/modules/address/factories.d.ts +35 -0
- package/dist/js/modules/address/factories.d.ts.map +1 -0
- package/dist/js/modules/address/google-address.d.ts +9 -0
- package/dist/js/modules/address/google-address.d.ts.map +1 -0
- package/dist/js/modules/address/host.d.ts +30 -0
- package/dist/js/modules/address/host.d.ts.map +1 -0
- package/dist/js/modules/address/index.d.ts +3 -0
- package/dist/js/modules/address/index.d.ts.map +1 -0
- package/dist/js/modules/address/loqate.d.ts +2 -0
- package/dist/js/modules/address/loqate.d.ts.map +1 -0
- package/dist/js/modules/address/place-kit.d.ts +2 -0
- package/dist/js/modules/address/place-kit.d.ts.map +1 -0
- package/dist/js/modules/captchas/api.d.ts +9 -0
- package/dist/js/modules/captchas/api.d.ts.map +1 -0
- package/dist/js/modules/captchas/captcha-eu.d.ts +2 -0
- package/dist/js/modules/captchas/captcha-eu.d.ts.map +1 -0
- package/dist/js/modules/captchas/constants.d.ts +5 -0
- package/dist/js/modules/captchas/constants.d.ts.map +1 -0
- package/dist/js/modules/captchas/factories.d.ts +63 -0
- package/dist/js/modules/captchas/factories.d.ts.map +1 -0
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts +2 -0
- package/dist/js/modules/captchas/friendly-captcha-v1.d.ts.map +1 -0
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts +2 -0
- package/dist/js/modules/captchas/friendly-captcha-v2.d.ts.map +1 -0
- package/dist/js/modules/captchas/hcaptcha.d.ts +2 -0
- package/dist/js/modules/captchas/hcaptcha.d.ts.map +1 -0
- package/dist/js/modules/captchas/host.d.ts +78 -0
- package/dist/js/modules/captchas/host.d.ts.map +1 -0
- package/dist/js/modules/captchas/index.d.ts +3 -0
- package/dist/js/modules/captchas/index.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-enterprise.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-shared.d.ts +26 -0
- package/dist/js/modules/captchas/recaptcha-shared.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-v2-checkbox.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-v2-invisible.d.ts.map +1 -0
- package/dist/js/modules/captchas/recaptcha-v3.d.ts +2 -0
- package/dist/js/modules/captchas/recaptcha-v3.d.ts.map +1 -0
- package/dist/js/modules/captchas/snaptcha.d.ts +2 -0
- package/dist/js/modules/captchas/snaptcha.d.ts.map +1 -0
- package/dist/js/modules/captchas/turnstile.d.ts +2 -0
- package/dist/js/modules/captchas/turnstile.d.ts.map +1 -0
- package/dist/js/modules/captchas/utils.d.ts +13 -0
- package/dist/js/modules/captchas/utils.d.ts.map +1 -0
- package/dist/js/modules/fields/calculations.d.ts +3 -0
- package/dist/js/modules/fields/calculations.d.ts.map +1 -0
- package/dist/js/modules/fields/checkbox-radio.d.ts +3 -0
- package/dist/js/modules/fields/checkbox-radio.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/config.d.ts +5 -0
- package/dist/js/modules/fields/conditions/config.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/effects.d.ts +4 -0
- package/dist/js/modules/fields/conditions/effects.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/evaluator.d.ts +6 -0
- package/dist/js/modules/fields/conditions/evaluator.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/references.d.ts +5 -0
- package/dist/js/modules/fields/conditions/references.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/transforms.d.ts +3 -0
- package/dist/js/modules/fields/conditions/transforms.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/types.d.ts +30 -0
- package/dist/js/modules/fields/conditions/types.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions/values.d.ts +5 -0
- package/dist/js/modules/fields/conditions/values.d.ts.map +1 -0
- package/dist/js/modules/fields/conditions.d.ts +3 -0
- package/dist/js/modules/fields/conditions.d.ts.map +1 -0
- package/dist/js/modules/fields/date-picker.d.ts +3 -0
- package/dist/js/modules/fields/date-picker.d.ts.map +1 -0
- package/dist/js/modules/fields/file-upload.d.ts +3 -0
- package/dist/js/modules/fields/file-upload.d.ts.map +1 -0
- package/dist/js/modules/fields/hidden.d.ts +3 -0
- package/dist/js/modules/fields/hidden.d.ts.map +1 -0
- package/dist/js/modules/fields/index.d.ts +3 -0
- package/dist/js/modules/fields/index.d.ts.map +1 -0
- package/dist/js/modules/fields/phone-country.d.ts +3 -0
- package/dist/js/modules/fields/phone-country.d.ts.map +1 -0
- package/dist/js/modules/fields/repeater.d.ts +3 -0
- package/dist/js/modules/fields/repeater.d.ts.map +1 -0
- package/dist/js/modules/fields/rich-text.d.ts +3 -0
- package/dist/js/modules/fields/rich-text.d.ts.map +1 -0
- package/dist/js/modules/fields/shared.d.ts +20 -0
- package/dist/js/modules/fields/shared.d.ts.map +1 -0
- package/dist/js/modules/fields/signature.d.ts +3 -0
- package/dist/js/modules/fields/signature.d.ts.map +1 -0
- package/dist/js/modules/fields/summary.d.ts +3 -0
- package/dist/js/modules/fields/summary.d.ts.map +1 -0
- package/dist/js/modules/fields/table.d.ts +3 -0
- package/dist/js/modules/fields/table.d.ts.map +1 -0
- package/dist/js/modules/fields/text-limit.d.ts +3 -0
- package/dist/js/modules/fields/text-limit.d.ts.map +1 -0
- package/dist/js/modules/loader.d.ts +11 -0
- package/dist/js/modules/loader.d.ts.map +1 -0
- package/dist/js/modules/payments/api.d.ts +8 -0
- package/dist/js/modules/payments/api.d.ts.map +1 -0
- package/dist/js/modules/payments/bpoint.d.ts +2 -0
- package/dist/js/modules/payments/bpoint.d.ts.map +1 -0
- package/dist/js/modules/payments/constants.d.ts +5 -0
- package/dist/js/modules/payments/constants.d.ts.map +1 -0
- package/dist/js/modules/payments/eway.d.ts +9 -0
- package/dist/js/modules/payments/eway.d.ts.map +1 -0
- package/dist/js/modules/payments/factories.d.ts +54 -0
- package/dist/js/modules/payments/factories.d.ts.map +1 -0
- package/dist/js/modules/payments/go-cardless.d.ts +2 -0
- package/dist/js/modules/payments/go-cardless.d.ts.map +1 -0
- package/dist/js/modules/payments/host.d.ts +70 -0
- package/dist/js/modules/payments/host.d.ts.map +1 -0
- package/dist/js/modules/payments/index.d.ts +3 -0
- package/dist/js/modules/payments/index.d.ts.map +1 -0
- package/dist/js/modules/payments/mollie.d.ts +2 -0
- package/dist/js/modules/payments/mollie.d.ts.map +1 -0
- package/dist/js/modules/payments/moneris.d.ts +2 -0
- package/dist/js/modules/payments/moneris.d.ts.map +1 -0
- package/dist/js/modules/payments/opayo.d.ts +25 -0
- package/dist/js/modules/payments/opayo.d.ts.map +1 -0
- package/dist/js/modules/payments/paddle.d.ts +2 -0
- package/dist/js/modules/payments/paddle.d.ts.map +1 -0
- package/dist/js/modules/payments/paypal.d.ts +2 -0
- package/dist/js/modules/payments/paypal.d.ts.map +1 -0
- package/dist/js/modules/payments/payway.d.ts +2 -0
- package/dist/js/modules/payments/payway.d.ts.map +1 -0
- package/dist/js/modules/payments/square.d.ts +2 -0
- package/dist/js/modules/payments/square.d.ts.map +1 -0
- package/dist/js/modules/payments/stripe.d.ts +2 -0
- package/dist/js/modules/payments/stripe.d.ts.map +1 -0
- package/dist/js/modules/payments/utils.d.ts +17 -0
- package/dist/js/modules/payments/utils.d.ts.map +1 -0
- package/dist/js/modules/registry.d.ts +9 -0
- package/dist/js/modules/registry.d.ts.map +1 -0
- package/dist/js/modules/styles.d.ts +2 -0
- package/dist/js/modules/styles.d.ts.map +1 -0
- package/dist/js/submit/pipeline.d.ts +18 -0
- package/dist/js/submit/pipeline.d.ts.map +1 -0
- package/dist/js/theme/theme-classes.d.ts +10 -0
- package/dist/js/theme/theme-classes.d.ts.map +1 -0
- package/dist/js/transport/forms-api.d.ts +11 -0
- package/dist/js/transport/forms-api.d.ts.map +1 -0
- package/dist/js/utils/async.d.ts +8 -0
- package/dist/js/utils/async.d.ts.map +1 -0
- package/dist/js/utils/debug.d.ts +10 -0
- package/dist/js/utils/debug.d.ts.map +1 -0
- package/dist/js/utils/event-names.d.ts +13 -0
- package/dist/js/utils/event-names.d.ts.map +1 -0
- package/dist/js/utils/field-references.d.ts +6 -0
- package/dist/js/utils/field-references.d.ts.map +1 -0
- package/dist/js/utils/field-references.keys.d.ts +4 -0
- package/dist/js/utils/field-references.keys.d.ts.map +1 -0
- package/dist/js/utils/field-references.parser.d.ts +3 -0
- package/dist/js/utils/field-references.parser.d.ts.map +1 -0
- package/dist/js/utils/field-references.registry.d.ts +3 -0
- package/dist/js/utils/field-references.registry.d.ts.map +1 -0
- package/dist/js/utils/field-references.resolver.d.ts +4 -0
- package/dist/js/utils/field-references.resolver.d.ts.map +1 -0
- package/dist/js/utils/field-references.types.d.ts +27 -0
- package/dist/js/utils/field-references.types.d.ts.map +1 -0
- package/dist/js/utils/fields.d.ts +5 -0
- package/dist/js/utils/fields.d.ts.map +1 -0
- package/dist/js/utils/http.d.ts +9 -0
- package/dist/js/utils/http.d.ts.map +1 -0
- package/dist/js/utils/i18n.d.ts +7 -0
- package/dist/js/utils/i18n.d.ts.map +1 -0
- package/dist/js/utils/scripts.d.ts +13 -0
- package/dist/js/utils/scripts.d.ts.map +1 -0
- package/dist/js/utils/unload-warning.d.ts +10 -0
- package/dist/js/utils/unload-warning.d.ts.map +1 -0
- package/dist/js/validation/rules/email.d.ts +4 -0
- package/dist/js/validation/rules/email.d.ts.map +1 -0
- package/dist/js/validation/rules/match.d.ts +4 -0
- package/dist/js/validation/rules/match.d.ts.map +1 -0
- package/dist/js/validation/rules/number.d.ts +4 -0
- package/dist/js/validation/rules/number.d.ts.map +1 -0
- package/dist/js/validation/rules/required.d.ts +4 -0
- package/dist/js/validation/rules/required.d.ts.map +1 -0
- package/dist/js/validation/rules/shared.d.ts +7 -0
- package/dist/js/validation/rules/shared.d.ts.map +1 -0
- package/dist/js/validation/rules/url.d.ts +4 -0
- package/dist/js/validation/rules/url.d.ts.map +1 -0
- package/dist/js/validation/rules.d.ts +10 -0
- package/dist/js/validation/rules.d.ts.map +1 -0
- package/dist/js/validation/scope.d.ts +6 -0
- package/dist/js/validation/scope.d.ts.map +1 -0
- package/dist/js/validation/submit-readiness.d.ts +4 -0
- package/dist/js/validation/submit-readiness.d.ts.map +1 -0
- package/dist/js/validation/types.d.ts +44 -0
- package/dist/js/validation/types.d.ts.map +1 -0
- package/dist/js/validation/validator.d.ts +54 -0
- package/dist/js/validation/validator.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/css/theme/forms/_form.css +28 -0
- package/src/js/core/create-formie-client.ts +6 -0
- package/src/js/core/submit-result-state.ts +17 -0
- package/src/js/modules/address/google-address.ts +33 -1
- package/src/js/modules/fields/conditions/effects.ts +79 -2
- package/src/js/modules/fields/conditions.ts +53 -11
- package/src/js/modules/fields/file-upload.ts +189 -97
- package/src/js/modules/fields/repeater.ts +1 -1
- package/src/js/modules/fields/rich-text.ts +2 -2
- package/src/js/modules/fields/signature.ts +1 -1
- package/src/js/modules/fields/summary.ts +1 -1
- package/src/js/modules/fields/table.ts +1 -1
- package/src/js/modules/fields/text-limit.ts +1 -1
- package/src/js/modules/payments/paypal.ts +1 -1
- package/src/js/modules/payments/payway.ts +1 -1
- package/src/js/modules/payments/stripe.ts +1 -1
- package/src/js/submit/pipeline.ts +3 -28
- package/src/js/validation/scope.ts +25 -0
- package/src/js/validation/submit-readiness.ts +157 -0
- package/src/js/validation/validator.ts +4 -0
- package/dist/chunks/address-finder-DfMCiW89.js +0 -47
- package/dist/chunks/api-CbqEMQT5.js +0 -181
- package/dist/chunks/api-DE7LfK-R.js +0 -960
- package/dist/chunks/api-DOfDzYC_.js +0 -538
- package/dist/chunks/async-B3DUf1GZ.js +0 -26
- package/dist/chunks/bpoint-Ciy3yY9Q.js +0 -34
- package/dist/chunks/calculations-CkYAqO_-.js +0 -197
- package/dist/chunks/captcha-eu-DnOWhMwr.js +0 -43
- package/dist/chunks/checkbox-radio-0x7Tc0br.js +0 -197
- package/dist/chunks/chunk-K6L4z4UQ.js +0 -24
- package/dist/chunks/conditions-4fXKhEJS.js +0 -609
- package/dist/chunks/date-picker-B6iZkjHS.js +0 -6204
- package/dist/chunks/debug-KnZeKYBI.js +0 -39
- package/dist/chunks/dist-D09GnXMW.js +0 -2663
- package/dist/chunks/event-names-DamGPtXR.js +0 -51
- package/dist/chunks/eway-DEAYcwT0.js +0 -86
- package/dist/chunks/field-references.keys-BpBZ_quS.js +0 -24
- package/dist/chunks/field-references.resolver-Ba6xhiJC.js +0 -183
- package/dist/chunks/file-upload-BIj85NFH.js +0 -428
- package/dist/chunks/friendly-captcha-v1-CqO4WVre.js +0 -40
- package/dist/chunks/friendly-captcha-v2-CyykcJcM.js +0 -47
- package/dist/chunks/friendly-challenge-Dg8XkStd.js +0 -1101
- package/dist/chunks/go-cardless-CuND59rR.js +0 -26
- package/dist/chunks/google-address--uR8WDSm.js +0 -208
- package/dist/chunks/hcaptcha-CmaFUesv.js +0 -72
- package/dist/chunks/hidden-CYnZYple.js +0 -36
- package/dist/chunks/http-18nn97DZ.js +0 -29
- package/dist/chunks/i18n-vUh-KGiH.js +0 -55
- package/dist/chunks/loqate-BICNJlVK.js +0 -97
- package/dist/chunks/mollie-DwlsgHZ1.js +0 -26
- package/dist/chunks/moneris-B_IFZFTx.js +0 -159
- package/dist/chunks/opayo-U2x_TOII.js +0 -192
- package/dist/chunks/paddle-BqXFrc79.js +0 -75
- package/dist/chunks/paypal-VowQ3ilP.js +0 -121
- package/dist/chunks/payway-VOO-ajyg.js +0 -75
- package/dist/chunks/phone-country-B6Me4lK0.js +0 -3317
- package/dist/chunks/place-kit-ldUl-u9w.js +0 -56
- package/dist/chunks/placekit-autocomplete.esm-D-lGeaZl.js +0 -1771
- package/dist/chunks/recaptcha-enterprise-DPJNyv1X.js +0 -72
- package/dist/chunks/recaptcha-shared-DTI4qWVR.js +0 -22
- package/dist/chunks/recaptcha-v2-checkbox-zFjpvJ5c.js +0 -49
- package/dist/chunks/recaptcha-v2-invisible-CnYtkNvz.js +0 -62
- package/dist/chunks/recaptcha-v3-EAlWhnkX.js +0 -33
- package/dist/chunks/repeater-BPm7Mkyn.js +0 -149
- package/dist/chunks/rich-text-CHSly1Hq.js +0 -438
- package/dist/chunks/scripts-BGD_iU_6.js +0 -41
- package/dist/chunks/sdk-B7u9fTlP.js +0 -2103
- package/dist/chunks/shared-DC6_1u8X.js +0 -85
- package/dist/chunks/signature-DNMCgrMd.js +0 -763
- package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
- package/dist/chunks/square-BLqK51rS.js +0 -61
- package/dist/chunks/stripe-B6ZcDQdx.js +0 -273
- package/dist/chunks/styles-BIh6g7V_.js +0 -22
- package/dist/chunks/summary-BTG0uIOt.js +0 -189
- package/dist/chunks/table-BTYc0Qm8.js +0 -122
- package/dist/chunks/text-limit-CgBMu4sJ.js +0 -177
- package/dist/chunks/theme-classes-vSHpdCUO.js +0 -59
- package/dist/chunks/turnstile-DP0bdR7T.js +0 -68
- package/dist/chunks/utils-ByrEVYrJ.js +0 -49584
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { u as f, w } from "./index-BcqwpPNE.js";
|
|
2
|
+
import { l as m } from "./scripts-D9N2d5rN.js";
|
|
3
|
+
const s = [
|
|
4
|
+
{
|
|
5
|
+
id: "FORMIE_EWAY_SCRIPT_MIN",
|
|
6
|
+
src: "https://secure.ewaypayments.com/scripts/eCrypt.min.js"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
id: "FORMIE_EWAY_SCRIPT",
|
|
10
|
+
src: "https://secure.ewaypayments.com/scripts/eCrypt.js"
|
|
11
|
+
}
|
|
12
|
+
];
|
|
13
|
+
async function i() {
|
|
14
|
+
let t = null;
|
|
15
|
+
for (const r of s) {
|
|
16
|
+
try {
|
|
17
|
+
return await m("eCrypt", {
|
|
18
|
+
id: r.id,
|
|
19
|
+
src: r.src,
|
|
20
|
+
timeoutMs: 1e4
|
|
21
|
+
}), await w(() => {
|
|
22
|
+
const o = window.eCrypt;
|
|
23
|
+
return o && typeof o.encryptValue == "function" ? o : null;
|
|
24
|
+
}, {
|
|
25
|
+
timeoutMs: 1e4,
|
|
26
|
+
intervalMs: 50
|
|
27
|
+
});
|
|
28
|
+
} catch (e) {
|
|
29
|
+
t = e instanceof Error ? e : new Error("Unknown eWay script load error.");
|
|
30
|
+
}
|
|
31
|
+
s.forEach(({ id: e }) => {
|
|
32
|
+
document.getElementById(e)?.remove();
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
throw t || new Error("Eway encryption script failed to load.");
|
|
36
|
+
}
|
|
37
|
+
const C = f({
|
|
38
|
+
id: "eway",
|
|
39
|
+
defaultRequiredInputSuffixes: ["ewayTokenData"],
|
|
40
|
+
load: async (t) => {
|
|
41
|
+
const { provider: r } = t.options;
|
|
42
|
+
return r.cseKey?.trim() ? i() : (console.error("[formie] Missing cseKey for Eway."), null);
|
|
43
|
+
},
|
|
44
|
+
onBeforeAuthorize: async (t) => {
|
|
45
|
+
const { field: r, services: e, provider: o, api: y } = t, n = o.cseKey;
|
|
46
|
+
if (!n?.trim())
|
|
47
|
+
return e.addError("Missing cseKey for Eway."), !1;
|
|
48
|
+
let c = y;
|
|
49
|
+
if (!c?.encryptValue)
|
|
50
|
+
try {
|
|
51
|
+
c = await i();
|
|
52
|
+
} catch (a) {
|
|
53
|
+
return e.addError(a instanceof Error ? a.message : "Eway encryption script failed to load."), !1;
|
|
54
|
+
}
|
|
55
|
+
const d = r.querySelector('[data-eway-card="cardholder-name"]')?.value ?? "", u = r.querySelector('[data-eway-card="card-number"]')?.value ?? "", l = r.querySelector('[data-eway-card="expiry-date"]')?.value ?? "", p = r.querySelector('[data-eway-card="security-code"]')?.value ?? "";
|
|
56
|
+
try {
|
|
57
|
+
const a = {
|
|
58
|
+
cardholderName: d,
|
|
59
|
+
cardNumber: c.encryptValue(u, n),
|
|
60
|
+
expiryDate: l,
|
|
61
|
+
securityCode: c.encryptValue(p, n)
|
|
62
|
+
};
|
|
63
|
+
return e.updateInputs("ewayTokenData", JSON.stringify(a)), !0;
|
|
64
|
+
} catch (a) {
|
|
65
|
+
return e.addError(a instanceof Error ? a.message : "Failed to encrypt card details."), !1;
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
onAfterSubmit: async ({ services: t }) => {
|
|
69
|
+
t.updateInputs("ewayTokenData", "");
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
export {
|
|
73
|
+
C as ewayModule
|
|
74
|
+
};
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { r as K, a as O, d as x } from "./shared-BmntPmnW.js";
|
|
2
|
+
import { e as q } from "./styles-C3aqgtek.js";
|
|
3
|
+
import { k as B, l as j, m as W, o as Y } from "./index-BcqwpPNE.js";
|
|
4
|
+
const $ = "@layer formie-theme{.formie-file-input{padding:var(--formie-space-1);line-height:var(--formie-line-height-base);cursor:pointer}.formie-file-input::file-selector-button,.formie-file-input::-webkit-file-upload-button{appearance:none;-webkit-appearance:none;margin-inline-end:var(--formie-space-2);padding:calc(var(--formie-control-padding-y) - 1px) var(--formie-space-2);min-height:calc(var(--formie-control-height) - (var(--formie-space-1) * 2));border:var(--formie-border-width) solid var(--formie-color-border);border-radius:calc(var(--formie-radius-sm) - 1px);background:var(--formie-color-surface-subtle);color:var(--formie-color-heading);font-weight:var(--formie-font-weight-normal);font-size:var(--formie-font-size-xs);line-height:1.1;white-space:nowrap;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease}.formie-file-input:hover::file-selector-button,.formie-file-input:hover::-webkit-file-upload-button{border-color:color-mix(in srgb,var(--formie-color-border) 70%,var(--formie-color-heading) 30%);background:var(--formie-color-surface-muted)}.formie-file-input:focus{outline:0}.formie-file-input:focus-visible::file-selector-button,.formie-file-input:focus-visible::-webkit-file-upload-button{border-color:var(--formie-color-focus-ring)}.formie-field-has-error .formie-file-input::file-selector-button,.formie-field-has-error .formie-file-input::-webkit-file-upload-button{border-color:var(--formie-color-danger)}.formie-file-summary{padding:var(--formie-file-summary-padding);gap:var(--formie-gap-file-summary);border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm)}.formie-file-summary-container{margin:0;padding-left:var(--formie-list-indent)}}", _ = 'input[type="file"][data-formie-file-input]', F = j("uploaded"), L = W("reset"), J = "data-formie-file-upload-key", G = "data-formie-file-upload-hydrate-endpoint", I = "data-formie-file-upload-anchor", Q = "data-formie-file-upload-asset-id", X = [
|
|
5
|
+
"fileLimit",
|
|
6
|
+
"fileSizeMinLimit",
|
|
7
|
+
"fileSizeMaxLimit"
|
|
8
|
+
], w = "file-upload", E = "file-upload", T = B("repeater", "init-row"), Z = "[data-formie-field-handle]";
|
|
9
|
+
q(E, [$]);
|
|
10
|
+
function h(e) {
|
|
11
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
12
|
+
}
|
|
13
|
+
function b(e) {
|
|
14
|
+
const t = Number(e);
|
|
15
|
+
return Number.isInteger(t) && t > 0 ? t : null;
|
|
16
|
+
}
|
|
17
|
+
function c(e) {
|
|
18
|
+
return typeof e == "string" ? e.trim() : "";
|
|
19
|
+
}
|
|
20
|
+
function M(e) {
|
|
21
|
+
return e.getAttribute("data-formie-field-handle")?.trim() || "";
|
|
22
|
+
}
|
|
23
|
+
function k(e) {
|
|
24
|
+
return e.name.endsWith("[]") ? e.name.slice(0, -2) : e.name;
|
|
25
|
+
}
|
|
26
|
+
function D(e) {
|
|
27
|
+
return `${k(e)}[]`;
|
|
28
|
+
}
|
|
29
|
+
function ee(e) {
|
|
30
|
+
return e.getAttribute(J)?.trim() || e.getAttribute("data-formie-input-id")?.trim() || "";
|
|
31
|
+
}
|
|
32
|
+
function C(e) {
|
|
33
|
+
return Array.from(e.querySelectorAll('input[type="hidden"]')).filter((t) => t instanceof HTMLInputElement);
|
|
34
|
+
}
|
|
35
|
+
function P(e, t) {
|
|
36
|
+
const r = D(t);
|
|
37
|
+
return C(e).filter((n) => n.name === r && n.value.trim() !== "");
|
|
38
|
+
}
|
|
39
|
+
function te(e, t) {
|
|
40
|
+
const r = k(t), n = C(e).find((s) => s.hasAttribute(I) || s.name === r && s.value === "");
|
|
41
|
+
if (n)
|
|
42
|
+
return n.setAttribute(I, "true"), n.name = r, n.value = "", n;
|
|
43
|
+
const i = document.createElement("input");
|
|
44
|
+
return i.type = "hidden", i.name = r, i.value = "", i.setAttribute(I, "true"), t.insertAdjacentElement("afterend", i), i;
|
|
45
|
+
}
|
|
46
|
+
function N(e) {
|
|
47
|
+
if (Array.isArray(e))
|
|
48
|
+
return null;
|
|
49
|
+
const t = b(e);
|
|
50
|
+
if (t)
|
|
51
|
+
return {
|
|
52
|
+
assetId: t,
|
|
53
|
+
filename: ""
|
|
54
|
+
};
|
|
55
|
+
if (!h(e))
|
|
56
|
+
return null;
|
|
57
|
+
const r = b(e.assetId ?? e.id ?? e.value), n = c(e.filename ?? e.title ?? e.label ?? e.name), i = c(e.url) || null;
|
|
58
|
+
return !r && !n ? null : {
|
|
59
|
+
assetId: r,
|
|
60
|
+
filename: n,
|
|
61
|
+
url: i
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function v(e) {
|
|
65
|
+
if (!Array.isArray(e)) {
|
|
66
|
+
const t = N(e);
|
|
67
|
+
return t ? [t] : [];
|
|
68
|
+
}
|
|
69
|
+
return e.flatMap((t) => {
|
|
70
|
+
if (Array.isArray(t))
|
|
71
|
+
return v(t);
|
|
72
|
+
const r = N(t);
|
|
73
|
+
return r ? [r] : [];
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function S(e) {
|
|
77
|
+
return e ? Array.from(e.querySelectorAll("[data-formie-file-summary-item]")).map((t) => ({
|
|
78
|
+
assetId: null,
|
|
79
|
+
filename: t.textContent?.trim() || ""
|
|
80
|
+
})).filter((t) => t.filename !== "") : [];
|
|
81
|
+
}
|
|
82
|
+
function H(e, t) {
|
|
83
|
+
return P(e, t).map((r) => ({
|
|
84
|
+
assetId: b(r.value),
|
|
85
|
+
filename: ""
|
|
86
|
+
})).filter((r) => r.assetId !== null);
|
|
87
|
+
}
|
|
88
|
+
function U(e, t) {
|
|
89
|
+
return e.length ? e.map((r, n) => ({
|
|
90
|
+
assetId: r.assetId,
|
|
91
|
+
filename: t[n]?.filename || ""
|
|
92
|
+
})) : t;
|
|
93
|
+
}
|
|
94
|
+
function z(e) {
|
|
95
|
+
return e.map((t) => t.trim().toLowerCase()).filter(Boolean);
|
|
96
|
+
}
|
|
97
|
+
function re(e, t) {
|
|
98
|
+
const r = z(e.map((i) => i.filename)), n = z(t);
|
|
99
|
+
return !r.length || !n.length ? !1 : r.every((i) => n.includes(i));
|
|
100
|
+
}
|
|
101
|
+
function ne(e) {
|
|
102
|
+
K(e, w, (t) => {
|
|
103
|
+
t.addValidator("fileLimit", ({ input: r }) => {
|
|
104
|
+
const n = parseInt(r.getAttribute("data-formie-file-limit") || "", 10);
|
|
105
|
+
return r.type !== "file" || !n || !("files" in r) || !r.files?.length ? !0 : r.files.length <= n;
|
|
106
|
+
}, ({ input: r, t: n }) => n("Choose up to {files} files.", {
|
|
107
|
+
files: r.getAttribute("data-formie-file-limit") || ""
|
|
108
|
+
})), t.addValidator("fileSizeMinLimit", ({ input: r }) => {
|
|
109
|
+
const i = parseFloat(r.getAttribute("data-formie-size-min-limit") || "") * 1e3 * 1e3;
|
|
110
|
+
return r.type !== "file" || !i || !("files" in r) || !r.files?.length ? !0 : Array.from(r.files).every((s) => s.size >= i);
|
|
111
|
+
}, ({ input: r, t: n }) => n("File must be larger than {filesize} MB.", {
|
|
112
|
+
filesize: r.getAttribute("data-formie-size-min-limit") || ""
|
|
113
|
+
})), t.addValidator("fileSizeMaxLimit", ({ input: r }) => {
|
|
114
|
+
const i = parseFloat(r.getAttribute("data-formie-size-max-limit") || "") * 1e3 * 1e3;
|
|
115
|
+
return r.type !== "file" || !i || !("files" in r) || !r.files?.length ? !0 : Array.from(r.files).every((s) => s.size <= i);
|
|
116
|
+
}, ({ input: r, t: n }) => n("File must be smaller than {filesize} MB.", {
|
|
117
|
+
filesize: r.getAttribute("data-formie-size-max-limit") || ""
|
|
118
|
+
}));
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function ie(e) {
|
|
122
|
+
O(e, w, X);
|
|
123
|
+
}
|
|
124
|
+
function V(e, t) {
|
|
125
|
+
const r = e.querySelector("[data-formie-file-summary]");
|
|
126
|
+
if (r)
|
|
127
|
+
return r;
|
|
128
|
+
const n = document.createElement("div");
|
|
129
|
+
return n.className = "formie-file-summary", n.setAttribute("data-formie-file-summary", "true"), t.insertAdjacentElement("afterend", n), n;
|
|
130
|
+
}
|
|
131
|
+
function y(e) {
|
|
132
|
+
const t = e.pendingFiles.length ? e.pendingFiles : e.uploadedAssets.map((s) => s.filename || (s.assetId ? `Asset #${s.assetId}` : "")).filter(Boolean), r = e.summaryRoot || e.field.querySelector("[data-formie-file-summary]");
|
|
133
|
+
if (!t.length) {
|
|
134
|
+
r && (r.replaceChildren(), r.hidden = !0), e.summaryRoot = r;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const n = r || V(e.field, e.input);
|
|
138
|
+
if (!n)
|
|
139
|
+
return;
|
|
140
|
+
n.hidden = !1, e.summaryRoot = n;
|
|
141
|
+
const i = document.createElement("ul");
|
|
142
|
+
i.className = "formie-file-summary-container", i.setAttribute("data-formie-file-summary-container", "true"), t.forEach((s) => {
|
|
143
|
+
const o = document.createElement("li");
|
|
144
|
+
o.className = "formie-file-summary-item", o.setAttribute("data-formie-file-summary-item", "true"), o.textContent = s, i.appendChild(o);
|
|
145
|
+
}), n.replaceChildren(i);
|
|
146
|
+
}
|
|
147
|
+
function R(e, t, r) {
|
|
148
|
+
let i = te(e, t);
|
|
149
|
+
const s = D(t);
|
|
150
|
+
P(e, t).forEach((o) => {
|
|
151
|
+
o.remove();
|
|
152
|
+
}), r.forEach((o) => {
|
|
153
|
+
if (!o.assetId)
|
|
154
|
+
return;
|
|
155
|
+
const l = document.createElement("input");
|
|
156
|
+
l.type = "hidden", l.name = s, l.value = String(o.assetId), l.setAttribute(Q, "true"), i.insertAdjacentElement("afterend", l), i = l;
|
|
157
|
+
}), t.value = "";
|
|
158
|
+
}
|
|
159
|
+
function oe(e) {
|
|
160
|
+
if (!e)
|
|
161
|
+
return "";
|
|
162
|
+
const t = e.querySelector('input[name="handle"]');
|
|
163
|
+
return t instanceof HTMLInputElement && t.value.trim() ? t.value.trim() : e.getAttribute("data-formie-handle")?.trim() || "";
|
|
164
|
+
}
|
|
165
|
+
function se(e, t, r) {
|
|
166
|
+
const n = t.form, i = new FormData(), s = oe(n), o = M(e);
|
|
167
|
+
s && i.append("handle", s), o && i.append("fieldHandle", o);
|
|
168
|
+
const l = n?.querySelector('input[name="submissionUid"]');
|
|
169
|
+
return l instanceof HTMLInputElement && l.value.trim() && i.append("submissionUid", l.value.trim()), r.forEach((a) => {
|
|
170
|
+
i.append("assetIds[]", String(a));
|
|
171
|
+
}), i;
|
|
172
|
+
}
|
|
173
|
+
async function ae(e, t, r) {
|
|
174
|
+
const n = r.map((a) => a.assetId).filter((a) => a !== null);
|
|
175
|
+
if (!n.length)
|
|
176
|
+
return r;
|
|
177
|
+
const i = t.getAttribute(G)?.trim() || "/actions/formie/file-upload/hydrate", s = await Y(i, {
|
|
178
|
+
method: "POST",
|
|
179
|
+
body: se(e, t, n)
|
|
180
|
+
}), o = v(s.assets);
|
|
181
|
+
if (!o.length)
|
|
182
|
+
return r;
|
|
183
|
+
const l = new Map(o.map((a) => [a.assetId, a]));
|
|
184
|
+
return r.map((a) => {
|
|
185
|
+
if (!a.assetId || !l.has(a.assetId))
|
|
186
|
+
return a;
|
|
187
|
+
const p = l.get(a.assetId);
|
|
188
|
+
return {
|
|
189
|
+
assetId: a.assetId,
|
|
190
|
+
filename: p.filename || a.filename,
|
|
191
|
+
url: p.url ?? a.url
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function le(e, t) {
|
|
196
|
+
const r = e.detail;
|
|
197
|
+
if (!h(r))
|
|
198
|
+
return [];
|
|
199
|
+
const n = c(r.fieldHandle), i = c(r.inputKey), s = c(r.inputName ?? r.name), o = h(r.data) ? r.data : null, l = c(o?.fieldHandle), a = c(o?.inputKey), p = c(o?.inputName ?? o?.name), d = [];
|
|
200
|
+
let m = !1, u = !1, g = !1;
|
|
201
|
+
if (i !== "" && i === t.inputKey && (m = !0, d.push(r.assets, r.assetIds, r.data)), s !== "" && s === t.inputName && (u = !0, d.push(r.assets, r.assetIds, r.data)), n === t.fieldHandle && (g = !0, d.push(r.assets, r.assetIds, r.data)), o) {
|
|
202
|
+
const f = [
|
|
203
|
+
o.assets,
|
|
204
|
+
o.assetIds,
|
|
205
|
+
o.uploadedAssets,
|
|
206
|
+
o.data
|
|
207
|
+
];
|
|
208
|
+
a !== "" && a === t.inputKey && (m = !0, d.push(...f)), p !== "" && p === t.inputName && (u = !0, d.push(...f)), l === t.fieldHandle && (g = !0, d.push(...f));
|
|
209
|
+
}
|
|
210
|
+
[r.assets, r.assetIds, r.data].forEach((f) => {
|
|
211
|
+
h(f) && (t.inputKey && t.inputKey in f && (m = !0, d.push(f[t.inputKey])), t.inputName in f && (u = !0, d.push(f[t.inputName])), t.fieldHandle in f && d.push(f[t.fieldHandle]));
|
|
212
|
+
});
|
|
213
|
+
for (const f of d) {
|
|
214
|
+
const A = v(f);
|
|
215
|
+
if (A.length && (m || u || g || re(A, t.pendingFiles)))
|
|
216
|
+
return A;
|
|
217
|
+
}
|
|
218
|
+
return [];
|
|
219
|
+
}
|
|
220
|
+
function de(e) {
|
|
221
|
+
const t = e.closest(Z);
|
|
222
|
+
return t instanceof HTMLElement ? t : null;
|
|
223
|
+
}
|
|
224
|
+
function ue(e) {
|
|
225
|
+
return Array.from(e.querySelectorAll(_)).filter((t) => t instanceof HTMLInputElement);
|
|
226
|
+
}
|
|
227
|
+
function fe(e, t, r) {
|
|
228
|
+
const n = {
|
|
229
|
+
field: e,
|
|
230
|
+
input: t,
|
|
231
|
+
summaryRoot: V(e, t),
|
|
232
|
+
uploadedAssets: U(
|
|
233
|
+
H(e, t),
|
|
234
|
+
S(e.querySelector("[data-formie-file-summary]"))
|
|
235
|
+
),
|
|
236
|
+
pendingFiles: [],
|
|
237
|
+
hydrationToken: 0
|
|
238
|
+
}, i = () => {
|
|
239
|
+
n.pendingFiles = Array.from(t.files || []).map((d) => d.name), y(n);
|
|
240
|
+
}, s = async (d) => {
|
|
241
|
+
n.hydrationToken += 1;
|
|
242
|
+
const m = n.hydrationToken;
|
|
243
|
+
n.pendingFiles = [], n.uploadedAssets = d, R(e, t, d), y(n);
|
|
244
|
+
try {
|
|
245
|
+
const u = await ae(e, t, d);
|
|
246
|
+
if (m !== n.hydrationToken)
|
|
247
|
+
return;
|
|
248
|
+
n.uploadedAssets = u, y(n), x(e, E, "uploaded-assets-sync", {
|
|
249
|
+
fileUpload: e,
|
|
250
|
+
assets: u
|
|
251
|
+
});
|
|
252
|
+
} catch (u) {
|
|
253
|
+
console.error("[formie] Failed to hydrate uploaded file details.", u);
|
|
254
|
+
}
|
|
255
|
+
}, o = () => {
|
|
256
|
+
n.hydrationToken += 1, n.pendingFiles = [], n.uploadedAssets = [], R(e, t, []), y(n);
|
|
257
|
+
}, l = (d) => {
|
|
258
|
+
const m = M(e);
|
|
259
|
+
if (!m)
|
|
260
|
+
return;
|
|
261
|
+
const u = le(d, {
|
|
262
|
+
fieldHandle: m,
|
|
263
|
+
inputKey: ee(t),
|
|
264
|
+
inputName: t.name,
|
|
265
|
+
pendingFiles: n.pendingFiles
|
|
266
|
+
});
|
|
267
|
+
u.length && s(u);
|
|
268
|
+
}, a = () => {
|
|
269
|
+
o();
|
|
270
|
+
};
|
|
271
|
+
return t.addEventListener("change", i), r?.addEventListener(F, l), r?.addEventListener(L, a), (() => {
|
|
272
|
+
const d = H(e, t), m = S(n.summaryRoot);
|
|
273
|
+
if (n.uploadedAssets = U(d, m), n.uploadedAssets.some((u) => u.assetId && !u.filename)) {
|
|
274
|
+
s(n.uploadedAssets);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
y(n);
|
|
278
|
+
})(), () => {
|
|
279
|
+
t.removeEventListener("change", i), r?.removeEventListener(F, l), r?.removeEventListener(L, a);
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const ye = {
|
|
283
|
+
id: E,
|
|
284
|
+
kind: "field",
|
|
285
|
+
match: (e) => !!e.target.querySelector(_),
|
|
286
|
+
setup: async (e) => {
|
|
287
|
+
const t = e.form, r = /* @__PURE__ */ new WeakSet(), n = [], i = (o) => {
|
|
288
|
+
ue(o).forEach((l) => {
|
|
289
|
+
if (r.has(l))
|
|
290
|
+
return;
|
|
291
|
+
const a = de(l);
|
|
292
|
+
a && (r.add(l), n.push(fe(a, l, t)));
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
ne(t), i(e.target);
|
|
296
|
+
const s = (o) => {
|
|
297
|
+
const l = o.detail;
|
|
298
|
+
if (!h(l))
|
|
299
|
+
return;
|
|
300
|
+
const a = l.row;
|
|
301
|
+
a instanceof HTMLElement && i(a);
|
|
302
|
+
};
|
|
303
|
+
return t?.addEventListener(T, s), await e.emit("formie:module:file-upload:init", {
|
|
304
|
+
count: n.length
|
|
305
|
+
}), {
|
|
306
|
+
destroy: () => {
|
|
307
|
+
t?.removeEventListener(T, s), n.forEach((o) => {
|
|
308
|
+
o();
|
|
309
|
+
}), ie(t), e.emit("formie:module:file-upload:destroy", {});
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
export {
|
|
315
|
+
ye as fileUploadModule
|
|
316
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { a as l } from "./index-BcqwpPNE.js";
|
|
2
|
+
const c = l({
|
|
3
|
+
id: "friendly-captcha-v1",
|
|
4
|
+
defaultPlaceholderSelector: "[data-friendly-captcha-placeholder]",
|
|
5
|
+
defaultTokenFieldNames: ["frc-captcha-solution"],
|
|
6
|
+
load: async () => import("./index-BP7Unm5Y.js"),
|
|
7
|
+
mount: ({ api: e, container: t, provider: a, services: o }) => new e.WidgetInstance(t, {
|
|
8
|
+
sitekey: a.siteKey || "",
|
|
9
|
+
startMode: a.startMode || "none",
|
|
10
|
+
language: a.language || "en",
|
|
11
|
+
solutionFieldName: "frc-captcha-solution",
|
|
12
|
+
doneCallback: (n) => {
|
|
13
|
+
typeof n == "string" && n.trim() !== "" && o.tokens.write(n.trim()), o.errors.clear();
|
|
14
|
+
},
|
|
15
|
+
errorCallback: () => {
|
|
16
|
+
o.tokens.clear();
|
|
17
|
+
}
|
|
18
|
+
}),
|
|
19
|
+
screen: async ({ widget: e, placeholder: t, services: a, stageCtx: o }) => {
|
|
20
|
+
if (a.tokens.has())
|
|
21
|
+
return;
|
|
22
|
+
if (await e.start(), !await a.tokens.wait()) {
|
|
23
|
+
const r = a.errors.getDefaultMessage();
|
|
24
|
+
a.errors.show(r, t), o.abort(r);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
unmount: ({ widget: e, services: t }) => {
|
|
28
|
+
e.destroy(), t.tokens.clear();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
c as friendlyCaptchaV1Module
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { a as l } from "./index-BcqwpPNE.js";
|
|
2
|
+
const i = l({
|
|
3
|
+
id: "friendly-captcha-v2",
|
|
4
|
+
defaultPlaceholderSelector: "[data-friendly-captcha-placeholder]",
|
|
5
|
+
defaultTokenFieldNames: ["frc-captcha-response"],
|
|
6
|
+
load: async () => import("./sdk-3SicTWby.js"),
|
|
7
|
+
mount: ({ api: r, container: n, provider: e, services: t }) => {
|
|
8
|
+
const a = new r.FriendlyCaptchaSDK().createWidget({
|
|
9
|
+
element: n,
|
|
10
|
+
sitekey: e.siteKey || "",
|
|
11
|
+
formFieldName: "frc-captcha-response",
|
|
12
|
+
language: e.language,
|
|
13
|
+
startMode: e.startMode || "none"
|
|
14
|
+
});
|
|
15
|
+
return a.addEventListener("frc:widget.complete", (s) => {
|
|
16
|
+
const o = s.detail;
|
|
17
|
+
typeof o?.response == "string" && o.response.trim() !== "" && t.tokens.write(o.response.trim()), t.errors.clear();
|
|
18
|
+
}), a.addEventListener("frc:widget.expire", () => {
|
|
19
|
+
t.tokens.clear(), t.errors.clear();
|
|
20
|
+
}), a.addEventListener("frc:widget.error", (s) => {
|
|
21
|
+
s.detail?.error && t.tokens.clear();
|
|
22
|
+
}), a;
|
|
23
|
+
},
|
|
24
|
+
screen: async ({ widget: r, placeholder: n, services: e, stageCtx: t }) => {
|
|
25
|
+
if (e.tokens.has())
|
|
26
|
+
return;
|
|
27
|
+
if (r.start(), !await e.tokens.wait()) {
|
|
28
|
+
const a = e.errors.getDefaultMessage();
|
|
29
|
+
e.errors.show(a, n), t.abort(a);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
unmount: ({ widget: r, services: n }) => {
|
|
33
|
+
r.destroy(), n.tokens.clear();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
i as friendlyCaptchaV2Module
|
|
38
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { u as a, v as o } from "./index-BcqwpPNE.js";
|
|
2
|
+
const d = o("go-cardless", "redirect"), l = a({
|
|
3
|
+
id: "go-cardless",
|
|
4
|
+
defaultRequiredInputSuffixes: [],
|
|
5
|
+
load: async () => null,
|
|
6
|
+
setup: async ({ services: n, root: e }) => {
|
|
7
|
+
const r = (s) => {
|
|
8
|
+
const t = s.detail?.data;
|
|
9
|
+
if (!t?.redirectUrl) {
|
|
10
|
+
n.addError("Missing GoCardless redirect URL.");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
window.location.href = t.redirectUrl;
|
|
14
|
+
};
|
|
15
|
+
return e.addEventListener(d, r), {
|
|
16
|
+
destroy: () => {
|
|
17
|
+
e.removeEventListener(d, r);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
l as goCardlessModule
|
|
24
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { d as x, g as E } from "./index-BcqwpPNE.js";
|
|
2
|
+
import { e as v, a as L } from "./scripts-D9N2d5rN.js";
|
|
3
|
+
const w = "FORMIE_GOOGLE_ADDRESS_SCRIPT", m = "formieGoogleMapsReady";
|
|
4
|
+
let f = null;
|
|
5
|
+
async function R(t) {
|
|
6
|
+
const e = window, n = e.google;
|
|
7
|
+
if (typeof n < "u" && n !== null) {
|
|
8
|
+
const s = n.maps;
|
|
9
|
+
if (s?.places?.PlaceAutocompleteElement)
|
|
10
|
+
return n;
|
|
11
|
+
const i = s;
|
|
12
|
+
return typeof i?.importLibrary == "function" && await i.importLibrary("places"), n;
|
|
13
|
+
}
|
|
14
|
+
if (f)
|
|
15
|
+
return f;
|
|
16
|
+
if (document.getElementById(w)) {
|
|
17
|
+
const s = await v("google", 1e4), i = s?.maps;
|
|
18
|
+
return typeof i?.importLibrary == "function" && await i.importLibrary("places"), s;
|
|
19
|
+
}
|
|
20
|
+
const o = new URL("https://maps.googleapis.com/maps/api/js");
|
|
21
|
+
o.searchParams.set("key", t), o.searchParams.set("loading", "async"), o.searchParams.set("libraries", "places"), o.searchParams.set("callback", m), f = (async () => {
|
|
22
|
+
const s = new Promise((d, r) => {
|
|
23
|
+
const u = setTimeout(() => {
|
|
24
|
+
e[m] && (delete e[m], r(new Error("Google Maps API load timeout")));
|
|
25
|
+
}, 15e3);
|
|
26
|
+
e[m] = () => {
|
|
27
|
+
clearTimeout(u), delete e[m], d(e.google);
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
await L({
|
|
31
|
+
id: w,
|
|
32
|
+
src: o.toString(),
|
|
33
|
+
async: !0,
|
|
34
|
+
defer: !0
|
|
35
|
+
});
|
|
36
|
+
const i = await s, l = i?.maps;
|
|
37
|
+
return typeof l?.importLibrary == "function" && await l.importLibrary("places"), i;
|
|
38
|
+
})();
|
|
39
|
+
try {
|
|
40
|
+
return await f;
|
|
41
|
+
} catch (s) {
|
|
42
|
+
throw f = null, s;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function A(t, e) {
|
|
46
|
+
e.formattedAddress && t.input.setValue("autoComplete", e.formattedAddress), e.address1 && t.input.setValue("address1", e.address1), e.city !== void 0 && t.input.setValue("city", e.city), e.state !== void 0 && t.input.setValue("state", e.state), e.zip !== void 0 && t.input.setValue("zip", e.zip), e.country !== void 0 && t.input.setValue("country", e.country);
|
|
47
|
+
}
|
|
48
|
+
function S() {
|
|
49
|
+
return {
|
|
50
|
+
subpremise: "shortText",
|
|
51
|
+
street_number: "shortText",
|
|
52
|
+
route: "longText",
|
|
53
|
+
postal_town: "longText",
|
|
54
|
+
locality: "longText",
|
|
55
|
+
administrative_area_level_1: "shortText",
|
|
56
|
+
country: "shortText",
|
|
57
|
+
postal_code: "shortText"
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function b(t) {
|
|
61
|
+
const e = S(), n = {};
|
|
62
|
+
for (const a of t) {
|
|
63
|
+
const o = a.types?.[0];
|
|
64
|
+
if (!o || !e[o]) continue;
|
|
65
|
+
const s = e[o], i = a[s] ?? a.short_text ?? a.long_text ?? "";
|
|
66
|
+
n[o] = i;
|
|
67
|
+
}
|
|
68
|
+
return n;
|
|
69
|
+
}
|
|
70
|
+
function C(t) {
|
|
71
|
+
let e = "";
|
|
72
|
+
return (t.street_number || t.route) && (e = [t.street_number, t.route].filter(Boolean).join(" "), t.subpremise && (e = `${t.subpremise}/${e}`)), {
|
|
73
|
+
address1: e,
|
|
74
|
+
city: t.locality || t.postal_town || "",
|
|
75
|
+
state: t.administrative_area_level_1 || "",
|
|
76
|
+
zip: t.postal_code || "",
|
|
77
|
+
country: t.country || ""
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function T(t) {
|
|
81
|
+
const e = t.componentRestrictions;
|
|
82
|
+
if (e && typeof e == "object") {
|
|
83
|
+
const a = e.country;
|
|
84
|
+
if (Array.isArray(a) ? a.length > 0 : a)
|
|
85
|
+
return !0;
|
|
86
|
+
}
|
|
87
|
+
const n = t.includedRegionCodes;
|
|
88
|
+
return Array.isArray(n) && n.length > 0;
|
|
89
|
+
}
|
|
90
|
+
function G(t) {
|
|
91
|
+
const e = { types: ["geocode"], ...t.options || {} }, n = t.countryDefaultValue?.trim().toLowerCase();
|
|
92
|
+
return !n || T(e) ? e : {
|
|
93
|
+
...e,
|
|
94
|
+
componentRestrictions: { country: n },
|
|
95
|
+
includedRegionCodes: [n.toUpperCase()]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
const I = x({
|
|
99
|
+
id: "google-address",
|
|
100
|
+
load: async ({ options: t }) => {
|
|
101
|
+
const e = t.provider.apiKey;
|
|
102
|
+
if (!e)
|
|
103
|
+
throw new Error("Google Places API key is required");
|
|
104
|
+
return R(e);
|
|
105
|
+
},
|
|
106
|
+
mount: async ({ api: t, field: e, services: n, provider: a }) => {
|
|
107
|
+
const o = n.input.getAutocomplete(), s = t?.maps?.places?.PlaceAutocompleteElement;
|
|
108
|
+
if (!o || typeof s != "function")
|
|
109
|
+
return console.warn("[formie] Google Places API not ready; address autocomplete skipped."), null;
|
|
110
|
+
const i = G(a), l = new s(i), d = window.getComputedStyle(o).height;
|
|
111
|
+
l.style.height = d, l.style.boxSizing = "border-box";
|
|
112
|
+
let r = o.parentElement;
|
|
113
|
+
r?.classList.contains("formie-autocomplete-wrapper") || (r = document.createElement("div"), r.classList.add("formie-autocomplete-wrapper"), o.parentNode?.insertBefore(r, o), r.appendChild(o));
|
|
114
|
+
const u = o.value;
|
|
115
|
+
if (u) {
|
|
116
|
+
const c = document.createElement("div");
|
|
117
|
+
c.classList.add("formie-autocomplete-placeholder"), c.textContent = u, r.style.position = "relative", c.style.cssText = `
|
|
118
|
+
position: absolute; left: 0; top: 0; height: ${d};
|
|
119
|
+
line-height: ${d}; width: 100%; padding: 0 2.5rem;
|
|
120
|
+
pointer-events: none; color: #6B7280; font-size: 14px; z-index: 1;
|
|
121
|
+
`, r.appendChild(c), l.addEventListener("focusin", () => {
|
|
122
|
+
c.style.display = "none";
|
|
123
|
+
}), l.addEventListener("focusout", () => {
|
|
124
|
+
o.value && (c.style.display = "");
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
r.replaceChild(l, o), o.type = "hidden", o.name = o.getAttribute("name") || "", r.appendChild(o);
|
|
128
|
+
const y = async (c) => {
|
|
129
|
+
const h = c.placePrediction;
|
|
130
|
+
if (!h) return;
|
|
131
|
+
const p = await h.toPlace();
|
|
132
|
+
if (await p.fetchFields({ fields: ["addressComponents", "formattedAddress"] }), !p.addressComponents) return;
|
|
133
|
+
const P = b(
|
|
134
|
+
p.addressComponents
|
|
135
|
+
), _ = C(P);
|
|
136
|
+
A(n, {
|
|
137
|
+
..._,
|
|
138
|
+
formattedAddress: p.formattedAddress
|
|
139
|
+
}), e.dispatchEvent(
|
|
140
|
+
new CustomEvent(E("google", "populate"), {
|
|
141
|
+
bubbles: !0,
|
|
142
|
+
detail: {
|
|
143
|
+
addressProvider: "google",
|
|
144
|
+
place: p,
|
|
145
|
+
formattedAddress: p.formattedAddress,
|
|
146
|
+
addressComponents: p.addressComponents
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
return l.addEventListener("gmp-select", y), l;
|
|
152
|
+
},
|
|
153
|
+
onCurrentLocation: async (t, { field: e, services: n }) => {
|
|
154
|
+
const { latitude: a, longitude: o } = t.coords, s = n.form, i = s?.action || window.location.href, l = e.getAttribute("data-formie-field-handle")?.trim(), d = s?.querySelector('[name="handle"]')?.value?.trim();
|
|
155
|
+
if (!(!d || !l))
|
|
156
|
+
try {
|
|
157
|
+
const r = new FormData();
|
|
158
|
+
r.append("action", "formie/address/google-places-geocode"), r.append("latlng", `${a},${o}`), r.append("handle", d), r.append("fieldHandle", l);
|
|
159
|
+
const y = await (await fetch(i, {
|
|
160
|
+
method: "POST",
|
|
161
|
+
body: r,
|
|
162
|
+
credentials: "include",
|
|
163
|
+
headers: {
|
|
164
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
165
|
+
Accept: "application/json"
|
|
166
|
+
}
|
|
167
|
+
})).json();
|
|
168
|
+
if (y?.results?.[0]?.address_components) {
|
|
169
|
+
const c = b(
|
|
170
|
+
y.results[0].address_components
|
|
171
|
+
), g = C(c);
|
|
172
|
+
A(n, g);
|
|
173
|
+
}
|
|
174
|
+
} catch {
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
export {
|
|
179
|
+
G as buildGoogleAutocompleteOptions,
|
|
180
|
+
I as googleAddressModule
|
|
181
|
+
};
|