@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,459 @@
|
|
|
1
|
+
import { S as te, A as re } from "./index-BEsfee-D.js";
|
|
2
|
+
import { e as V } from "./shared-BmntPmnW.js";
|
|
3
|
+
import { j as F, h as ne } from "./index-BcqwpPNE.js";
|
|
4
|
+
const D = "[data-formie-conditions]";
|
|
5
|
+
function ie(e) {
|
|
6
|
+
if (!e || typeof e != "object")
|
|
7
|
+
return null;
|
|
8
|
+
const t = e, r = t.transformerParams;
|
|
9
|
+
return {
|
|
10
|
+
raw: typeof t.raw == "string" ? t.raw : "",
|
|
11
|
+
target: typeof t.target == "string" ? t.target : "",
|
|
12
|
+
handle: typeof t.handle == "string" ? t.handle : "",
|
|
13
|
+
selector: typeof t.selector == "string" ? t.selector : "",
|
|
14
|
+
defaultValue: typeof t.defaultValue == "string" ? t.defaultValue : "",
|
|
15
|
+
transformerId: typeof t.transformerId == "string" ? t.transformerId : "",
|
|
16
|
+
transformerParams: r && typeof r == "object" ? Object.fromEntries(Object.entries(r).map(([n, i]) => [n, String(i ?? "")])) : {},
|
|
17
|
+
isValid: t.isValid !== !1
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function $(e) {
|
|
21
|
+
const t = Array.from(e.querySelectorAll(D));
|
|
22
|
+
return e.matches(D) ? [e, ...t] : t;
|
|
23
|
+
}
|
|
24
|
+
function se(e) {
|
|
25
|
+
const t = e.getAttribute("data-formie-conditions");
|
|
26
|
+
if (!t)
|
|
27
|
+
return null;
|
|
28
|
+
try {
|
|
29
|
+
const r = JSON.parse(t), n = Array.isArray(r.conditions) ? r.conditions.filter((i) => {
|
|
30
|
+
if (!i || typeof i != "object")
|
|
31
|
+
return !1;
|
|
32
|
+
const s = i;
|
|
33
|
+
return typeof s.field == "string" && typeof s.condition == "string";
|
|
34
|
+
}).map((i) => {
|
|
35
|
+
const s = i;
|
|
36
|
+
return {
|
|
37
|
+
field: i.field,
|
|
38
|
+
source: ie(s.source),
|
|
39
|
+
condition: i.condition,
|
|
40
|
+
value: i.value
|
|
41
|
+
};
|
|
42
|
+
}) : [];
|
|
43
|
+
return {
|
|
44
|
+
showRule: r.showRule === "hide" ? "hide" : "show",
|
|
45
|
+
conditionRule: r.conditionRule === "any" ? "any" : "all",
|
|
46
|
+
clearOnHide: r.clearOnHide !== !1,
|
|
47
|
+
isNested: !!r.isNested,
|
|
48
|
+
conditions: n
|
|
49
|
+
};
|
|
50
|
+
} catch (r) {
|
|
51
|
+
return console.error("[formie] Invalid condition JSON.", r), null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const M = "data-formie-conditions-disabled", v = "data-formie-preserve-disabled", T = "data-formie-conditionally-hidden", C = "data-formie-page-hidden", O = "formie-conditionally-hidden", L = "fui-cp-muted-conditional-field", x = "fui-cp-muted-conditional-field--expanded", I = "data-formie-cp-muted", w = "formie-page-hidden", E = "data-formie-row-hidden", R = "formie-row-hidden", H = "data-formie-field-count", U = "[data-formie-row], [data-formie-subfield-row], [data-formie-nested-field-row]", oe = ":scope > [data-formie-field]";
|
|
55
|
+
function ae(e) {
|
|
56
|
+
e.querySelectorAll("input, select, textarea").forEach((t) => {
|
|
57
|
+
!(t instanceof HTMLInputElement) && !(t instanceof HTMLSelectElement) && !(t instanceof HTMLTextAreaElement) || (t instanceof HTMLInputElement && (t.type === "checkbox" || t.type === "radio" ? t.checked = !1 : t.type !== "hidden" && (t.value = "")), t instanceof HTMLSelectElement && (t.multiple ? Array.from(t.options).forEach((r) => {
|
|
58
|
+
r.selected = !1;
|
|
59
|
+
}) : t.selectedIndex = 0), t instanceof HTMLTextAreaElement && (t.value = ""));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function ue(e, t) {
|
|
63
|
+
const r = e.hasAttribute("data-formie-page"), n = r ? C : T, i = r ? w : O, s = e.hasAttribute(n);
|
|
64
|
+
return t ? (s || e.setAttribute(n, "true"), e.classList.contains(i) || e.classList.add(i)) : (s && e.removeAttribute(n), e.classList.contains(i) && e.classList.remove(i)), s !== t;
|
|
65
|
+
}
|
|
66
|
+
function le(e, t) {
|
|
67
|
+
e.querySelectorAll("input, textarea, select").forEach((r) => {
|
|
68
|
+
if (t) {
|
|
69
|
+
r.hasAttribute(M) || (r.hasAttribute("disabled") && r.setAttribute(v, "true"), r.setAttribute(M, "true")), r.setAttribute("disabled", "true");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
r.hasAttribute(M) && (r.hasAttribute(v) ? (r.setAttribute("disabled", "true"), r.removeAttribute(v)) : r.removeAttribute("disabled"), r.removeAttribute(M));
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function ce(e) {
|
|
76
|
+
return !e.hasAttribute(T) && !e.hasAttribute(C) && !e.hasAttribute(E) && !e.hasAttribute("hidden");
|
|
77
|
+
}
|
|
78
|
+
function fe(e) {
|
|
79
|
+
const r = Array.from(e.querySelectorAll(oe)).filter((n) => ce(n)).length;
|
|
80
|
+
if (r > 0) {
|
|
81
|
+
const n = String(r);
|
|
82
|
+
e.getAttribute(H) !== n && e.setAttribute(H, n), e.hasAttribute(E) && e.removeAttribute(E), e.classList.contains(R) && e.classList.remove(R);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
e.hasAttribute(H) && e.removeAttribute(H), e.hasAttribute(E) || e.setAttribute(E, "true"), e.classList.contains(R) || e.classList.add(R);
|
|
86
|
+
}
|
|
87
|
+
function K(e) {
|
|
88
|
+
e.removeAttribute(I), e.classList.remove(L), e.classList.remove(x);
|
|
89
|
+
}
|
|
90
|
+
function B(e) {
|
|
91
|
+
e.removeAttribute(T), e.removeAttribute(C), e.classList.remove(O), e.classList.remove(w);
|
|
92
|
+
}
|
|
93
|
+
function Q(e) {
|
|
94
|
+
let t = e.closest(U);
|
|
95
|
+
for (; t; )
|
|
96
|
+
fe(t), t = t.parentElement?.closest(U) || null;
|
|
97
|
+
}
|
|
98
|
+
function de(e, t, r, n = {}) {
|
|
99
|
+
if (n.displayMode === "muted")
|
|
100
|
+
return me(e, t);
|
|
101
|
+
let i = !1;
|
|
102
|
+
return (e.hasAttribute(I) || e.classList.contains(L) || e.classList.contains(x)) && (K(e), i = !0), i = ue(e, t) || i, le(e, t), Q(e), t && r && i && ae(e), i;
|
|
103
|
+
}
|
|
104
|
+
function me(e, t) {
|
|
105
|
+
let r = !1;
|
|
106
|
+
return t ? ((e.hasAttribute(T) || e.hasAttribute(C) || e.classList.contains(O) || e.classList.contains(w)) && (B(e), r = !0), e.hasAttribute(I) || (e.setAttribute(I, "true"), r = !0), e.classList.contains(L) || (e.classList.add(L), r = !0)) : ((e.hasAttribute(I) || e.classList.contains(L) || e.classList.contains(x)) && (K(e), r = !0), (e.hasAttribute(T) || e.hasAttribute(C) || e.classList.contains(O) || e.classList.contains(w)) && (B(e), r = !0)), Q(e), r;
|
|
107
|
+
}
|
|
108
|
+
const X = "input, select, textarea", he = "[data-formie-repeater-item], [data-formie-table-row]";
|
|
109
|
+
function A(e) {
|
|
110
|
+
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement;
|
|
111
|
+
}
|
|
112
|
+
function pe(e) {
|
|
113
|
+
const t = e.querySelector(X);
|
|
114
|
+
if (!t)
|
|
115
|
+
return null;
|
|
116
|
+
const r = t.getAttribute("name") || "", n = Array.from(r.matchAll(/\[(\d+)\]/g));
|
|
117
|
+
return n.length && n[n.length - 1]?.[1] || null;
|
|
118
|
+
}
|
|
119
|
+
function Y(e) {
|
|
120
|
+
return e.closest(he);
|
|
121
|
+
}
|
|
122
|
+
function ge(e) {
|
|
123
|
+
return Array.from(e.querySelectorAll(X)).filter((t) => A(t));
|
|
124
|
+
}
|
|
125
|
+
function Ae(e) {
|
|
126
|
+
const t = e.getAttribute("name") || "";
|
|
127
|
+
return Array.from(t.matchAll(/\[([^\]]+)\]/g)).map((r) => r[1] || "").filter(Boolean);
|
|
128
|
+
}
|
|
129
|
+
function be(e, t) {
|
|
130
|
+
if (!t)
|
|
131
|
+
return !0;
|
|
132
|
+
const r = t.split(/[.:]/).filter(Boolean);
|
|
133
|
+
if (!r.length)
|
|
134
|
+
return !0;
|
|
135
|
+
const n = Ae(e);
|
|
136
|
+
return n.length < r.length ? !1 : r.every((i, s) => n[n.length - r.length + s] === i);
|
|
137
|
+
}
|
|
138
|
+
function ye(e, t) {
|
|
139
|
+
if (!t)
|
|
140
|
+
return e;
|
|
141
|
+
const r = e.filter((n) => be(n, t));
|
|
142
|
+
return r.length ? r : e;
|
|
143
|
+
}
|
|
144
|
+
function j(e, t) {
|
|
145
|
+
const r = Y(e);
|
|
146
|
+
if (!r)
|
|
147
|
+
return t;
|
|
148
|
+
const n = t.filter((i) => Y(i) === r);
|
|
149
|
+
return n.length ? n : t;
|
|
150
|
+
}
|
|
151
|
+
function Z(e) {
|
|
152
|
+
return e.source?.target === "field" && e.source.handle ? e.source : null;
|
|
153
|
+
}
|
|
154
|
+
function W(e, t, r) {
|
|
155
|
+
const n = Z(r);
|
|
156
|
+
if (!n || n.target !== "field" || !n.handle)
|
|
157
|
+
return [];
|
|
158
|
+
const i = V(n.handle), s = Array.from(e.querySelectorAll(`[data-formie-field-handle="${i}"]`));
|
|
159
|
+
if (s.length)
|
|
160
|
+
return j(t, s).flatMap((f) => ye(ge(f), n.selector));
|
|
161
|
+
const l = F(n.handle), c = V(l), h = Array.from(e.querySelectorAll(`[name="${c}"]`)).filter((f) => A(f)), d = Array.from(e.querySelectorAll(`[name="${c}[]"]`)).filter((f) => A(f));
|
|
162
|
+
if (h.length || d.length)
|
|
163
|
+
return j(t, [...h, ...d]);
|
|
164
|
+
if (!n.handle.includes("__ROW__"))
|
|
165
|
+
return [];
|
|
166
|
+
const _ = pe(t);
|
|
167
|
+
if (_) {
|
|
168
|
+
const f = F(n.handle.replace(/__ROW__/g, _)), b = V(f), N = Array.from(e.querySelectorAll(`[name="${b}"]`)).filter((o) => A(o)), y = Array.from(e.querySelectorAll(`[name="${b}[]"]`)).filter((o) => A(o));
|
|
169
|
+
if (N.length || y.length)
|
|
170
|
+
return [...N, ...y];
|
|
171
|
+
}
|
|
172
|
+
const P = F(n.handle).replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/__ROW__/g, "\\d+"), p = new RegExp(P);
|
|
173
|
+
return Array.from(e.querySelectorAll("[name]")).filter((f) => A(f) && p.test(f.getAttribute("name") || ""));
|
|
174
|
+
}
|
|
175
|
+
function Se(e) {
|
|
176
|
+
return e == null ? "" : String(e);
|
|
177
|
+
}
|
|
178
|
+
function Ee(e) {
|
|
179
|
+
if (typeof e == "boolean")
|
|
180
|
+
return e;
|
|
181
|
+
if (typeof e == "number")
|
|
182
|
+
return e !== 0;
|
|
183
|
+
const t = Se(e).trim().toLowerCase();
|
|
184
|
+
return !(!t || ["0", "false", "no", "off"].includes(t));
|
|
185
|
+
}
|
|
186
|
+
function Le(e) {
|
|
187
|
+
return e.toLowerCase().replace(/\b\w/g, (t) => t.toUpperCase());
|
|
188
|
+
}
|
|
189
|
+
function Ie(e, t) {
|
|
190
|
+
const r = Number.isFinite(Number(t.decimals)) ? Number(t.decimals) : 0, n = t.decimalPoint ?? ".", i = t.thousandsSeparator ?? ",", s = e.toFixed(r), [l, c = ""] = s.split("."), h = l.replace(/\B(?=(\d{3})+(?!\d))/g, i);
|
|
191
|
+
return r === 0 ? h : `${h}${n}${c}`;
|
|
192
|
+
}
|
|
193
|
+
function S(e) {
|
|
194
|
+
return String(e).padStart(2, "0");
|
|
195
|
+
}
|
|
196
|
+
function Te(e, t) {
|
|
197
|
+
return [
|
|
198
|
+
["Y", String(e.getFullYear())],
|
|
199
|
+
["m", S(e.getMonth() + 1)],
|
|
200
|
+
["d", S(e.getDate())],
|
|
201
|
+
["j", String(e.getDate())],
|
|
202
|
+
["H", S(e.getHours())],
|
|
203
|
+
["h", S((e.getHours() + 11) % 12 + 1)],
|
|
204
|
+
["i", S(e.getMinutes())],
|
|
205
|
+
["A", e.getHours() >= 12 ? "PM" : "AM"],
|
|
206
|
+
["F", e.toLocaleString(void 0, { month: "long" })]
|
|
207
|
+
].reduce((n, [i, s]) => n.replaceAll(i, s), t);
|
|
208
|
+
}
|
|
209
|
+
function Ce(e) {
|
|
210
|
+
switch (e) {
|
|
211
|
+
case "datetimeUs12":
|
|
212
|
+
return "m/d/Y h:i A";
|
|
213
|
+
case "datetimeEu12":
|
|
214
|
+
return "d/m/Y h:i A";
|
|
215
|
+
case "datetimeEu24":
|
|
216
|
+
return "d/m/Y H:i";
|
|
217
|
+
case "datetimeIso24":
|
|
218
|
+
return "Y-m-d H:i";
|
|
219
|
+
case "dateUs":
|
|
220
|
+
return "m/d/Y";
|
|
221
|
+
case "dateEu":
|
|
222
|
+
return "d/m/Y";
|
|
223
|
+
case "isoDate":
|
|
224
|
+
return "Y-m-d";
|
|
225
|
+
case "dateLong":
|
|
226
|
+
return "F j, Y";
|
|
227
|
+
case "time12":
|
|
228
|
+
return "h:i A";
|
|
229
|
+
case "time24":
|
|
230
|
+
return "H:i";
|
|
231
|
+
default:
|
|
232
|
+
return "";
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function _e(e, t) {
|
|
236
|
+
const r = t.transformerId, n = t.transformerParams;
|
|
237
|
+
switch (r) {
|
|
238
|
+
case "round":
|
|
239
|
+
case "floor":
|
|
240
|
+
case "ceil": {
|
|
241
|
+
const i = Number(e);
|
|
242
|
+
return Number.isFinite(i) ? String(r === "round" ? Math.round(i) : r === "floor" ? Math.floor(i) : Math.ceil(i)) : e;
|
|
243
|
+
}
|
|
244
|
+
case "format": {
|
|
245
|
+
const i = Number(e);
|
|
246
|
+
if (Number.isFinite(i) && e.trim() !== "")
|
|
247
|
+
return Ie(i, n);
|
|
248
|
+
const s = n.preset || "", l = s === "custom" ? n.pattern || "" : Ce(s);
|
|
249
|
+
if (!l)
|
|
250
|
+
return e;
|
|
251
|
+
const c = new Date(e);
|
|
252
|
+
return Number.isNaN(c.getTime()) ? e : Te(c, l);
|
|
253
|
+
}
|
|
254
|
+
case "lower":
|
|
255
|
+
return e.toLowerCase();
|
|
256
|
+
case "upper":
|
|
257
|
+
return e.toUpperCase();
|
|
258
|
+
case "title":
|
|
259
|
+
return Le(e);
|
|
260
|
+
case "capitalize":
|
|
261
|
+
return e && e.charAt(0).toUpperCase() + e.slice(1);
|
|
262
|
+
case "replace": {
|
|
263
|
+
const i = n.search || "";
|
|
264
|
+
return i ? e.split(i).join(n.replace || "") : e;
|
|
265
|
+
}
|
|
266
|
+
case "truncate": {
|
|
267
|
+
const i = Math.max(1, Number.parseInt(n.length || "50", 10) || 50), s = n.suffix || "...";
|
|
268
|
+
return e.length <= i ? e : `${e.slice(0, Math.max(0, i - s.length))}${s}`;
|
|
269
|
+
}
|
|
270
|
+
case "map":
|
|
271
|
+
return Ee(e) ? n.trueLabel || "Yes" : n.falseLabel || "No";
|
|
272
|
+
default:
|
|
273
|
+
return e;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function Ne(e, t) {
|
|
277
|
+
if (!t)
|
|
278
|
+
return e;
|
|
279
|
+
const r = t.transformerId ? e.map((n) => _e(n, t)) : e;
|
|
280
|
+
return (r.length === 0 || r.every((n) => n.trim() === "")) && t.defaultValue ? [t.defaultValue] : r;
|
|
281
|
+
}
|
|
282
|
+
function Me(e, t) {
|
|
283
|
+
return e.name || `__condition_input_${t}`;
|
|
284
|
+
}
|
|
285
|
+
function G(e) {
|
|
286
|
+
const t = e.id ? e.ownerDocument.querySelector(`label[for="${e.id}"]`)?.textContent?.trim() : "";
|
|
287
|
+
return t || e.closest("label")?.textContent?.trim() || "";
|
|
288
|
+
}
|
|
289
|
+
function Re(e, t = "") {
|
|
290
|
+
const r = e[0];
|
|
291
|
+
if (!r)
|
|
292
|
+
return [];
|
|
293
|
+
if (r instanceof HTMLInputElement) {
|
|
294
|
+
if (r.type === "checkbox") {
|
|
295
|
+
const n = e.filter((i) => i instanceof HTMLInputElement && i.checked);
|
|
296
|
+
return t === "label" ? n.map((i) => G(i)).filter(Boolean) : n.map((i) => i.value);
|
|
297
|
+
}
|
|
298
|
+
if (r.type === "radio") {
|
|
299
|
+
const n = e.filter((i) => i instanceof HTMLInputElement && i.checked);
|
|
300
|
+
return t === "label" ? n.map((i) => G(i)).filter(Boolean) : n.map((i) => i.value);
|
|
301
|
+
}
|
|
302
|
+
if (r.type === "file")
|
|
303
|
+
return Array.from(r.files || []).map((n) => n.name);
|
|
304
|
+
}
|
|
305
|
+
return r instanceof HTMLSelectElement && r.multiple ? t === "label" ? Array.from(r.selectedOptions).map((n) => n.label || n.text) : Array.from(r.selectedOptions).map((n) => n.value) : r instanceof HTMLSelectElement && t === "label" ? Array.from(r.selectedOptions).map((n) => n.label || n.text) : e.map((n) => n.value);
|
|
306
|
+
}
|
|
307
|
+
function z(e) {
|
|
308
|
+
return ["input", "change"];
|
|
309
|
+
}
|
|
310
|
+
function He(e, t = null) {
|
|
311
|
+
const r = /* @__PURE__ */ new Map();
|
|
312
|
+
e.forEach((i, s) => {
|
|
313
|
+
const l = Me(i, s), c = r.get(l) || [];
|
|
314
|
+
c.push(i), r.set(l, c);
|
|
315
|
+
});
|
|
316
|
+
const n = Array.from(r.values()).flatMap((i) => Re(i, t?.selector || ""));
|
|
317
|
+
return Ne(n, t);
|
|
318
|
+
}
|
|
319
|
+
function De(e) {
|
|
320
|
+
return e.closest("[data-formie-conditionally-hidden]") || e.closest("[data-formie-page-hidden]") || e.closest("[hidden]") || e.closest('[aria-hidden="true"]') ? !1 : !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
|
|
321
|
+
}
|
|
322
|
+
function Oe(e) {
|
|
323
|
+
return e.length ? e.some((t) => De(t)) : null;
|
|
324
|
+
}
|
|
325
|
+
function we(e, t) {
|
|
326
|
+
const r = e.conditions.map((n) => {
|
|
327
|
+
const i = t(n), s = Z(n);
|
|
328
|
+
return te(n, He(i, s), {
|
|
329
|
+
visibility: Oe(i)
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
return re(e, r);
|
|
333
|
+
}
|
|
334
|
+
const q = 4, g = ne("conditions");
|
|
335
|
+
function J(e) {
|
|
336
|
+
const t = /* @__PURE__ */ new Set();
|
|
337
|
+
return e.filter((r) => t.has(r) ? !1 : (t.add(r), !0));
|
|
338
|
+
}
|
|
339
|
+
const ve = {
|
|
340
|
+
id: "conditions",
|
|
341
|
+
kind: "field",
|
|
342
|
+
match: (e) => e.target instanceof HTMLElement && (e.target.matches(D) || !!e.target.querySelector(D)),
|
|
343
|
+
setup: async (e) => {
|
|
344
|
+
const t = e.target instanceof HTMLElement ? e.target : e.root;
|
|
345
|
+
if (!$(t).length) {
|
|
346
|
+
g.log("No condition nodes in scope.");
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
const r = [];
|
|
350
|
+
let n = [], i = !1, s = !1;
|
|
351
|
+
const l = () => {
|
|
352
|
+
r.forEach((o) => {
|
|
353
|
+
o();
|
|
354
|
+
}), r.length = 0;
|
|
355
|
+
}, c = () => $(t).flatMap((o) => {
|
|
356
|
+
const a = se(o);
|
|
357
|
+
if (!a || !a.conditions.length)
|
|
358
|
+
return [];
|
|
359
|
+
const u = J(a.conditions.flatMap((m) => W(t, o, m)));
|
|
360
|
+
return [{
|
|
361
|
+
node: o,
|
|
362
|
+
settings: a,
|
|
363
|
+
sourceInputs: u
|
|
364
|
+
}];
|
|
365
|
+
}), h = e.options?.cpDisplayMode === "muted" ? "muted" : "hide";
|
|
366
|
+
let d = !1;
|
|
367
|
+
const _ = () => {
|
|
368
|
+
let o = !1;
|
|
369
|
+
return n.forEach((a) => {
|
|
370
|
+
const u = we(a.settings, (ee) => W(t, a.node, ee)), m = a.node.hasAttribute("data-formie-page") ? "hide" : h, k = de(
|
|
371
|
+
a.node,
|
|
372
|
+
u.shouldHide,
|
|
373
|
+
a.settings.clearOnHide,
|
|
374
|
+
{ displayMode: m }
|
|
375
|
+
);
|
|
376
|
+
o = o || k, g.log("Condition evaluated.", {
|
|
377
|
+
shouldHide: u.shouldHide,
|
|
378
|
+
finalResult: u.finalResult,
|
|
379
|
+
stateChanged: k
|
|
380
|
+
}), e.emit("formie:conditions:evaluated", {
|
|
381
|
+
node: a.node,
|
|
382
|
+
shouldHide: u.shouldHide,
|
|
383
|
+
finalResult: u.finalResult,
|
|
384
|
+
clearOnHide: a.settings.clearOnHide
|
|
385
|
+
});
|
|
386
|
+
}), o;
|
|
387
|
+
}, P = () => {
|
|
388
|
+
if (!d) {
|
|
389
|
+
d = !0;
|
|
390
|
+
try {
|
|
391
|
+
for (let o = 0; o < q && _(); o += 1)
|
|
392
|
+
o === q - 1 && g.warn("Reached max evaluation passes.", { maxPasses: q });
|
|
393
|
+
} finally {
|
|
394
|
+
d = !1;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}, p = () => {
|
|
398
|
+
d || i || (i = !0, requestAnimationFrame(() => {
|
|
399
|
+
i = !1, !d && P();
|
|
400
|
+
}));
|
|
401
|
+
}, f = () => {
|
|
402
|
+
if (J(n.flatMap((o) => o.sourceInputs)).forEach((o) => {
|
|
403
|
+
const a = () => {
|
|
404
|
+
p();
|
|
405
|
+
};
|
|
406
|
+
z().forEach((u) => {
|
|
407
|
+
o.addEventListener(u, a);
|
|
408
|
+
}), r.push(() => {
|
|
409
|
+
z().forEach((u) => {
|
|
410
|
+
o.removeEventListener(u, a);
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
}), e.form) {
|
|
414
|
+
const o = () => {
|
|
415
|
+
window.setTimeout(() => {
|
|
416
|
+
p();
|
|
417
|
+
}, 0);
|
|
418
|
+
};
|
|
419
|
+
e.form.addEventListener("reset", o), r.push(() => {
|
|
420
|
+
e.form?.removeEventListener("reset", o);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
}, b = () => {
|
|
424
|
+
l(), n = c(), f(), g.log("Rebuilt condition graph.", {
|
|
425
|
+
entryCount: n.length
|
|
426
|
+
}), p();
|
|
427
|
+
}, N = () => {
|
|
428
|
+
d || s || (s = !0, requestAnimationFrame(() => {
|
|
429
|
+
s = !1, !d && b();
|
|
430
|
+
}));
|
|
431
|
+
}, y = new MutationObserver((o) => {
|
|
432
|
+
if (d)
|
|
433
|
+
return;
|
|
434
|
+
const a = o.some((m) => m.type === "childList" && (m.addedNodes.length > 0 || m.removedNodes.length > 0)), u = o.some((m) => m.type === "attributes");
|
|
435
|
+
a ? N() : u && p();
|
|
436
|
+
});
|
|
437
|
+
return y.observe(t, {
|
|
438
|
+
childList: !0,
|
|
439
|
+
subtree: !0,
|
|
440
|
+
attributes: !0,
|
|
441
|
+
attributeFilter: [
|
|
442
|
+
"hidden",
|
|
443
|
+
"aria-hidden",
|
|
444
|
+
"data-formie-conditionally-hidden",
|
|
445
|
+
"data-formie-page-hidden",
|
|
446
|
+
"data-formie-row-hidden"
|
|
447
|
+
]
|
|
448
|
+
}), b(), await e.emit("formie:module:conditions:init", {
|
|
449
|
+
count: n.length
|
|
450
|
+
}), g.log("Module setup complete.", { entryCount: n.length }), {
|
|
451
|
+
destroy: () => {
|
|
452
|
+
l(), y.disconnect(), g.log("Module destroy."), e.emit("formie:module:conditions:destroy", {});
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
export {
|
|
458
|
+
ve as conditionsModule
|
|
459
|
+
};
|