@alfadocs/ui-kit 0.67.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/_chunks/{ai-tools-rail-DfmewPUN.js → ai-tools-rail-CInA_1-E.js} +2 -2
  2. package/dist/_chunks/{appointment-tray-CQJ3Nbi5.js → appointment-tray-BMl89NPW.js} +2 -2
  3. package/dist/_chunks/{care-plan-card-CJei-nl9.js → care-plan-card-BwVUyUBb.js} +3 -3
  4. package/dist/_chunks/{care-plan-entry-card-EmfrbHu8.js → care-plan-entry-card-VzdQHcOL.js} +2 -2
  5. package/dist/_chunks/{color-picker-B7xsn6tX.js → color-picker-FXpItIaF.js} +171 -167
  6. package/dist/_chunks/{editable-currency-cell-renderer-BVJ04DkB.js → editable-currency-cell-renderer-DHOspPee.js} +906 -881
  7. package/dist/_chunks/{marketplace-app-shell-Bu-HD3fy.js → marketplace-app-shell-D4-T9Qzz.js} +2 -2
  8. package/dist/_chunks/{patient-shell-DrV_iekt.js → patient-shell-BfgufL_q.js} +2 -2
  9. package/dist/_chunks/{patient-summary-card-ByfIU8N0.js → patient-summary-card-hEmr4eTW.js} +2 -2
  10. package/dist/_chunks/{payment-request-card-yTjzKQCU.js → payment-request-card-CYE5vhZ0.js} +2 -2
  11. package/dist/_chunks/{rich-text-editor-BOQr5lHx.js → rich-text-editor-VawKN1FI.js} +884 -801
  12. package/dist/_chunks/{scroll-area-eccd_Uf-.js → scroll-area-5wNK0Cyz.js} +3 -3
  13. package/dist/_chunks/{sidebar-CGjIk_FQ.js → sidebar-DaB4ulxH.js} +344 -340
  14. package/dist/_chunks/{transaction-chip-BrW8P50O.js → transaction-chip-DK84XCBU.js} +31 -18
  15. package/dist/agent-catalog.json +1 -1
  16. package/dist/components/ai-tools-rail/index.js +1 -1
  17. package/dist/components/appointment-card/index.js +1 -1
  18. package/dist/components/care-plan-card/index.js +1 -1
  19. package/dist/components/care-plan-entry-card/index.js +1 -1
  20. package/dist/components/color-picker/index.js +1 -1
  21. package/dist/components/data-table/data-table.d.ts +1 -1
  22. package/dist/components/data-table/filters/date-range-filter.d.ts +1 -1
  23. package/dist/components/data-table/index.js +1 -1
  24. package/dist/components/data-table/toolbar.d.ts +4 -1
  25. package/dist/components/patient-summary-card/index.js +1 -1
  26. package/dist/components/payment-card/index.js +1 -1
  27. package/dist/components/rich-text-editor/index.js +1 -1
  28. package/dist/components/rich-text-editor/rich-text-editor.d.ts +15 -0
  29. package/dist/components/scroll-area/index.js +1 -1
  30. package/dist/components/sidebar/index.js +1 -1
  31. package/dist/components/transaction-chip/index.js +1 -1
  32. package/dist/i18n/locales/ar.d.ts +6 -1
  33. package/dist/i18n/locales/ar.js +8 -3
  34. package/dist/i18n/locales/de.d.ts +6 -1
  35. package/dist/i18n/locales/de.js +8 -3
  36. package/dist/i18n/locales/el.d.ts +6 -1
  37. package/dist/i18n/locales/el.js +8 -3
  38. package/dist/i18n/locales/en.d.ts +6 -1
  39. package/dist/i18n/locales/en.js +8 -3
  40. package/dist/i18n/locales/es.d.ts +6 -1
  41. package/dist/i18n/locales/es.js +8 -3
  42. package/dist/i18n/locales/fr.d.ts +6 -1
  43. package/dist/i18n/locales/fr.js +8 -3
  44. package/dist/i18n/locales/hi.d.ts +6 -1
  45. package/dist/i18n/locales/hi.js +8 -3
  46. package/dist/i18n/locales/it.d.ts +6 -1
  47. package/dist/i18n/locales/it.js +8 -3
  48. package/dist/i18n/locales/ja.d.ts +6 -1
  49. package/dist/i18n/locales/ja.js +8 -3
  50. package/dist/i18n/locales/nl.d.ts +6 -1
  51. package/dist/i18n/locales/nl.js +8 -3
  52. package/dist/i18n/locales/pl.d.ts +6 -1
  53. package/dist/i18n/locales/pl.js +8 -3
  54. package/dist/i18n/locales/pt.d.ts +6 -1
  55. package/dist/i18n/locales/pt.js +8 -3
  56. package/dist/i18n/locales/ro.d.ts +6 -1
  57. package/dist/i18n/locales/ro.js +8 -3
  58. package/dist/i18n/locales/ru.d.ts +6 -1
  59. package/dist/i18n/locales/ru.js +8 -3
  60. package/dist/i18n/locales/sq.d.ts +6 -1
  61. package/dist/i18n/locales/sq.js +8 -3
  62. package/dist/i18n/locales/sv.d.ts +6 -1
  63. package/dist/i18n/locales/sv.js +8 -3
  64. package/dist/i18n/locales/tr.d.ts +6 -1
  65. package/dist/i18n/locales/tr.js +8 -3
  66. package/dist/i18n/locales/zh.d.ts +6 -1
  67. package/dist/i18n/locales/zh.js +8 -3
  68. package/dist/index.js +14 -14
  69. package/dist/locales/ar.json +8 -3
  70. package/dist/locales/de.json +8 -3
  71. package/dist/locales/el.json +8 -3
  72. package/dist/locales/en.json +8 -3
  73. package/dist/locales/es.json +8 -3
  74. package/dist/locales/fr.json +8 -3
  75. package/dist/locales/hi.json +8 -3
  76. package/dist/locales/it.json +8 -3
  77. package/dist/locales/ja.json +8 -3
  78. package/dist/locales/nl.json +8 -3
  79. package/dist/locales/pl.json +8 -3
  80. package/dist/locales/pt.json +8 -3
  81. package/dist/locales/ro.json +8 -3
  82. package/dist/locales/ru.json +8 -3
  83. package/dist/locales/sq.json +8 -3
  84. package/dist/locales/sv.json +8 -3
  85. package/dist/locales/tr.json +8 -3
  86. package/dist/locales/zh.json +8 -3
  87. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  88. package/dist/patterns/patient-shell/index.js +1 -1
  89. package/dist/tokens.css +1 -1
  90. package/package.json +1 -1
@@ -1,180 +1,181 @@
1
- import { jsx as e, jsxs as v, Fragment as Ae } from "react/jsx-runtime";
2
- import { useId as ae, useState as _, useRef as D, useCallback as z, useEffect as K, Fragment as mt, forwardRef as ht, useMemo as Fe, useImperativeHandle as ft } from "react";
3
- import { c as He } from "./index-D2ZczOXr.js";
4
- import { useTranslation as X } from "react-i18next";
5
- import { SafeHtml as gt, sanitiseHtml as pt } from "../safe-html/index.js";
6
- import { u as bt } from "./registry-nPAVE19X.js";
7
- import { I as q } from "./icon-button-LqoiKcUN.js";
8
- import { S as vt } from "./spinner-hbwuKwMf.js";
9
- import { T as yt } from "./text-area-BIx0tZ05.js";
10
- import { E as wt } from "./editor-overlay-wYm22wZK.js";
11
- import { R as kt } from "./rotate-ccw-BWANpitO.js";
12
- import { C as xt } from "./check-DPdL_Sm7.js";
13
- import { S as _e } from "./square-CZoGU14v.js";
14
- import { M as Se } from "./mic-B4Gog3Gi.js";
15
- import { S as Ct } from "./send-CySZIRPJ.js";
16
- import { S as Ee } from "./sparkles-CuYXqQLg.js";
17
- import { B as re } from "./button-DD_0Xdmr.js";
18
- import { a as Nt } from "./tooltip-DvmfrNvB.js";
19
- import { P } from "./popover-DTbfAuR0.js";
20
- import { D as ye } from "./dropdown-menu-DwwPovMZ.js";
1
+ import { jsx as e, jsxs as y, Fragment as Oe } from "react/jsx-runtime";
2
+ import { useId as le, useState as z, useRef as L, useCallback as C, useEffect as K, Fragment as nt, forwardRef as Nt, useMemo as Je, useImperativeHandle as zt } from "react";
3
+ import { c as De } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Z } from "react-i18next";
5
+ import { SafeHtml as Tt, sanitiseHtml as _t } from "../safe-html/index.js";
6
+ import { u as Mt } from "./registry-nPAVE19X.js";
7
+ import { S as Le } from "./spinner-hbwuKwMf.js";
8
+ import { I as P } from "./icon-button-LqoiKcUN.js";
9
+ import { T as Rt } from "./text-area-BIx0tZ05.js";
10
+ import { E as St } from "./editor-overlay-wYm22wZK.js";
11
+ import { X as Ke } from "./x-CCcI3eJp.js";
12
+ import { R as At } from "./rotate-ccw-BWANpitO.js";
13
+ import { C as Et } from "./check-DPdL_Sm7.js";
14
+ import { S as ot } from "./square-CZoGU14v.js";
15
+ import { M as at } from "./mic-B4Gog3Gi.js";
16
+ import { S as Ht } from "./send-CySZIRPJ.js";
17
+ import { B as ne } from "./button-DD_0Xdmr.js";
18
+ import { a as $t } from "./tooltip-DvmfrNvB.js";
19
+ import { P as B } from "./popover-DTbfAuR0.js";
20
+ import { D as ze } from "./dropdown-menu-DwwPovMZ.js";
21
21
  import { D as j } from "./dialog-DMGnSelc.js";
22
- import { C as Ie } from "./color-picker-B7xsn6tX.js";
23
- import { T as ke } from "./text-input-BaClJL8Y.js";
24
- import { C as zt } from "./checkbox-DRcOdmXv.js";
25
- import { F as Tt } from "./file-upload-BosbPDb1.js";
26
- import { c as S } from "./createLucideIcon-CrFbzy84.js";
27
- import { C as Mt } from "./chevron-down-BX_NP2Yh.js";
28
- import { I as Rt } from "./image-C6RM5hfF.js";
29
- import { C as _t } from "./columns-2-BTOBZbep.js";
30
- import { T as St } from "./trash-2-rPAKaRgB.js";
22
+ import { C as qe } from "./color-picker-FXpItIaF.js";
23
+ import { T as _e } from "./text-input-BaClJL8Y.js";
24
+ import { C as It } from "./checkbox-DRcOdmXv.js";
25
+ import { F as Lt } from "./file-upload-BosbPDb1.js";
26
+ import { c as _ } from "./createLucideIcon-CrFbzy84.js";
27
+ import { C as Ot } from "./chevron-down-BX_NP2Yh.js";
28
+ import { I as Dt } from "./image-C6RM5hfF.js";
29
+ import { C as qt } from "./columns-2-BTOBZbep.js";
30
+ import { T as jt } from "./trash-2-rPAKaRgB.js";
31
+ import { S as Pt } from "./sparkles-CuYXqQLg.js";
31
32
  /**
32
33
  * @license lucide-react v1.8.0 - ISC
33
34
  *
34
35
  * This source code is licensed under the ISC license.
35
36
  * See the LICENSE file in the root directory of this source tree.
36
37
  */
37
- const Et = [
38
+ const Bt = [
38
39
  ["rect", { width: "13", height: "7", x: "3", y: "3", rx: "1", key: "11xb64" }],
39
40
  ["path", { d: "m22 15-3-3 3-3", key: "26chmm" }],
40
41
  ["rect", { width: "13", height: "7", x: "3", y: "14", rx: "1", key: "k6ky7n" }]
41
- ], At = S("between-horizontal-end", Et);
42
+ ], Ft = _("between-horizontal-end", Bt);
42
43
  /**
43
44
  * @license lucide-react v1.8.0 - ISC
44
45
  *
45
46
  * This source code is licensed under the ISC license.
46
47
  * See the LICENSE file in the root directory of this source tree.
47
48
  */
48
- const Ht = [
49
+ const Vt = [
49
50
  ["rect", { width: "13", height: "7", x: "8", y: "3", rx: "1", key: "pkso9a" }],
50
51
  ["path", { d: "m2 9 3 3-3 3", key: "1agib5" }],
51
52
  ["rect", { width: "13", height: "7", x: "8", y: "14", rx: "1", key: "1q5fc1" }]
52
- ], It = S("between-horizontal-start", Ht);
53
+ ], Gt = _("between-horizontal-start", Vt);
53
54
  /**
54
55
  * @license lucide-react v1.8.0 - ISC
55
56
  *
56
57
  * This source code is licensed under the ISC license.
57
58
  * See the LICENSE file in the root directory of this source tree.
58
59
  */
59
- const $t = [
60
+ const Wt = [
60
61
  ["rect", { width: "7", height: "13", x: "3", y: "3", rx: "1", key: "1fdu0f" }],
61
62
  ["path", { d: "m9 22 3-3 3 3", key: "17z65a" }],
62
63
  ["rect", { width: "7", height: "13", x: "14", y: "3", rx: "1", key: "1squn4" }]
63
- ], Lt = S("between-vertical-end", $t);
64
+ ], Xt = _("between-vertical-end", Wt);
64
65
  /**
65
66
  * @license lucide-react v1.8.0 - ISC
66
67
  *
67
68
  * This source code is licensed under the ISC license.
68
69
  * See the LICENSE file in the root directory of this source tree.
69
70
  */
