@ryzeup/richtexteditor 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,5 +1,17 @@
1
- import U, { useRef as Y, useState as H, useEffect as oe } from "react";
2
- var de = { exports: {} }, ne = {};
1
+ var Ge = Object.defineProperty, Qe = Object.defineProperties;
2
+ var et = Object.getOwnPropertyDescriptors;
3
+ var ze = Object.getOwnPropertySymbols;
4
+ var tt = Object.prototype.hasOwnProperty, nt = Object.prototype.propertyIsEnumerable;
5
+ var Ne = (t, s, c) => s in t ? Ge(t, s, { enumerable: !0, configurable: !0, writable: !0, value: c }) : t[s] = c, be = (t, s) => {
6
+ for (var c in s || (s = {}))
7
+ tt.call(s, c) && Ne(t, c, s[c]);
8
+ if (ze)
9
+ for (var c of ze(s))
10
+ nt.call(s, c) && Ne(t, c, s[c]);
11
+ return t;
12
+ }, ye = (t, s) => Qe(t, et(s));
13
+ import W, { useRef as U, useState as F, useEffect as ae } from "react";
14
+ var fe = { exports: {} }, re = {};
3
15
  /**
4
16
  * @license React
5
17
  * react-jsx-runtime.production.js
@@ -9,29 +21,29 @@ var de = { exports: {} }, ne = {};
9
21
  * This source code is licensed under the MIT license found in the
10
22
  * LICENSE file in the root directory of this source tree.
11
23
  */
