sykpcomposer 0.0.22 → 0.0.23

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,16 +1,16 @@
1
1
  import * as He from "react";
2
- import je, { createContext as Jo, useContext as Ho, useMemo as Et, useLayoutEffect as on, useEffect as pe, useRef as Xt, useState as Z, Suspense as Dl, useCallback as ri, forwardRef as Yo } from "react";
2
+ import je, { createContext as Jo, useContext as Ho, useMemo as Nt, useLayoutEffect as on, useEffect as pe, useRef as Xt, useState as Z, Suspense as Dl, useCallback as ri, forwardRef as Yo } from "react";
3
3
  import { flushSync as Rl, createPortal as qo } from "react-dom";
4
- var Or = { exports: {} }, _t = {};
4
+ var Or = { exports: {} }, yt = {};
5
5
  /*
6
6
  object-assign
7
7
  (c) Sindre Sorhus
8
8
  @license MIT
9
9
  */
10
- var mr, Ki;
10
+ var _r, Ki;
11
11
  function Go() {
12
12
  if (Ki)
13
- return mr;
13
+ return _r;
14
14
  Ki = 1;
15
15
  var n = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
16
16
  function r(o) {
@@ -40,7 +40,7 @@ function Go() {
40
40
  return !1;
41
41
  }
42
42
  }
43
- return mr = i() ? Object.assign : function(o, s) {
43
+ return _r = i() ? Object.assign : function(o, s) {
44
44
  for (var l, a = r(o), c, u = 1; u < arguments.length; u++) {
45
45
  l = Object(arguments[u]);
46
46
  for (var d in l)
@@ -52,7 +52,7 @@ function Go() {
52
52
  }
53
53
  }
54
54
  return a;
55
- }, mr;
55
+ }, _r;
56
56
  }
57
57
  /** @license React v17.0.2
58
58
  * react-jsx-runtime.production.min.js
@@ -65,12 +65,12 @@ function Go() {
65
65
  var Ui;
66
66
  function Al() {
67
67
  if (Ui)
68
- return _t;
68
+ return yt;
69
69
  Ui = 1, Go();
70
70
  var n = je, e = 60103;
71
- if (_t.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
71
+ if (yt.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
72
72
  var t = Symbol.for;
73
- e = t("react.element"), _t.Fragment = t("react.fragment");
73
+ e = t("react.element"), yt.Fragment = t("react.fragment");
74
74
  }
75
75
  var r = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = Object.prototype.hasOwnProperty, o = { key: !0, ref: !0, __self: !0, __source: !0 };
76
76
  function s(l, a, c) {
@@ -83,9 +83,9 @@ function Al() {
83
83
  d[u] === void 0 && (d[u] = a[u]);
84
84
  return { $$typeof: e, type: l, key: f, ref: h, props: d, _owner: r.current };
85
85
  }
86
- return _t.jsx = s, _t.jsxs = s, _t;
86
+ return yt.jsx = s, yt.jsxs = s, yt;
87
87
  }
88
- var _r = {};
88
+ var mr = {};
89
89
  /** @license React v17.0.2
90
90
  * react-jsx-runtime.development.js
91
91
  *
@@ -100,10 +100,10 @@ function Ll() {
100
100
  process.env.NODE_ENV !== "production" && function() {
101
101
  var e = je, t = Go(), r = 60103, i = 60106;
102
102
  n.Fragment = 60107;
103
- var o = 60108, s = 60114, l = 60109, a = 60110, c = 60112, u = 60113, d = 60120, f = 60115, h = 60116, g = 60121, m = 60122, _ = 60117, x = 60129, v = 60131;
103
+ var o = 60108, s = 60114, l = 60109, a = 60110, c = 60112, u = 60113, d = 60120, f = 60115, h = 60116, g = 60121, _ = 60122, m = 60117, x = 60129, v = 60131;
104
104
  if (typeof Symbol == "function" && Symbol.for) {
105
105
  var y = Symbol.for;
106
- r = y("react.element"), i = y("react.portal"), n.Fragment = y("react.fragment"), o = y("react.strict_mode"), s = y("react.profiler"), l = y("react.provider"), a = y("react.context"), c = y("react.forward_ref"), u = y("react.suspense"), d = y("react.suspense_list"), f = y("react.memo"), h = y("react.lazy"), g = y("react.block"), m = y("react.server.block"), _ = y("react.fundamental"), y("react.scope"), y("react.opaque.id"), x = y("react.debug_trace_mode"), y("react.offscreen"), v = y("react.legacy_hidden");
106
+ r = y("react.element"), i = y("react.portal"), n.Fragment = y("react.fragment"), o = y("react.strict_mode"), s = y("react.profiler"), l = y("react.provider"), a = y("react.context"), c = y("react.forward_ref"), u = y("react.suspense"), d = y("react.suspense_list"), f = y("react.memo"), h = y("react.lazy"), g = y("react.block"), _ = y("react.server.block"), m = y("react.fundamental"), y("react.scope"), y("react.opaque.id"), x = y("react.debug_trace_mode"), y("react.offscreen"), v = y("react.legacy_hidden");
107
107
  }
108
108
  var C = typeof Symbol == "function" && Symbol.iterator, T = "@@iterator";
109
109
  function w(p) {
@@ -124,15 +124,15 @@ function Ll() {
124
124
  {
125
125
  var F = P.ReactDebugCurrentFrame, K = F.getStackAddendum();
126
126
  K !== "" && (N += "%s", A = A.concat([K]));
127
- var U = A.map(function(B) {
128
- return "" + B;
127
+ var U = A.map(function(z) {
128
+ return "" + z;
129
129
  });
130
130
  U.unshift("Warning: " + N), Function.prototype.apply.call(console[p], console, U);
131
131
  }
132
132
  }
133
133
  var j = !1;
134
134
  function M(p) {
135
- return !!(typeof p == "string" || typeof p == "function" || p === n.Fragment || p === s || p === x || p === o || p === u || p === d || p === v || j || typeof p == "object" && p !== null && (p.$$typeof === h || p.$$typeof === f || p.$$typeof === l || p.$$typeof === a || p.$$typeof === c || p.$$typeof === _ || p.$$typeof === g || p[0] === m));
135
+ return !!(typeof p == "string" || typeof p == "function" || p === n.Fragment || p === s || p === x || p === o || p === u || p === d || p === v || j || typeof p == "object" && p !== null && (p.$$typeof === h || p.$$typeof === f || p.$$typeof === l || p.$$typeof === a || p.$$typeof === c || p.$$typeof === m || p.$$typeof === g || p[0] === _));
136
136
  }
137
137
  function Y(p, N, A) {
138
138
  var F = N.displayName || N.name || "";
@@ -187,18 +187,18 @@ function Ll() {
187
187
  }
188
188
  return null;
189
189
  }
190
- var H = 0, se, Oe, We, Lt, It, jt, ft;
191
- function dt() {
192
- }
193
- dt.__reactDisabledLog = !0;
190
+ var H = 0, se, Oe, Be, Lt, It, jt, dt;
194
191
  function ht() {
192
+ }
193
+ ht.__reactDisabledLog = !0;
194
+ function gt() {
195
195
  {
196
196
  if (H === 0) {
197
- se = console.log, Oe = console.info, We = console.warn, Lt = console.error, It = console.group, jt = console.groupCollapsed, ft = console.groupEnd;
197
+ se = console.log, Oe = console.info, Be = console.warn, Lt = console.error, It = console.group, jt = console.groupCollapsed, dt = console.groupEnd;
198
198
  var p = {
199
199
  configurable: !0,
200
200
  enumerable: !0,
201
- value: dt,
201
+ value: ht,
202
202
  writable: !0
203
203
  };
204
204
  Object.defineProperties(console, {
@@ -214,7 +214,7 @@ function Ll() {
214
214
  H++;
215
215
  }
216
216
  }
217
- function gt() {
217
+ function pt() {
218
218
  {
219
219
  if (H--, H === 0) {
220
220
  var p = {
@@ -230,7 +230,7 @@ function Ll() {
230
230
  value: Oe
231
231
  }),
232
232
  warn: t({}, p, {
233
- value: We
233
+ value: Be
234
234
  }),
235
235
  error: t({}, p, {
236
236
  value: Lt
@@ -242,69 +242,69 @@ function Ll() {
242
242
  value: jt
243
243
  }),
244
244
  groupEnd: t({}, p, {
245
- value: ft
245
+ value: dt
246
246
  })
247
247
  });
248
248
  }
249
249
  H < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
250
250
  }
251
251
  }
252
- var me = P.ReactCurrentDispatcher, Ze;
252
+ var _e = P.ReactCurrentDispatcher, Qe;
253
253
  function Se(p, N, A) {
254
254
  {
255
- if (Ze === void 0)
255
+ if (Qe === void 0)
256
256
  try {
257
257
  throw Error();
258
258
  } catch (K) {
259
259
  var F = K.stack.trim().match(/\n( *(at )?)/);
260
- Ze = F && F[1] || "";
260
+ Qe = F && F[1] || "";
261
261
  }
262
262
  return `
263
- ` + Ze + p;
263
+ ` + Qe + p;
264
264
  }
265
265
  }
266
- var Be = !1, Qe;
266
+ var ze = !1, et;
267
267
  {
268
268
  var dl = typeof WeakMap == "function" ? WeakMap : Map;
269
- Qe = new dl();
269
+ et = new dl();
270
270
  }
271
271
  function Oi(p, N) {
272
- if (!p || Be)
272
+ if (!p || ze)
273
273
  return "";
274
274
  {
275
- var A = Qe.get(p);
275
+ var A = et.get(p);
276
276
  if (A !== void 0)
277
277
  return A;
278
278
  }
279
279
  var F;
280
- Be = !0;
280
+ ze = !0;
281
281
  var K = Error.prepareStackTrace;
282
282
  Error.prepareStackTrace = void 0;
283
283
  var U;
284
- U = me.current, me.current = null, ht();
284
+ U = _e.current, _e.current = null, gt();
285
285
  try {
286
286
  if (N) {
287
- var B = function() {
287
+ var z = function() {
288
288
  throw Error();
289
289
  };
290
- if (Object.defineProperty(B.prototype, "props", {
290
+ if (Object.defineProperty(z.prototype, "props", {
291
291
  set: function() {
292
292
  throw Error();
293
293
  }
294
294
  }), typeof Reflect == "object" && Reflect.construct) {
295
295
  try {
296
- Reflect.construct(B, []);
296
+ Reflect.construct(z, []);
297
297
  } catch (Re) {
298
298
  F = Re;
299
299
  }
300
- Reflect.construct(p, [], B);
300
+ Reflect.construct(p, [], z);
301
301
  } else {
302
302
  try {
303
- B.call();
303
+ z.call();
304
304
  } catch (Re) {
305
305
  F = Re;
306
306
  }
307
- p.call(B.prototype);
307
+ p.call(z.prototype);
308
308
  }
309
309
  } else {
310
310
  try {
@@ -316,28 +316,28 @@ function Ll() {
316
316
  }
317
317
  } catch (Re) {
318
318
  if (Re && F && typeof Re.stack == "string") {
319
- for (var W = Re.stack.split(`
319
+ for (var B = Re.stack.split(`
320
320
  `), le = F.stack.split(`
321
- `), G = W.length - 1, X = le.length - 1; G >= 1 && X >= 0 && W[G] !== le[X]; )
321
+ `), G = B.length - 1, X = le.length - 1; G >= 1 && X >= 0 && B[G] !== le[X]; )
322
322
  X--;
323
323
  for (; G >= 1 && X >= 0; G--, X--)
324
- if (W[G] !== le[X]) {
324
+ if (B[G] !== le[X]) {
325
325
  if (G !== 1 || X !== 1)
326
326
  do
327
- if (G--, X--, X < 0 || W[G] !== le[X]) {
327
+ if (G--, X--, X < 0 || B[G] !== le[X]) {
328
328
  var De = `
329
- ` + W[G].replace(" at new ", " at ");
330
- return typeof p == "function" && Qe.set(p, De), De;
329
+ ` + B[G].replace(" at new ", " at ");
330
+ return typeof p == "function" && et.set(p, De), De;
331
331
  }
332
332
  while (G >= 1 && X >= 0);
333
333
  break;
334
334
  }
335
335
  }
336
336
  } finally {
337
- Be = !1, me.current = U, gt(), Error.prepareStackTrace = K;
337
+ ze = !1, _e.current = U, pt(), Error.prepareStackTrace = K;
338
338
  }
339
- var mt = p ? p.displayName || p.name : "", zi = mt ? Se(mt) : "";
340
- return typeof p == "function" && Qe.set(p, zi), zi;
339
+ var mt = p ? p.displayName || p.name : "", Wi = mt ? Se(mt) : "";
340
+ return typeof p == "function" && et.set(p, Wi), Wi;
341
341
  }
342
342
  function Di(p, N, A) {
343
343
  return Oi(p, !1);
@@ -346,7 +346,7 @@ function Ll() {
346
346
  var N = p.prototype;
347
347
  return !!(N && N.isReactComponent);
348
348
  }
349
- function mn(p, N, A) {
349
+ function _n(p, N, A) {
350
350
  if (p == null)
351
351
  return "";
352
352
  if (typeof p == "function")
@@ -364,13 +364,13 @@ function Ll() {
364
364
  case c:
365
365
  return Di(p.render);
366
366
  case f:
367
- return mn(p.type, N, A);
367
+ return _n(p.type, N, A);
368
368
  case g:
369
369
  return Di(p._render);
370
370
  case h: {
371
371
  var F = p, K = F._payload, U = F._init;
372
372
  try {
373
- return mn(U(K), N, A);
373
+ return _n(U(K), N, A);
374
374
  } catch {
375
375
  }
376
376
  }
@@ -378,9 +378,9 @@ function Ll() {
378
378
  return "";
379
379
  }
380
380
  var Ri = {}, Ai = P.ReactDebugCurrentFrame;
381
- function _n(p) {
381
+ function mn(p) {
382
382
  if (p) {
383
- var N = p._owner, A = mn(p.type, p._source, N ? N.type : null);
383
+ var N = p._owner, A = _n(p.type, p._source, N ? N.type : null);
384
384
  Ai.setExtraStackFrame(A);
385
385
  } else
386
386
  Ai.setExtraStackFrame(null);
@@ -388,19 +388,19 @@ function Ll() {
388
388
  function gl(p, N, A, F, K) {
389
389
  {
390
390
  var U = Function.call.bind(Object.prototype.hasOwnProperty);
391
- for (var B in p)
392
- if (U(p, B)) {
393
- var W = void 0;
391
+ for (var z in p)
392
+ if (U(p, z)) {
393
+ var B = void 0;
394
394
  try {
395
- if (typeof p[B] != "function") {
396
- var le = Error((F || "React class") + ": " + A + " type `" + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof p[B] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
395
+ if (typeof p[z] != "function") {
396
+ var le = Error((F || "React class") + ": " + A + " type `" + z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof p[z] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
397
397
  throw le.name = "Invariant Violation", le;
398
398
  }
399
- W = p[B](N, B, F, A, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
399
+ B = p[z](N, z, F, A, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
400
400
  } catch (G) {
401
- W = G;
401
+ B = G;
402
402
  }
403
- W && !(W instanceof Error) && (_n(K), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", F || "React class", A, B, typeof W), _n(null)), W instanceof Error && !(W.message in Ri) && (Ri[W.message] = !0, _n(K), E("Failed %s type: %s", A, W.message), _n(null));
403
+ B && !(B instanceof Error) && (mn(K), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", F || "React class", A, z, typeof B), mn(null)), B instanceof Error && !(B.message in Ri) && (Ri[B.message] = !0, mn(K), E("Failed %s type: %s", A, B.message), mn(null));
404
404
  }
405
405
  }
406
406
  }
@@ -411,7 +411,7 @@ function Ll() {
411
411
  __source: !0
412
412
  }, Li, Ii, dr;
413
413
  dr = {};
414
- function ml(p) {
414
+ function _l(p) {
415
415
  if (fr.call(p, "ref")) {
416
416
  var N = Object.getOwnPropertyDescriptor(p, "ref").get;
417
417
  if (N && N.isReactWarning)
@@ -419,7 +419,7 @@ function Ll() {
419
419
  }
420
420
  return p.ref !== void 0;
421
421
  }
422
- function _l(p) {
422
+ function ml(p) {
423
423
  if (fr.call(p, "key")) {
424
424
  var N = Object.getOwnPropertyDescriptor(p, "key").get;
425
425
  if (N && N.isReactWarning)
@@ -455,57 +455,57 @@ function Ll() {
455
455
  });
456
456
  }
457
457
  }
458
- var bl = function(p, N, A, F, K, U, B) {
459
- var W = {
458
+ var bl = function(p, N, A, F, K, U, z) {
459
+ var B = {
460
460
  // This tag allows us to uniquely identify this as a React Element
461
461
  $$typeof: r,
462
462
  // Built-in properties that belong on the element
463
463
  type: p,
464
464
  key: N,
465
465
  ref: A,
466
- props: B,
466
+ props: z,
467
467
  // Record the component responsible for creating this element.
468
468
  _owner: U
469
469
  };
470
- return W._store = {}, Object.defineProperty(W._store, "validated", {
470
+ return B._store = {}, Object.defineProperty(B._store, "validated", {
471
471
  configurable: !1,
472
472
  enumerable: !1,
473
473
  writable: !0,
474
474
  value: !1
475
- }), Object.defineProperty(W, "_self", {
475
+ }), Object.defineProperty(B, "_self", {
476
476
  configurable: !1,
477
477
  enumerable: !1,
478
478
  writable: !1,
479
479
  value: F
480
- }), Object.defineProperty(W, "_source", {
480
+ }), Object.defineProperty(B, "_source", {
481
481
  configurable: !1,
482
482
  enumerable: !1,
483
483
  writable: !1,
484
484
  value: K
485
- }), Object.freeze && (Object.freeze(W.props), Object.freeze(W)), W;
485
+ }), Object.freeze && (Object.freeze(B.props), Object.freeze(B)), B;
486
486
  };
487
487
  function Cl(p, N, A, F, K) {
488
488
  {
489
- var U, B = {}, W = null, le = null;
490
- A !== void 0 && (W = "" + A), _l(N) && (W = "" + N.key), ml(N) && (le = N.ref, yl(N, K));
489
+ var U, z = {}, B = null, le = null;
490
+ A !== void 0 && (B = "" + A), ml(N) && (B = "" + N.key), _l(N) && (le = N.ref, yl(N, K));
491
491
  for (U in N)
492
- fr.call(N, U) && !pl.hasOwnProperty(U) && (B[U] = N[U]);
492
+ fr.call(N, U) && !pl.hasOwnProperty(U) && (z[U] = N[U]);
493
493
  if (p && p.defaultProps) {
494
494
  var G = p.defaultProps;
495
495
  for (U in G)
496
- B[U] === void 0 && (B[U] = G[U]);
496
+ z[U] === void 0 && (z[U] = G[U]);
497
497
  }
498
- if (W || le) {
498
+ if (B || le) {
499
499
  var X = typeof p == "function" ? p.displayName || p.name || "Unknown" : p;
500
- W && vl(B, X), le && xl(B, X);
500
+ B && vl(z, X), le && xl(z, X);
501
501
  }
502
- return bl(p, W, le, K, F, Ft.current, B);
502
+ return bl(p, B, le, K, F, Ft.current, z);
503
503
  }
504
504
  }
505
505
  var hr = P.ReactCurrentOwner, ji = P.ReactDebugCurrentFrame;
506
- function pt(p) {
506
+ function _t(p) {
507
507
  if (p) {
508
- var N = p._owner, A = mn(p.type, p._source, N ? N.type : null);
508
+ var N = p._owner, A = _n(p.type, p._source, N ? N.type : null);
509
509
  ji.setExtraStackFrame(A);
510
510
  } else
511
511
  ji.setExtraStackFrame(null);
@@ -561,10 +561,10 @@ Check the top-level render call using <` + A + ">.");
561
561
  return;
562
562
  Mi[A] = !0;
563
563
  var F = "";
564
- p && p._owner && p._owner !== hr.current && (F = " It was passed a child from " + $(p._owner.type) + "."), pt(p), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', A, F), pt(null);
564
+ p && p._owner && p._owner !== hr.current && (F = " It was passed a child from " + $(p._owner.type) + "."), _t(p), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', A, F), _t(null);
565
565
  }
566
566
  }
567
- function Wi(p, N) {
567
+ function Bi(p, N) {
568
568
  {
569
569
  if (typeof p != "object")
570
570
  return;
@@ -578,8 +578,8 @@ Check the top-level render call using <` + A + ">.");
578
578
  else if (p) {
579
579
  var K = w(p);
580
580
  if (typeof K == "function" && K !== p.entries)
581
- for (var U = K.call(p), B; !(B = U.next()).done; )
582
- pr(B.value) && $i(B.value, N);
581
+ for (var U = K.call(p), z; !(z = U.next()).done; )
582
+ pr(z.value) && $i(z.value, N);
583
583
  }
584
584
  }
585
585
  }
@@ -613,60 +613,60 @@ Check the top-level render call using <` + A + ">.");
613
613
  for (var N = Object.keys(p.props), A = 0; A < N.length; A++) {
614
614
  var F = N[A];
615
615
  if (F !== "children" && F !== "key") {
616
- pt(p), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", F), pt(null);
616
+ _t(p), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", F), _t(null);
617
617
  break;
618
618
  }
619
619
  }
620
- p.ref !== null && (pt(p), E("Invalid attribute `ref` supplied to `React.Fragment`."), pt(null));
620
+ p.ref !== null && (_t(p), E("Invalid attribute `ref` supplied to `React.Fragment`."), _t(null));
621
621
  }
622
622
  }
623
- function Bi(p, N, A, F, K, U) {
623
+ function zi(p, N, A, F, K, U) {
624
624
  {
625
- var B = M(p);
626
- if (!B) {
627
- var W = "";
628
- (p === void 0 || typeof p == "object" && p !== null && Object.keys(p).length === 0) && (W += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
625
+ var z = M(p);
626
+ if (!z) {
627
+ var B = "";
628
+ (p === void 0 || typeof p == "object" && p !== null && Object.keys(p).length === 0) && (B += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
629
629
  var le = wl(K);
630
- le ? W += le : W += Fi();
630
+ le ? B += le : B += Fi();
631
631
  var G;
632
- p === null ? G = "null" : Array.isArray(p) ? G = "array" : p !== void 0 && p.$$typeof === r ? (G = "<" + ($(p.type) || "Unknown") + " />", W = " Did you accidentally export a JSX literal instead of a component?") : G = typeof p, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, W);
632
+ p === null ? G = "null" : Array.isArray(p) ? G = "array" : p !== void 0 && p.$$typeof === r ? (G = "<" + ($(p.type) || "Unknown") + " />", B = " Did you accidentally export a JSX literal instead of a component?") : G = typeof p, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, B);
633
633
  }
634
634
  var X = Cl(p, N, A, K, U);
635
635
  if (X == null)
636
636
  return X;
637
- if (B) {
637
+ if (z) {
638
638
  var De = N.children;
639
639
  if (De !== void 0)
640
640
  if (F)
641
641
  if (Array.isArray(De)) {
642
642
  for (var mt = 0; mt < De.length; mt++)
643
- Wi(De[mt], p);
643
+ Bi(De[mt], p);
644
644
  Object.freeze && Object.freeze(De);
645
645
  } else
646
646
  E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
647
647
  else
648
- Wi(De, p);
648
+ Bi(De, p);
649
649
  }
650
650
  return p === n.Fragment ? kl(X) : Tl(X), X;
651
651
  }
652
652
  }
653
653
  function El(p, N, A) {
654
- return Bi(p, N, A, !0);
654
+ return zi(p, N, A, !0);
655
655
  }
656
656
  function Nl(p, N, A) {
657
- return Bi(p, N, A, !1);
657
+ return zi(p, N, A, !1);
658
658
  }
659
659
  var Pl = Nl, Ol = El;
660
660
  n.jsx = Pl, n.jsxs = Ol;
661
661
  }();
662
- }(_r)), _r;
662
+ }(mr)), mr;
663
663
  }
664
664
  process.env.NODE_ENV === "production" ? Or.exports = Al() : Or.exports = Ll();
665
665
  var S = Or.exports;
666
666
  function Il(n) {
667
667
  return {};
668
668
  }
669
- const Hn = {}, jl = {}, Xo = {}, it = {}, wt = {}, En = {}, St = {}, ii = {}, Dr = {}, Zt = {}, Qt = {}, fe = {}, Yn = {}, qn = {}, Fl = {}, Zo = {}, Ml = {}, Qo = {}, $l = {}, es = {}, ts = {}, Nn = {}, Wl = {}, ns = {}, rs = {}, is = {}, Bl = {}, zl = {}, os = {}, Rr = {}, ss = {}, be = {}, ls = {}, as = {}, Kl = {}, Gn = {}, oi = {}, Ar = {}, Ul = {}, Vl = {}, zt = {}, Kt = {}, Jl = {}, Hl = {}, Yl = {}, we = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ql = we && "documentMode" in document ? document.documentMode : null, _e = we && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ye = we && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Pn = !(!we || !("InputEvent" in window) || ql) && "getTargetRanges" in new window.InputEvent("input"), si = we && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Xn = we && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Gl = we && /Android/.test(navigator.userAgent), cs = we && /^(?=.*Chrome).*/i.test(navigator.userAgent), Xl = we && Gl && cs, li = we && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !cs, sn = 1, Ge = 3, st = 0, us = 1, kt = 2, Zl = 0, Ql = 1, ea = 2, On = 4, Dn = 8, ai = 128, ta = 112 | (3 | On | Dn) | ai, ci = 1, ui = 2, fi = 3, di = 4, hi = 5, gi = 6, Zn = si || Xn || li ? " " : "​", Me = `
669
+ const Hn = {}, jl = {}, Xo = {}, ot = {}, St = {}, En = {}, Tt = {}, ii = {}, Dr = {}, Zt = {}, Qt = {}, fe = {}, Yn = {}, qn = {}, Fl = {}, Zo = {}, Ml = {}, Qo = {}, $l = {}, es = {}, ts = {}, Nn = {}, Bl = {}, ns = {}, rs = {}, is = {}, zl = {}, Wl = {}, os = {}, Rr = {}, ss = {}, be = {}, ls = {}, as = {}, Kl = {}, Gn = {}, oi = {}, Ar = {}, Ul = {}, Vl = {}, Wt = {}, Kt = {}, Jl = {}, Hl = {}, Yl = {}, we = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ql = we && "documentMode" in document ? document.documentMode : null, me = we && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ye = we && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Pn = !(!we || !("InputEvent" in window) || ql) && "getTargetRanges" in new window.InputEvent("input"), si = we && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Xn = we && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Gl = we && /Android/.test(navigator.userAgent), cs = we && /^(?=.*Chrome).*/i.test(navigator.userAgent), Xl = we && Gl && cs, li = we && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !cs, sn = 1, Ge = 3, lt = 0, us = 1, Et = 2, Zl = 0, Ql = 1, ea = 2, On = 4, Dn = 8, ai = 128, ta = 112 | (3 | On | Dn) | ai, ci = 1, ui = 2, fi = 3, di = 4, hi = 5, gi = 6, Zn = si || Xn || li ? " " : "​", Me = `
670
670
 
