@ryzeup/richtexteditor 1.0.27 → 1.0.28

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
@@ -23,11 +23,11 @@ var je = {
23
23
  }, De = i.createContext && /* @__PURE__ */ i.createContext(je), Lt = ["attr", "size", "title"];
24
24
  function xt(r, s) {
25
25
  if (r == null) return {};
26
- var u = Rt(r, s), g, p;
26
+ var u = Rt(r, s), g, h;
27
27
  if (Object.getOwnPropertySymbols) {
28
- var b = Object.getOwnPropertySymbols(r);
29
- for (p = 0; p < b.length; p++)
30
- g = b[p], !(s.indexOf(g) >= 0) && Object.prototype.propertyIsEnumerable.call(r, g) && (u[g] = r[g]);
28
+ var M = Object.getOwnPropertySymbols(r);
29
+ for (h = 0; h < M.length; h++)
30
+ g = M[h], !(s.indexOf(g) >= 0) && Object.prototype.propertyIsEnumerable.call(r, g) && (u[g] = r[g]);
31
31
  }
32
32
  return u;
33
33
  }
@@ -55,8 +55,8 @@ function He(r, s) {
55
55
  var u = Object.keys(r);
56
56
  if (Object.getOwnPropertySymbols) {
57
57
  var g = Object.getOwnPropertySymbols(r);
58
- s && (g = g.filter(function(p) {
59
- return Object.getOwnPropertyDescriptor(r, p).enumerable;
58
+ s && (g = g.filter(function(h) {
59
+ return Object.getOwnPropertyDescriptor(r, h).enumerable;
60
60
  })), u.push.apply(u, g);
61
61
  }
62
62
  return u;
@@ -94,7 +94,7 @@ function Fe(r) {
94
94
  key: u
95
95
  }, s.attr), Fe(s.child)));
96
96
  }
97
- function N(r) {
97
+ function k(r) {
98
98
  return (s) => /* @__PURE__ */ i.createElement(At, ee({
99
99
  attr: te({}, r.attr)
100
100
  }, s), Fe(r.child));
@@ -103,78 +103,78 @@ function At(r) {
103
103
  var s = (u) => {
104
104
  var {
105
105
  attr: g,
106
- size: p,
107
- title: b
108
- } = r, S = xt(r, Lt), T = p || u.size || "1em", E;
109
- return u.className && (E = u.className), r.className && (E = (E ? E + " " : "") + r.className), /* @__PURE__ */ i.createElement("svg", ee({
106
+ size: h,
107
+ title: M
108
+ } = r, L = xt(r, Lt), T = h || u.size || "1em", y;
109
+ return u.className && (y = u.className), r.className && (y = (y ? y + " " : "") + r.className), /* @__PURE__ */ i.createElement("svg", ee({
110
110
  stroke: "currentColor",
111
111
  fill: "currentColor",
112
112
  strokeWidth: "0"
113
- }, u.attr, g, S, {
114
- className: E,
113
+ }, u.attr, g, L, {
114
+ className: y,
115
115
  style: te(te({
116
116
  color: r.color || u.color
117
117
  }, u.style), r.style),
118
118
  height: T,
119
119
  width: T,
120
120
  xmlns: "http://www.w3.org/2000/svg"
121
- }), b && /* @__PURE__ */ i.createElement("title", null, b), r.children);
121
+ }), M && /* @__PURE__ */ i.createElement("title", null, M), r.children);
122
122
  };
123
123
  return De !== void 0 ? /* @__PURE__ */ i.createElement(De.Consumer, null, (u) => s(u)) : s(je);
124
124
  }
125
125
  function Nt(r) {
126
- 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: [] }] })(r);
126
+ return k({ 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: [] }] })(r);
127
127
  }
128
128
  function kt(r) {
129
- 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: [] }] })(r);
129
+ return k({ 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: [] }] })(r);
130
130
  }
131
131
  function zt(r) {
132
- 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: [] }] })(r);
132
+ return k({ 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: [] }] })(r);
133
133
  }
134
134
  function Dt(r) {
135
- 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: [] }] })(r);
135
+ return k({ 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: [] }] })(r);
136
136
  }
137
137
  function Ht(r) {
138
- 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: [] }] })(r);
138
+ return k({ 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: [] }] })(r);
139
139
  }
140
140
  function Ot(r) {
141
- 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: [] }] })(r);
141
+ return k({ 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: [] }] })(r);
142
142
  }
143
143
  function _t(r) {
144
- 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: [] }] })(r);
144
+ return k({ 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: [] }] })(r);
145
145
  }
146
146
  function jt(r) {
147
- 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: [] }] })(r);
147
+ return k({ 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: [] }] })(r);
148
148
  }
149
149
  function Ft(r) {
150
- 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: [] }] })(r);
150
+ return k({ 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: [] }] })(r);
151
151
  }
152
152
  function It(r) {
153
- 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: [] }] })(r);
153
+ return k({ 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: [] }] })(r);
154
154
  }
155
155
  function Pt(r) {
156
- 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: [] }] })(r);
156
+ return k({ 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: [] }] })(r);
157
157
  }
158
158
  function qt(r) {
159
- 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: [] }] })(r);
159
+ return k({ 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: [] }] })(r);
160
160
  }
161
161
  function Bt(r) {
162
- return N({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM56.84,75.58a8,8,0,0,1,3.58-10.74l16-8A8,8,0,0,1,88,64v48a8,8,0,0,1-16,0V76.94l-4.42,2.22A8,8,0,0,1,56.84,75.58ZM92,180a8,8,0,0,1,0,16H68a8,8,0,0,1-6.4-12.8l21.67-28.89A3.92,3.92,0,0,0,84,152a4,4,0,0,0-7.77-1.33,8,8,0,0,1-15.09-5.34,20,20,0,1,1,35,18.53L84,180Zm100,4H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Z" }, child: [] }] })(r);
162
+ return k({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM56.84,75.58a8,8,0,0,1,3.58-10.74l16-8A8,8,0,0,1,88,64v48a8,8,0,0,1-16,0V76.94l-4.42,2.22A8,8,0,0,1,56.84,75.58ZM92,180a8,8,0,0,1,0,16H68a8,8,0,0,1-6.4-12.8l21.67-28.89A3.92,3.92,0,0,0,84,152a4,4,0,0,0-7.77-1.33,8,8,0,0,1-15.09-5.34,20,20,0,1,1,35,18.53L84,180Zm100,4H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Zm0-48H120a8,8,0,0,1,0-16h72a8,8,0,0,1,0,16Z" }, child: [] }] })(r);
163
163
  }
164
164
  function Vt(r) {
165
- return N({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M2 18H9V20H2V18ZM2 11H11V13H2V11ZM2 4H22V6H2V4ZM20.674 13.0251L21.8301 12.634L22.8301 14.366L21.914 15.1711C21.9704 15.4386 22 15.7158 22 16C22 16.2842 21.9704 16.5614 21.914 16.8289L22.8301 17.634L21.8301 19.366L20.674 18.9749C20.2635 19.3441 19.7763 19.6295 19.2391 19.8044L19 21H17L16.7609 19.8044C16.2237 19.6295 15.7365 19.3441 15.326 18.9749L14.1699 19.366L13.1699 17.634L14.086 16.8289C14.0296 16.5614 14 16.2842 14 16C14 15.7158 14.0296 15.4386 14.086 15.1711L13.1699 14.366L14.1699 12.634L15.326 13.0251C15.7365 12.6559 16.2237 12.3705 16.7609 12.1956L17 11H19L19.2391 12.1956C19.7763 12.3705 20.2635 12.6559 20.674 13.0251ZM18 17C18.5523 17 19 16.5523 19 16C19 15.4477 18.5523 15 18 15C17.4477 15 17 15.4477 17 16C17 16.5523 17.4477 17 18 17Z" }, child: [] }] })(r);
165
+ return k({ attr: { viewBox: "0 0 24 24", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M2 18H9V20H2V18ZM2 11H11V13H2V11ZM2 4H22V6H2V4ZM20.674 13.0251L21.8301 12.634L22.8301 14.366L21.914 15.1711C21.9704 15.4386 22 15.7158 22 16C22 16.2842 21.9704 16.5614 21.914 16.8289L22.8301 17.634L21.8301 19.366L20.674 18.9749C20.2635 19.3441 19.7763 19.6295 19.2391 19.8044L19 21H17L16.7609 19.8044C16.2237 19.6295 15.7365 19.3441 15.326 18.9749L14.1699 19.366L13.1699 17.634L14.086 16.8289C14.0296 16.5614 14 16.2842 14 16C14 15.7158 14.0296 15.4386 14.086 15.1711L13.1699 14.366L14.1699 12.634L15.326 13.0251C15.7365 12.6559 16.2237 12.3705 16.7609 12.1956L17 11H19L19.2391 12.1956C19.7763 12.3705 20.2635 12.6559 20.674 13.0251ZM18 17C18.5523 17 19 16.5523 19 16C19 15.4477 18.5523 15 18 15C17.4477 15 17 15.4477 17 16C17 16.5523 17.4477 17 18 17Z" }, child: [] }] })(r);
166
166
  }
167
167
  function Ut(r) {
168
- return N({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 21h-7a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }, { tag: "path", attr: { d: "M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M19.001 15.5v1.5" }, child: [] }, { tag: "path", attr: { d: "M19.001 21v1.5" }, child: [] }, { tag: "path", attr: { d: "M22.032 17.25l-1.299 .75" }, child: [] }, { tag: "path", attr: { d: "M17.27 20l-1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M15.97 17.25l1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M20.733 20l1.3 .75" }, child: [] }] })(r);
168
+ return k({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 21h-7a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }, { tag: "path", attr: { d: "M19.001 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M19.001 15.5v1.5" }, child: [] }, { tag: "path", attr: { d: "M19.001 21v1.5" }, child: [] }, { tag: "path", attr: { d: "M22.032 17.25l-1.299 .75" }, child: [] }, { tag: "path", attr: { d: "M17.27 20l-1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M15.97 17.25l1.3 .75" }, child: [] }, { tag: "path", attr: { d: "M20.733 20l1.3 .75" }, child: [] }] })(r);
169
169
  }
170
170
  function $t(r) {
171
- return N({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }] })(r);
171
+ return k({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" }, child: [] }, { tag: "path", attr: { d: "M3 10h18" }, child: [] }, { tag: "path", attr: { d: "M10 3v18" }, child: [] }] })(r);
172
172
  }
173
173
  function Wt(r) {
174
- 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: [] }] })(r);
174
+ return k({ 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: [] }] })(r);
175
175
  }