12
- var ye;
13
- function He() {
14
- if (ye) return ne;
15
- ye = 1;
24
+ var Oe;
25
+ function rt() {
26
+ if (Oe) return re;
27
+ Oe = 1;
16
28
  var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
17
- function u(c, h, v) {
18
- var L = null;
19
- if (v !== void 0 && (L = "" + v), h.key !== void 0 && (L = "" + h.key), "key" in h) {
20
- v = {};
21
- for (var y in h)
22
- y !== "key" && (v[y] = h[y]);
23
- } else v = h;
24
- return h = v.ref, {
29
+ function c(d, f, w) {
30
+ var k = null;
31
+ if (w !== void 0 && (k = "" + w), f.key !== void 0 && (k = "" + f.key), "key" in f) {
32
+ w = {};
33
+ for (var R in f)
34
+ R !== "key" && (w[R] = f[R]);
35
+ } else w = f;
36
+ return f = w.ref, {
25
37
  $$typeof: t,
26
- type: c,
27
- key: L,
28
- ref: h !== void 0 ? h : null,
29
- props: v
38
+ type: d,
39
+ key: k,
40
+ ref: f !== void 0 ? f : null,
41
+ props: w
30
42
  };
31
43
  }
32
- return ne.Fragment = s, ne.jsx = u, ne.jsxs = u, ne;
44
+ return re.Fragment = s, re.jsx = c, re.jsxs = c, re;
33
45
  }
34
- var re = {};
46
+ var oe = {};
35
47
  /**
36
48
  * @license React
37
49
  * react-jsx-runtime.development.js
@@ -41,24 +53,24 @@ var re = {};
41
53
  * This source code is licensed under the MIT license found in the
42
54
  * LICENSE file in the root directory of this source tree.
43
55
  */
44
- var Ce;
45
- function Fe() {
46
- return Ce || (Ce = 1, process.env.NODE_ENV !== "production" && (function() {
56
+ var Pe;
57
+ function ot() {
58
+ return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && (function() {
47
59
  function t(n) {
48
60
  if (n == null) return null;
49
61
  if (typeof n == "function")
50
- return n.$$typeof === le ? null : n.displayName || n.name || null;
62
+ return n.$$typeof === se ? null : n.displayName || n.name || null;
51
63
  if (typeof n == "string") return n;
52
64
  switch (n) {
53
- case S:
65
+ case A:
54
66
  return "Fragment";
55
- case D:
67
+ case H:
56
68
  return "Profiler";
57
- case W:
69
+ case q:
58
70
  return "StrictMode";
59
- case G:
71
+ case C:
60
72
  return "Suspense";
61
- case pe:
73
+ case J:
62
74
  return "SuspenseList";
63
75
  case ge:
64
76
  return "Activity";
@@ -69,20 +81,20 @@ function Fe() {
69
81
  ), n.$$typeof) {
70
82
  case B:
71
83
  return "Portal";
72
- case M:
84
+ case Z:
73
85
  return n.displayName || "Context";
74
- case f:
86
+ case V:
75
87
  return (n._context.displayName || "Context") + ".Consumer";
76
- case X:
77
- var p = n.render;
78
- return n = n.displayName, n || (n = p.displayName || p.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
79
- case ae:
80
- return p = n.displayName || null, p !== null ? p : t(n.type) || "Memo";
81
- case J:
82
- p = n._payload, n = n._init;
88
+ case h:
89
+ var v = n.render;
90
+ return n = n.displayName, n || (n = v.displayName || v.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
91
+ case le:
92
+ return v = n.displayName || null, v !== null ? v : t(n.type) || "Memo";
93
+ case G:
94
+ v = n._payload, n = n._init;
83
95
  try {
84
- return t(n(p));
85
- } catch {
96
+ return t(n(v));
97
+ } catch (_) {
86
98
  }
87
99
  }
88
100
  return null;
@@ -90,77 +102,77 @@ function Fe() {
90
102
  function s(n) {
91
103
  return "" + n;
92
104
  }
93
- function u(n) {
105
+ function c(n) {
94
106
  try {
95
107
  s(n);
96
- var p = !1;
97
- } catch {
98
- p = !0;
108
+ var v = !1;
109
+ } catch (K) {
110
+ v = !0;
99
111
  }
100
- if (p) {
101
- p = console;
102
- var R = p.error, _ = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
103
- return R.call(
104
- p,
112
+ if (v) {
113
+ v = console;
114
+ var _ = v.error, S = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
115
+ return _.call(
116
+ v,
105
117
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- _
118
+ S
107
119
  ), s(n);
108
120
  }
109
121
  }
110
- function c(n) {
111
- if (n === S) return "<>";
112
- if (typeof n == "object" && n !== null && n.$$typeof === J)
122
+ function d(n) {
123
+ if (n === A) return "<>";
124
+ if (typeof n == "object" && n !== null && n.$$typeof === G)
113
125
  return "<...>";
114
126
  try {
115
- var p = t(n);
116
- return p ? "<" + p + ">" : "<...>";
117
- } catch {
127
+ var v = t(n);
128
+ return v ? "<" + v + ">" : "<...>";
129
+ } catch (_) {
118
130
  return "<...>";
119
131
  }
120
132
  }
121
- function h() {
122
- var n = z.A;
133
+ function f() {
134
+ var n = N.A;
123
135
  return n === null ? null : n.getOwner();
124
136
  }
125
- function v() {
137
+ function w() {
126
138
  return Error("react-stack-top-frame");
127
139
  }
128
- function L(n) {
129
- if (T.call(n, "key")) {
130
- var p = Object.getOwnPropertyDescriptor(n, "key").get;
131
- if (p && p.isReactWarning) return !1;
140
+ function k(n) {
141
+ if (M.call(n, "key")) {
142
+ var v = Object.getOwnPropertyDescriptor(n, "key").get;
143
+ if (v && v.isReactWarning) return !1;
132
144
  }
133
145
  return n.key !== void 0;
134
146
  }
135
- function y(n, p) {
136
- function R() {
137
- ie || (ie = !0, console.error(
147
+ function R(n, v) {
148
+ function _() {
149
+ ce || (ce = !0, console.error(
138
150
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- p
151
+ v
140
152
  ));
141
153
  }
142
- R.isReactWarning = !0, Object.defineProperty(n, "key", {
143
- get: R,
154
+ _.isReactWarning = !0, Object.defineProperty(n, "key", {
155
+ get: _,
144
156
  configurable: !0
145
157
  });
146
158
  }
147
- function x() {
159
+ function b() {
148
160
  var n = t(this.type);
149
- return K[n] || (K[n] = !0, console.error(
161
+ return Q[n] || (Q[n] = !0, console.error(
150
162
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
163
  )), n = this.props.ref, n !== void 0 ? n : null;
152
164
  }
153
- function F(n, p, R, _, Z, ee) {
154
- var j = R.ref;
165
+ function I(n, v, _, S, K, te) {
166
+ var L = _.ref;
155
167
  return n = {
156
- $$typeof: q,
168
+ $$typeof: X,
157
169
  type: n,
158
- key: p,
159
- props: R,
160
- _owner: _
161
- }, (j !== void 0 ? j : null) !== null ? Object.defineProperty(n, "ref", {
170
+ key: v,
171
+ props: _,
172
+ _owner: S
173
+ }, (L !== void 0 ? L : null) !== null ? Object.defineProperty(n, "ref", {
162
174
  enumerable: !1,
163
- get: x
175
+ get: b
164
176
  }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
165
177
  configurable: !1,
166
178
  enumerable: !1,
@@ -175,261 +187,261 @@ function Fe() {
175
187
  configurable: !1,
176
188
  enumerable: !1,
177
189
  writable: !0,
178
- value: Z
190
+ value: K
179
191
  }), Object.defineProperty(n, "_debugTask", {
180
192
  configurable: !1,
181
193
  enumerable: !1,
182
194
  writable: !0,
183
- value: ee
195
+ value: te
184
196
  }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
185
197
  }
186
- function O(n, p, R, _, Z, ee) {
187
- var j = p.children;
188
- if (j !== void 0)
189
- if (_)
190
- if (se(j)) {
191
- for (_ = 0; _ < j.length; _++)
192
- k(j[_]);
193
- Object.freeze && Object.freeze(j);
198
+ function P(n, v, _, S, K, te) {
199
+ var L = v.children;
200
+ if (L !== void 0)
201
+ if (S)
202
+ if (ie(L)) {
203
+ for (S = 0; S < L.length; S++)
204
+ T(L[S]);
205
+ Object.freeze && Object.freeze(L);
194
206
  } else
195
207
  console.error(
196
208
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
209
  );
198
- else k(j);
199
- if (T.call(p, "key")) {
200
- j = t(n);
201
- var V = Object.keys(p).filter(function(ve) {
210
+ else T(L);
211
+ if (M.call(v, "key")) {
212
+ L = t(n);
213
+ var Y = Object.keys(v).filter(function(ve) {
202
214
  return ve !== "key";
203
215
  });
204
- _ = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", Q[j + _] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
216
+ S = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", ee[L + S] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
205
217
  `A props object containing a "key" prop is being spread into JSX:
206
218
  let props = %s;
207
219
  <%s {...props} />
208
220
  React keys must be passed directly to JSX without using spread:
209
221
  let props = %s;
210
222
  <%s key={someKey} {...props} />`,
211
- _,
212
- j,
213
- V,
214
- j
215
- ), Q[j + _] = !0);
223
+ S,
224
+ L,
225
+ Y,
226
+ L
227
+ ), ee[L + S] = !0);
216
228
  }
217
- if (j = null, R !== void 0 && (u(R), j = "" + R), L(p) && (u(p.key), j = "" + p.key), "key" in p) {
218
- R = {};
219
- for (var te in p)
220
- te !== "key" && (R[te] = p[te]);
221
- } else R = p;
222
- return j && y(
223
- R,
229
+ if (L = null, _ !== void 0 && (c(_), L = "" + _), k(v) && (c(v.key), L = "" + v.key), "key" in v) {
230
+ _ = {};
231
+ for (var ne in v)
232
+ ne !== "key" && (_[ne] = v[ne]);
233
+ } else _ = v;
234
+ return L && R(
235
+ _,
224
236
  typeof n == "function" ? n.displayName || n.name || "Unknown" : n
225
- ), F(
237
+ ), I(
226
238
  n,
227
- j,
228
- R,
229
- h(),
230
- Z,
231
- ee
239
+ L,
240
+ _,
241
+ f(),
242
+ K,
243
+ te
232
244
  );
233
245
  }
234
- function k(n) {
235
- P(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === J && (n._payload.status === "fulfilled" ? P(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
246
+ function T(n) {
247
+ D(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === G && (n._payload.status === "fulfilled" ? D(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
236
248
  }
237
- function P(n) {
238
- return typeof n == "object" && n !== null && n.$$typeof === q;
249
+ function D(n) {
250
+ return typeof n == "object" && n !== null && n.$$typeof === X;
239
251
  }
240
- var C = U, q = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), W = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), f = Symbol.for("react.consumer"), M = Symbol.for("react.context"), X = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), pe = Symbol.for("react.suspense_list"), ae = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), ge = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), z = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, se = Array.isArray, $ = console.createTask ? console.createTask : function() {
252
+ var E = W, X = Symbol.for("react.transitional.element"), B = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), H = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), J = Symbol.for("react.suspense_list"), le = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), ge = Symbol.for("react.activity"), se = Symbol.for("react.client.reference"), N = E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, ie = Array.isArray, $ = console.createTask ? console.createTask : function() {
241
253
  return null;
242
254
  };
243
- C = {
255
+ E = {
244
256
  react_stack_bottom_frame: function(n) {
245
257
  return n();
246
258
  }
247
259
  };
248
- var ie, K = {}, ce = C.react_stack_bottom_frame.bind(
249
- C,
250
- v
251
- )(), ue = $(c(v)), Q = {};
252
- re.Fragment = S, re.jsx = function(n, p, R) {
253
- var _ = 1e4 > z.recentlyCreatedOwnerStacks++;
254
- return O(
260
+ var ce, Q = {}, ue = E.react_stack_bottom_frame.bind(
261
+ E,
262
+ w
263
+ )(), de = $(d(w)), ee = {};
264
+ oe.Fragment = A, oe.jsx = function(n, v, _) {
265
+ var S = 1e4 > N.recentlyCreatedOwnerStacks++;
266
+ return P(
255
267
  n,
256
- p,
257
- R,
268
+ v,
269
+ _,
258
270
  !1,
259
- _ ? Error("react-stack-top-frame") : ce,
260
- _ ? $(c(n)) : ue
271
+ S ? Error("react-stack-top-frame") : ue,
272
+ S ? $(d(n)) : de
261
273
  );
262
- }, re.jsxs = function(n, p, R) {
263
- var _ = 1e4 > z.recentlyCreatedOwnerStacks++;
264
- return O(
274
+ }, oe.jsxs = function(n, v, _) {
275
+ var S = 1e4 > N.recentlyCreatedOwnerStacks++;
276
+ return P(
265
277
  n,
266
- p,
267
- R,
278
+ v,
279
+ _,
268
280
  !0,
269
- _ ? Error("react-stack-top-frame") : ce,
270
- _ ? $(c(n)) : ue
281
+ S ? Error("react-stack-top-frame") : ue,
282
+ S ? $(d(n)) : de
271
283
  );
272
284
  };
273
- })()), re;
285
+ })()), oe;
274
286
  }
275
- var Re;
276
- function Ie() {
277
- return Re || (Re = 1, process.env.NODE_ENV === "production" ? de.exports = He() : de.exports = Fe()), de.exports;
287
+ var De;
288
+ function at() {
289
+ return De || (De = 1, process.env.NODE_ENV === "production" ? fe.exports = rt() : fe.exports = ot()), fe.exports;
278
290
  }
279
- var a = Ie(), _e = {
291
+ var a = at(), Be = {
280
292
  color: void 0,
281
293
  size: void 0,
282
294
  className: void 0,
283
295
  style: void 0,
284
296
  attr: void 0
285
- }, Ee = U.createContext && /* @__PURE__ */ U.createContext(_e), Be = ["attr", "size", "title"];
286
- function $e(t, s) {
297
+ }, He = W.createContext && /* @__PURE__ */ W.createContext(Be), lt = ["attr", "size", "title"];
298
+ function st(t, s) {
287
299
  if (t == null) return {};
288
- var u = Ve(t, s), c, h;
300
+ var c = it(t, s), d, f;
289
301
  if (Object.getOwnPropertySymbols) {
290
- var v = Object.getOwnPropertySymbols(t);
291
- for (h = 0; h < v.length; h++)
292
- c = v[h], !(s.indexOf(c) >= 0) && Object.prototype.propertyIsEnumerable.call(t, c) && (u[c] = t[c]);
302
+ var w = Object.getOwnPropertySymbols(t);
303
+ for (f = 0; f < w.length; f++)
304
+ d = w[f], !(s.indexOf(d) >= 0) && Object.prototype.propertyIsEnumerable.call(t, d) && (c[d] = t[d]);
293
305
  }
294
- return u;
306
+ return c;
295
307
  }
296
- function Ve(t, s) {
308
+ function it(t, s) {
297
309
  if (t == null) return {};
298
- var u = {};
299
- for (var c in t)
300
- if (Object.prototype.hasOwnProperty.call(t, c)) {
301
- if (s.indexOf(c) >= 0) continue;
302
- u[c] = t[c];
310
+ var c = {};
311
+ for (var d in t)
312
+ if (Object.prototype.hasOwnProperty.call(t, d)) {
313
+ if (s.indexOf(d) >= 0) continue;
314
+ c[d] = t[d];
303
315
  }
304
- return u;
316
+ return c;
305
317
  }
306
- function fe() {
307
- return fe = Object.assign ? Object.assign.bind() : function(t) {
318
+ function he() {
319
+ return he = Object.assign ? Object.assign.bind() : function(t) {
308
320
  for (var s = 1; s < arguments.length; s++) {
309
- var u = arguments[s];
310
- for (var c in u)
311
- Object.prototype.hasOwnProperty.call(u, c) && (t[c] = u[c]);
321
+ var c = arguments[s];
322
+ for (var d in c)
323
+ Object.prototype.hasOwnProperty.call(c, d) && (t[d] = c[d]);
312
324
  }
313
325
  return t;
314
- }, fe.apply(this, arguments);
326
+ }, he.apply(this, arguments);
315
327
  }
316
- function je(t, s) {
317
- var u = Object.keys(t);
328
+ function Fe(t, s) {
329
+ var c = Object.keys(t);
318
330
  if (Object.getOwnPropertySymbols) {
319
- var c = Object.getOwnPropertySymbols(t);
320
- s && (c = c.filter(function(h) {
321
- return Object.getOwnPropertyDescriptor(t, h).enumerable;
322
- })), u.push.apply(u, c);
331
+ var d = Object.getOwnPropertySymbols(t);
332
+ s && (d = d.filter(function(f) {
333
+ return Object.getOwnPropertyDescriptor(t, f).enumerable;
334
+ })), c.push.apply(c, d);
323
335
  }
324
- return u;
336
+ return c;
325
337
  }
326
- function he(t) {
338
+ function pe(t) {
327
339
  for (var s = 1; s < arguments.length; s++) {
328
- var u = arguments[s] != null ? arguments[s] : {};
329
- s % 2 ? je(Object(u), !0).forEach(function(c) {
330
- Ye(t, c, u[c]);
331
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(u)) : je(Object(u)).forEach(function(c) {
332
- Object.defineProperty(t, c, Object.getOwnPropertyDescriptor(u, c));
340
+ var c = arguments[s] != null ? arguments[s] : {};
341
+ s % 2 ? Fe(Object(c), !0).forEach(function(d) {
342
+ ct(t, d, c[d]);
343
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(c)) : Fe(Object(c)).forEach(function(d) {
344
+ Object.defineProperty(t, d, Object.getOwnPropertyDescriptor(c, d));
333
345
  });
334
346
  }
335
347
  return t;
336
348
  }
337
- function Ye(t, s, u) {
338
- return s = Ue(s), s in t ? Object.defineProperty(t, s, { value: u, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = u, t;
349
+ function ct(t, s, c) {
350
+ return s = ut(s), s in t ? Object.defineProperty(t, s, { value: c, enumerable: !0, configurable: !0, writable: !0 }) : t[s] = c, t;
339
351
  }
340
- function Ue(t) {
341
- var s = We(t, "string");
352
+ function ut(t) {
353
+ var s = dt(t, "string");
342
354
  return typeof s == "symbol" ? s : s + "";
343
355
  }
344
- function We(t, s) {
356
+ function dt(t, s) {
345
357
  if (typeof t != "object" || !t) return t;
346
- var u = t[Symbol.toPrimitive];
347
- if (u !== void 0) {
348
- var c = u.call(t, s);
349
- if (typeof c != "object") return c;
358
+ var c = t[Symbol.toPrimitive];
359
+ if (c !== void 0) {
360
+ var d = c.call(t, s);
361
+ if (typeof d != "object") return d;
350
362
  throw new TypeError("@@toPrimitive must return a primitive value.");
351
363
  }
352
364
  return (s === "string" ? String : Number)(t);
353
365
  }
354
- function ke(t) {
355
- return t && t.map((s, u) => /* @__PURE__ */ U.createElement(s.tag, he({
356
- key: u
357
- }, s.attr), ke(s.child)));
366
+ function $e(t) {
367
+ return t && t.map((s, c) => /* @__PURE__ */ W.createElement(s.tag, pe({
368
+ key: c
369
+ }, s.attr), $e(s.child)));
358
370
  }
359
- function N(t) {
360
- return (s) => /* @__PURE__ */ U.createElement(qe, fe({
361
- attr: he({}, t.attr)
362
- }, s), ke(t.child));
371
+ function z(t) {
372
+ return (s) => /* @__PURE__ */ W.createElement(ft, he({
373
+ attr: pe({}, t.attr)
374
+ }, s), $e(t.child));
363
375
  }
364
- function qe(t) {
365
- var s = (u) => {
376
+ function ft(t) {
377
+ var s = (c) => {
366
378
  var {
367
- attr: c,
368
- size: h,
369
- title: v
370
- } = t, L = $e(t, Be), y = h || u.size || "1em", x;
371
- return u.className && (x = u.className), t.className && (x = (x ? x + " " : "") + t.className), /* @__PURE__ */ U.createElement("svg", fe({
379
+ attr: d,
380
+ size: f,
381
+ title: w
382
+ } = t, k = st(t, lt), R = f || c.size || "1em", b;
383
+ return c.className && (b = c.className), t.className && (b = (b ? b + " " : "") + t.className), /* @__PURE__ */ W.createElement("svg", he({
372
384
  stroke: "currentColor",
373
385
  fill: "currentColor",
374
386
  strokeWidth: "0"
375
- }, u.attr, c, L, {
376
- className: x,
377
- style: he(he({
378
- color: t.color || u.color
379
- }, u.style), t.style),
380
- height: y,
381
- width: y,
387
+ }, c.attr, d, k, {
388
+ className: b,
389
+ style: pe(pe({
390
+ color: t.color || c.color
391
+ }, c.style), t.style),
392
+ height: R,
393
+ width: R,
382
394
  xmlns: "http://www.w3.org/2000/svg"
383
- }), v && /* @__PURE__ */ U.createElement("title", null, v), t.children);
395
+ }), w && /* @__PURE__ */ W.createElement("title", null, w), t.children);
384
396
  };
385
- return Ee !== void 0 ? /* @__PURE__ */ U.createElement(Ee.Consumer, null, (u) => s(u)) : s(_e);
397
+ return He !== void 0 ? /* @__PURE__ */ W.createElement(He.Consumer, null, (c) => s(c)) : s(Be);
386
398
  }
387
- function Xe(t) {
388
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, child: [] }] })(t);
399
+ function mt(t) {
400
+ return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M352 64c0-17.7-14.3-32-32-32L128 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32zm96 128c0-17.7-14.3-32-32-32L32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32-14.3 32-32zM0 448c0 17.7 14.3 32 32 32l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 416c-17.7 0-32 14.3-32 32zM352 320c0-17.7-14.3-32-32-32l-192 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l192 0c17.7 0 32-14.3 32-32z" }, child: [] }] })(t);
389
401
  }
390
- function Ge(t) {
391
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, child: [] }] })(t);
402
+ function ht(t) {
403
+ return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 64c0 17.7-14.3 32-32 32L192 96c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zm0 256c0 17.7-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32zM0 192c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 224c-17.7 0-32-14.3-32-32zM448 448c0 17.7-14.3 32-32 32L32 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z" }, child: [] }] })(t);
392
404
  }
393
- function Ze(t) {
394
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z" }, child: [] }] })(t);
405
+ function pt(t) {
406
+ return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l96 0 32 0 208 0c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z" }, child: [] }] })(t);
395
407
  }
396
- function Je(t) {
397
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z" }, child: [] }] })(t);
408
+ function gt(t) {
409
+ return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M24 56c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24l0 120 16 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l16 0 0-96-8 0C34.7 80 24 69.3 24 56zM86.7 341.2c-6.5-7.4-18.3-6.9-24 1.2L51.5 357.9c-7.7 10.8-22.7 13.3-33.5 5.6s-13.3-22.7-5.6-33.5l11.1-15.6c23.7-33.2 72.3-35.6 99.2-4.9c21.3 24.4 20.8 60.9-1.1 84.7L86.8 432l33.2 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-88 0c-9.5 0-18.2-5.6-22-14.4s-2.1-18.9 4.3-25.9l72-78c5.3-5.8 5.4-14.6 .3-20.5zM224 64l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm0 160l256 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-256 0c-17.7 0-32-14.3-32-32s14.3-32 32-32z" }, child: [] }] })(t);
398
410
  }
399
- function Ke(t) {
400
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
411
+ function vt(t) {
412
+ return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M12.83 352h262.34A12.82 12.82 0 0 0 288 339.17v-38.34A12.82 12.82 0 0 0 275.17 288H12.83A12.82 12.82 0 0 0 0 300.83v38.34A12.82 12.82 0 0 0 12.83 352zm0-256h262.34A12.82 12.82 0 0 0 288 83.17V44.83A12.82 12.82 0 0 0 275.17 32H12.83A12.82 12.82 0 0 0 0 44.83v38.34A12.82 12.82 0 0 0 12.83 96zM432 160H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0 256H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
401
413
  }
402
- function Qe(t) {
403
- return N({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z" }, child: [] }] })(t);
414
+ function xt(t) {
415
+ return z({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M333.49 238a122 122 0 0 0 27-65.21C367.87 96.49 308 32 233.42 32H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h31.87v288H34a16 16 0 0 0-16 16v48a16 16 0 0 0 16 16h209.32c70.8 0 134.14-51.75 141-122.4 4.74-48.45-16.39-92.06-50.83-119.6zM145.66 112h87.76a48 48 0 0 1 0 96h-87.76zm87.76 288h-87.76V288h87.76a56 56 0 0 1 0 112z" }, child: [] }] })(t);
404
416
  }
405
- function et(t) {
406
- return N({ attr: { viewBox: "0 0 544 512" }, child: [{ tag: "path", attr: { d: "M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z" }, child: [] }] })(t);
417
+ function wt(t) {
418
+ return z({ attr: { viewBox: "0 0 544 512" }, child: [{ tag: "path", attr: { d: "M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z" }, child: [] }] })(t);
407
419
  }
408
- function tt(t) {
409
- return N({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z" }, child: [] }] })(t);
420
+ function bt(t) {
421
+ return z({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M320 48v32a16 16 0 0 1-16 16h-62.76l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H16a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h62.76l80-320H112a16 16 0 0 1-16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z" }, child: [] }] })(t);
410
422
  }
411
- function nt(t) {
412
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" }, child: [] }] })(t);
423
+ function yt(t) {
424
+ return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z" }, child: [] }] })(t);
413
425
  }
414
- function rt(t) {
415
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
426
+ function Ct(t) {
427
+ return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M80 368H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm0-320H16A16 16 0 0 0 0 64v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16V64a16 16 0 0 0-16-16zm0 160H16a16 16 0 0 0-16 16v64a16 16 0 0 0 16 16h64a16 16 0 0 0 16-16v-64a16 16 0 0 0-16-16zm416 176H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
416
428
  }
417
- function ot(t) {
418
- return N({ attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z" }, child: [] }] })(t);
429
+ function Rt(t) {
430
+ return z({ attr: { viewBox: "0 0 496 512" }, child: [{ tag: "path", attr: { d: "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm194.8 170.2C334.3 380.4 292.5 400 248 400s-86.3-19.6-114.8-53.8c-13.6-16.3 11-36.7 24.6-20.5 22.4 26.9 55.2 42.2 90.2 42.2s67.8-15.4 90.2-42.2c13.4-16.2 38.1 4.2 24.6 20.5z" }, child: [] }] })(t);
419
431
  }
420
- function at(t) {
421
- return N({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z" }, child: [] }] })(t);
432
+ function Et(t) {
433
+ return z({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z" }, child: [] }] })(t);
422
434
  }
423
- function lt(t) {
424
- return N({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
435
+ function jt(t) {
436
+ return z({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M32 64h32v160c0 88.22 71.78 160 160 160s160-71.78 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H272a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1-160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0-16-16H32a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z" }, child: [] }] })(t);
425
437
  }
426
- function st(t) {
427
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }, child: [] }] })(t);
438
+ function _t(t) {
439
+ return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M2 20h20v4H2v-4zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5L5.49 17zm4.42-5.61 2.03-5.79h.12l2.03 5.79H9.91z" }, child: [] }] })(t);
428
440
  }
429
- function it(t) {
430
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z" }, child: [] }] })(t);
441
+ function kt(t) {
442
+ return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0V0z" }, child: [] }, { tag: "path", attr: { d: "M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z" }, child: [] }] })(t);
431
443
  }
432
- const ct = [
444
+ const Lt = [
433
445
  "😀",
434
446
  "😁",
435
447
  "😂",
@@ -541,117 +553,119 @@ const ct = [
541
553
  "👏",
542
554
  "🫶",
543
555
  "👐"
544
- ], ut = ({
556
+ ], St = ({
545
557
  exec: t,
546
558
  saveSelection: s,
547
- handleFileChange: u,
548
- handleFontSizeChange: c,
549
- handleFontFamilyChange: h,
559
+ handleFileChange: c,
560
+ handleFontSizeChange: d,
561
+ handleFontFamilyChange: f,
550
562
  // insertListBlock,
551
- insertEmoji: v,
552
- handleLink: L,
553
- removeFormatting: y,
554
- visibleActions: x,
555
- className: F,
556
- style: O
563
+ insertEmoji: w,
564
+ handleLink: k,
565
+ removeFormatting: R,
566
+ visibleActions: b,
567
+ className: I,
568
+ style: P
557
569
  }) => {
558
- const k = Y(null), P = Y(null), C = Y(null), [q, B] = H(!1);
559
- oe(() => {
560
- const f = (M) => {
561
- !M.target.closest(".rte-emoji-popup") && !M.target.closest("button[title='Emoji']") && B(!1);
570
+ var V, Z;
571
+ const T = U(null), D = U(null), E = U(null), [X, B] = F(!1);
572
+ ae(() => {
573
+ const h = (C) => {
574
+ !C.target.closest(".rte-emoji-popup") && !C.target.closest("button[title='Emoji']") && B(!1);
562
575
  };
563
- return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
576
+ return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
564
577
  }, []);
565
- const S = (f) => {
566
- f.preventDefault();
567
- const M = f.currentTarget.dataset.command;
568
- if (M)
569
- switch (M) {
578
+ const A = (h) => {
579
+ var J;
580
+ h.preventDefault();
581
+ const C = h.currentTarget.dataset.command;
582
+ if (C)
583
+ switch (C) {
570
584
  case "bold":
571
585
  case "italic":
572
586
  case "underline":
573
587
  case "insertUnorderedList":
574
588
  case "insertOrderedList":
575
589
  case "removeFormat":
576
- t(M);
590
+ t(C);
577
591
  break;
578
592
  case "insertImage": {
579
- k.current?.click();
593
+ (J = T.current) == null || J.click();
580
594
  break;
581
595
  }
582
596
  default:
583
- console.warn("Unknown command:", M);
597
+ console.warn("Unknown command:", C);
584
598
  }
585
- }, W = (f) => {
586
- t("foreColor", f.target.value);
587
- }, D = (f) => {
588
- t("backColor", f.target.value);
599
+ }, q = (h) => {
600
+ t("foreColor", h.target.value);
601
+ }, H = (h) => {
602
+ t("backColor", h.target.value);
589
603
  };
590
- return /* @__PURE__ */ a.jsxs("div", { className: `rte-toolbar ${F || ""}`, style: O, children: [
591
- x.bold && /* @__PURE__ */ a.jsx(
604
+ return /* @__PURE__ */ a.jsxs("div", { className: `rte-toolbar ${I || ""}`, style: P, children: [
605
+ b.bold && /* @__PURE__ */ a.jsx(
592
606
  "button",
593
607
  {
594
608
  "data-command": "bold",
595
609
  title: "Bold",
596
- onMouseDown: S,
597
- children: /* @__PURE__ */ a.jsx(Qe, {})
610
+ onMouseDown: A,
611
+ children: /* @__PURE__ */ a.jsx(xt, {})
598
612
  }
599
613
  ),
600
- x.italic && /* @__PURE__ */ a.jsx(
614
+ b.italic && /* @__PURE__ */ a.jsx(
601
615
  "button",
602
616
  {
603
617
  "data-command": "italic",
604
618
  title: "Italic",
605
- onMouseDown: S,
606
- children: /* @__PURE__ */ a.jsx(tt, {})
619
+ onMouseDown: A,
620
+ children: /* @__PURE__ */ a.jsx(bt, {})
607
621
  }
608
622
  ),
609
- x.underline && /* @__PURE__ */ a.jsx(
623
+ b.underline && /* @__PURE__ */ a.jsx(
610
624
  "button",
611
625
  {
612
626
  "data-command": "underline",
613
627
  title: "Underline",
614
- onMouseDown: S,
615
- children: /* @__PURE__ */ a.jsx(lt, {})
628
+ onMouseDown: A,
629
+ children: /* @__PURE__ */ a.jsx(jt, {})
616
630
  }
617
631
  ),
618
- x.unorderedList && /* @__PURE__ */ a.jsx(
632
+ b.unorderedList && /* @__PURE__ */ a.jsx(
619
633
  "button",
620
634
  {
621
635
  "data-command": "insertUnorderedList",
622
- onMouseDown: S,
636
+ onMouseDown: A,
623
637
  title: "UnorderedList",
624
- children: /* @__PURE__ */ a.jsx(rt, {})
638
+ children: /* @__PURE__ */ a.jsx(Ct, {})
625
639
  }
626
640
  ),
627
- x.orderedList && /* @__PURE__ */ a.jsx(
641
+ b.orderedList && /* @__PURE__ */ a.jsx(
628
642
  "button",
629
643
  {
630
644
  "data-command": "insertOrderedList",
631
645
  title: "OrderedList",
632
- onMouseDown: S,
633
- children: /* @__PURE__ */ a.jsx(Je, {})
646
+ onMouseDown: A,
647
+ children: /* @__PURE__ */ a.jsx(gt, {})
634
648
  }
635
649
  ),
636
- x.link && /* @__PURE__ */ a.jsx("button", { "data-command": "createLink", title: "Link", onClick: L, children: /* @__PURE__ */ a.jsx(nt, {}) }),
637
- x.removeFormat && /* @__PURE__ */ a.jsx(
650
+ b.link && /* @__PURE__ */ a.jsx("button", { "data-command": "createLink", title: "Link", onClick: k, children: /* @__PURE__ */ a.jsx(yt, {}) }),
651
+ b.removeFormat && /* @__PURE__ */ a.jsx(
638
652
  "button",
639
653
  {
640
654
  "data-command": "Remove format",
641
655
  title: "removeFormat",
642
- onMouseDown: (f) => {
643
- f.preventDefault(), s(), y();
656
+ onMouseDown: (h) => {
657
+ h.preventDefault(), s(), R();
644
658
  },
645
- children: /* @__PURE__ */ a.jsx(it, {})
659
+ children: /* @__PURE__ */ a.jsx(kt, {})
646
660
  }
647
661
  ),
648
- x.image && /* @__PURE__ */ a.jsx(
662
+ b.image && /* @__PURE__ */ a.jsx(
649
663
  "button",
650
664
  {
651
665
  "data-command": "insertImage",
652
666
  title: "Image",
653
- onMouseDown: S,
654
- children: /* @__PURE__ */ a.jsx(Ze, {})
667
+ onMouseDown: A,
668
+ children: /* @__PURE__ */ a.jsx(pt, {})
655
669
  }
656
670
  ),
657
671
  /* @__PURE__ */ a.jsx(
@@ -659,23 +673,23 @@ const ct = [
659
673
  {
660
674
  type: "file",
661
675
  accept: "image/*",
662
- ref: k,
676
+ ref: T,
663
677
  style: { display: "none" },
664
- onChange: u
678
+ onChange: c
665
679
  }
666
680
  ),
667
- x.emoji && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
681
+ b.emoji && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
668
682
  /* @__PURE__ */ a.jsx(
669
683
  "button",
670
684
  {
671
685
  title: "Emoji",
672
- onMouseDown: (f) => {
673
- f.preventDefault(), s(), B((M) => !M);
686
+ onMouseDown: (h) => {
687
+ h.preventDefault(), s(), B((C) => !C);
674
688
  },
675
- children: /* @__PURE__ */ a.jsx(ot, {})
689
+ children: /* @__PURE__ */ a.jsx(Rt, {})
676
690
  }
677
691
  ),
678
- q && /* @__PURE__ */ a.jsx("div", { className: "rte-emoji-popup", children: ct.map((f) => /* @__PURE__ */ a.jsx(
692
+ X && /* @__PURE__ */ a.jsx("div", { className: "rte-emoji-popup", children: Lt.map((h) => /* @__PURE__ */ a.jsx(
679
693
  "span",
680
694
  {
681
695
  style: {
@@ -683,42 +697,44 @@ const ct = [
683
697
  cursor: "pointer",
684
698
  textAlign: "center"
685
699
  },
686
- onMouseDown: (M) => {
687
- M.preventDefault(), v(f), B(!1);
700
+ onMouseDown: (C) => {
701
+ C.preventDefault(), w(h), B(!1);
688
702
  },
689
- children: f
703
+ children: h
690
704
  },
691
- f
705
+ h
692
706
  )) })
693
707
  ] }),
694
- x.color && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
708
+ b.color && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
695
709
  /* @__PURE__ */ a.jsx(
696
710
  "button",
697
711
  {
698
712
  title: "Text Color",
699
- onMouseDown: (f) => {
700
- f.preventDefault(), s(), P.current?.click();
713
+ onMouseDown: (h) => {
714
+ var C;
715
+ h.preventDefault(), s(), (C = D.current) == null || C.click();
701
716
  },
702
717
  style: {
703
718
  display: "flex",
704
719
  alignItems: "center",
705
720
  justifyContent: "center",
706
- color: P.current?.value || "#000",
721
+ color: ((V = D.current) == null ? void 0 : V.value) || "#000",
707
722
  fontSize: "18px"
708
723
  },
709
- children: /* @__PURE__ */ a.jsx(st, {})
724
+ children: /* @__PURE__ */ a.jsx(_t, {})
710
725
  }
711
726
  ),
712
727
  /* @__PURE__ */ a.jsx(
713
728
  "input",
714
729
  {
715
- ref: P,
730
+ ref: D,
716
731
  type: "color",
717
732
  defaultValue: "#000000",
718
- onChange: (f) => {
719
- W(f), (f.target.parentElement?.querySelector(
733
+ onChange: (h) => {
734
+ var C;
735
+ q(h), ((C = h.target.parentElement) == null ? void 0 : C.querySelector(
720
736
  "button"
721
- )).style.color = f.target.value;
737
+ )).style.color = h.target.value;
722
738
  },
723
739
  style: {
724
740
  position: "absolute",
@@ -730,33 +746,35 @@ const ct = [
730
746
  }
731
747
  )
732
748
  ] }),
733
- x.highlight && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
749
+ b.highlight && /* @__PURE__ */ a.jsxs("div", { style: { position: "relative" }, children: [
734
750
  /* @__PURE__ */ a.jsx(
735
751
  "button",
736
752
  {
737
753
  title: "Highlight",
738
- onMouseDown: (f) => {
739
- f.preventDefault(), s(), C.current?.click();
754
+ onMouseDown: (h) => {
755
+ var C;
756
+ h.preventDefault(), s(), (C = E.current) == null || C.click();
740
757
  },
741
758
  style: {
742
759
  display: "flex",
743
760
  alignItems: "center",
744
761
  justifyContent: "center",
745
- color: C.current?.value || "#000",
762
+ color: ((Z = E.current) == null ? void 0 : Z.value) || "#000",
746
763
  fontSize: "18px"
747
764
  },
748
- children: /* @__PURE__ */ a.jsx(et, {})
765
+ children: /* @__PURE__ */ a.jsx(wt, {})
749
766
  }
750
767
  ),
751
768
  /* @__PURE__ */ a.jsx(
752
769
  "input",
753
770
  {
754
- ref: C,
771
+ ref: E,
755
772
  type: "color",
756
- onChange: (f) => {
757
- D(f), (f.target.parentElement?.querySelector(
773
+ onChange: (h) => {
774
+ var C;
775
+ H(h), ((C = h.target.parentElement) == null ? void 0 : C.querySelector(
758
776
  "button"
759
- )).style.color = f.target.value;
777
+ )).style.color = h.target.value;
760
778
  },
761
779
  defaultValue: "#000000",
762
780
  style: {
@@ -769,51 +787,51 @@ const ct = [
769
787
  }
770
788
  )
771
789
  ] }),
772
- x.align && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
790
+ b.align && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
773
791
  /* @__PURE__ */ a.jsx(
774
792
  "button",
775
793
  {
776
794
  title: "Align Left",
777
- onMouseDown: (f) => f.preventDefault(),
795
+ onMouseDown: (h) => h.preventDefault(),
778
796
  onClick: () => t("justifyLeft"),
779
- children: /* @__PURE__ */ a.jsx(Ke, {})
797
+ children: /* @__PURE__ */ a.jsx(vt, {})
780
798
  }
781
799
  ),
782
800
  /* @__PURE__ */ a.jsx(
783
801
  "button",
784
802
  {
785
803
  title: "Align Center",
786
- onMouseDown: (f) => f.preventDefault(),
804
+ onMouseDown: (h) => h.preventDefault(),
787
805
  onClick: () => t("justifyCenter"),
788
- children: /* @__PURE__ */ a.jsx(Xe, {})
806
+ children: /* @__PURE__ */ a.jsx(mt, {})
789
807
  }
790
808
  ),
791
809
  /* @__PURE__ */ a.jsx(
792
810
  "button",
793
811
  {
794
812
  title: "Align Right",
795
- onMouseDown: (f) => f.preventDefault(),
813
+ onMouseDown: (h) => h.preventDefault(),
796
814
  onClick: () => t("justifyRight"),
797
- children: /* @__PURE__ */ a.jsx(Ge, {})
815
+ children: /* @__PURE__ */ a.jsx(ht, {})
798
816
  }
799
817
  )
800
818
  ] }),
801
- x.table && /* @__PURE__ */ a.jsx(
819
+ b.table && /* @__PURE__ */ a.jsx(
802
820
  "button",
803
821
  {
804
822
  title: "Insert Table",
805
- onMouseDown: (f) => f.preventDefault(),
823
+ onMouseDown: (h) => h.preventDefault(),
806
824
  onClick: () => t("insertTable"),
807
- children: /* @__PURE__ */ a.jsx(at, {})
825
+ children: /* @__PURE__ */ a.jsx(Et, {})
808
826
  }
809
827
  ),
810
- x.fontFamily && /* @__PURE__ */ a.jsxs(
828
+ b.fontFamily && /* @__PURE__ */ a.jsxs(
811
829
  "select",
812
830
  {
813
831
  className: "rte-dropdown",
814
832
  defaultValue: "",
815
833
  onMouseDown: () => s(),
816
- onChange: h,
834
+ onChange: f,
817
835
  children: [
818
836
  /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: "Font Family" }),
819
837
  /* @__PURE__ */ a.jsx("option", { value: "Arial", children: "Arial" }),
@@ -824,13 +842,13 @@ const ct = [
824
842
  ]
825
843
  }
826
844
  ),
827
- x.fontSize && /* @__PURE__ */ a.jsxs(
845
+ b.fontSize && /* @__PURE__ */ a.jsxs(
828
846
  "select",
829
847
  {
830
848
  className: "rte-dropdown",
831
849
  defaultValue: "",
832
850
  onMouseDown: () => s(),
833
- onChange: c,
851
+ onChange: d,
834
852
  children: [
835
853
  /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: "Font Size" }),
836
854
  /* @__PURE__ */ a.jsx("option", { value: "2", children: "Small " }),
@@ -841,149 +859,149 @@ const ct = [
841
859
  }
842
860
  )
843
861
  ] });
844
- }, dt = ({
862
+ }, Tt = ({
845
863
  show: t,
846
864
  position: s,
847
- filtered: u,
848
- insertMention: c,
849
- onClose: h,
850
- query: v
865
+ filtered: c,
866
+ insertMention: d,
867
+ onClose: f,
868
+ query: w
851
869
  }) => {
852
- const L = Y(null);
853
- return oe(() => {
854
- const y = (x) => {
855
- L.current && !L.current.contains(x.target) && h();
870
+ const k = U(null);
871
+ return ae(() => {
872
+ const R = (b) => {
873
+ k.current && !k.current.contains(b.target) && f();
856
874
  };
857
- return t && document.addEventListener("mousedown", y), () => {
858
- document.removeEventListener("mousedown", y);
875
+ return t && document.addEventListener("mousedown", R), () => {
876
+ document.removeEventListener("mousedown", R);
859
877
  };
860
- }, [t, h]), t ? /* @__PURE__ */ a.jsx(
878
+ }, [t, f]), t ? /* @__PURE__ */ a.jsx(
861
879
  "ul",
862
880
  {
863
- ref: L,
881
+ ref: k,
864
882
  className: "rte-popup",
865
883
  style: {
866
884
  top: s.y,
867
885
  left: s.x
868
886
  },
869
- children: u.length > 0 ? u.map(({ key: y, value: x }) => {
870
- const F = y.toLowerCase(), O = v.toLowerCase(), k = F.indexOf(O);
871
- let P = y;
872
- if (k !== -1 && v.length > 0) {
873
- const C = k + v.length;
874
- P = y.substring(0, k) + `<span class="rte-highlight">${y.substring(
875
- k,
876
- C
877
- )}</span>` + y.substring(C);
887
+ children: c.length > 0 ? c.map(({ key: R, value: b }) => {
888
+ const I = R.toLowerCase(), P = w.toLowerCase(), T = I.indexOf(P);
889
+ let D = R;
890
+ if (T !== -1 && w.length > 0) {
891
+ const E = T + w.length;
892
+ D = R.substring(0, T) + `<span class="rte-highlight">${R.substring(
893
+ T,
894
+ E
895
+ )}</span>` + R.substring(E);
878
896
  }
879
897
  return /* @__PURE__ */ a.jsx(
880
898
  "li",
881
899
  {
882
- onMouseDown: (C) => {
883
- C.preventDefault(), c({ key: y, value: x });
900
+ onMouseDown: (E) => {
901
+ E.preventDefault(), d({ key: R, value: b });
884
902
  },
885
903
  style: {
886
904
  padding: "6px 12px",
887
905
  cursor: "pointer",
888
906
  fontSize: "14px"
889
907
  },
890
- dangerouslySetInnerHTML: { __html: P },
891
- onMouseEnter: (C) => C.currentTarget.style.background = "#f0f0f0",
892
- onMouseLeave: (C) => C.currentTarget.style.background = "#fff"
908
+ dangerouslySetInnerHTML: { __html: D },
909
+ onMouseEnter: (E) => E.currentTarget.style.background = "#f0f0f0",
910
+ onMouseLeave: (E) => E.currentTarget.style.background = "#fff"
893
911
  },
894
- x
912
+ b
895
913
  );
896
914
  }) : /* @__PURE__ */ a.jsx("li", { style: { padding: "6px 12px", color: "#999" }, children: "No matches" })
897
915
  }
898
916
  ) : null;
899
917
  };
900
- function Le(t) {
901
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Minus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,11.5h0a.5.5,0,0,1,0,1H9a.5.5,0,0,1,0-1Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.934A9.933,9.933,0,1,1,21.932,12,9.945,9.945,0,0,1,12,21.934ZM12,3.068A8.933,8.933,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.068Z" }, child: [] }] }] }] })(t);
918
+ function Ie(t) {
919
+ return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Minus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,11.5h0a.5.5,0,0,1,0,1H9a.5.5,0,0,1,0-1Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.934A9.933,9.933,0,1,1,21.932,12,9.945,9.945,0,0,1,12,21.934ZM12,3.068A8.933,8.933,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.068Z" }, child: [] }] }] }] })(t);
902
920
  }
903
921
  function me(t) {
904
- return N({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Plus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.932A9.934,9.934,0,1,1,21.932,12,9.944,9.944,0,0,1,12,21.932ZM12,3.065A8.934,8.934,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.065Z" }, child: [] }] }] }] })(t);
922
+ return z({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "g", attr: { id: "Circle_Plus" }, child: [{ tag: "g", attr: {}, child: [{ tag: "path", attr: { d: "M15,12.5H12.5V15a.5.5,0,0,1-1,0V12.5H9a.5.5,0,0,1,0-1h2.5V9a.5.5,0,0,1,1,0v2.5H15A.5.5,0,0,1,15,12.5Z" }, child: [] }, { tag: "path", attr: { d: "M12,21.932A9.934,9.934,0,1,1,21.932,12,9.944,9.944,0,0,1,12,21.932ZM12,3.065A8.934,8.934,0,1,0,20.932,12,8.944,8.944,0,0,0,12,3.065Z" }, child: [] }] }] }] })(t);
905
923
  }
906
- const mt = ({
924
+ const At = ({
907
925
  visible: t,
908
926
  x: s,
909
- y: u,
910
- onAction: c,
911
- onClose: h
927
+ y: c,
928
+ onAction: d,
929
+ onClose: f
912
930
  }) => {
913
931
  if (!t) return null;
914
- const v = {
915
- top: u,
932
+ const w = {
933
+ top: c,
916
934
  left: s
917
935
  };
918
- return /* @__PURE__ */ a.jsxs("div", { style: v, className: "rte-table-menu", onMouseLeave: h, children: [
919
- /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertRowAbove"), children: [
936
+ return /* @__PURE__ */ a.jsxs("div", { style: w, className: "rte-table-menu", onMouseLeave: f, children: [
937
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertRowAbove"), children: [
920
938
  /* @__PURE__ */ a.jsx(me, {}),
921
939
  " Insert row above"
922
940
  ] }),
923
- /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertRowBelow"), children: [
941
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertRowBelow"), children: [
924
942
  /* @__PURE__ */ a.jsx(me, {}),
925
943
  " Insert row below"
926
944
  ] }),
927
- /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertColLeft"), children: [
945
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertColLeft"), children: [
928
946
  /* @__PURE__ */ a.jsx(me, {}),
929
947
  " Insert col left"
930
948
  ] }),
931
- /* @__PURE__ */ a.jsxs("button", { onClick: () => c("insertColRight"), children: [
949
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => d("insertColRight"), children: [
932
950
  /* @__PURE__ */ a.jsx(me, {}),
933
951
  " Insert col right"
934
952
  ] }),
935
- /* @__PURE__ */ a.jsxs("button", { onClick: () => c("deleteRow"), children: [
936
- /* @__PURE__ */ a.jsx(Le, {}),
953
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => d("deleteRow"), children: [
954
+ /* @__PURE__ */ a.jsx(Ie, {}),
937
955
  " Delete row"
938
956
  ] }),
939
- /* @__PURE__ */ a.jsxs("button", { onClick: () => c("deleteCol"), children: [
940
- /* @__PURE__ */ a.jsx(Le, {}),
957
+ /* @__PURE__ */ a.jsxs("button", { onClick: () => d("deleteCol"), children: [
958
+ /* @__PURE__ */ a.jsx(Ie, {}),
941
959
  " Delete column"
942
960
  ] })
943
961
  ] });
944
- }, ft = ({ html: t, className: s, style: u }) => {
945
- const c = (h) => {
946
- const v = h.target;
947
- if (v.tagName === "A") {
948
- h.preventDefault();
949
- const L = v.href;
950
- L && window.open(L, "_blank", "noopener,noreferrer");
962
+ }, Mt = ({ html: t, className: s, style: c }) => {
963
+ const d = (f) => {
964
+ const w = f.target;
965
+ if (w.tagName === "A") {
966
+ f.preventDefault();
967
+ const k = w.href;
968
+ k && window.open(k, "_blank", "noopener,noreferrer");
951
969
  }
952
970
  };
953
971
  return /* @__PURE__ */ a.jsx(
954
972
  "div",
955
973
  {
956
974
  className: `rte-preview ${s || ""}`,
957
- style: u,
958
- onClick: c,
975
+ style: c,
976
+ onClick: d,
959
977
  dangerouslySetInnerHTML: { __html: t }
960
978
  }
961
979
  );
962
- }, ht = ({
980
+ }, zt = ({
963
981
  visible: t,
964
982
  linkData: s,
965
- onClose: u,
966
- onInsert: c
983
+ onClose: c,
984
+ onInsert: d
967
985
  }) => {
968
- const [h, v] = H(""), [L, y] = H(""), [x, F] = H(""), [O, k] = H("_self");
969
- if (oe(() => {
970
- t ? (v(s.url || ""), y(s.text || ""), F(s.title || ""), k(s.target || "_self")) : (v(""), y(""), F(""), k("_self"));
986
+ const [f, w] = F(""), [k, R] = F(""), [b, I] = F(""), [P, T] = F("_self");
987
+ if (ae(() => {
988
+ t ? (w(s.url || ""), R(s.text || ""), I(s.title || ""), T(s.target || "_self")) : (w(""), R(""), I(""), T("_self"));
971
989
  }, [t, s]), !t) return null;
972
- const P = () => {
973
- c({ url: h, text: L, title: x, target: O });
990
+ const D = () => {
991
+ d({ url: f, text: k, title: b, target: P });
974
992
  };
975
993
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
976
- /* @__PURE__ */ a.jsx("div", { className: "rte-link-modal-overlay", onClick: u }),
994
+ /* @__PURE__ */ a.jsx("div", { className: "rte-link-modal-overlay", onClick: c }),
977
995
  /* @__PURE__ */ a.jsxs("div", { className: "rte-link-modal", children: [
978
- /* @__PURE__ */ a.jsx("h4", { className: "rte-link-modal__title", children: h ? "Edit Link" : "Insert Link" }),
996
+ /* @__PURE__ */ a.jsx("h4", { className: "rte-link-modal__title", children: f ? "Edit Link" : "Insert Link" }),
979
997
  /* @__PURE__ */ a.jsx(
980
998
  "input",
981
999
  {
982
1000
  type: "text",
983
1001
  className: "rte-link-modal__input",
984
1002
  placeholder: "URL",
985
- value: h,
986
- onChange: (C) => v(C.target.value)
1003
+ value: f,
1004
+ onChange: (E) => w(E.target.value)
987
1005
  }
988
1006
  ),
989
1007
  /* @__PURE__ */ a.jsx(
@@ -992,8 +1010,8 @@ const mt = ({
992
1010
  type: "text",
993
1011
  className: "rte-link-modal__input",
994
1012
  placeholder: "Text to Display",
995
- value: L,
996
- onChange: (C) => y(C.target.value)
1013
+ value: k,
1014
+ onChange: (E) => R(E.target.value)
997
1015
  }
998
1016
  ),
999
1017
  /* @__PURE__ */ a.jsx(
@@ -1002,16 +1020,16 @@ const mt = ({
1002
1020
  type: "text",
1003
1021
  className: "rte-link-modal__input",
1004
1022
  placeholder: "Title",
1005
- value: x,
1006
- onChange: (C) => F(C.target.value)
1023
+ value: b,
1024
+ onChange: (E) => I(E.target.value)
1007
1025
  }
1008
1026
  ),
1009
1027
  /* @__PURE__ */ a.jsxs(
1010
1028
  "select",
1011
1029
  {
1012
1030
  className: "rte-link-modal__select",
1013
- value: O,
1014
- onChange: (C) => k(C.target.value),
1031
+ value: P,
1032
+ onChange: (E) => T(E.target.value),
1015
1033
  children: [
1016
1034
  /* @__PURE__ */ a.jsx("option", { value: "_self", children: "Same tab" }),
1017
1035
  /* @__PURE__ */ a.jsx("option", { value: "_blank", children: "New tab" })
@@ -1019,23 +1037,23 @@ const mt = ({
1019
1037
  }
1020
1038
  ),
1021
1039
  /* @__PURE__ */ a.jsxs("div", { className: "rte-link-modal__actions", children: [
1022
- /* @__PURE__ */ a.jsx("button", { className: "rte-link-modal__btn", onClick: u, children: "Cancel" }),
1040
+ /* @__PURE__ */ a.jsx("button", { className: "rte-link-modal__btn", onClick: c, children: "Cancel" }),
1023
1041
  /* @__PURE__ */ a.jsx(
1024
1042
  "button",
1025
1043
  {
1026
1044
  className: "rte-link-modal__btn rte-link-modal__btn--ok",
1027
- onClick: P,
1045
+ onClick: D,
1028
1046
  children: "OK"
1029
1047
  }
1030
1048
  )
1031
1049
  ] })
1032
1050
  ] })
1033
1051
  ] });
1034
- }, gt = ({
1052
+ }, Pt = ({
1035
1053
  atSuggestions: t = [],
1036
1054
  showOutput: s = !1,
1037
- showPreview: u = !1,
1038
- toolbarConfig: c = {
1055
+ showPreview: c = !1,
1056
+ toolbarConfig: d = {
1039
1057
  link: !1,
1040
1058
  image: !1,
1041
1059
  emoji: !1,
@@ -1045,19 +1063,20 @@ const mt = ({
1045
1063
  fontSize: !1,
1046
1064
  highlight: !1
1047
1065
  },
1048
- classNames: h = {},
1049
- styles: v = {},
1050
- handleGetHtml: L = () => {
1066
+ classNames: f = {},
1067
+ styles: w = {},
1068
+ handleGetHtml: k = () => {
1051
1069
  }
1052
1070
  }) => {
1053
- const y = Y(null), [x, F] = H("<p>Always bet on Prime!</p>"), [O, k] = H(!1), [P, C] = H({ x: 0, y: 0 }), [q, B] = H(
1071
+ var Ee, je, _e, ke, Le, Se, Te, Ae;
1072
+ const R = U(null), [b, I] = F("<p>Always bet on Prime!</p>"), [P, T] = F(!1), [D, E] = F({ x: 0, y: 0 }), [X, B] = F(
1054
1073
  []
1055
- ), S = Y(null), W = Y(null), [D, f] = H({ visible: !1, x: 0, y: 0 }), [M, X] = H(!1), G = Y(null), [pe, ae] = H({
1074
+ ), A = U(null), q = U(null), [H, V] = F({ visible: !1, x: 0, y: 0 }), [Z, h] = F(!1), C = U(null), [J, le] = F({
1056
1075
  url: "",
1057
1076
  text: "",
1058
1077
  title: "",
1059
1078
  target: "_self"
1060
- }), J = {
1079
+ }), G = {
1061
1080
  bold: !0,
1062
1081
  italic: !0,
1063
1082
  underline: !0,
@@ -1065,219 +1084,228 @@ const mt = ({
1065
1084
  unorderedList: !0,
1066
1085
  orderedList: !0,
1067
1086
  align: !0,
1068
- link: c.link ?? !1,
1069
- image: c.image ?? !1,
1070
- emoji: c.emoji ?? !1,
1071
- table: c.table ?? !1,
1072
- color: c.color ?? !1,
1073
- fontFamily: c.fontFamily ?? !1,
1074
- fontSize: c.fontSize ?? !1,
1075
- highlight: c.fontSize ?? !1
1076
- }, [ge, le] = H(""), z = () => y.current, T = () => {
1077
- F(z()?.innerHTML ?? "");
1078
- const e = be();
1079
- L?.(e);
1080
- }, se = () => {
1087
+ link: (Ee = d.link) != null ? Ee : !1,
1088
+ image: (je = d.image) != null ? je : !1,
1089
+ emoji: (_e = d.emoji) != null ? _e : !1,
1090
+ table: (ke = d.table) != null ? ke : !1,
1091
+ color: (Le = d.color) != null ? Le : !1,
1092
+ fontFamily: (Se = d.fontFamily) != null ? Se : !1,
1093
+ fontSize: (Te = d.fontSize) != null ? Te : !1,
1094
+ highlight: (Ae = d.fontSize) != null ? Ae : !1
1095
+ }, [ge, se] = F(""), N = () => R.current, M = () => {
1096
+ var r, o;
1097
+ I((o = (r = N()) == null ? void 0 : r.innerHTML) != null ? o : "");
1098
+ const e = Re();
1099
+ k == null || k(e);
1100
+ }, ie = () => {
1081
1101
  const e = window.getSelection();
1082
- e?.rangeCount && (S.current = e.getRangeAt(0));
1102
+ e != null && e.rangeCount && (A.current = e.getRangeAt(0));
1083
1103
  }, $ = () => {
1084
1104
  const e = window.getSelection();
1085
- e && S.current && (e.removeAllRanges(), e.addRange(S.current));
1086
- }, ie = (e, o) => {
1087
- const r = window.getSelection();
1088
- r && r.rangeCount > 0 && (S.current = r.getRangeAt(0)), $(), document.execCommand(e, !1, o), T();
1105
+ e && A.current && (e.removeAllRanges(), e.addRange(A.current));
1106
+ }, ce = (e, r) => {
1107
+ const o = window.getSelection();
1108
+ o && o.rangeCount > 0 && (A.current = o.getRangeAt(0)), $(), document.execCommand(e, !1, r), M();
1089
1109
  };
1090
- oe(() => {
1091
- const e = z();
1092
- e && !e.innerHTML && (e.innerHTML = x), T();
1093
- }, []), oe(() => () => {
1110
+ ae(() => {
1111
+ const e = N();
1112
+ e && !e.innerHTML && (e.innerHTML = b), M();
1113
+ }, []), ae(() => () => {
1094
1114
  document.removeEventListener("mousemove", null), document.removeEventListener("mouseup", null);
1095
1115
  }, []);
1096
- const K = (e) => {
1116
+ const Q = (e) => {
1097
1117
  for (; e && e.nodeName !== "LI"; )
1098
1118
  e = e.parentNode;
1099
1119
  return e;
1100
- }, ce = (e) => {
1101
- let o = 0, r = e.parentElement;
1102
- for (; r; )
1103
- (r.tagName === "UL" || r.tagName === "OL") && o++, r = r.parentElement;
1104
- return o;
1105
1120
  }, ue = (e) => {
1106
- const o = e.querySelector("li"), r = o ? ce(o) : 1;
1121
+ let r = 0, o = e.parentElement;
1122
+ for (; o; )
1123
+ (o.tagName === "UL" || o.tagName === "OL") && r++, o = o.parentElement;
1124
+ return r;
1125
+ }, de = (e) => {
1126
+ const r = e.querySelector("li"), o = r ? ue(r) : 1;
1107
1127
  if (e.querySelector("[data-hidden-array-start]")) return;
1108
- const l = `{{#arrayData${r > 1 ? r : ""}}}`, g = `{{/arrayData${r > 1 ? r : ""}}}`, i = document.createElement("span");
1128
+ const l = `{{#arrayData${o > 1 ? o : ""}}}`, p = `{{/arrayData${o > 1 ? o : ""}}}`, i = document.createElement("span");
1109
1129
  i.textContent = l, i.style.display = "none", i.setAttribute("data-hidden-array-start", "true"), e.insertBefore(i, e.firstChild);
1110
- const m = document.createElement("span");
1111
- m.textContent = g, m.style.display = "none", m.setAttribute("data-hidden-array-end", "true"), e.appendChild(m);
1112
- }, Q = (e) => {
1113
- const o = window.getSelection();
1114
- if (!o?.rangeCount) return;
1115
- const r = o.getRangeAt(0), l = K(r.startContainer);
1116
- let g, i;
1130
+ const u = document.createElement("span");
1131
+ u.textContent = p, u.style.display = "none", u.setAttribute("data-hidden-array-end", "true"), e.appendChild(u);
1132
+ }, ee = (e) => {
1133
+ var x;
1134
+ const r = window.getSelection();
1135
+ if (!(r != null && r.rangeCount)) return;
1136
+ const o = r.getRangeAt(0), l = Q(o.startContainer);
1137
+ let p, i;
1117
1138
  if (l) {
1118
- let d = l.querySelector(e);
1119
- d || (d = document.createElement(e), d.style.margin = "0", d.style.paddingLeft = "20px", l.appendChild(d)), i = d, g = document.createElement("li"), g.textContent = "​", i.appendChild(g);
1139
+ let m = l.querySelector(e);
1140
+ m || (m = document.createElement(e), m.style.margin = "0", m.style.paddingLeft = "20px", l.appendChild(m)), i = m, p = document.createElement("li"), p.textContent = "​", i.appendChild(p);
1120
1141
  } else {
1121
- if (document.execCommand(
1142
+ document.execCommand(
1122
1143
  e === "ul" ? "insertUnorderedList" : "insertOrderedList"
1123
- ), i = z()?.querySelector(`${e}:last-child`), !i) return;
1124
- g = i.querySelector("li:last-child");
1144
+ );
1145
+ const m = N();
1146
+ if (i = m == null ? void 0 : m.querySelector(`${e}:last-child`), !i) return;
1147
+ p = i.querySelector("li:last-child");
1125
1148
  }
1126
- ue(i);
1127
- const m = document.createRange();
1128
- m.setStart(g, 0), m.collapse(!0), o.removeAllRanges(), o.addRange(m), z()?.focus(), T();
1129
- }, n = (e, o) => {
1130
- e === "insertOrderedList" ? Q("ol") : e === "insertUnorderedList" ? Q("ul") : ie(e, o), e === "insertTable" && ve();
1131
- }, p = (e) => {
1132
- const o = document.createElement("span");
1133
- o.textContent = "​", e.insertNode(o), e.setStartAfter(o), e.collapse(!0);
1134
- const r = o.getBoundingClientRect();
1135
- o.remove(), C({ x: r.left, y: r.bottom + window.scrollY }), B(t || []), k(!0), W.current = e.cloneRange();
1136
- }, R = () => {
1149
+ de(i);
1150
+ const u = document.createRange();
1151
+ u.setStart(p, 0), u.collapse(!0), r.removeAllRanges(), r.addRange(u), (x = N()) == null || x.focus(), M();
1152
+ }, n = (e, r) => {
1153
+ e === "insertOrderedList" ? ee("ol") : e === "insertUnorderedList" ? ee("ul") : ce(e, r), e === "insertTable" && ve();
1154
+ }, v = (e) => {
1155
+ const r = document.createElement("span");
1156
+ r.textContent = "​", e.insertNode(r), e.setStartAfter(r), e.collapse(!0);
1157
+ const o = r.getBoundingClientRect();
1158
+ r.remove(), E({ x: o.left, y: o.bottom + window.scrollY }), B(t || []), T(!0), q.current = e.cloneRange();
1159
+ }, _ = () => {
1137
1160
  const e = window.getSelection();
1138
1161
  if (!e || e.rangeCount === 0) return null;
1139
- const o = e.anchorNode;
1140
- let r = e.anchorOffset;
1141
- if (!o) return null;
1142
- let l = o;
1143
- for (l.nodeType !== Node.TEXT_NODE && (l.childNodes && l.childNodes[r] ? l = l.childNodes[r] : l = o.previousSibling); l; ) {
1162
+ const r = e.anchorNode;
1163
+ let o = e.anchorOffset;
1164
+ if (!r) return null;
1165
+ let l = r;
1166
+ for (l.nodeType !== Node.TEXT_NODE && (l.childNodes && l.childNodes[o] ? l = l.childNodes[o] : l = r.previousSibling); l; ) {
1144
1167
  if (l.nodeType === Node.TEXT_NODE) {
1145
- const g = l.textContent || "", i = l === o ? r : g.length, m = g.lastIndexOf("@", i - 1);
1146
- if (m !== -1) {
1147
- const d = document.createRange();
1148
- return d.setStart(l, m), d.setEnd(l, i), d;
1168
+ const p = l.textContent || "", i = l === r ? o : p.length, u = p.lastIndexOf("@", i - 1);
1169
+ if (u !== -1) {
1170
+ const x = document.createRange();
1171
+ return x.setStart(l, u), x.setEnd(l, i), x;
1149
1172
  }
1150
1173
  }
1151
1174
  l = l.previousSibling;
1152
1175
  }
1153
1176
  return null;
1154
- }, _ = (e) => {
1155
- const o = window.getSelection();
1156
- if (!o) return;
1157
- const r = R();
1158
- r ? (o.removeAllRanges(), o.addRange(r)) : W.current && (o.removeAllRanges(), o.addRange(W.current));
1177
+ }, S = (e) => {
1178
+ var p;
1179
+ const r = window.getSelection();
1180
+ if (!r) return;
1181
+ const o = _();
1182
+ o ? (r.removeAllRanges(), r.addRange(o)) : q.current && (r.removeAllRanges(), r.addRange(q.current));
1159
1183
  const l = document.createElement("span");
1160
1184
  l.textContent = `{{${e.key}}}`, l.style.color = "#007bff", l.style.display = "inline", l.contentEditable = "false", l.setAttribute("data-mention", e.value || e.key || "");
1161
1185
  try {
1162
- const g = o.rangeCount ? o.getRangeAt(0) : null;
1163
- if (g)
1164
- g.deleteContents(), g.insertNode(l);
1186
+ const i = r.rangeCount ? r.getRangeAt(0) : null;
1187
+ if (i)
1188
+ i.deleteContents(), i.insertNode(l);
1165
1189
  else {
1166
- const d = document.createRange(), w = z();
1167
- d.selectNodeContents(w), d.collapse(!1), d.insertNode(l);
1190
+ const m = document.createRange(), y = N();
1191
+ m.selectNodeContents(y), m.collapse(!1), m.insertNode(l);
1168
1192
  }
1169
- const i = document.createTextNode(" ");
1170
- l.after(i);
1171
- const m = document.createRange();
1172
- m.setStartAfter(i), m.collapse(!0), o.removeAllRanges(), o.addRange(m);
1173
- } catch (g) {
1174
- console.error("insertMention error:", g);
1193
+ const u = document.createTextNode(" ");
1194
+ l.after(u);
1195
+ const x = document.createRange();
1196
+ x.setStartAfter(u), x.collapse(!0), r.removeAllRanges(), r.addRange(x);
1197
+ } catch (i) {
1198
+ console.error("insertMention error:", i);
1175
1199
  }
1176
- k(!1), z()?.focus(), T();
1177
- }, Z = (e) => {
1178
- const o = e.key.toLowerCase();
1179
- if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(o) && (e.preventDefault(), n(
1180
- o === "b" ? "bold" : o === "i" ? "italic" : o === "u" ? "underline" : ""
1200
+ T(!1), (p = N()) == null || p.focus(), M();
1201
+ }, K = (e) => {
1202
+ var o, l, p;
1203
+ const r = e.key.toLowerCase();
1204
+ if ((e.ctrlKey || e.metaKey) && ["b", "i", "u"].includes(r) && (e.preventDefault(), n(
1205
+ r === "b" ? "bold" : r === "i" ? "italic" : r === "u" ? "underline" : ""
1181
1206
  )), e.shiftKey && e.key === "2" && e.preventDefault(), e.key === "Enter") {
1182
- const r = window.getSelection(), l = r?.anchorNode ? K(r.anchorNode) : null;
1183
- if (!l) return;
1184
- if (l.textContent?.replace(/\u200B/g, "").trim() === "") {
1207
+ const i = window.getSelection(), u = i != null && i.anchorNode ? Q(i.anchorNode) : null;
1208
+ if (!u) return;
1209
+ if (((o = u.textContent) == null ? void 0 : o.replace(/\u200B/g, "").trim()) === "") {
1185
1210
  e.preventDefault();
1186
- const i = l.parentElement, m = i?.closest("li");
1187
- if (m) {
1188
- i?.removeChild(l);
1189
- const d = document.createElement("p");
1190
- d.innerHTML = "<br />", m.parentElement?.insertBefore(d, m.nextSibling);
1191
- const w = document.createRange();
1192
- w.setStart(d, 0), w.collapse(!0), r?.removeAllRanges(), r?.addRange(w);
1211
+ const m = u.parentElement, y = m == null ? void 0 : m.closest("li");
1212
+ if (y) {
1213
+ m == null || m.removeChild(u);
1214
+ const g = document.createElement("p");
1215
+ g.innerHTML = "<br />", (l = y.parentElement) == null || l.insertBefore(g, y.nextSibling);
1216
+ const j = document.createRange();
1217
+ j.setStart(g, 0), j.collapse(!0), i == null || i.removeAllRanges(), i == null || i.addRange(j);
1193
1218
  } else {
1194
- const d = l.closest("ul, ol");
1195
- if (d) {
1196
- const w = document.createElement("p");
1197
- w.innerHTML = "<br />", d.parentElement?.insertBefore(w, d.nextSibling), d.removeChild(l);
1198
- const E = document.createRange();
1199
- E.setStart(w, 0), E.collapse(!0), r?.removeAllRanges(), r?.addRange(E);
1219
+ const g = u.closest("ul, ol");
1220
+ if (g) {
1221
+ const j = document.createElement("p");
1222
+ j.innerHTML = "<br />", (p = g.parentElement) == null || p.insertBefore(j, g.nextSibling), g.removeChild(u);
1223
+ const O = document.createRange();
1224
+ O.setStart(j, 0), O.collapse(!0), i == null || i.removeAllRanges(), i == null || i.addRange(O);
1200
1225
  }
1201
1226
  }
1202
- T();
1227
+ M();
1203
1228
  }
1204
1229
  }
1205
- }, ee = (e) => {
1230
+ }, te = (e) => {
1206
1231
  if (e.data === "@") {
1207
- const r = window.getSelection();
1208
- if (!r?.rangeCount) return;
1232
+ const o = window.getSelection();
1233
+ if (!(o != null && o.rangeCount)) return;
1209
1234
  setTimeout(() => {
1210
- p(r.getRangeAt(0)), le(""), B(t), k(!0);
1235
+ v(o.getRangeAt(0)), se(""), B(t), T(!0);
1211
1236
  }, 0);
1212
1237
  return;
1213
1238
  }
1214
- if (O) {
1215
- setTimeout(() => j(), 0);
1239
+ if (P) {
1240
+ setTimeout(() => L(), 0);
1216
1241
  return;
1217
1242
  }
1218
- }, j = () => {
1219
- if (T(), !O) return;
1243
+ }, L = () => {
1244
+ if (M(), !P) return;
1220
1245
  const e = window.getSelection();
1221
1246
  if (!e || !e.anchorNode) return;
1222
- const r = (e.anchorNode.textContent || "").match(/@([a-zA-Z0-9_]*)$/);
1223
- if (!r) {
1224
- k(!1);
1247
+ const o = (e.anchorNode.textContent || "").match(/@([a-zA-Z0-9_]*)$/);
1248
+ if (!o) {
1249
+ T(!1);
1225
1250
  return;
1226
1251
  }
1227
- const l = r[1].toLowerCase();
1228
- le(l);
1229
- const g = t.filter((i) => i.key.toLowerCase().includes(l));
1230
- B(g);
1231
- }, V = (e) => {
1232
- const o = e.target.files?.[0];
1233
- if (!o) return;
1234
- const r = new FileReader();
1235
- r.onload = (l) => {
1236
- const g = l.target?.result;
1252
+ const l = o[1].toLowerCase();
1253
+ se(l);
1254
+ const p = t.filter((i) => i.key.toLowerCase().includes(l));
1255
+ B(p);
1256
+ }, Y = (e) => {
1257
+ var l;
1258
+ const r = (l = e.target.files) == null ? void 0 : l[0];
1259
+ if (!r) return;
1260
+ const o = new FileReader();
1261
+ o.onload = (p) => {
1262
+ var O;
1263
+ const i = (O = p.target) == null ? void 0 : O.result;
1237
1264
  $();
1238
- const i = window.getSelection();
1239
- let m = i && i.rangeCount ? i.getRangeAt(0) : null;
1240
- const d = document.createElement("img");
1241
- d.src = g, d.alt = o.name || "image", d.className = "rte-inserted-image", d.contentEditable = "true";
1242
- const w = z();
1243
- if (!m || !w) {
1244
- w?.appendChild(d);
1245
- const A = document.createTextNode(" ");
1246
- w?.appendChild(A);
1247
- const I = document.createRange();
1248
- I.setStartAfter(A), I.collapse(!0), i?.removeAllRanges(), i?.addRange(I), w?.focus(), T(), e.target.value = "";
1265
+ const u = window.getSelection();
1266
+ let x = u && u.rangeCount ? u.getRangeAt(0) : null;
1267
+ const m = document.createElement("img");
1268
+ m.src = i, m.alt = r.name || "image", m.className = "rte-inserted-image", m.contentEditable = "true";
1269
+ const y = N();
1270
+ if (!x || !y) {
1271
+ y == null || y.appendChild(m);
1272
+ const Me = document.createTextNode(" ");
1273
+ y == null || y.appendChild(Me);
1274
+ const we = document.createRange();
1275
+ we.setStartAfter(Me), we.collapse(!0), u == null || u.removeAllRanges(), u == null || u.addRange(we), y == null || y.focus(), M(), e.target.value = "";
1249
1276
  return;
1250
1277
  }
1251
- m.deleteContents(), m.insertNode(d);
1252
- const E = document.createTextNode(" ");
1253
- d.after(E);
1254
- const b = document.createRange();
1255
- b.setStartAfter(E), b.collapse(!0), i.removeAllRanges(), i.addRange(b), w.focus(), T(), e.target.value = "";
1256
- }, r.readAsDataURL(o);
1257
- }, te = (e) => {
1278
+ x.deleteContents(), x.insertNode(m);
1279
+ const g = document.createTextNode(" ");
1280
+ m.after(g);
1281
+ const j = document.createRange();
1282
+ j.setStartAfter(g), j.collapse(!0), u.removeAllRanges(), u.addRange(j), y.focus(), M(), e.target.value = "";
1283
+ }, o.readAsDataURL(r);
1284
+ }, ne = (e) => {
1285
+ var p;
1258
1286
  $();
1259
- const o = window.getSelection();
1260
- if (!o?.rangeCount) return;
1261
- const r = o.getRangeAt(0), l = document.createTextNode(e);
1262
- r.insertNode(l), r.setStartAfter(l), r.collapse(!0), o.removeAllRanges(), o.addRange(r), z()?.focus(), T();
1287
+ const r = window.getSelection();
1288
+ if (!(r != null && r.rangeCount)) return;
1289
+ const o = r.getRangeAt(0), l = document.createTextNode(e);
1290
+ o.insertNode(l), o.setStartAfter(l), o.collapse(!0), r.removeAllRanges(), r.addRange(o), (p = N()) == null || p.focus(), M();
1263
1291
  }, ve = () => {
1264
1292
  $();
1265
1293
  const e = document.createElement("table");
1266
1294
  e.style.borderCollapse = "collapse", e.style.width = "100%", e.style.border = "1px solid #ccc", e.style.margin = "8px 0", e.style.position = "relative";
1267
- const o = document.createElement("thead"), r = document.createElement("tbody"), l = document.createElement("tr"), g = document.createElement("tr");
1268
- for (let d = 0; d < 2; d++) {
1269
- const w = document.createElement("th");
1270
- w.textContent = `Header ${d + 1}`, w.style.border = "1px solid #999", w.style.padding = "8px", w.style.position = "relative";
1271
- const E = document.createElement("td");
1272
- E.textContent = `Row 1 Col ${d + 1}`, E.style.border = "1px solid #999", E.style.padding = "8px", E.style.position = "relative", xe(w), xe(E), l.appendChild(w), g.appendChild(E);
1295
+ const r = document.createElement("thead"), o = document.createElement("tbody"), l = document.createElement("tr"), p = document.createElement("tr");
1296
+ for (let x = 0; x < 2; x++) {
1297
+ const m = document.createElement("th");
1298
+ m.textContent = `Header ${x + 1}`, m.style.border = "1px solid #999", m.style.padding = "8px", m.style.position = "relative";
1299
+ const y = document.createElement("td");
1300
+ y.textContent = `Row 1 Col ${x + 1}`, y.style.border = "1px solid #999", y.style.padding = "8px", y.style.position = "relative", xe(m), xe(y), l.appendChild(m), p.appendChild(y);
1273
1301
  }
1274
- o.appendChild(l), r.appendChild(g), e.appendChild(o), e.appendChild(r), Me(e), Se(e);
1302
+ r.appendChild(l), o.appendChild(p), e.appendChild(r), e.appendChild(o), qe(e), Ve(e);
1275
1303
  const i = window.getSelection();
1276
- if (!i?.rangeCount) return;
1277
- i.getRangeAt(0).insertNode(e), T();
1278
- }, Se = (e) => {
1279
- const o = document.createElement("div");
1280
- Object.assign(o.style, {
1304
+ if (!(i != null && i.rangeCount)) return;
1305
+ i.getRangeAt(0).insertNode(e), M();
1306
+ }, Ve = (e) => {
1307
+ const r = document.createElement("div");
1308
+ Object.assign(r.style, {
1281
1309
  position: "absolute",
1282
1310
  width: "14px",
1283
1311
  height: "14px",
@@ -1288,22 +1316,22 @@ const mt = ({
1288
1316
  zIndex: "20",
1289
1317
  borderRadius: "2px"
1290
1318
  });
1291
- let r = 0, l = 0, g = 0, i = 0;
1292
- o.addEventListener("mousedown", (m) => {
1293
- m.preventDefault(), r = m.clientX, l = m.clientY;
1294
- const d = e.getBoundingClientRect();
1295
- g = d.width, i = d.height;
1296
- const w = (b) => {
1297
- const A = Math.max(100, g + (b.clientX - r)), I = Math.max(60, i + (b.clientY - l));
1298
- e.style.width = `${A}px`, e.style.height = `${I}px`, T();
1299
- }, E = () => {
1300
- document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", E), T();
1319
+ let o = 0, l = 0, p = 0, i = 0;
1320
+ r.addEventListener("mousedown", (u) => {
1321
+ u.preventDefault(), o = u.clientX, l = u.clientY;
1322
+ const x = e.getBoundingClientRect();
1323
+ p = x.width, i = x.height;
1324
+ const m = (g) => {
1325
+ const j = Math.max(100, p + (g.clientX - o)), O = Math.max(60, i + (g.clientY - l));
1326
+ e.style.width = `${j}px`, e.style.height = `${O}px`, M();
1327
+ }, y = () => {
1328
+ document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", y), M();
1301
1329
  };
1302
- document.addEventListener("mousemove", w), document.addEventListener("mouseup", E);
1303
- }), e.appendChild(o);
1330
+ document.addEventListener("mousemove", m), document.addEventListener("mouseup", y);
1331
+ }), e.appendChild(r);
1304
1332
  }, xe = (e) => {
1305
- const o = document.createElement("div"), r = document.createElement("div");
1306
- Object.assign(o.style, {
1333
+ const r = document.createElement("div"), o = document.createElement("div");
1334
+ Object.assign(r.style, {
1307
1335
  position: "absolute",
1308
1336
  right: "0",
1309
1337
  top: "0",
@@ -1312,7 +1340,7 @@ const mt = ({
1312
1340
  cursor: "col-resize",
1313
1341
  background: "rgba(0,0,0,0.15)",
1314
1342
  zIndex: "10"
1315
- }), Object.assign(r.style, {
1343
+ }), Object.assign(o.style, {
1316
1344
  position: "absolute",
1317
1345
  bottom: "0",
1318
1346
  left: "0",
@@ -1321,249 +1349,249 @@ const mt = ({
1321
1349
  cursor: "row-resize",
1322
1350
  background: "rgba(0,0,0,0.15)",
1323
1351
  zIndex: "10"
1324
- }), Te(e, o, r), e.appendChild(o), e.appendChild(r);
1325
- }, Te = (e, o, r) => {
1326
- let l = 0, g = 0, i = 0, m = 0;
1327
- o.addEventListener("mousedown", (b) => {
1328
- b.preventDefault(), l = b.clientX, i = e.offsetWidth, document.addEventListener("mousemove", d), document.addEventListener("mouseup", E);
1329
- }), r.addEventListener("mousedown", (b) => {
1330
- b.preventDefault(), g = b.clientY, m = e.offsetHeight, document.addEventListener("mousemove", w), document.addEventListener("mouseup", E);
1352
+ }), Ye(e, r, o), e.appendChild(r), e.appendChild(o);
1353
+ }, Ye = (e, r, o) => {
1354
+ let l = 0, p = 0, i = 0, u = 0;
1355
+ r.addEventListener("mousedown", (g) => {
1356
+ g.preventDefault(), l = g.clientX, i = e.offsetWidth, document.addEventListener("mousemove", x), document.addEventListener("mouseup", y);
1357
+ }), o.addEventListener("mousedown", (g) => {
1358
+ g.preventDefault(), p = g.clientY, u = e.offsetHeight, document.addEventListener("mousemove", m), document.addEventListener("mouseup", y);
1331
1359
  });
1332
- const d = (b) => {
1333
- const A = i + (b.clientX - l);
1334
- e.style.width = `${Math.max(30, A)}px`;
1335
- }, w = (b) => {
1336
- const A = m + (b.clientY - g);
1337
- e.style.height = `${Math.max(20, A)}px`;
1338
- }, E = () => {
1339
- document.removeEventListener("mousemove", d), document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", E);
1360
+ const x = (g) => {
1361
+ const j = i + (g.clientX - l);
1362
+ e.style.width = `${Math.max(30, j)}px`;
1363
+ }, m = (g) => {
1364
+ const j = u + (g.clientY - p);
1365
+ e.style.height = `${Math.max(20, j)}px`;
1366
+ }, y = () => {
1367
+ document.removeEventListener("mousemove", x), document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", y);
1340
1368
  };
1341
- }, Ne = (e) => {
1342
- const r = e.target.closest("td, th");
1343
- r && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((l) => l.classList.remove("rte-cell-highlight")), r.classList.add("rte-cell-highlight"), f({ visible: !0, x: e.clientX, y: e.clientY, cell: r }));
1344
- }, we = () => {
1369
+ }, Ue = (e) => {
1370
+ const o = e.target.closest("td, th");
1371
+ o && (e.preventDefault(), document.querySelectorAll(".rte-cell-highlight").forEach((l) => l.classList.remove("rte-cell-highlight")), o.classList.add("rte-cell-highlight"), V({ visible: !0, x: e.clientX, y: e.clientY, cell: o }));
1372
+ }, Ce = () => {
1345
1373
  document.querySelectorAll(".rte-cell-highlight").forEach((e) => e.classList.remove("rte-cell-highlight"));
1346
- }, Ae = (e) => {
1347
- if (!D.cell) return;
1348
- const o = D.cell.closest("table"), r = D.cell.cellIndex, l = D.cell.parentElement.rowIndex, g = (i) => {
1349
- const m = i.tagName.toLowerCase(), d = document.createElement(m);
1350
- return d.textContent = i.textContent || "", d.style.cssText = i.style.cssText, xe(d), d;
1374
+ }, We = (e) => {
1375
+ if (!H.cell) return;
1376
+ const r = H.cell.closest("table"), o = H.cell.cellIndex, l = H.cell.parentElement.rowIndex, p = (i) => {
1377
+ const u = i.tagName.toLowerCase(), x = document.createElement(u);
1378
+ return x.textContent = i.textContent || "", x.style.cssText = i.style.cssText, xe(x), x;
1351
1379
  };
1352
1380
  switch (e) {
1353
1381
  case "insertRowAbove": {
1354
- const i = o.rows[l], m = o.insertRow(l);
1355
- Array.from(i.cells).forEach((d) => {
1356
- m.appendChild(g(d));
1382
+ const i = r.rows[l], u = r.insertRow(l);
1383
+ Array.from(i.cells).forEach((x) => {
1384
+ u.appendChild(p(x));
1357
1385
  });
1358
1386
  break;
1359
1387
  }
1360
1388
  case "insertRowBelow": {
1361
- const i = o.rows[l], m = o.insertRow(l + 1);
1362
- Array.from(i.cells).forEach((d) => {
1363
- m.appendChild(g(d));
1389
+ const i = r.rows[l], u = r.insertRow(l + 1);
1390
+ Array.from(i.cells).forEach((x) => {
1391
+ u.appendChild(p(x));
1364
1392
  });
1365
1393
  break;
1366
1394
  }
1367
1395
  case "insertColLeft": {
1368
- Array.from(o.rows).forEach((i) => {
1369
- const m = i.cells[r];
1370
- i.insertBefore(g(m), m);
1396
+ Array.from(r.rows).forEach((i) => {
1397
+ const u = i.cells[o];
1398
+ i.insertBefore(p(u), u);
1371
1399
  });
1372
1400
  break;
1373
1401
  }
1374
1402
  case "insertColRight": {
1375
- Array.from(o.rows).forEach((i) => {
1376
- const m = i.cells[r];
1377
- i.insertBefore(g(m), m.nextSibling);
1403
+ Array.from(r.rows).forEach((i) => {
1404
+ const u = i.cells[o];
1405
+ i.insertBefore(p(u), u.nextSibling);
1378
1406
  });
1379
1407
  break;
1380
1408
  }
1381
1409
  case "deleteRow":
1382
- o.rows.length > 1 && o.deleteRow(l);
1410
+ r.rows.length > 1 && r.deleteRow(l);
1383
1411
  break;
1384
1412
  case "deleteCol":
1385
- Array.from(o.rows).forEach((i) => {
1386
- i.cells[r] && i.deleteCell(r);
1413
+ Array.from(r.rows).forEach((i) => {
1414
+ i.cells[o] && i.deleteCell(o);
1387
1415
  });
1388
1416
  break;
1389
1417
  }
1390
- T(), f({ ...D, visible: !1 }), we();
1391
- }, Me = (e) => {
1392
- const o = e.querySelector("tbody");
1393
- if (!o || o.querySelector("[data-hidden-table-start]")) return;
1394
- const r = document.createElement("span");
1395
- r.textContent = "{{#tableData}}", r.style.display = "none", r.setAttribute("data-hidden-table-start", "true"), o.insertBefore(r, o.firstChild);
1418
+ M(), V(ye(be({}, H), { visible: !1 })), Ce();
1419
+ }, qe = (e) => {
1420
+ const r = e.querySelector("tbody");
1421
+ if (!r || r.querySelector("[data-hidden-table-start]")) return;
1422
+ const o = document.createElement("span");
1423
+ o.textContent = "{{#tableData}}", o.style.display = "none", o.setAttribute("data-hidden-table-start", "true"), r.insertBefore(o, r.firstChild);
1396
1424
  const l = document.createElement("span");
1397
- l.textContent = "{{/tableData}}", l.style.display = "none", l.setAttribute("data-hidden-table-end", "true"), o.appendChild(l);
1398
- }, be = () => {
1399
- const e = z();
1400
- if (!e) return x;
1401
- const o = e.cloneNode(!0);
1402
- return o.querySelectorAll(".rte-cell-highlight").forEach((r) => {
1403
- r.classList.remove("rte-cell-highlight");
1404
- }), o.querySelectorAll("div").forEach((r) => {
1405
- (r.style.cursor === "col-resize" || r.style.cursor === "row-resize" || r.style.cursor === "nwse-resize") && r.remove();
1406
- }), o.innerHTML;
1407
- }, ze = () => {
1408
- se(), G.current = S.current, ae({ url: "", text: "", title: "", target: "_self" }), X(!0);
1409
- }, Oe = (e) => {
1410
- const o = window.getSelection();
1411
- if (!o || !G.current) return;
1412
- o.removeAllRanges(), o.addRange(G.current);
1413
- let r = e.url.trim();
1414
- /^https?:\/\//i.test(r) || (r = "https://" + r);
1425
+ l.textContent = "{{/tableData}}", l.style.display = "none", l.setAttribute("data-hidden-table-end", "true"), r.appendChild(l);
1426
+ }, Re = () => {
1427
+ const e = N();
1428
+ if (!e) return b;
1429
+ const r = e.cloneNode(!0);
1430
+ return r.querySelectorAll(".rte-cell-highlight").forEach((o) => {
1431
+ o.classList.remove("rte-cell-highlight");
1432
+ }), r.querySelectorAll("div").forEach((o) => {
1433
+ (o.style.cursor === "col-resize" || o.style.cursor === "row-resize" || o.style.cursor === "nwse-resize") && o.remove();
1434
+ }), r.innerHTML;
1435
+ }, Xe = () => {
1436
+ ie(), C.current = A.current, le({ url: "", text: "", title: "", target: "_self" }), h(!0);
1437
+ }, Ze = (e) => {
1438
+ const r = window.getSelection();
1439
+ if (!r || !C.current) return;
1440
+ r.removeAllRanges(), r.addRange(C.current);
1441
+ let o = e.url.trim();
1442
+ /^https?:\/\//i.test(o) || (o = "https://" + o);
1415
1443
  const l = document.createElement("a");
1416
- l.href = r, l.style.cursor = "pointer", l.style.outline = "none", l.textContent = e.text || r, l.title = e.title, l.target = e.target, l.contentEditable = "true";
1417
- const g = o.getRangeAt(0);
1418
- g.deleteContents(), g.insertNode(l);
1444
+ l.href = o, l.style.cursor = "pointer", l.style.outline = "none", l.textContent = e.text || o, l.title = e.title, l.target = e.target, l.contentEditable = "true";
1445
+ const p = r.getRangeAt(0);
1446
+ p.deleteContents(), p.insertNode(l);
1419
1447
  const i = document.createTextNode(" ");
1420
1448
  l.after(i);
1421
- const m = document.createRange();
1422
- m.setStartAfter(i), m.collapse(!0), o.removeAllRanges(), o.addRange(m), X(!1), T();
1423
- }, Pe = (e) => {
1424
- const o = e.target;
1425
- if (o.tagName === "A") {
1426
- const r = o;
1449
+ const u = document.createRange();
1450
+ u.setStartAfter(i), u.collapse(!0), r.removeAllRanges(), r.addRange(u), h(!1), M();
1451
+ }, Je = (e) => {
1452
+ const r = e.target;
1453
+ if (r.tagName === "A") {
1454
+ const o = r;
1427
1455
  if (e.ctrlKey || e.metaKey) {
1428
- window.open(r.href, "_blank", "noopener,noreferrer");
1456
+ window.open(o.href, "_blank", "noopener,noreferrer");
1429
1457
  return;
1430
1458
  }
1431
1459
  e.preventDefault();
1432
1460
  const l = document.createRange();
1433
- l.selectNode(r), G.current = l, ae({
1434
- url: r.href,
1435
- text: r.textContent || r.href,
1436
- title: r.title,
1437
- target: r.target
1438
- }), X(!0);
1461
+ l.selectNode(o), C.current = l, le({
1462
+ url: o.href,
1463
+ text: o.textContent || o.href,
1464
+ title: o.title,
1465
+ target: o.target
1466
+ }), h(!0);
1439
1467
  }
1440
- }, De = () => {
1441
- const e = z();
1468
+ }, Ke = () => {
1469
+ const e = N();
1442
1470
  if (!e) return;
1443
- const o = window.getSelection();
1444
- if ((!o || o.rangeCount === 0) && S.current) {
1445
- const b = window.getSelection();
1446
- b?.removeAllRanges(), b?.addRange(S.current);
1447
- }
1448
1471
  const r = window.getSelection();
1449
- if (!r || r.rangeCount === 0) return;
1450
- const l = r.getRangeAt(0);
1472
+ if ((!r || r.rangeCount === 0) && A.current) {
1473
+ const g = window.getSelection();
1474
+ g == null || g.removeAllRanges(), g == null || g.addRange(A.current);
1475
+ }
1476
+ const o = window.getSelection();
1477
+ if (!o || o.rangeCount === 0) return;
1478
+ const l = o.getRangeAt(0);
1451
1479
  $(), document.execCommand("removeFormat", !1);
1452
- const g = l.cloneContents(), i = document.createElement("div");
1453
- i.appendChild(g);
1454
- const m = document.createTreeWalker(
1480
+ const p = l.cloneContents(), i = document.createElement("div");
1481
+ i.appendChild(p);
1482
+ const u = document.createTreeWalker(
1455
1483
  i,
1456
1484
  NodeFilter.SHOW_ELEMENT,
1457
1485
  null
1458
- ), d = [];
1459
- for (; m.nextNode(); ) {
1460
- const b = m.currentNode, A = b.tagName.toUpperCase(), I = b.getAttribute && b.getAttribute("data-mention") !== null;
1461
- A !== "A" && !I && d.push(b);
1486
+ ), x = [];
1487
+ for (; u.nextNode(); ) {
1488
+ const g = u.currentNode, j = g.tagName.toUpperCase(), O = g.getAttribute && g.getAttribute("data-mention") !== null;
1489
+ j !== "A" && !O && x.push(g);
1462
1490
  }
1463
- for (let b = d.length - 1; b >= 0; b--) {
1464
- const A = d[b], I = A.parentNode;
1465
- if (I) {
1466
- for (; A.firstChild; ) I.insertBefore(A.firstChild, A);
1467
- I.removeChild(A);
1491
+ for (let g = x.length - 1; g >= 0; g--) {
1492
+ const j = x[g], O = j.parentNode;
1493
+ if (O) {
1494
+ for (; j.firstChild; ) O.insertBefore(j.firstChild, j);
1495
+ O.removeChild(j);
1468
1496
  }
1469
1497
  }
1470
- i.querySelectorAll("[style]").forEach((b) => b.removeAttribute("style")), l.deleteContents();
1471
- const w = document.createDocumentFragment();
1472
- for (; i.firstChild; ) w.appendChild(i.firstChild);
1473
- l.insertNode(w);
1474
- const E = document.createRange();
1475
- E.setStartAfter(
1498
+ i.querySelectorAll("[style]").forEach((g) => g.removeAttribute("style")), l.deleteContents();
1499
+ const m = document.createDocumentFragment();
1500
+ for (; i.firstChild; ) m.appendChild(i.firstChild);
1501
+ l.insertNode(m);
1502
+ const y = document.createRange();
1503
+ y.setStartAfter(
1476
1504
  l.endContainer.nodeType === Node.TEXT_NODE ? l.endContainer : l.startContainer
1477
- ), E.collapse(!0), r.removeAllRanges(), r.addRange(E), e.normalize(), T();
1505
+ ), y.collapse(!0), o.removeAllRanges(), o.addRange(y), e.normalize(), M();
1478
1506
  };
1479
1507
  return /* @__PURE__ */ a.jsxs(
1480
1508
  "div",
1481
1509
  {
1482
- className: `rte-wrapper ${h?.wrapper || ""}`,
1483
- style: v.wrapper,
1510
+ className: `rte-wrapper ${(f == null ? void 0 : f.wrapper) || ""}`,
1511
+ style: w.wrapper,
1484
1512
  children: [
1485
1513
  /* @__PURE__ */ a.jsxs("div", { style: { flex: 1 }, children: [
1486
1514
  /* @__PURE__ */ a.jsx(
1487
- ut,
1515
+ St,
1488
1516
  {
1489
1517
  exec: n,
1490
- saveSelection: se,
1491
- handleFileChange: V,
1518
+ saveSelection: ie,
1519
+ handleFileChange: Y,
1492
1520
  handleFontSizeChange: (e) => n("fontSize", e.target.value),
1493
1521
  handleFontFamilyChange: (e) => n("fontName", e.target.value),
1494
- insertEmoji: te,
1495
- handleLink: ze,
1496
- removeFormatting: De,
1497
- visibleActions: J,
1498
- className: h.toolbar,
1499
- style: v.toolbar
1522
+ insertEmoji: ne,
1523
+ handleLink: Xe,
1524
+ removeFormatting: Ke,
1525
+ visibleActions: G,
1526
+ className: f.toolbar,
1527
+ style: w.toolbar
1500
1528
  }
1501
1529
  ),
1502
1530
  /* @__PURE__ */ a.jsx(
1503
1531
  "div",
1504
1532
  {
1505
- ref: y,
1506
- className: `rte-editor ${h?.editor || ""}`,
1507
- style: v.editor,
1533
+ ref: R,
1534
+ className: `rte-editor ${(f == null ? void 0 : f.editor) || ""}`,
1535
+ style: w.editor,
1508
1536
  contentEditable: !0,
1509
1537
  suppressContentEditableWarning: !0,
1510
- onInput: j,
1511
- onKeyDown: Z,
1512
- onBeforeInput: ee,
1513
- onContextMenu: Ne,
1514
- onClick: Pe
1538
+ onInput: L,
1539
+ onKeyDown: K,
1540
+ onBeforeInput: te,
1541
+ onContextMenu: Ue,
1542
+ onClick: Je
1515
1543
  }
1516
1544
  ),
1517
1545
  /* @__PURE__ */ a.jsx(
1518
- dt,
1546
+ Tt,
1519
1547
  {
1520
- show: O,
1521
- position: P,
1522
- filtered: q,
1523
- insertMention: _,
1524
- onClose: () => k(!1),
1548
+ show: P,
1549
+ position: D,
1550
+ filtered: X,
1551
+ insertMention: S,
1552
+ onClose: () => T(!1),
1525
1553
  query: ge
1526
1554
  }
1527
1555
  ),
1528
1556
  s && /* @__PURE__ */ a.jsxs(
1529
1557
  "div",
1530
1558
  {
1531
- className: `rte-output ${h?.output || ""}`,
1532
- style: v.output,
1559
+ className: `rte-output ${(f == null ? void 0 : f.output) || ""}`,
1560
+ style: w.output,
1533
1561
  children: [
1534
1562
  /* @__PURE__ */ a.jsx("h4", { children: "Output HTML:" }),
1535
- /* @__PURE__ */ a.jsx("p", { children: x })
1563
+ /* @__PURE__ */ a.jsx("p", { children: b })
1536
1564
  ]
1537
1565
  }
1538
1566
  ),
1539
1567
  /* @__PURE__ */ a.jsx(
1540
- mt,
1568
+ At,
1541
1569
  {
1542
- visible: D.visible,
1543
- x: D.x,
1544
- y: D.y,
1545
- onAction: Ae,
1570
+ visible: H.visible,
1571
+ x: H.x,
1572
+ y: H.y,
1573
+ onAction: We,
1546
1574
  onClose: () => {
1547
- f({ ...D, visible: !1 }), we();
1575
+ V(ye(be({}, H), { visible: !1 })), Ce();
1548
1576
  }
1549
1577
  }
1550
1578
  ),
1551
1579
  /* @__PURE__ */ a.jsx(
1552
- ht,
1580
+ zt,
1553
1581
  {
1554
- visible: M,
1555
- linkData: pe,
1556
- onClose: () => X(!1),
1557
- onInsert: Oe
1582
+ visible: Z,
1583
+ linkData: J,
1584
+ onClose: () => h(!1),
1585
+ onInsert: Ze
1558
1586
  }
1559
1587
  )
1560
1588
  ] }),
1561
- u ? /* @__PURE__ */ a.jsx(
1562
- ft,
1589
+ c ? /* @__PURE__ */ a.jsx(
1590
+ Mt,
1563
1591
  {
1564
- className: h.preview,
1565
- style: v.preview,
1566
- html: be()
1592
+ className: f.preview,
1593
+ style: w.preview,
1594
+ html: Re()
1567
1595
  }
1568
1596
  ) : null
1569
1597
  ]
@@ -1571,7 +1599,7 @@ const mt = ({
1571
1599
  );
1572
1600
  };
1573
1601
  export {
1574
- gt as RichTextEditor,
1575
- ft as RtePreview,
1576
- ut as RteToolbar
1602
+ Pt as RichTextEditor,
1603
+ Mt as RtePreview,
1604
+ St as RteToolbar
1577
1605
  };