671
671
  `, na = Ye ? " " : Zn, fs = "֑-߿יִ-﷽ﹰ-ﻼ", ds = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", ra = new RegExp("^[^" + ds + "]*[" + fs + "]"), ia = new RegExp("^[^" + fs + "]*[" + ds + "]"), Fe = { bold: 1, code: 16, highlight: ai, italic: 2, strikethrough: On, subscript: 32, superscript: 64, underline: Dn }, oa = { directionless: 1, unmergeable: 2 }, Ji = { center: ui, end: gi, justify: di, left: ci, right: fi, start: hi }, sa = { [ui]: "center", [gi]: "end", [di]: "justify", [ci]: "left", [fi]: "right", [hi]: "start" }, la = { normal: 0, segmented: 2, token: 1 }, aa = { [Zl]: "normal", [ea]: "segmented", [Ql]: "token" };
672
672
  function ca(n) {
@@ -723,11 +723,11 @@ function hs(n, e, t) {
723
723
  }(n), o = /* @__PURE__ */ new Map(), s = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
724
724
  let c = !1, u = "";
725
725
  for (let f = 0; f < e.length; f++) {
726
- const h = e[f], g = h.type, m = h.target;
727
- let _ = lt(m, l);
728
- if (!(_ === null && m !== s || V(_))) {
726
+ const h = e[f], g = h.type, _ = h.target;
727
+ let m = at(_, l);
728
+ if (!(m === null && _ !== s || V(m))) {
729
729
  if (g === "characterData")
730
- r && D(_) && ha(i, m, _) && da(m, _, n);
730
+ r && D(m) && ha(i, _, m) && da(_, m, n);
731
731
  else if (g === "childList") {
732
732
  c = !0;
733
733
  const x = h.addedNodes;
@@ -746,9 +746,9 @@ function hs(n, e, t) {
746
746
  let C = 0;
747
747
  for (let T = 0; T < y; T++) {
748
748
  const w = v[T];
749
- (w.nodeName === "BR" && yr(w, m, n) || a === w) && (m.appendChild(w), C++);
749
+ (w.nodeName === "BR" && yr(w, _, n) || a === w) && (_.appendChild(w), C++);
750
750
  }
751
- y !== C && (m === s && (_ = xs(l)), o.set(m, _));
751
+ y !== C && (_ === s && (m = xs(l)), o.set(_, m));
752
752
  }
753
753
  }
754
754
  }
@@ -757,20 +757,20 @@ function hs(n, e, t) {
757
757
  for (const [f, h] of o)
758
758
  if (b(h)) {
759
759
  const g = h.getChildrenKeys();
760
- let m = f.firstChild;
761
- for (let _ = 0; _ < g.length; _++) {
762
- const x = g[_], v = n.getElementByKey(x);
763
- v !== null && (m == null ? (f.appendChild(v), m = v) : m !== v && f.replaceChild(v, m), m = m.nextSibling);
760
+ let _ = f.firstChild;
761
+ for (let m = 0; m < g.length; m++) {
762
+ const x = g[m], v = n.getElementByKey(x);
763
+ v !== null && (_ == null ? (f.appendChild(v), _ = v) : _ !== v && f.replaceChild(v, _), _ = _.nextSibling);
764
764
  }
765
765
  } else
766
766
  D(h) && h.markDirty();
767
767
  const d = t.takeRecords();
768
768
  if (d.length > 0) {
769
769
  for (let f = 0; f < d.length; f++) {
770
- const h = d[f], g = h.addedNodes, m = h.target;
771
- for (let _ = 0; _ < g.length; _++) {
772
- const x = g[_], v = x.parentNode;
773
- v == null || x.nodeName !== "BR" || yr(x, m, n) || v.removeChild(x);
770
+ const h = d[f], g = h.addedNodes, _ = h.target;
771
+ for (let m = 0; m < g.length; m++) {
772
+ const x = g[m], v = x.parentNode;
773
+ v == null || x.nodeName !== "BR" || yr(x, _, n) || v.removeChild(x);
774
774
  }
775
775
  }
776
776
  t.takeRecords();
@@ -826,7 +826,7 @@ function qi(n) {
826
826
  } else
827
827
  r.remove();
828
828
  }
829
- function ms(n) {
829
+ function _s(n) {
830
830
  return Gi(n.anchor), Gi(n.focus), n;
831
831
  }
832
832
  function Gi(n) {
@@ -846,29 +846,29 @@ let ga = 1;
846
846
  const pa = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
847
847
  Promise.resolve().then(n);
848
848
  };
849
- function mi(n) {
849
+ function _i(n) {
850
850
  const e = document.activeElement;
851
851
  if (e === null)
852
852
  return !1;
853
853
  const t = e.nodeName;
854
- return V(lt(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && Qn(e) == null);
854
+ return V(at(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && Qn(e) == null);
855
855
  }
856
856
  function ln(n, e, t) {
857
857
  const r = n.getRootElement();
858
858
  try {
859
- return r !== null && r.contains(e) && r.contains(t) && e !== null && !mi(e) && _s(e) === n;
859
+ return r !== null && r.contains(e) && r.contains(t) && e !== null && !_i(e) && ms(e) === n;
860
860
  } catch {
861
861
  return !1;
862
862
  }
863
863
  }
864
- function _i(n) {
864
+ function mi(n) {
865
865
  return n instanceof ar;
866
866
  }
867
- function _s(n) {
867
+ function ms(n) {
868
868
  let e = n;
869
869
  for (; e != null; ) {
870
870
  const t = Qn(e);
871
- if (_i(t))
871
+ if (mi(t))
872
872
  return t;
873
873
  e = tr(e);
874
874
  }
@@ -880,13 +880,13 @@ function Qn(n) {
880
880
  function Ie(n) {
881
881
  return n.isToken() || n.isSegmented();
882
882
  }
883
- function ma(n) {
883
+ function _a(n) {
884
884
  return n.nodeType === Ge;
885
885
  }
886
886
  function An(n) {
887
887
  let e = n;
888
888
  for (; e != null; ) {
889
- if (ma(e))
889
+ if (_a(e))
890
890
  return e;
891
891
  e = e.firstChild;
892
892
  }
@@ -899,14 +899,14 @@ function Ir(n, e, t) {
899
899
  let i = n ^ r;
900
900
  return e === "subscript" ? i &= ~Fe.superscript : e === "superscript" && (i &= ~Fe.subscript), i;
901
901
  }
902
- function _a(n, e) {
902
+ function ma(n, e) {
903
903
  if (e != null)
904
904
  return void (n.__key = e);
905
905
  de(), Us();
906
906
  const t = q(), r = $e(), i = "" + ga++;
907
907
  r._nodeMap.set(i, n), b(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType = us, n.__key = i;
908
908
  }
909
- function ot(n) {
909
+ function st(n) {
910
910
  const e = n.getParent();
911
911
  if (e !== null) {
912
912
  const t = n.getWritable(), r = e.getWritable(), i = n.getPreviousSibling(), o = n.getNextSibling();
@@ -985,7 +985,7 @@ function ys(n, e) {
985
985
  const t = n[`__lexicalKey_${q()._key}`];
986
986
  return t !== void 0 ? ae(t, e) : null;
987
987
  }
988
- function lt(n, e) {
988
+ function at(n, e) {
989
989
  let t = n;
990
990
  for (; t != null; ) {
991
991
  const r = ys(t, e);
@@ -1013,7 +1013,7 @@ function Ee(n) {
1013
1013
  const e = $e();
1014
1014
  n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
1015
1015
  }
1016
- function Ct(n) {
1016
+ function wt(n) {
1017
1017
  const e = q(), t = function(r, i) {
1018
1018
  let o = r;
1019
1019
  for (; o != null; ) {
@@ -1053,7 +1053,7 @@ function vi(n, e, t) {
1053
1053
  let { anchorOffset: o, focusOffset: s } = r;
1054
1054
  if (i !== null) {
1055
1055
  let l = ws(i);
1056
- const a = lt(i);
1056
+ const a = at(i);
1057
1057
  if (l !== null && D(a)) {
1058
1058
  if (l === Zn && t) {
1059
1059
  const c = t.length;
@@ -1075,9 +1075,9 @@ function xi(n, e, t, r, i) {
1075
1075
  if (re(null), si || Xn || li)
1076
1076
  o.remove();
1077
1077
  else {
1078
- const m = q();
1078
+ const _ = q();
1079
1079
  setTimeout(() => {
1080
- m.update(() => {
1080
+ _.update(() => {
1081
1081
  o.isAttached() && o.remove();
1082
1082
  });
1083
1083
  }, 20);
@@ -1091,8 +1091,8 @@ function xi(n, e, t, r, i) {
1091
1091
  if (!O(g) || t === null || r === null)
1092
1092
  return void o.setTextContent(l);
1093
1093
  if (g.setTextNodeRange(o, t, o, r), o.isSegmented()) {
1094
- const m = ie(o.getTextContent());
1095
- o.replace(m), o = m;
1094
+ const _ = ie(o.getTextContent());
1095
+ o.replace(_), o = _;
1096
1096
  }
1097
1097
  o.setTextContent(l);
1098
1098
  }
@@ -1116,7 +1116,7 @@ function eo(n) {
1116
1116
  return n === "ArrowRight";
1117
1117
  }
1118
1118
  function Ut(n, e) {
1119
- return _e ? n : e;
1119
+ return me ? n : e;
1120
1120
  }
1121
1121
  function to(n) {
1122
1122
  return n === "Enter";
@@ -1132,7 +1132,7 @@ function no(n, e, t) {
1132
1132
  }
1133
1133
  function va() {
1134
1134
  const n = Q();
1135
- Ee(ms(n.select(0, n.getChildrenSize())));
1135
+ Ee(_s(n.select(0, n.getChildrenSize())));
1136
1136
  }
1137
1137
  function Jt(n, e) {
1138
1138
  n.__lexicalClassNameCache === void 0 && (n.__lexicalClassNameCache = {});
@@ -1209,13 +1209,13 @@ function nr(n) {
1209
1209
  function xa(n) {
1210
1210
  let e = n.getParentOrThrow();
1211
1211
  for (; e !== null; ) {
1212
- if (Nt(e))
1212
+ if (Pt(e))
1213
1213
  return e;
1214
1214
  e = e.getParentOrThrow();
1215
1215
  }
1216
1216
  return e;
1217
1217
  }
1218
- function Nt(n) {
1218
+ function Pt(n) {
1219
1219
  return oe(n) || b(n) && n.isShadowRoot();
1220
1220
  }
1221
1221
  function an(n) {
@@ -1289,10 +1289,10 @@ function jn(n) {
1289
1289
  const e = new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/, "i");
1290
1290
  return n.nodeName.match(e) !== null;
1291
1291
  }
1292
- function xt(n) {
1292
+ function bt(n) {
1293
1293
  if (oe(n) || V(n) && !n.isInline())
1294
1294
  return !0;
1295
- if (!b(n) || Nt(n))
1295
+ if (!b(n) || Pt(n))
1296
1296
  return !1;
1297
1297
  const e = n.getFirstChild(), t = e === null || qt(e) || D(e) || e.isInline();
1298
1298
  return !n.isInline() && n.canBeEmpty() !== !1 && t;
@@ -1333,27 +1333,27 @@ function Ts(n, e, t, r, i, o) {
1333
1333
  s.__parent === e && (b(s) && Ts(s, l, t, r, i, o), t.has(l) || o.delete(l), i.push(l)), s = s.getNextSibling();
1334
1334
  }
1335
1335
  }
1336
- let qe, ue, tn, ir, Mr, $r, at, Ce, Wr, nn, ee = "", ce = "", Te = null, ye = "", Le = "", ks = !1, rn = !1, Tn = null;
1336
+ let qe, ue, tn, ir, Mr, $r, ct, Ce, Br, nn, ee = "", ce = "", Te = null, ye = "", Le = "", ks = !1, rn = !1, Tn = null;
1337
1337
  function Fn(n, e) {
1338
- const t = at.get(n);
1338
+ const t = ct.get(n);
1339
1339
  if (e !== null) {
1340
1340
  const r = Kr(n);
1341
1341
  r.parentNode === e && e.removeChild(r);
1342
1342
  }
1343
1343
  if (Ce.has(n) || ue._keyToDOMMap.delete(n), b(t)) {
1344
- const r = $n(t, at);
1345
- Br(r, 0, r.length - 1, null);
1344
+ const r = $n(t, ct);
1345
+ zr(r, 0, r.length - 1, null);
1346
1346
  }
1347
1347
  t !== void 0 && bi(nn, tn, ir, t, "destroyed");
1348
1348
  }
1349
- function Br(n, e, t, r) {
1349
+ function zr(n, e, t, r) {
1350
1350
  let i = e;
1351
1351
  for (; i <= t; ++i) {
1352
1352
  const o = n[i];
1353
1353
  o !== void 0 && Fn(o, r);
1354
1354
  }
1355
1355
  }
1356
- function et(n, e) {
1356
+ function tt(n, e) {
1357
1357
  n.setProperty("text-align", e);
1358
1358
  }
1359
1359
  const ka = "40px";
@@ -1368,7 +1368,7 @@ function Es(n, e) {
1368
1368
  }
1369
1369
  function Ns(n, e) {
1370
1370
  const t = n.style;
1371
- e === 0 ? et(t, "") : e === ci ? et(t, "left") : e === ui ? et(t, "center") : e === fi ? et(t, "right") : e === di ? et(t, "justify") : e === hi ? et(t, "start") : e === gi && et(t, "end");
1371
+ e === 0 ? tt(t, "") : e === ci ? tt(t, "left") : e === ui ? tt(t, "center") : e === fi ? tt(t, "right") : e === di ? tt(t, "justify") : e === hi ? tt(t, "start") : e === gi && tt(t, "end");
1372
1372
  }
1373
1373
  function Mn(n, e, t) {
1374
1374
  const r = Ce.get(n);
@@ -1383,7 +1383,7 @@ function Mn(n, e, t) {
1383
1383
  const a = s - 1;
1384
1384
  (function(c, u, d, f) {
1385
1385
  const h = ce;
1386
- ce = "", zr(c, d, 0, u, f, null), Os(d, f), ce = h;
1386
+ ce = "", Wr(c, d, 0, u, f, null), Os(d, f), ce = h;
1387
1387
  })($n(r, Ce), a, r, i);
1388
1388
  }
1389
1389
  const l = r.__format;
@@ -1406,7 +1406,7 @@ function Mn(n, e, t) {
1406
1406
  }
1407
1407
  return bi(nn, tn, ir, r, "created"), i;
1408
1408
  }
1409
- function zr(n, e, t, r, i, o) {
1409
+ function Wr(n, e, t, r, i, o) {
1410
1410
  const s = ee;
1411
1411
  ee = "";
1412
1412
  let l = t;
@@ -1422,7 +1422,7 @@ function oo(n, e) {
1422
1422
  return qt(t) || V(t) && t.isInline();
1423
1423
  }
1424
1424
  function Ps(n, e, t) {
1425
- const r = n !== null && (n.__size === 0 || oo(n.__last, at)), i = e.__size === 0 || oo(e.__last, Ce);
1425
+ const r = n !== null && (n.__size === 0 || oo(n.__last, ct)), i = e.__size === 0 || oo(e.__last, Ce);
1426
1426
  if (r) {
1427
1427
  if (!i) {
1428
1428
  const o = t.__lexicalLineBreak;
@@ -1485,44 +1485,44 @@ function Ea(n, e, t) {
1485
1485
  if (d === f)
1486
1486
  Vt(d, l);
1487
1487
  else {
1488
- const g = Kr(d), m = Mn(f, null, null);
1488
+ const g = Kr(d), _ = Mn(f, null, null);
1489
1489
  try {
1490
- l.replaceChild(m, g);
1491
- } catch (_) {
1492
- if (typeof _ == "object" && _ != null) {
1493
- const x = `${_.toString()} Parent: ${l.tagName}, new child: {tag: ${m.tagName} key: ${f}}, old child: {tag: ${g.tagName}, key: ${d}}.`;
1490
+ l.replaceChild(_, g);
1491
+ } catch (m) {
1492
+ if (typeof m == "object" && m != null) {
1493
+ const x = `${m.toString()} Parent: ${l.tagName}, new child: {tag: ${_.tagName} key: ${f}}, old child: {tag: ${g.tagName}, key: ${d}}.`;
1494
1494
  throw new Error(x);
1495
1495
  }
1496
- throw _;
1496
+ throw m;
1497
1497
  }
1498
1498
  Fn(d, null);
1499
1499
  }
1500
1500
  const h = Ce.get(f);
1501
1501
  D(h) && (Te === null && (Te = h.getFormat()), ye === "" && (ye = h.getStyle()));
1502
1502
  } else {
1503
- const d = $n(o, at), f = $n(s, Ce);
1503
+ const d = $n(o, ct), f = $n(s, Ce);
1504
1504
  if (c === 0)
1505
- u !== 0 && zr(f, s, 0, u - 1, l, null);
1505
+ u !== 0 && Wr(f, s, 0, u - 1, l, null);
1506
1506
  else if (u === 0) {
1507
1507
  if (c !== 0) {
1508
1508
  const h = l.__lexicalLineBreak == null;
1509
- Br(d, 0, c - 1, h ? null : l), h && (l.textContent = "");
1509
+ zr(d, 0, c - 1, h ? null : l), h && (l.textContent = "");
1510
1510
  }
1511
1511
  } else
1512
- (function(h, g, m, _, x, v) {
1513
- const y = _ - 1, C = x - 1;
1512
+ (function(h, g, _, m, x, v) {
1513
+ const y = m - 1, C = x - 1;
1514
1514
  let T, w, P = (j = v, j.firstChild), E = 0, k = 0;
1515
1515
  for (var j; E <= y && k <= C; ) {
1516
- const J = g[E], $ = m[k];
1516
+ const J = g[E], $ = _[k];
1517
1517
  if (J === $)
1518
1518
  P = Cr(Vt($, v)), E++, k++;
1519
1519
  else {
1520
- T === void 0 && (T = new Set(g)), w === void 0 && (w = new Set(m));
1520
+ T === void 0 && (T = new Set(g)), w === void 0 && (w = new Set(_));
1521
1521
  const se = w.has(J), Oe = T.has($);
1522
1522
  if (se)
1523
1523
  if (Oe) {
1524
- const We = In(ue, $);
1525
- We === P ? P = Cr(Vt($, v)) : (P != null ? v.insertBefore(We, P) : v.appendChild(We), Vt($, v)), E++, k++;
1524
+ const Be = In(ue, $);
1525
+ Be === P ? P = Cr(Vt($, v)) : (P != null ? v.insertBefore(Be, P) : v.appendChild(Be), Vt($, v)), E++, k++;
1526
1526
  } else
1527
1527
  Mn($, v, P), k++;
1528
1528
  else
@@ -1533,10 +1533,10 @@ function Ea(n, e, t) {
1533
1533
  }
1534
1534
  const M = E > y, Y = k > C;
1535
1535
  if (M && !Y) {
1536
- const J = m[C + 1];
1537
- zr(m, h, k, C, v, J === void 0 ? null : ue.getElementByKey(J));
1536
+ const J = _[C + 1];
1537
+ Wr(_, h, k, C, v, J === void 0 ? null : ue.getElementByKey(J));
1538
1538
  } else
1539
- Y && !M && Br(g, E, y, v);
1539
+ Y && !M && zr(g, E, y, v);
1540
1540
  })(s, d, f, c, u, l);
1541
1541
  }
1542
1542
  er(s) && (ee += Me), l.__lexicalTextContent = ee, ee = a + ee;
@@ -1554,7 +1554,7 @@ function $n(n, e) {
1554
1554
  return t;
1555
1555
  }
1556
1556
  function Vt(n, e) {
1557
- const t = at.get(n);
1557
+ const t = ct.get(n);
1558
1558
  let r = Ce.get(n);
1559
1559
  t !== void 0 && r !== void 0 || R(61);
1560
1560
  const i = ks || $r.has(n) || Mr.has(n), o = In(ue, n);
@@ -1609,12 +1609,12 @@ function Cr(n) {
1609
1609
  return e !== null && e === ue._blockCursorElement && (e = e.nextSibling), e;
1610
1610
  }
1611
1611
  function Na(n, e, t, r, i, o) {
1612
- ee = "", Le = "", ce = "", ks = r === kt, Tn = null, ue = t, qe = t._config, tn = t._nodes, ir = ue._listeners.mutation, Mr = i, $r = o, at = n._nodeMap, Ce = e._nodeMap, rn = e._readOnly, Wr = new Map(t._keyToDOMMap);
1612
+ ee = "", Le = "", ce = "", ks = r === Et, Tn = null, ue = t, qe = t._config, tn = t._nodes, ir = ue._listeners.mutation, Mr = i, $r = o, ct = n._nodeMap, Ce = e._nodeMap, rn = e._readOnly, Br = new Map(t._keyToDOMMap);
1613
1613
  const s = /* @__PURE__ */ new Map();
1614
- return nn = s, Vt("root", null), ue = void 0, tn = void 0, Mr = void 0, $r = void 0, at = void 0, Ce = void 0, qe = void 0, Wr = void 0, nn = void 0, s;
1614
+ return nn = s, Vt("root", null), ue = void 0, tn = void 0, Mr = void 0, $r = void 0, ct = void 0, Ce = void 0, qe = void 0, Br = void 0, nn = void 0, s;
1615
1615
  }
1616
1616
  function Kr(n) {
1617
- const e = Wr.get(n);
1617
+ const e = Br.get(n);
1618
1618
  return e === void 0 && R(75, n), e;
1619
1619
  }
1620
1620
  const Ae = Object.freeze({}), Ur = 30, Vr = [["keydown", function(n, e) {
@@ -1641,24 +1641,24 @@ const Ae = Object.freeze({}), Ur = 30, Vr = [["keydown", function(n, e) {
1641
1641
  return to(l) && a;
1642
1642
  }(t, r) ? (Yt = !0, L(e, Nn, n)) : function(l) {
1643
1643
  return l === " ";
1644
- }(t) ? L(e, Wl, n) : function(l, a) {
1645
- return _e && a && l.toLowerCase() === "o";
1646
- }(t, i) ? (n.preventDefault(), Yt = !0, L(e, wt, !0)) : function(l, a) {
1644
+ }(t) ? L(e, Bl, n) : function(l, a) {
1645
+ return me && a && l.toLowerCase() === "o";
1646
+ }(t, i) ? (n.preventDefault(), Yt = !0, L(e, St, !0)) : function(l, a) {
1647
1647
  return to(l) && !a;
1648
1648
  }(t, r) ? (Yt = !1, L(e, Nn, n)) : function(l, a, c, u) {
1649
- return _e ? !a && !c && (Mt(l) || l.toLowerCase() === "h" && u) : !(u || a || c) && Mt(l);
1650
- }(t, s, o, i) ? Mt(t) ? L(e, ns, n) : (n.preventDefault(), L(e, it, !0)) : function(l) {
1649
+ return me ? !a && !c && (Mt(l) || l.toLowerCase() === "h" && u) : !(u || a || c) && Mt(l);
1650
+ }(t, s, o, i) ? Mt(t) ? L(e, ns, n) : (n.preventDefault(), L(e, ot, !0)) : function(l) {
1651
1651
  return l === "Escape";
1652
1652
  }(t) ? L(e, rs, n) : function(l, a, c, u, d) {
1653
- return _e ? !(c || u || d) && ($t(l) || l.toLowerCase() === "d" && a) : !(a || u || d) && $t(l);
1654
- }(t, i, r, s, o) ? $t(t) ? L(e, is, n) : (n.preventDefault(), L(e, it, !1)) : function(l, a, c) {
1655
- return Mt(l) && (_e ? a : c);
1653
+ return me ? !(c || u || d) && ($t(l) || l.toLowerCase() === "d" && a) : !(a || u || d) && $t(l);
1654
+ }(t, i, r, s, o) ? $t(t) ? L(e, is, n) : (n.preventDefault(), L(e, ot, !1)) : function(l, a, c) {
1655
+ return Mt(l) && (me ? a : c);
1656
1656
  }(t, s, i) ? (n.preventDefault(), L(e, Zt, !0)) : function(l, a, c) {
1657
- return $t(l) && (_e ? a : c);
1657
+ return $t(l) && (me ? a : c);
1658
1658
  }(t, s, i) ? (n.preventDefault(), L(e, Zt, !1)) : function(l, a) {
1659
- return _e && a && Mt(l);
1659
+ return me && a && Mt(l);
1660
1660
  }(t, o) ? (n.preventDefault(), L(e, Qt, !0)) : function(l, a) {
1661
- return _e && a && $t(l);
1661
+ return me && a && $t(l);
1662
1662
  }(t, o) ? (n.preventDefault(), L(e, Qt, !1)) : function(l, a, c, u) {
1663
1663
  return l.toLowerCase() === "b" && !a && Ut(c, u);
1664
1664
  }(t, s, o, i) ? (n.preventDefault(), L(e, fe, "bold")) : function(l, a, c, u) {
@@ -1667,50 +1667,50 @@ const Ae = Object.freeze({}), Ur = 30, Vr = [["keydown", function(n, e) {
1667
1667
  return l.toLowerCase() === "i" && !a && Ut(c, u);
1668
1668
  }(t, s, o, i) ? (n.preventDefault(), L(e, fe, "italic")) : function(l, a, c, u) {
1669
1669
  return l === "Tab" && !a && !c && !u;
1670
- }(t, s, i, o) ? L(e, Bl, n) : function(l, a, c, u) {
1670
+ }(t, s, i, o) ? L(e, zl, n) : function(l, a, c, u) {
1671
1671
  return l.toLowerCase() === "z" && !a && Ut(c, u);
1672
1672
  }(t, r, o, i) ? (n.preventDefault(), L(e, Yn, void 0)) : function(l, a, c, u) {
1673
- return _e ? l.toLowerCase() === "z" && c && a : l.toLowerCase() === "y" && u || l.toLowerCase() === "z" && u && a;
1673
+ return me ? l.toLowerCase() === "z" && c && a : l.toLowerCase() === "y" && u || l.toLowerCase() === "z" && u && a;
1674
1674
  }(t, r, o, i) ? (n.preventDefault(), L(e, qn, void 0)) : xe(e._editorState._selection) ? function(l, a, c, u) {
1675
- return !a && l.toLowerCase() === "c" && (_e ? c : u);
1675
+ return !a && l.toLowerCase() === "c" && (me ? c : u);
1676
1676
  }(t, r, o, i) ? (n.preventDefault(), L(e, Gn, n)) : function(l, a, c, u) {
1677
- return !a && l.toLowerCase() === "x" && (_e ? c : u);
1677
+ return !a && l.toLowerCase() === "x" && (me ? c : u);
1678
1678
  }(t, r, o, i) ? (n.preventDefault(), L(e, oi, n)) : no(t, o, i) && (n.preventDefault(), L(e, Ar, n)) : !Ye && no(t, o, i) && (n.preventDefault(), L(e, Ar, n)), function(l, a, c, u) {
1679
1679
  return l || a || c || u;
1680
1680
  }(i, r, s, o) && L(e, Yl, n));
1681
1681
  }], ["pointerdown", function(n, e) {
1682
1682
  const t = n.target, r = n.pointerType;
1683
1683
  t instanceof Node && r !== "touch" && ge(e, () => {
1684
- V(lt(t)) || (Hr = !0);
1684
+ V(at(t)) || (Hr = !0);
1685
1685
  });
1686
1686
  }], ["compositionstart", function(n, e) {
1687
1687
  ge(e, () => {
1688
1688
  const t = I();
1689
1689
  if (O(t) && !e.isComposing()) {
1690
1690
  const r = t.anchor, i = t.anchor.getNode();
1691
- re(r.key), (n.timeStamp < Ht + Ur || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || D(i) && i.getStyle() !== t.style) && L(e, St, na);
1691
+ re(r.key), (n.timeStamp < Ht + Ur || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || D(i) && i.getStyle() !== t.style) && L(e, Tt, na);
1692
1692
  }
1693
1693
  });
1694
1694
  }], ["compositionend", function(n, e) {
1695
- Ye ? Wt = !0 : ge(e, () => {
1695
+ Ye ? Bt = !0 : ge(e, () => {
1696
1696
  wr(e, n.data);
1697
1697
  });
1698
1698
  }], ["input", function(n, e) {
1699
1699
  n.stopPropagation(), ge(e, () => {
1700
1700
  const t = I(), r = n.data, i = js(n);
1701
1701
  if (r != null && O(t) && Is(t, i, r, n.timeStamp, !1)) {
1702
- Wt && (wr(e, r), Wt = !1);
1702
+ Bt && (wr(e, r), Bt = !1);
1703
1703
  const o = t.anchor.getNode(), s = Ne(e._window);
1704
1704
  if (s === null)
1705
1705
  return;
1706
1706
  const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
1707
- Pn && !t.isCollapsed() && D(o) && s.anchorNode !== null && o.getTextContent().slice(0, a) + r + o.getTextContent().slice(a + c) === ws(s.anchorNode) || L(e, St, r);
1707
+ Pn && !t.isCollapsed() && D(o) && s.anchorNode !== null && o.getTextContent().slice(0, a) + r + o.getTextContent().slice(a + c) === ws(s.anchorNode) || L(e, Tt, r);
1708
1708
  const u = r.length;
1709
1709
  Ye && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), si || Xn || li || !e.isComposing() || (Ht = 0, re(null));
1710
1710
  } else
1711
- vi(!1, e, r !== null ? r : void 0), Wt && (wr(e, r || void 0), Wt = !1);
1711
+ vi(!1, e, r !== null ? r : void 0), Bt && (wr(e, r || void 0), Bt = !1);
1712
1712
  de(), gs(q());
1713
- }), bt = null;
1713
+ }), Ct = null;
1714
1714
  }], ["click", function(n, e) {
1715
1715
  ge(e, () => {
1716
1716
  const t = I(), r = Ne(e._window), i = dn();
@@ -1753,8 +1753,8 @@ Pn && Vr.push(["beforeinput", (n, e) => function(t, r) {
1753
1753
  }
1754
1754
  } else {
1755
1755
  re(null), t.preventDefault();
1756
- const g = s.anchor.getNode().getTextContent(), m = s.anchor.offset === 0 && s.focus.offset === g.length;
1757
- Xl && h && !m || L(r, it, !0);
1756
+ const g = s.anchor.getNode().getTextContent(), _ = s.anchor.offset === 0 && s.focus.offset === g.length;
1757
+ Xl && h && !_ || L(r, ot, !0);
1758
1758
  }
1759
1759
  return;
1760
1760
  }
@@ -1763,23 +1763,23 @@ Pn && Vr.push(["beforeinput", (n, e) => function(t, r) {
1763
1763
  if (!O(s))
1764
1764
  return;
1765
1765
  const a = t.data;
1766
- bt !== null && vi(!1, r, bt), s.dirty && bt === null || !s.isCollapsed() || oe(s.anchor.getNode()) || o === null || s.applyDOMRange(o), bt = null;
1766
+ Ct !== null && vi(!1, r, Ct), s.dirty && Ct === null || !s.isCollapsed() || oe(s.anchor.getNode()) || o === null || s.applyDOMRange(o), Ct = null;
1767
1767
  const c = s.anchor, u = s.focus, d = c.getNode(), f = u.getNode();
1768
1768
  if (i !== "insertText" && i !== "insertTranspose")
1769
1769
  switch (t.preventDefault(), i) {
1770
1770
  case "insertFromYank":
1771
1771
  case "insertFromDrop":
1772
1772
  case "insertReplacementText":
1773
- L(r, St, t);
1773
+ L(r, Tt, t);
1774
1774
  break;
1775
1775
  case "insertFromComposition":
1776
- re(null), L(r, St, t);
1776
+ re(null), L(r, Tt, t);
1777
1777
  break;
1778
1778
  case "insertLineBreak":
1779
- re(null), L(r, wt, !1);
1779
+ re(null), L(r, St, !1);
1780
1780
  break;
1781
1781
  case "insertParagraph":
1782
- re(null), Yt && !Xn ? (Yt = !1, L(r, wt, !1)) : L(r, En, void 0);
1782
+ re(null), Yt && !Xn ? (Yt = !1, L(r, St, !1)) : L(r, En, void 0);
1783
1783
  break;
1784
1784
  case "insertFromPaste":
1785
1785
  case "insertFromPasteAsQuotation":
@@ -1795,7 +1795,7 @@ Pn && Vr.push(["beforeinput", (n, e) => function(t, r) {
1795
1795
  L(r, Dr, t);
1796
1796
  break;
1797
1797
  case "deleteContent":
1798
- L(r, it, !1);
1798
+ L(r, ot, !1);
1799
1799
  break;
1800
1800
  case "deleteWordBackward":
1801
1801
  L(r, Zt, !0);
@@ -1833,21 +1833,21 @@ Pn && Vr.push(["beforeinput", (n, e) => function(t, r) {
1833
1833
  else {
1834
1834
  if (a === `