70
- const Ot = [
71
+ const Ut = [
71
72
  ["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
72
73
  ["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
73
74
  ["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
74
- ], Dt = S("between-vertical-start", Ot);
75
+ ], Qt = _("between-vertical-start", Ut);
75
76
  /**
76
77
  * @license lucide-react v1.8.0 - ISC
77
78
  *
78
79
  * This source code is licensed under the ISC license.
79
80
  * See the LICENSE file in the root directory of this source tree.
80
81
  */
81
- const jt = [
82
+ const Zt = [
82
83
  [
83
84
  "path",
84
85
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
85
86
  ]
86
- ], qt = S("bold", jt);
87
+ ], Yt = _("bold", Zt);
87
88
  /**
88
89
  * @license lucide-react v1.8.0 - ISC
89
90
  *
90
91
  * This source code is licensed under the ISC license.
91
92
  * See the LICENSE file in the root directory of this source tree.
92
93
  */
93
- const Pt = [
94
+ const Jt = [
94
95
  ["path", { d: "M4 12h8", key: "17cfdx" }],
95
96
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
96
97
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
97
98
  ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1", key: "9jr5yi" }]
98
- ], Bt = S("heading-2", Pt);
99
+ ], Kt = _("heading-2", Jt);
99
100
  /**
100
101
  * @license lucide-react v1.8.0 - ISC
101
102
  *
102
103
  * This source code is licensed under the ISC license.
103
104
  * See the LICENSE file in the root directory of this source tree.
104
105
  */
105
- const Ft = [
106
+ const er = [
106
107
  ["path", { d: "M4 12h8", key: "17cfdx" }],
107
108
  ["path", { d: "M4 18V6", key: "1rz3zl" }],
108
109
  ["path", { d: "M12 18V6", key: "zqpxq5" }],
109
110
  ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2", key: "68ncm8" }],
110
111
  ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2", key: "1ejuhz" }]
111
- ], Vt = S("heading-3", Ft);
112
+ ], tr = _("heading-3", er);
112
113
  /**
113
114
  * @license lucide-react v1.8.0 - ISC
114
115
  *
115
116
  * This source code is licensed under the ISC license.
116
117
  * See the LICENSE file in the root directory of this source tree.
117
118
  */
118
- const Gt = [
119
+ const rr = [
119
120
  ["path", { d: "m9 11-6 6v3h9l3-3", key: "1a3l36" }],
120
121
  ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4", key: "14a9rk" }]
121
- ], Wt = S("highlighter", Gt);
122
+ ], nr = _("highlighter", rr);
122
123
  /**
123
124
  * @license lucide-react v1.8.0 - ISC
124
125
  *
125
126
  * This source code is licensed under the ISC license.
126
127
  * See the LICENSE file in the root directory of this source tree.
127
128
  */
128
- const Ut = [
129
+ const or = [
129
130
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
130
131
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
131
132
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
132
- ], Xt = S("italic", Ut);
133
+ ], ar = _("italic", or);
133
134
  /**
134
135
  * @license lucide-react v1.8.0 - ISC
135
136
  *
136
137
  * This source code is licensed under the ISC license.
137
138
  * See the LICENSE file in the root directory of this source tree.
138
139
  */
139
- const Qt = [
140
+ const ir = [
140
141
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
141
142
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
142
- ], Yt = S("link", Qt);
143
+ ], lr = _("link", ir);
143
144
  /**
144
145
  * @license lucide-react v1.8.0 - ISC
145
146
  *
146
147
  * This source code is licensed under the ISC license.
147
148
  * See the LICENSE file in the root directory of this source tree.
148
149
  */
149
- const Zt = [
150
+ const sr = [
150
151
  ["path", { d: "M11 5h10", key: "1cz7ny" }],
151
152
  ["path", { d: "M11 12h10", key: "1438ji" }],
152
153
  ["path", { d: "M11 19h10", key: "11t30w" }],
153
154
  ["path", { d: "M4 4h1v5", key: "10yrso" }],
154
155
  ["path", { d: "M4 9h2", key: "r1h2o0" }],
155
156
  ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
156
- ], Jt = S("list-ordered", Zt);
157
+ ], dr = _("list-ordered", sr);
157
158
  /**
158
159
  * @license lucide-react v1.8.0 - ISC
159
160
  *
160
161
  * This source code is licensed under the ISC license.
161
162
  * See the LICENSE file in the root directory of this source tree.
162
163
  */
163
- const Kt = [
164
+ const cr = [
164
165
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
165
166
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
166
167
  ["path", { d: "M3 19h.01", key: "noohij" }],
167
168
  ["path", { d: "M8 5h13", key: "1pao27" }],
168
169
  ["path", { d: "M8 12h13", key: "1za7za" }],
169
170
  ["path", { d: "M8 19h13", key: "m83p4d" }]
170
- ], er = S("list", Kt);
171
+ ], ur = _("list", cr);
171
172
  /**
172
173
  * @license lucide-react v1.8.0 - ISC
173
174
  *
174
175
  * This source code is licensed under the ISC license.
175
176
  * See the LICENSE file in the root directory of this source tree.
176
177
  */
177
- const tr = [
178
+ const mr = [
178
179
  ["path", { d: "M11 7 6 2", key: "1jwth8" }],
179
180
  ["path", { d: "M18.992 12H2.041", key: "xw1gg" }],
180
181
  [
@@ -191,25 +192,25 @@ const tr = [
191
192
  key: "1nk1rd"
192
193
  }
193
194
  ]
194
- ], rr = S("paint-bucket", tr);
195
+ ], hr = _("paint-bucket", mr);
195
196
  /**
196
197
  * @license lucide-react v1.8.0 - ISC
197
198
  *
198
199
  * This source code is licensed under the ISC license.
199
200
  * See the LICENSE file in the root directory of this source tree.
200
201
  */
201
- const nr = [
202
+ const fr = [
202
203
  ["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
203
204
  ["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2", key: "1b9h7c" }],
204
205
  ["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
205
- ], or = S("paint-roller", nr);
206
+ ], gr = _("paint-roller", fr);
206
207
  /**
207
208
  * @license lucide-react v1.8.0 - ISC
208
209
  *
209
210
  * This source code is licensed under the ISC license.
210
211
  * See the LICENSE file in the root directory of this source tree.
211
212
  */
212
- const ar = [
213
+ const pr = [
213
214
  [
214
215
  "path",
215
216
  {
@@ -221,48 +222,48 @@ const ar = [
221
222
  ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
222
223
  ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
223
224
  ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
224
- ], ir = S("palette", ar);
225
+ ], br = _("palette", pr);
225
226
  /**
226
227
  * @license lucide-react v1.8.0 - ISC
227
228
  *
228
229
  * This source code is licensed under the ISC license.
229
230
  * See the LICENSE file in the root directory of this source tree.
230
231
  */
231
- const sr = [
232
+ const yr = [
232
233
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
233
234
  ["path", { d: "M14 9h1", key: "l0svgy" }],
234
235
  ["path", { d: "M19 9h2", key: "te2zfg" }],
235
236
  ["path", { d: "M3 9h2", key: "1h4ldw" }],
236
237
  ["path", { d: "M9 9h1", key: "15jzuz" }]
237
- ], lr = S("panel-top-dashed", sr);
238
+ ], vr = _("panel-top-dashed", yr);
238
239
  /**
239
240
  * @license lucide-react v1.8.0 - ISC
240
241
  *
241
242
  * This source code is licensed under the ISC license.
242
243
  * See the LICENSE file in the root directory of this source tree.
243
244
  */
244
- const dr = [
245
+ const kr = [
245
246
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
246
247
  ["path", { d: "M3 9h18", key: "1pudct" }]
247
- ], cr = S("panel-top", dr);
248
+ ], wr = _("panel-top", kr);
248
249
  /**
249
250
  * @license lucide-react v1.8.0 - ISC
250
251
  *
251
252
  * This source code is licensed under the ISC license.
252
253
  * See the LICENSE file in the root directory of this source tree.
253
254
  */
254
- const ur = [
255
+ const xr = [
255
256
  ["path", { d: "M13 4v16", key: "8vvj80" }],
256
257
  ["path", { d: "M17 4v16", key: "7dpous" }],
257
258
  ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13", key: "sh4n9v" }]
258
- ], mr = S("pilcrow", ur);
259
+ ], Cr = _("pilcrow", xr);
259
260
  /**
260
261
  * @license lucide-react v1.8.0 - ISC
261
262
  *
262
263
  * This source code is licensed under the ISC license.
263
264
  * See the LICENSE file in the root directory of this source tree.
264
265
  */
265
- const hr = [
266
+ const Nr = [
266
267
  [
267
268
  "path",
268
269
  {
@@ -277,57 +278,90 @@ const hr = [
277
278
  key: "1ymkrd"
278
279
  }
279
280
  ]
280
- ], fr = S("quote", hr);
281
+ ], zr = _("quote", Nr);
281
282
  /**
282
283
  * @license lucide-react v1.8.0 - ISC
283
284
  *
284
285
  * This source code is licensed under the ISC license.
285
286
  * See the LICENSE file in the root directory of this source tree.
286
287
  */
287
- const gr = [
288
+ const Tr = [
288
289
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
289
290
  ["path", { d: "M3 12h18", key: "1i2n21" }]
290
- ], pr = S("rows-2", gr);
291
+ ], _r = _("rows-2", Tr);
291
292
  /**
292
293
  * @license lucide-react v1.8.0 - ISC
293
294
  *
294
295
  * This source code is licensed under the ISC license.
295
296
  * See the LICENSE file in the root directory of this source tree.
296
297
  */
297
- const br = [
298
+ const Mr = [
299
+ ["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
300
+ ["path", { d: "M8 12h8", key: "1wcyev" }],
301
+ ["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
302
+ ], Rr = _("spell-check", Mr);
303
+ /**
304
+ * @license lucide-react v1.8.0 - ISC
305
+ *
306
+ * This source code is licensed under the ISC license.
307
+ * See the LICENSE file in the root directory of this source tree.
308
+ */
309
+ const Sr = [
298
310
  ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
299
311
  ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
300
312
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
301
- ], vr = S("strikethrough", br);
313
+ ], Ar = _("strikethrough", Sr);
302
314
  /**
303
315
  * @license lucide-react v1.8.0 - ISC
304
316
  *
305
317
  * This source code is licensed under the ISC license.
306
318
  * See the LICENSE file in the root directory of this source tree.
307
319
  */
308
- const yr = [
320
+ const Er = [
309
321
  ["path", { d: "M12 3v18", key: "108xh3" }],
310
322
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
311
323
  ["path", { d: "M3 9h18", key: "1pudct" }],
312
324
  ["path", { d: "M3 15h18", key: "5xshup" }]
313
- ], wr = S("table", yr);
325
+ ], Hr = _("table", Er);
314
326
  /**
315
327
  * @license lucide-react v1.8.0 - ISC
316
328
  *
317
329
  * This source code is licensed under the ISC license.
318
330
  * See the LICENSE file in the root directory of this source tree.
319
331
  */
320
- const kr = [
332
+ const $r = [
321
333
  ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4", key: "9kb039" }],
322
334
  ["line", { x1: "4", x2: "20", y1: "20", y2: "20", key: "nun2al" }]
323
- ], xr = S("underline", kr);
335
+ ], Ir = _("underline", $r);
324
336
  /**
325
337
  * @license lucide-react v1.8.0 - ISC
326
338
  *
327
339
  * This source code is licensed under the ISC license.
328
340
  * See the LICENSE file in the root directory of this source tree.
329
341
  */
330
- const Cr = [
342
+ const Lr = [
343
+ [
344
+ "path",
345
+ {
346
+ d: "m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",
347
+ key: "ul74o6"
348
+ }
349
+ ],
350
+ ["path", { d: "m14 7 3 3", key: "1r5n42" }],
351
+ ["path", { d: "M5 6v4", key: "ilb8ba" }],
352
+ ["path", { d: "M19 14v4", key: "blhpug" }],
353
+ ["path", { d: "M10 2v2", key: "7u0qdc" }],
354
+ ["path", { d: "M7 8H3", key: "zfb6yr" }],
355
+ ["path", { d: "M21 16h-4", key: "1cnmox" }],
356
+ ["path", { d: "M11 3H9", key: "1obp7u" }]
357
+ ], Or = _("wand-sparkles", Lr);
358
+ /**
359
+ * @license lucide-react v1.8.0 - ISC
360
+ *
361
+ * This source code is licensed under the ISC license.
362
+ * See the LICENSE file in the root directory of this source tree.
363
+ */
364
+ const Dr = [
331
365
  [
332
366
  "path",
333
367
  {
@@ -335,24 +369,24 @@ const Cr = [
335
369
  key: "1ngwbx"
336
370
  }
337
371
  ]
338
- ], Nr = S("wrench", Cr), zr = {
372
+ ], qr = _("wrench", Dr), jr = {
339
373
  id: "rich-text-editor",
340
374
  capabilities: ["edit_inline"],
341
375
  state: {
342
376
  html: {
343
377
  type: "string",
344
378
  description: "Sanitised HTML representation of the editor content.",
345
- read: (n) => n.getHTML()
379
+ read: (o) => o.getHTML()
346
380
  },
347
381
  text: {
348
382
  type: "string",
349
383
  description: "Plain-text content of the editor (tags stripped).",
350
- read: (n) => n.getText()
384
+ read: (o) => o.getText()
351
385
  },
352
386
  markdown: {
353
387
  type: "string",
354
388
  description: "Markdown representation of the editor content. The Redactor engine has no native Markdown serialiser, so this is always empty — read `html` instead.",
355
- read: (n) => n.getMarkdown()
389
+ read: (o) => o.getMarkdown()
356
390
  }
357
391
  },
358
392
  actions: {
@@ -360,38 +394,38 @@ const Cr = [
360
394
  safety: "destructive",
361
395
  argsType: "{ html: string }",
362
396
  description: "Replace the editor content. Loses unsaved input.",
363
- invoke: (n, a) => {
364
- n.setContent(a.html);
397
+ invoke: (o, a) => {
398
+ o.setContent(a.html);
365
399
  }
366
400
  },
367
401
  insert_at_cursor: {
368
402
  safety: "destructive",
369
403
  argsType: "{ content: string; asHtml?: boolean }",
370
404
  description: "Insert content at the caret (replacing any selection). HTML is sanitised; pass asHtml:false for plain text. Seam for merge/template variables and AI-generated drafts.",
371
- invoke: (n, a) => {
372
- n.insertAtCursor(a.content, { asHtml: a.asHtml });
405
+ invoke: (o, a) => {
406
+ o.insertAtCursor(a.content, { asHtml: a.asHtml });
373
407
  }
374
408
  },
375
409
  apply_format: {
376
410
  safety: "destructive",
377
411
  argsType: "{ format: 'bold' | 'italic' | 'strikethrough' | 'bulletedList' | 'numberedList' | 'heading' | 'quote' | 'paragraph' }",
378
412
  description: "Toggle/apply a block or inline format on the current selection (bold, italic, strikethrough, bulleted/numbered list, heading, quote, paragraph).",
379
- invoke: (n, a) => {
380
- n.applyFormat(a.format);
413
+ invoke: (o, a) => {
414
+ o.applyFormat(a.format);
381
415
  }
382
416
  },
383
417
  clear: {
384
418
  safety: "destructive",
385
419
  description: "Empty the editor. Loses unsaved input.",
386
- invoke: (n) => {
387
- n.clear();
420
+ invoke: (o) => {
421
+ o.clear();
388
422
  }
389
423
  },
390
424
  focus: {
391
425
  safety: "read",
392
426
  description: "Move keyboard focus to the editor surface.",
393
- invoke: (n) => {
394
- n.focus();
427
+ invoke: (o) => {
428
+ o.focus();
395
429
  }
396
430
  }
397
431
  },
@@ -403,90 +437,97 @@ const Cr = [
403
437
  description: "Sourced from the id prop."
404
438
  }
405
439
  }
406
- }, Tr = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", Mr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Rr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", Ve = [
440
+ }, Pr = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", ie = "ds:!size-[var(--min-target-size)]", Br = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Fr = "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]", et = [
407
441
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
408
442
  "ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
409
443
  "ds:p-[var(--spacing-sm)] ds:[max-block-size:10rem] ds:overflow-y-auto",
410
444
  "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]"
411
445
  ].join(" ");
412
- function Ge(n, a) {
413
- return a ? n ? /\s$/.test(n) ? `${n}${a}` : `${n} ${a}` : a : n;
446
+ function tt(o, a) {
447
+ return a ? o ? /\s$/.test(o) ? `${o}${a}` : `${o} ${a}` : a : o;
414
448
  }
415
- function _r({
416
- open: n,
449
+ function Vr({
450
+ open: o,
417
451
  onClose: a,
418
452
  onRequestAiDraft: c,
419
- onInsert: i,
453
+ onInsert: l,
420
454
  previewAsHtml: s = !0,
421
- privacyNotice: h,
455
+ privacyNotice: f,
422
456
  onDictate: g
423
457
  }) {
424
- const { t: l } = X(), p = ae(), y = ae(), [T, $] = _(""), [E, k] = _(!1), [L, u] = _(!1), [m, b] = _(null), A = D(null), [M, H] = _(!1), [Z, C] = _(""), I = D(null), Q = z(() => {
458
+ const { t: i } = Z(), p = le(), v = le(), [T, H] = z(""), [S, w] = z(!1), [O, u] = z(!1), [h, k] = z(null), A = L(null), [M, E] = z(!1), [Y, $] = z(""), [D, I] = z(""), J = L(null), ee = C(() => {
425
459
  var x;
426
- (x = I.current) == null || x.abort();
427
- }, []), ne = z(() => {
460
+ (x = J.current) == null || x.abort();
461
+ }, []), de = C(() => {
428
462
  if (!g) return;
429
463
  const x = new AbortController();
430
- I.current = x, H(!0), C(""), g({
464
+ J.current = x, E(!0), $(""), I(i("editor.ai.listening")), g({
431
465
  signal: x.signal,
432
- onPartialTranscript: (O) => {
433
- x.signal.aborted || C(O);
466
+ onPartialTranscript: (q) => {
467
+ x.signal.aborted || $(q);
434
468
  },
435
- onFinalTranscript: (O) => {
469
+ onFinalTranscript: (q) => {
436
470
  if (x.signal.aborted) return;
437
- const F = O.trim();
438
- C(""), F && $((G) => Ge(G, F));
471
+ const F = q.trim();
472
+ $(""), F && (H((X) => tt(X, F)), I(F));
439
473
  }
440
474
  }).catch(() => {
441
475
  }).finally(() => {
442
- C(""), I.current === x && (I.current = null, H(!1));
476
+ $(""), J.current === x && (J.current = null, E(!1), I(""));
443
477
  });
444
- }, [g]), N = z(() => {
445
- M ? Q() : ne();
446
- }, [M, ne, Q]);
478
+ }, [g, i]), R = C(() => {
479
+ M ? ee() : de();
480
+ }, [M, de, ee]);
447
481
  K(() => {
448
- var x, O;
449
- n ? ($(""), k(!1), u(!1), b(null), C("")) : ((x = A.current) == null || x.abort(), A.current = null, (O = I.current) == null || O.abort());
450
- }, [n]), K(
482
+ var x, q;
483
+ o ? (H(""), w(!1), u(!1), k(null), $(""), I("")) : ((x = A.current) == null || x.abort(), A.current = null, (q = J.current) == null || q.abort());
484
+ }, [o]), K(
451
485
  () => () => {
452
- var x, O;
453
- (x = A.current) == null || x.abort(), (O = I.current) == null || O.abort();
486
+ var x, q;
487
+ (x = A.current) == null || x.abort(), (q = J.current) == null || q.abort();
454
488
  },
455
489
  []
456
490
  );
457
- const V = z(() => {
491
+ const W = C(() => {
458
492
  var F;
459
493
  const x = T.trim();
460
- if (!x || E) return;
461
- Q(), (F = A.current) == null || F.abort();
462
- const O = new AbortController();
463
- A.current = O, u(!1), k(!0), c({ prompt: x, signal: O.signal }).then((G) => {
464
- O.signal.aborted || (b(G), k(!1));
465
- }).catch((G) => {
466
- O.signal.aborted || G && typeof G == "object" && "name" in G && G.name === "AbortError" || (u(!0), k(!1));
494
+ if (!x || S) return;
495
+ ee(), (F = A.current) == null || F.abort();
496
+ const q = new AbortController();
497
+ A.current = q, u(!1), w(!0), c({ prompt: x, signal: q.signal }).then((X) => {
498
+ q.signal.aborted || (k(X), w(!1));
499
+ }).catch((X) => {
500
+ q.signal.aborted || X && typeof X == "object" && "name" in X && X.name === "AbortError" || (u(!0), w(!1));
467
501
  });
468
- }, [T, E, c, Q]), B = z(() => {
469
- m != null && (i(m), a());
470
- }, [m, i, a]), ie = m != null, me = M ? Ge(T, Z) : T;
502
+ }, [T, S, c, ee]), G = C(() => {
503
+ h != null && (l(h), a());
504
+ }, [h, l, a]), ce = h != null, ye = M ? tt(T, Y) : T;
471
505
  return /* @__PURE__ */ e(
472
- wt,
506
+ St,
473
507
  {
474
- open: n,
508
+ open: o,
475
509
  onClose: a,
476
- title: /* @__PURE__ */ v("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
477
- /* @__PURE__ */ e(Ee, { "aria-hidden": "true", className: "ds:size-4" }),
478
- l("editor.ai.dialogTitle")
479
- ] }),
480
- ariaLabel: l("editor.ai.dialogTitle"),
481
- children: ie ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-xs)]", children: [
510
+ ariaLabel: i("editor.ai.dialogTitle"),
511
+ children: ce ? /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
512
+ /* @__PURE__ */ e(
513
+ P,
514
+ {
515
+ size: "md",
516
+ intent: "outline",
517
+ className: ie,
518
+ icon: /* @__PURE__ */ e(Ke, {}),
519
+ "aria-label": i("common.close"),
520
+ onClick: a
521
+ }
522
+ ),
482
523
  /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: s ? /* @__PURE__ */ e(
483
- gt,
524
+ Tt,
484
525
  {
485
- html: m,
526
+ html: h,
486
527
  profile: "rich-text",
487
- className: Ve,
528
+ className: et,
488
529
  tabIndex: 0,
489
- "aria-label": l("editor.ai.dialogTitle")
530
+ "aria-label": i("editor.ai.dialogTitle")
490
531
  }
491
532
  ) : (
492
533
  // Focusable so a keyboard user can scroll a long draft preview
@@ -494,149 +535,162 @@ function _r({
494
535
  // tabIndex allowlist doesn't cover a scrollable, non-interactive
495
536
  // text region.
496
537
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
497
- /* @__PURE__ */ e("p", { className: Ve, tabIndex: 0, children: m })
538
+ /* @__PURE__ */ e("p", { className: et, tabIndex: 0, children: h })
498
539
  ) }),
499
540
  /* @__PURE__ */ e(
500
- q,
541
+ P,
501
542
  {
502
- size: "sm",
503
- intent: "ghost",
504
- className: "ds:rounded-full",
505
- icon: /* @__PURE__ */ e(kt, {}),
506
- "aria-label": l("editor.ai.retry"),
507
- onClick: () => b(null)
543
+ size: "md",
544
+ intent: "outline",
545
+ className: `${ie} ds:rounded-full`,
546
+ icon: /* @__PURE__ */ e(At, {}),
547
+ "aria-label": i("editor.ai.retry"),
548
+ onClick: () => k(null)
508
549
  }
509
550
  ),
510
551
  /* @__PURE__ */ e(
511
- q,
552
+ P,
512
553
  {
513
- size: "sm",
554
+ size: "md",
514
555
  intent: "primary",
515
- className: "ds:rounded-full",
516
- icon: /* @__PURE__ */ e(xt, {}),
517
- "aria-label": l("common.confirm"),
518
- onClick: B
556
+ className: `${ie} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
557
+ icon: /* @__PURE__ */ e(Et, {}),
558
+ "aria-label": i("common.confirm"),
559
+ onClick: G
519
560
  }
520
561
  )
521
- ] }) : /* @__PURE__ */ v(Ae, { children: [
522
- /* @__PURE__ */ v("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-xs)]", children: [
562
+ ] }) : /* @__PURE__ */ y(Oe, { children: [
563
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-end ds:gap-[var(--spacing-sm)]", children: [
564
+ /* @__PURE__ */ e(
565
+ P,
566
+ {
567
+ size: "md",
568
+ intent: "outline",
569
+ className: ie,
570
+ icon: /* @__PURE__ */ e(Ke, {}),
571
+ "aria-label": i("common.close"),
572
+ onClick: a
573
+ }
574
+ ),
523
575
  /* @__PURE__ */ e("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ e(
524
- yt,
576
+ Rt,
525
577
  {
526
578
  id: p,
527
579
  size: "md",
528
- value: me,
529
- onChange: (x) => $(x.target.value),
530
- placeholder: l("editor.ai.promptPlaceholder"),
531
- "aria-label": l("editor.ai.promptLabel"),
580
+ className: "ds:content-center",
581
+ value: ye,
582
+ onChange: (x) => H(x.target.value),
583
+ placeholder: i("editor.ai.promptPlaceholder"),
584
+ "aria-label": i("editor.ai.promptLabel"),
532
585
  autoResize: !0,
533
586
  minRows: 1,
534
587
  maxRows: 3,
535
588
  readOnly: M,
536
- tone: L ? "error" : "default",
537
- "aria-describedby": L ? y : void 0
589
+ tone: O ? "error" : "default",
590
+ "aria-describedby": O ? v : void 0
538
591
  }
539
592
  ) }),
540
593
  g ? /* @__PURE__ */ e(
541
- q,
594
+ P,
542
595
  {
543
- size: "sm",
544
- intent: "ghost",
545
- className: M ? Tr : void 0,
546
- icon: M ? /* @__PURE__ */ e(_e, { className: "ds:fill-current" }) : /* @__PURE__ */ e(Se, {}),
596
+ size: "md",
597
+ intent: "outline",
598
+ className: M ? `${ie} ${Pr}` : ie,
599
+ icon: M ? /* @__PURE__ */ e(ot, { className: "ds:fill-current" }) : /* @__PURE__ */ e(at, {}),
547
600
  "aria-pressed": M,
548
- "aria-label": l(M ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
549
- onClick: N
601
+ "aria-label": i(M ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
602
+ onClick: R
550
603
  }
551
604
  ) : null,
552
605
  /* @__PURE__ */ e(
553
- q,
606
+ P,
554
607
  {
555
- size: "sm",
608
+ size: "md",
556
609
  intent: "primary",
557
- icon: E ? /* @__PURE__ */ e(vt, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Ct, {}),
558
- className: "ds:rounded-full",
559
- disabled: E || !T.trim(),
560
- "aria-busy": E || void 0,
561
- "aria-label": l("editor.ai.generate"),
562
- onClick: V
610
+ icon: S ? /* @__PURE__ */ e(Le, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Ht, {}),
611
+ className: `${ie} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`,
612
+ disabled: S || !T.trim(),
613
+ "aria-busy": S || void 0,
614
+ "aria-label": i("editor.ai.generate"),
615
+ onClick: W
563
616
  }
564
617
  )
565
618
  ] }),
566
- L ? /* @__PURE__ */ e("p", { id: y, role: "alert", className: Rr, children: l("editor.ai.error") }) : h ? /* @__PURE__ */ e("p", { className: Mr, children: h }) : null
619
+ g ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: D }) : null,
620
+ O ? /* @__PURE__ */ e("p", { id: v, role: "alert", className: Fr, children: i("editor.ai.error") }) : f ? /* @__PURE__ */ e("p", { className: Br, children: f }) : null
567
621
  ] })
568
622
  }
569
623
  );
570
624
  }
571
- const Sr = {
625
+ const Gr = {
572
626
  bold: {
573
627
  id: "bold",
574
- icon: /* @__PURE__ */ e(qt, {}),
628
+ icon: /* @__PURE__ */ e(Yt, {}),
575
629
  label: ["editor.bold", "Bold"],
576
630
  command: ["module.inline.format", { tag: "b" }],
577
631
  toggle: "bold"
578
632
  },
579
633
  italic: {
580
634
  id: "italic",
581
- icon: /* @__PURE__ */ e(Xt, {}),
635
+ icon: /* @__PURE__ */ e(ar, {}),
582
636
  label: ["editor.italic", "Italic"],
583
637
  command: ["module.inline.format", { tag: "i" }],
584
638
  toggle: "italic"
585
639
  },
586
640
  underline: {
587
641
  id: "underline",
588
- icon: /* @__PURE__ */ e(xr, {}),
642
+ icon: /* @__PURE__ */ e(Ir, {}),
589
643
  label: ["editor.underline", "Underline"],
590
644
  command: ["module.inline.format", { tag: "u" }],
591
645
  toggle: "underline"
592
646
  },
593
647
  strike: {
594
648
  id: "strike",
595
- icon: /* @__PURE__ */ e(vr, {}),
649
+ icon: /* @__PURE__ */ e(Ar, {}),
596
650
  label: ["editor.strike", "Strikethrough"],
597
651
  command: ["module.inline.format", { tag: "del" }],
598
652
  toggle: "strike"
599
653
  },
600
654
  ul: {
601
655
  id: "ul",
602
- icon: /* @__PURE__ */ e(er, {}),
656
+ icon: /* @__PURE__ */ e(ur, {}),
603
657
  label: ["editor.list.bullet", "Bulleted list"],
604
658
  command: ["module.list.toggle", "ul"],
605
659
  toggle: "ul"
606
660
  },
607
661
  ol: {
608
662
  id: "ol",
609
- icon: /* @__PURE__ */ e(Jt, {}),
663
+ icon: /* @__PURE__ */ e(dr, {}),
610
664
  label: ["editor.list.ordered", "Numbered list"],
611
665
  command: ["module.list.toggle", "ol"],
612
666
  toggle: "ol"
613
667
  }
614
- }, Me = [
668
+ }, $e = [
615
669
  {
616
670
  id: "paragraph",
617
671
  tag: "p",
618
- icon: /* @__PURE__ */ e(mr, {}),
672
+ icon: /* @__PURE__ */ e(Cr, {}),
619
673
  label: ["editor.paragraph", "Paragraph"]
620
674
  },
621
675
  {
622
676
  id: "h2",
623
677
  tag: "h2",
624
- icon: /* @__PURE__ */ e(Bt, {}),
678
+ icon: /* @__PURE__ */ e(Kt, {}),
625
679
  label: ["editor.heading2", "Heading 2"]
626
680
  },
627
681
  {
628
682
  id: "h3",
629
683
  tag: "h3",
630
- icon: /* @__PURE__ */ e(Vt, {}),
684
+ icon: /* @__PURE__ */ e(tr, {}),
631
685
  label: ["editor.heading3", "Heading 3"]
632
686
  },
633
687
  {
634
688
  id: "quote",
635
689
  tag: "blockquote",
636
- icon: /* @__PURE__ */ e(fr, {}),
690
+ icon: /* @__PURE__ */ e(zr, {}),
637
691
  label: ["editor.quote", "Quote"]
638
692
  }
639
- ], Er = {
693
+ ], Wr = {
640
694
  minimal: ["bold", "italic", "link"],
641
695
  standard: [
642
696
  "format",
@@ -649,242 +703,242 @@ const Sr = {
649
703
  "link"
650
704
  ],
651
705
  full: ["format", "bold", "italic", "underline", "strike", "ul", "ol", "link"]
652
- }, Xe = [
706
+ }, it = [
653
707
  {
654
708
  id: "rowAbove",
655
709
  command: "plugin.table.addRowAbove",
656
- icon: /* @__PURE__ */ e(It, {}),
710
+ icon: /* @__PURE__ */ e(Gt, {}),
657
711
  label: ["editor.table.rowAbove", "Add row above"]
658
712
  },
659
713
  {
660
714
  id: "rowBelow",
661
715
  command: "plugin.table.addRowBelow",
662
- icon: /* @__PURE__ */ e(At, {}),
716
+ icon: /* @__PURE__ */ e(Ft, {}),
663
717
  label: ["editor.table.rowBelow", "Add row below"]
664
718
  },
665
719
  {
666
720
  id: "colLeft",
667
721
  command: "plugin.table.addColumnLeft",
668
- icon: /* @__PURE__ */ e(Dt, {}),
722
+ icon: /* @__PURE__ */ e(Qt, {}),
669
723
  label: ["editor.table.columnLeft", "Add column left"]
670
724
  },
671
725
  {
672
726
  id: "colRight",
673
727
  command: "plugin.table.addColumnRight",
674
- icon: /* @__PURE__ */ e(Lt, {}),
728
+ icon: /* @__PURE__ */ e(Xt, {}),
675
729
  label: ["editor.table.columnRight", "Add column right"]
676
730
  },
677
731
  {
678
732
  id: "addHead",
679
733
  command: "plugin.table.addHead",
680
- icon: /* @__PURE__ */ e(cr, {}),
734
+ icon: /* @__PURE__ */ e(wr, {}),
681
735
  label: ["editor.table.addHeader", "Add header row"]
682
736
  },
683
737
  {
684
738
  id: "deleteHead",
685
739
  command: "plugin.table.deleteHead",
686
- icon: /* @__PURE__ */ e(lr, {}),
740
+ icon: /* @__PURE__ */ e(vr, {}),
687
741
  label: ["editor.table.deleteHeader", "Remove header row"]
688
742
  },
689
743
  {
690
744
  id: "deleteRow",
691
745
  command: "plugin.table.deleteRow",
692
- icon: /* @__PURE__ */ e(pr, {}),
746
+ icon: /* @__PURE__ */ e(_r, {}),
693
747
  label: ["editor.table.deleteRow", "Delete row"]
694
748
  },
695
749
  {
696
750
  id: "deleteColumn",
697
751
  command: "plugin.table.deleteColumn",
698
- icon: /* @__PURE__ */ e(_t, {}),
752
+ icon: /* @__PURE__ */ e(qt, {}),
699
753
  label: ["editor.table.deleteColumn", "Delete column"]
700
754
  },
701
755
  {
702
756
  id: "deleteTable",
703
757
  command: "plugin.table.deleteTable",
704
- icon: /* @__PURE__ */ e(St, {}),
758
+ icon: /* @__PURE__ */ e(jt, {}),
705
759
  label: ["editor.table.deleteTable", "Delete table"]
706
760
  }
707
- ], we = 6, Ar = He(
761
+ ], Te = 6, Xr = De(
708
762
  [
709
763
  "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
710
764
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
711
765
  "ds:bg-[var(--background)] ds:p-[var(--spacing-xs)]",
712
766
  "ds:shadow-[var(--shadow-md)]"
713
767
  ].join(" ")
714
- ), Qe = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", ue = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
715
- function xe(n) {
716
- return n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
768
+ ), lt = "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[var(--border)] ds:[margin-inline:var(--spacing-2xs)]", be = "ds:text-[length:var(--font-size-sm)] ds:font-medium ds:text-[color:var(--foreground)]";
769
+ function Me(o) {
770
+ return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
717
771
  }
718
- function Hr({
719
- run: n,
772
+ function Ur({
773
+ run: o,
720
774
  active: a,
721
775
  onTriggerDown: c
722
776
  }) {
723
- const { t: i } = X(), s = Me.find((h) => a.has(h.id)) ?? Me[0];
724
- return /* @__PURE__ */ v(ye.Root, { children: [
725
- /* @__PURE__ */ e(ye.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
726
- re,
777
+ const { t: l } = Z(), s = $e.find((f) => a.has(f.id)) ?? $e[0];
778
+ return /* @__PURE__ */ y(ze.Root, { children: [
779
+ /* @__PURE__ */ e(ze.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
780
+ ne,
727
781
  {
728
782
  size: "sm",
729
783
  intent: "ghost",
730
784
  startIcon: s.icon,
731
- endIcon: /* @__PURE__ */ e(Mt, {}),
732
- "aria-label": i("editor.format", "Paragraph style"),
785
+ endIcon: /* @__PURE__ */ e(Ot, {}),
786
+ "aria-label": l("editor.format", "Paragraph style"),
733
787
  onMouseDown: c,
734
- children: i(s.label[0], s.label[1])
788
+ children: l(s.label[0], s.label[1])
735
789
  }
736
790
  ) }),
737
- /* @__PURE__ */ e(ye.Content, { align: "start", children: Me.map((h) => /* @__PURE__ */ e(
738
- ye.Item,
791
+ /* @__PURE__ */ e(ze.Content, { align: "start", children: $e.map((f) => /* @__PURE__ */ e(
792
+ ze.Item,
739
793
  {
740
- startIcon: h.icon,
741
- onSelect: () => n("module.block.format", { tag: h.tag }),
742
- children: i(h.label[0], h.label[1])
794
+ startIcon: f.icon,
795
+ onSelect: () => o("module.block.format", { tag: f.tag }),
796
+ children: l(f.label[0], f.label[1])
743
797
  },
744
- h.id
798
+ f.id
745
799
  )) })
746
800
  ] });
747
801
  }
748
- function Ir({
749
- insertHtml: n,
802
+ function Qr({
803
+ insertHtml: o,
750
804
  saveSelection: a,
751
805
  restoreSelection: c,
752
- getSelectedText: i
806
+ getSelectedText: l
753
807
  }) {
754
- const { t: s } = X(), [h, g] = _(!1), [l, p] = _(""), [y, T] = _(""), [$, E] = _(!1), k = ae(), L = ae(), u = () => {
755
- p(""), T(""), E(!1);
756
- }, m = () => {
757
- const b = l.trim();
758
- if (!b) return;
759
- const A = y.trim() || b, M = $ ? ' target="_blank" rel="noopener noreferrer"' : "", H = `<a href="${xe(b)}"${M}>${xe(A)}</a>`;
808
+ const { t: s } = Z(), [f, g] = z(!1), [i, p] = z(""), [v, T] = z(""), [H, S] = z(!1), w = le(), O = le(), u = () => {
809
+ p(""), T(""), S(!1);
810
+ }, h = () => {
811
+ const k = i.trim();
812
+ if (!k) return;
813
+ const A = v.trim() || k, M = H ? ' target="_blank" rel="noopener noreferrer"' : "", E = `<a href="${Me(k)}"${M}>${Me(A)}</a>`;
760
814
  g(!1), u(), window.requestAnimationFrame(() => {
761
- c(), n(H);
815
+ c(), o(E);
762
816
  });
763
817
  };
764
- return /* @__PURE__ */ v(j.Root, { open: h, onOpenChange: g, children: [
818
+ return /* @__PURE__ */ y(j.Root, { open: f, onOpenChange: g, children: [
765
819
  /* @__PURE__ */ e(j.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
766
- q,
820
+ P,
767
821
  {
768
822
  size: "sm",
769
823
  intent: "ghost",
770
- icon: /* @__PURE__ */ e(Yt, {}),
824
+ icon: /* @__PURE__ */ e(lr, {}),
771
825
  "aria-label": s("editor.link.insert", "Insert link"),
772
826
  onMouseDown: () => {
773
- a(), T(i());
827
+ a(), T(l());
774
828
  }
775
829
  }
776
830
  ) }),
777
- /* @__PURE__ */ v(j.Content, { children: [
831
+ /* @__PURE__ */ y(j.Content, { children: [
778
832
  /* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children: s("editor.link.insert", "Insert link") }) }),
779
- /* @__PURE__ */ v(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
780
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
781
- /* @__PURE__ */ e("label", { htmlFor: k, className: ue, children: s("editor.link.url", "URL") }),
833
+ /* @__PURE__ */ y(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
834
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
835
+ /* @__PURE__ */ e("label", { htmlFor: w, className: be, children: s("editor.link.url", "URL") }),
782
836
  /* @__PURE__ */ e(
783
- ke,
837
+ _e,
784
838
  {
785
- id: k,
839
+ id: w,
786
840
  type: "url",
787
- value: l,
788
- onChange: (b) => p(b.target.value),
841
+ value: i,
842
+ onChange: (k) => p(k.target.value),
789
843
  placeholder: "https://…"
790
844
  }
791
845
  )
792
846
  ] }),
793
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
794
- /* @__PURE__ */ e("label", { htmlFor: L, className: ue, children: s("editor.link.text", "Text to display") }),
847
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
848
+ /* @__PURE__ */ e("label", { htmlFor: O, className: be, children: s("editor.link.text", "Text to display") }),
795
849
  /* @__PURE__ */ e(
796
- ke,
850
+ _e,
797
851
  {
798
- id: L,
799
- value: y,
800
- onChange: (b) => T(b.target.value),
852
+ id: O,
853
+ value: v,
854
+ onChange: (k) => T(k.target.value),
801
855
  placeholder: s("editor.link.textPlaceholder", "Link text")
802
856
  }
803
857
  )
804
858
  ] }),
805
859
  /* @__PURE__ */ e(
806
- zt,
860
+ It,
807
861
  {
808
- checked: $,
809
- onCheckedChange: (b) => E(b === !0),
862
+ checked: H,
863
+ onCheckedChange: (k) => S(k === !0),
810
864
  label: s("editor.link.newTab", "Open in new tab")
811
865
  }
812
866
  )
813
867
  ] }),
814
- /* @__PURE__ */ v(j.Footer, { children: [
815
- /* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(re, { intent: "secondary", children: s("editor.ai.cancel", "Cancel") }) }),
816
- /* @__PURE__ */ e(re, { onClick: m, disabled: !l.trim(), children: s("editor.link.insertAction", "Insert") })
868
+ /* @__PURE__ */ y(j.Footer, { children: [
869
+ /* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(ne, { intent: "secondary", children: s("common.cancel") }) }),
870
+ /* @__PURE__ */ e(ne, { onClick: h, disabled: !i.trim(), children: s("editor.link.insertAction", "Insert") })
817
871
  ] })
818
872
  ] })
819
873
  ] });
820
874
  }
821
- function $r({
822
- insertHtml: n,
875
+ function Zr({
876
+ insertHtml: o,
823
877
  saveSelection: a,
824
878
  restoreSelection: c,
825
- uploadImage: i
879
+ uploadImage: l
826
880
  }) {
827
- const { t: s } = X(), [h, g] = _(!1), [l, p] = _(""), [y, T] = _(""), $ = ae(), E = ae(), k = (u, m) => {
828
- const b = `<img src="${xe(u)}" alt="${xe(m)}" loading="lazy">`;
881
+ const { t: s } = Z(), [f, g] = z(!1), [i, p] = z(""), [v, T] = z(""), H = le(), S = le(), w = (u, h) => {
882
+ const k = `<img src="${Me(u)}" alt="${Me(h)}" loading="lazy">`;
829
883
  g(!1), p(""), T(""), window.requestAnimationFrame(() => {
830
- c(), n(b);
884
+ c(), o(k);
831
885
  });
832
- }, L = () => {
833
- const u = l.trim();
834
- u && k(u, y.trim());
886
+ }, O = () => {
887
+ const u = i.trim();
888
+ u && w(u, v.trim());
835
889
  };
836
- return /* @__PURE__ */ v(j.Root, { open: h, onOpenChange: g, children: [
890
+ return /* @__PURE__ */ y(j.Root, { open: f, onOpenChange: g, children: [
837
891
  /* @__PURE__ */ e(j.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
838
- q,
892
+ P,
839
893
  {
840
894
  size: "sm",
841
895
  intent: "ghost",
842
- icon: /* @__PURE__ */ e(Rt, {}),
896
+ icon: /* @__PURE__ */ e(Dt, {}),
843
897
  "aria-label": s("editor.image.insert", "Insert image"),
844
898
  onMouseDown: () => a()
845
899
  }
846
900
  ) }),
847
- /* @__PURE__ */ v(j.Content, { children: [
901
+ /* @__PURE__ */ y(j.Content, { children: [
848
902
  /* @__PURE__ */ e(j.Header, { children: /* @__PURE__ */ e(j.Title, { children: s("editor.image.insert", "Insert image") }) }),
849
- /* @__PURE__ */ v(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
850
- i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
851
- /* @__PURE__ */ e("span", { className: ue, children: s("editor.image.upload", "Upload") }),
903
+ /* @__PURE__ */ y(j.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
904
+ l ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
905
+ /* @__PURE__ */ e("span", { className: be, children: s("editor.image.upload", "Upload") }),
852
906
  /* @__PURE__ */ e(
853
- Tt,
907
+ Lt,
854
908
  {
855
909
  variant: "dropzone",
856
910
  accept: {
857
911
  "image/*": [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg"]
858
912
  },
859
913
  maxFiles: 1,
860
- onUpload: async (u, { signal: m }) => {
861
- const b = await i(u, m);
862
- k(b, u.name);
914
+ onUpload: async (u, { signal: h }) => {
915
+ const k = await l(u, h);
916
+ w(k, u.name);
863
917
  }
864
918
  }
865
919
  ),
866
920
  /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s("editor.image.orUrl", "Or paste an image URL") })
867
921
  ] }) : null,
868
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
869
- /* @__PURE__ */ e("label", { htmlFor: $, className: ue, children: s("editor.image.url", "Image URL") }),
922
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
923
+ /* @__PURE__ */ e("label", { htmlFor: H, className: be, children: s("editor.image.url", "Image URL") }),
870
924
  /* @__PURE__ */ e(
871
- ke,
925
+ _e,
872
926
  {
873
- id: $,
927
+ id: H,
874
928
  type: "url",
875
- value: l,
929
+ value: i,
876
930
  onChange: (u) => p(u.target.value),
877
931
  placeholder: "https://…"
878
932
  }
879
933
  )
880
934
  ] }),
881
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
882
- /* @__PURE__ */ e("label", { htmlFor: E, className: ue, children: s("editor.image.alt", "Alt text") }),
935
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
936
+ /* @__PURE__ */ e("label", { htmlFor: S, className: be, children: s("editor.image.alt", "Alt text") }),
883
937
  /* @__PURE__ */ e(
884
- ke,
938
+ _e,
885
939
  {
886
- id: E,
887
- value: y,
940
+ id: S,
941
+ value: v,
888
942
  onChange: (u) => T(u.target.value),
889
943
  placeholder: s(
890
944
  "editor.image.altPlaceholder",
@@ -894,44 +948,44 @@ function $r({
894
948
  )
895
949
  ] })
896
950
  ] }),
897
- /* @__PURE__ */ v(j.Footer, { children: [
898
- /* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(re, { intent: "secondary", children: s("editor.ai.cancel", "Cancel") }) }),
899
- /* @__PURE__ */ e(re, { onClick: L, disabled: !l.trim(), children: s("editor.link.insertAction", "Insert") })
951
+ /* @__PURE__ */ y(j.Footer, { children: [
952
+ /* @__PURE__ */ e(j.Close, { asChild: !0, children: /* @__PURE__ */ e(ne, { intent: "secondary", children: s("common.cancel") }) }),
953
+ /* @__PURE__ */ e(ne, { onClick: O, disabled: !i.trim(), children: s("editor.image.insertAction", "Insert") })
900
954
  ] })
901
955
  ] })
902
956
  ] });
903
957
  }
904
- function Lr({
905
- run: n,
958
+ function Yr({
959
+ run: o,
906
960
  saveSelection: a,
907
961
  restoreSelection: c
908
962
  }) {
909
- const { t: i } = X(), [s, h] = _("#1f2a5c"), g = (p) => {
910
- h(p), c(), n("module.inline.format", {
963
+ const { t: l } = Z(), [s, f] = z("#1f2a5c"), g = (p) => {
964
+ f(p), c(), o("module.inline.format", {
911
965
  tag: "span",
912
966
  style: { color: p },
913
967
  type: "toggle"
914
968
  });
915
- }, l = () => {
916
- c(), n("module.inline.remove", { style: "color" });
969
+ }, i = () => {
970
+ c(), o("module.inline.remove", { style: "color" });
917
971
  };
918
- return /* @__PURE__ */ v(P, { onOpenChange: (p) => p && a(), children: [
919
- /* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
920
- q,
972
+ return /* @__PURE__ */ y(B, { onOpenChange: (p) => p && a(), children: [
973
+ /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
974
+ P,
921
975
  {
922
976
  size: "sm",
923
977
  intent: "ghost",
924
- icon: /* @__PURE__ */ e(ir, {}),
925
- "aria-label": i("editor.textColor", "Text colour"),
978
+ icon: /* @__PURE__ */ e(br, {}),
979
+ "aria-label": l("editor.textColor", "Text colour"),
926
980
  onMouseDown: (p) => {
927
981
  p.preventDefault(), a();
928
982
  }
929
983
  }
930
984
  ) }),
931
- /* @__PURE__ */ v(P.Content, { side: "bottom", align: "start", children: [
932
- /* @__PURE__ */ e(P.Heading, { children: i("editor.textColor", "Text colour") }),
985
+ /* @__PURE__ */ y(B.Content, { side: "bottom", align: "start", children: [
986
+ /* @__PURE__ */ e(B.Heading, { children: l("editor.textColor", "Text colour") }),
933
987
  /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
934
- Ie,
988
+ qe,
935
989
  {
936
990
  variant: "inline",
937
991
  size: "sm",
@@ -939,41 +993,41 @@ function Lr({
939
993
  onChange: g
940
994
  }
941
995
  ) }),
942
- /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(re, { size: "sm", intent: "secondary", onClick: l, children: i("editor.color.remove", "Remove colour") }) })
996
+ /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ne, { size: "sm", intent: "secondary", onClick: i, children: l("editor.color.remove", "Remove colour") }) })
943
997
  ] })
944
998
  ] });
945
999
  }
946
- function Or({
947
- run: n,
1000
+ function Jr({
1001
+ run: o,
948
1002
  saveSelection: a,
949
1003
  restoreSelection: c
950
1004
  }) {
951
- const { t: i } = X(), [s, h] = _("#fff3a3"), g = (p) => {
952
- h(p), c(), n("module.inline.format", {
1005
+ const { t: l } = Z(), [s, f] = z("#fff3a3"), g = (p) => {
1006
+ f(p), c(), o("module.inline.format", {
953
1007
  tag: "span",
954
1008
  style: { "background-color": p },
955
1009
  type: "toggle"
956
1010
  });
957
- }, l = () => {
958
- c(), n("module.inline.remove", { style: "background-color" });
1011
+ }, i = () => {
1012
+ c(), o("module.inline.remove", { style: "background-color" });
959
1013
  };
960
- return /* @__PURE__ */ v(P, { onOpenChange: (p) => p && a(), children: [
961
- /* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
962
- q,
1014
+ return /* @__PURE__ */ y(B, { onOpenChange: (p) => p && a(), children: [
1015
+ /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1016
+ P,
963
1017
  {
964
1018
  size: "sm",
965
1019
  intent: "ghost",
966
- icon: /* @__PURE__ */ e(Wt, {}),
967
- "aria-label": i("editor.highlightColor", "Highlight"),
1020
+ icon: /* @__PURE__ */ e(nr, {}),
1021
+ "aria-label": l("editor.highlightColor", "Highlight"),
968
1022
  onMouseDown: (p) => {
969
1023
  p.preventDefault(), a();
970
1024
  }
971
1025
  }
972
1026
  ) }),
973
- /* @__PURE__ */ v(P.Content, { side: "bottom", align: "start", children: [
974
- /* @__PURE__ */ e(P.Heading, { children: i("editor.highlightColor", "Highlight") }),
1027
+ /* @__PURE__ */ y(B.Content, { side: "bottom", align: "start", children: [
1028
+ /* @__PURE__ */ e(B.Heading, { children: l("editor.highlightColor", "Highlight") }),
975
1029
  /* @__PURE__ */ e("div", { className: "ds:pt-[var(--spacing-sm)]", children: /* @__PURE__ */ e(
976
- Ie,
1030
+ qe,
977
1031
  {
978
1032
  variant: "inline",
979
1033
  size: "sm",
@@ -981,40 +1035,40 @@ function Or({
981
1035
  onChange: g
982
1036
  }
983
1037
  ) }),
984
- /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(re, { size: "sm", intent: "secondary", onClick: l, children: i("editor.highlight.remove", "Remove highlight") }) })
1038
+ /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-sm)] ds:flex ds:items-center ds:justify-end", children: /* @__PURE__ */ e(ne, { size: "sm", intent: "secondary", onClick: i, children: l("editor.highlight.remove", "Remove highlight") }) })
985
1039
  ] })
986
1040
  ] });
987
1041
  }
988
- function Dr(n, a) {
1042
+ function Kr(o, a) {
989
1043
  const c = Array.from({ length: a }, () => "<td><br></td>").join("");
990
- return `<table><tbody>${Array.from({ length: n }, () => `<tr>${c}</tr>`).join("")}</tbody></table>`;
1044
+ return `<table><tbody>${Array.from({ length: o }, () => `<tr>${c}</tr>`).join("")}</tbody></table>`;
991
1045
  }
992
- function jr({
993
- run: n,
1046
+ function en({
1047
+ run: o,
994
1048
  insertTable: a,
995
1049
  active: c
996
1050
  }) {
997
- const { t: i } = X(), [s, h] = _({ r: 0, c: 0 }), g = c.has("table");
998
- return /* @__PURE__ */ v(P, { onOpenChange: (l) => !l && h({ r: 0, c: 0 }), children: [
999
- /* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1000
- q,
1051
+ const { t: l } = Z(), [s, f] = z({ r: 0, c: 0 }), g = c.has("table");
1052
+ return /* @__PURE__ */ y(B, { onOpenChange: (i) => !i && f({ r: 0, c: 0 }), children: [
1053
+ /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1054
+ P,
1001
1055
  {
1002
1056
  size: "sm",
1003
1057
  intent: "ghost",
1004
- icon: /* @__PURE__ */ e(wr, {}),
1005
- "aria-label": i("editor.table.insert", "Insert table"),
1006
- onMouseDown: (l) => l.preventDefault()
1058
+ icon: /* @__PURE__ */ e(Hr, {}),
1059
+ "aria-label": l("editor.table.insert", "Insert table"),
1060
+ onMouseDown: (i) => i.preventDefault()
1007
1061
  }
1008
1062
  ) }),
1009
- /* @__PURE__ */ e(P.Content, { side: "bottom", align: "start", children: g ? (
1063
+ /* @__PURE__ */ e(B.Content, { side: "bottom", align: "start", children: g ? (
1010
1064
  // Caret is already inside a table — offer the manage ops only, never
1011
1065
  // a nested-table insert (mirrors Redactor's native dropdown, which
1012
1066
  // disables "insert table" while the caret is in a table).
1013
- /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: Xe.map((l) => /* @__PURE__ */ v(
1067
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: it.map((i) => /* @__PURE__ */ y(
1014
1068
  "button",
1015
1069
  {
1016
1070
  type: "button",
1017
- onClick: () => n(l.command),
1071
+ onClick: () => o(i.command),
1018
1072
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-2xs)] ds:text-start ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)] ds:hover:bg-[var(--muted)]",
1019
1073
  children: [
1020
1074
  /* @__PURE__ */ e(
@@ -1022,100 +1076,100 @@ function jr({
1022
1076
  {
1023
1077
  "aria-hidden": "true",
1024
1078
  className: "ds:inline-flex ds:size-4 ds:shrink-0 ds:items-center ds:justify-center ds:text-[color:var(--muted-foreground)]",
1025
- children: l.icon
1079
+ children: i.icon
1026
1080
  }
1027
1081
  ),
1028
- i(l.label[0], l.label[1])
1082
+ l(i.label[0], i.label[1])
1029
1083
  ]
1030
1084
  },
1031
- l.id
1085
+ i.id
1032
1086
  )) })
1033
- ) : /* @__PURE__ */ v(Ae, { children: [
1034
- /* @__PURE__ */ e(P.Heading, { children: i("editor.table.insert", "Insert table") }),
1087
+ ) : /* @__PURE__ */ y(Oe, { children: [
1088
+ /* @__PURE__ */ e(B.Heading, { children: l("editor.table.insert", "Insert table") }),
1035
1089
  /* @__PURE__ */ e(
1036
1090
  "div",
1037
1091
  {
1038
1092
  role: "group",
1039
- "aria-label": i("editor.table.sizePicker", "Table size"),
1093
+ "aria-label": l("editor.table.sizePicker", "Table size"),
1040
1094
  className: "ds:mt-[var(--spacing-sm)] ds:grid ds:w-fit ds:grid-cols-6 ds:gap-[var(--spacing-2xs)]",
1041
- onMouseLeave: () => h({ r: 0, c: 0 }),
1042
- children: Array.from({ length: we * we }, (l, p) => {
1043
- const y = Math.floor(p / we) + 1, T = p % we + 1, $ = y <= s.r && T <= s.c;
1095
+ onMouseLeave: () => f({ r: 0, c: 0 }),
1096
+ children: Array.from({ length: Te * Te }, (i, p) => {
1097
+ const v = Math.floor(p / Te) + 1, T = p % Te + 1, H = v <= s.r && T <= s.c;
1044
1098
  return /* @__PURE__ */ e(
1045
1099
  "button",
1046
1100
  {
1047
1101
  type: "button",
1048
- "aria-label": i("editor.table.sizeCell", "{{r}}×{{c}}", {
1049
- r: y,
1102
+ "aria-label": l("editor.table.sizeCell", "{{r}}×{{c}}", {
1103
+ r: v,
1050
1104
  c: T
1051
1105
  }),
1052
- onMouseEnter: () => h({ r: y, c: T }),
1053
- onClick: () => a(Dr(y, T)),
1054
- className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${$ ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1106
+ onMouseEnter: () => f({ r: v, c: T }),
1107
+ onClick: () => a(Kr(v, T)),
1108
+ className: `ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ${H ? "ds:bg-[var(--primary)]" : "ds:bg-[var(--muted)]"}`
1055
1109
  },
1056
1110
  p
1057
1111
  );
1058
1112
  })
1059
1113
  }
1060
1114
  ),
1061
- /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s.r > 0 ? i("editor.table.sizeCell", "{{r}}×{{c}}", {
1115
+ /* @__PURE__ */ e("p", { className: "ds:mt-[var(--spacing-xs)] ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s.r > 0 ? l("editor.table.sizeCell", "{{r}}×{{c}}", {
1062
1116
  r: s.r,
1063
1117
  c: s.c
1064
- }) : i("editor.table.sizeHint", "Pick a size") })
1118
+ }) : l("editor.table.sizeHint", "Pick a size") })
1065
1119
  ] }) })
1066
1120
  ] });
1067
1121
  }
1068
- const qr = Object.fromEntries(Xe.map((n) => [n.id, n])), Pr = [
1122
+ const tn = Object.fromEntries(it.map((o) => [o.id, o])), rn = [
1069
1123
  "ds:absolute ds:z-20 ds:flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1070
1124
  "ds:[inset-block-start:var(--rte-tt-top)] ds:[inset-inline-start:var(--rte-tt-start)]",
1071
1125
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1072
1126
  "ds:bg-[var(--popover)] ds:p-[var(--spacing-2xs)] ds:shadow-[var(--shadow-lg)]"
1073
- ].join(" "), Br = "#fde68a";
1074
- function We({
1075
- scope: n,
1127
+ ].join(" "), nn = "#fde68a";
1128
+ function rt({
1129
+ scope: o,
1076
1130
  icon: a,
1077
1131
  label: c,
1078
- onOpenChange: i,
1132
+ onOpenChange: l,
1079
1133
  saveTableCell: s,
1080
- applyTableBackground: h
1134
+ applyTableBackground: f
1081
1135
  }) {
1082
- const { t: g } = X(), [l, p] = _(Br);
1083
- return /* @__PURE__ */ v(
1084
- P,
1136
+ const { t: g } = Z(), [i, p] = z(nn);
1137
+ return /* @__PURE__ */ y(
1138
+ B,
1085
1139
  {
1086
- onOpenChange: (y) => {
1087
- i(y), y && s();
1140
+ onOpenChange: (v) => {
1141
+ l(v), v && s();
1088
1142
  },
1089
1143
  children: [
1090
- /* @__PURE__ */ e(P.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1091
- q,
1144
+ /* @__PURE__ */ e(B.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1145
+ P,
1092
1146
  {
1093
1147
  size: "sm",
1094
1148
  intent: "ghost",
1095
1149
  icon: a,
1096
1150
  tooltip: c,
1097
- onMouseDown: (y) => y.preventDefault()
1151
+ onMouseDown: (v) => v.preventDefault()
1098
1152
  }
1099
1153
  ) }),
1100
- /* @__PURE__ */ v(P.Content, { side: "bottom", align: "center", children: [
1154
+ /* @__PURE__ */ y(B.Content, { side: "bottom", align: "center", children: [
1101
1155
  /* @__PURE__ */ e(
1102
- Ie,
1156
+ qe,
1103
1157
  {
1104
1158
  variant: "inline",
1105
1159
  size: "sm",
1106
- value: l,
1107
- onChange: (y) => {
1108
- p(y), h(n, y);
1160
+ value: i,
1161
+ onChange: (v) => {
1162
+ p(v), f(o, v);
1109
1163
  }
1110
1164
  }
1111
1165
  ),
1112
1166
  /* @__PURE__ */ e(
1113
- re,
1167
+ ne,
1114
1168
  {
1115
1169
  size: "sm",
1116
1170
  intent: "ghost",
1117
1171
  className: "ds:mt-[var(--spacing-xs)] ds:w-full",
1118
- onClick: () => h(n, null),
1172
+ onClick: () => f(o, null),
1119
1173
  children: g("editor.table.clearColor", "Clear colour")
1120
1174
  }
1121
1175
  )
@@ -1124,42 +1178,42 @@ function We({
1124
1178
  }
1125
1179
  );
1126
1180
  }
1127
- function Fr({
1128
- active: n,
1181
+ function on({
1182
+ active: o,
1129
1183
  run: a,
1130
1184
  areaRef: c,
1131
- getActiveTableEl: i,
1185
+ getActiveTableEl: l,
1132
1186
  enableColor: s = !1,
1133
- saveTableCell: h,
1187
+ saveTableCell: f,
1134
1188
  applyTableBackground: g
1135
1189
  }) {
1136
- const { t: l } = X(), p = n.has("table"), [y, T] = _(null), $ = D(0), [E, k] = _(!1), L = z((m) => {
1137
- $.current = Math.max(
1190
+ const { t: i } = Z(), p = o.has("table"), [v, T] = z(null), H = L(0), [S, w] = z(!1), O = C((h) => {
1191
+ H.current = Math.max(
1138
1192
  0,
1139
- $.current + (m ? 1 : -1)
1140
- ), k($.current > 0);
1193
+ H.current + (h ? 1 : -1)
1194
+ ), w(H.current > 0);
1141
1195
  }, []);
1142
1196
  if (K(() => {
1143
- if (E) return;
1197
+ if (S) return;
1144
1198
  if (!p || typeof window > "u") {
1145
1199
  T(null);
1146
1200
  return;
1147
1201
  }
1148
- const m = () => {
1149
- const H = c.current, Z = i();
1150
- if (!H || !Z) {
1202
+ const h = () => {
1203
+ const E = c.current, Y = l();
1204
+ if (!E || !Y) {
1151
1205
  T(null);
1152
1206
  return;
1153
1207
  }
1154
- const C = H.getBoundingClientRect(), I = Z.getBoundingClientRect(), Q = getComputedStyle(H).direction === "rtl", ne = Math.max(0, I.top - C.top - 44), N = Q ? C.right - I.right + I.width / 2 : I.left - C.left + I.width / 2;
1155
- T({ top: ne, start: Math.max(0, N), rtl: Q });
1208
+ const $ = E.getBoundingClientRect(), D = Y.getBoundingClientRect(), I = getComputedStyle(E).direction === "rtl", J = Math.max(0, D.top - $.top - 44), ee = I ? $.right - D.right + D.width / 2 : D.left - $.left + D.width / 2;
1209
+ T({ top: J, start: Math.max(0, ee), rtl: I });
1156
1210
  };
1157
- m();
1158
- const b = new ResizeObserver(m), A = c.current, M = i();
1159
- return A && b.observe(A), M && b.observe(M), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
1160
- b.disconnect(), window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
1211
+ h();
1212
+ const k = new ResizeObserver(h), A = c.current, M = l();
1213
+ return A && k.observe(A), M && k.observe(M), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
1214
+ k.disconnect(), window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
1161
1215
  };
1162
- }, [p, E, c, i]), !p && !E || !y) return null;
1216
+ }, [p, S, c, l]), !p && !S || !v) return null;
1163
1217
  const u = [
1164
1218
  ["rowAbove", "rowBelow"],
1165
1219
  ["colLeft", "colRight"],
@@ -1172,194 +1226,195 @@ function Fr({
1172
1226
  // Tooltips disambiguate the icon-only ops on hover (and provide each
1173
1227
  // button's accessible name via IconButton's `tooltip` prop). Radix Tooltip
1174
1228
  // needs a provider ancestor, so scope one to the bar.
1175
- /* @__PURE__ */ e(Nt, { children: /* @__PURE__ */ e(
1229
+ /* @__PURE__ */ e($t, { children: /* @__PURE__ */ e(
1176
1230
  "div",
1177
1231
  {
1178
- role: "toolbar",
1179
- "aria-label": l("editor.table.toolbar", "Table tools"),
1180
- className: `${Pr} ${y.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1232
+ role: "group",
1233
+ "aria-label": i("editor.table.toolbar", "Table tools"),
1234
+ className: `${rn} ${v.rtl ? "ds:translate-x-1/2" : "ds:-translate-x-1/2"}`,
1181
1235
  style: {
1182
- "--rte-tt-top": `${y.top}px`,
1183
- "--rte-tt-start": `${y.start}px`
1236
+ "--rte-tt-top": `${v.top}px`,
1237
+ "--rte-tt-start": `${v.start}px`
1184
1238
  },
1185
- children: u.map((m, b) => /* @__PURE__ */ v(mt, { children: [
1186
- b > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: Qe }) : null,
1187
- m === "colour" ? /* @__PURE__ */ v(Ae, { children: [
1239
+ children: u.map((h, k) => /* @__PURE__ */ y(nt, { children: [
1240
+ k > 0 ? /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }) : null,
1241
+ h === "colour" ? /* @__PURE__ */ y(Oe, { children: [
1188
1242
  /* @__PURE__ */ e(
1189
- We,
1243
+ rt,
1190
1244
  {
1191
1245
  scope: "cell",
1192
- icon: /* @__PURE__ */ e(rr, {}),
1193
- label: l("editor.table.cellColor", "Cell colour"),
1194
- onOpenChange: L,
1195
- saveTableCell: h,
1246
+ icon: /* @__PURE__ */ e(hr, {}),
1247
+ label: i("editor.table.cellColor", "Cell colour"),
1248
+ onOpenChange: O,
1249
+ saveTableCell: f,
1196
1250
  applyTableBackground: g
1197
1251
  }
1198
1252
  ),
1199
1253
  /* @__PURE__ */ e(
1200
- We,
1254
+ rt,
1201
1255
  {
1202
1256
  scope: "row",
1203
- icon: /* @__PURE__ */ e(or, {}),
1204
- label: l("editor.table.rowColor", "Row colour"),
1205
- onOpenChange: L,
1206
- saveTableCell: h,
1257
+ icon: /* @__PURE__ */ e(gr, {}),
1258
+ label: i("editor.table.rowColor", "Row colour"),
1259
+ onOpenChange: O,
1260
+ saveTableCell: f,
1207
1261
  applyTableBackground: g
1208
1262
  }
1209
1263
  )
1210
- ] }) : m.map((A) => {
1211
- const M = qr[A];
1264
+ ] }) : h.map((A) => {
1265
+ const M = tn[A];
1212
1266
  return /* @__PURE__ */ e(
1213
- q,
1267
+ P,
1214
1268
  {
1215
1269
  size: "sm",
1216
1270
  intent: "ghost",
1217
1271
  icon: M.icon,
1218
- tooltip: l(M.label[0], M.label[1]),
1219
- onMouseDown: (H) => H.preventDefault(),
1272
+ tooltip: i(M.label[0], M.label[1]),
1273
+ onMouseDown: (E) => E.preventDefault(),
1220
1274
  onClick: () => a(M.command)
1221
1275
  },
1222
1276
  A
1223
1277
  );
1224
1278
  })
1225
- ] }, m === "colour" ? "colour" : m[0]))
1279
+ ] }, h === "colour" ? "colour" : h[0]))
1226
1280
  }
1227
1281
  ) })
1228
1282
  );
1229
1283
  }
1230
- function Vr({
1231
- run: n,
1284
+ function an({
1285
+ run: o,
1232
1286
  active: a,
1233
1287
  preset: c,
1234
- insertHtml: i,
1288
+ insertHtml: l,
1235
1289
  insertTable: s,
1236
- saveSelection: h,
1290
+ saveSelection: f,
1237
1291
  restoreSelection: g,
1238
- getSelectedText: l,
1292
+ getSelectedText: i,
1239
1293
  uploadImage: p,
1240
- enableColor: y = !1,
1294
+ enableColor: v = !1,
1241
1295
  enableImage: T = !1,
1242
- enableTable: $ = !1,
1243
- showExtensions: E = !1
1296
+ enableTable: H = !1,
1297
+ showExtensions: S = !1
1244
1298
  }) {
1245
- const { t: k } = X(), L = (C) => C.preventDefault(), u = (C) => Er[c].includes(C), m = (C) => {
1246
- if (!u(C)) return null;
1247
- const I = Sr[C];
1299
+ const { t: w } = Z(), O = ($) => $.preventDefault(), u = ($) => Wr[c].includes($), h = ($) => {
1300
+ if (!u($)) return null;
1301
+ const D = Gr[$];
1248
1302
  return /* @__PURE__ */ e(
1249
- q,
1303
+ P,
1250
1304
  {
1251
1305
  size: "sm",
1252
1306
  intent: "ghost",
1253
- icon: I.icon,
1254
- "aria-label": k(I.label[0], I.label[1]),
1255
- "aria-pressed": I.toggle ? a.has(I.toggle) : void 0,
1256
- onMouseDown: L,
1257
- onClick: () => n(...I.command)
1307
+ icon: D.icon,
1308
+ "aria-label": w(D.label[0], D.label[1]),
1309
+ "aria-pressed": D.toggle ? a.has(D.toggle) : void 0,
1310
+ onMouseDown: O,
1311
+ onClick: () => o(...D.command)
1258
1312
  },
1259
- I.id
1313
+ D.id
1260
1314
  );
1261
- }, b = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: Qe }), A = u("format"), M = u("bold") || u("italic") || u("underline") || u("strike") || y, H = u("ul") || u("ol"), Z = u("link") || T || $;
1262
- return /* @__PURE__ */ v(
1315
+ }, k = () => /* @__PURE__ */ e("span", { "aria-hidden": "true", className: lt }), A = u("format"), M = u("bold") || u("italic") || u("underline") || u("strike") || v, E = u("ul") || u("ol"), Y = u("link") || T || H;
1316
+ return /* @__PURE__ */ y(
1263
1317
  "div",
1264
1318
  {
1265
- role: "toolbar",
1266
- "aria-label": k("editor.toolbarLabel"),
1267
- className: Ar(),
1319
+ role: "group",
1320
+ "aria-label": w("editor.toolbarLabel"),
1321
+ className: Xr(),
1268
1322
  "data-component": "editor-toolbar",
1269
1323
  children: [
1270
- A ? /* @__PURE__ */ e(Hr, { run: n, active: a, onTriggerDown: L }) : null,
1271
- A && M ? /* @__PURE__ */ e(b, {}) : null,
1272
- m("bold"),
1273
- m("italic"),
1274
- m("underline"),
1275
- m("strike"),
1276
- y ? /* @__PURE__ */ e(
1277
- Lr,
1324
+ A ? /* @__PURE__ */ e(Ur, { run: o, active: a, onTriggerDown: O }) : null,
1325
+ A && M ? /* @__PURE__ */ e(k, {}) : null,
1326
+ h("bold"),
1327
+ h("italic"),
1328
+ h("underline"),
1329
+ h("strike"),
1330
+ v ? /* @__PURE__ */ e(
1331
+ Yr,
1278
1332
  {
1279
- run: n,
1280
- saveSelection: h,
1333
+ run: o,
1334
+ saveSelection: f,
1281
1335
  restoreSelection: g
1282
1336
  }
1283
1337
  ) : null,
1284
- y ? /* @__PURE__ */ e(
1285
- Or,
1338
+ v ? /* @__PURE__ */ e(
1339
+ Jr,
1286
1340
  {
1287
- run: n,
1288
- saveSelection: h,
1341
+ run: o,
1342
+ saveSelection: f,
1289
1343
  restoreSelection: g
1290
1344
  }
1291
1345
  ) : null,
1292
- (A || M) && H ? /* @__PURE__ */ e(b, {}) : null,
1293
- m("ul"),
1294
- m("ol"),
1295
- (A || M || H) && Z ? /* @__PURE__ */ e(b, {}) : null,
1346
+ (A || M) && E ? /* @__PURE__ */ e(k, {}) : null,
1347
+ h("ul"),
1348
+ h("ol"),
1349
+ (A || M || E) && Y ? /* @__PURE__ */ e(k, {}) : null,
1296
1350
  u("link") ? /* @__PURE__ */ e(
1297
- Ir,
1351
+ Qr,
1298
1352
  {
1299
- insertHtml: i,
1300
- saveSelection: h,
1353
+ insertHtml: l,
1354
+ saveSelection: f,
1301
1355
  restoreSelection: g,
1302
- getSelectedText: l
1356
+ getSelectedText: i
1303
1357
  }
1304
1358
  ) : null,
1305
1359
  T ? /* @__PURE__ */ e(
1306
- $r,
1360
+ Zr,
1307
1361
  {
1308
- insertHtml: i,
1309
- saveSelection: h,
1362
+ insertHtml: l,
1363
+ saveSelection: f,
1310
1364
  restoreSelection: g,
1311
1365
  uploadImage: p
1312
1366
  }
1313
1367
  ) : null,
1314
- $ ? /* @__PURE__ */ e(jr, { run: n, insertTable: s, active: a }) : null,
1315
- E && (A || M || H || Z) ? /* @__PURE__ */ e(b, {}) : null,
1316
- E ? /* @__PURE__ */ e(
1317
- q,
1368
+ H ? /* @__PURE__ */ e(en, { run: o, insertTable: s, active: a }) : null,
1369
+ S && (A || M || E || Y) ? /* @__PURE__ */ e(k, {}) : null,
1370
+ S ? /* @__PURE__ */ e(
1371
+ P,
1318
1372
  {
1319
1373
  size: "sm",
1320
1374
  intent: "ghost",
1321
- icon: /* @__PURE__ */ e(Nr, {}),
1322
- "aria-label": k("editor.extensions", "Editor extensions"),
1323
- onMouseDown: L
1375
+ icon: /* @__PURE__ */ e(qr, {}),
1376
+ "aria-label": w("editor.extensions", "Editor extensions"),
1377
+ disabled: !0,
1378
+ onMouseDown: O
1324
1379
  }
1325
1380
  ) : null
1326
1381
  ]
1327
1382
  }
1328
1383
  );
1329
1384
  }
1330
- function te(n) {
1331
- return pt(n, "rich-text");
1385
+ function te(o) {
1386
+ return _t(o, "rich-text");
1332
1387
  }
1333
- function Re(n = "") {
1334
- const a = String(n).trim();
1388
+ function Ie(o = "") {
1389
+ const a = String(o).trim();
1335
1390
  if (a === "" || a === "<p><br></p>" || a === "<p>&nbsp;</p>")
1336
1391
  return "";
1337
1392
  const c = a.replace(/<br\s*\/?>/gi, "").replace(/&nbsp;/gi, "").replace(/<[^>]+>/g, "").trim();
1338
1393
  return c === "" && /<img\b[^>]*>/i.test(a) ? a : c === "" ? "" : a;
1339
1394
  }
1340
- function Gr(n) {
1341
- return n.replace(
1395
+ function ln(o) {
1396
+ return o.replace(
1342
1397
  /<img(?![^>]*\sloading=)([^>]*)>/gi,
1343
1398
  '<img loading="lazy"$1>'
1344
1399
  );
1345
1400
  }
1346
- function Wr(n) {
1347
- if (!n || typeof n != "object") return;
1348
- const a = n, c = (i) => {
1349
- if (i && typeof i == "object" && "url" in i) {
1350
- const s = i.url;
1401
+ function sn(o) {
1402
+ if (!o || typeof o != "object") return;
1403
+ const a = o, c = (l) => {
1404
+ if (l && typeof l == "object" && "url" in l) {
1405
+ const s = l.url;
1351
1406
  return typeof s == "string" ? s : void 0;
1352
1407
  }
1353
1408
  };
1354
1409
  return typeof a.url == "string" ? a.url : c(a.file) ?? c(a.data) ?? Object.values(a).map(c).find(Boolean);
1355
1410
  }
1356
- function Ur(n) {
1357
- if (n) return n;
1411
+ function dn(o) {
1412
+ if (o) return o;
1358
1413
  if (typeof window > "u") return null;
1359
1414
  const a = window;
1360
1415
  return a.$R ?? a.Redactor ?? null;
1361
1416
  }
1362
- const Xr = {
1417
+ const cn = {
1363
1418
  bold: ["module.inline.format", { tag: "b" }],
1364
1419
  italic: ["module.inline.format", { tag: "i" }],
1365
1420
  strikethrough: ["module.inline.format", { tag: "del" }],
@@ -1368,17 +1423,17 @@ const Xr = {
1368
1423
  heading: ["module.block.format", { tag: "h2" }],
1369
1424
  quote: ["module.block.format", { tag: "blockquote" }],
1370
1425
  paragraph: ["module.block.format", { tag: "p" }]
1371
- }, Qr = {
1426
+ }, un = {
1372
1427
  zh: "zh_cn",
1373
1428
  pt: "pt_br"
1374
1429
  };
1375
- function Yr(n) {
1376
- const a = n.split("-")[0];
1377
- return Qr[a] ?? a ?? "en";
1430
+ function mn(o) {
1431
+ const a = o.split("-")[0];
1432
+ return un[a] ?? a ?? "en";
1378
1433
  }
1379
- const Zr = He(
1434
+ const hn = De(
1380
1435
  "redactor-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
1381
- ), Jr = He(
1436
+ ), fn = De(
1382
1437
  [
1383
1438
  "ds:block ds:[inline-size:100%]",
1384
1439
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
@@ -1392,7 +1447,7 @@ const Zr = He(
1392
1447
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1393
1448
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1394
1449
  ].join(" ")
1395
- ), Ye = [
1450
+ ), st = [
1396
1451
  "ds:inline-flex ds:items-center ds:justify-center",
1397
1452
  "ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
1398
1453
  "ds:text-[color:var(--primary-foreground)]",
@@ -1401,559 +1456,587 @@ const Zr = He(
1401
1456
  "ds:focus-visible:outline-solid",
1402
1457
  "ds:focus-visible:outline-[var(--primary-foreground)]",
1403
1458
  "ds:focus-visible:[outline-offset:calc(var(--focus-ring-width)*-1)]"
1404
- ].join(" "), Ue = `${Ye} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, Kr = `${Ye} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, en = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", tn = ht(
1459
+ ].join(" "), gn = `${st} ds:hover:bg-[color-mix(in_srgb,var(--primary-foreground)_15%,transparent)]`, pn = `${st} ds:bg-[var(--destructive)] ds:hover:bg-[color-mix(in_srgb,var(--destructive)_88%,var(--primary-foreground))]`, bn = Nt(
1405
1460
  ({
1406
- id: n,
1461
+ id: o,
1407
1462
  defaultValue: a,
1408
1463
  value: c,
1409
- onChange: i,
1464
+ onChange: l,
1410
1465
  toolbar: s = "standard",
1411
- placeholder: h,
1466
+ placeholder: f,
1412
1467
  readOnly: g = !1,
1413
- ariaLabel: l,
1468
+ ariaLabel: i,
1414
1469
  minHeight: p,
1415
- showExtensions: y,
1470
+ showExtensions: v,
1416
1471
  className: T,
1417
- redactor: $,
1418
- options: E,
1419
- plugins: k,
1420
- lang: L,
1472
+ redactor: H,
1473
+ options: S,
1474
+ plugins: w,
1475
+ lang: O,
1421
1476
  imageUploadUrl: u,
1422
- onKeyDown: m,
1423
- onRequestAiDraft: b,
1477
+ onKeyDown: h,
1478
+ onRequestAiDraft: k,
1424
1479
  aiDraftFormat: A = "html",
1425
1480
  aiPrivacyNotice: M,
1426
- onDictate: H
1427
- }, Z) => {
1428
- const { t: C, i18n: I } = X(), Q = ae(), ne = Fe(
1429
- () => `rte-${Q.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1430
- [Q]
1431
- ), N = `#${ne}`, V = D(null), B = D(null), ie = D(!1), me = D(g), x = D(null), O = D(null), [F, G] = _(!1), [Ze, Ce] = _(!1), [$e, Je] = _(
1481
+ onDictate: E,
1482
+ onProofread: Y,
1483
+ onAutoFormat: $
1484
+ }, D) => {
1485
+ const { t: I, i18n: J } = Z(), ee = le(), de = Je(
1486
+ () => `rte-${ee.replace(/[^a-zA-Z0-9-_]/g, "")}`,
1487
+ [ee]
1488
+ ), R = `#${de}`, W = L(null), G = L(null), ce = L(!1), ye = L(g), x = L(null), q = L(null), [F, X] = z(!1), [dt, je] = z(!1), [Pe, ct] = z(
1432
1489
  () => /* @__PURE__ */ new Set()
1433
- ), se = D(null), W = D(i), he = D(m);
1490
+ ), ue = L(null), V = L(l), ve = L(h);
1434
1491
  K(() => {
1435
- W.current = i, he.current = m;
1436
- }, [i, m]);
1437
- const Ke = D(
1492
+ V.current = l, ve.current = h;
1493
+ }, [l, h]);
1494
+ const ut = L(
1438
1495
  (() => {
1439
1496
  const t = c ?? a ?? "";
1440
1497
  return t ? te(t) : "";
1441
1498
  })()
1442
- ), le = z(() => {
1499
+ ), oe = C(() => {
1443
1500
  var r;
1444
- const t = B.current;
1501
+ const t = G.current;
1445
1502
  if (t)
1446
1503
  try {
1447
- const o = t(N, "source.getCode");
1448
- if (typeof o == "string") return o;
1504
+ const n = t(R, "source.getCode");
1505
+ if (typeof n == "string") return n;
1449
1506
  } catch {
1450
1507
  }
1451
- return ((r = V.current) == null ? void 0 : r.value) ?? "";
1452
- }, [N]), J = z(
1508
+ return ((r = W.current) == null ? void 0 : r.value) ?? "";
1509
+ }, [R]), U = C(
1453
1510
  (t, ...r) => {
1454
- const o = B.current;
1455
- if (!o) return !1;
1456
- const d = me.current;
1511
+ const n = G.current;
1512
+ if (!n) return !1;
1513
+ const d = ye.current;
1457
1514
  if (d)
1458
1515
  try {
1459
- o(N, "disableReadOnly");
1516
+ n(R, "disableReadOnly");
1460
1517
  } catch {
1461
1518
  }
1462
1519
  try {
1463
- return o(N, t, ...r), !0;
1520
+ return n(R, t, ...r), !0;
1464
1521
  } catch {
1465
1522
  return !1;
1466
1523
  } finally {
1467
1524
  if (d)
1468
1525
  try {
1469
- o(N, "enableReadOnly");
1526
+ n(R, "enableReadOnly");
1470
1527
  } catch {
1471
1528
  }
1472
1529
  }
1473
1530
  },
1474
- [N]
1475
- ), oe = z(
1531
+ [R]
1532
+ ), ae = C(
1476
1533
  (t, r) => {
1477
- var ce;
1478
- const o = (r == null ? void 0 : r.asHtml) ?? !0, d = o ? te(t) : t;
1479
- if (J(o ? "insertion.insertHtml" : "insertion.insertText", d)) return;
1480
- const w = V.current;
1481
- if (!w) return;
1482
- const R = w.selectionStart ?? w.value.length, U = w.selectionEnd ?? w.value.length;
1483
- w.value = w.value.slice(0, R) + d + w.value.slice(U);
1484
- const ve = R + d.length;
1534
+ var pe;
1535
+ const n = (r == null ? void 0 : r.asHtml) ?? !0, d = n ? te(t) : t;
1536
+ if (U(n ? "insertion.insertHtml" : "insertion.insertText", d)) return;
1537
+ const b = W.current;
1538
+ if (!b) return;
1539
+ const N = b.selectionStart ?? b.value.length, Q = b.selectionEnd ?? b.value.length;
1540
+ b.value = b.value.slice(0, N) + d + b.value.slice(Q);
1541
+ const Ne = N + d.length;
1485
1542
  try {
1486
- w.setSelectionRange(ve, ve);
1543
+ b.setSelectionRange(Ne, Ne);
1487
1544
  } catch {
1488
1545
  }
1489
- (ce = W.current) == null || ce.call(W, { html: te(w.value), markdown: "" });
1546
+ (pe = V.current) == null || pe.call(V, { html: te(b.value), markdown: "" });
1490
1547
  },
1491
- [J]
1492
- ), Ne = D(null), ee = z(() => {
1548
+ [U]
1549
+ ), Re = L(null), re = C(() => {
1493
1550
  var d;
1494
- const t = (d = x.current) == null ? void 0 : d.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, o = /* @__PURE__ */ new Set();
1551
+ const t = (d = x.current) == null ? void 0 : d.querySelector(".redactor-in"), r = typeof window < "u" ? window.getSelection() : null, n = /* @__PURE__ */ new Set();
1495
1552
  if (t && r && r.anchorNode && t.contains(r.anchorNode) && typeof document.queryCommandState == "function") {
1496
- r.rangeCount > 0 && (Ne.current = r.getRangeAt(0).cloneRange());
1553
+ r.rangeCount > 0 && (Re.current = r.getRangeAt(0).cloneRange());
1497
1554
  try {
1498
- document.queryCommandState("bold") && o.add("bold"), document.queryCommandState("italic") && o.add("italic"), document.queryCommandState("underline") && o.add("underline"), document.queryCommandState("strikeThrough") && o.add("strike"), document.queryCommandState("insertUnorderedList") && o.add("ul"), document.queryCommandState("insertOrderedList") && o.add("ol");
1499
- const f = String(
1555
+ document.queryCommandState("bold") && n.add("bold"), document.queryCommandState("italic") && n.add("italic"), document.queryCommandState("underline") && n.add("underline"), document.queryCommandState("strikeThrough") && n.add("strike"), document.queryCommandState("insertUnorderedList") && n.add("ul"), document.queryCommandState("insertOrderedList") && n.add("ol");
1556
+ const m = String(
1500
1557
  document.queryCommandValue("formatBlock") || ""
1501
1558
  ).toLowerCase();
1502
- /^h[1-6]$/.test(f) ? (o.add("heading"), o.add(f)) : f === "blockquote" ? o.add("quote") : o.add("paragraph");
1503
- const w = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
1504
- w && t.contains(w) && w.closest("table") && o.add("table");
1559
+ /^h[1-6]$/.test(m) ? (n.add("heading"), n.add(m)) : m === "blockquote" ? n.add("quote") : n.add("paragraph");
1560
+ const b = r.anchorNode.nodeType === Node.TEXT_NODE ? r.anchorNode.parentElement : r.anchorNode;
1561
+ b && t.contains(b) && b.closest("table") && n.add("table");
1505
1562
  } catch {
1506
1563
  }
1507
1564
  }
1508
- Je(
1509
- (f) => f.size === o.size && [...o].every((w) => f.has(w)) ? f : o
1565
+ ct(
1566
+ (m) => m.size === n.size && [...n].every((b) => m.has(b)) ? m : n
1510
1567
  );
1511
- }, []), fe = z(
1568
+ }, []), ke = C(
1512
1569
  (t, ...r) => {
1513
- J(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => ee()) : ee();
1570
+ U(t, ...r), typeof window < "u" ? window.requestAnimationFrame(() => re()) : re();
1514
1571
  },
1515
- [J, ee]
1516
- ), ze = z(
1572
+ [U, re]
1573
+ ), Se = C(
1517
1574
  (t) => {
1518
- oe(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => ee());
1575
+ ae(t, { asHtml: !0 }), typeof window < "u" && window.requestAnimationFrame(() => re());
1519
1576
  },
1520
- [oe, ee]
1521
- ), et = z(() => {
1577
+ [ae, re]
1578
+ ), Be = C(() => {
1522
1579
  var r;
1523
1580
  if (typeof window < "u") {
1524
- const o = (r = x.current) == null ? void 0 : r.querySelector(".redactor-in"), d = window.getSelection();
1525
- o && d && d.rangeCount > 0 && d.anchorNode && o.contains(d.anchorNode) && (Ne.current = d.getRangeAt(0).cloneRange());
1581
+ const n = (r = x.current) == null ? void 0 : r.querySelector(".redactor-in"), d = window.getSelection();
1582
+ n && d && d.rangeCount > 0 && d.anchorNode && n.contains(d.anchorNode) && (Re.current = d.getRangeAt(0).cloneRange());
1526
1583
  }
1527
- const t = B.current;
1584
+ const t = G.current;
1528
1585
  if (t)
1529
1586
  try {
1530
- t(N, "selection.save");
1587
+ t(R, "selection.save");
1531
1588
  } catch {
1532
1589
  }
1533
- }, [N]), tt = z(() => {
1534
- const t = B.current;
1590
+ }, [R]), Fe = C(() => {
1591
+ const t = G.current;
1535
1592
  if (!t) return;
1536
- const r = Ne.current;
1593
+ const r = Re.current;
1537
1594
  try {
1538
- t(N, "editor.focus");
1595
+ t(R, "editor.focus");
1539
1596
  } catch {
1540
1597
  }
1541
1598
  if (r && typeof window < "u") {
1542
- const o = window.getSelection();
1543
- if (o)
1599
+ const n = window.getSelection();
1600
+ if (n)
1544
1601
  try {
1545
- o.removeAllRanges(), o.addRange(r);
1602
+ n.removeAllRanges(), n.addRange(r);
1546
1603
  return;
1547
1604
  } catch {
1548
1605
  }
1549
1606
  }
1550
1607
  try {
1551
- t(N, "selection.restore");
1608
+ t(R, "selection.restore");
1552
1609
  } catch {
1553
1610
  }
1554
- }, [N]), rt = z(() => {
1555
- var o;
1611
+ }, [R]), mt = C(() => {
1612
+ var n;
1556
1613
  if (typeof window > "u") return "";
1557
- const t = (o = x.current) == null ? void 0 : o.querySelector(".redactor-in"), r = window.getSelection();
1614
+ const t = (n = x.current) == null ? void 0 : n.querySelector(".redactor-in"), r = window.getSelection();
1558
1615
  return !t || !r || !r.anchorNode || !t.contains(r.anchorNode) ? "" : r.toString();
1559
- }, []), nt = z(() => {
1560
- var f;
1616
+ }, []), ht = C(() => {
1617
+ var m;
1561
1618
  if (typeof window > "u") return null;
1562
- const t = (f = x.current) == null ? void 0 : f.querySelector(".redactor-in"), r = window.getSelection();
1619
+ const t = (m = x.current) == null ? void 0 : m.querySelector(".redactor-in"), r = window.getSelection();
1563
1620
  if (!t || !r || r.rangeCount === 0) return null;
1564
- const o = r.anchorNode, d = o && o.nodeType === Node.TEXT_NODE ? o.parentElement : o;
1621
+ const n = r.anchorNode, d = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
1565
1622
  return !d || !t.contains(d) ? null : d.closest("table");
1566
- }, []), Le = D(null), ge = z(() => {
1567
- var f;
1623
+ }, []), Ve = L(null), we = C(() => {
1624
+ var m;
1568
1625
  if (typeof window > "u") return null;
1569
- const t = (f = x.current) == null ? void 0 : f.querySelector(".redactor-in"), r = window.getSelection();
1626
+ const t = (m = x.current) == null ? void 0 : m.querySelector(".redactor-in"), r = window.getSelection();
1570
1627
  if (!t || !r || r.rangeCount === 0) return null;
1571
- const o = r.anchorNode, d = o && o.nodeType === Node.TEXT_NODE ? o.parentElement : o;
1628
+ const n = r.anchorNode, d = n && n.nodeType === Node.TEXT_NODE ? n.parentElement : n;
1572
1629
  return !d || !t.contains(d) ? null : d.closest("td,th");
1573
- }, []), ot = z(() => {
1574
- Le.current = ge();
1575
- }, [ge]), at = z(
1630
+ }, []), ft = C(() => {
1631
+ Ve.current = we();
1632
+ }, [we]), gt = C(
1576
1633
  (t, r) => {
1577
- var w;
1578
- const o = Le.current ?? ge();
1579
- if (!o) return;
1580
- const d = t === "row" ? Array.from(((w = o.closest("tr")) == null ? void 0 : w.children) ?? [o]).filter(
1581
- (R) => R instanceof HTMLElement && (R.tagName === "TD" || R.tagName === "TH")
1582
- ) : [o], f = B.current;
1583
- if (f)
1634
+ var b;
1635
+ const n = Ve.current ?? we();
1636
+ if (!n) return;
1637
+ const d = t === "row" ? Array.from(((b = n.closest("tr")) == null ? void 0 : b.children) ?? [n]).filter(
1638
+ (N) => N instanceof HTMLElement && (N.tagName === "TD" || N.tagName === "TH")
1639
+ ) : [n], m = G.current;
1640
+ if (m)
1584
1641
  try {
1585
- f(N, "module.buffer.trigger");
1642
+ m(R, "module.buffer.trigger");
1586
1643
  } catch {
1587
1644
  }
1588
- for (const R of d)
1589
- r ? R.style.setProperty("background-color", r) : R.style.removeProperty("background-color");
1590
- if (f)
1645
+ for (const N of d)
1646
+ r ? N.style.setProperty("background-color", r) : N.style.removeProperty("background-color");
1647
+ if (m)
1591
1648
  try {
1592
- f(N, "broadcast", "hardsync");
1649
+ m(R, "broadcast", "hardsync");
1593
1650
  } catch {
1594
1651
  }
1595
- typeof window < "u" && window.requestAnimationFrame(() => ee());
1652
+ typeof window < "u" && window.requestAnimationFrame(() => re());
1596
1653
  },
1597
- [ge, N, ee]
1598
- ), it = z(
1654
+ [we, R, re]
1655
+ ), pt = C(
1599
1656
  (t) => {
1600
- var o;
1601
- const r = B.current;
1657
+ var n;
1658
+ const r = G.current;
1602
1659
  if (r && typeof window < "u") {
1603
- const d = (o = x.current) == null ? void 0 : o.querySelector(".redactor-in"), f = window.getSelection(), w = f == null ? void 0 : f.anchorNode, R = w && w.nodeType === Node.TEXT_NODE ? w.parentElement : w, U = R && (d != null && d.contains(R)) ? R.closest("ul,ol") : null;
1604
- if (U)
1660
+ const d = (n = x.current) == null ? void 0 : n.querySelector(".redactor-in"), m = window.getSelection(), b = m == null ? void 0 : m.anchorNode, N = b && b.nodeType === Node.TEXT_NODE ? b.parentElement : b, Q = N && (d != null && d.contains(N)) ? N.closest("ul,ol") : null;
1661
+ if (Q)
1605
1662
  try {
1606
- r(N, "caret.setAfter", U);
1663
+ r(R, "caret.setAfter", Q);
1607
1664
  } catch {
1608
1665
  }
1609
1666
  }
1610
- ze(t), typeof window < "u" && window.requestAnimationFrame(() => {
1611
- var f;
1612
- const d = (f = x.current) == null ? void 0 : f.querySelector(".redactor-in");
1613
- d == null || d.querySelectorAll("table td, table th").forEach((w) => {
1614
- let R = w.lastChild;
1615
- for (; R && R.nodeType === Node.TEXT_NODE && !(R.textContent ?? "").trim(); ) {
1616
- const U = R.previousSibling;
1617
- w.removeChild(R), R = U;
1667
+ Se(t), typeof window < "u" && window.requestAnimationFrame(() => {
1668
+ var m;
1669
+ const d = (m = x.current) == null ? void 0 : m.querySelector(".redactor-in");
1670
+ d == null || d.querySelectorAll("table td, table th").forEach((b) => {
1671
+ let N = b.lastChild;
1672
+ for (; N && N.nodeType === Node.TEXT_NODE && !(N.textContent ?? "").trim(); ) {
1673
+ const Q = N.previousSibling;
1674
+ b.removeChild(N), N = Q;
1618
1675
  }
1619
1676
  });
1620
1677
  });
1621
1678
  },
1622
- [ze, N]
1623
- ), st = z(
1679
+ [Se, R]
1680
+ ), bt = C(
1624
1681
  async (t, r) => {
1625
1682
  if (!u) throw new Error("No image upload URL configured.");
1626
- const o = new FormData();
1627
- o.append("file", t);
1683
+ const n = new FormData();
1684
+ n.append("file", t);
1628
1685
  const d = await fetch(u, {
1629
1686
  method: "POST",
1630
- body: o,
1687
+ body: n,
1631
1688
  credentials: "same-origin",
1632
1689
  signal: r
1633
1690
  });
1634
1691
  if (!d.ok) throw new Error(`Image upload failed (${d.status}).`);
1635
- const f = Wr(await d.json());
1636
- if (!f) throw new Error("Image upload response contained no URL.");
1637
- return f;
1692
+ const m = sn(await d.json());
1693
+ if (!m) throw new Error("Image upload response contained no URL.");
1694
+ return m;
1638
1695
  },
1639
1696
  [u]
1640
- ), de = D(null), pe = D(null), [Y, Oe] = _(!1), [lt, De] = _(!1), be = z(() => {
1641
- const t = pe.current;
1642
- t != null && t.parentNode && t.parentNode.removeChild(t), pe.current = null;
1643
- }, []), je = z((t) => {
1697
+ ), me = L(null), xe = L(null), [he, Ge] = z(!1), [yt, We] = z(!1), [vt, Ae] = z(""), Ce = C(() => {
1698
+ const t = xe.current;
1699
+ t != null && t.parentNode && t.parentNode.removeChild(t), xe.current = null;
1700
+ }, []), Xe = C((t) => {
1644
1701
  var d;
1645
1702
  const r = (d = x.current) == null ? void 0 : d.querySelector(
1646
1703
  ".redactor-in"
1647
1704
  );
1648
1705
  if (!r) return;
1649
- let o = pe.current;
1650
- if (!o || !r.contains(o)) {
1651
- o = document.createElement("span"), o.setAttribute("data-rte-interim", ""), o.setAttribute("contenteditable", "false");
1652
- const f = window.getSelection();
1653
- if (f && f.rangeCount > 0 && r.contains(f.anchorNode)) {
1654
- const w = f.getRangeAt(0);
1655
- w.collapse(!1), w.insertNode(o);
1706
+ let n = xe.current;
1707
+ if (!n || !r.contains(n)) {
1708
+ n = document.createElement("span"), n.setAttribute("data-rte-interim", ""), n.setAttribute("contenteditable", "false");
1709
+ const m = window.getSelection();
1710
+ if (m && m.rangeCount > 0 && r.contains(m.anchorNode)) {
1711
+ const b = m.getRangeAt(0);
1712
+ b.collapse(!1), b.insertNode(n);
1656
1713
  } else
1657
- r.appendChild(o);
1658
- pe.current = o;
1714
+ r.appendChild(n);
1715
+ xe.current = n;
1659
1716
  }
1660
- o.textContent = t;
1661
- }, []), qe = z(() => {
1717
+ n.textContent = t;
1718
+ }, []), Ue = C(() => {
1662
1719
  var t;
1663
- (t = de.current) == null || t.abort();
1664
- }, []), Pe = z(() => {
1665
- if (!H) return;
1720
+ (t = me.current) == null || t.abort();
1721
+ }, []), Qe = C(() => {
1722
+ if (!E) return;
1666
1723
  const t = new AbortController();
1667
- de.current = t, De(!1), Oe(!0), be(), H({
1724
+ me.current = t, We(!1), Ge(!0), Ae(I("editor.ai.listening")), Ce(), E({
1668
1725
  signal: t.signal,
1669
1726
  // Interim text shows live in the editor (grey + caret); each final
1670
1727
  // replaces it with committed text at the caret.
1671
1728
  onPartialTranscript: (r) => {
1672
- t.signal.aborted || je(r);
1729
+ t.signal.aborted || Xe(r);
1673
1730
  },
1674
1731
  onFinalTranscript: (r) => {
1675
1732
  if (t.signal.aborted) return;
1676
- be();
1677
- const o = r.trim();
1678
- o && oe(`${o} `, { asHtml: !1 });
1733
+ Ce();
1734
+ const n = r.trim();
1735
+ n && (ae(`${n} `, { asHtml: !1 }), Ae(n));
1679
1736
  }
1680
1737
  }).catch((r) => {
1681
- t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || De(!0);
1738
+ t.signal.aborted || r && typeof r == "object" && "name" in r && r.name === "AbortError" || We(!0);
1682
1739
  }).finally(() => {
1683
- be(), de.current === t && (de.current = null, Oe(!1));
1740
+ Ce(), me.current === t && (me.current = null, Ge(!1), Ae(""));
1684
1741
  });
1685
- }, [H, oe, be, je]), Be = z(() => {
1686
- Y ? qe() : Pe();
1687
- }, [Y, Pe, qe]);
1742
+ }, [E, ae, Ce, Xe, I]), kt = C(() => {
1743
+ he ? Ue() : Qe();
1744
+ }, [he, Qe, Ue]);
1688
1745
  K(() => () => {
1689
1746
  var t;
1690
- return (t = de.current) == null ? void 0 : t.abort();
1747
+ return (t = me.current) == null ? void 0 : t.abort();
1748
+ }, []);
1749
+ const [fe, Ze] = z(null), ge = L(null), Ye = C(
1750
+ (t, r) => {
1751
+ if (ge.current) return;
1752
+ const n = new AbortController();
1753
+ ge.current = n, Ze(t);
1754
+ const d = oe();
1755
+ Promise.resolve(r({ html: d, signal: n.signal })).then((m) => {
1756
+ var N;
1757
+ if (n.signal.aborted) return;
1758
+ const b = te(String(m ?? ""));
1759
+ U("source.setCode", b), (N = V.current) == null || N.call(V, { html: b, markdown: "" });
1760
+ }).catch(() => {
1761
+ }).finally(() => {
1762
+ ge.current === n && (ge.current = null, Ze(null));
1763
+ });
1764
+ },
1765
+ [oe, U]
1766
+ );
1767
+ K(() => () => {
1768
+ var t;
1769
+ return (t = ge.current) == null ? void 0 : t.abort();
1691
1770
  }, []), K(() => {
1692
- const t = V.current;
1771
+ const t = W.current;
1693
1772
  if (!t) return;
1694
- t.value = Ke.current;
1695
- const r = Ur($);
1773
+ t.value = ut.current;
1774
+ const r = dn(H);
1696
1775
  if (!r) {
1697
- G(!0);
1776
+ X(!0);
1698
1777
  return;
1699
1778
  }
1700
- B.current = r;
1701
- const o = {
1702
- lang: L ?? Yr(I.language || "en"),
1779
+ G.current = r;
1780
+ const n = {
1781
+ lang: O ?? mn(J.language || "en"),
1703
1782
  // The kit renders its OWN toolbar (EditorToolbar) and drives Redactor
1704
1783
  // via the command API, so Redactor's native toolbar is suppressed.
1705
1784
  toolbar: !1,
1706
- plugins: k ?? [],
1707
- placeholder: h ?? C("editor.placeholder"),
1785
+ plugins: w ?? [],
1786
+ placeholder: f ?? I("editor.placeholder"),
1708
1787
  toolbarFixed: !1,
1709
1788
  // Platform parity (RedactorWysiwyg.js:84): no inline shortcode expansion.
1710
1789
  shortcodes: !1,
1711
1790
  imageEditable: !1,
1712
1791
  imageResizable: !0
1713
- }, d = u ? { imageUpload: u } : {}, f = (E == null ? void 0 : E.callbacks) ?? {}, w = {
1714
- ...o,
1792
+ }, d = u ? { imageUpload: u } : {}, m = (S == null ? void 0 : S.callbacks) ?? {}, b = {
1793
+ ...n,
1715
1794
  ...d,
1716
- ...E ?? {},
1795
+ ...S ?? {},
1717
1796
  // Re-pin safety-critical keys LAST so consumer `options` can't override
1718
1797
  // the sanitising change handler, re-enable image editing, or turn off
1719
1798
  // drag-resize (platform re-pins both image flags — RedactorWysiwyg.js:115-116).
1720
1799
  imageEditable: !1,
1721
1800
  imageResizable: !0,
1722
1801
  callbacks: {
1723
- ...f,
1724
- changed(R) {
1725
- const U = Re(Gr(R)), ve = te(U);
1726
- ie.current = !0, W.current && (se.current && clearTimeout(se.current), se.current = setTimeout(() => {
1727
- var ce;
1728
- (ce = W.current) == null || ce.call(W, { html: ve, markdown: "" });
1802
+ ...m,
1803
+ changed(N) {
1804
+ const Q = Ie(ln(N)), Ne = te(Q);
1805
+ ce.current = !0, V.current && (ue.current && clearTimeout(ue.current), ue.current = setTimeout(() => {
1806
+ var pe;
1807
+ (pe = V.current) == null || pe.call(V, { html: Ne, markdown: "" });
1729
1808
  }, 100));
1730
1809
  },
1731
- keydown(R) {
1732
- var U;
1733
- (U = he.current) == null || U.call(he, R);
1810
+ keydown(N) {
1811
+ var Q;
1812
+ (Q = ve.current) == null || Q.call(ve, N);
1734
1813
  },
1735
1814
  observe() {
1736
- ee();
1815
+ re();
1737
1816
  }
1738
1817
  }
1739
1818
  };
1740
1819
  try {
1741
- if (r(N, w), g)
1820
+ if (r(R, b), g)
1742
1821
  try {
1743
- r(N, "enableReadOnly");
1822
+ r(R, "enableReadOnly");
1744
1823
  } catch {
1745
1824
  }
1746
1825
  } catch {
1747
- G(!0);
1826
+ X(!0);
1748
1827
  }
1749
1828
  return () => {
1750
- se.current && clearTimeout(se.current);
1829
+ ue.current && clearTimeout(ue.current);
1751
1830
  try {
1752
- r(N, "destroy");
1831
+ r(R, "destroy");
1753
1832
  } catch {
1754
1833
  }
1755
- B.current = null;
1834
+ G.current = null;
1756
1835
  };
1757
1836
  }, []), K(() => {
1758
- if (!B.current || c === void 0) return;
1759
- if (ie.current) {
1760
- ie.current = !1;
1837
+ if (!G.current || c === void 0) return;
1838
+ if (ce.current) {
1839
+ ce.current = !1;
1761
1840
  return;
1762
1841
  }
1763
- const t = te(Re(c));
1764
- Re(le()) !== t && J("source.setCode", t);
1765
- }, [c, le, J]), K(() => {
1766
- me.current = g;
1767
- const t = B.current;
1842
+ const t = te(Ie(c));
1843
+ Ie(oe()) !== t && U("source.setCode", t);
1844
+ }, [c, oe, U]), K(() => {
1845
+ ye.current = g;
1846
+ const t = G.current;
1768
1847
  if (t)
1769
1848
  try {
1770
- t(N, g ? "enableReadOnly" : "disableReadOnly");
1849
+ t(R, g ? "enableReadOnly" : "disableReadOnly");
1771
1850
  } catch {
1772
1851
  }
1773
- }, [g, N]), K(() => {
1852
+ }, [g, R]), K(() => {
1774
1853
  if (!F || c === void 0) return;
1775
- const t = V.current;
1854
+ const t = W.current;
1776
1855
  if (!t) return;
1777
1856
  const r = te(c);
1778
1857
  t.value !== r && document.activeElement !== t && (t.value = r);
1779
1858
  }, [F, c]);
1780
- const Te = Fe(
1859
+ const Ee = Je(
1781
1860
  () => ({
1782
1861
  getHTML() {
1783
- return le();
1862
+ return oe();
1784
1863
  },
1785
1864
  getText() {
1786
- return le().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
1865
+ return oe().replace(/<[^>]*>/g, " ").replace(/&nbsp;/gi, " ").replace(/\s+/g, " ").trim();
1787
1866
  },
1788
1867
  getMarkdown() {
1789
1868
  return "";
1790
1869
  },
1791
1870
  setContent(t) {
1792
1871
  const r = te(t);
1793
- J("source.setCode", r) || V.current && (V.current.value = r);
1872
+ U("source.setCode", r) || W.current && (W.current.value = r);
1794
1873
  },
1795
- insertAtCursor: oe,
1874
+ insertAtCursor: ae,
1796
1875
  applyFormat(t) {
1797
- const r = Xr[t];
1798
- r && fe(...r);
1876
+ const r = cn[t];
1877
+ r && ke(...r);
1799
1878
  },
1800
1879
  focus() {
1801
1880
  var r;
1802
- const t = B.current;
1881
+ const t = G.current;
1803
1882
  if (t)
1804
1883
  try {
1805
- t(N, "editor.focus");
1884
+ t(R, "editor.focus");
1806
1885
  return;
1807
1886
  } catch {
1808
1887
  }
1809
- (r = V.current) == null || r.focus();
1888
+ (r = W.current) == null || r.focus();
1810
1889
  },
1811
1890
  clear() {
1812
- J("source.setCode", "") || V.current && (V.current.value = "");
1891
+ U("source.setCode", "") || W.current && (W.current.value = "");
1813
1892
  }
1814
1893
  }),
1815
- [N, le, J, oe, fe]
1894
+ [R, oe, U, ae, ke]
1816
1895
  );
1817
- ft(Z, () => Te, [Te]), bt(zr, Te, n);
1818
- const dt = z(
1896
+ zt(D, () => Ee, [Ee]), Mt(jr, Ee, o);
1897
+ const wt = C(
1819
1898
  (t) => {
1820
1899
  var r;
1821
- (r = W.current) == null || r.call(W, {
1900
+ (r = V.current) == null || r.call(V, {
1822
1901
  html: te(t.target.value),
1823
1902
  markdown: ""
1824
1903
  });
1825
1904
  },
1826
1905
  []
1827
- ), ct = l ?? C("editor.regionLabel"), ut = h ?? C("editor.placeholder");
1828
- return /* @__PURE__ */ v(
1906
+ ), xt = i ?? I("editor.regionLabel"), Ct = f ?? I("editor.placeholder"), He = fe !== null, se = [];
1907
+ return E && se.push({
1908
+ key: "dictate",
1909
+ icon: he ? /* @__PURE__ */ e(ot, { "aria-hidden": "true", className: "ds:size-5 ds:fill-current" }) : /* @__PURE__ */ e(at, { "aria-hidden": "true", className: "ds:size-5" }),
1910
+ label: I(he ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
1911
+ onClick: kt,
1912
+ recording: he
1913
+ }), Y && se.push({
1914
+ key: "proofread",
1915
+ icon: fe === "proofread" ? /* @__PURE__ */ e(Le, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Rr, { "aria-hidden": "true", className: "ds:size-5" }),
1916
+ label: I("editor.ai.proofread", "Check spelling & grammar"),
1917
+ onClick: () => Ye("proofread", Y),
1918
+ running: fe === "proofread"
1919
+ }), $ && se.push({
1920
+ key: "format",
1921
+ icon: fe === "format" ? /* @__PURE__ */ e(Le, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ e(Or, { "aria-hidden": "true", className: "ds:size-5" }),
1922
+ label: I("editor.ai.autoFormat", "Auto-format document"),
1923
+ onClick: () => Ye("format", $),
1924
+ running: fe === "format"
1925
+ }), k && se.push({
1926
+ key: "write",
1927
+ icon: /* @__PURE__ */ e(Pt, { "aria-hidden": "true", className: "ds:size-5" }),
1928
+ label: I("editor.ai.helpMeWrite"),
1929
+ onClick: () => {
1930
+ Be(), je(!0);
1931
+ }
1932
+ }), /* @__PURE__ */ y(
1829
1933
  "div",
1830
1934
  {
1831
1935
  ref: x,
1832
- className: [Zr(), T].filter(Boolean).join(" "),
1936
+ className: [hn(), T].filter(Boolean).join(" "),
1833
1937
  "data-component": "rich-text-editor",
1834
- "data-component-id": n,
1938
+ "data-component-id": o,
1835
1939
  "data-min-height": p,
1836
1940
  children: [
1837
1941
  !F && !g ? /* @__PURE__ */ e(
1838
- Vr,
1942
+ an,
1839
1943
  {
1840
- run: fe,
1841
- active: $e,
1944
+ run: ke,
1945
+ active: Pe,
1842
1946
  preset: s,
1843
- insertHtml: ze,
1844
- insertTable: it,
1845
- saveSelection: et,
1846
- restoreSelection: tt,
1847
- getSelectedText: rt,
1848
- uploadImage: u ? st : void 0,
1849
- enableColor: (k == null ? void 0 : k.includes("fontcolor")) ?? !1,
1947
+ insertHtml: Se,
1948
+ insertTable: pt,
1949
+ saveSelection: Be,
1950
+ restoreSelection: Fe,
1951
+ getSelectedText: mt,
1952
+ uploadImage: u ? bt : void 0,
1953
+ enableColor: (w == null ? void 0 : w.includes("fontcolor")) ?? !1,
1850
1954
  enableImage: !!u,
1851
- enableTable: (k == null ? void 0 : k.includes("table")) ?? !1,
1852
- showExtensions: y
1955
+ enableTable: (w == null ? void 0 : w.includes("table")) ?? !1,
1956
+ showExtensions: v
1853
1957
  }
1854
1958
  ) : null,
1855
- /* @__PURE__ */ v("div", { className: "ds:relative", ref: O, children: [
1959
+ /* @__PURE__ */ y("div", { className: "ds:relative", ref: q, children: [
1856
1960
  /* @__PURE__ */ e(
1857
1961
  "textarea",
1858
1962
  {
1859
- ref: V,
1860
- id: ne,
1861
- "aria-label": ct,
1963
+ ref: W,
1964
+ id: de,
1965
+ "aria-label": xt,
1862
1966
  "aria-multiline": "true",
1863
- placeholder: ut,
1864
- onChange: F ? dt : void 0,
1967
+ "aria-busy": He || void 0,
1968
+ placeholder: Ct,
1969
+ onChange: F ? wt : void 0,
1865
1970
  readOnly: F ? g : void 0,
1866
- className: F ? Jr() : void 0
1971
+ className: F ? fn() : void 0
1867
1972
  }
1868
1973
  ),
1869
- b && H ? /* @__PURE__ */ v("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:shadow-[var(--shadow-lg)]", children: [
1870
- /* @__PURE__ */ e(
1871
- "button",
1872
- {
1873
- type: "button",
1874
- onClick: Be,
1875
- "aria-pressed": Y,
1876
- "aria-label": C(Y ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
1877
- className: Y ? Kr : Ue,
1878
- children: Y ? /* @__PURE__ */ e(
1879
- _e,
1880
- {
1881
- "aria-hidden": "true",
1882
- className: "ds:size-5 ds:fill-current"
1883
- }
1884
- ) : /* @__PURE__ */ e(Se, { "aria-hidden": "true", className: "ds:size-5" })
1885
- }
1886
- ),
1887
- /* @__PURE__ */ e(
1888
- "span",
1889
- {
1890
- "aria-hidden": "true",
1891
- className: "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[color-mix(in_srgb,var(--primary-foreground)_35%,transparent)]"
1892
- }
1893
- ),
1894
- /* @__PURE__ */ e(
1895
- "button",
1896
- {
1897
- type: "button",
1898
- onClick: () => Ce(!0),
1899
- "aria-label": C("editor.ai.helpMeWrite"),
1900
- className: Ue,
1901
- children: /* @__PURE__ */ e(Ee, { "aria-hidden": "true", className: "ds:size-5" })
1902
- }
1903
- )
1904
- ] }) : H ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10", children: /* @__PURE__ */ e(
1905
- q,
1974
+ He ? /* @__PURE__ */ e(
1975
+ "div",
1906
1976
  {
1907
- size: "lg",
1908
- intent: "primary",
1909
- icon: Y ? /* @__PURE__ */ e(_e, { className: "ds:fill-current" }) : /* @__PURE__ */ e(Se, {}),
1910
- "aria-pressed": Y,
1911
- "aria-label": C(Y ? "editor.ai.dictateStop" : "editor.ai.dictateStart"),
1912
- onClick: Be,
1913
- className: Y ? `${en} ds:rounded-full ds:shadow-[var(--shadow-lg)]` : "ds:rounded-full ds:shadow-[var(--shadow-lg)]"
1914
- }
1915
- ) }) : b ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10", children: /* @__PURE__ */ e(
1916
- q,
1917
- {
1918
- size: "lg",
1919
- intent: "primary",
1920
- icon: /* @__PURE__ */ e(Ee, {}),
1921
- "aria-label": C("editor.ai.helpMeWrite"),
1922
- onClick: () => Ce(!0),
1923
- className: "ds:rounded-full ds:shadow-[var(--shadow-lg)]"
1924
- }
1925
- ) }) : null,
1926
- b ? /* @__PURE__ */ e(
1927
- _r,
1928
- {
1929
- open: Ze,
1930
- onClose: () => Ce(!1),
1931
- onRequestAiDraft: b,
1932
- onInsert: (t) => oe(t, { asHtml: A !== "text" }),
1933
- previewAsHtml: A !== "text",
1934
- privacyNotice: M,
1935
- onDictate: H
1977
+ "aria-hidden": "true",
1978
+ className: "ds:absolute ds:inset-0 ds:z-[5] ds:cursor-wait ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--background)_40%,transparent)]"
1936
1979
  }
1937
1980
  ) : null,
1938
- !F && !g && ((k == null ? void 0 : k.includes("table")) ?? !1) ? /* @__PURE__ */ e(
1939
- Fr,
1981
+ /* @__PURE__ */ y("div", { className: "ds:sticky ds:bottom-0 ds:z-10", children: [
1982
+ se.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:absolute ds:[inset-block-end:var(--spacing-md)] ds:[inset-inline-end:var(--spacing-md)] ds:z-10 ds:flex ds:items-center ds:overflow-hidden ds:rounded-full ds:bg-[var(--primary)] ds:bg-[image:var(--gradient-brand)] ds:shadow-[0_8px_24px_color-mix(in_srgb,var(--primary)_35%,transparent)]", children: se.map((t, r) => /* @__PURE__ */ y(nt, { children: [
1983
+ r > 0 ? /* @__PURE__ */ e(
1984
+ "span",
1985
+ {
1986
+ "aria-hidden": "true",
1987
+ className: "ds:self-stretch ds:[inline-size:var(--border-width-sm)] ds:bg-[color-mix(in_srgb,var(--primary-foreground)_35%,transparent)]"
1988
+ }
1989
+ ) : null,
1990
+ /* @__PURE__ */ e(
1991
+ "button",
1992
+ {
1993
+ type: "button",
1994
+ onClick: t.onClick,
1995
+ "aria-pressed": t.recording || void 0,
1996
+ "aria-busy": t.running || void 0,
1997
+ disabled: He && !t.running || void 0,
1998
+ "aria-label": t.label,
1999
+ title: t.label,
2000
+ className: t.recording ? pn : gn,
2001
+ children: t.icon
2002
+ }
2003
+ )
2004
+ ] }, t.key)) }) : null,
2005
+ k ? /* @__PURE__ */ e(
2006
+ Vr,
2007
+ {
2008
+ open: dt,
2009
+ onClose: () => je(!1),
2010
+ onRequestAiDraft: k,
2011
+ onInsert: (t) => {
2012
+ Fe(), ae(t, { asHtml: A !== "text" });
2013
+ },
2014
+ previewAsHtml: A !== "text",
2015
+ privacyNotice: M,
2016
+ onDictate: E
2017
+ }
2018
+ ) : null
2019
+ ] }),
2020
+ !F && !g && ((w == null ? void 0 : w.includes("table")) ?? !1) ? /* @__PURE__ */ e(
2021
+ on,
1940
2022
  {
1941
- active: $e,
1942
- run: fe,
1943
- areaRef: O,
1944
- getActiveTableEl: nt,
1945
- enableColor: (k == null ? void 0 : k.includes("fontcolor")) ?? !1,
1946
- saveTableCell: ot,
1947
- applyTableBackground: at
2023
+ active: Pe,
2024
+ run: ke,
2025
+ areaRef: q,
2026
+ getActiveTableEl: ht,
2027
+ enableColor: (w == null ? void 0 : w.includes("fontcolor")) ?? !1,
2028
+ saveTableCell: ft,
2029
+ applyTableBackground: gt
1948
2030
  }
1949
2031
  ) : null
1950
2032
  ] }),
1951
- H && lt ? /* @__PURE__ */ e(
2033
+ E ? /* @__PURE__ */ e("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: vt }) : null,
2034
+ E && yt ? /* @__PURE__ */ e(
1952
2035
  "p",
1953
2036
  {
1954
2037
  role: "alert",
1955
2038
  className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--destructive)]",
1956
- children: C("editor.ai.dictationError")
2039
+ children: I("editor.ai.dictationError")
1957
2040
  }
1958
2041
  ) : null
1959
2042
  ]
@@ -1961,10 +2044,10 @@ const Zr = He(
1961
2044
  );
1962
2045
  }
1963
2046
  );
1964
- tn.displayName = "RichTextEditor";
2047
+ bn.displayName = "RichTextEditor";
1965
2048
  export {
1966
- tn as R,
1967
- zr as r,
1968
- Zr as w
2049
+ bn as R,
2050
+ jr as r,
2051
+ hn as w
1969
2052
  };
1970
- //# sourceMappingURL=rich-text-editor-BOQr5lHx.js.map
2053
+ //# sourceMappingURL=rich-text-editor-VawKN1FI.js.map