@verbb/formie-browser 1.0.0 → 1.0.2
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-CQW81kY0.js +37 -0
- package/dist/chunks/bpoint-D8OjLmsn.js +26 -0
- package/dist/chunks/calculations-BqZsENCq.js +147 -0
- package/dist/chunks/captcha-eu-DIa6aUWz.js +34 -0
- package/dist/chunks/checkbox-radio-BI-UjgMF.js +136 -0
- package/dist/chunks/conditions-BVl6jTYo.js +433 -0
- package/dist/chunks/date-picker-69TgvErA.js +4994 -0
- package/dist/chunks/eway-1GPxH6DU.js +74 -0
- package/dist/chunks/file-upload-BDZZftgL.js +281 -0
- package/dist/chunks/friendly-captcha-v1-DA2QPKA3.js +33 -0
- package/dist/chunks/friendly-captcha-v2-BorOWiz_.js +38 -0
- package/dist/chunks/go-cardless-DwBgERcA.js +24 -0
- package/dist/chunks/google-address-BcTBncyS.js +162 -0
- package/dist/chunks/hcaptcha-BchdVCqq.js +56 -0
- package/dist/chunks/hidden-D8RqSPt7.js +31 -0
- package/dist/chunks/index-BEsfee-D.js +1839 -0
- package/dist/chunks/index-BP7Unm5Y.js +863 -0
- package/dist/chunks/index-C1ZOKiAi.js +4229 -0
- package/dist/chunks/loqate-nXuTX7In.js +55 -0
- package/dist/chunks/mollie-qdCynQCd.js +24 -0
- package/dist/chunks/moneris-BNEA-laO.js +101 -0
- package/dist/chunks/opayo-BJtXOkuK.js +122 -0
- package/dist/chunks/paddle-D72Pa8kr.js +60 -0
- package/dist/chunks/paypal-Cqt2bned.js +100 -0
- package/dist/chunks/payway-BjCqsc0H.js +56 -0
- package/dist/chunks/phone-country-K9pYAlzM.js +3765 -0
- package/dist/chunks/place-kit-Dg6f_UoM.js +42 -0
- package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +1299 -0
- package/dist/chunks/recaptcha-enterprise--VYAeeqz.js +71 -0
- package/dist/chunks/recaptcha-shared-PSIEEEe1.js +15 -0
- package/dist/chunks/recaptcha-v2-checkbox-atBNe5ml.js +41 -0
- package/dist/chunks/recaptcha-v2-invisible-DnBufNPT.js +59 -0
- package/dist/chunks/recaptcha-v3-CF6O8rDj.js +28 -0
- package/dist/chunks/repeater-CB7Yojvx.js +124 -0
- package/dist/chunks/rich-text-nAV_SQZo.js +304 -0
- package/dist/chunks/scripts-BkAAux0i.js +36 -0
- package/dist/chunks/sdk-3SicTWby.js +1559 -0
- package/dist/chunks/shared-DGqeMvcJ.js +80 -0
- package/dist/chunks/signature-BT6CsQ6n.js +550 -0
- package/dist/chunks/snaptcha-C7qQo02f.js +8 -0
- package/dist/chunks/square-C5AH3trb.js +46 -0
- package/dist/chunks/stripe-EJK0RyUv.js +202 -0
- package/dist/chunks/styles-C3aqgtek.js +21 -0
- package/dist/chunks/summary-DC_ipXCU.js +126 -0
- package/dist/chunks/table-BEAI99qo.js +95 -0
- package/dist/chunks/text-limit-Blgq5G-G.js +135 -0
- package/dist/chunks/turnstile-_uCRwnU-.js +59 -0
- package/dist/chunks/utils-BntI3W4S.js +6149 -0
- package/dist/index.js +39 -3205
- package/package.json +5 -5
- package/src/js/modules/fields/file-upload.ts +1 -1
- 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/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-Bh63PQSE.js +0 -430
- 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-Cn_DYGDb.js +0 -121
- package/dist/chunks/payway-Rnq796eC.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-CXD1eLSn.js +0 -151
- package/dist/chunks/rich-text-DkmZRhGj.js +0 -442
- 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-E9KyYXS1.js +0 -765
- package/dist/chunks/snaptcha-CCDunGeb.js +0 -8
- package/dist/chunks/square-BLqK51rS.js +0 -61
- package/dist/chunks/stripe-B8gHpZNC.js +0 -273
- package/dist/chunks/styles-BIh6g7V_.js +0 -22
- package/dist/chunks/summary-EcNE0cvg.js +0 -191
- package/dist/chunks/table-yxEDL6kA.js +0 -124
- package/dist/chunks/text-limit-D0H_Ca2c.js +0 -179
- 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,304 @@
|
|
|
1
|
+
import { g as j, d as M } from "./shared-DGqeMvcJ.js";
|
|
2
|
+
import { e as q } from "./styles-C3aqgtek.js";
|
|
3
|
+
var b = { exports: {} }, R = b.exports, B;
|
|
4
|
+
function O() {
|
|
5
|
+
return B || (B = 1, (function(o, r) {
|
|
6
|
+
(function(d, a) {
|
|
7
|
+
a(r);
|
|
8
|
+
})(R, function(d) {
|
|
9
|
+
var a = Object.assign || function(e) {
|
|
10
|
+
for (var c = 1; c < arguments.length; c++) {
|
|
11
|
+
var u = arguments[c];
|
|
12
|
+
for (var g in u) Object.prototype.hasOwnProperty.call(u, g) && (e[g] = u[g]);
|
|
13
|
+
}
|
|
14
|
+
return e;
|
|
15
|
+
}, f = "defaultParagraphSeparator", s = "formatBlock", h = function(e, c, u) {
|
|
16
|
+
return e.addEventListener(c, u);
|
|
17
|
+
}, k = function(e, c) {
|
|
18
|
+
return e.appendChild(c);
|
|
19
|
+
}, y = function(e) {
|
|
20
|
+
return document.createElement(e);
|
|
21
|
+
}, x = function(e) {
|
|
22
|
+
return document.queryCommandState(e);
|
|
23
|
+
}, i = function(e) {
|
|
24
|
+
var c = 1 < arguments.length && arguments[1] !== void 0 ? arguments[1] : null;
|
|
25
|
+
return document.execCommand(e, !1, c);
|
|
26
|
+
}, v = { bold: { icon: "<b>B</b>", title: "Bold", state: function() {
|
|
27
|
+
return x("bold");
|
|
28
|
+
}, result: function() {
|
|
29
|
+
return i("bold");
|
|
30
|
+
} }, italic: { icon: "<i>I</i>", title: "Italic", state: function() {
|
|
31
|
+
return x("italic");
|
|
32
|
+
}, result: function() {
|
|
33
|
+
return i("italic");
|
|
34
|
+
} }, underline: { icon: "<u>U</u>", title: "Underline", state: function() {
|
|
35
|
+
return x("underline");
|
|
36
|
+
}, result: function() {
|
|
37
|
+
return i("underline");
|
|
38
|
+
} }, strikethrough: { icon: "<strike>S</strike>", title: "Strike-through", state: function() {
|
|
39
|
+
return x("strikeThrough");
|
|
40
|
+
}, result: function() {
|
|
41
|
+
return i("strikeThrough");
|
|
42
|
+
} }, heading1: { icon: "<b>H<sub>1</sub></b>", title: "Heading 1", result: function() {
|
|
43
|
+
return i(s, "<h1>");
|
|
44
|
+
} }, heading2: { icon: "<b>H<sub>2</sub></b>", title: "Heading 2", result: function() {
|
|
45
|
+
return i(s, "<h2>");
|
|
46
|
+
} }, paragraph: { icon: "¶", title: "Paragraph", result: function() {
|
|
47
|
+
return i(s, "<p>");
|
|
48
|
+
} }, quote: { icon: "“ ”", title: "Quote", result: function() {
|
|
49
|
+
return i(s, "<blockquote>");
|
|
50
|
+
} }, olist: { icon: "#", title: "Ordered List", result: function() {
|
|
51
|
+
return i("insertOrderedList");
|
|
52
|
+
} }, ulist: { icon: "•", title: "Unordered List", result: function() {
|
|
53
|
+
return i("insertUnorderedList");
|
|
54
|
+
} }, code: { icon: "</>", title: "Code", result: function() {
|
|
55
|
+
return i(s, "<pre>");
|
|
56
|
+
} }, line: { icon: "―", title: "Horizontal Line", result: function() {
|
|
57
|
+
return i("insertHorizontalRule");
|
|
58
|
+
} }, link: { icon: "🔗", title: "Link", result: function() {
|
|
59
|
+
var e = window.prompt("Enter the link URL");
|
|
60
|
+
e && i("createLink", e);
|
|
61
|
+
} }, image: { icon: "📷", title: "Image", result: function() {
|
|
62
|
+
var e = window.prompt("Enter the image URL");
|
|
63
|
+
e && i("insertImage", e);
|
|
64
|
+
} } }, S = { actionbar: "pell-actionbar", button: "pell-button", content: "pell-content", selected: "pell-button-selected" }, T = function(e) {
|
|
65
|
+
var c = e.actions ? e.actions.map(function(t) {
|
|
66
|
+
return typeof t == "string" ? v[t] : v[t.name] ? a({}, v[t.name], t) : t;
|
|
67
|
+
}) : Object.keys(v).map(function(t) {
|
|
68
|
+
return v[t];
|
|
69
|
+
}), u = a({}, S, e.classes), g = e[f] || "div", z = y("div");
|
|
70
|
+
z.className = u.actionbar, k(e.element, z);
|
|
71
|
+
var l = e.element.content = y("div");
|
|
72
|
+
return l.contentEditable = !0, l.className = u.content, l.oninput = function(t) {
|
|
73
|
+
var m = t.target.firstChild;
|
|
74
|
+
m && m.nodeType === 3 ? i(s, "<" + g + ">") : l.innerHTML === "<br>" && (l.innerHTML = ""), e.onChange(l.innerHTML);
|
|
75
|
+
}, l.onkeydown = function(t) {
|
|
76
|
+
var m;
|
|
77
|
+
t.key === "Enter" && (m = s, document.queryCommandValue(m) === "blockquote") && setTimeout(function() {
|
|
78
|
+
return i(s, "<" + g + ">");
|
|
79
|
+
}, 0);
|
|
80
|
+
}, k(e.element, l), c.forEach(function(t) {
|
|
81
|
+
var m = y("button");
|
|
82
|
+
if (m.className = u.button, m.innerHTML = t.icon, m.title = t.title, m.setAttribute("type", "button"), m.onclick = function() {
|
|
83
|
+
return t.result() && l.focus();
|
|
84
|
+
}, t.state) {
|
|
85
|
+
var C = function() {
|
|
86
|
+
return m.classList[t.state() ? "add" : "remove"](u.selected);
|
|
87
|
+
};
|
|
88
|
+
h(l, "keyup", C), h(l, "mouseup", C), h(m, "click", C);
|
|
89
|
+
}
|
|
90
|
+
k(z, m);
|
|
91
|
+
}), e.styleWithCSS && i("styleWithCSS"), i(f, g), e.element;
|
|
92
|
+
}, H = { exec: i, init: T };
|
|
93
|
+
d.exec = i, d.init = T, d.default = H, Object.defineProperty(d, "__esModule", { value: !0 });
|
|
94
|
+
});
|
|
95
|
+
})(b, b.exports)), b.exports;
|
|
96
|
+
}
|
|
97
|
+
var p = O();
|
|
98
|
+
const _ = ".pell{border:1px solid hsla(0,0%,4%,.1)}.pell,.pell-content{box-sizing:border-box}.pell-content{height:300px;outline:0;overflow-y:auto;padding:10px}.pell-actionbar{background-color:#fff;border-bottom:1px solid hsla(0,0%,4%,.1)}.pell-button{background-color:transparent;border:none;cursor:pointer;height:30px;outline:0;width:30px;vertical-align:bottom}.pell-button-selected{background-color:#f0f0f0}", A = `@layer formie-theme{.formie-form{--formie-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--formie-font-size-xs: .75rem;--formie-font-size-sm: .875rem;--formie-font-size-base: 1rem;--formie-font-size-lg: 1.125rem;--formie-font-size-xl: 1.375rem;--formie-font-size-2xl: 1.75rem;--formie-font-weight-normal: 400;--formie-font-weight-medium: 500;--formie-font-weight-semibold: 600;--formie-font-weight-bold: 700;--formie-line-height-tight: 1.25;--formie-line-height-base: 1.5;--formie-line-height-relaxed: 1.4;--formie-letter-spacing-tight: -.02em;--formie-space-1: .25rem;--formie-space-1-5: .375rem;--formie-space-2: .5rem;--formie-space-2-5: .625rem;--formie-space-3: .75rem;--formie-space-3-5: .875rem;--formie-space-4: 1rem;--formie-space-4-5: 1.125rem;--formie-space-5: 1.25rem;--formie-space-5-5: 1.375rem;--formie-space-6: 1.5rem;--formie-space-7: 1.75rem;--formie-space-8: 2rem;--formie-space-9: 2.25rem;--formie-space-10: 2.5rem;--formie-space-11: 2.75rem;--formie-space-12: 3rem;--formie-radius-sm: .25rem;--formie-radius-md: .375rem;--formie-radius-lg: .5rem;--formie-radius-full: 999px;--formie-border-width: 1px;--formie-black: #000000;--formie-white: #ffffff;--formie-neutral-50: #f8fafc;--formie-neutral-100: #f1f5f9;--formie-neutral-200: #e2e8f0;--formie-neutral-300: #cbd5e1;--formie-neutral-400: #94a3b8;--formie-neutral-500: #64748b;--formie-neutral-600: #475569;--formie-neutral-700: #334155;--formie-neutral-800: #1e293b;--formie-neutral-900: #0f172a;--formie-neutral-950: #020617;--formie-primary-50: #e8ecfc;--formie-primary-100: #d2d9f9;--formie-primary-200: #a4b3f4;--formie-primary-300: #778dee;--formie-primary-400: #4967e9;--formie-primary-500: #1c41e3;--formie-primary-600: #1634b6;--formie-primary-700: #112788;--formie-primary-800: #0b1a5b;--formie-primary-900: #060d2d;--formie-primary-950: #040920;--formie-danger-50: #fef2f2;--formie-danger-100: #fee2e2;--formie-danger-200: #fecaca;--formie-danger-300: #fca5a5;--formie-danger-400: #f87171;--formie-danger-500: #ef4444;--formie-danger-600: #dc2626;--formie-danger-700: #b91c1c;--formie-danger-800: #991b1b;--formie-danger-900: #7f1d1d;--formie-danger-950: #450a0a;--formie-success-50: #f0fdf4;--formie-success-100: #dcfce7;--formie-success-200: #bbf7d0;--formie-success-300: #86efac;--formie-success-400: #4ade80;--formie-success-500: #22c55e;--formie-success-600: #16a34a;--formie-success-700: #15803d;--formie-success-800: #166534;--formie-success-900: #14532d;--formie-success-950: #052e16;--formie-color-background: var(--formie-white);--formie-color-surface: var(--formie-white);--formie-color-surface-subtle: var(--formie-neutral-50);--formie-color-surface-muted: var(--formie-neutral-100);--formie-color-text: var(--formie-neutral-700);--formie-color-text-muted: var(--formie-neutral-500);--formie-color-heading: var(--formie-neutral-900);--formie-color-border: var(--formie-neutral-300);--formie-color-border-soft: var(--formie-neutral-200);--formie-color-primary: var(--formie-primary-400);--formie-color-primary-hover: var(--formie-primary-500);--formie-color-primary-border: var(--formie-primary-500);--formie-color-primary-soft: var(--formie-primary-100);--formie-color-focus-ring: var(--formie-primary-300);--formie-color-danger: var(--formie-danger-500);--formie-color-danger-soft: var(--formie-danger-50);--formie-color-danger-dark: var(--formie-danger-900);--formie-color-success: var(--formie-success-500);--formie-color-success-soft: var(--formie-success-50);--formie-color-success-dark: var(--formie-success-900);--formie-color-button-text: var(--formie-color-surface);--formie-focus-ring-border-color: var(--formie-color-focus-ring);--formie-shadow-focus: 0 0 0 3px rgba(119, 141, 238, .45);--formie-shadow-danger-focus: 0 0 0 3px rgba(248, 180, 180, .45);--formie-title-form-size: 1.4rem;--formie-body-size: .9375rem;--formie-gap-form: 0;--formie-gap-form-header: var(--formie-space-4);--formie-gap-form-messages: var(--formie-space-4);--formie-gap-form-navigation: var(--formie-space-4);--formie-gap-form-body: 0;--formie-gap-form-footer: var(--formie-space-4);--formie-message-padding: var(--formie-space-4);--formie-message-margin-bottom: var(--formie-space-4);--formie-message-size: var(--formie-font-size-sm);--formie-message-line-height: var(--formie-line-height-relaxed);--formie-button-border: var(--formie-border-width) solid var(--formie-color-border);--formie-button-border-hover: var(--formie-button-secondary-border-hover);--formie-button-border-radius: var(--formie-radius-sm);--formie-button-background: var(--formie-neutral-100);--formie-button-background-hover: var(--formie-neutral-200);--formie-button-text-color: var(--formie-color-heading);--formie-button-color: var(--formie-button-text-color);--formie-button-line-height: var(--formie-line-height-tight);--formie-button-font-weight: var(--formie-font-weight-medium);--formie-button-min-height: var(--formie-space-10);--formie-button-padding-y: var(--formie-space-2);--formie-button-padding-x: var(--formie-space-4);--formie-button-font-size: var(--formie-font-size-sm);--formie-button-gap: var(--formie-space-2);--formie-button-icon-size: .9375rem;--formie-button-icon-button-size: 1.875rem;--formie-button-icon-border-radius: var(--formie-radius-full);--formie-button-icon-background: var(--formie-neutral-100);--formie-button-icon-background-hover: var(--formie-neutral-200);--formie-button-icon-border: var(--formie-border-width) solid var(--formie-neutral-300);--formie-button-icon-border-hover: var(--formie-border-width) solid var(--formie-neutral-400);--formie-button-icon-color: var(--formie-neutral-950);--formie-button-opacity-disabled: .7;--formie-button-shadow-focus: 0 0 0 3px var(--formie-color-border-soft);--formie-icon-mask-plus: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23000' d='M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z'/%3E%3C/svg%3E");--formie-icon-mask-arrow-left: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23000' d='M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z'/%3E%3C/svg%3E");--formie-icon-mask-arrow-right: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512'%3E%3Cpath fill='%23000' d='M278.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L210.7 256 73.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z'/%3E%3C/svg%3E");--formie-icon-mask-close: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23000' d='M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z'/%3E%3C/svg%3E");--formie-button-primary-background: var(--formie-color-primary);--formie-button-primary-background-hover: var(--formie-color-primary-hover);--formie-button-primary-text-color: var(--formie-white);--formie-button-primary-border: var(--formie-border-width) solid transparent;--formie-button-primary-border-hover: var(--formie-border-width) solid var(--formie-color-primary-hover);--formie-button-primary-shadow-focus: 0 0 0 3px var(--formie-primary-300);--formie-button-secondary-border: var(--formie-border-width) solid var(--formie-color-border);--formie-button-secondary-border-hover: var(--formie-button-secondary-border);--formie-button-secondary-background: var(--formie-color-surface);--formie-button-secondary-background-hover: var(--formie-neutral-100);--formie-button-secondary-text-color: var(--formie-color-heading);--formie-button-ghost-border: var(--formie-border-width) solid transparent;--formie-button-ghost-border-hover: var(--formie-button-ghost-border);--formie-button-ghost-background: transparent;--formie-button-ghost-background-hover: var(--formie-neutral-100);--formie-button-ghost-text-color: var(--formie-color-heading);--formie-button-ghost-shadow-focus: var(--formie-button-shadow-focus);--formie-button-link-text-color: var(--formie-color-primary);--formie-button-link-text-color-hover: var(--formie-color-primary-hover);--formie-tab-padding-y: var(--formie-space-2);--formie-tab-padding-x: var(--formie-space-4);--formie-tab-font-size: var(--formie-font-size-sm);--formie-gap-tabs: var(--formie-space-4);--formie-progress-height: 1.2rem;--formie-progress-padding: var(--formie-space-4);--formie-progress-size: .8rem;--formie-loading-size: var(--formie-space-4);--formie-loading-margin-top: calc(var(--formie-loading-size) * -.5);--formie-loading-margin-left: calc(var(--formie-loading-size) * -.5);--formie-loading-border-width: 2px;--formie-loading-animation: loading .5s infinite linear;--formie-loading-left: 50%;--formie-loading-top: 50%;--formie-loading-z-index: 1;--formie-gap-pages: 0;--formie-gap-page: var(--formie-space-4);--formie-gap-page-container: 0;--formie-gap-page-header: var(--formie-space-4);--formie-gap-page-body: var(--formie-space-4);--formie-gap-page-footer: var(--formie-space-4);--formie-gap-page-buttons: var(--formie-space-4);--formie-title-page-size: var(--formie-font-size-lg);--formie-gap-rows: var(--formie-space-4);--formie-gap-row: var(--formie-space-4);--formie-gap-subfield-rows: var(--formie-space-2);--formie-gap-subfield-row: var(--formie-space-2);--formie-gap-nested-field-rows: var(--formie-space-2);--formie-gap-nested-field-row: var(--formie-space-2);--formie-subfield-row-column-min-width: 12rem;--formie-nested-field-row-column-min-width: 16rem;--formie-gap-errors: var(--formie-space-2);--formie-gap-field-errors: var(--formie-space-2);--formie-label-size: var(--formie-font-size-sm);--formie-meta-size: var(--formie-font-size-sm);--formie-control-height: 2.375rem;--formie-control-padding-y: var(--formie-space-2);--formie-control-padding-x: var(--formie-space-3);--formie-control-font-size: var(--formie-font-size-sm);--formie-textarea-min-height: 9rem;--formie-select-indicator-size: 1.4rem;--formie-list-indent: var(--formie-space-5);--formie-link-underline-offset: .15em;--formie-gap-field: var(--formie-space-2);--formie-gap-field-layout: var(--formie-space-2);--formie-gap-field-content: var(--formie-space-2);--formie-gap-field-control: var(--formie-space-2);--formie-gap-options: var(--formie-space-2);--formie-summary-padding: var(--formie-space-4);--formie-gap-summary: var(--formie-space-4);--formie-file-summary-padding: var(--formie-space-4);--formie-gap-file-summary: var(--formie-space-3);--formie-rich-text-min-height: 12rem;--formie-signature-width: 100%;--formie-signature-height: 8rem;--formie-signature-background: var(--formie-color-surface-subtle);--formie-signature-border: 1px solid var(--formie-color-border);--formie-signature-border-radius: var(--formie-radius-sm);--formie-signature-remove-button-top: 0;--formie-signature-remove-button-right: -14px;--formie-signature-remove-button-transform: translate(0, -50%);--formie-check-font-size: var(--formie-font-size-sm);--formie-check-line-height: var(--formie-line-height-base);--formie-check-margin-bottom: var(--formie-space-2);--formie-check-margin-right: var(--formie-space-4);--formie-check-background-color: var(--formie-color-surface-muted);--formie-check-size: var(--formie-space-4);--formie-check-label-padding-left: var(--formie-space-6);--formie-check-label-line-height: var(--formie-space-6);--formie-check-label-top: .3125rem;--formie-check-label-transition: all .15s cubic-bezier(.4, 0, .2, 1);--formie-check-label-background-color: var(--formie-color-surface);--formie-check-check-border-radius: 2px;--formie-check-check-background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");--formie-check-check-background-size: 8px auto;--formie-check-radio-border-radius: 50%;--formie-check-radio-background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");--formie-check-radio-background-size: 8px auto;--formie-group-border: 1px solid var(--formie-color-border);--formie-group-border-radius: var(--formie-radius-sm);--formie-group-padding: var(--formie-space-4);--formie-repeater-add-button-padding-left: var(--formie-space-8);--formie-repeater-add-button-icon-mask: var(--formie-icon-mask-plus);--formie-repeater-add-button-height: 14px;--formie-repeater-add-button-width: 14px;--formie-repeater-add-button-left: var(--formie-space-3);--formie-repeater-remove-button-top: 0;--formie-repeater-remove-button-right: -14px;--formie-repeater-remove-button-transform: translate(0, -50%);--formie-table-width: 100%;--formie-table-margin-bottom: 1rem;--formie-table-border-collapse: collapse;--formie-table-row-padding: .2rem;--formie-table-th-text-align: inherit;--formie-table-th-font-size: .75rem;--formie-table-th-font-weight: 600;--formie-table-add-button-padding-left: var(--formie-space-8);--formie-table-add-button-icon-mask: var(--formie-icon-mask-plus);--formie-table-add-button-height: 14px;--formie-table-add-button-width: 14px;--formie-table-add-button-left: var(--formie-space-3);--formie-table-remove-button-top: 0;--formie-table-remove-button-right: -14px;--formie-table-remove-button-transform: translate(0, -50%);font-family:var(--formie-font-family);font-size:var(--formie-body-size);line-height:var(--formie-line-height-base);color:var(--formie-color-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}`, P = "@layer formie-theme{.formie-rich-text{border:var(--formie-border-width) solid var(--formie-color-border);border-radius:var(--formie-radius-sm);background:var(--formie-color-surface);box-sizing:border-box;overflow:hidden;padding:0;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}.formie-rich-text:focus-within{border-color:var(--formie-color-focus-ring);box-shadow:var(--formie-shadow-focus)}.formie-field-has-error .formie-rich-text{border-color:var(--formie-color-danger)}.formie-field-has-error .formie-rich-text:focus-within{box-shadow:var(--formie-shadow-danger-focus)}.formie-rich-text-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:0;padding:var(--formie-space-1);border-bottom:var(--formie-border-width) solid var(--formie-color-border);background:#fff;box-shadow:0 1px 2px #1118270f}.formie-rich-text .formie-rich-text-button{display:inline-flex;align-items:center;justify-content:center;width:var(--formie-space-8);height:var(--formie-space-8);margin:0;padding:0;border:0;border-radius:var(--formie-radius-sm);background:transparent;color:var(--formie-color-heading);font-size:var(--formie-font-size-sm);line-height:1;cursor:pointer;box-shadow:none;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}.formie-rich-text .formie-rich-text-button:hover,.formie-rich-text .formie-rich-text-button.formie-rich-text-selected{background:var(--formie-color-surface-muted)}.formie-rich-text .formie-rich-text-button:focus-visible{outline:0;box-shadow:0 0 0 2px var(--formie-color-surface),0 0 0 4px color-mix(in srgb,var(--formie-color-focus-ring) 60%,transparent)}.formie-rich-text [contenteditable=true]{min-height:var(--formie-rich-text-min-height);padding:var(--formie-space-3) calc(var(--formie-space-3) + var(--formie-space-1) / 2);border:0;border-radius:0;background:transparent;box-shadow:none;outline:0;overflow-wrap:anywhere;line-height:var(--formie-line-height-base);color:var(--formie-color-text)}.formie-rich-text [contenteditable=true]>:first-child{margin-top:0}.formie-rich-text [contenteditable=true]>:last-child{margin-bottom:0}.formie-rich-text-content p,.formie-rich-text-content ul,.formie-rich-text-content ol,.formie-rich-text-content blockquote,.formie-rich-text-content dl,.formie-rich-text-content dd,.formie-rich-text-content figure,.formie-rich-text-content hr,.formie-rich-text-content pre{margin:0 0 var(--formie-space-4)}.formie-rich-text-content h1,.formie-rich-text-content h2,.formie-rich-text-content h3,.formie-rich-text-content h4,.formie-rich-text-content h5,.formie-rich-text-content h6{margin:0 0 var(--formie-space-3);color:var(--formie-color-heading);font-weight:var(--formie-font-weight-semibold);line-height:var(--formie-line-height-tight)}.formie-rich-text-content h1{font-size:var(--formie-font-size-2xl)}.formie-rich-text-content h2{font-size:var(--formie-font-size-xl)}.formie-rich-text-content h3{font-size:var(--formie-font-size-lg)}.formie-rich-text-content h4{font-size:var(--formie-font-size-base)}.formie-rich-text-content h5,.formie-rich-text-content h6{font-size:var(--formie-font-size-sm)}.formie-rich-text-content ul,.formie-rich-text-content ol{padding-inline-start:var(--formie-list-indent)}.formie-rich-text-content ul{list-style:disc}.formie-rich-text-content ol{list-style:decimal}.formie-rich-text-content li+li{margin-top:var(--formie-space-1)}.formie-rich-text-content a{color:var(--formie-color-primary);text-decoration:underline;text-underline-offset:var(--formie-link-underline-offset)}.formie-rich-text-content blockquote{padding-inline-start:var(--formie-space-4);color:var(--formie-color-text-muted);border-inline-start:4px solid var(--formie-color-border-soft)}.formie-rich-text-content pre{padding:var(--formie-space-4);overflow-x:auto;border-radius:var(--formie-radius-md);background:var(--formie-color-surface-muted)}.formie-rich-text-content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.95em}.formie-rich-text-content :not(pre)>code{padding:.12em .35em;border-radius:var(--formie-radius-sm);background:var(--formie-color-surface-muted)}.formie-rich-text-content pre code{padding:0;border-radius:0;background:transparent}.formie-rich-text-content hr{height:0;border:0;border-top:var(--formie-border-width) solid var(--formie-color-border)}.formie-rich-text-content img{display:block;max-width:100%;height:auto}.formie-rich-text-content[data-placeholder]:empty:before{content:attr(data-placeholder);color:var(--formie-color-text-muted);pointer-events:none}}", U = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
99
|
+
<path d="M4 6h16" />
|
|
100
|
+
<path d="M7 10h10" />
|
|
101
|
+
<path d="M4 14h16" />
|
|
102
|
+
<path d="M7 18h10" />
|
|
103
|
+
</svg>
|
|
104
|
+
`, N = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
105
|
+
<path d="M4 6h16" />
|
|
106
|
+
<path d="M4 10h10" />
|
|
107
|
+
<path d="M4 14h16" />
|
|
108
|
+
<path d="M4 18h10" />
|
|
109
|
+
</svg>
|
|
110
|
+
`, F = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
111
|
+
<path d="M4 6h16" />
|
|
112
|
+
<path d="M10 10h10" />
|
|
113
|
+
<path d="M4 14h16" />
|
|
114
|
+
<path d="M10 18h10" />
|
|
115
|
+
</svg>
|
|
116
|
+
`, V = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
117
|
+
<path d="M7 6h6a3 3 0 0 1 0 6H7z" />
|
|
118
|
+
<path d="M7 12h7a3 3 0 0 1 0 6H7z" />
|
|
119
|
+
</svg>
|
|
120
|
+
`, D = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
121
|
+
<path d="m4 20 8-8" />
|
|
122
|
+
<path d="m12 12 7-7" />
|
|
123
|
+
<path d="m5 15-2-2a2 2 0 0 1 0-2.83L9.17 4a2 2 0 0 1 2.83 0l4 4" />
|
|
124
|
+
<path d="M16 20H8" />
|
|
125
|
+
</svg>
|
|
126
|
+
`, W = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
127
|
+
<path d="m9 18-6-6 6-6" />
|
|
128
|
+
<path d="m15 6 6 6-6 6" />
|
|
129
|
+
</svg>
|
|
130
|
+
`, Q = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false">
|
|
131
|
+
<text x="50%" y="50%" dominant-baseline="central" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="currentColor">H1</text>
|
|
132
|
+
</svg>
|
|
133
|
+
`, X = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false">
|
|
134
|
+
<text x="50%" y="50%" dominant-baseline="central" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="currentColor">H2</text>
|
|
135
|
+
</svg>
|
|
136
|
+
`, $ = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
137
|
+
<rect x="3" y="5" width="18" height="14" rx="2" />
|
|
138
|
+
<path d="m8 13 3-3 5 5" />
|
|
139
|
+
<path d="m13 12 2-2 4 4" />
|
|
140
|
+
<circle cx="8.5" cy="9.5" r="1" />
|
|
141
|
+
</svg>
|
|
142
|
+
`, G = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
143
|
+
<path d="M13 6h6" />
|
|
144
|
+
<path d="M5 18h6" />
|
|
145
|
+
<path d="M14 6 10 18" />
|
|
146
|
+
</svg>
|
|
147
|
+
`, J = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
148
|
+
<path d="M4 12h16" />
|
|
149
|
+
</svg>
|
|
150
|
+
`, K = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
151
|
+
<path d="M10 13a5 5 0 0 0 7.07 0l1.41-1.41a5 5 0 0 0-7.07-7.07L10 5" />
|
|
152
|
+
<path d="M14 11a5 5 0 0 0-7.07 0L5.5 12.43a5 5 0 0 0 7.07 7.07L14 19" />
|
|
153
|
+
</svg>
|
|
154
|
+
`, Y = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
155
|
+
<path d="M10 6h10" />
|
|
156
|
+
<path d="M10 12h10" />
|
|
157
|
+
<path d="M10 18h10" />
|
|
158
|
+
<path d="M4 6h.01" />
|
|
159
|
+
<path d="M4 12h.01" />
|
|
160
|
+
<path d="M4 18h.01" />
|
|
161
|
+
</svg>
|
|
162
|
+
`, Z = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false">
|
|
163
|
+
<text x="50%" y="50%" dominant-baseline="central" text-anchor="middle" font-family="system-ui, sans-serif" font-size="12" font-weight="700" fill="currentColor">P</text>
|
|
164
|
+
</svg>
|
|
165
|
+
`, ee = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
166
|
+
<path d="M8 10H6a2 2 0 0 0-2 2v2h4v-4z" />
|
|
167
|
+
<path d="M18 10h-2a2 2 0 0 0-2 2v2h4v-4z" />
|
|
168
|
+
</svg>
|
|
169
|
+
`, re = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
170
|
+
<path d="M6 12h12" />
|
|
171
|
+
<path d="M9 7a3 3 0 0 1 6 0c0 4-6 2-6 6a3 3 0 0 0 6 0" />
|
|
172
|
+
</svg>
|
|
173
|
+
`, oe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
174
|
+
<path d="M10 6h10" />
|
|
175
|
+
<path d="M10 12h10" />
|
|
176
|
+
<path d="M10 18h10" />
|
|
177
|
+
<circle cx="4" cy="6" r="1" fill="currentColor" stroke="none" />
|
|
178
|
+
<circle cx="4" cy="12" r="1" fill="currentColor" stroke="none" />
|
|
179
|
+
<circle cx="4" cy="18" r="1" fill="currentColor" stroke="none" />
|
|
180
|
+
</svg>
|
|
181
|
+
`, ie = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
|
|
182
|
+
<path d="M8 6v5a4 4 0 0 0 8 0V6" />
|
|
183
|
+
<path d="M6 20h12" />
|
|
184
|
+
</svg>
|
|
185
|
+
`, E = "[data-formie-rich-text]", I = "[data-formie-field], [data-formie-field-handle]", L = "textarea[data-formie-multi-line-text-input]", w = "rich-text";
|
|
186
|
+
q(w, [A, _, P]);
|
|
187
|
+
const n = {
|
|
188
|
+
bold: V,
|
|
189
|
+
italic: G,
|
|
190
|
+
underline: ie,
|
|
191
|
+
strikethrough: re,
|
|
192
|
+
heading1: Q,
|
|
193
|
+
heading2: X,
|
|
194
|
+
paragraph: Z,
|
|
195
|
+
quote: ee,
|
|
196
|
+
olist: Y,
|
|
197
|
+
ulist: oe,
|
|
198
|
+
code: W,
|
|
199
|
+
line: J,
|
|
200
|
+
link: K,
|
|
201
|
+
image: $,
|
|
202
|
+
alignleft: N,
|
|
203
|
+
aligncenter: U,
|
|
204
|
+
alignright: F,
|
|
205
|
+
clear: D
|
|
206
|
+
};
|
|
207
|
+
function te(o) {
|
|
208
|
+
return o.matches(I) ? !!o.querySelector(E) && !!o.querySelector(L) : Array.from(o.querySelectorAll(I)).some((r) => !!r.querySelector(E) && !!r.querySelector(L));
|
|
209
|
+
}
|
|
210
|
+
function ne() {
|
|
211
|
+
return [
|
|
212
|
+
{ name: "bold", icon: n.bold },
|
|
213
|
+
{ name: "italic", icon: n.italic },
|
|
214
|
+
{ name: "underline", icon: n.underline },
|
|
215
|
+
{ name: "strikethrough", icon: n.strikethrough },
|
|
216
|
+
{ name: "heading1", icon: n.heading1 },
|
|
217
|
+
{ name: "heading2", icon: n.heading2 },
|
|
218
|
+
{ name: "paragraph", icon: n.paragraph },
|
|
219
|
+
{ name: "quote", icon: n.quote },
|
|
220
|
+
{ name: "olist", icon: n.olist },
|
|
221
|
+
{ name: "ulist", icon: n.ulist },
|
|
222
|
+
{ name: "code", icon: n.code },
|
|
223
|
+
{ name: "line", icon: n.line },
|
|
224
|
+
{ name: "link", icon: n.link },
|
|
225
|
+
{ name: "image", icon: n.image },
|
|
226
|
+
{ name: "alignleft", icon: n.alignleft, title: "Align Left", result: () => p.exec("justifyLeft", "") },
|
|
227
|
+
{ name: "aligncenter", icon: n.aligncenter, title: "Align Center", result: () => p.exec("justifyCenter", "") },
|
|
228
|
+
{ name: "alignright", icon: n.alignright, title: "Align Right", result: () => p.exec("justifyRight", "") },
|
|
229
|
+
{
|
|
230
|
+
name: "clear",
|
|
231
|
+
icon: n.clear,
|
|
232
|
+
title: "Clear",
|
|
233
|
+
result: () => {
|
|
234
|
+
const o = window.getSelection()?.toString() || "";
|
|
235
|
+
if (o) {
|
|
236
|
+
const r = o.split(`
|
|
237
|
+
`).join("<br>");
|
|
238
|
+
p.exec("formatBlock", "<p>"), document.execCommand("insertHTML", !1, r);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
p.exec("formatBlock", "<p>");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
function ae(o) {
|
|
247
|
+
const r = o?.length ? o : ["bold", "italic"], d = ne();
|
|
248
|
+
return r.map((a) => d.find((f) => f.name === a)).filter((a) => !!a);
|
|
249
|
+
}
|
|
250
|
+
function fe(o, r, d) {
|
|
251
|
+
const a = {
|
|
252
|
+
element: o,
|
|
253
|
+
defaultParagraphSeparator: "p",
|
|
254
|
+
styleWithCSS: !0,
|
|
255
|
+
actions: ae(d.buttons),
|
|
256
|
+
onChange: (s) => {
|
|
257
|
+
const h = "<p><br></p>";
|
|
258
|
+
r.value = r.placeholder && s === h ? "" : s, r.dispatchEvent(new Event("input", { bubbles: !0 })), M(r, w, "populate", {
|
|
259
|
+
richText: r,
|
|
260
|
+
value: r.value
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
classes: {
|
|
264
|
+
actionbar: "formie-rich-text-toolbar",
|
|
265
|
+
button: "formie-rich-text-button",
|
|
266
|
+
content: "formie-input formie-rich-text-content",
|
|
267
|
+
selected: "formie-rich-text-selected"
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
M(r, w, "before-init", {
|
|
271
|
+
richText: r,
|
|
272
|
+
options: a
|
|
273
|
+
});
|
|
274
|
+
const f = p.init(a);
|
|
275
|
+
return r.richText = f, f.content.innerHTML = r.value || "", r.placeholder && f.content.setAttribute("data-placeholder", r.placeholder), M(r, w, "after-init", {
|
|
276
|
+
richText: f
|
|
277
|
+
}), () => {
|
|
278
|
+
o.innerHTML = "", delete r.richText;
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const ce = {
|
|
282
|
+
id: w,
|
|
283
|
+
kind: "field",
|
|
284
|
+
match: (o) => o.target instanceof HTMLElement && te(o.target),
|
|
285
|
+
setup: async (o) => {
|
|
286
|
+
const r = o.options || {}, a = j(o).map((f) => {
|
|
287
|
+
const s = f.querySelector(E), h = f.querySelector(L);
|
|
288
|
+
return !(s instanceof HTMLElement) || !(h instanceof HTMLTextAreaElement) ? () => {
|
|
289
|
+
} : fe(s, h, r);
|
|
290
|
+
});
|
|
291
|
+
return await o.emit("formie:module:rich-text:init", {
|
|
292
|
+
count: a.length
|
|
293
|
+
}), {
|
|
294
|
+
destroy: () => {
|
|
295
|
+
a.forEach((f) => {
|
|
296
|
+
f();
|
|
297
|
+
}), o.emit("formie:module:rich-text:destroy", {});
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
export {
|
|
303
|
+
ce as richTextModule
|
|
304
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { w as c } from "./index-C1ZOKiAi.js";
|
|
2
|
+
const o = /* @__PURE__ */ new Map();
|
|
3
|
+
async function l(e, r = 5e3) {
|
|
4
|
+
return c(() => {
|
|
5
|
+
const n = window[e];
|
|
6
|
+
return typeof n > "u" || n === null ? null : n;
|
|
7
|
+
}, {
|
|
8
|
+
timeoutMs: r,
|
|
9
|
+
intervalMs: 30
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
async function d({
|
|
13
|
+
id: e,
|
|
14
|
+
src: r,
|
|
15
|
+
async: n = !0,
|
|
16
|
+
defer: s = !0
|
|
17
|
+
}) {
|
|
18
|
+
const a = document.getElementById(e);
|
|
19
|
+
return a || (o.has(e) || o.set(e, new Promise((i, u) => {
|
|
20
|
+
const t = document.createElement("script");
|
|
21
|
+
t.id = e, t.src = r, t.async = n, t.defer = s, t.onload = () => {
|
|
22
|
+
i(t);
|
|
23
|
+
}, t.onerror = () => {
|
|
24
|
+
o.delete(e), u(new Error(`Failed to load external script: ${r}`));
|
|
25
|
+
}, document.body.appendChild(t);
|
|
26
|
+
})), o.get(e));
|
|
27
|
+
}
|
|
28
|
+
async function p(e, r) {
|
|
29
|
+
const n = window[e];
|
|
30
|
+
return typeof n < "u" && n !== null ? n : (await d(r), l(e, r.timeoutMs));
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
d as a,
|
|
34
|
+
l as e,
|
|
35
|
+
p as l
|
|
36
|
+
};
|