1835
1835
  `)
1836
- t.preventDefault(), L(r, wt, !1);
1836
+ t.preventDefault(), L(r, St, !1);
1837
1837
  else if (a === Me)
1838
1838
  t.preventDefault(), L(r, En, void 0);
1839
1839
  else if (a == null && t.dataTransfer) {
1840
1840
  const h = t.dataTransfer.getData("text/plain");
1841
1841
  t.preventDefault(), s.insertRawText(h);
1842
1842
  } else
1843
- a != null && Is(s, o, a, t.timeStamp, !0) ? (t.preventDefault(), L(r, St, a)) : bt = a;
1843
+ a != null && Is(s, o, a, t.timeStamp, !0) ? (t.preventDefault(), L(r, Tt, a)) : Ct = a;
1844
1844
  As = t.timeStamp;
1845
1845
  }
1846
1846
  });
1847
1847
  }(n, e)]);
1848
- let Ht = 0, Rs = null, As = 0, bt = null;
1849
- const Wn = /* @__PURE__ */ new WeakMap();
1850
- let Jr = !1, Hr = !1, Yt = !1, Wt = !1, Ls = [0, "", 0, "root", 0];
1848
+ let Ht = 0, Rs = null, As = 0, Ct = null;
1849
+ const Bn = /* @__PURE__ */ new WeakMap();
1850
+ let Jr = !1, Hr = !1, Yt = !1, Bt = !1, Ls = [0, "", 0, "root", 0];
1851
1851
  function Is(n, e, t, r, i) {
1852
1852
  const o = n.anchor, s = n.focus, l = o.getNode(), a = q(), c = Ne(a._window), u = c !== null ? c.anchorNode : null, d = o.key, f = a.getElementByKey(d), h = t.length;
1853
1853
  return d !== s.key || !D(l) || (!i && (!Pn || As < r + 50) || l.isDirty() && h < 2 || bs(t)) && o.offset !== s.offset && !l.isComposing() || Ie(l) || l.isDirty() && h > 1 || (i || !Pn) && f !== null && !l.isComposing() && u !== An(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || ya(n, l);
@@ -1867,21 +1867,21 @@ function lo(n, e, t) {
1867
1867
  const a = l.anchor, c = a.getNode();
1868
1868
  if (l.isCollapsed()) {
1869
1869
  n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
1870
- const u = nr(e).event, d = u ? u.timeStamp : performance.now(), [f, h, g, m, _] = Ls, x = Q(), v = e.isComposing() === !1 && x.getTextContent() === "";
1871
- if (d < _ + 200 && a.offset === g && a.key === m)
1870
+ const u = nr(e).event, d = u ? u.timeStamp : performance.now(), [f, h, g, _, m] = Ls, x = Q(), v = e.isComposing() === !1 && x.getTextContent() === "";
1871
+ if (d < m + 200 && a.offset === g && a.key === _)
1872
1872
  l.format = f, l.style = h;
1873
1873
  else if (a.type === "text")
1874
1874
  D(c) || R(141), l.format = c.getFormat(), l.style = c.getStyle();
1875
1875
  else if (a.type === "element" && !v) {
1876
1876
  const y = a.getNode();
1877
- l.style = "", y instanceof Ot && y.getChildrenSize() === 0 ? (l.format = y.getTextFormat(), l.style = y.getTextStyle()) : l.format = 0;
1877
+ l.style = "", y instanceof Dt && y.getChildrenSize() === 0 ? (l.format = y.getTextFormat(), l.style = y.getTextStyle()) : l.format = 0;
1878
1878
  }
1879
1879
  } else {
1880
- const u = a.key, d = l.focus.key, f = l.getNodes(), h = f.length, g = l.isBackward(), m = g ? s : i, _ = g ? i : s, x = g ? d : u, v = g ? u : d;
1880
+ const u = a.key, d = l.focus.key, f = l.getNodes(), h = f.length, g = l.isBackward(), _ = g ? s : i, m = g ? i : s, x = g ? d : u, v = g ? u : d;
1881
1881
  let y = ta, C = !1;
1882
1882
  for (let T = 0; T < h; T++) {
1883
1883
  const w = f[T], P = w.getTextContentSize();
1884
- if (D(w) && P !== 0 && !(T === 0 && w.__key === x && m === P || T === h - 1 && w.__key === v && _ === 0) && (C = !0, y &= w.getFormat(), y === 0))
1884
+ if (D(w) && P !== 0 && !(T === 0 && w.__key === x && _ === P || T === h - 1 && w.__key === v && m === 0) && (C = !0, y &= w.getFormat(), y === 0))
1885
1885
  break;
1886
1886
  }
1887
1887
  l.format = C ? y : 0;
@@ -1918,12 +1918,12 @@ function Fs(n) {
1918
1918
  let e = n.__lexicalEventHandles;
1919
1919
  return e === void 0 && (e = [], n.__lexicalEventHandles = e), e;
1920
1920
  }
1921
- const Tt = /* @__PURE__ */ new Map();
1921
+ const kt = /* @__PURE__ */ new Map();
1922
1922
  function Ms(n) {
1923
1923
  const e = n.target, t = Ne(e == null ? null : e.nodeType === 9 ? e.defaultView : e.ownerDocument.defaultView);
1924
1924
  if (t === null)
1925
1925
  return;
1926
- const r = _s(t.anchorNode);
1926
+ const r = ms(t.anchorNode);
1927
1927
  if (r === null)
1928
1928
  return;
1929
1929
  Hr && (Hr = !1, ge(r, () => {
@@ -1933,8 +1933,8 @@ function Ms(n) {
1933
1933
  const d = u.nodeType;
1934
1934
  d !== sn && d !== Ge || Ee(Ti(c, t, r, n));
1935
1935
  }));
1936
- const i = yi(r), o = i[i.length - 1], s = o._key, l = Tt.get(s), a = l || o;
1937
- a !== r && lo(t, a, !1), lo(t, r, !0), r !== o ? Tt.set(s, r) : l && Tt.delete(s);
1936
+ const i = yi(r), o = i[i.length - 1], s = o._key, l = kt.get(s), a = l || o;
1937
+ a !== r && lo(t, a, !1), lo(t, r, !0), r !== o ? kt.set(s, r) : l && kt.delete(s);
1938
1938
  }
1939
1939
  function ao(n) {
1940
1940
  n._lexicalHandled = !0;
@@ -1943,17 +1943,17 @@ function co(n) {
1943
1943
  return n._lexicalHandled === !0;
1944
1944
  }
1945
1945
  function Pa(n) {
1946
- const e = n.ownerDocument, t = Wn.get(e);
1946
+ const e = n.ownerDocument, t = Bn.get(e);
1947
1947
  t === void 0 && R(162);
1948
1948
  const r = t - 1;
1949
- r >= 0 || R(164), Wn.set(e, r), r === 0 && e.removeEventListener("selectionchange", Ms);
1949
+ r >= 0 || R(164), Bn.set(e, r), r === 0 && e.removeEventListener("selectionchange", Ms);
1950
1950
  const i = Qn(n);
1951
- _i(i) ? (function(s) {
1951
+ mi(i) ? (function(s) {
1952
1952
  if (s._parentEditor !== null) {
1953
1953
  const l = yi(s), a = l[l.length - 1]._key;
1954
- Tt.get(a) === s && Tt.delete(a);
1954
+ kt.get(a) === s && kt.delete(a);
1955
1955
  } else
1956
- Tt.delete(s._key);
1956
+ kt.delete(s._key);
1957
1957
  }(i), n.__lexicalEditor = null) : i && R(198);
1958
1958
  const o = Fs(n);
1959
1959
  for (let s = 0; s < o.length; s++)
@@ -1975,15 +1975,15 @@ function Yr(n, e, t) {
1975
1975
  let s = !1;
1976
1976
  if (O(o) && e) {
1977
1977
  const l = o.anchor, a = o.focus;
1978
- l.key === r && (zn(l, n, i, n.getPreviousSibling(), n.getNextSibling()), s = !0), a.key === r && (zn(a, n, i, n.getPreviousSibling(), n.getNextSibling()), s = !0);
1978
+ l.key === r && (Wn(l, n, i, n.getPreviousSibling(), n.getNextSibling()), s = !0), a.key === r && (Wn(a, n, i, n.getPreviousSibling(), n.getNextSibling()), s = !0);
1979
1979
  } else
1980
1980
  xe(o) && e && n.isSelected() && n.selectPrevious();
1981
1981
  if (O(o) && e && !s) {
1982
1982
  const l = n.getIndexWithinParent();
1983
- ot(n), Bn(o, i, l, -1);
1983
+ st(n), zn(o, i, l, -1);
1984
1984
  } else
1985
- ot(n);
1986
- t || Nt(i) || i.canBeEmpty() || !i.isEmpty() || Yr(i, e), e && oe(i) && i.isEmpty() && i.selectEnd();
1985
+ st(n);
1986
+ t || Pt(i) || i.canBeEmpty() || !i.isEmpty() || Yr(i, e), e && oe(i) && i.isEmpty() && i.selectEnd();
1987
1987
  }
1988
1988
  class or {
1989
1989
  static getType() {
@@ -1996,7 +1996,7 @@ class or {
1996
1996
  this.__parent = e.__parent, this.__next = e.__next, this.__prev = e.__prev;
1997
1997
  }
1998
1998
  constructor(e) {
1999
- this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, _a(this, e);
1999
+ this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, ma(this, e);
2000
2000
  }
2001
2001
  getType() {
2002
2002
  return this.__type;
@@ -2062,7 +2062,7 @@ class or {
2062
2062
  let e = this;
2063
2063
  for (; e !== null; ) {
2064
2064
  const t = e.getParent();
2065
- if (Nt(t))
2065
+ if (Pt(t))
2066
2066
  return b(e) || e === this && V(e) || R(194), e;
2067
2067
  e = t;
2068
2068
  }
@@ -2244,14 +2244,14 @@ class or {
2244
2244
  let r = I();
2245
2245
  r !== null && (r = r.clone()), vr(this, e);
2246
2246
  const i = this.getLatest(), o = this.__key, s = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
2247
- ot(l);
2247
+ st(l);
2248
2248
  const u = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, h = i.__next, g = i.__parent;
2249
- if (Yr(i, !1, !0), u === null ? a.__first = s : u.getWritable().__next = s, l.__prev = f, d === null ? a.__last = s : d.getWritable().__prev = s, l.__next = h, l.__parent = g, a.__size = c, t && (b(this) && b(l) || R(139), this.getChildren().forEach((m) => {
2250
- l.append(m);
2249
+ if (Yr(i, !1, !0), u === null ? a.__first = s : u.getWritable().__next = s, l.__prev = f, d === null ? a.__last = s : d.getWritable().__prev = s, l.__next = h, l.__parent = g, a.__size = c, t && (b(this) && b(l) || R(139), this.getChildren().forEach((_) => {
2250
+ l.append(_);
2251
2251
  })), O(r)) {
2252
2252
  Ee(r);
2253
- const m = r.anchor, _ = r.focus;
2254
- m.key === o && go(m, l), _.key === o && go(_, l);
2253
+ const _ = r.anchor, m = r.focus;
2254
+ _.key === o && go(_, l), m.key === o && go(m, l);
2255
2255
  }
2256
2256
  return Ve() === o && re(s), l;
2257
2257
  }
@@ -2261,15 +2261,15 @@ class or {
2261
2261
  let l = !1, a = !1;
2262
2262
  if (o !== null) {
2263
2263
  const h = e.getIndexWithinParent();
2264
- if (ot(i), O(s)) {
2265
- const g = o.__key, m = s.anchor, _ = s.focus;
2266
- l = m.type === "element" && m.key === g && m.offset === h + 1, a = _.type === "element" && _.key === g && _.offset === h + 1;
2264
+ if (st(i), O(s)) {
2265
+ const g = o.__key, _ = s.anchor, m = s.focus;
2266
+ l = _.type === "element" && _.key === g && _.offset === h + 1, a = m.type === "element" && m.key === g && m.offset === h + 1;
2267
2267
  }
2268
2268
  }
2269
2269
  const c = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), d = i.__key, f = r.__next;
2270
2270
  if (c === null ? u.__last = d : c.getWritable().__prev = d, u.__size++, r.__next = d, i.__next = f, i.__prev = r.__key, i.__parent = r.__parent, t && O(s)) {
2271
2271
  const h = this.getIndexWithinParent();
2272
- Bn(s, u, h + 1);
2272
+ zn(s, u, h + 1);
2273
2273
  const g = u.__key;
2274
2274
  l && s.anchor.set(g, h + 2, "element"), a && s.focus.set(g, h + 2, "element");
2275
2275
  }
@@ -2278,11 +2278,11 @@ class or {
2278
2278
  insertBefore(e, t = !0) {
2279
2279
  de(), vr(this, e);
2280
2280
  const r = this.getWritable(), i = e.getWritable(), o = i.__key;
2281
- ot(i);
2281
+ st(i);
2282
2282
  const s = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
2283
2283
  s === null ? l.__first = o : s.getWritable().__next = o, l.__size++, r.__prev = o, i.__prev = a, i.__next = r.__key, i.__parent = r.__parent;
2284
2284
  const u = I();
2285
- return t && O(u) && Bn(u, this.getParentOrThrow(), c), e;
2285
+ return t && O(u) && zn(u, this.getParentOrThrow(), c), e;
2286
2286
  }
2287
2287
  isParentRequired() {
2288
2288
  return !1;
@@ -2372,16 +2372,16 @@ class cn extends or {
2372
2372
  }(e) ? null : { conversion: Oa, priority: 0 } };
2373
2373
  }
2374
2374
  static importJSON(e) {
2375
- return ct();
2375
+ return ut();
2376
2376
  }
2377
2377
  exportJSON() {
2378
2378
  return { type: "linebreak", version: 1 };
2379
2379
  }
2380
2380
  }
2381
2381
  function Oa(n) {
2382
- return { node: ct() };
2382
+ return { node: ut() };
2383
2383
  }
2384
- function ct() {
2384
+ function ut() {
2385
2385
  return an(new cn());
2386
2386
  }
2387
2387
  function qt(n) {
@@ -2416,7 +2416,7 @@ function $s(n, e, t, r, i) {
2416
2416
  e & u && o.remove(...s);
2417
2417
  }
2418
2418
  }
2419
- function Ws(n, e, t) {
2419
+ function Bs(n, e, t) {
2420
2420
  const r = e.firstChild, i = t.isComposing(), o = n + (i ? Zn : "");
2421
2421
  if (r == null)
2422
2422
  e.textContent = o;
@@ -2426,12 +2426,12 @@ function Ws(n, e, t) {
2426
2426
  if (i || Ye) {
2427
2427
  const [l, a, c] = function(u, d) {
2428
2428
  const f = u.length, h = d.length;
2429
- let g = 0, m = 0;
2429
+ let g = 0, _ = 0;
2430
2430
  for (; g < f && g < h && u[g] === d[g]; )
2431
2431
  g++;
2432
- for (; m + g < f && m + g < h && u[f - m - 1] === d[h - m - 1]; )
2433
- m++;
2434
- return [g, f - g - m, d.slice(g, h - m)];
2432
+ for (; _ + g < f && _ + g < h && u[f - _ - 1] === d[h - _ - 1]; )
2433
+ _++;
2434
+ return [g, f - g - _, d.slice(g, h - _)];
2435
2435
  }(s, o);
2436
2436
  a !== 0 && r.deleteData(l, a), r.insertData(l, c);
2437
2437
  } else
@@ -2439,7 +2439,7 @@ function Ws(n, e, t) {
2439
2439
  }
2440
2440
  }
2441
2441
  function uo(n, e, t, r, i, o) {
2442
- Ws(i, n, e);
2442
+ Bs(i, n, e);
2443
2443
  const s = o.theme.text;
2444
2444
  s !== void 0 && $s(0, 0, r, n, s);
2445
2445
  }
@@ -2447,12 +2447,12 @@ function vn(n, e) {
2447
2447
  const t = document.createElement(e);
2448
2448
  return t.appendChild(n), t;
2449
2449
  }
2450
- class Pt extends or {
2450
+ class Ot extends or {
2451
2451
  static getType() {
2452
2452
  return "text";
2453
2453
  }
2454
2454
  static clone(e) {
2455
- return new Pt(e.__text, e.__key);
2455
+ return new Ot(e.__text, e.__key);
2456
2456
  }
2457
2457
  afterCloneFrom(e) {
2458
2458
  super.afterCloneFrom(e), this.__format = e.__format, this.__style = e.__style, this.__mode = e.__mode, this.__detail = e.__detail;
@@ -2516,20 +2516,20 @@ class Pt extends or {
2516
2516
  if ((l === null ? c : l) !== (a === null ? u : a))
2517
2517
  return !0;
2518
2518
  if (l === a && c !== u) {
2519
- const m = t.firstChild;
2520
- m == null && R(48);
2521
- const _ = document.createElement(u);
2522
- return uo(_, this, 0, s, i, r), t.replaceChild(_, m), !1;
2519
+ const _ = t.firstChild;
2520
+ _ == null && R(48);
2521
+ const m = document.createElement(u);
2522
+ return uo(m, this, 0, s, i, r), t.replaceChild(m, _), !1;
2523
2523
  }
2524
2524
  let d = t;
2525
- a !== null && l !== null && (d = t.firstChild, d == null && R(49)), Ws(i, d, this);
2525
+ a !== null && l !== null && (d = t.firstChild, d == null && R(49)), Bs(i, d, this);
2526
2526
  const f = r.theme.text;
2527
2527
  f !== void 0 && o !== s && $s(0, o, s, d, f);
2528
2528
  const h = e.__style, g = this.__style;
2529
2529
  return h !== g && (t.style.cssText = g), !1;
2530
2530
  }
2531
2531
  static importDOM() {
2532
- return { "#text": () => ({ conversion: La, priority: 0 }), b: () => ({ conversion: Ra, priority: 0 }), code: () => ({ conversion: ze, priority: 0 }), em: () => ({ conversion: ze, priority: 0 }), i: () => ({ conversion: ze, priority: 0 }), s: () => ({ conversion: ze, priority: 0 }), span: () => ({ conversion: Da, priority: 0 }), strong: () => ({ conversion: ze, priority: 0 }), sub: () => ({ conversion: ze, priority: 0 }), sup: () => ({ conversion: ze, priority: 0 }), u: () => ({ conversion: ze, priority: 0 }) };
2532
+ return { "#text": () => ({ conversion: La, priority: 0 }), b: () => ({ conversion: Ra, priority: 0 }), code: () => ({ conversion: We, priority: 0 }), em: () => ({ conversion: We, priority: 0 }), i: () => ({ conversion: We, priority: 0 }), s: () => ({ conversion: We, priority: 0 }), span: () => ({ conversion: Da, priority: 0 }), strong: () => ({ conversion: We, priority: 0 }), sub: () => ({ conversion: We, priority: 0 }), sup: () => ({ conversion: We, priority: 0 }), u: () => ({ conversion: We, priority: 0 }) };
2533
2533
  }
2534
2534
  static importJSON(e) {
2535
2535
  const t = ie(e.text);
@@ -2637,14 +2637,14 @@ class Pt extends or {
2637
2637
  return [t];
2638
2638
  const d = l[0], f = t.getParent();
2639
2639
  let h;
2640
- const g = t.getFormat(), m = t.getStyle(), _ = t.__detail;
2640
+ const g = t.getFormat(), _ = t.getStyle(), m = t.__detail;
2641
2641
  let x = !1;
2642
- t.isSegmented() ? (h = ie(d), h.__format = g, h.__style = m, h.__detail = _, x = !0) : (h = t.getWritable(), h.__text = d);
2642
+ t.isSegmented() ? (h = ie(d), h.__format = g, h.__style = _, h.__detail = m, x = !0) : (h = t.getWritable(), h.__text = d);
2643
2643
  const v = I(), y = [h];
2644
2644
  let C = d.length;
2645
2645
  for (let T = 1; T < u; T++) {
2646
2646
  const w = l[T], P = w.length, E = ie(w).getWritable();
2647
- E.__format = g, E.__style = m, E.__detail = _;
2647
+ E.__format = g, E.__style = _, E.__detail = m;
2648
2648
  const k = E.__key, j = C + P;
2649
2649
  if (O(v)) {
2650
2650
  const M = v.anchor, Y = v.focus;
@@ -2658,7 +2658,7 @@ class Pt extends or {
2658
2658
  E !== null && Ln(E), k !== null && Ln(k);
2659
2659
  })(this);
2660
2660
  const T = f.getWritable(), w = this.getIndexWithinParent();
2661
- x ? (T.splice(w, 0, y), this.remove()) : T.splice(w, 1, y), O(v) && Bn(v, f, w, u - 1);
2661
+ x ? (T.splice(w, 0, y), this.remove()) : T.splice(w, 1, y), O(v) && zn(v, f, w, u - 1);
2662
2662
  }
2663
2663
  return y;
2664
2664
  }
@@ -2711,7 +2711,7 @@ function La(n) {
2711
2711
  const l = r[s];
2712
2712
  l === `