176
176
  function Zt(r) {
177
- 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: [] }] })(r);
177
+ return k({ 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: [] }] })(r);
178
178
  }
179
179
  const Xt = [
180
180
  "😀",
@@ -293,32 +293,32 @@ const Xt = [
293
293
  saveSelection: s,
294
294
  handleFileChange: u,
295
295
  handleFontSizeChange: g,
296
- handleFontFamilyChange: p,
296
+ handleFontFamilyChange: h,
297
297
  // insertListBlock,
298
- insertEmoji: b,
299
- handleLink: S,
298
+ insertEmoji: M,
299
+ handleLink: L,
300
300
  removeFormatting: T,
301
- visibleActions: E,
302
- className: w,
303
- style: x
301
+ visibleActions: y,
302
+ className: S,
303
+ style: w
304
304
  }) => {
305
305
  var X, B;
306
- const R = W(null), H = W(null), k = W(null), [O, j] = D(!1), [P, z] = D({
306
+ const x = W(null), P = W(null), A = W(null), [O, _] = D(!1), [H, j] = D({
307
307
  x: 0,
308
308
  y: 0
309
309
  });
310
310
  U(() => {
311
- const f = (L) => {
312
- !L.target.closest(".rte-emoji-popup") && !L.target.closest("button[title='Emoji']") && j(!1);
311
+ const f = (b) => {
312
+ !b.target.closest(".rte-emoji-popup") && !b.target.closest("button[title='Emoji']") && _(!1);
313
313
  };
314
314
  return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
315
315
  }, []);
316
- const _ = (f) => {
316
+ const z = (f) => {
317
317
  var V;
318
318
  f.preventDefault();
319
- const L = f.currentTarget.dataset.command;
320
- if (L)
321
- switch (L) {
319
+ const b = f.currentTarget.dataset.command;
320
+ if (b)
321
+ switch (b) {
322
322
  case "bold":
323
323
  case "italic":
324
324
  case "underline":
@@ -327,20 +327,20 @@ const Xt = [
327
327
  case "insertOrderedList":
328
328
  case "insertStaticOrderedList":
329
329
  case "removeFormat":
330
- r(L);
330
+ r(b);
331
331
  break;
332
332
  case "insertImage": {
333
- (V = R.current) == null || V.click();
333
+ (V = x.current) == null || V.click();
334
334
  break;
335
335
  }
336
336
  default:
337
- console.warn("Unknown command:", L);
337
+ console.warn("Unknown command:", b);
338
338
  }
339
339
  }, $ = (f) => {
340
340
  r("foreColor", f.target.value);
341
341
  }, Z = (f) => {
342
342
  r("backColor", f.target.value);
343
- }, [M, F] = D({
343
+ }, [R, F] = D({
344
344
  bold: !1,
345
345
  italic: !1,
346
346
  underline: !1,
@@ -379,72 +379,72 @@ const Xt = [
379
379
  };
380
380
  return document.addEventListener("selectionchange", f), () => document.removeEventListener("selectionchange", f);
381
381
  }, []), /* @__PURE__ */ i.createElement("div", {
382
- className: `rte-toolbar ${w || ""}`,
383
- style: x
384
- }, E.bold && /* @__PURE__ */ i.createElement("button", {
382
+ className: `rte-toolbar ${S || ""}`,
383
+ style: w
384
+ }, y.bold && /* @__PURE__ */ i.createElement("button", {
385
385
  "data-command": "bold",
386
386
  title: "Bold",
387
- onMouseDown: _,
388
- className: M.bold ? "rte-active" : ""
389
- }, /* @__PURE__ */ i.createElement(Ot, null)), E.italic && /* @__PURE__ */ i.createElement("button", {
387
+ onMouseDown: z,
388
+ className: R.bold ? "rte-active" : ""
389
+ }, /* @__PURE__ */ i.createElement(Ot, null)), y.italic && /* @__PURE__ */ i.createElement("button", {
390
390
  "data-command": "italic",
391
391
  title: "Italic",
392
- onMouseDown: _,
393
- className: M.italic ? "rte-active" : ""
394
- }, /* @__PURE__ */ i.createElement(jt, null)), E.underline && /* @__PURE__ */ i.createElement("button", {
392
+ onMouseDown: z,
393
+ className: R.italic ? "rte-active" : ""
394
+ }, /* @__PURE__ */ i.createElement(jt, null)), y.underline && /* @__PURE__ */ i.createElement("button", {
395
395
  "data-command": "underline",
396
396
  title: "Underline",
397
- onMouseDown: _,
398
- className: M.underline ? "rte-active" : ""
399
- }, /* @__PURE__ */ i.createElement(qt, null)), E.unorderedList && /* @__PURE__ */ i.createElement("button", {
397
+ onMouseDown: z,
398
+ className: R.underline ? "rte-active" : ""
399
+ }, /* @__PURE__ */ i.createElement(qt, null)), y.unorderedList && /* @__PURE__ */ i.createElement("button", {
400
400
  "data-command": "insertUnorderedList",
401
- onMouseDown: _,
401
+ onMouseDown: z,
402
402
  title: "UnorderedList",
403
- className: M.unorderedList ? "rte-active" : ""
404
- }, /* @__PURE__ */ i.createElement(Vt, null)), E.staticUnorderedList && /* @__PURE__ */ i.createElement("button", {
403
+ className: R.unorderedList ? "rte-active" : ""
404
+ }, /* @__PURE__ */ i.createElement(Vt, null)), y.staticUnorderedList && /* @__PURE__ */ i.createElement("button", {
405
405
  "data-command": "insertStaticUnorderedList",
406
- onMouseDown: _,
406
+ onMouseDown: z,
407
407
  title: "StaticUnorderedList",
408
- className: M.unorderedList ? "rte-active" : ""
409
- }, /* @__PURE__ */ i.createElement(It, null)), E.orderedList && /* @__PURE__ */ i.createElement("button", {
408
+ className: R.unorderedList ? "rte-active" : ""
409
+ }, /* @__PURE__ */ i.createElement(It, null)), y.orderedList && /* @__PURE__ */ i.createElement("button", {
410
410
  "data-command": "insertOrderedList",
411
411
  title: "OrderedList",
412
- onMouseDown: _,
413
- className: M.orderedList ? "rte-active" : "",
412
+ onMouseDown: z,
413
+ className: R.orderedList ? "rte-active" : "",
414
414
  style: {
415
415
  fontSize: "medium"
416
416
  }
417
- }, /* @__PURE__ */ i.createElement(Bt, null)), E.staticOrderedList && /* @__PURE__ */ i.createElement("button", {
417
+ }, /* @__PURE__ */ i.createElement(Bt, null)), y.staticOrderedList && /* @__PURE__ */ i.createElement("button", {
418
418
  "data-command": "insertStaticOrderedList",
419
419
  title: "StaticOrderedList",
420
- onMouseDown: _,
421
- className: M.orderedList ? "rte-active" : ""
422
- }, /* @__PURE__ */ i.createElement(Dt, null)), E.link && /* @__PURE__ */ i.createElement("button", {
420
+ onMouseDown: z,
421
+ className: R.orderedList ? "rte-active" : ""
422
+ }, /* @__PURE__ */ i.createElement(Dt, null)), y.link && /* @__PURE__ */ i.createElement("button", {
423
423
  "data-command": "createLink",
424
424
  title: "Link",
425
- onClick: S,
426
- className: M.link ? "rte-active" : ""
427
- }, /* @__PURE__ */ i.createElement(Ft, null)), E.removeFormat && /* @__PURE__ */ i.createElement("button", {
425
+ onClick: L,
426
+ className: R.link ? "rte-active" : ""
427
+ }, /* @__PURE__ */ i.createElement(Ft, null)), y.removeFormat && /* @__PURE__ */ i.createElement("button", {
428
428
  "data-command": "Remove format",
429
429
  title: "removeFormat",
430
430
  onMouseDown: (f) => {
431
431
  f.preventDefault(), s(), T();
432
432
  },
433
- className: M.removeFormat ? "rte-active" : ""
434
- }, /* @__PURE__ */ i.createElement(Zt, null)), E.image && /* @__PURE__ */ i.createElement("button", {
433
+ className: R.removeFormat ? "rte-active" : ""
434
+ }, /* @__PURE__ */ i.createElement(Zt, null)), y.image && /* @__PURE__ */ i.createElement("button", {
435
435
  "data-command": "insertImage",
436
436
  title: "Image",
437
- onMouseDown: _,
438
- className: M.image ? "rte-active" : ""
437
+ onMouseDown: z,
438
+ className: R.image ? "rte-active" : ""
439
439
  }, /* @__PURE__ */ i.createElement(zt, null)), /* @__PURE__ */ i.createElement("input", {
440
440
  type: "file",
441
441
  accept: "image/*",
442
- ref: R,
442
+ ref: x,
443
443
  style: {
444
444
  display: "none"
445
445
  },
446
446
  onChange: u
447
- }), E.emoji && /* @__PURE__ */ i.createElement("div", {
447
+ }), y.emoji && /* @__PURE__ */ i.createElement("div", {
448
448
  style: {
449
449
  position: "relative"
450
450
  }
@@ -452,55 +452,55 @@ const Xt = [
452
452
  title: "Emoji",
453
453
  onMouseDown: (f) => {
454
454
  f.preventDefault(), s();
455
- const L = f.currentTarget.getBoundingClientRect();
456
- z({
457
- x: L.left,
458
- y: L.bottom + 8
455
+ const b = f.currentTarget.getBoundingClientRect();
456
+ j({
457
+ x: b.left,
458
+ y: b.bottom + 8
459
459
  // small spacing
460
- }), j((V) => !V);
460
+ }), _((V) => !V);
461
461
  },
462
- className: M.emoji ? "rte-active" : ""
462
+ className: R.emoji ? "rte-active" : ""
463
463
  }, /* @__PURE__ */ i.createElement(Pt, null)), O && /* @__PURE__ */ bt(/* @__PURE__ */ i.createElement("div", {
464
464
  className: "rte-emoji-popup",
465
465
  style: {
466
- top: P.y,
467
- left: P.x
466
+ top: H.y,
467
+ left: H.x
468
468
  }
469
- }, Xt.map((f, L) => /* @__PURE__ */ i.createElement("span", {
470
- key: L,
469
+ }, Xt.map((f, b) => /* @__PURE__ */ i.createElement("span", {
470
+ key: b,
471
471
  style: {
472
472
  fontSize: "20px",
473
473
  cursor: "pointer",
474
474
  textAlign: "center"
475
475
  },
476
476
  onMouseDown: (V) => {
477
- V.preventDefault(), b(f), j(!1);
477
+ V.preventDefault(), M(f), _(!1);
478
478
  }
479
- }, f))), document.body)), E.color && /* @__PURE__ */ i.createElement("div", {
479
+ }, f))), document.body)), y.color && /* @__PURE__ */ i.createElement("div", {
480
480
  style: {
481
481
  position: "relative"
482
482
  }
483
483
  }, /* @__PURE__ */ i.createElement("button", {
484
484
  title: "Text Color",
485
485
  onMouseDown: (f) => {
486
- var L;
487
- f.preventDefault(), s(), (L = H.current) == null || L.click();
486
+ var b;
487
+ f.preventDefault(), s(), (b = P.current) == null || b.click();
488
488
  },
489
489
  style: {
490
490
  display: "flex",
491
491
  alignItems: "center",
492
492
  justifyContent: "center",
493
- color: ((X = H.current) == null ? void 0 : X.value) || "#000",
493
+ color: ((X = P.current) == null ? void 0 : X.value) || "#000",
494
494
  fontSize: "18px"
495
495
  },
496
- className: M.color ? "rte-active" : ""
496
+ className: R.color ? "rte-active" : ""
497
497
  }, /* @__PURE__ */ i.createElement(Wt, null)), /* @__PURE__ */ i.createElement("input", {
498
- ref: H,
498
+ ref: P,
499
499
  type: "color",
500
500
  defaultValue: "#000000",
501
501
  onChange: (f) => {
502
- var L;
503
- $(f), ((L = f.target.parentElement) == null ? void 0 : L.querySelector("button")).style.color = f.target.value;
502
+ var b;
503
+ $(f), ((b = f.target.parentElement) == null ? void 0 : b.querySelector("button")).style.color = f.target.value;
504
504
  },
505
505
  style: {
506
506
  position: "absolute",
@@ -509,30 +509,30 @@ const Xt = [
509
509
  height: 0,
510
510
  pointerEvents: "none"
511
511
  }
512
- })), E.highlight && /* @__PURE__ */ i.createElement("div", {
512
+ })), y.highlight && /* @__PURE__ */ i.createElement("div", {
513
513
  style: {
514
514
  position: "relative"
515
515
  }
516
516
  }, /* @__PURE__ */ i.createElement("button", {
517
517
  title: "Highlight",
518
518
  onMouseDown: (f) => {
519
- var L;
520
- f.preventDefault(), s(), (L = k.current) == null || L.click();
519
+ var b;
520
+ f.preventDefault(), s(), (b = A.current) == null || b.click();
521
521
  },
522
522
  style: {
523
523
  display: "flex",
524
524
  alignItems: "center",
525
525
  justifyContent: "center",
526
- color: ((B = k.current) == null ? void 0 : B.value) || "#000",
526
+ color: ((B = A.current) == null ? void 0 : B.value) || "#000",
527
527
  fontSize: "18px"
528
528
  },
529
- className: M.highlight ? "rte-active" : ""
529
+ className: R.highlight ? "rte-active" : ""
530
530
  }, /* @__PURE__ */ i.createElement(_t, null)), /* @__PURE__ */ i.createElement("input", {
531
- ref: k,
531
+ ref: A,
532
532
  type: "color",
533
533
  onChange: (f) => {
534
- var L;
535
- Z(f), ((L = f.target.parentElement) == null ? void 0 : L.querySelector("button")).style.color = f.target.value;
534
+ var b;
535
+ Z(f), ((b = f.target.parentElement) == null ? void 0 : b.querySelector("button")).style.color = f.target.value;
536
536
  },
537
537
  defaultValue: "#000000",
538
538
  style: {
@@ -542,42 +542,42 @@ const Xt = [
542
542
  height: 0,
543
543
  pointerEvents: "none"
544
544
  }
545
- })), E.align && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("button", {
545
+ })), y.align && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("button", {
546
546
  title: "Align Left",
547
547
  onMouseDown: (f) => f.preventDefault(),
548
548
  onClick: () => r("justifyLeft"),
549
- className: M.alignLeft ? "rte-active" : ""
549
+ className: R.alignLeft ? "rte-active" : ""
550
550
  }, /* @__PURE__ */ i.createElement(Ht, null)), /* @__PURE__ */ i.createElement("button", {
551
551
  title: "Align Center",
552
552
  onMouseDown: (f) => f.preventDefault(),
553
553
  onClick: () => r("justifyCenter"),
554
- className: M.alignCenter ? "rte-active" : ""
554
+ className: R.alignCenter ? "rte-active" : ""
555
555
  }, /* @__PURE__ */ i.createElement(Nt, null)), /* @__PURE__ */ i.createElement("button", {
556
556
  title: "Align Right",
557
557
  onMouseDown: (f) => f.preventDefault(),
558
558
  onClick: () => r("justifyRight"),
559
- className: M.alignRight ? "rte-active" : ""
560
- }, /* @__PURE__ */ i.createElement(kt, null))), E.table && /* @__PURE__ */ i.createElement("button", {
559
+ className: R.alignRight ? "rte-active" : ""
560
+ }, /* @__PURE__ */ i.createElement(kt, null))), y.table && /* @__PURE__ */ i.createElement("button", {
561
561
  title: "Insert Dynamic Table",
562
562
  onMouseDown: (f) => f.preventDefault(),
563
563
  onClick: () => r("insertTable"),
564
- className: M.table ? "rte-active" : "",
564
+ className: R.table ? "rte-active" : "",
565
565
  style: {
566
566
  fontSize: "medium"
567
567
  }
568
- }, /* @__PURE__ */ i.createElement(Ut, null)), E.table && /* @__PURE__ */ i.createElement("button", {
568
+ }, /* @__PURE__ */ i.createElement(Ut, null)), y.table && /* @__PURE__ */ i.createElement("button", {
569
569
  title: "Insert Static Table",
570
570
  onMouseDown: (f) => f.preventDefault(),
571
571
  onClick: () => r("insertStaticTable"),
572
- className: M.table ? "rte-active" : "",
572
+ className: R.table ? "rte-active" : "",
573
573
  style: {
574
574
  fontSize: "medium"
575
575
  }
576
- }, /* @__PURE__ */ i.createElement($t, null)), E.fontFamily && /* @__PURE__ */ i.createElement("select", {
576
+ }, /* @__PURE__ */ i.createElement($t, null)), y.fontFamily && /* @__PURE__ */ i.createElement("select", {
577
577
  className: "rte-dropdown",
578
578
  defaultValue: "",
579
579
  onMouseDown: () => s(),
580
- onChange: p
580
+ onChange: h
581
581
  }, /* @__PURE__ */ i.createElement("option", {
582
582
  value: "",
583
583
  disabled: !0
@@ -591,7 +591,7 @@ const Xt = [
591
591
  value: "Courier New"
592
592
  }, "Courier New"), /* @__PURE__ */ i.createElement("option", {
593
593
  value: "Verdana"
594
- }, "Verdana")), E.fontSize && /* @__PURE__ */ i.createElement("select", {
594
+ }, "Verdana")), y.fontSize && /* @__PURE__ */ i.createElement("select", {
595
595
  className: "rte-dropdown rte-fontsize-dropdown",
596
596
  defaultValue: "",
597
597
  onMouseDown: () => s(),
@@ -601,7 +601,7 @@ const Xt = [
601
601
  disabled: !0
602
602
  }, "Font Size"), Array.from({
603
603
  length: 16
604
- }, (f, L) => 10 + L).map((f) => /* @__PURE__ */ i.createElement("option", {
604
+ }, (f, b) => 10 + b).map((f) => /* @__PURE__ */ i.createElement("option", {
605
605
  key: f,
606
606
  value: f
607
607
  }, f, "px"))));
@@ -610,71 +610,71 @@ const Xt = [
610
610
  position: s,
611
611
  filtered: u,
612
612
  insertMention: g,
613
- onClose: p,
614
- query: b
613
+ onClose: h,
614
+ query: M
615
615
  }) => {
616
- const S = W(null), [T, E] = D(0);
616
+ const L = W(null), [T, y] = D(0);
617
617
  return U(() => {
618
- r && E(0);
618
+ r && y(0);
619
619
  }, [r]), U(() => {
620
- const w = (x) => {
621
- S.current && !S.current.contains(x.target) && p();
620
+ const S = (w) => {
621
+ L.current && !L.current.contains(w.target) && h();
622
622
  };
623
- return r && document.addEventListener("mousedown", w), () => {
624
- document.removeEventListener("mousedown", w);
623
+ return r && document.addEventListener("mousedown", S), () => {
624
+ document.removeEventListener("mousedown", S);
625
625
  };
626
- }, [r, p]), U(() => {
626
+ }, [r, h]), U(() => {
627
627
  if (!r) return;
628
- const w = (x) => {
629
- if (!(!r || u.length === 0) && (x.key === "ArrowDown" && (x.preventDefault(), E((R) => Math.min(R + 1, u.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), E((R) => Math.max(R - 1, 0))), x.key === "Enter")) {
630
- x.preventDefault();
631
- const R = u[T];
632
- R && g(R);
628
+ const S = (w) => {
629
+ if (!(!r || u.length === 0) && (w.key === "ArrowDown" && (w.preventDefault(), y((x) => Math.min(x + 1, u.length - 1))), w.key === "ArrowUp" && (w.preventDefault(), y((x) => Math.max(x - 1, 0))), w.key === "Enter")) {
630
+ w.preventDefault();
631
+ const x = u[T];
632
+ x && g(x);
633
633
  }
634
634
  };
635
- return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
635
+ return window.addEventListener("keydown", S), () => window.removeEventListener("keydown", S);
636
636
  }, [r, u, T]), U(() => {
637
- if (!S.current) return;
638
- const x = S.current.querySelectorAll("li")[T];
639
- x && x.scrollIntoView({
637
+ if (!L.current) return;
638
+ const w = L.current.querySelectorAll("li")[T];
639
+ w && w.scrollIntoView({
640
640
  block: "nearest",
641
641
  behavior: "smooth"
642
642
  });
643
643
  }, [T]), r ? /* @__PURE__ */ i.createElement("ul", {
644
- ref: S,
644
+ ref: L,
645
645
  className: "rte-popup",
646
646
  style: {
647
647
  top: s.y,
648
648
  left: s.x
649
649
  }
650
650
  }, u.length > 0 ? u.map(({
651
- name: w,
652
- value: x
653
- }, R) => {
654
- const H = w.toLowerCase(), k = b.toLowerCase(), O = H.indexOf(k);
655
- let j = w;
656
- if (O !== -1 && b.length > 0) {
657
- const P = O + b.length;
658
- j = w.substring(0, O) + `<span class="rte-highlight">${w.substring(O, P)}</span>` + w.substring(P);
651
+ name: S,
652
+ value: w
653
+ }, x) => {
654
+ const P = S.toLowerCase(), A = M.toLowerCase(), O = P.indexOf(A);
655
+ let _ = S;
656
+ if (O !== -1 && M.length > 0) {
657
+ const H = O + M.length;
658
+ _ = S.substring(0, O) + `<span class="rte-highlight">${S.substring(O, H)}</span>` + S.substring(H);
659
659
  }
660
660
  return /* @__PURE__ */ i.createElement("li", {
661
- key: x,
662
- onMouseDown: (P) => {
663
- P.preventDefault(), g({
664
- name: w,
665
- value: x
661
+ key: w,
662
+ onMouseDown: (H) => {
663
+ H.preventDefault(), g({
664
+ name: S,
665
+ value: w
666
666
  });
667
667
  },
668
668
  style: {
669
669
  padding: "6px 12px",
670
670
  cursor: "pointer",
671
671
  fontSize: "14px",
672
- background: R === T ? "#dce8ff" : "white"
672
+ background: x === T ? "#dce8ff" : "white"
673
673
  },
674
674
  dangerouslySetInnerHTML: {
675
- __html: j
675
+ __html: _
676
676
  },
677
- onMouseEnter: () => E(R)
677
+ onMouseEnter: () => y(x)
678
678
  });
679
679
  }) : /* @__PURE__ */ i.createElement("li", {
680
680
  style: {
@@ -684,27 +684,27 @@ const Xt = [
684
684
  }, "No matches")) : null;
685
685
  };
686
686
  function Oe(r) {
687
- 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: [] }] }] }] })(r);
687
+ return k({ 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: [] }] }] }] })(r);
688
688
  }
689
689
  function G(r) {
690
- 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: [] }] }] }] })(r);
690
+ return k({ 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: [] }] }] }] })(r);
691
691
  }