2713
2713
  ` || l === `\r
2714
- ` ? i.push(ct()) : l === " " ? i.push(fn()) : l !== "" && i.push(ie(l));
2714
+ ` ? i.push(ut()) : l === " " ? i.push(fn()) : l !== "" && i.push(ie(l));
2715
2715
  }
2716
2716
  return { node: i };
2717
2717
  }
@@ -2764,21 +2764,21 @@ function ho(n, e) {
2764
2764
  }
2765
2765
  }
2766
2766
  const Ia = { code: "code", em: "italic", i: "italic", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
2767
- function ze(n) {
2767
+ function We(n) {
2768
2768
  const e = Ia[n.nodeName.toLowerCase()];
2769
2769
  return e === void 0 ? { node: null } : { forChild: Si(n.style, e), node: null };
2770
2770
  }
2771
2771
  function ie(n = "") {
2772
- return an(new Pt(n));
2772
+ return an(new Ot(n));
2773
2773
  }
2774
2774
  function D(n) {
2775
- return n instanceof Pt;
2775
+ return n instanceof Ot;
2776
2776
  }
2777
2777
  function Si(n, e) {
2778
2778
  const t = n.fontWeight, r = n.textDecoration.split(" "), i = t === "700" || t === "bold", o = r.includes("line-through"), s = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
2779
2779
  return (c) => (D(c) && (i && !c.hasFormat("bold") && c.toggleFormat("bold"), o && !c.hasFormat("strikethrough") && c.toggleFormat("strikethrough"), s && !c.hasFormat("italic") && c.toggleFormat("italic"), l && !c.hasFormat("underline") && c.toggleFormat("underline"), a !== "sub" || c.hasFormat("subscript") || c.toggleFormat("subscript"), a !== "super" || c.hasFormat("superscript") || c.toggleFormat("superscript"), e && !c.hasFormat(e) && c.toggleFormat(e)), c);
2780
2780
  }
2781
- class un extends Pt {
2781
+ class un extends Ot {
2782
2782
  static getType() {
2783
2783
  return "tab";
2784
2784
  }
@@ -3021,7 +3021,7 @@ class Xe {
3021
3021
  return c;
3022
3022
  }
3023
3023
  applyDOMRange(e) {
3024
- const t = q(), r = t.getEditorState()._selection, i = zs(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
3024
+ const t = q(), r = t.getEditorState()._selection, i = Ws(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
3025
3025
  if (i === null)
3026
3026
  return;
3027
3027
  const [o, s] = i;
@@ -3047,16 +3047,16 @@ class Xe {
3047
3047
  const s = t[o];
3048
3048
  s === `
3049
3049
  ` || s === `\r
3050
- ` ? r.push(ct()) : s === " " ? r.push(fn()) : r.push(ie(s));
3050
+ ` ? r.push(ut()) : s === " " ? r.push(fn()) : r.push(ie(s));
3051
3051
  }
3052
3052
  this.insertNodes(r);
3053
3053
  }
3054
3054
  insertText(e) {
3055
3055
  const t = this.anchor, r = this.focus, i = this.format, o = this.style;
3056
3056
  let s = t, l = r;
3057
- !this.isCollapsed() && r.isBefore(t) && (s = r, l = t), s.type === "element" && function(_, x, v, y) {
3058
- const C = _.getNode(), T = C.getChildAtIndex(_.offset), w = ie(), P = oe(C) ? ke().append(w) : w;
3059
- w.setFormat(v), w.setStyle(y), T === null ? C.append(P) : T.insertBefore(P), _.is(x) && x.set(w.__key, 0, "text"), _.set(w.__key, 0, "text");
3057
+ !this.isCollapsed() && r.isBefore(t) && (s = r, l = t), s.type === "element" && function(m, x, v, y) {
3058
+ const C = m.getNode(), T = C.getChildAtIndex(m.offset), w = ie(), P = oe(C) ? ke().append(w) : w;
3059
+ w.setFormat(v), w.setStyle(y), T === null ? C.append(P) : T.insertBefore(P), m.is(x) && x.set(w.__key, 0, "text"), m.set(w.__key, 0, "text");
3060
3060
  }(s, l, i, o);
3061
3061
  const a = s.offset;
3062
3062
  let c = l.offset;
@@ -3064,30 +3064,30 @@ class Xe {
3064
3064
  let f = u[0];
3065
3065
  D(f) || R(26);
3066
3066
  const h = f.getTextContent().length, g = f.getParentOrThrow();
3067
- let m = u[d - 1];
3067
+ let _ = u[d - 1];
3068
3068
  if (d === 1 && l.type === "element" && (c = h, l.set(s.key, c, "text")), this.isCollapsed() && a === h && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !g.canInsertTextAfter() && f.getNextSibling() === null)) {
3069
- let _ = f.getNextSibling();
3070
- if (D(_) && _.canInsertTextBefore() && !Ie(_) || (_ = ie(), _.setFormat(i), _.setStyle(o), g.canInsertTextAfter() ? f.insertAfter(_) : g.insertAfter(_)), _.select(0, 0), f = _, e !== "")
3069
+ let m = f.getNextSibling();
3070
+ if (D(m) && m.canInsertTextBefore() && !Ie(m) || (m = ie(), m.setFormat(i), m.setStyle(o), g.canInsertTextAfter() ? f.insertAfter(m) : g.insertAfter(m)), m.select(0, 0), f = m, e !== "")
3071
3071
  return void this.insertText(e);
3072
3072
  } else if (this.isCollapsed() && a === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !g.canInsertTextBefore() && f.getPreviousSibling() === null)) {
3073
- let _ = f.getPreviousSibling();
3074
- if (D(_) && !Ie(_) || (_ = ie(), _.setFormat(i), g.canInsertTextBefore() ? f.insertBefore(_) : g.insertBefore(_)), _.select(), f = _, e !== "")
3073
+ let m = f.getPreviousSibling();
3074
+ if (D(m) && !Ie(m) || (m = ie(), m.setFormat(i), g.canInsertTextBefore() ? f.insertBefore(m) : g.insertBefore(m)), m.select(), f = m, e !== "")
3075
3075
  return void this.insertText(e);
3076
3076
  } else if (f.isSegmented() && a !== h) {
3077
- const _ = ie(f.getTextContent());
3078
- _.setFormat(i), f.replace(_), f = _;
3077
+ const m = ie(f.getTextContent());
3078
+ m.setFormat(i), f.replace(m), f = m;
3079
3079
  } else if (!this.isCollapsed() && e !== "") {
3080
- const _ = m.getParent();
3081
- if (!g.canInsertTextBefore() || !g.canInsertTextAfter() || b(_) && (!_.canInsertTextBefore() || !_.canInsertTextAfter()))
3082
- return this.insertText(""), Bs(this.anchor, this.focus, null), void this.insertText(e);
3080
+ const m = _.getParent();
3081
+ if (!g.canInsertTextBefore() || !g.canInsertTextAfter() || b(m) && (!m.canInsertTextBefore() || !m.canInsertTextAfter()))
3082
+ return this.insertText(""), zs(this.anchor, this.focus, null), void this.insertText(e);
3083
3083
  }
3084
3084
  if (d === 1) {
3085
3085
  if (f.isToken()) {
3086
3086
  const y = ie(e);
3087
3087
  return y.select(), void f.replace(y);
3088
3088
  }
3089
- const _ = f.getFormat(), x = f.getStyle();
3090
- if (a !== c || _ === i && x === o) {
3089
+ const m = f.getFormat(), x = f.getStyle();
3090
+ if (a !== c || m === i && x === o) {
3091
3091
  if (ja(f)) {
3092
3092
  const y = ie(e);
3093
3093
  return y.setFormat(i), y.setStyle(o), y.select(), void f.replace(y);
@@ -3106,27 +3106,27 @@ class Xe {
3106
3106
  f.setFormat(i), f.setStyle(o);
3107
3107
  }
3108
3108
  const v = c - a;
3109
- f = f.spliceText(a, v, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = _, this.style = x));
3109
+ f = f.spliceText(a, v, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = m, this.style = x));
3110
3110
  } else {
3111
- const _ = /* @__PURE__ */ new Set([...f.getParentKeys(), ...m.getParentKeys()]), x = b(f) ? f : f.getParentOrThrow();
3112
- let v = b(m) ? m : m.getParentOrThrow(), y = m;
3111
+ const m = /* @__PURE__ */ new Set([...f.getParentKeys(), ..._.getParentKeys()]), x = b(f) ? f : f.getParentOrThrow();
3112
+ let v = b(_) ? _ : _.getParentOrThrow(), y = _;
3113
3113
  if (!x.is(v) && v.isInline())
3114
3114
  do
3115
3115
  y = v, v = v.getParentOrThrow();
3116
3116
  while (v.isInline());
3117
- if (l.type === "text" && (c !== 0 || m.getTextContent() === "") || l.type === "element" && m.getIndexWithinParent() < c)
3118
- if (D(m) && !m.isToken() && c !== m.getTextContentSize()) {
3119
- if (m.isSegmented()) {
3120
- const E = ie(m.getTextContent());
3121
- m.replace(E), m = E;
3117
+ if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c)
3118
+ if (D(_) && !_.isToken() && c !== _.getTextContentSize()) {
3119
+ if (_.isSegmented()) {
3120
+ const E = ie(_.getTextContent());
3121
+ _.replace(E), _ = E;
3122
3122
  }
3123
- oe(l.getNode()) || l.type !== "text" || (m = m.spliceText(0, c, "")), _.add(m.__key);
3123
+ oe(l.getNode()) || l.type !== "text" || (_ = _.spliceText(0, c, "")), m.add(_.__key);
3124
3124
  } else {
3125
- const E = m.getParentOrThrow();
3126
- E.canBeEmpty() || E.getChildrenSize() !== 1 ? m.remove() : E.remove();
3125
+ const E = _.getParentOrThrow();
3126
+ E.canBeEmpty() || E.getChildrenSize() !== 1 ? _.remove() : E.remove();
3127
3127
  }
3128
3128
  else
3129
- _.add(m.__key);
3129
+ m.add(_.__key);
3130
3130
  const C = v.getChildren(), T = new Set(u), w = x.is(v), P = x.isInline() && f.getNextSibling() === null ? x : f;
3131
3131
  for (let E = C.length - 1; E >= 0; E--) {
3132
3132
  const k = C[E];
@@ -3138,7 +3138,7 @@ class Xe {
3138
3138
  let E = v, k = null;
3139
3139
  for (; E !== null; ) {
3140
3140
  const j = E.getChildren(), M = j.length;
3141
- (M === 0 || j[M - 1].is(k)) && (_.delete(E.__key), k = E), E = E.getParent();
3141
+ (M === 0 || j[M - 1].is(k)) && (m.delete(E.__key), k = E), E = E.getParent();
3142
3142
  }
3143
3143
  }
3144
3144
  if (f.isToken())
@@ -3152,7 +3152,7 @@ class Xe {
3152
3152
  f = f.spliceText(a, h - a, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
3153
3153
  for (let E = 1; E < d; E++) {
3154
3154
  const k = u[E], j = k.__key;
3155
- _.has(j) || k.remove();
3155
+ m.has(j) || k.remove();
3156
3156
  }
3157
3157
  }
3158
3158
  }
@@ -3173,27 +3173,27 @@ class Xe {
3173
3173
  if (a.type === "text" && f === d.getTextContentSize() && (u = 1, d = r[1], f = 0), d == null)
3174
3174
  return;
3175
3175
  const h = d.getFormatFlags(e, null), g = i - 1;
3176
- let m = r[g];
3177
- const _ = c.type === "text" ? c.offset : m.getTextContentSize();
3178
- if (d.is(m)) {
3179
- if (f === _)
3176
+ let _ = r[g];
3177
+ const m = c.type === "text" ? c.offset : _.getTextContentSize();
3178
+ if (d.is(_)) {
3179
+ if (f === m)
3180
3180
  return;
3181
- if (Ie(d) || f === 0 && _ === d.getTextContentSize())
3181
+ if (Ie(d) || f === 0 && m === d.getTextContentSize())
3182
3182
  d.setFormat(h);
3183
3183
  else {
3184
- const v = d.splitText(f, _), y = f === 0 ? v[0] : v[1];
3185
- y.setFormat(h), a.type === "text" && a.set(y.__key, 0, "text"), c.type === "text" && c.set(y.__key, _ - f, "text");
3184
+ const v = d.splitText(f, m), y = f === 0 ? v[0] : v[1];
3185
+ y.setFormat(h), a.type === "text" && a.set(y.__key, 0, "text"), c.type === "text" && c.set(y.__key, m - f, "text");
3186
3186
  }
3187
3187
  return void (this.format = h);
3188
3188
  }
3189
3189
  f === 0 || Ie(d) || ([, d] = d.splitText(f), f = 0), d.setFormat(h);
3190
- const x = m.getFormatFlags(e, h);
3191
- _ > 0 && (_ === m.getTextContentSize() || Ie(m) || ([m] = m.splitText(_)), m.setFormat(x));
3190
+ const x = _.getFormatFlags(e, h);
3191
+ m > 0 && (m === _.getTextContentSize() || Ie(_) || ([_] = _.splitText(m)), _.setFormat(x));
3192
3192
  for (let v = u + 1; v < g; v++) {
3193
3193
  const y = r[v], C = y.getFormatFlags(e, x);
3194
3194
  y.setFormat(C);
3195
3195
  }
3196
- a.type === "text" && a.set(d.__key, f, "text"), c.type === "text" && c.set(m.__key, _, "text"), this.format = h | x;
3196
+ a.type === "text" && a.set(d.__key, f, "text"), c.type === "text" && c.set(_.__key, m, "text"), this.format = h | x;
3197
3197
  }
3198
3198
  insertNodes(e) {
3199
3199
  if (e.length === 0)
@@ -3203,7 +3203,7 @@ class Xe {
3203
3203
  const h = I();
3204
3204
  return O(h) || R(134), h.insertNodes(e);
3205
3205
  }
3206
- const t = br((this.isBackward() ? this.focus : this.anchor).getNode(), xt), r = e[e.length - 1];
3206
+ const t = br((this.isBackward() ? this.focus : this.anchor).getNode(), bt), r = e[e.length - 1];
3207
3207
  if ("__language" in t && b(t)) {
3208
3208
  if ("__language" in e[0])
3209
3209
  this.insertText(e[0].getTextContent());
@@ -3220,32 +3220,32 @@ class Xe {
3220
3220
  }
3221
3221
  const i = function(h) {
3222
3222
  const g = ke();
3223
- let m = null;
3224
- for (let _ = 0; _ < h.length; _++) {
3225
- const x = h[_], v = qt(x);
3223
+ let _ = null;
3224
+ for (let m = 0; m < h.length; m++) {
3225
+ const x = h[m], v = qt(x);
3226
3226
  if (v || V(x) && x.isInline() || b(x) && x.isInline() || D(x) || x.isParentRequired()) {
3227
- if (m === null && (m = x.createParentElementNode(), g.append(m), v))
3227
+ if (_ === null && (_ = x.createParentElementNode(), g.append(_), v))
3228
3228
  continue;
3229
- m !== null && m.append(x);
3229
+ _ !== null && _.append(x);
3230
3230
  } else
3231
- g.append(x), m = null;
3231
+ g.append(x), _ = null;
3232
3232
  }
3233
3233
  return g;
3234
3234
  }(e), o = i.getLastDescendant(), s = i.getChildren(), l = !b(t) || !t.isEmpty() ? this.insertParagraph() : null, a = s[s.length - 1];
3235
3235
  let c = s[0];
3236
3236
  var u;
3237
- b(u = c) && xt(u) && !u.isEmpty() && b(t) && (!t.isEmpty() || t.canMergeWhenEmpty()) && (b(t) || R(135), t.append(...c.getChildren()), c = s[1]), c && function(h, g, m) {
3238
- const _ = g.getParentOrThrow().getLastChild();
3237
+ b(u = c) && bt(u) && !u.isEmpty() && b(t) && (!t.isEmpty() || t.canMergeWhenEmpty()) && (b(t) || R(135), t.append(...c.getChildren()), c = s[1]), c && function(h, g, _) {
3238
+ const m = g.getParentOrThrow().getLastChild();
3239
3239
  let x = g;
3240
3240
  const v = [g];
3241
- for (; x !== _; )
3241
+ for (; x !== m; )
3242
3242
  x.getNextSibling() || R(140), x = x.getNextSibling(), v.push(x);
3243
3243
  let y = h;
3244
3244
  for (const C of v)
3245
3245
  y = y.insertAfter(C);
3246
3246
  }(t, c);
3247
- const d = br(o, xt);
3248
- l && b(d) && (l.canMergeWhenEmpty() || xt(a)) && (d.append(...l.getChildren()), l.remove()), b(t) && t.isEmpty() && t.remove(), o.selectEnd();
3247
+ const d = br(o, bt);
3248
+ l && b(d) && (l.canMergeWhenEmpty() || bt(a)) && (d.append(...l.getChildren()), l.remove()), b(t) && t.isEmpty() && t.remove(), o.selectEnd();
3249
3249
  const f = b(t) ? t.getLastChild() : null;
3250
3250
  qt(f) && d !== t && f.remove();
3251
3251
  }
@@ -3254,13 +3254,13 @@ class Xe {
3254
3254
  const s = ke();
3255
3255
  return Q().splice(this.anchor.offset, 0, [s]), s.select(), s;
3256
3256
  }
3257
- const e = Er(this), t = br(this.anchor.getNode(), xt);
3257
+ const e = Er(this), t = br(this.anchor.getNode(), bt);
3258
3258
  b(t) || R(136);
3259
3259
  const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], o = t.insertNewAfter(this, !1);
3260
3260
  return o ? (o.append(...i), o.selectStart(), o) : null;
3261
3261
  }
3262
3262
  insertLineBreak(e) {
3263
- const t = ct();
3263
+ const t = ut();
3264
3264
  if (this.insertNodes([t]), e) {
3265
3265
  const r = t.getParentOrThrow(), i = t.getIndexWithinParent();
3266
3266
  r.select(i, i);
@@ -3304,31 +3304,31 @@ class Xe {
3304
3304
  }
3305
3305
  {
3306
3306
  const h = l.getParentOrThrow();
3307
- let g, m;
3308
- return b(f) ? (m = f.__key, g = t ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), m = h.__key, t || g++), i.set(m, g, "element"), void (s && o.set(m, g, "element"));
3307
+ let g, _;
3308
+ return b(f) ? (_ = f.__key, g = t ? f.getChildrenSize() : 0) : (g = l.getIndexWithinParent(), _ = h.__key, t || g++), i.set(_, g, "element"), void (s && o.set(_, g, "element"));
3309
3309
  }
3310
3310
  }
3311
3311
  const a = q(), c = Ne(a._window);
3312
3312
  if (!c)
3313
3313
  return;
3314
3314
  const u = a._blockCursorElement, d = a._rootElement;
3315
- if (d === null || u === null || !b(l) || l.isInline() || l.canBeEmpty() || Ci(u, a, d), function(f, h, g, m) {
3316
- f.modify(h, g, m);
3315
+ if (d === null || u === null || !b(l) || l.isInline() || l.canBeEmpty() || Ci(u, a, d), function(f, h, g, _) {
3316
+ f.modify(h, g, _);
3317
3317
  }(c, e, t ? "backward" : "forward", r), c.rangeCount > 0) {
3318
3318
  const f = c.getRangeAt(0), h = this.anchor.getNode(), g = oe(h) ? h : xa(h);
3319
3319
  if (this.applyDOMRange(f), this.dirty = !0, !s) {
3320
- const m = this.getNodes(), _ = [];
3320
+ const _ = this.getNodes(), m = [];
3321
3321
  let x = !1;
3322
- for (let v = 0; v < m.length; v++) {
3323
- const y = m[v];
3324
- jr(y, g) ? _.push(y) : x = !0;
3322
+ for (let v = 0; v < _.length; v++) {
3323
+ const y = _[v];
3324
+ jr(y, g) ? m.push(y) : x = !0;
3325
3325
  }
3326
- if (x && _.length > 0)
3326
+ if (x && m.length > 0)
3327
3327
  if (t) {
3328
- const v = _[0];
3328
+ const v = m[0];
3329
3329
  b(v) ? v.selectStart() : v.getParentOrThrow().selectStart();
3330
3330
  } else {
3331
- const v = _[_.length - 1];
3331
+ const v = m[m.length - 1];
3332
3332
  b(v) ? v.selectEnd() : v.getParentOrThrow().selectEnd();
3333
3333
  }
3334
3334
  c.anchorNode === f.startContainer && c.anchorOffset === f.startOffset || function(v) {
@@ -3373,16 +3373,16 @@ class Xe {
3373
3373
  if (i = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
3374
3374
  const a = o.offset, c = l.getTextContentSize();
3375
3375
  if (l.is(i) || e && a !== c || !e && a !== 0)
3376
- return void mo(l, e, a);
3376
+ return void _o(l, e, a);
3377
3377
  } else if (i !== null && i.isSegmented()) {
3378
3378
  const a = r.offset, c = i.getTextContentSize();
3379
3379
  if (i.is(l) || e && a !== 0 || !e && a !== c)
3380
- return void mo(i, e, a);
3380
+ return void _o(i, e, a);
3381
3381
  }
3382
3382
  (function(a, c) {
3383
3383
  const u = a.anchor, d = a.focus, f = u.getNode(), h = d.getNode();
3384
3384
  if (f === h && u.type === "text" && d.type === "text") {
3385
- const g = u.offset, m = d.offset, _ = g < m, x = _ ? g : m, v = _ ? m : g, y = v - 1;
3385
+ const g = u.offset, _ = d.offset, m = g < _, x = m ? g : _, v = m ? _ : g, y = v - 1;
3386
3386
  x !== y && (bs(f.getTextContent().slice(x, v)) || (c ? d.offset = y : u.offset = y));
3387
3387
  }
3388
3388
  })(this, e);
@@ -3436,7 +3436,7 @@ function qr(n) {
3436
3436
  const [t, r] = e;
3437
3437
  return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [po(t), po(r)];
3438
3438
  }
3439
- function mo(n, e, t) {
3439
+ function _o(n, e, t) {
3440
3440
  const r = n, i = r.getTextContent().split(/(?=\s)/g), o = i.length;
3441
3441
  let s = 0, l = 0;
3442
3442
  for (let c = 0; c < o; c++) {
@@ -3449,7 +3449,7 @@ function mo(n, e, t) {
3449
3449
  const a = i.join("").trim();
3450
3450
  a === "" ? r.remove() : (r.setTextContent(a), r.select(l, l));
3451
3451
  }
3452
- function _o(n, e, t, r) {
3452
+ function mo(n, e, t, r) {
3453
3453
  let i, o = e;
3454
3454
  if (n.nodeType === sn) {
3455
3455
  let s = !1;
@@ -3462,18 +3462,18 @@ function _o(n, e, t, r) {
3462
3462
  const f = c.parentNode;
3463
3463
  n === f && e > Array.prototype.indexOf.call(f.children, c) && o--;
3464
3464
  }
3465
- if (i = Ct(u), D(i))
3465
+ if (i = wt(u), D(i))
3466
3466
  o = Zi(i, s);
3467
3467
  else {
3468
- let f = Ct(n);
3468
+ let f = wt(n);
3469
3469
  if (f === null)
3470
3470
  return null;
3471
3471
  if (b(f)) {
3472
3472
  o = Math.min(f.getChildrenSize(), o);
3473
3473
  let h = f.getChildAtIndex(o);
3474
- if (b(h) && function(g, m, _) {
3474
+ if (b(h) && function(g, _, m) {
3475
3475
  const x = g.getParent();
3476
- return _ === null || x === null || !x.canBeEmpty() || x !== _.getNode();
3476
+ return m === null || x === null || !x.canBeEmpty() || x !== m.getNode();
3477
3477
  }(h, 0, t)) {
3478
3478
  const g = s ? h.getLastDescendant() : h.getFirstDescendant();
3479
3479
  g === null ? f = h : (h = g, f = b(h) ? h : h.getParentOrThrow()), o = 0;
@@ -3481,13 +3481,13 @@ function _o(n, e, t, r) {
3481
3481
  D(h) ? (i = h, f = null, o = Zi(h, s)) : h !== f && s && !d && o++;
3482
3482
  } else {
3483
3483
  const h = f.getIndexWithinParent();
3484
- o = e === 0 && V(f) && Ct(n) === f ? h : h + 1, f = f.getParentOrThrow();
3484
+ o = e === 0 && V(f) && wt(n) === f ? h : h + 1, f = f.getParentOrThrow();
3485
3485
  }
3486
3486
  if (b(f))
3487
3487
  return Pe(f.__key, o, "element");
3488
3488
  }
3489
3489
  } else
3490
- i = Ct(n);
3490
+ i = wt(n);
3491
3491
  return D(i) ? Pe(i.__key, o, "text") : null;
3492
3492
  }
3493
3493
  function yo(n, e, t) {
@@ -3511,7 +3511,7 @@ function yo(n, e, t) {
3511
3511
  }
3512
3512
  }
3513
3513
  }
3514
- function Bs(n, e, t) {
3514
+ function zs(n, e, t) {
3515
3515
  if (n.type === "text" && e.type === "text") {
3516
3516
  const r = n.isBefore(e), i = n.is(e);
3517
3517
  yo(n, r, i), yo(e, !r, i), i && (e.key = n.key, e.offset = n.offset, e.type = n.type);
@@ -3522,21 +3522,21 @@ function Bs(n, e, t) {
3522
3522
  }
3523
3523
  }
3524
3524
  }
3525
- function zs(n, e, t, r, i, o) {
3525
+ function Ws(n, e, t, r, i, o) {
3526
3526
  if (n === null || t === null || !ln(i, n, t))
3527
3527
  return null;
3528
- const s = _o(n, e, O(o) ? o.anchor : null, i);
3528
+ const s = mo(n, e, O(o) ? o.anchor : null, i);
3529
3529
  if (s === null)
3530
3530
  return null;
3531
- const l = _o(t, r, O(o) ? o.focus : null, i);
3531
+ const l = mo(t, r, O(o) ? o.focus : null, i);
3532
3532
  if (l === null)
3533
3533
  return null;
3534
3534
  if (s.type === "element" && l.type === "element") {
3535
- const a = Ct(n), c = Ct(t);
3535
+ const a = wt(n), c = wt(t);
3536
3536
  if (V(a) && V(c))
3537
3537
  return null;
3538
3538
  }
3539
- return Bs(s, l, o), [s, l];
3539
+ return zs(s, l, o), [s, l];
3540
3540
  }
3541
3541
  function Gr(n) {
3542
3542
  return b(n) && !n.isInline();
@@ -3564,11 +3564,11 @@ function Ti(n, e, t, r) {
3564
3564
  return null;
3565
3565
  if (c = e.anchorNode, u = e.focusNode, d = e.anchorOffset, f = e.focusOffset, l && O(n) && !ln(t, c, u))
3566
3566
  return n.clone();
3567
- const h = zs(c, d, u, f, t, n);
3567
+ const h = Ws(c, d, u, f, t, n);
3568
3568
  if (h === null)
3569
3569
  return null;
3570
- const [g, m] = h;
3571
- return new Xe(g, m, O(n) ? n.format : 0, O(n) ? n.style : "");
3570
+ const [g, _] = h;
3571
+ return new Xe(g, _, O(n) ? n.format : 0, O(n) ? n.style : "");
3572
3572
  }
3573
3573
  function I() {
3574
3574
  return $e()._selection;
@@ -3576,7 +3576,7 @@ function I() {
3576
3576
  function dn() {
3577
3577
  return q()._editorState._selection;
3578
3578
  }
3579
- function Bn(n, e, t, r = 1) {
3579
+ function zn(n, e, t, r = 1) {
3580
3580
  const i = n.anchor, o = n.focus, s = i.getNode(), l = o.getNode();
3581
3581
  if (!e.is(s) && !e.is(l))
3582
3582
  return;
@@ -3627,7 +3627,7 @@ function xo(n) {
3627
3627
  }
3628
3628
  }
3629
3629
  }
3630
- function zn(n, e, t, r, i) {
3630
+ function Wn(n, e, t, r, i) {
3631
3631
  let o = null, s = 0, l = null;
3632
3632
  r !== null ? (o = r.__key, D(r) ? (s = r.getTextContentSize(), l = "text") : b(r) && (s = r.getChildrenSize(), l = "element")) : i !== null && (o = i.__key, D(i) ? l = "text" : b(i) && (l = "element")), o !== null && l !== null ? n.set(o, s, l) : (s = e.getIndexWithinParent(), s === -1 && (s = t.getChildrenSize()), n.set(t.__key, s, "element"));
3633
3633
  }
@@ -3636,14 +3636,14 @@ function bo(n, e, t, r, i) {
3636
3636
  }
3637
3637
  function $a(n, e, t, r, i, o, s) {
3638
3638
  const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, d = document.activeElement;
3639
- if (i.has("collaboration") && d !== o || d !== null && mi(d))
3639
+ if (i.has("collaboration") && d !== o || d !== null && _i(d))
3640
3640
  return;
3641
3641
  if (!O(e))
3642
3642
  return void (n !== null && ln(t, l, a) && r.removeAllRanges());
3643
- const f = e.anchor, h = e.focus, g = f.key, m = h.key, _ = In(t, g), x = In(t, m), v = f.offset, y = h.offset, C = e.format, T = e.style, w = e.isCollapsed();
3644
- let P = _, E = x, k = !1;
3643
+ const f = e.anchor, h = e.focus, g = f.key, _ = h.key, m = In(t, g), x = In(t, _), v = f.offset, y = h.offset, C = e.format, T = e.style, w = e.isCollapsed();
3644
+ let P = m, E = x, k = !1;
3645
3645
  if (f.type === "text") {
3646
- P = An(_);
3646
+ P = An(m);
3647
3647
  const H = f.getNode();
3648
3648
  k = H.getFormat() !== C || H.getStyle() !== T;
3649
3649
  } else
@@ -3663,32 +3663,32 @@ function $a(n, e, t, r, i, o, s) {
3663
3663
  Oe.selectNode(H), se = Oe.getBoundingClientRect();
3664
3664
  } else
3665
3665
  se = H.getBoundingClientRect();
3666
- (function(Oe, We, Lt) {
3666
+ (function(Oe, Be, Lt) {
3667
3667
  const It = Lt.ownerDocument, jt = It.defaultView;
3668
3668
  if (jt === null)
3669
3669
  return;
3670
- let { top: ft, bottom: dt } = We, ht = 0, gt = 0, me = Lt;
3671
- for (; me !== null; ) {
3672
- const Ze = me === It.body;
3673
- if (Ze)
3674
- ht = 0, gt = nr(Oe).innerHeight;
3670
+ let { top: dt, bottom: ht } = Be, gt = 0, pt = 0, _e = Lt;
3671
+ for (; _e !== null; ) {
3672
+ const Qe = _e === It.body;
3673
+ if (Qe)
3674
+ gt = 0, pt = nr(Oe).innerHeight;
3675
3675
  else {
3676
- const Be = me.getBoundingClientRect();
3677
- ht = Be.top, gt = Be.bottom;
3676
+ const ze = _e.getBoundingClientRect();
3677
+ gt = ze.top, pt = ze.bottom;
3678
3678
  }
3679
3679
  let Se = 0;
3680
- if (ft < ht ? Se = -(ht - ft) : dt > gt && (Se = dt - gt), Se !== 0)
3681
- if (Ze)
3680
+ if (dt < gt ? Se = -(gt - dt) : ht > pt && (Se = ht - pt), Se !== 0)
3681
+ if (Qe)
3682
3682
  jt.scrollBy(0, Se);
3683
3683
  else {
3684
- const Be = me.scrollTop;
3685
- me.scrollTop += Se;
3686
- const Qe = me.scrollTop - Be;
3687
- ft -= Qe, dt -= Qe;
3684
+ const ze = _e.scrollTop;
3685
+ _e.scrollTop += Se;
3686
+ const et = _e.scrollTop - ze;
3687
+ dt -= et, ht -= et;
3688
3688
  }
3689
- if (Ze)
3689
+ if (Qe)
3690
3690
  break;
3691
- me = tr(me);
3691
+ _e = tr(_e);
3692
3692
  }
3693
3693
  })(t, se, o);
3694
3694
  }
@@ -3696,7 +3696,7 @@ function $a(n, e, t, r, i, o, s) {
3696
3696
  Jr = !0;
3697
3697
  }
3698
3698
  }
3699
- function Wa(n) {
3699
+ function Ba(n) {
3700
3700
  let e = I() || dn();
3701
3701
  e === null && (e = Q().selectEnd()), e.insertNodes(n);
3702
3702
  }
@@ -3707,11 +3707,11 @@ function Er(n) {
3707
3707
  O(t) && (e = t), O(e) || R(161);
3708
3708
  const r = e.anchor;
3709
3709
  let i = r.getNode(), o = r.offset;
3710
- for (; !xt(i); )
3711
- [i, o] = Ba(i, o);
3710
+ for (; !bt(i); )
3711
+ [i, o] = za(i, o);
3712
3712
  return o;
3713
3713
  }
3714
- function Ba(n, e) {
3714
+ function za(n, e) {
3715
3715
  const t = n.getParent();
3716
3716
  if (!t) {
3717
3717
  const i = ke();
@@ -3756,7 +3756,7 @@ function Vs() {
3756
3756
  if (typeof window < "u")
3757
3757
  for (const i of document.querySelectorAll("[contenteditable]")) {
3758
3758
  const o = Qn(i);
3759
- if (_i(o))
3759
+ if (mi(o))
3760
3760
  n++;
3761
3761
  else if (o) {
3762
3762
  let s = String(o.constructor.version || "<0.17.1");
@@ -3766,7 +3766,7 @@ function Vs() {
3766
3766
  let r = ` Detected on the page: ${n} compatible editor(s) with version ${t}`;
3767
3767
  return e.size && (r += ` and incompatible editors with versions ${Array.from(e).join(", ")}`), r;
3768
3768
  }
3769
- function za() {
3769
+ function Wa() {
3770
3770
  return ne;
3771
3771
  }
3772
3772
  function wo(n, e, t) {
@@ -3812,7 +3812,7 @@ function Je(n, e) {
3812
3812
  const t = n._pendingEditorState, r = n._rootElement, i = n._headless || r === null;
3813
3813
  if (t === null)
3814
3814
  return;
3815
- const o = n._editorState, s = o._selection, l = t._selection, a = n._dirtyType !== st, c = te, u = he, d = ne, f = n._updating, h = n._observer;
3815
+ const o = n._editorState, s = o._selection, l = t._selection, a = n._dirtyType !== lt, c = te, u = he, d = ne, f = n._updating, h = n._observer;
3816
3816
  let g = null;
3817
3817
  if (n._pendingEditorState = null, n._editorState = t, !i && a && h !== null) {
3818
3818
  ne = n, te = t, he = !1, n._updating = !0;
@@ -3822,14 +3822,14 @@ function Je(n, e) {
3822
3822
  } catch (w) {
3823
3823
  if (w instanceof Error && n._onError(w), Nr)
3824
3824
  throw w;
3825
- return qs(n, null, r, t), ps(n), n._dirtyType = kt, Nr = !0, Je(n, o), void (Nr = !1);
3825
+ return qs(n, null, r, t), ps(n), n._dirtyType = Et, Nr = !0, Je(n, o), void (Nr = !1);
3826
3826
  } finally {
3827
3827
  h.observe(r, Co), n._updating = f, te = c, he = u, ne = d;
3828
3828
  }
3829
3829
  }
3830
3830
  t._readOnly || (t._readOnly = !0);
3831
- const m = n._dirtyLeaves, _ = n._dirtyElements, x = n._normalizedNodes, v = n._updateTags, y = n._deferred;
3832
- a && (n._dirtyType = st, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(w, P) {
3831
+ const _ = n._dirtyLeaves, m = n._dirtyElements, x = n._normalizedNodes, v = n._updateTags, y = n._deferred;
3832
+ a && (n._dirtyType = lt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(w, P) {
3833
3833
  const E = w._decorators;
3834
3834
  let k = w._pendingDecorators || E;
3835
3835
  const j = P._nodeMap;
@@ -3856,12 +3856,12 @@ function Je(n, e) {
3856
3856
  const [$, H] = M[J], se = P.get(H);
3857
3857
  se !== void 0 && $(se, { dirtyLeaves: k, prevEditorState: j, updateTags: E });
3858
3858
  }
3859
- }(n, g, v, m, o), O(l) || l === null || s !== null && s.is(l) || n.dispatchCommand(Hn, void 0);
3859
+ }(n, g, v, _, o), O(l) || l === null || s !== null && s.is(l) || n.dispatchCommand(Hn, void 0);
3860
3860
  const T = n._pendingDecorators;
3861
3861
  T !== null && (n._decorators = T, n._pendingDecorators = null, Gt("decorator", n, !0, T)), function(w, P, E) {
3862
3862
  const k = Xi(P), j = Xi(E);
3863
3863
  k !== j && Gt("textcontent", w, !0, j);
3864
- }(n, e || o, t), Gt("update", n, !0, { dirtyElements: _, dirtyLeaves: m, editorState: t, normalizedNodes: x, prevEditorState: e || o, tags: v }), function(w, P) {
3864
+ }(n, e || o, t), Gt("update", n, !0, { dirtyElements: m, dirtyLeaves: _, editorState: t, normalizedNodes: x, prevEditorState: e || o, tags: v }), function(w, P) {
3865
3865
  if (w._deferred = [], P.length !== 0) {
3866
3866
  const E = w._updating;
3867
3867
  w._updating = !0;
@@ -3951,7 +3951,7 @@ function Hs(n, e, t) {
3951
3951
  const y = v.getEditorState()._selection, C = Ne(v._window);
3952
3952
  return O(y) || y == null ? Ti(y, C, v, null) : y.clone();
3953
3953
  }(n));
3954
- const _ = n._compositionKey;
3954
+ const m = n._compositionKey;
3955
3955
  e(), s = ko(n, s), function(v, y) {
3956
3956
  const C = y.getEditorState()._selection, T = v._selection;
3957
3957
  if (O(T)) {
@@ -3962,7 +3962,7 @@ function Hs(n, e, t) {
3962
3962
  E !== k && k.selectionTransform(C, T);
3963
3963
  }
3964
3964
  }
3965
- }(c, n), n._dirtyType !== st && (s ? function(v, y) {
3965
+ }(c, n), n._dirtyType !== lt && (s ? function(v, y) {
3966
3966
  const C = y._dirtyLeaves, T = v._nodeMap;
3967
3967
  for (const w of C) {
3968
3968
  const P = T.get(w);
@@ -4006,20 +4006,20 @@ function Hs(n, e, t) {
4006
4006
  const j = P.get(k);
4007
4007
  j === void 0 || j.isAttached() || (w.has(k) || C.delete(k), P.delete(k));
4008
4008
  }
4009
- }(a, c, n._dirtyLeaves, n._dirtyElements)), _ !== n._compositionKey && (c._flushSync = !0);
4009
+ }(a, c, n._dirtyLeaves, n._dirtyElements)), m !== n._compositionKey && (c._flushSync = !0);
4010
4010
  const x = c._selection;
4011
4011
  if (O(x)) {
4012
4012
  const v = c._nodeMap, y = x.anchor.key, C = x.focus.key;
4013
4013
  v.get(y) !== void 0 && v.get(C) !== void 0 || R(19);
4014
4014
  } else
4015
4015
  xe(x) && x._nodes.size === 0 && (c._selection = null);
4016
- } catch (_) {
4017
- return _ instanceof Error && n._onError(_), n._pendingEditorState = a, n._dirtyType = kt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void Je(n);
4016
+ } catch (m) {
4017
+ return m instanceof Error && n._onError(m), n._pendingEditorState = a, n._dirtyType = Et, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void Je(n);
4018
4018
  } finally {
4019
4019
  te = d, he = f, ne = h, n._updating = g, kn = 0;
4020
4020
  }
4021
- n._dirtyType !== st || function(_, x) {
4022
- const v = x.getEditorState()._selection, y = _._selection;
4021
+ n._dirtyType !== lt || function(m, x) {
4022
+ const v = x.getEditorState()._selection, y = m._selection;
4023
4023
  if (y !== null) {
4024
4024
  if (y.dirty || !y.is(v))
4025
4025
  return !0;
@@ -4244,42 +4244,42 @@ class gn extends or {
4244
4244
  }
4245
4245
  if (t > 0) {
4246
4246
  let g = d === null ? this.getFirstChild() : d.getNextSibling();
4247
- for (let m = 0; m < t; m++) {
4247
+ for (let _ = 0; _ < t; _++) {
4248
4248
  g === null && R(100);
4249
- const _ = g.getNextSibling(), x = g.__key;
4250
- ot(g.getWritable()), c.push(x), g = _;
4249
+ const m = g.getNextSibling(), x = g.__key;
4250
+ st(g.getWritable()), c.push(x), g = m;
4251
4251
  }
4252
4252
  }
4253
4253
  let h = d;
4254
4254
  for (let g = 0; g < i; g++) {
4255
- const m = r[g];
4256
- h !== null && m.is(h) && (d = h = h.getPreviousSibling());
4257
- const _ = m.getWritable();
4258
- _.__parent === l && f--, ot(_);
4259
- const x = m.__key;
4255
+ const _ = r[g];
4256
+ h !== null && _.is(h) && (d = h = h.getPreviousSibling());
4257
+ const m = _.getWritable();
4258
+ m.__parent === l && f--, st(m);
4259
+ const x = _.__key;
4260
4260
  if (h === null)
4261
- s.__first = x, _.__prev = null;
4261
+ s.__first = x, m.__prev = null;
4262
4262
  else {
4263
4263
  const v = h.getWritable();
4264
- v.__next = x, _.__prev = v.__key;
4264
+ v.__next = x, m.__prev = v.__key;
4265
4265
  }
4266
- m.__key === l && R(76), _.__parent = l, a.push(x), h = m;
4266
+ _.__key === l && R(76), m.__parent = l, a.push(x), h = _;
4267
4267
  }
4268
4268
  if (e + t === o)
4269
4269
  h !== null && (h.getWritable().__next = null, s.__last = h.__key);
4270
4270
  else if (u !== null) {
4271
4271
  const g = u.getWritable();
4272
4272
  if (h !== null) {
4273
- const m = h.getWritable();
4274
- g.__prev = h.__key, m.__next = u.__key;
4273
+ const _ = h.getWritable();
4274
+ g.__prev = h.__key, _.__next = u.__key;
4275
4275
  } else
4276
4276
  g.__prev = null;
4277
4277
  }
4278
4278
  if (s.__size = f, c.length) {
4279
4279
  const g = I();
4280
4280
  if (O(g)) {
4281
- const m = new Set(c), _ = new Set(a), { anchor: x, focus: v } = g;
4282
- Eo(x, m, _) && zn(x, x.getNode(), this, d, u), Eo(v, m, _) && zn(v, v.getNode(), this, d, u), f !== 0 || this.canBeEmpty() || Nt(this) || this.remove();
4281
+ const _ = new Set(c), m = new Set(a), { anchor: x, focus: v } = g;
4282
+ Eo(x, _, m) && Wn(x, x.getNode(), this, d, u), Eo(v, _, m) && Wn(v, v.getNode(), this, d, u), f !== 0 || this.canBeEmpty() || Pt(this) || this.remove();
4283
4283
  }
4284
4284
  }
4285
4285
  return s;
@@ -4378,7 +4378,7 @@ class pn extends gn {
4378
4378
  }
4379
4379
  getTextContent() {
4380
4380
  const e = this.__cachedText;
4381
- return !hn() && q()._dirtyType !== st || e === null ? super.getTextContent() : e;
4381
+ return !hn() && q()._dirtyType !== lt || e === null ? super.getTextContent() : e;
4382
4382
  }
4383
4383
  remove() {
4384
4384
  R(52);
@@ -4458,7 +4458,7 @@ class Ni extends gn {
4458
4458
  return document.createElement("div");
4459
4459
  }
4460
4460
  }
4461
- class Ot extends gn {
4461
+ class Dt extends gn {
4462
4462
  constructor(e) {
4463
4463
  super(e), this.__textFormat = 0, this.__textStyle = "";
4464
4464
  }
@@ -4484,7 +4484,7 @@ class Ot extends gn {
4484
4484
  return t.__textStyle = e, t;
4485
4485
  }
4486
4486
  static clone(e) {
4487
- return new Ot(e.__key);
4487
+ return new Dt(e.__key);
4488
4488
  }
4489
4489
  afterCloneFrom(e) {
4490
4490
  super.afterCloneFrom(e), this.__textFormat = e.__textFormat, this.__textStyle = e.__textStyle;
@@ -4546,56 +4546,56 @@ function Va(n) {
4546
4546
  return { node: e };
4547
4547
  }
4548
4548
  function ke() {
4549
- return an(new Ot());
4549
+ return an(new Dt());
4550
4550
  }
4551
4551
  function Xr(n) {
4552
- return n instanceof Ot;
4552
+ return n instanceof Dt;
4553
4553
  }
4554
- const z = 0, Ja = 4;
4554
+ const W = 0, Ja = 4;
4555
4555
  function qs(n, e, t, r) {
4556
4556
  const i = n._keyToDOMMap;
4557
- i.clear(), n._editorState = Ei(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = st, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
4557
+ i.clear(), n._editorState = Ei(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = lt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
4558
4558
  const o = n._observer;
4559
4559
  o !== null && (o.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
4560
4560
  }
4561
4561
  function Ha(n) {
4562
- const e = n || {}, t = za(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, o = e.disableEvents || !1, s = Ei(), l = e.namespace || (i !== null ? i._config.namespace : Cs()), a = e.editorState, c = [pn, Pt, cn, un, Ot, Ni, ...e.nodes || []], { onError: u, html: d } = e, f = e.editable === void 0 || e.editable;
4562
+ const e = n || {}, t = Wa(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, o = e.disableEvents || !1, s = Ei(), l = e.namespace || (i !== null ? i._config.namespace : Cs()), a = e.editorState, c = [pn, Ot, cn, un, Dt, Ni, ...e.nodes || []], { onError: u, html: d } = e, f = e.editable === void 0 || e.editable;
4563
4563
  let h;
4564
4564
  if (n === void 0 && t !== null)
4565
4565
  h = t._nodes;
4566
4566
  else {
4567
4567
  h = /* @__PURE__ */ new Map();
4568
- for (let m = 0; m < c.length; m++) {
4569
- let _ = c[m], x = null, v = null;
4570
- if (typeof _ != "function") {
4571
- const w = _;
4572
- _ = w.replace, x = w.with, v = w.withKlass || null;
4568
+ for (let _ = 0; _ < c.length; _++) {
4569
+ let m = c[_], x = null, v = null;
4570
+ if (typeof m != "function") {
4571
+ const w = m;
4572
+ m = w.replace, x = w.with, v = w.withKlass || null;
4573
4573
  }
4574
- const y = _.getType(), C = _.transform(), T = /* @__PURE__ */ new Set();
4575
- C !== null && T.add(C), h.set(y, { exportDOM: d && d.export ? d.export.get(_) : void 0, klass: _, replace: x, replaceWithKlass: v, transforms: T });
4574
+ const y = m.getType(), C = m.transform(), T = /* @__PURE__ */ new Set();
4575
+ C !== null && T.add(C), h.set(y, { exportDOM: d && d.export ? d.export.get(m) : void 0, klass: m, replace: x, replaceWithKlass: v, transforms: T });
4576
4576
  }
4577
4577
  }
4578
- const g = new ar(s, i, h, { disableEvents: o, namespace: l, theme: r }, u || console.error, function(m, _) {
4578
+ const g = new ar(s, i, h, { disableEvents: o, namespace: l, theme: r }, u || console.error, function(_, m) {
4579
4579
  const x = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Set(), y = (C) => {
4580
4580
  Object.keys(C).forEach((T) => {
4581
4581
  let w = x.get(T);
4582
4582
  w === void 0 && (w = [], x.set(T, w)), w.push(C[T]);
4583
4583
  });
4584
4584
  };
4585
- return m.forEach((C) => {
4585
+ return _.forEach((C) => {
4586
4586
  const T = C.klass.importDOM;
4587
4587
  if (T == null || v.has(T))
4588
4588
  return;
4589
4589
  v.add(T);
4590
4590
  const w = T.call(C.klass);
4591
4591
  w !== null && y(w);
4592
- }), _ && y(_), x;
4592
+ }), m && y(m), x;
4593
4593
  }(h, d ? d.import : void 0), f);
4594
- return a !== void 0 && (g._pendingEditorState = a, g._dirtyType = kt), g;
4594
+ return a !== void 0 && (g._pendingEditorState = a, g._dirtyType = Et), g;
4595
4595
  }
4596
4596
  class ar {
4597
4597
  constructor(e, t, r, i, o, s, l) {
4598
- this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = st, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Cs(), this._onError = o, this._htmlConversions = s, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
4598
+ this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = lt, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Cs(), this._onError = o, this._htmlConversions = s, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
4599
4599
  }
4600
4600
  isComposing() {
4601
4601
  return this._compositionKey != null;
@@ -4718,41 +4718,41 @@ class ar {
4718
4718
  const a = l.ownerDocument;
4719
4719
  return a && a.defaultView || null;
4720
4720
  }(e), s = e.style;
4721
- s.userSelect = "text", s.whiteSpace = "pre-wrap", s.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = o, this._dirtyType = kt, ps(this), this._updateTags.add("history-merge"), Je(this), this._config.disableEvents || function(l, a) {
4722
- const c = l.ownerDocument, u = Wn.get(c);
4723
- (u === void 0 || u < 1) && c.addEventListener("selectionchange", Ms), Wn.set(c, (u || 0) + 1), l.__lexicalEditor = a;
4721
+ s.userSelect = "text", s.whiteSpace = "pre-wrap", s.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = o, this._dirtyType = Et, ps(this), this._updateTags.add("history-merge"), Je(this), this._config.disableEvents || function(l, a) {
4722
+ const c = l.ownerDocument, u = Bn.get(c);
4723
+ (u === void 0 || u < 1) && c.addEventListener("selectionchange", Ms), Bn.set(c, (u || 0) + 1), l.__lexicalEditor = a;
4724
4724
  const d = Fs(l);
4725
4725
  for (let f = 0; f < Vr.length; f++) {
4726
- const [h, g] = Vr[f], m = typeof g == "function" ? (_) => {
4727
- co(_) || (ao(_), (a.isEditable() || h === "click") && g(_, a));
4728
- } : (_) => {
4729
- if (co(_))
4726
+ const [h, g] = Vr[f], _ = typeof g == "function" ? (m) => {
4727
+ co(m) || (ao(m), (a.isEditable() || h === "click") && g(m, a));
4728
+ } : (m) => {
4729
+ if (co(m))
4730
4730
  return;
4731
- ao(_);
4731
+ ao(m);
4732
4732
  const x = a.isEditable();
4733
4733
  switch (h) {
4734
4734
  case "cut":
4735
- return x && L(a, oi, _);
4735
+ return x && L(a, oi, m);
4736
4736
  case "copy":
4737
- return L(a, Gn, _);
4737
+ return L(a, Gn, m);
4738
4738
  case "paste":
4739
- return x && L(a, ii, _);
4739
+ return x && L(a, ii, m);
4740
4740
  case "dragstart":
4741
- return x && L(a, ls, _);
4741
+ return x && L(a, ls, m);
4742
4742
  case "dragover":
4743
- return x && L(a, as, _);
4743
+ return x && L(a, as, m);
4744
4744
  case "dragend":
4745
- return x && L(a, Kl, _);
4745
+ return x && L(a, Kl, m);
4746
4746
  case "focus":
4747
- return x && L(a, Jl, _);
4747
+ return x && L(a, Jl, m);
4748
4748
  case "blur":
4749
- return x && L(a, Hl, _);
4749
+ return x && L(a, Hl, m);
4750
4750
  case "drop":
4751
- return x && L(a, ss, _);
4751
+ return x && L(a, ss, m);
4752
4752
  }
4753
4753
  };
4754
- l.addEventListener(h, m), d.push(() => {
4755
- l.removeEventListener(h, m);
4754
+ l.addEventListener(h, _), d.push(() => {
4755
+ l.removeEventListener(h, _);
4756
4756
  });
4757
4757
  }
4758
4758
  }(e, this), r != null && e.classList.add(...r);
@@ -4770,7 +4770,7 @@ class ar {
4770
4770
  setEditorState(e, t) {
4771
4771
  e.isEmpty() && R(38), gs(this);
4772
4772
  const r = this._pendingEditorState, i = this._updateTags, o = t !== void 0 ? t.tag : null;
4773
- r === null || r.isEmpty() || (o != null && i.add(o), Je(this)), this._pendingEditorState = e, this._dirtyType = kt, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && i.add(o), Je(this);
4773
+ r === null || r.isEmpty() || (o != null && i.add(o), Je(this)), this._pendingEditorState = e, this._dirtyType = Et, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && i.add(o), Je(this);
4774
4774
  }
4775
4775
  parseEditorState(e, t) {
4776
4776
  return function(r, i, o) {
@@ -4836,13 +4836,13 @@ function Ga(n, e) {
4836
4836
  return e ?? (t != null ? t.getTheme() : null);
4837
4837
  } };
4838
4838
  }
4839
- function ut() {
4839
+ function ft() {
4840
4840
  const n = Ho(Gs);
4841
4841
  return n == null && qa(8), n;
4842
4842
  }
4843
4843
  const Xs = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Xa = Xs ? on : pe, xn = { tag: "history-merge" };
4844
4844
  function Za({ initialConfig: n, children: e }) {
4845
- const t = Et(() => {
4845
+ const t = Nt(() => {
4846
4846
  const { theme: r, namespace: i, nodes: o, onError: s, editorState: l, html: a } = n, c = Ga(null, r), u = Ha({ editable: n.editable, html: a, namespace: i, nodes: o, onError: (d) => s(d, u), theme: r });
4847
4847
  return function(d, f) {
4848
4848
  if (f !== null) {
@@ -4852,8 +4852,8 @@ function Za({ initialConfig: n, children: e }) {
4852
4852
  if (h.isEmpty()) {
4853
4853
  const g = ke();
4854
4854
  h.append(g);
4855
- const m = Xs ? document.activeElement : null;
4856
- (I() !== null || m !== null && m === d.getRootElement()) && g.select();
4855
+ const _ = Xs ? document.activeElement : null;
4856
+ (I() !== null || _ !== null && _ === d.getRootElement()) && g.select();
4857
4857
  }
4858
4858
  }, xn);
4859
4859
  else if (f !== null)
@@ -4880,7 +4880,7 @@ function Za({ initialConfig: n, children: e }) {
4880
4880
  }, []), S.jsx(Gs.Provider, { value: t, children: e });
4881
4881
  }
4882
4882
  function Qa({ defaultSelection: n }) {
4883
- const [e] = ut();
4883
+ const [e] = ft();
4884
4884
  return pe(() => {
4885
4885
  e.focus(() => {
4886
4886
  const t = document.activeElement, r = e.getRootElement();
@@ -4918,8 +4918,8 @@ function Qs(n, e) {
4918
4918
  const [r, i] = t, o = n.isBackward(), s = r.getNode(), l = i.getNode(), a = e.is(s), c = e.is(l);
4919
4919
  if (a || c) {
4920
4920
  const [u, d] = qr(n), f = s.is(l), h = e.is(o ? l : s), g = e.is(o ? s : l);
4921
- let m, _ = 0;
4922
- return f ? (_ = u > d ? d : u, m = u > d ? u : d) : h ? (_ = o ? d : u, m = void 0) : g && (_ = 0, m = o ? u : d), e.__text = e.__text.slice(_, m), e;
4921
+ let _, m = 0;
4922
+ return f ? (m = u > d ? d : u, _ = u > d ? u : d) : h ? (m = o ? d : u, _ = void 0) : g && (m = 0, _ = o ? u : d), e.__text = e.__text.slice(m, _), e;
4923
4923
  }
4924
4924
  }
4925
4925
  return e;
@@ -4934,7 +4934,7 @@ function nc(n) {
4934
4934
  const e = n.getStyle(), t = Zs(e);
4935
4935
  Kn.set(e, t);
4936
4936
  }
4937
- function yt(n, e) {
4937
+ function vt(n, e) {
4938
4938
  const t = Pi("getStyle" in n ? n.getStyle() : n.style), r = Object.entries(e).reduce((o, [s, l]) => (typeof l == "function" ? o[s] = l(t[s], n) : l === null ? delete o[s] : o[s] = l, o), { ...t }), i = function(o) {
4939
4939
  let s = "";
4940
4940
  for (const l in o)
@@ -4950,35 +4950,35 @@ function rc(n, e) {
4950
4950
  const [o, s] = i, l = r - 1;
4951
4951
  let a = t[0], c = t[l];
4952
4952
  if (n.isCollapsed() && O(n))
4953
- return void yt(n, e);
4953
+ return void vt(n, e);
4954
4954
  const u = a.getTextContent().length, d = s.offset;
4955
4955
  let f = o.offset;
4956
4956
  const h = o.isBefore(s);
4957
- let g = h ? f : d, m = h ? d : f;
4958
- const _ = h ? o.type : s.type, x = h ? s.type : o.type, v = h ? s.key : o.key;
4957
+ let g = h ? f : d, _ = h ? d : f;
4958
+ const m = h ? o.type : s.type, x = h ? s.type : o.type, v = h ? s.key : o.key;
4959
4959
  if (D(a) && g === u) {
4960
4960
  const y = a.getNextSibling();
4961
4961
  D(y) && (f = 0, g = 0, a = y);
4962
4962
  }
4963
4963
  if (t.length === 1) {
4964
4964
  if (D(a) && a.canHaveFormat()) {
4965
- if (g = _ === "element" ? 0 : f > d ? d : f, m = x === "element" ? u : f > d ? f : d, g === m)
4965
+ if (g = m === "element" ? 0 : f > d ? d : f, _ = x === "element" ? u : f > d ? f : d, g === _)
4966
4966
  return;
4967
- if (Ie(a) || g === 0 && m === u)
4968
- yt(a, e), a.select(g, m);
4967
+ if (Ie(a) || g === 0 && _ === u)
4968
+ vt(a, e), a.select(g, _);
4969
4969
  else {
4970
- const y = a.splitText(g, m), C = g === 0 ? y[0] : y[1];
4971
- yt(C, e), C.select(0, m - g);
4970
+ const y = a.splitText(g, _), C = g === 0 ? y[0] : y[1];
4971
+ vt(C, e), C.select(0, _ - g);
4972
4972
  }
4973
4973
  }
4974
4974
  } else {
4975
- if (D(a) && g < a.getTextContentSize() && a.canHaveFormat() && (g === 0 || Ie(a) || (a = a.splitText(g)[1], g = 0, h ? o.set(a.getKey(), g, "text") : s.set(a.getKey(), g, "text")), yt(a, e)), D(c) && c.canHaveFormat()) {
4975
+ if (D(a) && g < a.getTextContentSize() && a.canHaveFormat() && (g === 0 || Ie(a) || (a = a.splitText(g)[1], g = 0, h ? o.set(a.getKey(), g, "text") : s.set(a.getKey(), g, "text")), vt(a, e)), D(c) && c.canHaveFormat()) {
4976
4976
  const y = c.getTextContent().length;
4977
- c.__key !== v && m !== 0 && (m = y), m === y || Ie(c) || ([c] = c.splitText(m)), m === 0 && x !== "element" || yt(c, e);
4977
+ c.__key !== v && _ !== 0 && (_ = y), _ === y || Ie(c) || ([c] = c.splitText(_)), _ === 0 && x !== "element" || vt(c, e);
4978
4978
  }
4979
4979
  for (let y = 1; y < l; y++) {
4980
4980
  const C = t[y], T = C.getKey();
4981
- D(C) && C.canHaveFormat() && T !== a.getKey() && T !== c.getKey() && !C.isToken() && yt(C, e);
4981
+ D(C) && C.canHaveFormat() && T !== a.getKey() && T !== c.getKey() && !C.isToken() && vt(C, e);
4982
4982
  }
4983
4983
  }
4984
4984
  }
@@ -5043,7 +5043,7 @@ function uc(...n) {
5043
5043
  e.push(r);
5044
5044
  return e;
5045
5045
  }
5046
- function Dt(...n) {
5046
+ function Rt(...n) {
5047
5047
  return () => {
5048
5048
  for (let e = n.length - 1; e >= 0; e--)
5049
5049
  n[e]();
@@ -5067,11 +5067,11 @@ const cr = (n, e) => {
5067
5067
  }
5068
5068
  return null;
5069
5069
  };
5070
- function rt(n, e) {
5070
+ function it(n, e) {
5071
5071
  return n !== null && Object.getPrototypeOf(n).constructor.name === e.name;
5072
5072
  }
5073
5073
  const bn = 0, Zr = 1, Qr = 2, ve = 0, hc = 1, Do = 2, gc = 3, pc = 4;
5074
- function mc(n, e, t, r, i) {
5074
+ function _c(n, e, t, r, i) {
5075
5075
  if (n === null || t.size === 0 && r.size === 0 && !i)
5076
5076
  return ve;
5077
5077
  const o = e._selection, s = n._selection;
@@ -5108,26 +5108,26 @@ function mc(n, e, t, r, i) {
5108
5108
  const f = o.anchor, h = s.anchor;
5109
5109
  if (f.key !== h.key || f.type !== "text")
5110
5110
  return ve;
5111
- const g = f.offset, m = h.offset, _ = d.length - u.length;
5112
- return _ === 1 && m === g - 1 ? Do : _ === -1 && m === g + 1 ? gc : _ === -1 && m === g ? pc : ve;
5111
+ const g = f.offset, _ = h.offset, m = d.length - u.length;
5112
+ return m === 1 && _ === g - 1 ? Do : m === -1 && _ === g + 1 ? gc : m === -1 && _ === g ? pc : ve;
5113
5113
  }
5114
- function _c(n, e) {
5114
+ function mc(n, e) {
5115
5115
  let t = Date.now(), r = ve;
5116
5116
  return (i, o, s, l, a, c) => {
5117
5117
  const u = Date.now();
5118
5118
  if (c.has("historic"))
5119
5119
  return r = ve, t = u, Qr;
5120
- const d = mc(i, o, l, a, n.isComposing()), f = (() => {
5120
+ const d = _c(i, o, l, a, n.isComposing()), f = (() => {
5121
5121
  const h = s === null || s.editor === n, g = c.has("history-push");
5122
5122
  if (!g && h && c.has("history-merge"))
5123
5123
  return bn;
5124
5124
  if (i === null)
5125
5125
  return Zr;
5126
- const m = o._selection;
5127
- return l.size > 0 || a.size > 0 ? g === !1 && d !== ve && d === r && u < t + e && h || l.size === 1 && function(_, x, v) {
5128
- const y = x._nodeMap.get(_), C = v._nodeMap.get(_), T = x._selection, w = v._selection;
5126
+ const _ = o._selection;
5127
+ return l.size > 0 || a.size > 0 ? g === !1 && d !== ve && d === r && u < t + e && h || l.size === 1 && function(m, x, v) {
5128
+ const y = x._nodeMap.get(m), C = v._nodeMap.get(m), T = x._selection, w = v._selection;
5129
5129
  return !(O(T) && O(w) && T.anchor.type === "element" && T.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !D(y) || !D(C) || y.__parent !== C.__parent) && JSON.stringify(x.read(() => y.exportJSON())) === JSON.stringify(v.read(() => C.exportJSON()));
5130
- }(Array.from(l)[0], i, o) ? bn : Zr : m !== null ? bn : Qr;
5130
+ }(Array.from(l)[0], i, o) ? bn : Zr : _ !== null ? bn : Qr;
5131
5131
  })();
5132
5132
  return t = u, r = d, f;
5133
5133
  };
@@ -5136,28 +5136,28 @@ function Ro(n) {
5136
5136
  n.undoStack = [], n.redoStack = [], n.current = null;
5137
5137
  }
5138
5138
  function yc(n, e, t) {
5139
- const r = _c(n, t);
5140
- return Dt(n.registerCommand(Yn, () => (function(o, s) {
5139
+ const r = mc(n, t);
5140
+ return Rt(n.registerCommand(Yn, () => (function(o, s) {
5141
5141
  const l = s.redoStack, a = s.undoStack;
5142
5142
  if (a.length !== 0) {
5143
5143
  const c = s.current, u = a.pop();
5144
- c !== null && (l.push(c), o.dispatchCommand(zt, !0)), a.length === 0 && o.dispatchCommand(Kt, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: "historic" });
5144
+ c !== null && (l.push(c), o.dispatchCommand(Wt, !0)), a.length === 0 && o.dispatchCommand(Kt, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: "historic" });
5145
5145
  }
5146
- }(n, e), !0), z), n.registerCommand(qn, () => (function(o, s) {
5146
+ }(n, e), !0), W), n.registerCommand(qn, () => (function(o, s) {
5147
5147
  const l = s.redoStack, a = s.undoStack;
5148
5148
  if (l.length !== 0) {
5149
5149
  const c = s.current;
5150
5150
  c !== null && (a.push(c), o.dispatchCommand(Kt, !0));
5151
5151
  const u = l.pop();
5152
- l.length === 0 && o.dispatchCommand(zt, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: "historic" });
5152
+ l.length === 0 && o.dispatchCommand(Wt, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: "historic" });
5153
5153
  }
5154
- }(n, e), !0), z), n.registerCommand(Ul, () => (Ro(e), !1), z), n.registerCommand(Vl, () => (Ro(e), n.dispatchCommand(zt, !1), n.dispatchCommand(Kt, !1), !0), z), n.registerUpdateListener(({ editorState: o, prevEditorState: s, dirtyLeaves: l, dirtyElements: a, tags: c }) => {
5154
+ }(n, e), !0), W), n.registerCommand(Ul, () => (Ro(e), !1), W), n.registerCommand(Vl, () => (Ro(e), n.dispatchCommand(Wt, !1), n.dispatchCommand(Kt, !1), !0), W), n.registerUpdateListener(({ editorState: o, prevEditorState: s, dirtyLeaves: l, dirtyElements: a, tags: c }) => {
5155
5155
  const u = e.current, d = e.redoStack, f = e.undoStack, h = u === null ? null : u.editorState;
5156
5156
  if (u !== null && o === h)
5157
5157
  return;
5158
5158
  const g = r(s, o, u, l, a, c);
5159
5159
  if (g === Zr)
5160
- d.length !== 0 && (e.redoStack = [], n.dispatchCommand(zt, !1)), u !== null && (f.push({ ...u }), n.dispatchCommand(Kt, !0));
5160
+ d.length !== 0 && (e.redoStack = [], n.dispatchCommand(Wt, !1)), u !== null && (f.push({ ...u }), n.dispatchCommand(Kt, !0));
5161
5161
  else if (g === Qr)
5162
5162
  return;
5163
5163
  e.current = { editor: n, editorState: o };
@@ -5167,9 +5167,9 @@ function vc() {
5167
5167
  return { current: null, redoStack: [], undoStack: [] };
5168
5168
  }
5169
5169
  function xc({ delay: n, externalHistoryState: e }) {
5170
- const [t] = ut();
5170
+ const [t] = ft();
5171
5171
  return function(r, i, o = 1e3) {
5172
- const s = Et(() => i || vc(), [i]);
5172
+ const s = Nt(() => i || vc(), [i]);
5173
5173
  pe(() => yc(r, s, o), [o, r, s]);
5174
5174
  }(t, e, n), null;
5175
5175
  }
@@ -5179,7 +5179,7 @@ function Cc(n) {
5179
5179
  }
5180
5180
  function wc() {
5181
5181
  return function(n) {
5182
- const [e] = ut(), t = Et(() => n(e), [e, n]), r = Xt(t.initialValueFn()), [i, o] = Z(r.current);
5182
+ const [e] = ft(), t = Nt(() => n(e), [e, n]), r = Xt(t.initialValueFn()), [i, o] = Z(r.current);
5183
5183
  return bc(() => {
5184
5184
  const { initialValueFn: s, subscribe: l } = t, a = s();
5185
5185
  return r.current !== a && (r.current = a, o(a)), l((c) => {
@@ -5255,14 +5255,14 @@ function Nc(n) {
5255
5255
  if (a) {
5256
5256
  const [c, u, d, f, h, g] = a;
5257
5257
  n.update(() => {
5258
- const m = I();
5259
- if (O(m)) {
5260
- const _ = m.anchor;
5261
- let x = _.getNode(), v = 0, y = 0;
5262
- if (D(x) && c >= 0 && u >= 0 && (v = c, y = c + u, m.setTextNodeRange(x, v, x, y)), v === y && d === "" || (m.insertRawText(d), x = _.getNode()), D(x)) {
5258
+ const _ = I();
5259
+ if (O(_)) {
5260
+ const m = _.anchor;
5261
+ let x = m.getNode(), v = 0, y = 0;
5262
+ if (D(x) && c >= 0 && u >= 0 && (v = c, y = c + u, _.setTextNodeRange(x, v, x, y)), v === y && d === "" || (_.insertRawText(d), x = m.getNode()), D(x)) {
5263
5263
  v = f, y = f + h;
5264
5264
  const C = x.getTextContentSize();
5265
- v = v > C ? C : v, y = y > C ? C : y, m.setTextNodeRange(x, v, x, y);
5265
+ v = v > C ? C : v, y = y > C ? C : y, _.setTextNodeRange(x, v, x, y);
5266
5266
  }
5267
5267
  r.stopImmediatePropagation();
5268
5268
  }
@@ -5289,7 +5289,7 @@ function Pc(n, e) {
5289
5289
  }
5290
5290
  return function(o) {
5291
5291
  for (const s of o)
5292
- s.getNextSibling() instanceof Ni && s.insertAfter(ct());
5292
+ s.getNextSibling() instanceof Ni && s.insertAfter(ut());
5293
5293
  for (const s of o) {
5294
5294
  const l = s.getChildren();
5295
5295
  for (const a of l)
@@ -5322,8 +5322,8 @@ function rl(n, e, t, r = null) {
5322
5322
  return !1;
5323
5323
  const f = document.createDocumentFragment();
5324
5324
  for (let h = 0; h < l.length; h++) {
5325
- const g = l[h], m = rl(n, g, f, r);
5326
- !i && b(e) && m && e.extractWithChild(g, r, "html") && (i = !0);
5325
+ const g = l[h], _ = rl(n, g, f, r);
5326
+ !i && b(e) && _ && e.extractWithChild(g, r, "html") && (i = !0);
5327
5327
  }
5328
5328
  if (i && !o) {
5329
5329
  if (rr(u) && u.append(f), t.append(u), d) {
@@ -5340,8 +5340,8 @@ function ol(n, e, t, r, i = /* @__PURE__ */ new Map(), o) {
5340
5340
  if (il.has(n.nodeName))
5341
5341
  return s;
5342
5342
  let l = null;
5343
- const a = function(g, m) {
5344
- const { nodeName: _ } = g, x = m._htmlConversions.get(_.toLowerCase());
5343
+ const a = function(g, _) {
5344
+ const { nodeName: m } = g, x = _._htmlConversions.get(m.toLowerCase());
5345
5345
  let v = null;
5346
5346
  if (x !== void 0)
5347
5347
  for (const y of x) {
@@ -5355,8 +5355,8 @@ function ol(n, e, t, r, i = /* @__PURE__ */ new Map(), o) {
5355
5355
  u = c.after;
5356
5356
  const g = c.node;
5357
5357
  if (l = Array.isArray(g) ? g[g.length - 1] : g, l !== null) {
5358
- for (const [, m] of i)
5359
- if (l = m(l, o), !l)
5358
+ for (const [, _] of i)
5359
+ if (l = _(l, o), !l)
5360
5360
  break;
5361
5361
  l && s.push(...Array.isArray(g) ? g : [l]);
5362
5362
  }
@@ -5364,7 +5364,7 @@ function ol(n, e, t, r, i = /* @__PURE__ */ new Map(), o) {
5364
5364
  }
5365
5365
  const d = n.childNodes;
5366
5366
  let f = [];
5367
- const h = (l == null || !Nt(l)) && (l != null && Gr(l) || r);
5367
+ const h = (l == null || !Pt(l)) && (l != null && Gr(l) || r);
5368
5368
  for (let g = 0; g < d.length; g++)
5369
5369
  f.push(...ol(d[g], e, t, h, new Map(i), l));
5370
5370
  return u != null && (f = u(f)), jn(n) && (f = Dc(n, f, h ? () => {
@@ -5372,7 +5372,7 @@ function ol(n, e, t, r, i = /* @__PURE__ */ new Map(), o) {
5372
5372
  return t.push(g), g;
5373
5373
  } : ke)), l == null ? f.length > 0 ? s = s.concat(f) : jn(n) && function(g) {
5374
5374
  return g.nextSibling == null || g.previousSibling == null ? !1 : Fr(g.nextSibling) && Fr(g.previousSibling);
5375
- }(n) && (s = s.concat(ct())) : b(l) && l.append(...f), s;
5375
+ }(n) && (s = s.concat(ut())) : b(l) && l.append(...f), s;
5376
5376
  }
5377
5377
  function Dc(n, e, t) {
5378
5378
  const r = n.style.textAlign, i = [];
@@ -5488,9 +5488,9 @@ function Fc(n) {
5488
5488
  }
5489
5489
  return e;
5490
5490
  }
5491
- let vt = null;
5491
+ let xt = null;
5492
5492
  async function Io(n, e, t) {
5493
- if (vt !== null)
5493
+ if (xt !== null)
5494
5494
  return !1;
5495
5495
  if (e !== null)
5496
5496
  return new Promise((a, c) => {
@@ -5505,9 +5505,9 @@ async function Io(n, e, t) {
5505
5505
  s.style.cssText = "position: fixed; top: -1000px;", s.append(i.createTextNode("#")), r.append(s);
5506
5506
  const l = new Range();
5507
5507
  return l.setStart(s, 0), l.setEnd(s, 1), o.removeAllRanges(), o.addRange(l), new Promise((a, c) => {
5508
- const u = n.registerCommand(Gn, (d) => (rt(d, ClipboardEvent) && (u(), vt !== null && (window.clearTimeout(vt), vt = null), a(jo(n, d, t))), !0), Ja);
5509
- vt = window.setTimeout(() => {
5510
- u(), vt = null, a(!1);
5508
+ const u = n.registerCommand(Gn, (d) => (it(d, ClipboardEvent) && (u(), xt !== null && (window.clearTimeout(xt), xt = null), a(jo(n, d, t))), !0), Ja);
5509
+ xt = window.setTimeout(() => {
5510
+ u(), xt = null, a(!1);
5511
5511
  }, 50), i.execCommand("copy"), s.remove();
5512
5512
  });
5513
5513
  }
@@ -5526,7 +5526,7 @@ function jo(n, e, t) {
5526
5526
  }
5527
5527
  e.preventDefault();
5528
5528
  const r = e.clipboardData;
5529
- return r !== null && (Wc(r, t), !0);
5529
+ return r !== null && (Bc(r, t), !0);
5530
5530
  }
5531
5531
  const Mc = [["text/html", Lc], ["application/x-lexical-editor", Ic]];
5532
5532
  function $c(n = I()) {
@@ -5540,7 +5540,7 @@ function $c(n = I()) {
5540
5540
  }
5541
5541
  return e;
5542
5542
  }
5543
- function Wc(n, e) {
5543
+ function Bc(n, e) {
5544
5544
  for (const t in e) {
5545
5545
  const r = e[t];
5546
5546
  r !== void 0 && n.setData(t, r);
@@ -5557,10 +5557,10 @@ function Fo(n, e) {
5557
5557
  }
5558
5558
  return null;
5559
5559
  }
5560
- const Rt = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Bc = Rt && "documentMode" in document ? document.documentMode : null, zc = !(!Rt || !("InputEvent" in window) || Bc) && "getTargetRanges" in new window.InputEvent("input"), Kc = Rt && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Uc = Rt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Vc = Rt && /^(?=.*Chrome).*/i.test(navigator.userAgent), Jc = Rt && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Vc, Mo = Il();
5560
+ const At = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, zc = At && "documentMode" in document ? document.documentMode : null, Wc = !(!At || !("InputEvent" in window) || zc) && "getTargetRanges" in new window.InputEvent("input"), Kc = At && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Uc = At && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Vc = At && /^(?=.*Chrome).*/i.test(navigator.userAgent), Jc = At && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Vc, Mo = Il();
5561
5561
  function Cn(n) {
5562
5562
  let e = null;
5563
- if (rt(n, DragEvent) ? e = n.dataTransfer : rt(n, ClipboardEvent) && (e = n.clipboardData), e === null)
5563
+ if (it(n, DragEvent) ? e = n.dataTransfer : it(n, ClipboardEvent) && (e = n.clipboardData), e === null)
5564
5564
  return [!1, [], !1];
5565
5565
  const t = e.types, r = t.includes("Files"), i = t.includes("text/html") || t.includes("text/plain");
5566
5566
  return [r, Array.from(e.files), i];
@@ -5583,23 +5583,23 @@ function $o(n) {
5583
5583
  return t.size > 0;
5584
5584
  }
5585
5585
  function wn(n) {
5586
- const e = lt(n);
5586
+ const e = at(n);
5587
5587
  return V(e);
5588
5588
  }
5589
5589
  function Hc(n) {
5590
- return Dt(n.registerCommand(Xo, (e) => {
5590
+ return Rt(n.registerCommand(Xo, (e) => {
5591
5591
  const t = I();
5592
5592
  return !!xe(t) && (t.clear(), !0);
5593
- }, 0), n.registerCommand(it, (e) => {
5593
+ }, 0), n.registerCommand(ot, (e) => {
5594
5594
  const t = I();
5595
5595
  return !!O(t) && (t.deleteCharacter(e), !0);
5596
- }, z), n.registerCommand(Zt, (e) => {
5596
+ }, W), n.registerCommand(Zt, (e) => {
5597
5597
  const t = I();
5598
5598
  return !!O(t) && (t.deleteWord(e), !0);
5599
- }, z), n.registerCommand(Qt, (e) => {
5599
+ }, W), n.registerCommand(Qt, (e) => {
5600
5600
  const t = I();
5601
5601
  return !!O(t) && (t.deleteLine(e), !0);
5602
- }, z), n.registerCommand(St, (e) => {
5602
+ }, W), n.registerCommand(Tt, (e) => {
5603
5603
  const t = I();
5604
5604
  if (typeof e == "string")
5605
5605
  t !== null && t.insertText(e);
@@ -5615,13 +5615,13 @@ function Hc(n) {
5615
5615
  }
5616
5616
  }
5617
5617
  return !0;
5618
- }, z), n.registerCommand(Dr, () => {
5618
+ }, W), n.registerCommand(Dr, () => {
5619
5619
  const e = I();
5620
5620
  return !!O(e) && (e.removeText(), !0);
5621
- }, z), n.registerCommand(fe, (e) => {
5621
+ }, W), n.registerCommand(fe, (e) => {
5622
5622
  const t = I();
5623
5623
  return !!O(t) && (t.formatText(e), !0);
5624
- }, z), n.registerCommand(be, (e) => {
5624
+ }, W), n.registerCommand(be, (e) => {
5625
5625
  const t = I();
5626
5626
  if (!O(t) && !xe(t))
5627
5627
  return !1;
@@ -5631,19 +5631,19 @@ function Hc(n) {
5631
5631
  o !== null && o.setFormat(e);
5632
5632
  }
5633
5633
  return !0;
5634
- }, z), n.registerCommand(wt, (e) => {
5634
+ }, W), n.registerCommand(St, (e) => {
5635
5635
  const t = I();
5636
5636
  return !!O(t) && (t.insertLineBreak(e), !0);
5637
- }, z), n.registerCommand(En, () => {
5637
+ }, W), n.registerCommand(En, () => {
5638
5638
  const e = I();
5639
5639
  return !!O(e) && (e.insertParagraph(), !0);
5640
- }, z), n.registerCommand(zl, () => (Wa([fn()]), !0), z), n.registerCommand(os, () => $o((e) => {
5640
+ }, W), n.registerCommand(Wl, () => (Ba([fn()]), !0), W), n.registerCommand(os, () => $o((e) => {
5641
5641
  const t = e.getIndent();
5642
5642
  e.setIndent(t + 1);
5643
- }), z), n.registerCommand(Rr, () => $o((e) => {
5643
+ }), W), n.registerCommand(Rr, () => $o((e) => {
5644
5644
  const t = e.getIndent();
5645
5645
  t > 0 && e.setIndent(t - 1);
5646
- }), z), n.registerCommand(es, (e) => {
5646
+ }), W), n.registerCommand(es, (e) => {
5647
5647
  const t = I();
5648
5648
  if (xe(t) && !wn(e.target)) {
5649
5649
  const r = t.getNodes();
@@ -5655,7 +5655,7 @@ function Hc(n) {
5655
5655
  return r.selectPrevious(), e.preventDefault(), !0;
5656
5656
  }
5657
5657
  return !1;
5658
- }, z), n.registerCommand(ts, (e) => {
5658
+ }, W), n.registerCommand(ts, (e) => {
5659
5659
  const t = I();
5660
5660
  if (xe(t)) {
5661
5661
  const r = t.getNodes();
@@ -5672,7 +5672,7 @@ function Hc(n) {
5672
5672
  return r.selectNext(), e.preventDefault(), !0;
5673
5673
  }
5674
5674
  return !1;
5675
- }, z), n.registerCommand(Qo, (e) => {
5675
+ }, W), n.registerCommand(Qo, (e) => {
5676
5676
  const t = I();
5677
5677
  if (xe(t)) {
5678
5678
  const r = t.getNodes();
@@ -5686,7 +5686,7 @@ function Hc(n) {
5686
5686
  return e.preventDefault(), Oo(t, r, !0), !0;
5687
5687
  }
5688
5688
  return !1;
5689
- }, z), n.registerCommand(Zo, (e) => {
5689
+ }, W), n.registerCommand(Zo, (e) => {
5690
5690
  const t = I();
5691
5691
  if (xe(t) && !wn(e.target)) {
5692
5692
  const i = t.getNodes();
@@ -5697,7 +5697,7 @@ function Hc(n) {
5697
5697
  return !1;
5698
5698
  const r = e.shiftKey;
5699
5699
  return !!Po(t, !1) && (e.preventDefault(), Oo(t, r, !1), !0);
5700
- }, z), n.registerCommand(ns, (e) => {
5700
+ }, W), n.registerCommand(ns, (e) => {
5701
5701
  if (wn(e.target))
5702
5702
  return !1;
5703
5703
  const t = I();
@@ -5705,32 +5705,32 @@ function Hc(n) {
5705
5705
  return !1;
5706
5706
  e.preventDefault();
5707
5707
  const { anchor: r } = t, i = r.getNode();
5708
- return t.isCollapsed() && r.offset === 0 && !oe(i) && dc(i).getIndent() > 0 ? n.dispatchCommand(Rr, void 0) : n.dispatchCommand(it, !0);
5709
- }, z), n.registerCommand(is, (e) => {
5708
+ return t.isCollapsed() && r.offset === 0 && !oe(i) && dc(i).getIndent() > 0 ? n.dispatchCommand(Rr, void 0) : n.dispatchCommand(ot, !0);
5709
+ }, W), n.registerCommand(is, (e) => {
5710
5710
  if (wn(e.target))
5711
5711
  return !1;
5712
5712
  const t = I();
5713
- return !!O(t) && (e.preventDefault(), n.dispatchCommand(it, !1));
5714
- }, z), n.registerCommand(Nn, (e) => {
5713
+ return !!O(t) && (e.preventDefault(), n.dispatchCommand(ot, !1));
5714
+ }, W), n.registerCommand(Nn, (e) => {
5715
5715
  const t = I();
5716
5716
  if (!O(t))
5717
5717
  return !1;
5718
5718
  if (e !== null) {
5719
- if ((Uc || Kc || Jc) && zc)
5719
+ if ((Uc || Kc || Jc) && Wc)
5720
5720
  return !1;
5721
5721
  if (e.preventDefault(), e.shiftKey)
5722
- return n.dispatchCommand(wt, !1);
5722
+ return n.dispatchCommand(St, !1);
5723
5723
  }
5724
5724
  return n.dispatchCommand(En, void 0);
5725
- }, z), n.registerCommand(rs, () => {
5725
+ }, W), n.registerCommand(rs, () => {
5726
5726
  const e = I();
5727
5727
  return !!O(e) && (n.blur(), !0);
5728
- }, z), n.registerCommand(ss, (e) => {
5728
+ }, W), n.registerCommand(ss, (e) => {
5729
5729
  const [, t] = Cn(e);
5730
5730
  if (t.length > 0) {
5731
5731
  const i = Fo(e.clientX, e.clientY);
5732
5732
  if (i !== null) {
5733
- const { offset: o, node: s } = i, l = lt(s);
5733
+ const { offset: o, node: s } = i, l = at(s);
5734
5734
  if (l !== null) {
5735
5735
  const a = Ma();
5736
5736
  if (D(l))
@@ -5739,7 +5739,7 @@ function Hc(n) {
5739
5739
  const u = l.getParentOrThrow().getKey(), d = l.getIndexWithinParent() + 1;
5740
5740
  a.anchor.set(u, d, "element"), a.focus.set(u, d, "element");
5741
5741
  }
5742
- const c = ms(a);
5742
+ const c = _s(a);
5743
5743
  Ee(c);
5744
5744
  }
5745
5745
  n.dispatchCommand(Mo, t);
@@ -5748,40 +5748,40 @@ function Hc(n) {
5748
5748
  }
5749
5749
  const r = I();
5750
5750
  return !!O(r);
5751
- }, z), n.registerCommand(ls, (e) => {
5751
+ }, W), n.registerCommand(ls, (e) => {
5752
5752
  const [t] = Cn(e), r = I();
5753
5753
  return !(t && !O(r));
5754
- }, z), n.registerCommand(as, (e) => {
5754
+ }, W), n.registerCommand(as, (e) => {
5755
5755
  const [t] = Cn(e), r = I();
5756
5756
  if (t && !O(r))
5757
5757
  return !1;
5758
5758
  const i = Fo(e.clientX, e.clientY);
5759
5759
  if (i !== null) {
5760
- const o = lt(i.node);
5760
+ const o = at(i.node);
5761
5761
  V(o) && e.preventDefault();
5762
5762
  }
5763
5763
  return !0;
5764
- }, z), n.registerCommand(Ar, () => (va(), !0), z), n.registerCommand(Gn, (e) => (Io(n, rt(e, ClipboardEvent) ? e : null), !0), z), n.registerCommand(oi, (e) => (async function(t, r) {
5765
- await Io(r, rt(t, ClipboardEvent) ? t : null), r.update(() => {
5764
+ }, W), n.registerCommand(Ar, () => (va(), !0), W), n.registerCommand(Gn, (e) => (Io(n, it(e, ClipboardEvent) ? e : null), !0), W), n.registerCommand(oi, (e) => (async function(t, r) {
5765
+ await Io(r, it(t, ClipboardEvent) ? t : null), r.update(() => {
5766
5766
  const i = I();
5767
5767
  O(i) ? i.removeText() : xe(i) && i.getNodes().forEach((o) => o.remove());
5768
5768
  });
5769
- }(e, n), !0), z), n.registerCommand(ii, (e) => {
5769
+ }(e, n), !0), W), n.registerCommand(ii, (e) => {
5770
5770
  const [, t, r] = Cn(e);
5771
- return t.length > 0 && !r ? (n.dispatchCommand(Mo, t), !0) : mi(e.target) ? !1 : I() !== null && (function(i, o) {
5771
+ return t.length > 0 && !r ? (n.dispatchCommand(Mo, t), !0) : _i(e.target) ? !1 : I() !== null && (function(i, o) {
5772
5772
  i.preventDefault(), o.update(() => {
5773
- const s = I(), l = rt(i, InputEvent) || rt(i, KeyboardEvent) ? null : i.clipboardData;
5773
+ const s = I(), l = it(i, InputEvent) || it(i, KeyboardEvent) ? null : i.clipboardData;
5774
5774
  l != null && s !== null && Ao(l, s, o);
5775
5775
  }, { tag: "paste" });
5776
5776
  }(e, n), !0);
5777
- }, z));
5777
+ }, W));
5778
5778
  }
5779
5779
  const ei = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? on : pe;
5780
- function Wo(n) {
5780
+ function Bo(n) {
5781
5781
  return n.getEditorState().read(nl(n.isComposing()));
5782
5782
  }
5783
5783
  function Yc({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
5784
- const [r] = ut(), i = function(o, s) {
5784
+ const [r] = ft(), i = function(o, s) {
5785
5785
  const [l, a] = Z(() => o.getDecorators());
5786
5786
  return ei(() => o.registerDecoratorListener((c) => {
5787
5787
  Rl(() => {
@@ -5789,28 +5789,28 @@ function Yc({ contentEditable: n, placeholder: e = null, ErrorBoundary: t }) {
5789
5789
  });
5790
5790
  }), [o]), pe(() => {
5791
5791
  a(o.getDecorators());
5792
- }, [o]), Et(() => {
5792
+ }, [o]), Nt(() => {
5793
5793
  const c = [], u = Object.keys(l);
5794
5794
  for (let d = 0; d < u.length; d++) {
5795
- const f = u[d], h = S.jsx(s, { onError: (m) => o._onError(m), children: S.jsx(Dl, { fallback: null, children: l[f] }) }), g = o.getElementByKey(f);
5795
+ const f = u[d], h = S.jsx(s, { onError: (_) => o._onError(_), children: S.jsx(Dl, { fallback: null, children: l[f] }) }), g = o.getElementByKey(f);
5796
5796
  g !== null && c.push(qo(h, g, f));
5797
5797
  }
5798
5798
  return c;
5799
5799
  }, [s, l, o]);
5800
5800
  }(r, t);
5801
5801
  return function(o) {
5802
- ei(() => Dt(Hc(o), Nc(o)), [o]);
5802
+ ei(() => Rt(Hc(o), Nc(o)), [o]);
5803
5803
  }(r), S.jsxs(S.Fragment, { children: [n, S.jsx(qc, { content: e }), i] });
5804
5804
  }
5805
5805
  function qc({ content: n }) {
5806
- const [e] = ut(), t = function(i) {
5807
- const [o, s] = Z(() => Wo(i));
5806
+ const [e] = ft(), t = function(i) {
5807
+ const [o, s] = Z(() => Bo(i));
5808
5808
  return ei(() => {
5809
5809
  function l() {
5810
- const a = Wo(i);
5810
+ const a = Bo(i);
5811
5811
  s(a);
5812
5812
  }
5813
- return l(), Dt(i.registerUpdateListener(() => {
5813
+ return l(), Rt(i.registerUpdateListener(() => {
5814
5814
  l();
5815
5815
  }), i.registerEditableListener(() => {
5816
5816
  l();
@@ -5824,12 +5824,12 @@ function ti(n, e) {
5824
5824
  return t.__proto__ = r, t;
5825
5825
  }, ti(n, e);
5826
5826
  }
5827
- var Bo = { error: null }, Gc = function(n) {
5827
+ var zo = { error: null }, Gc = function(n) {
5828
5828
  var e, t;
5829
5829
  function r() {
5830
5830
  for (var o, s = arguments.length, l = new Array(s), a = 0; a < s; a++)
5831
5831
  l[a] = arguments[a];
5832
- return (o = n.call.apply(n, [this].concat(l)) || this).state = Bo, o.resetErrorBoundary = function() {
5832
+ return (o = n.call.apply(n, [this].concat(l)) || this).state = zo, o.resetErrorBoundary = function() {
5833
5833
  for (var c, u = arguments.length, d = new Array(u), f = 0; f < u; f++)
5834
5834
  d[f] = arguments[f];
5835
5835
  o.props.onReset == null || (c = o.props).onReset.apply(c, d), o.reset();
@@ -5840,7 +5840,7 @@ var Bo = { error: null }, Gc = function(n) {
5840
5840
  };
5841
5841
  var i = r.prototype;
5842
5842
  return i.reset = function() {
5843
- this.setState(Bo);
5843
+ this.setState(zo);
5844
5844
  }, i.componentDidCatch = function(o, s) {
5845
5845
  var l, a;
5846
5846
  (l = (a = this.props).onError) == null || l.call(a, o, s);
@@ -5875,8 +5875,127 @@ const Zc = Jo({
5875
5875
  updatePageMarginValue: (n) => {
5876
5876
  }
5877
5877
  }), Qc = () => Ho(Zc);
5878
- const tt = 8, nt = 72, eu = 16;
5879
- function tu({
5878
+ var al = {
5879
+ color: void 0,
5880
+ size: void 0,
5881
+ className: void 0,
5882
+ style: void 0,
5883
+ attr: void 0
5884
+ }, Wo = je.createContext && /* @__PURE__ */ je.createContext(al), eu = ["attr", "size", "title"];
5885
+ function tu(n, e) {
5886
+ if (n == null)
5887
+ return {};
5888
+ var t = nu(n, e), r, i;
5889
+ if (Object.getOwnPropertySymbols) {
5890
+ var o = Object.getOwnPropertySymbols(n);
5891
+ for (i = 0; i < o.length; i++)
5892
+ r = o[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(n, r) && (t[r] = n[r]);
5893
+ }
5894
+ return t;
5895
+ }
5896
+ function nu(n, e) {
5897
+ if (n == null)
5898
+ return {};
5899
+ var t = {};
5900
+ for (var r in n)
5901
+ if (Object.prototype.hasOwnProperty.call(n, r)) {
5902
+ if (e.indexOf(r) >= 0)
5903
+ continue;
5904
+ t[r] = n[r];
5905
+ }
5906
+ return t;
5907
+ }
5908
+ function Vn() {
5909
+ return Vn = Object.assign ? Object.assign.bind() : function(n) {
5910
+ for (var e = 1; e < arguments.length; e++) {
5911
+ var t = arguments[e];
5912
+ for (var r in t)
5913
+ Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
5914
+ }
5915
+ return n;
5916
+ }, Vn.apply(this, arguments);
5917
+ }
5918
+ function Ko(n, e) {
5919
+ var t = Object.keys(n);
5920
+ if (Object.getOwnPropertySymbols) {
5921
+ var r = Object.getOwnPropertySymbols(n);
5922
+ e && (r = r.filter(function(i) {
5923
+ return Object.getOwnPropertyDescriptor(n, i).enumerable;
5924
+ })), t.push.apply(t, r);
5925
+ }
5926
+ return t;
5927
+ }
5928
+ function Jn(n) {
5929
+ for (var e = 1; e < arguments.length; e++) {
5930
+ var t = arguments[e] != null ? arguments[e] : {};
5931
+ e % 2 ? Ko(Object(t), !0).forEach(function(r) {
5932
+ ru(n, r, t[r]);
5933
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Ko(Object(t)).forEach(function(r) {
5934
+ Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
5935
+ });
5936
+ }
5937
+ return n;
5938
+ }
5939
+ function ru(n, e, t) {
5940
+ return e = iu(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
5941
+ }
5942
+ function iu(n) {
5943
+ var e = ou(n, "string");
5944
+ return typeof e == "symbol" ? e : e + "";
5945
+ }
5946
+ function ou(n, e) {
5947
+ if (typeof n != "object" || !n)
5948
+ return n;
5949
+ var t = n[Symbol.toPrimitive];
5950
+ if (t !== void 0) {
5951
+ var r = t.call(n, e || "default");
5952
+ if (typeof r != "object")
5953
+ return r;
5954
+ throw new TypeError("@@toPrimitive must return a primitive value.");
5955
+ }
5956
+ return (e === "string" ? String : Number)(n);
5957
+ }
5958
+ function cl(n) {
5959
+ return n && n.map((e, t) => /* @__PURE__ */ je.createElement(e.tag, Jn({
5960
+ key: t
5961
+ }, e.attr), cl(e.child)));
5962
+ }
5963
+ function Ze(n) {
5964
+ return (e) => /* @__PURE__ */ je.createElement(su, Vn({
5965
+ attr: Jn({}, n.attr)
5966
+ }, e), cl(n.child));
5967
+ }
5968
+ function su(n) {
5969
+ var e = (t) => {
5970
+ var {
5971
+ attr: r,
5972
+ size: i,
5973
+ title: o
5974
+ } = n, s = tu(n, eu), l = i || t.size || "1em", a;
5975
+ return t.className && (a = t.className), n.className && (a = (a ? a + " " : "") + n.className), /* @__PURE__ */ je.createElement("svg", Vn({
5976
+ stroke: "currentColor",
5977
+ fill: "currentColor",
5978
+ strokeWidth: "0"
5979
+ }, t.attr, r, s, {
5980
+ className: a,
5981
+ style: Jn(Jn({
5982
+ color: n.color || t.color
5983
+ }, t.style), n.style),
5984
+ height: l,
5985
+ width: l,
5986
+ xmlns: "http://www.w3.org/2000/svg"
5987
+ }), o && /* @__PURE__ */ je.createElement("title", null, o), n.children);
5988
+ };
5989
+ return Wo !== void 0 ? /* @__PURE__ */ je.createElement(Wo.Consumer, null, (t) => e(t)) : e(al);
5990
+ }
5991
+ function lu(n) {
5992
+ return Ze({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5 11h14v2H5z" }, child: [] }] })(n);
5993
+ }
5994
+ function au(n) {
5995
+ return Ze({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 11h-6V5h-2v6H5v2h6v6h2v-6h6z" }, child: [] }] })(n);
5996
+ }
5997
+ const nt = 8, rt = 72, cu = 16;
5998
+ function uu({
5880
5999
  selectionFontSize: n,
5881
6000
  editor: e
5882
6001
  }) {
@@ -5887,8 +6006,8 @@ function tu({
5887
6006
  switch (c) {
5888
6007
  case 2:
5889
6008
  switch (!0) {
5890
- case a > nt:
5891
- u = nt;
6009
+ case a > rt:
6010
+ u = rt;
5892
6011
  break;
5893
6012
  case a >= 48:
5894
6013
  u -= 12;
@@ -5903,14 +6022,14 @@ function tu({
5903
6022
  u -= 1;
5904
6023
  break;
5905
6024
  default:
5906
- u = tt;
6025
+ u = nt;
5907
6026
  break;
5908
6027
  }
5909
6028
  break;
5910
6029
  case 1:
5911
6030
  switch (!0) {
5912
- case a < tt:
5913
- u = tt;
6031
+ case a < nt:
6032
+ u = nt;
5914
6033
  break;
5915
6034
  case a < 12:
5916
6035
  u += 1;
@@ -5925,7 +6044,7 @@ function tu({
5925
6044
  u += 12;
5926
6045
  break;
5927
6046
  default:
5928
- u = nt;
6047
+ u = rt;
5929
6048
  break;
5930
6049
  }
5931
6050
  break;
@@ -5933,7 +6052,7 @@ function tu({
5933
6052
  return u;
5934
6053
  }, o = He.useCallback(
5935
6054
  (a, c) => {
5936
- const u = (d) => (d || (d = `${eu}px`), d = d.slice(0, -2), `${i(
6055
+ const u = (d) => (d || (d = `${cu}px`), d = d.slice(0, -2), `${i(
5937
6056
  Number(d),
5938
6057
  c
5939
6058
  )}px`);
@@ -5956,7 +6075,7 @@ function tu({
5956
6075
  if (a.key === "Enter") {
5957
6076
  a.preventDefault();
5958
6077
  let u = c;
5959
- c > nt ? u = nt : c < tt && (u = tt), r(String(u)), o(String(u) + "px", null);
6078
+ c > rt ? u = rt : c < nt && (u = nt), r(String(u)), o(String(u) + "px", null);
5960
6079
  }
5961
6080
  }, l = (a) => {
5962
6081
  if (t !== "") {
@@ -5975,13 +6094,13 @@ function tu({
5975
6094
  "button",
5976
6095
  {
5977
6096
  type: "button",
5978
- disabled: n !== "" && Number(t) <= tt,
6097
+ disabled: n !== "" && Number(t) <= nt,
5979
6098
  onClick: () => l(
5980
6099
  2
5981
6100
  /* decrement */
5982
6101
  ),
5983
6102
  className: "toolbar-item font-decrement",
5984
- children: /* @__PURE__ */ S.jsx("i", { className: "format minus-icon" })
6103
+ children: /* @__PURE__ */ S.jsx(lu, { size: 18 })
5985
6104
  }
5986
6105
  ),
5987
6106
  /* @__PURE__ */ S.jsx(
@@ -5990,8 +6109,8 @@ function tu({
5990
6109
  type: "number",
5991
6110
  value: t,
5992
6111
  className: "toolbar-item font-size-input",
5993
- min: tt,
5994
- max: nt,
6112
+ min: nt,
6113
+ max: rt,
5995
6114
  onChange: (a) => r(a.target.value),
5996
6115
  onKeyDown: s
5997
6116
  }
@@ -6000,18 +6119,18 @@ function tu({
6000
6119
  "button",
6001
6120
  {
6002
6121
  type: "button",
6003
- disabled: n !== "" && Number(t) >= nt,
6122
+ disabled: n !== "" && Number(t) >= rt,
6004
6123
  onClick: () => l(
6005
6124
  1
6006
6125
  /* increment */
6007
6126
  ),
6008
6127
  className: "toolbar-item font-increment",
6009
- children: /* @__PURE__ */ S.jsx("i", { className: "format add-icon" })
6128
+ children: /* @__PURE__ */ S.jsx(au, { size: 18 })
6010
6129
  }
6011
6130
  )
6012
6131
  ] });
6013
6132
  }
6014
- const nu = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
6133
+ const fu = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
6015
6134
  class ur extends gn {
6016
6135
  static getType() {
6017
6136
  return "link";
@@ -6036,7 +6155,7 @@ class ur extends gn {
6036
6155
  return !1;
6037
6156
  }
6038
6157
  static importDOM() {
6039
- return { a: (e) => ({ conversion: ru, priority: 1 }) };
6158
+ return { a: (e) => ({ conversion: du, priority: 1 }) };
6040
6159
  }
6041
6160
  static importJSON(e) {
6042
6161
  const t = ni(e.url, { rel: e.rel, target: e.target, title: e.title });
@@ -6045,7 +6164,7 @@ class ur extends gn {
6045
6164
  sanitizeUrl(e) {
6046
6165
  try {
6047
6166
  const t = new URL(e);
6048
- if (!nu.has(t.protocol))
6167
+ if (!fu.has(t.protocol))
6049
6168
  return "about:blank";
6050
6169
  } catch {
6051
6170
  return e;
@@ -6108,7 +6227,7 @@ class ur extends gn {
6108
6227
  return this.__url.startsWith("https://") || this.__url.startsWith("http://");
6109
6228
  }
6110
6229
  }
6111
- function ru(n) {
6230
+ function du(n) {
6112
6231
  let e = null;
6113
6232
  if (Ca(n)) {
6114
6233
  const t = n.textContent;
@@ -6119,24 +6238,24 @@ function ru(n) {
6119
6238
  function ni(n, e) {
6120
6239
  return an(new ur(n, e));
6121
6240
  }
6122
- function iu(n) {
6241
+ function hu(n) {
6123
6242
  return n instanceof ur;
6124
6243
  }
6125
- function ou(n) {
6244
+ function gu(n) {
6126
6245
  const e = n.anchor, t = n.focus, r = n.anchor.getNode(), i = n.focus.getNode();
6127
6246
  return r === i ? r : n.isBackward() ? No(t) ? r : i : No(e) ? r : i;
6128
6247
  }
6129
- function su() {
6248
+ function pu() {
6130
6249
  return /* @__PURE__ */ S.jsx("div", { className: "divider" });
6131
6250
  }
6132
- const al = He.createContext(null), zo = 4;
6251
+ const ul = He.createContext(null), Uo = 4;
6133
6252
  function Ke({
6134
6253
  children: n,
6135
6254
  className: e,
6136
6255
  onClick: t,
6137
6256
  title: r
6138
6257
  }) {
6139
- const i = Xt(null), o = He.useContext(al);
6258
+ const i = Xt(null), o = He.useContext(ul);
6140
6259
  if (o === null)
6141
6260
  throw new Error("DropDownItem must be used within a DropDown");
6142
6261
  const { registerItem: s } = o;
@@ -6154,7 +6273,7 @@ function Ke({
6154
6273
  }
6155
6274
  );
6156
6275
  }
6157
- function lu({
6276
+ function _u({
6158
6277
  children: n,
6159
6278
  dropDownRef: e,
6160
6279
  onClose: t
@@ -6174,7 +6293,7 @@ function lu({
6174
6293
  const h = r.indexOf(f) - 1;
6175
6294
  return r[h === -1 ? r.length - 1 : h];
6176
6295
  }) : d === "ArrowDown" && s((f) => f ? r[r.indexOf(f) + 1] : r[0]);
6177
- }, c = Et(
6296
+ }, c = Nt(
6178
6297
  () => ({
6179
6298
  registerItem: l
6180
6299
  }),
@@ -6182,9 +6301,9 @@ function lu({
6182
6301
  );
6183
6302
  return pe(() => {
6184
6303
  r && !o && s(r[0]), o && o.current && o.current.focus();
6185
- }, [r, o]), /* @__PURE__ */ S.jsx(al.Provider, { value: c, children: /* @__PURE__ */ S.jsx("div", { className: "dropdown", ref: e, onKeyDown: a, children: n }) });
6304
+ }, [r, o]), /* @__PURE__ */ S.jsx(ul.Provider, { value: c, children: /* @__PURE__ */ S.jsx("div", { className: "dropdown", ref: e, onKeyDown: a, children: n }) });
6186
6305
  }
6187
- function au({
6306
+ function mu({
6188
6307
  disabled: n = !1,
6189
6308
  buttonLabel: e,
6190
6309
  buttonAriaLabel: t,
@@ -6199,9 +6318,9 @@ function au({
6199
6318
  return pe(() => {
6200
6319
  const f = a.current, h = l.current;
6201
6320
  if (c && f !== null && h !== null) {
6202
- const { top: g, left: m } = f.getBoundingClientRect();
6203
- h.style.top = `${g + f.offsetHeight + zo}px`, h.style.left = `${Math.min(
6204
- m,
6321
+ const { top: g, left: _ } = f.getBoundingClientRect();
6322
+ h.style.top = `${g + f.offsetHeight + Uo}px`, h.style.left = `${Math.min(
6323
+ _,
6205
6324
  window.innerWidth - h.offsetWidth - 20
6206
6325
  )}px`;
6207
6326
  }
@@ -6209,8 +6328,8 @@ function au({
6209
6328
  const f = a.current;
6210
6329
  if (f !== null && c) {
6211
6330
  const h = (g) => {
6212
- const m = g.target;
6213
- s && l.current && l.current.contains(m) || f.contains(m) || u(!1);
6331
+ const _ = g.target;
6332
+ s && l.current && l.current.contains(_) || f.contains(_) || u(!1);
6214
6333
  };
6215
6334
  return document.addEventListener("click", h), () => {
6216
6335
  document.removeEventListener("click", h);
@@ -6221,8 +6340,8 @@ function au({
6221
6340
  if (c) {
6222
6341
  const h = a.current, g = l.current;
6223
6342
  if (h !== null && g !== null) {
6224
- const { top: m } = h.getBoundingClientRect(), _ = m + h.offsetHeight + zo;
6225
- _ !== g.getBoundingClientRect().top && (g.style.top = `${_}px`);
6343
+ const { top: _ } = h.getBoundingClientRect(), m = _ + h.offsetHeight + Uo;
6344
+ m !== g.getBoundingClientRect().top && (g.style.top = `${m}px`);
6226
6345
  }
6227
6346
  }
6228
6347
  };
@@ -6247,12 +6366,12 @@ function au({
6247
6366
  }
6248
6367
  ),
6249
6368
  c && qo(
6250
- /* @__PURE__ */ S.jsx(lu, { dropDownRef: l, onClose: d, children: o }),
6369
+ /* @__PURE__ */ S.jsx(_u, { dropDownRef: l, onClose: d, children: o }),
6251
6370
  document.body
6252
6371
  )
6253
6372
  ] });
6254
6373
  }
6255
- const Bt = {
6374
+ const zt = {
6256
6375
  center: {
6257
6376
  icon: "center-align",
6258
6377
  iconRTL: "center-align",
@@ -6283,15 +6402,15 @@ const Bt = {
6283
6402
  iconRTL: "right-align",
6284
6403
  name: "Start Align"
6285
6404
  }
6286
- }, cu = ({
6405
+ }, yu = ({
6287
6406
  editor: n,
6288
6407
  value: e,
6289
6408
  isRTL: t,
6290
6409
  disabled: r = !1
6291
6410
  }) => {
6292
- const i = Bt[e || "left"];
6411
+ const i = zt[e || "left"];
6293
6412
  return /* @__PURE__ */ S.jsxs(
6294
- au,
6413
+ mu,
6295
6414
  {
6296
6415
  disabled: r,
6297
6416
  buttonLabel: i.name,
@@ -6362,7 +6481,7 @@ const Bt = {
6362
6481
  /* @__PURE__ */ S.jsx(
6363
6482
  "i",
6364
6483
  {
6365
- className: `icon ${t ? Bt.start.iconRTL : Bt.start.icon}`
6484
+ className: `icon ${t ? zt.start.iconRTL : zt.start.icon}`
6366
6485
  }
6367
6486
  ),
6368
6487
  /* @__PURE__ */ S.jsx("span", { className: "text", children: "Start Align" })
@@ -6380,14 +6499,14 @@ const Bt = {
6380
6499
  /* @__PURE__ */ S.jsx(
6381
6500
  "i",
6382
6501
  {
6383
- className: `icon ${t ? Bt.end.iconRTL : Bt.end.icon}`
6502
+ className: `icon ${t ? zt.end.iconRTL : zt.end.icon}`
6384
6503
  }
6385
6504
  ),
6386
6505
  /* @__PURE__ */ S.jsx("span", { className: "text", children: "End Align" })
6387
6506
  ]
6388
6507
  }
6389
6508
  ),
6390
- /* @__PURE__ */ S.jsx(su, {}),
6509
+ /* @__PURE__ */ S.jsx(pu, {}),
6391
6510
  /* @__PURE__ */ S.jsxs(
6392
6511
  Ke,
6393
6512
  {
@@ -6418,151 +6537,38 @@ const Bt = {
6418
6537
  }
6419
6538
  );
6420
6539
  };
6421
- var cl = {
6422
- color: void 0,
6423
- size: void 0,
6424
- className: void 0,
6425
- style: void 0,
6426
- attr: void 0
6427
- }, Ko = je.createContext && /* @__PURE__ */ je.createContext(cl), uu = ["attr", "size", "title"];
6428
- function fu(n, e) {
6429
- if (n == null)
6430
- return {};
6431
- var t = du(n, e), r, i;
6432
- if (Object.getOwnPropertySymbols) {
6433
- var o = Object.getOwnPropertySymbols(n);
6434
- for (i = 0; i < o.length; i++)
6435
- r = o[i], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(n, r) && (t[r] = n[r]);
6436
- }
6437
- return t;
6438
- }
6439
- function du(n, e) {
6440
- if (n == null)
6441
- return {};
6442
- var t = {};
6443
- for (var r in n)
6444
- if (Object.prototype.hasOwnProperty.call(n, r)) {
6445
- if (e.indexOf(r) >= 0)
6446
- continue;
6447
- t[r] = n[r];
6448
- }
6449
- return t;
6450
- }
6451
- function Vn() {
6452
- return Vn = Object.assign ? Object.assign.bind() : function(n) {
6453
- for (var e = 1; e < arguments.length; e++) {
6454
- var t = arguments[e];
6455
- for (var r in t)
6456
- Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]);
6457
- }
6458
- return n;
6459
- }, Vn.apply(this, arguments);
6460
- }
6461
- function Uo(n, e) {
6462
- var t = Object.keys(n);
6463
- if (Object.getOwnPropertySymbols) {
6464
- var r = Object.getOwnPropertySymbols(n);
6465
- e && (r = r.filter(function(i) {
6466
- return Object.getOwnPropertyDescriptor(n, i).enumerable;
6467
- })), t.push.apply(t, r);
6468
- }
6469
- return t;
6470
- }
6471
- function Jn(n) {
6472
- for (var e = 1; e < arguments.length; e++) {
6473
- var t = arguments[e] != null ? arguments[e] : {};
6474
- e % 2 ? Uo(Object(t), !0).forEach(function(r) {
6475
- hu(n, r, t[r]);
6476
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Uo(Object(t)).forEach(function(r) {
6477
- Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
6478
- });
6479
- }
6480
- return n;
6481
- }
6482
- function hu(n, e, t) {
6483
- return e = gu(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
6484
- }
6485
- function gu(n) {
6486
- var e = pu(n, "string");
6487
- return typeof e == "symbol" ? e : e + "";
6488
- }
6489
- function pu(n, e) {
6490
- if (typeof n != "object" || !n)
6491
- return n;
6492
- var t = n[Symbol.toPrimitive];
6493
- if (t !== void 0) {
6494
- var r = t.call(n, e || "default");
6495
- if (typeof r != "object")
6496
- return r;
6497
- throw new TypeError("@@toPrimitive must return a primitive value.");
6498
- }
6499
- return (e === "string" ? String : Number)(n);
6500
- }
6501
- function ul(n) {
6502
- return n && n.map((e, t) => /* @__PURE__ */ je.createElement(e.tag, Jn({
6503
- key: t
6504
- }, e.attr), ul(e.child)));
6505
- }
6506
- function At(n) {
6507
- return (e) => /* @__PURE__ */ je.createElement(mu, Vn({
6508
- attr: Jn({}, n.attr)
6509
- }, e), ul(n.child));
6510
- }
6511
- function mu(n) {
6512
- var e = (t) => {
6513
- var {
6514
- attr: r,
6515
- size: i,
6516
- title: o
6517
- } = n, s = fu(n, uu), l = i || t.size || "1em", a;
6518
- return t.className && (a = t.className), n.className && (a = (a ? a + " " : "") + n.className), /* @__PURE__ */ je.createElement("svg", Vn({
6519
- stroke: "currentColor",
6520
- fill: "currentColor",
6521
- strokeWidth: "0"
6522
- }, t.attr, r, s, {
6523
- className: a,
6524
- style: Jn(Jn({
6525
- color: n.color || t.color
6526
- }, t.style), n.style),
6527
- height: l,
6528
- width: l,
6529
- xmlns: "http://www.w3.org/2000/svg"
6530
- }), o && /* @__PURE__ */ je.createElement("title", null, o), n.children);
6531
- };
6532
- return Ko !== void 0 ? /* @__PURE__ */ je.createElement(Ko.Consumer, null, (t) => e(t)) : e(cl);
6533
- }
6534
- function _u(n) {
6535
- return At({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m3.266 12.496.96-2.853H7.76l.96 2.853H10L6.62 3H5.38L2 12.496zm2.748-8.063 1.419 4.23h-2.88l1.426-4.23zm6.132 7.203v-.075c0-.332.234-.618.619-.618.354 0 .618.256.618.58 0 .362-.271.649-.52.898l-1.788 1.832V15h3.59v-.958h-1.923v-.045l.973-1.04c.415-.438.867-.845.867-1.547 0-.8-.701-1.41-1.787-1.41-1.23 0-1.795.8-1.795 1.576v.06z" }, child: [] }] })(n);
6536
- }
6537
- function yu(n) {
6538
- return At({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m4.266 12.496.96-2.853H8.76l.96 2.853H11L7.62 3H6.38L3 12.496zm2.748-8.063 1.419 4.23h-2.88l1.426-4.23zm5.132-1.797v-.075c0-.332.234-.618.619-.618.354 0 .618.256.618.58 0 .362-.271.649-.52.898l-1.788 1.832V6h3.59v-.958h-1.923v-.045l.973-1.04c.415-.438.867-.845.867-1.547 0-.8-.701-1.41-1.787-1.41C11.565 1 11 1.8 11 2.576v.06z" }, child: [] }] })(n);
6539
- }
6540
6540
  function vu(n) {
6541
- return At({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z" }, child: [] }] })(n);
6541
+ return Ze({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m3.266 12.496.96-2.853H7.76l.96 2.853H10L6.62 3H5.38L2 12.496zm2.748-8.063 1.419 4.23h-2.88l1.426-4.23zm6.132 7.203v-.075c0-.332.234-.618.619-.618.354 0 .618.256.618.58 0 .362-.271.649-.52.898l-1.788 1.832V15h3.59v-.958h-1.923v-.045l.973-1.04c.415-.438.867-.845.867-1.547 0-.8-.701-1.41-1.787-1.41-1.23 0-1.795.8-1.795 1.576v.06z" }, child: [] }] })(n);
6542
6542
  }
6543
6543
  function xu(n) {
6544
- return At({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z" }, child: [] }] })(n);
6544
+ return Ze({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "m4.266 12.496.96-2.853H8.76l.96 2.853H11L7.62 3H6.38L3 12.496zm2.748-8.063 1.419 4.23h-2.88l1.426-4.23zm5.132-1.797v-.075c0-.332.234-.618.619-.618.354 0 .618.256.618.58 0 .362-.271.649-.52.898l-1.788 1.832V6h3.59v-.958h-1.923v-.045l.973-1.04c.415-.438.867-.845.867-1.547 0-.8-.701-1.41-1.787-1.41C11.565 1 11 1.8 11 2.576v.06z" }, child: [] }] })(n);
6545
6545
  }
6546
6546
  function bu(n) {
6547
- return At({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M6.333 5.686c0 .31.083.581.27.814H5.166a2.8 2.8 0 0 1-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967" }, child: [] }] })(n);
6547
+ return Ze({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M8.21 13c2.106 0 3.412-1.087 3.412-2.823 0-1.306-.984-2.283-2.324-2.386v-.055a2.176 2.176 0 0 0 1.852-2.14c0-1.51-1.162-2.46-3.014-2.46H3.843V13zM5.908 4.674h1.696c.963 0 1.517.451 1.517 1.244 0 .834-.629 1.32-1.73 1.32H5.908V4.673zm0 6.788V8.598h1.73c1.217 0 1.88.492 1.88 1.415 0 .943-.643 1.449-1.832 1.449H5.907z" }, child: [] }] })(n);
6548
6548
  }
6549
6549
  function Cu(n) {
6550
- return At({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57s-2.687-1.08-2.687-2.57zM12.5 15h-9v-1h9z" }, child: [] }] })(n);
6550
+ return Ze({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M7.991 11.674 9.53 4.455c.123-.595.246-.71 1.347-.807l.11-.52H7.211l-.11.52c1.06.096 1.128.212 1.005.807L6.57 11.674c-.123.595-.246.71-1.346.806l-.11.52h3.774l.11-.52c-1.06-.095-1.129-.211-1.006-.806z" }, child: [] }] })(n);
6551
+ }
6552
+ function wu(n) {
6553
+ return Ze({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M6.333 5.686c0 .31.083.581.27.814H5.166a2.8 2.8 0 0 1-.099-.76c0-1.627 1.436-2.768 3.48-2.768 1.969 0 3.39 1.175 3.445 2.85h-1.23c-.11-1.08-.964-1.743-2.25-1.743-1.23 0-2.18.602-2.18 1.607zm2.194 7.478c-2.153 0-3.589-1.107-3.705-2.81h1.23c.144 1.06 1.129 1.703 2.544 1.703 1.34 0 2.31-.705 2.31-1.675 0-.827-.547-1.374-1.914-1.675L8.046 8.5H1v-1h14v1h-3.504c.468.437.675.994.675 1.697 0 1.826-1.436 2.967-3.644 2.967" }, child: [] }] })(n);
6554
+ }
6555
+ function Su(n) {
6556
+ return Ze({ tag: "svg", attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.313 3.136h-1.23V9.54c0 2.105 1.47 3.623 3.917 3.623s3.917-1.518 3.917-3.623V3.136h-1.23v6.323c0 1.49-.978 2.57-2.687 2.57s-2.687-1.08-2.687-2.57zM12.5 15h-9v-1h9z" }, child: [] }] })(n);
6551
6557
  }
6552
6558
  const Pr = 1;
6553
6559
  function Sn() {
6554
6560
  return /* @__PURE__ */ S.jsx("div", { className: "divider" });
6555
6561
  }
6556
- function wu() {
6557
- const [n] = ut(), e = Xt(null), [t, r] = Z(!1), [i, o] = Z(!1), [s, l] = Z(!1), [a, c] = Z(!1), [u, d] = Z(!1), [f, h] = Z(!1), [g, m] = Z(!1), [_, x] = Z(!1), [v, y] = Z("14px"), [C, T] = Z("left"), [w, P] = Z(!1), E = ri(() => {
6562
+ function Tu() {
6563
+ const [n] = ft(), e = Xt(null), [t, r] = Z(!1), [i, o] = Z(!1), [s, l] = Z(!1), [a, c] = Z(!1), [u, d] = Z(!1), [f, h] = Z(!1), [g, _] = Z(!1), [m, x] = Z(!1), [v, y] = Z("11px"), [C, T] = Z("left"), [w, P] = Z(!1), E = ri(() => {
6558
6564
  const k = I();
6559
6565
  if (O(k)) {
6560
- const j = ou(k), M = j.getParent();
6561
- l(k.hasFormat("bold")), c(k.hasFormat("italic")), d(k.hasFormat("underline")), h(k.hasFormat("strikethrough")), m(k.hasFormat("subscript")), x(k.hasFormat("superscript")), P(el(k)), y(
6566
+ const j = gu(k), M = j.getParent();
6567
+ l(k.hasFormat("bold")), c(k.hasFormat("italic")), d(k.hasFormat("underline")), h(k.hasFormat("strikethrough")), _(k.hasFormat("subscript")), x(k.hasFormat("superscript")), P(el(k)), y(
6562
6568
  sc(k, "font-size", "14px")
6563
6569
  );
6564
6570
  let Y;
6565
- iu(M) && (Y = cr(
6571
+ hu(M) && (Y = cr(
6566
6572
  j,
6567
6573
  (J) => b(J) && !J.isInline()
6568
6574
  )), T(
@@ -6570,7 +6576,7 @@ function wu() {
6570
6576
  );
6571
6577
  }
6572
6578
  }, []);
6573
- return pe(() => Dt(
6579
+ return pe(() => Rt(
6574
6580
  n.registerUpdateListener(({ editorState: k }) => {
6575
6581
  k.read(() => {
6576
6582
  E();
@@ -6587,7 +6593,7 @@ function wu() {
6587
6593
  Pr
6588
6594
  ),
6589
6595
  n.registerCommand(
6590
- zt,
6596
+ Wt,
6591
6597
  (k) => (o(k), !1),
6592
6598
  Pr
6593
6599
  )
@@ -6617,7 +6623,7 @@ function wu() {
6617
6623
  }
6618
6624
  ),
6619
6625
  /* @__PURE__ */ S.jsx(Sn, {}),
6620
- /* @__PURE__ */ S.jsx(tu, { selectionFontSize: v.slice(0, -2), editor: n }),
6626
+ /* @__PURE__ */ S.jsx(uu, { selectionFontSize: v.slice(0, -2), editor: n }),
6621
6627
  /* @__PURE__ */ S.jsx(Sn, {}),
6622
6628
  /* @__PURE__ */ S.jsx(
6623
6629
  "button",
@@ -6627,7 +6633,7 @@ function wu() {
6627
6633
  },
6628
6634
  className: "toolbar-item spaced " + (s ? "active" : ""),
6629
6635
  "aria-label": "Format Bold",
6630
- children: /* @__PURE__ */ S.jsx(vu, { size: 18 })
6636
+ children: /* @__PURE__ */ S.jsx(bu, { size: 18 })
6631
6637
  }
6632
6638
  ),
6633
6639
  /* @__PURE__ */ S.jsx(
@@ -6638,7 +6644,7 @@ function wu() {
6638
6644
  },
6639
6645
  className: "toolbar-item spaced " + (a ? "active" : ""),
6640
6646
  "aria-label": "Format Italics",
6641
- children: /* @__PURE__ */ S.jsx(xu, { size: 18 })
6647
+ children: /* @__PURE__ */ S.jsx(Cu, { size: 18 })
6642
6648
  }
6643
6649
  ),
6644
6650
  /* @__PURE__ */ S.jsx(
@@ -6649,7 +6655,7 @@ function wu() {
6649
6655
  },
6650
6656
  className: "toolbar-item spaced " + (u ? "active" : ""),
6651
6657
  "aria-label": "Format Underline",
6652
- children: /* @__PURE__ */ S.jsx(Cu, { size: 18 })
6658
+ children: /* @__PURE__ */ S.jsx(Su, { size: 18 })
6653
6659
  }
6654
6660
  ),
6655
6661
  /* @__PURE__ */ S.jsx(
@@ -6660,7 +6666,7 @@ function wu() {
6660
6666
  },
6661
6667
  className: "toolbar-item spaced " + (f ? "active" : ""),
6662
6668
  "aria-label": "Format Strikethrough",
6663
- children: /* @__PURE__ */ S.jsx(bu, { size: 18 })
6669
+ children: /* @__PURE__ */ S.jsx(wu, { size: 18 })
6664
6670
  }
6665
6671
  ),
6666
6672
  /* @__PURE__ */ S.jsx(
@@ -6673,7 +6679,7 @@ function wu() {
6673
6679
  title: "Subscript",
6674
6680
  "aria-label": "Format text with a subscript",
6675
6681
  type: "button",
6676
- children: /* @__PURE__ */ S.jsx(_u, { size: 18 })
6682
+ children: /* @__PURE__ */ S.jsx(vu, { size: 18 })
6677
6683
  }
6678
6684
  ),
6679
6685
  /* @__PURE__ */ S.jsx(
@@ -6682,11 +6688,11 @@ function wu() {
6682
6688
  onClick: () => {
6683
6689
  n.dispatchCommand(fe, "superscript");
6684
6690
  },
6685
- className: "toolbar-item spaced " + (_ ? "active" : ""),
6691
+ className: "toolbar-item spaced " + (m ? "active" : ""),
6686
6692
  title: "Superscript",
6687
6693
  "aria-label": "Format text with a superscript",
6688
6694
  type: "button",
6689
- children: /* @__PURE__ */ S.jsx(yu, { size: 18 })
6695
+ children: /* @__PURE__ */ S.jsx(xu, { size: 18 })
6690
6696
  }
6691
6697
  ),
6692
6698
  /* @__PURE__ */ S.jsx(Sn, {}),
@@ -6736,14 +6742,14 @@ function wu() {
6736
6742
  ),
6737
6743
  " ",
6738
6744
  /* @__PURE__ */ S.jsx(Sn, {}),
6739
- /* @__PURE__ */ S.jsx(cu, { value: C, editor: n, isRTL: w })
6745
+ /* @__PURE__ */ S.jsx(yu, { value: C, editor: n, isRTL: w })
6740
6746
  ] });
6741
6747
  }
6742
6748
  const fl = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? on : pe;
6743
- function Su({ editor: n, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: r, ariaDescribedBy: i, ariaExpanded: o, ariaLabel: s, ariaLabelledBy: l, ariaMultiline: a, ariaOwns: c, ariaRequired: u, autoCapitalize: d, className: f, id: h, role: g = "textbox", spellCheck: m = !0, style: _, tabIndex: x, "data-testid": v, ...y }, C) {
6749
+ function ku({ editor: n, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: r, ariaDescribedBy: i, ariaExpanded: o, ariaLabel: s, ariaLabelledBy: l, ariaMultiline: a, ariaOwns: c, ariaRequired: u, autoCapitalize: d, className: f, id: h, role: g = "textbox", spellCheck: _ = !0, style: m, tabIndex: x, "data-testid": v, ...y }, C) {
6744
6750
  const [T, w] = Z(n.isEditable()), P = ri((k) => {
6745
6751
  k && k.ownerDocument && k.ownerDocument.defaultView ? n.setRootElement(k) : n.setRootElement(null);
6746
- }, [n]), E = Et(() => function(...k) {
6752
+ }, [n]), E = Nt(() => function(...k) {
6747
6753
  return (j) => {
6748
6754
  k.forEach((M) => {
6749
6755
  typeof M == "function" ? M(j) : M != null && (M.current = j);
@@ -6752,18 +6758,18 @@ function Su({ editor: n, ariaActiveDescendant: e, ariaAutoComplete: t, ariaContr
6752
6758
  }(C, P), [P, C]);
6753
6759
  return fl(() => (w(n.isEditable()), n.registerEditableListener((k) => {
6754
6760
  w(k);
6755
- })), [n]), S.jsx("div", { ...y, "aria-activedescendant": T ? e : void 0, "aria-autocomplete": T ? t : "none", "aria-controls": T ? r : void 0, "aria-describedby": i, "aria-expanded": T && g === "combobox" ? !!o : void 0, "aria-label": s, "aria-labelledby": l, "aria-multiline": a, "aria-owns": T ? c : void 0, "aria-readonly": !T || void 0, "aria-required": u, autoCapitalize: d, className: f, contentEditable: T, "data-testid": v, id: h, ref: E, role: T ? g : void 0, spellCheck: m, style: _, tabIndex: x });
6761
+ })), [n]), S.jsx("div", { ...y, "aria-activedescendant": T ? e : void 0, "aria-autocomplete": T ? t : "none", "aria-controls": T ? r : void 0, "aria-describedby": i, "aria-expanded": T && g === "combobox" ? !!o : void 0, "aria-label": s, "aria-labelledby": l, "aria-multiline": a, "aria-owns": T ? c : void 0, "aria-readonly": !T || void 0, "aria-required": u, autoCapitalize: d, className: f, contentEditable: T, "data-testid": v, id: h, ref: E, role: T ? g : void 0, spellCheck: _, style: m, tabIndex: x });
6756
6762
  }
6757
- const Tu = Yo(Su);
6763
+ const Eu = Yo(ku);
6758
6764
  function Vo(n) {
6759
6765
  return n.getEditorState().read(nl(n.isComposing()));
6760
6766
  }
6761
- const ku = Yo(Eu);
6762
- function Eu(n, e) {
6763
- const { placeholder: t, ...r } = n, [i] = ut();
6764
- return S.jsxs(S.Fragment, { children: [S.jsx(Tu, { editor: i, ...r, ref: e }), t != null && S.jsx(Nu, { editor: i, content: t })] });
6767
+ const Nu = Yo(Pu);
6768
+ function Pu(n, e) {
6769
+ const { placeholder: t, ...r } = n, [i] = ft();
6770
+ return S.jsxs(S.Fragment, { children: [S.jsx(Eu, { editor: i, ...r, ref: e }), t != null && S.jsx(Ou, { editor: i, content: t })] });
6765
6771
  }
6766
- function Nu({ content: n, editor: e }) {
6772
+ function Ou({ content: n, editor: e }) {
6767
6773
  const t = function(s) {
6768
6774
  const [l, a] = Z(() => Vo(s));
6769
6775
  return fl(() => {
@@ -6771,7 +6777,7 @@ function Nu({ content: n, editor: e }) {
6771
6777
  const u = Vo(s);
6772
6778
  a(u);
6773
6779
  }
6774
- return c(), Dt(s.registerUpdateListener(() => {
6780
+ return c(), Rt(s.registerUpdateListener(() => {
6775
6781
  c();
6776
6782
  }), s.registerEditableListener(() => {
6777
6783
  c();
@@ -6785,41 +6791,42 @@ function Nu({ content: n, editor: e }) {
6785
6791
  let o = null;
6786
6792
  return typeof n == "function" ? o = n(r) : n !== null && (o = n), o === null ? null : S.jsx("div", { "aria-hidden": !0, children: o });
6787
6793
  }
6788
- function Pu({
6794
+ function Du({
6789
6795
  className: n,
6790
6796
  style: e
6791
6797
  }) {
6792
6798
  return /* @__PURE__ */ S.jsx(
6793
- ku,
6799
+ Nu,
6794
6800
  {
6795
6801
  className: n || "ContentEditable__root",
6796
6802
  style: e
6797
6803
  }
6798
6804
  );
6799
6805
  }
6800
- const Ou = {
6806
+ const Ru = {
6801
6807
  // Theme styling goes here
6802
6808
  // ...
6803
6809
  };
6804
- function Du(n) {
6810
+ function Au(n) {
6805
6811
  console.error(n);
6806
6812
  }
6807
- function Lu() {
6808
- const { pageMarginValue: n } = Qc(), e = {
6813
+ function ju() {
6814
+ Qc();
6815
+ const n = {
6809
6816
  namespace: "MyEditor",
6810
- theme: Ou,
6811
- onError: Du
6817
+ theme: Ru,
6818
+ onError: Au
6812
6819
  };
6813
- return /* @__PURE__ */ S.jsx(Za, { initialConfig: e, children: /* @__PURE__ */ S.jsxs("div", { className: "editor-shell", children: [
6814
- /* @__PURE__ */ S.jsx(wu, {}),
6820
+ return /* @__PURE__ */ S.jsx(Za, { initialConfig: n, children: /* @__PURE__ */ S.jsxs("div", { className: "editor-shell", children: [
6821
+ /* @__PURE__ */ S.jsx(Tu, {}),
6815
6822
  /* @__PURE__ */ S.jsx("div", { className: "editor-container", children: /* @__PURE__ */ S.jsxs("div", { className: "editor-inner", children: [
6816
6823
  /* @__PURE__ */ S.jsx(
6817
6824
  Yc,
6818
6825
  {
6819
6826
  contentEditable: /* @__PURE__ */ S.jsx("div", { className: "editor-scroller", children: /* @__PURE__ */ S.jsx("div", { className: "editor", children: /* @__PURE__ */ S.jsx(
6820
- Pu,
6827
+ Du,
6821
6828
  {
6822
- style: { margin: n }
6829
+ style: { margin: "30px" }
6823
6830
  }
6824
6831
  ) }) }),
6825
6832
  ErrorBoundary: Xc
@@ -6831,6 +6838,6 @@ function Lu() {
6831
6838
  ] }) });
6832
6839
  }
6833
6840
  export {
6834
- Lu as Editor
6841
+ ju as Editor
6835
6842
  };
6836
6843
  //# sourceMappingURL=index.es.js.map