692
692
  const Qt = ({
693
693
  visible: r,
694
694
  x: s,
695
695
  y: u,
696
696
  onAction: g,
697
- onClose: p
697
+ onClose: h
698
698
  }) => {
699
699
  if (!r) return null;
700
- const b = {
700
+ const M = {
701
701
  top: u,
702
702
  left: s
703
703
  };
704
704
  return /* @__PURE__ */ i.createElement("div", {
705
- style: b,
705
+ style: M,
706
706
  className: "rte-table-menu",
707
- onMouseLeave: p
707
+ onMouseLeave: h
708
708
  }, /* @__PURE__ */ i.createElement("button", {
709
709
  onClick: () => g("insertRowAbove")
710
710
  }, /* @__PURE__ */ i.createElement(G, null), " Insert row above"), /* @__PURE__ */ i.createElement("button", {
@@ -723,62 +723,62 @@ const Qt = ({
723
723
  className: s,
724
724
  style: u
725
725
  }) => {
726
- const g = (b) => {
727
- const S = b.target;
728
- if (S.tagName === "A") {
729
- b.preventDefault();
730
- const T = S.href;
731
- T && window.open(T, "_blank", "noopener,noreferrer");
726
+ const g = (L) => {
727
+ const T = L.target;
728
+ if (T.tagName === "A") {
729
+ L.preventDefault();
730
+ const y = T.href;
731
+ y && window.open(y, "_blank", "noopener,noreferrer");
732
732
  }
733
- }, p = (b) => {
734
- const S = document.createElement("div");
735
- S.innerHTML = b;
736
- const T = document.createTreeWalker(S, NodeFilter.SHOW_TEXT, null), E = [];
737
- for (; T.nextNode(); ) {
738
- const w = T.currentNode;
739
- w.nodeValue && /{{\s*[\s\S]*?\s*}}/.test(w.nodeValue) && E.push(w);
733
+ }, h = (L) => L === "rgb(0, 0, 0)" || L === "rgba(0, 0, 0, 1)" || L === "#000" || L === "#000000" || L === "black", M = (L) => {
734
+ const T = document.createElement("div");
735
+ T.innerHTML = L;
736
+ const y = document.createTreeWalker(T, NodeFilter.SHOW_TEXT, null), S = [];
737
+ for (; y.nextNode(); ) {
738
+ const w = y.currentNode;
739
+ w.nodeValue && /{{\s*[\s\S]*?\s*}}/.test(w.nodeValue) && S.push(w);
740
740
  }
741
- return E.forEach((w) => {
742
- var P;
743
- const x = w.nodeValue || "", R = w.parentElement;
744
- if (!R) return;
745
- let H = R, k = !1;
746
- for (; H; ) {
747
- if (H.tagName === "FONT" && H.getAttribute("color")) {
748
- k = !0;
741
+ return S.forEach((w) => {
742
+ var j;
743
+ const x = w.nodeValue || "", P = w.parentElement;
744
+ if (!P) return;
745
+ let A = P, O = !1;
746
+ for (; A; ) {
747
+ if (A.tagName === "FONT" && A.getAttribute("color")) {
748
+ O = !0;
749
749
  break;
750
750
  }
751
- const z = (P = H.style) == null ? void 0 : P.color;
752
- if (z && z !== "") {
753
- k = !0;
751
+ const z = (j = A.style) == null ? void 0 : j.color;
752
+ if (z && !h(z)) {
753
+ O = !0;
754
754
  break;
755
755
  }
756
- const _ = window.getComputedStyle(H);
757
- if (_.color && _.color !== "rgb(0, 0, 0)" && _.color !== "rgba(0, 0, 0, 0)") {
758
- k = !0;
756
+ const $ = window.getComputedStyle(A);
757
+ if ($.color && !h($.color)) {
758
+ O = !0;
759
759
  break;
760
760
  }
761
- H = H.parentElement;
761
+ A = A.parentElement;
762
762
  }
763
- const O = document.createDocumentFragment();
764
- let j = 0;
765
- x.replace(/{{\s*([\s\S]*?)\s*}}/g, (z, _, $) => {
766
- if ($ > j && O.appendChild(document.createTextNode(x.slice(j, $))), k)
767
- O.appendChild(document.createTextNode(z));
763
+ const _ = document.createDocumentFragment();
764
+ let H = 0;
765
+ x.replace(/{{\s*([\s\S]*?)\s*}}/g, (z, $, Z) => {
766
+ if (Z > H && _.appendChild(document.createTextNode(x.slice(H, Z))), O)
767
+ _.appendChild(document.createTextNode(z));
768
768
  else {
769
- const Z = document.createElement("span");
770
- Z.style.color = "blue", Z.textContent = z, O.appendChild(Z);
769
+ const R = document.createElement("span");
770
+ R.style.color = "blue", R.textContent = z, _.appendChild(R);
771
771
  }
772
- return j = $ + z.length, z;
773
- }), j < x.length && O.appendChild(document.createTextNode(x.slice(j))), R.replaceChild(O, w);
774
- }), S.innerHTML = S.innerHTML.replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, ""), S.innerHTML;
772
+ return H = Z + z.length, z;
773
+ }), H < x.length && _.appendChild(document.createTextNode(x.slice(H))), P.replaceChild(_, w);
774
+ }), T.innerHTML = T.innerHTML.replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, ""), T.innerHTML;
775
775
  };
776
776
  return /* @__PURE__ */ i.createElement("div", {
777
777
  className: `rte-preview ${s || ""}`,
778
778
  style: u,
779
779
  onClick: g,
780
780
  dangerouslySetInnerHTML: {
781
- __html: p(r)
781
+ __html: M(r)
782
782
  }
783
783
  });
784
784
  }, Gt = ({
@@ -787,16 +787,16 @@ const Qt = ({
787
787
  onClose: u,
788
788
  onInsert: g
789
789
  }) => {
790
- const [p, b] = D(""), [S, T] = D(""), [E, w] = D(""), [x, R] = D("_self");
790
+ const [h, M] = D(""), [L, T] = D(""), [y, S] = D(""), [w, x] = D("_self");
791
791
  if (U(() => {
792
- r ? (b(s.url || ""), T(s.text || ""), w(s.title || ""), R(s.target || "_self")) : (b(""), T(""), w(""), R("_self"));
792
+ r ? (M(s.url || ""), T(s.text || ""), S(s.title || ""), x(s.target || "_self")) : (M(""), T(""), S(""), x("_self"));
793
793
  }, [r, s]), !r) return null;
794
- const H = () => {
794
+ const P = () => {
795
795
  g({
796
- url: p,
797
- text: S,
798
- title: E,
799
- target: x
796
+ url: h,
797
+ text: L,
798
+ title: y,
799
+ target: w
800
800
  });
801
801
  };
802
802
  return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("div", {
@@ -806,28 +806,28 @@ const Qt = ({
806
806
  className: "rte-link-modal"
807
807
  }, /* @__PURE__ */ i.createElement("h4", {
808
808
  className: "rte-link-modal__title"
809
- }, p ? "Edit Link" : "Insert Link"), /* @__PURE__ */ i.createElement("input", {
809
+ }, h ? "Edit Link" : "Insert Link"), /* @__PURE__ */ i.createElement("input", {
810
810
  type: "text",
811
811
  className: "rte-link-modal__input",
812
812
  placeholder: "URL",
813
- value: p,
814
- onChange: (k) => b(k.target.value)
813
+ value: h,
814
+ onChange: (A) => M(A.target.value)
815
815
  }), /* @__PURE__ */ i.createElement("input", {
816
816
  type: "text",
817
817
  className: "rte-link-modal__input",
818
818
  placeholder: "Text to Display",
819
- value: S,
820
- onChange: (k) => T(k.target.value)
819
+ value: L,
820
+ onChange: (A) => T(A.target.value)
821
821
  }), /* @__PURE__ */ i.createElement("input", {
822
822
  type: "text",
823
823
  className: "rte-link-modal__input",
824
824
  placeholder: "Title",
825
- value: E,
826
- onChange: (k) => w(k.target.value)
825
+ value: y,
826
+ onChange: (A) => S(A.target.value)
827
827
  }), /* @__PURE__ */ i.createElement("select", {
828
828
  className: "rte-link-modal__select",
829
- value: x,
830
- onChange: (k) => R(k.target.value)
829
+ value: w,
830
+ onChange: (A) => x(A.target.value)
831
831
  }, /* @__PURE__ */ i.createElement("option", {
832
832
  value: "_self"
833
833
  }, "Same tab"), /* @__PURE__ */ i.createElement("option", {
@@ -839,7 +839,7 @@ const Qt = ({
839
839
  onClick: u
840
840
  }, "Cancel"), /* @__PURE__ */ i.createElement("button", {
841
841
  className: "rte-link-modal__btn rte-link-modal__btn--ok",
842
- onClick: H
842
+ onClick: P
843
843
  }, "OK"))));
844
844
  };
845
845
  function _e(r) {
@@ -869,27 +869,27 @@ const rn = ({
869
869
  staticUnorderedList: !1,
870
870
  staticOrderedList: !1
871
871
  },
872
- classNames: p = {},
873
- styles: b = {},
874
- handleGetHtml: S = () => {
872
+ classNames: h = {},
873
+ styles: M = {},
874
+ handleGetHtml: L = () => {
875
875
  },
876
876
  onChange: T = () => {
877
877
  },
878
- value: E,
879
- onMentionSelect: w = () => {
878
+ value: y,
879
+ onMentionSelect: S = () => {
880
880
  },
881
- handleAddAttributes: x = () => {
881
+ handleAddAttributes: w = () => {
882
882
  }
883
883
  }) => {
884
884
  var Ee, we, Ce, be, Le, xe, Re, Se, Me, Te, Ae, Ne;
885
- const R = W(null), [H, k] = D(E != null && E.length ? E : " "), [O, j] = D(""), [P, z] = D(!1), [_, $] = D({
885
+ const x = W(null), [P, A] = D(y != null && y.length ? y : " "), [O, _] = D(""), [H, j] = D(!1), [z, $] = D({
886
886
  x: 0,
887
887
  y: 0
888
- }), [Z, M] = D([]), F = W(null), X = W(null), [B, f] = D({
888
+ }), [Z, R] = D([]), F = W(null), X = W(null), [B, f] = D({
889
889
  visible: !1,
890
890
  x: 0,
891
891
  y: 0
892
- }), [L, V] = D(!1), J = W(null), [Ie, de] = D({
892
+ }), [b, V] = D(!1), J = W(null), [Ie, de] = D({
893
893
  url: "",
894
894
  text: "",
895
895
  title: "",
@@ -912,21 +912,21 @@ const rn = ({
912
912
  fontFamily: (Te = g.fontFamily) != null ? Te : !1,
913
913
  fontSize: (Ae = g.fontSize) != null ? Ae : !1,
914
914
  highlight: (Ne = g.fontSize) != null ? Ne : !1
915
- }, [qe, ne] = D(""), [ue, re] = D([]), q = () => R.current, A = () => {
915
+ }, [qe, ne] = D(""), [ue, re] = D([]), q = () => x.current, N = () => {
916
916
  const e = Be(), t = /^<div[^>]*style=["'][^"']*font-size\s*:\s*\d+px[^"']*["'][^>]*>/.test(e.trim());
917
917
  let n = e;
918
- t || (n = `<div style="font-size:12px">${e}</div>`), n = n.replace(/<(ul|ol)([^>]*)>[\s\S]*?<\/\1>/g, (o, h, y) => {
919
- if (/list-type=["']static["']/.test(y) || o.includes("data-hidden-array-start") || o.includes("data-hidden-array-end")) return o;
920
- const m = `<${h}${y}>`, c = '<span data-hidden-array-start="true" style="display:none">{{#arrayData}}</span>', v = '<span data-hidden-array-end="true" style="display:none">{{/arrayData}}</span>', C = `</${h}>`, I = o.replace(new RegExp(`^${m}`), "").replace(new RegExp(`${C}$`), "");
918
+ t || (n = `<div style="font-size:12px">${e}</div>`), n = n.replace(/<(ul|ol)([^>]*)>[\s\S]*?<\/\1>/g, (o, p, E) => {
919
+ if (/list-type=["']static["']/.test(E) || o.includes("data-hidden-array-start") || o.includes("data-hidden-array-end")) return o;
920
+ const m = `<${p}${E}>`, c = '<span data-hidden-array-start="true" style="display:none">{{#arrayData}}</span>', v = '<span data-hidden-array-end="true" style="display:none">{{/arrayData}}</span>', C = `</${p}>`, I = o.replace(new RegExp(`^${m}`), "").replace(new RegExp(`${C}$`), "");
921
921
  return `${m}${c}${I}${v}${C}`;
922
- }), j(n), S == null || S(n);
922
+ }), _(n), L == null || L(n);
923
923
  const a = ct(e);
924
924
  T(a);
925
925
  const d = Ye(), l = _e(d);
926
- JSON.stringify(l) !== JSON.stringify(ue) && (re(l), w(l));
926
+ JSON.stringify(l) !== JSON.stringify(ue) && (re(l), S(l));
927
927
  }, Be = () => {
928
928
  const e = q();
929
- if (!e) return H;
929
+ if (!e) return P;
930
930
  const t = e.cloneNode(!0);
931
931
  t.querySelectorAll("table div").forEach((a) => a.remove()), t.querySelectorAll("table").forEach((a) => {
932
932
  a.removeAttribute("data-has-resize-handle");
@@ -950,19 +950,19 @@ const rn = ({
950
950
  !e || !F.current || (e.removeAllRanges(), e.addRange(F.current));
951
951
  }, me = (e, t) => {
952
952
  const n = window.getSelection();
953
- n && n.rangeCount > 0 && (F.current = n.getRangeAt(0)), Y(), document.execCommand(e, !1, t), A();
953
+ n && n.rangeCount > 0 && (F.current = n.getRangeAt(0)), Y(), document.execCommand(e, !1, t), N();
954
954
  };
955
955
  U(() => {
956
956
  const e = q();
957
- if (!e || !E) return;
958
- const t = Ue(E);
959
- e.innerHTML = t, A();
957
+ if (!e || !y) return;
958
+ const t = Ue(y);
959
+ e.innerHTML = t, N();
960
960
  }, []);
961
961
  const Ue = (e) => e.replace(/(<table[\s\S]*?>[\s\S]*?<\/table>)/g, (t) => t.replace(/{{#arrayData}}/g, "").replace(/{{\/arrayData}}/g, ""));
962
962
  U(() => () => {
963
963
  document.removeEventListener("mousemove", null), document.removeEventListener("mouseup", null);
964
964
  }, []), U(() => {
965
- x && x((e) => {
965
+ w && w((e) => {
966
966
  Ke(e);
967
967
  });
968
968
  }, []), U(() => {
@@ -982,7 +982,7 @@ const rn = ({
982
982
  if (!(n != null && n.rangeCount)) return;
983
983
  const a = n.getRangeAt(0), d = ge(a.startContainer);
984
984
  let l, o;
985
- const h = t === "insertStaticUnorderedList" || t === "insertStaticOrderedList";
985
+ const p = t === "insertStaticUnorderedList" || t === "insertStaticOrderedList";
986
986
  if (d) {
987
987
  let c = d.querySelector(e);
988
988
  c || (c = document.createElement(e), c.style.margin = "0", c.style.paddingLeft = "20px", d.appendChild(c)), o = c, l = document.createElement("li"), l.textContent = "​", o.appendChild(l);
@@ -990,10 +990,10 @@ const rn = ({
990
990
  document.execCommand(e === "ul" ? "insertUnorderedList" : "insertOrderedList");
991
991
  const c = q();
992
992
  if (o = c == null ? void 0 : c.querySelector(`${e}:last-child`), !o) return;
993
- h && o.setAttribute("list-type", "static"), l = o.querySelector("li:last-child");
993
+ p && o.setAttribute("list-type", "static"), l = o.querySelector("li:last-child");
994
994
  }
995
- const y = document.createRange();
996
- y.setStart(l, 0), y.collapse(!0), n.removeAllRanges(), n.addRange(y), (m = q()) == null || m.focus(), A();
995
+ const E = document.createRange();
996
+ E.setStart(l, 0), E.collapse(!0), n.removeAllRanges(), n.addRange(E), (m = q()) == null || m.focus(), N();
997
997
  }, ae = (e, t) => {
998
998
  e === "insertOrderedList" || e === "insertStaticOrderedList" ? fe("ol", e) : e === "insertUnorderedList" || e === "insertStaticUnorderedList" ? fe("ul", e) : e.startsWith("justify") ? dt(e) : me(e, t), e === "insertTable" && pe(), e === "insertStaticTable" && pe("insertStaticTable");
999
999
  }, $e = (e) => {
@@ -1003,7 +1003,7 @@ const rn = ({
1003
1003
  t.remove(), $({
1004
1004
  x: n.left,
1005
1005
  y: n.bottom + window.scrollY
1006
- }), M(r || []), z(!0), X.current = e.cloneRange();
1006
+ }), R(r || []), j(!0), X.current = e.cloneRange();
1007
1007
  }, We = () => {
1008
1008
  const e = window.getSelection();
1009
1009
  if (!e || e.rangeCount === 0) return null;
@@ -1015,8 +1015,8 @@ const rn = ({
1015
1015
  if (a.nodeType === Node.TEXT_NODE) {
1016
1016
  const d = a.textContent || "", l = a === t ? n : d.length, o = d.lastIndexOf("@", l - 1);
1017
1017
  if (o !== -1) {
1018
- const h = document.createRange();
1019
- return h.setStart(a, o), h.setEnd(a, l), h;
1018
+ const p = document.createRange();
1019
+ return p.setStart(a, o), p.setEnd(a, l), p;
1020
1020
  }
1021
1021
  }
1022
1022
  a = a.previousSibling;
@@ -1038,15 +1038,15 @@ const rn = ({
1038
1038
  const m = document.createRange(), c = q();
1039
1039
  m.selectNodeContents(c), m.collapse(!1), m.insertNode(a);
1040
1040
  }
1041
- const h = document.createTextNode("​");
1042
- a.after(h);
1043
- const y = document.createRange();
1044
- y.setStartAfter(h), y.collapse(!0), t.removeAllRanges(), t.addRange(y);
1041
+ const p = document.createTextNode("​");
1042
+ a.after(p);
1043
+ const E = document.createRange();
1044
+ E.setStartAfter(p), E.collapse(!0), t.removeAllRanges(), t.addRange(E);
1045
1045
  } catch (o) {
1046
1046
  console.error("insertMention error:", o);
1047
1047
  }
1048
1048
  let d = _e([...ue, e]);
1049
- re(d), w(d), z(!1), (l = q()) == null || l.focus(), A();
1049
+ re(d), S(d), j(!1), (l = q()) == null || l.focus(), N();
1050
1050
  }, Xe = (e) => {
1051
1051
  const t = q();
1052
1052
  if (!t) return;
@@ -1064,8 +1064,8 @@ const rn = ({
1064
1064
  }, Ke = (e) => {
1065
1065
  e.forEach((t) => Xe(t)), re((t) => {
1066
1066
  const n = [...t, ...e], a = Array.from(new Map(n.map((d) => [d.name, d])).values());
1067
- return w(a), a;
1068
- }), A();
1067
+ return S(a), a;
1068
+ }), N();
1069
1069
  }, Ye = () => {
1070
1070
  const e = q();
1071
1071
  if (!e) return [];
@@ -1085,9 +1085,9 @@ const rn = ({
1085
1085
  if (!o) return;
1086
1086
  if (((n = o.textContent) == null ? void 0 : n.replace(/\u200B/g, "").trim()) === "") {
1087
1087
  e.preventDefault();
1088
- const y = o.parentElement, m = y == null ? void 0 : y.closest("li");
1088
+ const E = o.parentElement, m = E == null ? void 0 : E.closest("li");
1089
1089
  if (m) {
1090
- y == null || y.removeChild(o);
1090
+ E == null || E.removeChild(o);
1091
1091
  const c = document.createElement("p");
1092
1092
  c.innerHTML = "<br />", (a = m.parentElement) == null || a.insertBefore(c, m.nextSibling);
1093
1093
  const v = document.createRange();
@@ -1101,7 +1101,7 @@ const rn = ({
1101
1101
  C.setStart(v, 0), C.collapse(!0), l == null || l.removeAllRanges(), l == null || l.addRange(C);
1102
1102
  }
1103
1103
  }
1104
- A();
1104
+ N();
1105
1105
  }
1106
1106
  }
1107
1107
  if (t === "backspace" || t === "delete") {
@@ -1123,11 +1123,11 @@ const rn = ({
1123
1123
  if (oe(a))
1124
1124
  return;
1125
1125
  setTimeout(() => {
1126
- $e(n.getRangeAt(0)), ne(""), M(r), z(!0);
1126
+ $e(n.getRangeAt(0)), ne(""), R(r), j(!0);
1127
1127
  }, 0);
1128
1128
  return;
1129
1129
  }
1130
- if (P) {
1130
+ if (H) {
1131
1131
  setTimeout(() => he(), 0);
1132
1132
  return;
1133
1133
  }
@@ -1140,24 +1140,24 @@ const rn = ({
1140
1140
  }
1141
1141
  return !1;
1142
1142
  }, he = () => {
1143
- A();
1143
+ N();
1144
1144
  const e = window.getSelection();
1145
1145
  if (!e || !e.anchorNode) return;
1146
1146
  if (oe(e.anchorNode)) {
1147
- z(!1);
1147
+ j(!1);
1148
1148
  return;
1149
1149
  }
1150
1150
  let t = e.anchorNode.textContent || "";
1151
1151
  t = t.replace(/\u00A0/g, " ");
1152
1152
  const n = t.match(/@([^\n]*)$/);
1153
1153
  if (!n) {
1154
- z(!1);
1154
+ j(!1);
1155
1155
  return;
1156
1156
  }
1157
1157
  const a = n[1].trim().toLowerCase();
1158
1158
  ne(a);
1159
1159
  const d = r.filter((l) => l.name.toLowerCase().includes(a));
1160
- d.length > 0 ? (M(d), z(!0)) : z(!1);
1160
+ d.length > 0 ? (R(d), j(!0)) : j(!1);
1161
1161
  }, Ge = (e) => {
1162
1162
  var a;
1163
1163
  const t = (a = e.target.files) == null ? void 0 : a[0];
@@ -1168,23 +1168,23 @@ const rn = ({
1168
1168
  const l = (C = d.target) == null ? void 0 : C.result;
1169
1169
  Y();
1170
1170
  const o = window.getSelection();
1171
- let h = o && o.rangeCount ? o.getRangeAt(0) : null;
1172
- const y = document.createElement("img");
1173
- y.src = l, y.alt = t.name || "image", y.className = "rte-inserted-image", y.contentEditable = "true";
1171
+ let p = o && o.rangeCount ? o.getRangeAt(0) : null;
1172
+ const E = document.createElement("img");
1173
+ E.src = l, E.alt = t.name || "image", E.className = "rte-inserted-image", E.contentEditable = "true";
1174
1174
  const m = q();
1175
- if (!h || !m) {
1176
- m == null || m.appendChild(y);
1175
+ if (!p || !m) {
1176
+ m == null || m.appendChild(E);
1177
1177
  const I = document.createTextNode(" ");
1178
1178
  m == null || m.appendChild(I);
1179
1179
  const ie = document.createRange();
1180
- ie.setStartAfter(I), ie.collapse(!0), o == null || o.removeAllRanges(), o == null || o.addRange(ie), m == null || m.focus(), A(), e.target.value = "";
1180
+ ie.setStartAfter(I), ie.collapse(!0), o == null || o.removeAllRanges(), o == null || o.addRange(ie), m == null || m.focus(), N(), e.target.value = "";
1181
1181
  return;
1182
1182
  }
1183
- h.deleteContents(), h.insertNode(y);
1183
+ p.deleteContents(), p.insertNode(E);
1184
1184
  const c = document.createTextNode(" ");
1185
- y.after(c);
1185
+ E.after(c);
1186
1186
  const v = document.createRange();
1187
- v.setStartAfter(c), v.collapse(!0), o.removeAllRanges(), o.addRange(v), m.focus(), A(), e.target.value = "";
1187
+ v.setStartAfter(c), v.collapse(!0), o.removeAllRanges(), o.addRange(v), m.focus(), N(), e.target.value = "";
1188
1188
  }, n.readAsDataURL(t);
1189
1189
  }, et = (e) => {
1190
1190
  var d;
@@ -1192,35 +1192,35 @@ const rn = ({
1192
1192
  const t = window.getSelection();
1193
1193
  if (!(t != null && t.rangeCount)) return;
1194
1194
  const n = t.getRangeAt(0), a = document.createTextNode(e);
1195
- n.insertNode(a), n.setStartAfter(a), n.collapse(!0), t.removeAllRanges(), t.addRange(n), (d = q()) == null || d.focus(), A();
1195
+ n.insertNode(a), n.setStartAfter(a), n.collapse(!0), t.removeAllRanges(), t.addRange(n), (d = q()) == null || d.focus(), N();
1196
1196
  }, pe = (e) => {
1197
1197
  var c;
1198
1198
  ft(), Y();
1199
1199
  const t = document.createElement("table");
1200
- t.style.borderCollapse = "collapse", t.style.width = "100%", t.style.border = "1px solid #ccc", t.style.margin = "8px 0", t.style.position = "relative", t.style.textAlign = "center", p.table && t.classList.add(p.table);
1200
+ t.style.borderCollapse = "collapse", t.style.width = "100%", t.style.border = "1px solid #ccc", t.style.margin = "8px 0", t.style.position = "relative", t.style.textAlign = "center", h.table && t.classList.add(h.table);
1201
1201
  const n = document.createElement("thead");
1202
- p.thead && n.classList.add(p.thead);
1202
+ h.thead && n.classList.add(h.thead);
1203
1203
  const a = document.createElement("tbody");
1204
- p.tbody && a.classList.add(p.tbody), e === "insertStaticTable" && a.setAttribute("table-type", "static");
1204
+ h.tbody && a.classList.add(h.tbody), e === "insertStaticTable" && a.setAttribute("table-type", "static");
1205
1205
  const d = document.createElement("tr");
1206
- p.tr && d.classList.add(p.tr);
1206
+ h.tr && d.classList.add(h.tr);
1207
1207
  const l = document.createElement("tr");
1208
- p.tr && l.classList.add(p.tr);
1208
+ h.tr && l.classList.add(h.tr);
1209
1209
  for (let v = 0; v < 2; v++) {
1210
1210
  const C = document.createElement("th");
1211
- C.textContent = "", C.style.border = "1px solid #999", C.style.padding = "4px", C.style.position = "relative", C.style.backgroundColor = "lightgray", C.style.height = "20px", p.th && C.classList.add(p.th);
1211
+ C.textContent = "", C.style.border = "1px solid #999", C.style.padding = "4px", C.style.position = "relative", C.style.backgroundColor = "lightgray", C.style.height = "20px", h.th && C.classList.add(h.th);
1212
1212
  const I = document.createElement("td");
1213
- I.textContent = "", I.style.border = "1px solid #999", I.style.padding = "4px", I.style.position = "relative", I.style.backgroundColor = "#fff", I.style.height = "20px", p.td && I.classList.add(p.td), Q(C), Q(I), d.appendChild(C), l.appendChild(I);
1213
+ I.textContent = "", I.style.border = "1px solid #999", I.style.padding = "4px", I.style.position = "relative", I.style.backgroundColor = "#fff", I.style.height = "20px", h.td && I.classList.add(h.td), Q(C), Q(I), d.appendChild(C), l.appendChild(I);
1214
1214
  }
1215
1215
  n.appendChild(d), a.appendChild(l), t.appendChild(n), t.appendChild(a), le(t);
1216
1216
  const o = window.getSelection();
1217
1217
  if (!(o != null && o.rangeCount)) return;
1218
- const h = o.getRangeAt(0);
1219
- h.collapse(!1), h.insertNode(t);
1220
- const y = document.createElement("p");
1221
- y.innerHTML = "<br/>", t.after(y);
1218
+ const p = o.getRangeAt(0);
1219
+ p.collapse(!1), p.insertNode(t);
1220
+ const E = document.createElement("p");
1221
+ E.innerHTML = "<br/>", t.after(E);
1222
1222
  const m = document.createRange();
1223
- m.setStart(y, 0), m.collapse(!0), o.removeAllRanges(), o.addRange(m), (c = q()) == null || c.focus(), A();
1223
+ m.setStart(E, 0), m.collapse(!0), o.removeAllRanges(), o.addRange(m), (c = q()) == null || c.focus(), N();
1224
1224
  }, le = (e) => {
1225
1225
  if (e.dataset.hasResizeHandle === "true") return;
1226
1226
  const t = document.createElement("div");
@@ -1238,15 +1238,15 @@ const rn = ({
1238
1238
  let n = 0, a = 0, d = 0, l = 0;
1239
1239
  t.addEventListener("mousedown", (o) => {
1240
1240
  o.preventDefault(), n = o.clientX, a = o.clientY;
1241
- const h = e.getBoundingClientRect();
1242
- d = h.width, l = h.height;
1243
- const y = (c) => {
1241
+ const p = e.getBoundingClientRect();
1242
+ d = p.width, l = p.height;
1243
+ const E = (c) => {
1244
1244
  const v = Math.max(100, d + (c.clientX - n)), C = Math.max(20, l + (c.clientY - a));
1245
- e.style.width = `${v}px`, e.style.height = `${C}px`, A();
1245
+ e.style.width = `${v}px`, e.style.height = `${C}px`, N();
1246
1246
  }, m = () => {
1247
- document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", m), A();
1247
+ document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", m), N();
1248
1248
  };
1249
- document.addEventListener("mousemove", y), document.addEventListener("mouseup", m);
1249
+ document.addEventListener("mousemove", E), document.addEventListener("mouseup", m);
1250
1250
  }), e.appendChild(t);
1251
1251
  }, Q = (e) => {
1252
1252
  const t = document.createElement("div"), n = document.createElement("div");
@@ -1278,18 +1278,18 @@ const rn = ({
1278
1278
  }, tt = (e, t, n) => {
1279
1279
  let a = 0, d = 0, l = 0, o = 0;
1280
1280
  t.addEventListener("mousedown", (c) => {
1281
- c.preventDefault(), a = c.clientX, l = e.offsetWidth, document.addEventListener("mousemove", h), document.addEventListener("mouseup", m);
1281
+ c.preventDefault(), a = c.clientX, l = e.offsetWidth, document.addEventListener("mousemove", p), document.addEventListener("mouseup", m);
1282
1282
  }), n.addEventListener("mousedown", (c) => {
1283
- c.preventDefault(), d = c.clientY, o = e.offsetHeight, document.addEventListener("mousemove", y), document.addEventListener("mouseup", m);
1283
+ c.preventDefault(), d = c.clientY, o = e.offsetHeight, document.addEventListener("mousemove", E), document.addEventListener("mouseup", m);
1284
1284
  });
1285
- const h = (c) => {
1285
+ const p = (c) => {
1286
1286
  const v = l + (c.clientX - a);
1287
- e.style.width = `${Math.max(30, v)}px`, A();
1288
- }, y = (c) => {
1287
+ e.style.width = `${Math.max(30, v)}px`, N();
1288
+ }, E = (c) => {
1289
1289
  const v = o + (c.clientY - d);
1290
- e.style.height = `${Math.max(20, v)}px`, A();
1290
+ e.style.height = `${Math.max(20, v)}px`, N();
1291
1291
  }, m = () => {
1292
- document.removeEventListener("mousemove", h), document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", m), A();
1292
+ document.removeEventListener("mousemove", p), document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", m), N();
1293
1293
  };
1294
1294
  }, nt = (e) => {
1295
1295
  const n = e.target.closest("td, th");
@@ -1304,21 +1304,21 @@ const rn = ({
1304
1304
  }, rt = (e) => {
1305
1305
  if (!B.cell) return;
1306
1306
  const t = B.cell.closest("table"), n = B.cell.cellIndex, a = B.cell.parentElement.rowIndex, d = (l) => {
1307
- const o = l.tagName.toLowerCase(), h = document.createElement(o);
1308
- return h.textContent = "", h.style.cssText = l.style.cssText, Q(h), h;
1307
+ const o = l.tagName.toLowerCase(), p = document.createElement(o);
1308
+ return p.textContent = "", p.style.cssText = l.style.cssText, Q(p), p;
1309
1309
  };
1310
1310
  switch (e) {
1311
1311
  case "insertRowAbove": {
1312
1312
  const l = t.rows[a], o = t.insertRow(a);
1313
- Array.from(l.cells).forEach((h) => {
1314
- o.appendChild(d(h));
1313
+ Array.from(l.cells).forEach((p) => {
1314
+ o.appendChild(d(p));
1315
1315
  });
1316
1316
  break;
1317
1317
  }
1318
1318
  case "insertRowBelow": {
1319
1319
  const l = t.rows[a], o = t.insertRow(a + 1);
1320
- Array.from(l.cells).forEach((h) => {
1321
- o.appendChild(d(h));
1320
+ Array.from(l.cells).forEach((p) => {
1321
+ o.appendChild(d(p));
1322
1322
  });
1323
1323
  break;
1324
1324
  }
@@ -1345,7 +1345,7 @@ const rn = ({
1345
1345
  });
1346
1346
  break;
1347
1347
  }
1348
- A(), f(se(ce({}, B), {
1348
+ N(), f(se(ce({}, B), {
1349
1349
  visible: !1
1350
1350
  })), ve();
1351
1351
  }, at = () => {
@@ -1368,7 +1368,7 @@ const rn = ({
1368
1368
  const l = document.createTextNode(" ");
1369
1369
  a.after(l);
1370
1370
  const o = document.createRange();
1371
- o.setStartAfter(l), o.collapse(!0), t.removeAllRanges(), t.addRange(o), V(!1), A();
1371
+ o.setStartAfter(l), o.collapse(!0), t.removeAllRanges(), t.addRange(o), V(!1), N();
1372
1372
  }, lt = (e) => {
1373
1373
  const t = e.target;
1374
1374
  if (t.tagName === "A") {
@@ -1400,24 +1400,24 @@ const rn = ({
1400
1400
  Y(), document.execCommand("removeFormat", !1);
1401
1401
  const d = a.cloneContents(), l = document.createElement("div");
1402
1402
  l.appendChild(d);
1403
- const o = document.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, null), h = [];
1403
+ const o = document.createTreeWalker(l, NodeFilter.SHOW_ELEMENT, null), p = [];
1404
1404
  for (; o.nextNode(); ) {
1405
1405
  const c = o.currentNode, v = c.tagName.toUpperCase(), C = c.getAttribute && c.getAttribute("data-mention") !== null;
1406
- v !== "A" && !C && h.push(c);
1406
+ v !== "A" && !C && p.push(c);
1407
1407
  }
1408
- for (let c = h.length - 1; c >= 0; c--) {
1409
- const v = h[c], C = v.parentNode;
1408
+ for (let c = p.length - 1; c >= 0; c--) {
1409
+ const v = p[c], C = v.parentNode;
1410
1410
  if (C) {
1411
1411
  for (; v.firstChild; ) C.insertBefore(v.firstChild, v);
1412
1412
  C.removeChild(v);
1413
1413
  }
1414
1414
  }
1415
1415
  l.querySelectorAll("[style]").forEach((c) => c.removeAttribute("style")), a.deleteContents();
1416
- const y = document.createDocumentFragment();
1417
- for (; l.firstChild; ) y.appendChild(l.firstChild);
1418
- a.insertNode(y);
1416
+ const E = document.createDocumentFragment();
1417
+ for (; l.firstChild; ) E.appendChild(l.firstChild);
1418
+ a.insertNode(E);
1419
1419
  const m = document.createRange();
1420
- m.setStartAfter(a.endContainer.nodeType === Node.TEXT_NODE ? a.endContainer : a.startContainer), m.collapse(!0), n.removeAllRanges(), n.addRange(m), e.normalize(), A();
1420
+ m.setStartAfter(a.endContainer.nodeType === Node.TEXT_NODE ? a.endContainer : a.startContainer), m.collapse(!0), n.removeAllRanges(), n.addRange(m), e.normalize(), N();
1421
1421
  }, ct = (e) => {
1422
1422
  var a;
1423
1423
  let t = e;
@@ -1442,8 +1442,8 @@ const rn = ({
1442
1442
  const t = e.getRangeAt(0);
1443
1443
  if (t.collapsed) {
1444
1444
  let l = t.startContainer, o = l.nodeType === Node.ELEMENT_NODE ? l : l.parentElement;
1445
- const h = o == null ? void 0 : o.closest("td, th");
1446
- return h ? [h] : [];
1445
+ const p = o == null ? void 0 : o.closest("td, th");
1446
+ return p ? [p] : [];
1447
1447
  }
1448
1448
  const n = t.commonAncestorContainer, a = n.nodeType === Node.ELEMENT_NODE ? n : n.parentElement;
1449
1449
  return Array.from(a.querySelectorAll("td, th")).filter((l) => {
@@ -1460,7 +1460,7 @@ const rn = ({
1460
1460
  let n = "left";
1461
1461
  e === "justifyCenter" && (n = "center"), e === "justifyRight" && (n = "right"), t.forEach((a) => {
1462
1462
  a.style.textAlign = n;
1463
- }), A();
1463
+ }), N();
1464
1464
  }
1465
1465
  const ut = (e) => {
1466
1466
  e.preventDefault();
@@ -1491,17 +1491,17 @@ const rn = ({
1491
1491
  if (!l || !l.rangeCount) return;
1492
1492
  const o = l.getRangeAt(0);
1493
1493
  o.deleteContents();
1494
- const h = document.createDocumentFragment();
1495
- for (; a.firstChild; ) h.appendChild(a.firstChild);
1496
- o.insertNode(h), o.collapse(!1), l.removeAllRanges(), l.addRange(o);
1497
- const y = R.current;
1498
- y && (y.querySelectorAll("table").forEach((m) => {
1494
+ const p = document.createDocumentFragment();
1495
+ for (; a.firstChild; ) p.appendChild(a.firstChild);
1496
+ o.insertNode(p), o.collapse(!1), l.removeAllRanges(), l.addRange(o);
1497
+ const E = x.current;
1498
+ E && (E.querySelectorAll("table").forEach((m) => {
1499
1499
  const c = m;
1500
1500
  c.hasAttribute("data-has-resize-handle") || (le(c), c.querySelectorAll("th, td").forEach((v) => {
1501
1501
  const C = v;
1502
1502
  C.dataset.hasResizeHandles || Q(C);
1503
1503
  }));
1504
- }), A());
1504
+ }), N());
1505
1505
  }, mt = (e) => {
1506
1506
  Y();
1507
1507
  const t = window.getSelection();
@@ -1509,7 +1509,7 @@ const rn = ({
1509
1509
  const n = t.getRangeAt(0), a = document.createElement("span");
1510
1510
  a.style.fontSize = `${e}px`, a.appendChild(n.extractContents()), n.insertNode(a);
1511
1511
  const d = document.createRange();
1512
- d.setStartAfter(a), d.collapse(!0), t.removeAllRanges(), t.addRange(d), A();
1512
+ d.setStartAfter(a), d.collapse(!0), t.removeAllRanges(), t.addRange(d), N();
1513
1513
  }, gt = () => {
1514
1514
  const e = window.getSelection();
1515
1515
  if (!e || !e.anchorNode) return null;
@@ -1538,10 +1538,10 @@ const rn = ({
1538
1538
  y: d.bottom + window.scrollY
1539
1539
  }), ne(n.toLowerCase());
1540
1540
  const l = r.filter((o) => o.name.toLowerCase().includes(n.toLowerCase()));
1541
- M(l), z(!0), X.current = t.cloneRange();
1541
+ R(l), j(!0), X.current = t.cloneRange();
1542
1542
  };
1543
1543
  function ft() {
1544
- const e = R.current;
1544
+ const e = x.current;
1545
1545
  if (!e) return;
1546
1546
  const t = window.getSelection();
1547
1547
  if (!t || t.rangeCount > 0 && e.contains(t.anchorNode))
@@ -1551,19 +1551,19 @@ const rn = ({
1551
1551
  }
1552
1552
  const ht = (e) => {
1553
1553
  const t = e.target;
1554
- if (!t || !(t.textContent || "").match(/{{([\s\S]+?)}}/) || !R.current) return;
1554
+ if (!t || !(t.textContent || "").match(/{{([\s\S]+?)}}/) || !x.current) return;
1555
1555
  let l = t.firstChild;
1556
1556
  if ((!l || l.nodeType !== Node.TEXT_NODE) && (l = t.childNodes[0]), !l || l.nodeType !== Node.TEXT_NODE) return;
1557
- const o = l.textContent || "", h = o.indexOf("{{"), y = o.indexOf("}}");
1558
- if (h === -1 || y === -1) return;
1557
+ const o = l.textContent || "", p = o.indexOf("{{"), E = o.indexOf("}}");
1558
+ if (p === -1 || E === -1) return;
1559
1559
  const m = window.getSelection();
1560
1560
  if (!m) return;
1561
1561
  const c = document.createRange();
1562
- c.setStart(l, h), c.setEnd(l, y + 2), m.removeAllRanges(), m.addRange(c);
1562
+ c.setStart(l, p), c.setEnd(l, E + 2), m.removeAllRanges(), m.addRange(c);
1563
1563
  };
1564
1564
  return /* @__PURE__ */ i.createElement("div", {
1565
- className: `rte-wrapper ${(p == null ? void 0 : p.wrapper) || ""}`,
1566
- style: b.wrapper
1565
+ className: `rte-wrapper ${(h == null ? void 0 : h.wrapper) || ""}`,
1566
+ style: M.wrapper
1567
1567
  }, /* @__PURE__ */ i.createElement("div", {
1568
1568
  style: {
1569
1569
  flex: 1
@@ -1578,13 +1578,13 @@ const rn = ({
1578
1578
  handleLink: at,
1579
1579
  removeFormatting: it,
1580
1580
  visibleActions: Pe,
1581
- className: p.toolbar,
1582
- style: b.toolbar
1581
+ className: h.toolbar,
1582
+ style: M.toolbar
1583
1583
  }), /* @__PURE__ */ i.createElement("div", {
1584
- ref: R,
1584
+ ref: x,
1585
1585
  id: "rte-editor-body",
1586
- className: `rte-editor ${(p == null ? void 0 : p.editor) || ""}`,
1587
- style: b.editor,
1586
+ className: `rte-editor ${(h == null ? void 0 : h.editor) || ""}`,
1587
+ style: M.editor,
1588
1588
  contentEditable: !0,
1589
1589
  suppressContentEditableWarning: !0,
1590
1590
  onPaste: ut,
@@ -1603,15 +1603,15 @@ const rn = ({
1603
1603
  },
1604
1604
  onDoubleClick: ht
1605
1605
  }), /* @__PURE__ */ i.createElement(Yt, {
1606
- show: P,
1607
- position: _,
1606
+ show: H,
1607
+ position: z,
1608
1608
  filtered: Z,
1609
1609
  insertMention: Ze,
1610
- onClose: () => z(!1),
1610
+ onClose: () => j(!1),
1611
1611
  query: qe
1612
1612
  }), s && /* @__PURE__ */ i.createElement("div", {
1613
- className: `rte-output ${(p == null ? void 0 : p.output) || ""}`,
1614
- style: b.output
1613
+ className: `rte-output ${(h == null ? void 0 : h.output) || ""}`,
1614
+ style: M.output
1615
1615
  }, /* @__PURE__ */ i.createElement("h4", null, "Output HTML:"), /* @__PURE__ */ i.createElement("p", null, O)), /* @__PURE__ */ i.createElement(Qt, {
1616
1616
  visible: B.visible,
1617
1617
  x: B.x,
@@ -1623,13 +1623,13 @@ const rn = ({
1623
1623
  })), ve();
1624
1624
  }
1625
1625
  }), /* @__PURE__ */ i.createElement(Gt, {
1626
- visible: L,
1626
+ visible: b,
1627
1627
  linkData: Ie,
1628
1628
  onClose: () => V(!1),
1629
1629
  onInsert: ot
1630
1630
  })), u ? /* @__PURE__ */ i.createElement(Jt, {
1631
- className: p.preview,
1632
- style: b.preview,
1631
+ className: h.preview,
1632
+ style: M.preview,
1633
1633
  html: O
1634
1634
  }) : null);
1635
1635
  };