@univerjs/docs-ui 0.10.7-nightly.202509080357 → 0.10.7-nightly.202509090319

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/lib/index.js CHANGED
@@ -1,22 +1,22 @@
1
1
  var Mc = Object.defineProperty;
2
2
  var _c = (n, e, t) => e in n ? Mc(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var O = (n, e, t) => _c(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { IUniverInstanceService as L, Inject as j, Disposable as pe, toDisposable as _n, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as gt, ObjectRelativeFromH as Ro, CommandType as D, sequenceExecuteAsync as wr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ee, TextXActionType as G, PresetListType as ye, UpdateDocsAttributeType as on, Tools as ue, generateRandomId as ge, TableRowHeightRule as Dc, TableSizeType as Gi, TableTextWrapType as Pc, TableAlignmentType as wc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as In, PositionedObjectLayoutType as bo, BlockType as Nc, LRUMap as Lc, BaselineOffset as Ve, BooleanNumber as z, ColorKit as Qs, DrawingTypeEnum as Nr, skipParseTagNames as Qc, CustomRangeType as Lr, DataStreamTreeNodeType as an, createIdentifier as Yi, ILogService as Qr, SliceBodyType as ir, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as yo, DOC_RANGE_TYPE as He, normalizeBody as Uc, getBodySlice as Ki, FOCUSING_DOC as Dn, EDITOR_ACTIVATED as to, DashStyleType as Fc, RxDisposable as St, ThemeService as Ur, IUndoRedoService as xo, PRESET_LIST_TYPE as Hc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as fn, Rectangle as kc, DocumentFlavor as we, LocaleService as Ke, isInternalEditorID as vt, IContextService as Fr, Injector as Pn, FOCUSING_EDITOR_STANDALONE as Us, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as qi, PageOrientType as Wc, PAPER_TYPES as jc, PAGE_SIZE as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as ot, DEFAULT_STYLES as Xi, NAMED_STYLE_MAP as zc, DisposableCollection as Sn, fromEventSubject as Bt, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as Hr, FOCUSING_COMMON_DRAWINGS as Zi, getPlainText as no, debounce as kr, SpacingRule as Xt, IConfigService as Vr, QuickListTypeMap as jo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as Ji, InterceptorManager as qc, UndoCommandId as Fs, RedoCommandId as Hs, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as ks, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
4
+ import { IUniverInstanceService as L, Inject as j, Disposable as me, toDisposable as _n, UniverInstanceType as _, BuildTextUtils as ce, JSONX as W, ObjectRelativeFromV as ft, ObjectRelativeFromH as Ro, CommandType as D, sequenceExecuteAsync as wr, ICommandService as T, DataStreamTreeTokenType as V, TextX as Ie, TextXActionType as G, PresetListType as ye, UpdateDocsAttributeType as on, Tools as ue, generateRandomId as ge, TableRowHeightRule as Dc, TableSizeType as Yi, TableTextWrapType as Pc, TableAlignmentType as wc, MemoryCursor as Nt, SHEET_EDITOR_UNITS as In, PositionedObjectLayoutType as bo, BlockType as Nc, LRUMap as Lc, BaselineOffset as Ve, BooleanNumber as z, ColorKit as Us, DrawingTypeEnum as Nr, skipParseTagNames as Qc, CustomRangeType as Lr, DataStreamTreeNodeType as an, createIdentifier as Ki, ILogService as Qr, SliceBodyType as ir, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as yo, DOC_RANGE_TYPE as He, normalizeBody as Uc, getBodySlice as qi, FOCUSING_DOC as Dn, EDITOR_ACTIVATED as to, DashStyleType as Fc, RxDisposable as Ct, ThemeService as Ur, IUndoRedoService as xo, PRESET_LIST_TYPE as Hc, HorizontalAlign as Ue, NamedStyleType as K, RANGE_DIRECTION as De, COLORS as fn, Rectangle as kc, DocumentFlavor as we, LocaleService as Ke, isInternalEditorID as Rt, IContextService as Fr, Injector as Pn, FOCUSING_EDITOR_STANDALONE as Fs, VerticalAlign as Vc, DEFAULT_EMPTY_DOCUMENT_VALUE as Xi, PageOrientType as Wc, PAPER_TYPES as jc, PAGE_SIZE as ar, DOCS_ZEN_EDITOR_UNIT_ID_KEY as ot, DEFAULT_STYLES as Hr, NAMED_STYLE_MAP as zc, DisposableCollection as Sn, fromEventSubject as Mt, deepCompare as Gc, FOCUSING_UNIVER_EDITOR as kr, FOCUSING_COMMON_DRAWINGS as Zi, getPlainText as no, debounce as Vr, SpacingRule as Xt, IConfigService as Wr, QuickListTypeMap as jo, Direction as le, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Yc, checkForSubstrings as Kc, createInterceptorKey as Ji, InterceptorManager as qc, UndoCommandId as Hs, RedoCommandId as ks, DependentOn as Xc, Plugin as Zc, merge as Jc, touchDependencies as Vs, mergeOverrideWithDependencies as $c, createInternalEditorID as el } from "@univerjs/core";
5
5
  import { DocSelectionManagerService as Y, RichTextEditingMutation as X, DocSkeletonManagerService as de, SetTextSelectionsOperation as Le, DocStateEmitService as tl, DocInterceptorService as nl } from "@univerjs/docs";
6
- import { IRenderManagerService as fe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Vs, parseDataStreamToTree as cl, Liquid as $i, GlyphType as ea, DocumentSkeletonPageType as Oe, getPageFromPath as cr, getTableIdAndSliceIndex as Ws, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as vn, getColor as pn, RegularPolygon as ta, Rect as qn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as Mt, getSystemHighlightColor as Al, Vector2 as Cn, PageLayoutType as Rn, Shape as ul, Path as js, pxToNum as na, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oa, getNumberUnitValue as rn, Viewport as hl, ScrollBar as lr, Layer as zs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as ra } from "@univerjs/engine-render";
7
- import { IClipboardInterfaceService as sa, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as ia, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as aa, CopyCommand as bl, CutCommand as yl, PasteCommand as xl, ILayoutService as Oo, KeyCode as q, IConfirmService as ca, useDependency as J, ComponentManager as sn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_LIST as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_FAMILY_ITEM_COMPONENT as Bl, FONT_SIZE_LIST as Ml, FONT_SIZE_COMPONENT as _l, HEADING_LIST as Gs, COMMON_LABEL_COMPONENT as Dl, HEADING_ITEM_COMPONENT as Pl, ICanvasPopupService as wl, IMenuManagerService as Aa, ToolbarItem as Nl, MenuManagerPosition as Ll, useObservable as tt, RectPopup as Ql, DesktopMenu as Ul, ContextMenuPosition as oo, MetaKeys as te, Slider as Fl, useConfigValue as ua, useEvent as En, ContextMenuGroup as cn, RibbonInsertGroup as Hl, RibbonStartGroup as Ys, IUIPartsService as kl, IShortcutService as To, BuiltInUIPart as Ks, connectInjector as qs, imageMimeTypeSet as Vl, IContextMenuService as Wl } from "@univerjs/ui";
8
- import { ImageSourceType as Wr } from "@univerjs/drawing";
9
- import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as ro, takeUntil as ft, fromEvent as ze, Observable as Ie, map as wn, combineLatest as Nn, distinctUntilChanged as Wt, throttleTime as bn, switchMap as jl, take as zl, first as Gl, of as Yl, animationFrameScheduler as Kl } from "rxjs";
6
+ import { IRenderManagerService as fe, DocumentEditArea as ve, hasListGlyph as ol, isIndentByGlyph as rl, isFirstGlyph as sl, getParagraphByGlyph as il, pixelToPt as al, ptToPixel as Ws, parseDataStreamToTree as cl, Liquid as $i, GlyphType as ea, DocumentSkeletonPageType as Oe, getPageFromPath as cr, getTableIdAndSliceIndex as js, NORMAL_TEXT_SELECTION_PLUGIN_STYLE as vn, getColor as pn, RegularPolygon as ta, Rect as qn, getOffsetRectForDom as ll, ScrollTimer as dl, CURSOR_TYPE as _t, getSystemHighlightColor as Al, Vector2 as Cn, PageLayoutType as Rn, Shape as ul, Path as zs, pxToNum as na, TRANSFORM_CHANGE_OBSERVABLE_TYPE as oa, getNumberUnitValue as rn, Viewport as hl, ScrollBar as lr, Layer as Gs, Documents as gl, DocBackground as fl, getLastLine as pl, lineIterator as ml, getLastColumn as El, UniverRenderEnginePlugin as Il, DeviceInputEventType as ra } from "@univerjs/engine-render";
7
+ import { IClipboardInterfaceService as sa, FILE_PNG_CLIPBOARD_MIME_TYPE as Sl, FILE__WEBP_CLIPBOARD_MIME_TYPE as vl, FILE__JPEG_CLIPBOARD_MIME_TYPE as Cl, FILE__BMP_CLIPBOARD_MIME_TYPE as Rl, HTML_CLIPBOARD_MIME_TYPE as ia, PLAIN_TEXT_CLIPBOARD_MIME_TYPE as aa, CopyCommand as bl, CutCommand as yl, PasteCommand as xl, ILayoutService as Oo, KeyCode as q, IConfirmService as ca, useDependency as J, ComponentManager as sn, ISidebarService as la, getMenuHiddenObservable as se, MenuItemType as Z, COLOR_PICKER_COMPONENT as da, FONT_FAMILY_LIST as Ol, FONT_FAMILY_COMPONENT as Tl, FONT_FAMILY_ITEM_COMPONENT as Bl, FONT_SIZE_LIST as Ml, FONT_SIZE_COMPONENT as _l, HEADING_LIST as Ys, COMMON_LABEL_COMPONENT as Dl, HEADING_ITEM_COMPONENT as Pl, ICanvasPopupService as wl, IMenuManagerService as Aa, ToolbarItem as Nl, MenuManagerPosition as Ll, useObservable as tt, RectPopup as Ql, DesktopMenu as Ul, ContextMenuPosition as oo, MetaKeys as te, Slider as Fl, useConfigValue as ua, useEvent as En, ContextMenuGroup as cn, RibbonInsertGroup as Hl, RibbonStartGroup as Ks, IUIPartsService as kl, IShortcutService as To, BuiltInUIPart as qs, connectInjector as Xs, imageMimeTypeSet as Vl, IContextMenuService as Wl } from "@univerjs/ui";
8
+ import { ImageSourceType as jr } from "@univerjs/drawing";
9
+ import { Subject as be, BehaviorSubject as Fe, merge as ha, filter as ro, takeUntil as pt, fromEvent as ze, Observable as pe, map as wn, combineLatest as Nn, distinctUntilChanged as Wt, throttleTime as bn, switchMap as jl, take as zl, first as Gl, of as Yl, animationFrameScheduler as Kl } from "rxjs";
10
10
  import { filter as dr, bufferTime as ql, map as Xl } from "rxjs/operators";
11
11
  import { jsxs as re, jsx as Q, Fragment as Zl } from "react/jsx-runtime";
12
- import { forwardRef as Te, useRef as ke, createElement as Be, useState as me, useEffect as Ce, useMemo as _e, useCallback as ga, useImperativeHandle as Jl, useLayoutEffect as fa } from "react";
13
- import { Checkbox as Xs, InputNumber as it, Button as $l, clsx as Ge, borderClassName as Ln, Select as pa, scrollbarClassName as ed, Tooltip as td } from "@univerjs/design";
12
+ import { forwardRef as Te, useRef as ke, createElement as Be, useState as Ee, useEffect as Ce, useMemo as _e, useCallback as ga, useImperativeHandle as Jl, useLayoutEffect as fa } from "react";
13
+ import { Checkbox as Zs, InputNumber as it, Button as $l, clsx as Ge, borderClassName as Ln, Select as pa, scrollbarClassName as ed, Tooltip as td } from "@univerjs/design";
14
14
  var nd = Object.getOwnPropertyDescriptor, od = (n, e, t, o) => {
15
15
  for (var r = o > 1 ? void 0 : o ? nd(e, t) : e, s = n.length - 1, i; s >= 0; s--)
16
16
  (i = n[s]) && (r = i(r) || r);
17
17
  return r;
18
- }, Zs = (n, e) => (t, o) => e(t, o, n);
19
- let _t = class extends pe {
18
+ }, Js = (n, e) => (t, o) => e(t, o, n);
19
+ let Dt = class extends me {
20
20
  constructor(e, t) {
21
21
  super();
22
22
  O(this, "_matches", /* @__PURE__ */ new Map());
@@ -53,10 +53,10 @@ let _t = class extends pe {
53
53
  return [];
54
54
  }
55
55
  };
56
- _t = od([
57
- Zs(0, L),
58
- Zs(1, j(Y))
59
- ], _t);
56
+ Dt = od([
57
+ Js(0, L),
58
+ Js(1, j(Y))
59
+ ], Dt);
60
60
  const rd = {
61
61
  undo: !0,
62
62
  redo: !0,
@@ -100,8 +100,8 @@ const rd = {
100
100
  toolbar: !0
101
101
  }, id = "DOC_UI_PLUGIN";
102
102
  var et = /* @__PURE__ */ ((n) => (n.MAIN = "__Document_Render_Main__", n.BACKGROUND = "__Document_Render_Background__", n))(et || {}), je = /* @__PURE__ */ ((n) => (n.VIEW_MAIN = "viewMain", n.VIEW_TOP = "viewTop", n.VIEW_LEFT = "viewLeft", n.VIEW_LEFT_TOP = "viewLeftTop", n))(je || {});
103
- const ad = 0, zo = 2, cd = 4, Js = 10, Yf = "normalTextSelectionPluginName";
104
- function pt(n) {
103
+ const ad = 0, zo = 2, cd = 4, $s = 10, Yf = "normalTextSelectionPluginName";
104
+ function mt(n) {
105
105
  const { mainComponent: e, scene: t, engine: o, components: r } = n, s = e, i = r.get(et.BACKGROUND);
106
106
  return {
107
107
  document: s,
@@ -214,7 +214,7 @@ function Bo(n, e, t, o, r) {
214
214
  ...o
215
215
  }), c;
216
216
  }
217
- function jr(n, e, t) {
217
+ function zr(n, e, t) {
218
218
  if (t) {
219
219
  const r = n.find((s) => e >= s.startIndex && e <= s.endIndex + 1);
220
220
  return r != null && r.wholeEntity ? null : r;
@@ -222,7 +222,7 @@ function jr(n, e, t) {
222
222
  const o = n.find((r) => e > r.startIndex && e <= r.endIndex);
223
223
  return o != null && o.wholeEntity ? null : o;
224
224
  }
225
- function zr(n, e) {
225
+ function Gr(n, e) {
226
226
  return n.filter((t) => e > t.startIndex && e <= t.endIndex);
227
227
  }
228
228
  function Jf(n) {
@@ -244,7 +244,7 @@ function $f(n, e = 0, t = 0) {
244
244
  posOffset: (n.left || 0) - e
245
245
  },
246
246
  positionV: {
247
- relativeFrom: gt.PAGE,
247
+ relativeFrom: ft.PAGE,
248
248
  posOffset: (n.top || 0) - t
249
249
  },
250
250
  angle: n.angle || 0
@@ -254,21 +254,21 @@ const Ad = "doc.command.tab", Jt = {
254
254
  id: Ad,
255
255
  type: D.COMMAND,
256
256
  async handler(n, e) {
257
- const o = n.get(_t).onAutoFormat(Jt.id, e);
257
+ const o = n.get(Dt).onAutoFormat(Jt.id, e);
258
258
  return (await wr(o, n.get(T))).result;
259
259
  }
260
260
  }, ud = "doc.command.after-space", Mo = {
261
261
  id: ud,
262
262
  type: D.COMMAND,
263
263
  async handler(n) {
264
- const t = n.get(_t).onAutoFormat(Mo.id);
264
+ const t = n.get(Dt).onAutoFormat(Mo.id);
265
265
  return (await wr(t, n.get(T))).result;
266
266
  }
267
267
  }, yn = {
268
268
  id: "doc.command.enter",
269
269
  type: D.COMMAND,
270
270
  async handler(n) {
271
- const t = n.get(_t).onAutoFormat(yn.id);
271
+ const t = n.get(Dt).onAutoFormat(yn.id);
272
272
  return (await wr(t, n.get(T))).result;
273
273
  }
274
274
  };
@@ -287,7 +287,7 @@ const fd = 11, pd = 9, Vn = {
287
287
  */
288
288
  fs: fd
289
289
  };
290
- let at = class extends pe {
290
+ let at = class extends me {
291
291
  constructor(e, t, o) {
292
292
  super();
293
293
  O(this, "_cacheStyle", null);
@@ -368,7 +368,7 @@ function ma(n, e, t) {
368
368
  r.paragraphStyle || (r.paragraphStyle = {}), r.paragraphStyle.borderBottom = t;
369
369
  return o;
370
370
  }
371
- const Gr = {
371
+ const Yr = {
372
372
  id: "doc.command.break-line",
373
373
  type: D.COMMAND,
374
374
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -425,7 +425,7 @@ const Gr = {
425
425
  textRanges: B,
426
426
  debounce: !0
427
427
  }
428
- }, M = new Ee(), P = W.getInstance();
428
+ }, M = new Ie(), P = W.getInstance();
429
429
  if (y)
430
430
  u > 0 && M.push({
431
431
  t: G.RETAIN,
@@ -475,7 +475,7 @@ const Gr = {
475
475
  return x.params.actions = P.editOp(M.serialize(), F), !!r.syncExecuteCommand(x.id, x.params);
476
476
  }
477
477
  };
478
- var _o = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(_o || {}), Yr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Yr || {});
478
+ var _o = /* @__PURE__ */ ((n) => (n[n.ABOVE = 0] = "ABOVE", n[n.BELLOW = 1] = "BELLOW", n))(_o || {}), Kr = /* @__PURE__ */ ((n) => (n[n.LEFT = 0] = "LEFT", n[n.RIGHT = 1] = "RIGHT", n))(Kr || {});
479
479
  function md(n, e) {
480
480
  let t = V.TABLE_START;
481
481
  const o = [], r = [];
@@ -501,7 +501,7 @@ ${V.TABLE_CELL_END}`, o.push({
501
501
  sectionBreaks: r
502
502
  };
503
503
  }
504
- function Kr() {
504
+ function qr() {
505
505
  return {
506
506
  margin: {
507
507
  start: {
@@ -519,8 +519,8 @@ function Kr() {
519
519
  }
520
520
  };
521
521
  }
522
- function qr(n) {
523
- const e = Kr();
522
+ function Xr(n) {
523
+ const e = qr();
524
524
  return {
525
525
  tableCells: [...new Array(n).fill(null).map(() => ue.deepClone(e))],
526
526
  trHeight: {
@@ -529,10 +529,10 @@ function qr(n) {
529
529
  }
530
530
  };
531
531
  }
532
- function Xr(n) {
532
+ function Zr(n) {
533
533
  return {
534
534
  size: {
535
- type: Gi.SPECIFIED,
535
+ type: Yi.SPECIFIED,
536
536
  width: {
537
537
  v: n
538
538
  }
@@ -540,7 +540,7 @@ function Xr(n) {
540
540
  };
541
541
  }
542
542
  function Ea(n, e, t) {
543
- const o = Xr(t / e), r = qr(e), s = [...new Array(n).fill(null).map(() => ue.deepClone(r))], i = [...new Array(e).fill(null).map(() => ue.deepClone(o))], a = ge(6);
543
+ const o = Zr(t / e), r = Xr(e), s = [...new Array(n).fill(null).map(() => ue.deepClone(r))], i = [...new Array(e).fill(null).map(() => ue.deepClone(o))], a = ge(6);
544
544
  return {
545
545
  tableRows: s,
546
546
  tableColumns: i,
@@ -556,7 +556,7 @@ function Ea(n, e, t) {
556
556
  posOffset: 0
557
557
  },
558
558
  positionV: {
559
- relativeFrom: gt.PAGE,
559
+ relativeFrom: ft.PAGE,
560
560
  posOffset: 0
561
561
  }
562
562
  },
@@ -581,7 +581,7 @@ function Ea(n, e, t) {
581
581
  }
582
582
  },
583
583
  size: {
584
- type: Gi.UNSPECIFIED,
584
+ type: Yi.UNSPECIFIED,
585
585
  width: {
586
586
  v: t
587
587
  }
@@ -882,7 +882,7 @@ function bd(n, e) {
882
882
  };
883
883
  }
884
884
  var Ar = /* @__PURE__ */ ((n) => (n[n.NEXT = 0] = "NEXT", n[n.PREV = 1] = "PREV", n))(Ar || {});
885
- function $s(n, e, t) {
885
+ function ei(n, e, t) {
886
886
  const { startOffset: o } = e;
887
887
  let r = null;
888
888
  for (const d of n.getChildren()) {
@@ -968,7 +968,7 @@ const Od = In, va = {
968
968
  }
969
969
  }, m = new Nt();
970
970
  m.reset();
971
- const I = new Ee(), S = W.getInstance(), v = [], R = !!((C = l.tables) != null && C.length), E = !!((B = l.customBlocks) != null && B.length);
971
+ const I = new Ie(), S = W.getInstance(), v = [], R = !!((C = l.tables) != null && C.length), E = !!((B = l.customBlocks) != null && B.length);
972
972
  if (R && t || R && xd(c) || c.length && (d != null && d.length))
973
973
  return !1;
974
974
  for (let w = 0; w < c.length; w++) {
@@ -989,11 +989,11 @@ const Od = In, va = {
989
989
  oe.blockId = Pe;
990
990
  const Je = ue.deepClone(h[he]);
991
991
  Je.drawingId = Pe;
992
- const At = S.insertOp(["drawings", Pe], Je), $e = S.insertOp(["drawingsOrder", ae], Pe);
993
- v.push(At), v.push($e);
992
+ const ut = S.insertOp(["drawings", Pe], Je), $e = S.insertOp(["drawingsOrder", ae], Pe);
993
+ v.push(ut), v.push($e);
994
994
  }
995
995
  }
996
- const ne = jr((P = g.customRanges) != null ? P : [], $, Od.includes(f)), ie = zr((F = g.customDecorations) != null ? F : [], $);
996
+ const ne = zr((P = g.customRanges) != null ? P : [], $, Od.includes(f)), ie = Gr((F = g.customDecorations) != null ? F : [], $);
997
997
  if (ne && (k.customRanges = [{
998
998
  ...ne,
999
999
  startIndex: 0,
@@ -1031,7 +1031,7 @@ function Td(n, e) {
1031
1031
  }
1032
1032
  function Bd(n, e, t) {
1033
1033
  var g, f;
1034
- const o = e.getSelfOrHeaderFooterModel(t).getBody(), r = new Ee(), s = W.getInstance(), i = [];
1034
+ const o = e.getSelfOrHeaderFooterModel(t).getBody(), r = new Ie(), s = W.getInstance(), i = [];
1035
1035
  if (o == null)
1036
1036
  return i;
1037
1037
  const { tables: a = [] } = o, c = new Nt();
@@ -1060,7 +1060,7 @@ function Md(n, e, t, o) {
1060
1060
  const r = [];
1061
1061
  if (e.getSelfOrHeaderFooterModel(o).getBody() == null)
1062
1062
  return r;
1063
- const i = new Ee(), a = W.getInstance(), c = new Nt();
1063
+ const i = new Ie(), a = W.getInstance(), c = new Nt();
1064
1064
  c.reset();
1065
1065
  for (const l of n) {
1066
1066
  const { startOffset: A, endOffset: h, spanEntireRow: u, spanEntireTable: g } = l;
@@ -1182,7 +1182,7 @@ const Dd = "doc.command.insert-text", Ca = {
1182
1182
  textRanges: p,
1183
1183
  debounce: !0
1184
1184
  }
1185
- }, I = new Ee(), S = W.getInstance();
1185
+ }, I = new Ie(), S = W.getInstance();
1186
1186
  if (g)
1187
1187
  u > 0 && I.push({
1188
1188
  t: G.RETAIN,
@@ -1228,7 +1228,7 @@ const Dd = "doc.command.insert-text", Ca = {
1228
1228
  }],
1229
1229
  debounce: !0
1230
1230
  }
1231
- }, p = new Ee(), m = W.getInstance();
1231
+ }, p = new Ie(), m = W.getInstance();
1232
1232
  p.push({
1233
1233
  t: G.RETAIN,
1234
1234
  len: h - 0
@@ -1253,7 +1253,7 @@ const Dd = "doc.command.insert-text", Ca = {
1253
1253
  actions: [],
1254
1254
  textRanges: a
1255
1255
  }
1256
- }, h = new Ee(), u = W.getInstance(), { startOffset: g, endOffset: f } = t;
1256
+ }, h = new Ie(), u = W.getInstance(), { startOffset: g, endOffset: f } = t;
1257
1257
  h.push({
1258
1258
  t: G.RETAIN,
1259
1259
  len: g
@@ -1272,7 +1272,7 @@ function Un(n) {
1272
1272
  const e = n.get(L), o = n.get(Y).getActiveTextRange(), r = e.getCurrentUnitOfType(_.UNIVER_DOC);
1273
1273
  return !o || !o.collapsed || !r || o.segmentId ? !1 : ce.range.getParagraphsInRange(o, (a = (i = r.getBody()) == null ? void 0 : i.paragraphs) != null ? a : [], (d = (c = r.getBody()) == null ? void 0 : c.dataStream) != null ? d : "")[0];
1274
1274
  }
1275
- const Zr = {
1275
+ const Jr = {
1276
1276
  id: "doc.command.delete-custom-block",
1277
1277
  type: D.COMMAND,
1278
1278
  handler: async (n, e) => {
@@ -1294,7 +1294,7 @@ const Zr = {
1294
1294
  textRanges: f,
1295
1295
  prevTextRanges: [c]
1296
1296
  }
1297
- }, m = new Ee(), I = W.getInstance(), S = [];
1297
+ }, m = new Ie(), I = W.getInstance(), S = [];
1298
1298
  A > 0 && m.push({
1299
1299
  t: G.RETAIN,
1300
1300
  len: a === Ne.LEFT ? A - 1 : A
@@ -1307,7 +1307,7 @@ const Zr = {
1307
1307
  const R = ((x = i.getDrawings()) != null ? x : {})[l], b = i.getDrawingsOrder().indexOf(l), y = I.removeOp(["drawings", l], R), C = I.removeOp(["drawingsOrder", b], l);
1308
1308
  return S.push(y), S.push(C), p.params.actions = S.reduce((M, P) => W.compose(M, P), null), !!r.syncExecuteCommand(p.id, p.params);
1309
1309
  }
1310
- }, Jr = {
1310
+ }, $r = {
1311
1311
  id: "doc.command.merge-two-paragraph",
1312
1312
  type: D.COMMAND,
1313
1313
  // eslint-disable-next-line max-lines-per-function
@@ -1346,7 +1346,7 @@ const Zr = {
1346
1346
  textRanges: E,
1347
1347
  prevTextRanges: [i]
1348
1348
  }
1349
- }, y = new Ee(), C = W.getInstance();
1349
+ }, y = new Ie(), C = W.getInstance();
1350
1350
  S.startIndex > 0 && y.push({
1351
1351
  t: G.RETAIN,
1352
1352
  len: S.startIndex
@@ -1406,7 +1406,7 @@ const Zr = {
1406
1406
  actions: [],
1407
1407
  textRanges: f
1408
1408
  }
1409
- }, m = new Ee(), I = W.getInstance();
1409
+ }, m = new Ie(), I = W.getInstance();
1410
1410
  g.startIndex > 0 && m.push({
1411
1411
  t: G.RETAIN,
1412
1412
  len: g.startIndex
@@ -1434,7 +1434,7 @@ const Zr = {
1434
1434
  return p.params.actions = I.editOp(m.serialize(), S), !!o.syncExecuteCommand(p.id, p.params);
1435
1435
  }
1436
1436
  };
1437
- function $r(n, e) {
1437
+ function es(n, e) {
1438
1438
  let t = 0;
1439
1439
  if (n == null || n.length === 0) {
1440
1440
  if (typeof e[0].startOffset == "number") {
@@ -1469,7 +1469,7 @@ const Do = {
1469
1469
  if (A == null)
1470
1470
  return !1;
1471
1471
  if (d != null && d.length) {
1472
- const w = $r(l, d), N = d[0].segmentId, ee = [
1472
+ const w = es(l, d), N = d[0].segmentId, ee = [
1473
1473
  {
1474
1474
  startOffset: w,
1475
1475
  endOffset: w
@@ -1530,7 +1530,7 @@ const Do = {
1530
1530
  return !0;
1531
1531
  if (b.content === "\r") {
1532
1532
  const w = (C = f.paragraphs) == null ? void 0 : C.find((N) => N.startIndex === m - 1);
1533
- (B = w == null ? void 0 : w.paragraphStyle) != null && B.borderBottom ? r = await o.executeCommand(ba.id) : r = await o.executeCommand(Jr.id, {
1533
+ (B = w == null ? void 0 : w.paragraphStyle) != null && B.borderBottom ? r = await o.executeCommand(ba.id) : r = await o.executeCommand($r.id, {
1534
1534
  direction: Ne.LEFT,
1535
1535
  range: p
1536
1536
  });
@@ -1541,7 +1541,7 @@ const Do = {
1541
1541
  const N = (F = (P = s.getBody()) == null ? void 0 : P.customBlocks) == null ? void 0 : F.find(($) => $.blockId === b.drawingId);
1542
1542
  if (w.layoutType === bo.INLINE || (N == null ? void 0 : N.blockType) === Nc.CUSTOM) {
1543
1543
  const $ = s.getUnitId();
1544
- r = await o.executeCommand(Zr.id, {
1544
+ r = await o.executeCommand(Jr.id, {
1545
1545
  direction: Ne.LEFT,
1546
1546
  range: c,
1547
1547
  unitId: $,
@@ -1601,7 +1601,7 @@ const Do = {
1601
1601
  return !1;
1602
1602
  const r = qe(n, o.getUnitId()), s = n.get(T), i = e.getActiveTextRange(), a = e.getRectRanges(), c = e.getTextRanges(), d = r == null ? void 0 : r.getSkeleton();
1603
1603
  if (a != null && a.length) {
1604
- const R = $r(c, a), E = a[0].segmentId, b = [
1604
+ const R = es(c, a), E = a[0].segmentId, b = [
1605
1605
  {
1606
1606
  startOffset: R,
1607
1607
  endOffset: R
@@ -1626,7 +1626,7 @@ const Do = {
1626
1626
  if (R.streamType === V.PARAGRAPH && (E == null ? void 0 : E.streamType) === V.SECTION_BREAK)
1627
1627
  return !1;
1628
1628
  if (R.content === "\r")
1629
- I = await s.executeCommand(Jr.id, {
1629
+ I = await s.executeCommand($r.id, {
1630
1630
  direction: Ne.RIGHT,
1631
1631
  range: i
1632
1632
  });
@@ -1636,7 +1636,7 @@ const Do = {
1636
1636
  return !0;
1637
1637
  if (b.layoutType === bo.INLINE) {
1638
1638
  const C = o.getUnitId();
1639
- I = await s.executeCommand(Zr.id, {
1639
+ I = await s.executeCommand(Jr.id, {
1640
1640
  direction: Ne.RIGHT,
1641
1641
  range: i,
1642
1642
  unitId: C,
@@ -1707,7 +1707,7 @@ function xa(n, e) {
1707
1707
  }
1708
1708
  ];
1709
1709
  }
1710
- const es = {
1710
+ const ts = {
1711
1711
  id: "doc.command.delete-current-paragraph",
1712
1712
  type: D.COMMAND,
1713
1713
  handler: async (n) => {
@@ -1763,7 +1763,7 @@ class Qd {
1763
1763
  }
1764
1764
  }
1765
1765
  const Yo = new Qd();
1766
- function ts(n) {
1766
+ function ns(n) {
1767
1767
  const e = n.style, t = {}, o = n.tagName.toLowerCase();
1768
1768
  switch (o) {
1769
1769
  case "b":
@@ -1826,7 +1826,7 @@ function ts(n) {
1826
1826
  }
1827
1827
  case "color": {
1828
1828
  try {
1829
- const a = new Qs(i);
1829
+ const a = new Us(i);
1830
1830
  a.isValid && (t.cl = {
1831
1831
  rgb: a.toRgbString()
1832
1832
  });
@@ -1835,7 +1835,7 @@ function ts(n) {
1835
1835
  break;
1836
1836
  }
1837
1837
  case "background-color": {
1838
- const a = new Qs(i);
1838
+ const a = new Us(i);
1839
1839
  a.isValid && (t.bg = {
1840
1840
  rgb: a.toRgbString()
1841
1841
  });
@@ -1849,11 +1849,11 @@ function Ud(n) {
1849
1849
  const e = new DOMParser(), t = `<x-univer id="univer-root">${n}</x-univer>`;
1850
1850
  return e.parseFromString(t, "text/html").querySelector("#univer-root");
1851
1851
  }
1852
- function ei(n, e) {
1852
+ function ti(n, e) {
1853
1853
  const t = n.tagName.toLowerCase();
1854
1854
  return typeof e == "string" ? t === e : Array.isArray(e) ? e.some((o) => o === t) : e(n);
1855
1855
  }
1856
- const ti = 660, Co = class Co {
1856
+ const ni = 660, Co = class Co {
1857
1857
  constructor() {
1858
1858
  O(this, "_tableCache", []);
1859
1859
  O(this, "_styleCache", /* @__PURE__ */ new Map());
@@ -1897,7 +1897,7 @@ const ti = 660, Co = class Co {
1897
1897
  ts: A
1898
1898
  });
1899
1899
  } else if (d.nodeName === "IMG") {
1900
- const l = d, A = l.dataset.imageSourceType, h = A === Wr.UUID ? l.dataset.source : l.src;
1900
+ const l = d, A = l.dataset.imageSourceType, h = A === jr.UUID ? l.dataset.source : l.src;
1901
1901
  if (h && A) {
1902
1902
  const u = Number(l.dataset.width || 100), g = Number(l.dataset.height || 100), f = Number(l.dataset.docTransformWidth || u), p = Number(l.dataset.docTransformHeight || g), m = ge(6);
1903
1903
  (c = (a = o.body) == null ? void 0 : a.customBlocks) == null || c.push({ startIndex: r.dataStream.length, blockId: m }), r.dataStream += "\b", o.drawings || (o.drawings = {}), o.drawings[m] = {
@@ -1915,7 +1915,7 @@ const ti = 660, Co = class Co {
1915
1915
  posOffset: 0
1916
1916
  },
1917
1917
  positionV: {
1918
- relativeFrom: gt.PARAGRAPH,
1918
+ relativeFrom: ft.PARAGRAPH,
1919
1919
  posOffset: 0
1920
1920
  }
1921
1921
  },
@@ -1929,12 +1929,12 @@ const ti = 660, Co = class Co {
1929
1929
  if (Qc.includes(d.nodeName.toLowerCase()))
1930
1930
  continue;
1931
1931
  if (d.nodeType === Node.ELEMENT_NODE) {
1932
- const l = d, A = this._processBeforeLink(l, o), h = e ? this._styleCache.get(e) : {}, u = this._styleRules.find(({ filter: m }) => ei(d, m)), g = u ? u.getStyle(d) : ts(d);
1932
+ const l = d, A = this._processBeforeLink(l, o), h = e ? this._styleCache.get(e) : {}, u = this._styleRules.find(({ filter: m }) => ti(d, m)), g = u ? u.getStyle(d) : ns(d);
1933
1933
  this._styleCache.set(d, { ...h, ...g });
1934
1934
  const { childNodes: f } = d;
1935
1935
  this._processBeforeTable(d, o), this._process(d, f, o), this._processAfterTable(d, o);
1936
1936
  const p = this._afterProcessRules.find(
1937
- ({ filter: m }) => ei(d, m)
1937
+ ({ filter: m }) => ti(d, m)
1938
1938
  );
1939
1939
  p && p.handler(o, d), this._processAfterLink(l, o, A);
1940
1940
  }
@@ -1948,7 +1948,7 @@ const ti = 660, Co = class Co {
1948
1948
  r.dataStream[r.dataStream.length - 1] !== "\r" && (r.dataStream += "\r", r.paragraphs == null && (r.paragraphs = []), (s = r.paragraphs) == null || s.push({
1949
1949
  startIndex: r.dataStream.length - 1
1950
1950
  }));
1951
- const i = Ea(0, 0, ti);
1951
+ const i = Ea(0, 0, ni);
1952
1952
  this._tableCache.push({
1953
1953
  table: i,
1954
1954
  startIndex: r.dataStream.length
@@ -1956,12 +1956,12 @@ const ti = 660, Co = class Co {
1956
1956
  break;
1957
1957
  }
1958
1958
  case "TR": {
1959
- const i = qr(0);
1959
+ const i = Xr(0);
1960
1960
  this._tableCache[this._tableCache.length - 1].table.tableRows.push(i), r.dataStream += V.TABLE_ROW_START;
1961
1961
  break;
1962
1962
  }
1963
1963
  case "TD": {
1964
- const i = Kr(), a = this._tableCache[this._tableCache.length - 1].table;
1964
+ const i = qr(), a = this._tableCache[this._tableCache.length - 1].table;
1965
1965
  a.tableRows[a.tableRows.length - 1].tableCells.push(i), r.dataStream += V.TABLE_CELL_START;
1966
1966
  break;
1967
1967
  }
@@ -1974,7 +1974,7 @@ const ti = 660, Co = class Co {
1974
1974
  const { tableSource: s } = t;
1975
1975
  switch (o) {
1976
1976
  case "TABLE": {
1977
- const c = this._tableCache.pop(), { startIndex: d, table: l } = c, A = l.tableRows[0].tableCells.length, h = Xr(ti / A), u = [...new Array(A).fill(null).map(() => ue.deepClone(h))];
1977
+ const c = this._tableCache.pop(), { startIndex: d, table: l } = c, A = l.tableRows[0].tableCells.length, h = Zr(ni / A), u = [...new Array(A).fill(null).map(() => ue.deepClone(h))];
1978
1978
  l.tableColumns = u, s[l.tableId] = l, r.dataStream += V.TABLE_END, r.tables.push({
1979
1979
  startIndex: d,
1980
1980
  endIndex: r.dataStream.length,
@@ -2024,7 +2024,7 @@ const Fd = {
2024
2024
  {
2025
2025
  filter: ["s"],
2026
2026
  getStyle(n) {
2027
- const e = ts(n);
2027
+ const e = ns(n);
2028
2028
  return {
2029
2029
  st: {
2030
2030
  s: z.TRUE
@@ -2055,12 +2055,12 @@ function Oa(n) {
2055
2055
  switch (r) {
2056
2056
  case "margin-top": {
2057
2057
  const i = Number.parseInt(s);
2058
- t.spaceAbove = { v: /pt/.test(s) ? Vs(i) : i };
2058
+ t.spaceAbove = { v: /pt/.test(s) ? Ws(i) : i };
2059
2059
  break;
2060
2060
  }
2061
2061
  case "margin-bottom": {
2062
2062
  const i = Number.parseInt(s);
2063
- t.spaceBelow = { v: /pt/.test(s) ? Vs(i) : i };
2063
+ t.spaceBelow = { v: /pt/.test(s) ? Ws(i) : i };
2064
2064
  break;
2065
2065
  }
2066
2066
  case "line-height": {
@@ -2102,7 +2102,7 @@ const Hd = {
2102
2102
  {
2103
2103
  filter: ["b"],
2104
2104
  getStyle(n) {
2105
- const e = ts(n);
2105
+ const e = ns(n);
2106
2106
  return { bl: z.TRUE, ...e };
2107
2107
  }
2108
2108
  }
@@ -2136,12 +2136,12 @@ function Vd(n) {
2136
2136
  "data-width": (o = n.transform) == null ? void 0 : o.width,
2137
2137
  "data-height": (r = n.transform) == null ? void 0 : r.height,
2138
2138
  "data-image-source-type": n.imageSourceType,
2139
- "data-source": n.imageSourceType === Wr.UUID ? n.source : void 0,
2139
+ "data-source": n.imageSourceType === jr.UUID ? n.source : void 0,
2140
2140
  src: n.source
2141
2141
  };
2142
2142
  return `<img ${e(t)}></img>`;
2143
2143
  }
2144
- function ni(n, e) {
2144
+ function oi(n, e) {
2145
2145
  const { st: t, ed: o, ts: r = {} } = e, { ff: s, fs: i, it: a, bl: c, ul: d, st: l, ol: A, bg: h, cl: u, va: g } = r;
2146
2146
  let f = n.slice(t, o);
2147
2147
  const p = [];
@@ -2155,10 +2155,10 @@ function Ko(n, e, t) {
2155
2155
  const i = [];
2156
2156
  for (const a of r) {
2157
2157
  const { st: c, ed: d } = a;
2158
- ue.hasIntersectionBetweenTwoRanges(e, t, c, d) && (c > s ? (i.push(o.slice(s, c)), i.push(ni(o, {
2158
+ ue.hasIntersectionBetweenTwoRanges(e, t, c, d) && (c > s ? (i.push(o.slice(s, c)), i.push(oi(o, {
2159
2159
  ...a,
2160
2160
  ed: Math.min(d, t)
2161
- }))) : i.push(ni(o, {
2161
+ }))) : i.push(oi(o, {
2162
2162
  ...a,
2163
2163
  st: s,
2164
2164
  ed: Math.min(d, t)
@@ -2285,9 +2285,9 @@ var Gd = Object.getOwnPropertyDescriptor, Yd = (n, e, t, o) => {
2285
2285
  en.use(kd);
2286
2286
  en.use(Fd);
2287
2287
  en.use(Hd);
2288
- function oi(n, e, t) {
2288
+ function ri(n, e, t) {
2289
2289
  var s, i, a;
2290
- const o = Ki(n, e, t + 2), r = V.TABLE_START + V.TABLE_ROW_START + V.TABLE_CELL_START + o.dataStream + V.TABLE_CELL_END + V.TABLE_ROW_END + V.TABLE_END;
2290
+ const o = qi(n, e, t + 2), r = V.TABLE_START + V.TABLE_ROW_START + V.TABLE_CELL_START + o.dataStream + V.TABLE_CELL_END + V.TABLE_ROW_END + V.TABLE_END;
2291
2291
  return o.dataStream = r, (s = o.textRuns) == null || s.forEach((c) => {
2292
2292
  const { st: d, ed: l } = c;
2293
2293
  c.st = d + 3, c.ed = l + 3;
@@ -2299,8 +2299,8 @@ function oi(n, e, t) {
2299
2299
  c.startIndex = d + 3;
2300
2300
  }), o;
2301
2301
  }
2302
- const Lt = Yi("doc.clipboard-service");
2303
- let ur = class extends pe {
2302
+ const Lt = Ki("doc.clipboard-service");
2303
+ let ur = class extends me {
2304
2304
  constructor(e, t, o, r, s) {
2305
2305
  super();
2306
2306
  O(this, "_clipboardHooks", []);
@@ -2355,7 +2355,7 @@ let ur = class extends pe {
2355
2355
  try {
2356
2356
  let h = 0;
2357
2357
  if (o.length > 0)
2358
- h = $r(t, o);
2358
+ h = es(t, o);
2359
2359
  else if (s != null) {
2360
2360
  h = s;
2361
2361
  for (const g of t) {
@@ -2473,7 +2473,7 @@ let ur = class extends pe {
2473
2473
  i = !1;
2474
2474
  const { spanEntireRow: I } = A;
2475
2475
  let S;
2476
- S = oi(c, h, u), s.push(S);
2476
+ S = ri(c, h, u), s.push(S);
2477
2477
  continue;
2478
2478
  }
2479
2479
  const p = { startOffset: h, endOffset: u }, m = o.getSelfOrHeaderFooterModel(a).sliceBody(p.startOffset, p.endOffset, e);
@@ -2551,7 +2551,7 @@ let ur = class extends pe {
2551
2551
  l.onloadend = function() {
2552
2552
  A({
2553
2553
  source: l.result,
2554
- imageSourceType: Wr.BASE64
2554
+ imageSourceType: jr.BASE64
2555
2555
  });
2556
2556
  }, l.readAsDataURL(d);
2557
2557
  });
@@ -2589,7 +2589,7 @@ let ur = class extends pe {
2589
2589
  angle: 0,
2590
2590
  size: { width: h, height: u },
2591
2591
  positionH: { relativeFrom: Ro.CHARACTER, posOffset: 0 },
2592
- positionV: { relativeFrom: gt.LINE, posOffset: 0 }
2592
+ positionV: { relativeFrom: ft.LINE, posOffset: 0 }
2593
2593
  }
2594
2594
  };
2595
2595
  })), this._umdToHtml.convert([t]);
@@ -2605,15 +2605,15 @@ ur = Yd([
2605
2605
  function Po(n) {
2606
2606
  return n.getContextValue(Dn) || n.getContextValue(to);
2607
2607
  }
2608
- const ns = 999, so = {
2608
+ const os = 999, so = {
2609
2609
  id: bl.id,
2610
2610
  name: "doc.command.copy",
2611
2611
  type: D.COMMAND,
2612
2612
  multi: !0,
2613
- priority: ns,
2613
+ priority: os,
2614
2614
  preconditions: Po,
2615
2615
  handler: async (n) => n.get(Lt).copy()
2616
- }, os = {
2616
+ }, rs = {
2617
2617
  id: "doc.command.copy-current-paragraph",
2618
2618
  type: D.COMMAND,
2619
2619
  handler: async (n) => {
@@ -2627,15 +2627,15 @@ const ns = 999, so = {
2627
2627
  }]
2628
2628
  ) : !1;
2629
2629
  }
2630
- }, rs = {
2630
+ }, ss = {
2631
2631
  id: yl.id,
2632
2632
  name: "doc.command.cut",
2633
2633
  type: D.COMMAND,
2634
2634
  multi: !0,
2635
- priority: ns,
2635
+ priority: os,
2636
2636
  preconditions: Po,
2637
2637
  handler: async (n) => n.get(Lt).cut()
2638
- }, ss = {
2638
+ }, is = {
2639
2639
  id: "doc.command.cut-current-paragraph",
2640
2640
  type: D.COMMAND,
2641
2641
  handler: async (n) => {
@@ -2649,12 +2649,12 @@ const ns = 999, so = {
2649
2649
  }]
2650
2650
  ) : !1;
2651
2651
  }
2652
- }, is = {
2652
+ }, as = {
2653
2653
  id: xl.id,
2654
2654
  name: "doc.command.paste",
2655
2655
  type: D.COMMAND,
2656
2656
  multi: !0,
2657
- priority: ns,
2657
+ priority: os,
2658
2658
  preconditions: Po,
2659
2659
  handler: async (n) => {
2660
2660
  const e = n.get(Lt), o = await n.get(sa).read();
@@ -2663,7 +2663,7 @@ const ns = 999, so = {
2663
2663
  }, wo = {
2664
2664
  id: "doc.command.horizontal-line",
2665
2665
  type: D.COMMAND,
2666
- handler: (n, e) => n.get(T).syncExecuteCommand(Gr.id, {
2666
+ handler: (n, e) => n.get(T).syncExecuteCommand(Yr.id, {
2667
2667
  horizontalLine: {
2668
2668
  padding: 5,
2669
2669
  color: {
@@ -2674,7 +2674,7 @@ const ns = 999, so = {
2674
2674
  },
2675
2675
  textRange: e == null ? void 0 : e.insertRange
2676
2676
  })
2677
- }, as = {
2677
+ }, cs = {
2678
2678
  id: "doc.command.insert-horizontal-line-bellow",
2679
2679
  type: D.COMMAND,
2680
2680
  handler: (n) => {
@@ -2727,7 +2727,7 @@ const ns = 999, so = {
2727
2727
  }, !1), !0;
2728
2728
  }
2729
2729
  };
2730
- class No extends St {
2730
+ class No extends Ct {
2731
2731
  constructor(t) {
2732
2732
  super();
2733
2733
  O(this, "_previousActiveRange", null);
@@ -2806,13 +2806,13 @@ const Ba = {
2806
2806
  actions: [],
2807
2807
  textRanges: R
2808
2808
  }
2809
- }, b = l.getDefaultStyle(), y = l.getStyleCache(), C = jr((ee = p.customRanges) != null ? ee : [], I + r, In.includes(t)), B = Bo(
2809
+ }, b = l.getDefaultStyle(), y = l.getStyleCache(), C = zr((ee = p.customRanges) != null ? ee : [], I + r, In.includes(t)), B = Bo(
2810
2810
  p,
2811
2811
  i ? S : I + r,
2812
2812
  b,
2813
2813
  y,
2814
2814
  In.includes(t)
2815
- ), x = zr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ee(), P = W.getInstance();
2815
+ ), x = Gr(($ = p.customDecorations) != null ? $ : [], I + r), M = new Ie(), P = W.getInstance();
2816
2816
  if (!u.collapsed && i) {
2817
2817
  const U = ce.selection.delete([u], p, 0, null, !1);
2818
2818
  M.push(...U), E.params.textRanges = [{
@@ -2857,23 +2857,12 @@ const Ba = {
2857
2857
  }
2858
2858
  };
2859
2859
  function Xe(n, e, t) {
2860
- return t.executeCommand(Rt.id, {
2860
+ return t.executeCommand(yt.id, {
2861
2861
  preCommandId: n,
2862
2862
  ...e != null ? e : {}
2863
2863
  });
2864
2864
  }
2865
- const ri = "doc.command.set-inline-format-bold", Qt = {
2866
- id: ri,
2867
- type: D.COMMAND,
2868
- handler: async (n, e) => {
2869
- const t = n.get(T);
2870
- return Xe(
2871
- ri,
2872
- e,
2873
- t
2874
- );
2875
- }
2876
- }, si = "doc.command.set-inline-format-italic", Ut = {
2865
+ const si = "doc.command.set-inline-format-bold", Qt = {
2877
2866
  id: si,
2878
2867
  type: D.COMMAND,
2879
2868
  handler: async (n, e) => {
@@ -2884,7 +2873,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2884
2873
  t
2885
2874
  );
2886
2875
  }
2887
- }, ii = "doc.command.set-inline-format-underline", Ft = {
2876
+ }, ii = "doc.command.set-inline-format-italic", Ut = {
2888
2877
  id: ii,
2889
2878
  type: D.COMMAND,
2890
2879
  handler: async (n, e) => {
@@ -2895,7 +2884,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2895
2884
  t
2896
2885
  );
2897
2886
  }
2898
- }, ai = "doc.command.set-inline-format-strikethrough", Ht = {
2887
+ }, ai = "doc.command.set-inline-format-underline", Ft = {
2899
2888
  id: ai,
2900
2889
  type: D.COMMAND,
2901
2890
  handler: async (n, e) => {
@@ -2906,7 +2895,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2906
2895
  t
2907
2896
  );
2908
2897
  }
2909
- }, ci = "doc.command.set-inline-format-subscript", Ct = {
2898
+ }, ci = "doc.command.set-inline-format-strikethrough", Ht = {
2910
2899
  id: ci,
2911
2900
  type: D.COMMAND,
2912
2901
  handler: async (n, e) => {
@@ -2917,7 +2906,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2917
2906
  t
2918
2907
  );
2919
2908
  }
2920
- }, li = "doc.command.set-inline-format-superscript", kt = {
2909
+ }, li = "doc.command.set-inline-format-subscript", bt = {
2921
2910
  id: li,
2922
2911
  type: D.COMMAND,
2923
2912
  handler: async (n, e) => {
@@ -2928,7 +2917,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2928
2917
  t
2929
2918
  );
2930
2919
  }
2931
- }, di = "doc.command.set-inline-format-fontsize", ct = {
2920
+ }, di = "doc.command.set-inline-format-superscript", kt = {
2932
2921
  id: di,
2933
2922
  type: D.COMMAND,
2934
2923
  handler: async (n, e) => {
@@ -2939,7 +2928,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2939
2928
  t
2940
2929
  );
2941
2930
  }
2942
- }, Ai = "doc.command.set-inline-format-font-family", tn = {
2931
+ }, Ai = "doc.command.set-inline-format-fontsize", ct = {
2943
2932
  id: Ai,
2944
2933
  type: D.COMMAND,
2945
2934
  handler: async (n, e) => {
@@ -2950,7 +2939,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2950
2939
  t
2951
2940
  );
2952
2941
  }
2953
- }, ui = "doc.command.set-inline-format-text-color", Dt = {
2942
+ }, ui = "doc.command.set-inline-format-font-family", tn = {
2954
2943
  id: ui,
2955
2944
  type: D.COMMAND,
2956
2945
  handler: async (n, e) => {
@@ -2961,7 +2950,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2961
2950
  t
2962
2951
  );
2963
2952
  }
2964
- }, hi = "doc.command.set-inline-format-text-background-color", Pt = {
2953
+ }, hi = "doc.command.set-inline-format-text-color", Et = {
2965
2954
  id: hi,
2966
2955
  type: D.COMMAND,
2967
2956
  handler: async (n, e) => {
@@ -2972,7 +2961,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2972
2961
  t
2973
2962
  );
2974
2963
  }
2975
- }, gi = "doc.command.reset-inline-format-text-background-color", Fn = {
2964
+ }, gi = "doc.command.set-inline-format-text-background-color", Pt = {
2976
2965
  id: gi,
2977
2966
  type: D.COMMAND,
2978
2967
  handler: async (n, e) => {
@@ -2983,6 +2972,17 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2983
2972
  t
2984
2973
  );
2985
2974
  }
2975
+ }, fi = "doc.command.reset-inline-format-text-background-color", Fn = {
2976
+ id: fi,
2977
+ type: D.COMMAND,
2978
+ handler: async (n, e) => {
2979
+ const t = n.get(T);
2980
+ return Xe(
2981
+ fi,
2982
+ e,
2983
+ t
2984
+ );
2985
+ }
2986
2986
  }, hr = {
2987
2987
  [Qt.id]: "bl",
2988
2988
  [Ut.id]: "it",
@@ -2990,12 +2990,12 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
2990
2990
  [Ht.id]: "st",
2991
2991
  [ct.id]: "fs",
2992
2992
  [tn.id]: "ff",
2993
- [Dt.id]: "cl",
2993
+ [Et.id]: "cl",
2994
2994
  [Pt.id]: "bg",
2995
2995
  [Fn.id]: "bg",
2996
- [Ct.id]: "va",
2996
+ [bt.id]: "va",
2997
2997
  [kt.id]: "va"
2998
- }, Rt = {
2998
+ }, yt = {
2999
2999
  id: "doc.command.set-inline-format",
3000
3000
  type: D.COMMAND,
3001
3001
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -3021,7 +3021,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
3021
3021
  // fallthrough
3022
3022
  case Ht.id:
3023
3023
  // fallthrough
3024
- case Ct.id:
3024
+ case bt.id:
3025
3025
  // fallthrough
3026
3026
  case kt.id: {
3027
3027
  const E = a.getDefaultStyle(), b = _a(
@@ -3040,7 +3040,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
3040
3040
  g = t;
3041
3041
  break;
3042
3042
  }
3043
- case Dt.id:
3043
+ case Et.id:
3044
3044
  case Pt.id: {
3045
3045
  g = {
3046
3046
  rgb: t
@@ -3063,7 +3063,7 @@ const ri = "doc.command.set-inline-format-bold", Qt = {
3063
3063
  actions: [],
3064
3064
  textRanges: c
3065
3065
  }
3066
- }, p = new Ee(), m = W.getInstance(), I = new Nt();
3066
+ }, p = new Ie(), m = W.getInstance(), I = new Nt();
3067
3067
  I.reset();
3068
3068
  for (const E of c) {
3069
3069
  let { startOffset: b, endOffset: y, rangeType: C } = E;
@@ -3120,7 +3120,7 @@ function Ma(n, e, t) {
3120
3120
  s: z.TRUE
3121
3121
  };
3122
3122
  if (/va/.test(e))
3123
- return t === Ct.id ? (n == null ? void 0 : n[e]) === Ve.SUBSCRIPT ? Ve.NORMAL : Ve.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ve.SUPERSCRIPT ? Ve.NORMAL : Ve.SUPERSCRIPT;
3123
+ return t === bt.id ? (n == null ? void 0 : n[e]) === Ve.SUBSCRIPT ? Ve.NORMAL : Ve.SUBSCRIPT : (n == null ? void 0 : n[e]) === Ve.SUPERSCRIPT ? Ve.NORMAL : Ve.SUPERSCRIPT;
3124
3124
  }
3125
3125
  function _a(n, e, t) {
3126
3126
  var l, A, h, u, g, f, p, m, I, S, v, R, E, b;
@@ -3137,7 +3137,7 @@ function _a(n, e, t) {
3137
3137
  }
3138
3138
  return C != null && C.ts ? { ...t, ...C.ts } : t;
3139
3139
  }
3140
- const { textRuns: i = [] } = Ki(n, o, r), a = ue.deepClone(t), c = i.map((y) => {
3140
+ const { textRuns: i = [] } = qi(n, o, r), a = ue.deepClone(t), c = i.map((y) => {
3141
3141
  var C;
3142
3142
  return (C = y == null ? void 0 : y.ts) == null ? void 0 : C.fs;
3143
3143
  }).filter(Boolean);
@@ -3280,7 +3280,7 @@ const Da = {
3280
3280
  }
3281
3281
  };
3282
3282
  function Jd(n, e, t, o) {
3283
- const r = new Ee(), s = W.getInstance(), i = (t == null ? void 0 : t.dataStream.length) - 2;
3283
+ const r = new Ie(), s = W.getInstance(), i = (t == null ? void 0 : t.dataStream.length) - 2;
3284
3284
  i > 0 && r.push({
3285
3285
  t: G.DELETE,
3286
3286
  len: i
@@ -3324,7 +3324,7 @@ const wa = {
3324
3324
  textRanges: s,
3325
3325
  debounce: !0
3326
3326
  }
3327
- }, h = new Ee(), u = W.getInstance();
3327
+ }, h = new Ie(), u = W.getInstance();
3328
3328
  return h.push(...ce.selection.delete([l], d, 0, r)), A.params.actions = u.editOp(h.serialize()), t.syncExecuteCommand(A.id, A.params);
3329
3329
  }
3330
3330
  }, $d = {
@@ -3546,7 +3546,7 @@ const gr = {
3546
3546
  const t = n.get(Y), o = n.get(L), r = n.get(T), s = o.getCurrentUnitForType(_.UNIVER_DOC), i = t.getActiveTextRange();
3547
3547
  if (s == null || i == null)
3548
3548
  return !1;
3549
- const { segmentId: a, startOffset: c } = i, { listType: d, paragraph: l } = e, { paragraphStart: A, paragraphEnd: h } = l, u = new Ee(), g = W.getInstance(), { paragraphStyle: f = {} } = l, m = (Hc[d].nestingLevel[0].paragraphProperties || {}).textStyle;
3549
+ const { segmentId: a, startOffset: c } = i, { listType: d, paragraph: l } = e, { paragraphStart: A, paragraphEnd: h } = l, u = new Ie(), g = W.getInstance(), { paragraphStyle: f = {} } = l, m = (Hc[d].nestingLevel[0].paragraphProperties || {}).textStyle;
3550
3550
  let S = ge(6);
3551
3551
  const v = (M = (x = s.getBody()) == null ? void 0 : x.paragraphs) != null ? M : [], R = v.findIndex((F) => F.startIndex === l.startIndex), E = v[R - 1], b = v[R + 1];
3552
3552
  E && E.bullet && E.bullet.listType.indexOf(d) === 0 ? S = E.bullet.listId : b && b.bullet && b.bullet.listType.indexOf(d) === 0 && (S = b.bullet.listId);
@@ -3606,7 +3606,7 @@ const gr = {
3606
3606
  return y.params.actions = g.editOp(u.serialize(), C), !!r.syncExecuteCommand(y.id, y.params);
3607
3607
  }
3608
3608
  };
3609
- function cs(n, e) {
3609
+ function ls(n, e) {
3610
3610
  var l, A;
3611
3611
  const t = n.get(T), o = Un(n);
3612
3612
  if (!o)
@@ -3655,18 +3655,18 @@ function cs(n, e) {
3655
3655
  }, a = W.getInstance(), c = Ae(r);
3656
3656
  return i.params.actions = a.editOp(s.serialize(), c), !!t.syncExecuteCommand(i.id, i.params);
3657
3657
  }
3658
- const ls = {
3658
+ const ds = {
3659
3659
  id: "doc.command.insert-bullet-list-bellow",
3660
3660
  type: D.COMMAND,
3661
- handler: (n) => cs(n, ye.BULLET_LIST)
3662
- }, ds = {
3661
+ handler: (n) => ls(n, ye.BULLET_LIST)
3662
+ }, As = {
3663
3663
  id: "doc.command.insert-order-list-bellow",
3664
3664
  type: D.COMMAND,
3665
- handler: (n) => cs(n, ye.ORDER_LIST)
3666
- }, As = {
3665
+ handler: (n) => ls(n, ye.ORDER_LIST)
3666
+ }, us = {
3667
3667
  id: "doc.command.insert-check-list-bellow",
3668
3668
  type: D.COMMAND,
3669
- handler: (n) => cs(n, ye.CHECK_LIST)
3669
+ handler: (n) => ls(n, ye.CHECK_LIST)
3670
3670
  }, lt = {
3671
3671
  id: "doc.command.align-action",
3672
3672
  type: D.COMMAND,
@@ -3694,7 +3694,7 @@ const ls = {
3694
3694
  }
3695
3695
  }, p = new Nt();
3696
3696
  p.reset();
3697
- const m = new Ee(), I = W.getInstance();
3697
+ const m = new Ie(), I = W.getInstance();
3698
3698
  for (const C of h) {
3699
3699
  const { startIndex: B } = C;
3700
3700
  m.push({
@@ -3826,7 +3826,7 @@ const ls = {
3826
3826
  const { segmentId: c, startOffset: d } = a, l = i.getSelfOrHeaderFooterModel(c), A = (E = (R = l.getBody()) == null ? void 0 : R.paragraphs) != null ? E : [], h = (y = (b = l.getBody()) == null ? void 0 : b.dataStream) != null ? y : "", u = ce.paragraph.util.getParagraphsInRange(a, A, h)[0];
3827
3827
  if (!u)
3828
3828
  return !1;
3829
- const { paragraphStart: g } = u, f = new Ee(), p = W.getInstance(), { paragraphStyle: m = {} } = u, I = {
3829
+ const { paragraphStart: g } = u, f = new Ie(), p = W.getInstance(), { paragraphStyle: m = {} } = u, I = {
3830
3830
  id: X.id,
3831
3831
  params: {
3832
3832
  unitId: i.getUnitId(),
@@ -3864,31 +3864,31 @@ const ls = {
3864
3864
  "###": K.HEADING_3,
3865
3865
  "####": K.HEADING_4,
3866
3866
  "#####": K.HEADING_5
3867
- }, us = {
3867
+ }, hs = {
3868
3868
  id: "doc.command.h1-heading",
3869
3869
  type: D.COMMAND,
3870
3870
  handler: (n) => n.get(T).syncExecuteCommand(Ze.id, {
3871
3871
  value: K.HEADING_1
3872
3872
  })
3873
- }, hs = {
3873
+ }, gs = {
3874
3874
  id: "doc.command.h2-heading",
3875
3875
  type: D.COMMAND,
3876
3876
  handler: (n) => n.get(T).syncExecuteCommand(Ze.id, {
3877
3877
  value: K.HEADING_2
3878
3878
  })
3879
- }, gs = {
3879
+ }, fs = {
3880
3880
  id: "doc.command.h3-heading",
3881
3881
  type: D.COMMAND,
3882
3882
  handler: (n) => n.get(T).syncExecuteCommand(Ze.id, {
3883
3883
  value: K.HEADING_3
3884
3884
  })
3885
- }, fs = {
3885
+ }, ps = {
3886
3886
  id: "doc.command.h4-heading",
3887
3887
  type: D.COMMAND,
3888
3888
  handler: (n) => n.get(T).syncExecuteCommand(Ze.id, {
3889
3889
  value: K.HEADING_4
3890
3890
  })
3891
- }, ps = {
3891
+ }, ms = {
3892
3892
  id: "doc.command.h5-heading",
3893
3893
  type: D.COMMAND,
3894
3894
  handler: (n) => n.get(T).syncExecuteCommand(Ze.id, {
@@ -3922,11 +3922,11 @@ const qt = {
3922
3922
  divide: 4,
3923
3923
  glyph: 5
3924
3924
  };
3925
- function ms(n, e) {
3925
+ function Es(n, e) {
3926
3926
  return n.page > e.page ? !1 : n.page < e.page ? !0 : n.section > e.section ? !1 : n.section < e.section ? !0 : n.column > e.column ? !1 : n.column < e.column ? !0 : n.line > e.line ? !1 : n.line < e.line ? !0 : n.divide > e.divide ? !1 : n.divide < e.divide ? !0 : n.glyph > e.glyph ? !1 : (n.glyph < e.glyph, !0);
3927
3927
  }
3928
3928
  function fr(n, e) {
3929
- return ms(n, e) ? {
3929
+ return Es(n, e) ? {
3930
3930
  start: n,
3931
3931
  end: e
3932
3932
  } : {
@@ -3934,7 +3934,7 @@ function fr(n, e) {
3934
3934
  end: n
3935
3935
  };
3936
3936
  }
3937
- function fi(n) {
3937
+ function pi(n) {
3938
3938
  const e = n.length;
3939
3939
  if (e === 0)
3940
3940
  return;
@@ -3975,7 +3975,7 @@ function pr(n) {
3975
3975
  y: t
3976
3976
  }), s;
3977
3977
  }
3978
- class mt {
3978
+ class It {
3979
3979
  constructor(e, t) {
3980
3980
  O(this, "_liquid", new $i());
3981
3981
  O(this, "_currentStartState", {
@@ -4189,7 +4189,7 @@ class mt {
4189
4189
  );
4190
4190
  this._liquid.translateColumn(k);
4191
4191
  for (let oe = ie; oe <= ae; oe++) {
4192
- const he = ne[oe], { divides: Pe } = he, { start_next: Je, end_next: At } = this._getSelectionRuler(
4192
+ const he = ne[oe], { divides: Pe } = he, { start_next: Je, end_next: ut } = this._getSelectionRuler(
4193
4193
  qt.line,
4194
4194
  e,
4195
4195
  t,
@@ -4197,7 +4197,7 @@ class mt {
4197
4197
  oe
4198
4198
  );
4199
4199
  this._liquid.translateSave(), this._liquid.translateLine(he, !0, !1);
4200
- for (let $e = Je; $e <= At; $e++) {
4200
+ for (let $e = Je; $e <= ut; $e++) {
4201
4201
  const Wo = Pe[$e];
4202
4202
  this._liquid.translateSave(), this._liquid.translateDivide(Wo);
4203
4203
  const { glyphGroup: Oc } = Wo, { start_next: Tc, end_next: Bc } = this._getSelectionRuler(
@@ -4207,8 +4207,8 @@ class mt {
4207
4207
  Oc.length - 1,
4208
4208
  $e
4209
4209
  );
4210
- let Ns = !1, Ls = !1;
4211
- E === I && w === P && H === $ && oe === ie && $e === Je && (Ns = !0), E === S && w === F && H === U && oe === ae && $e === At && (Ls = !0), o && o(Tc, Bc, Ns, Ls, Wo, he, k, N, x), this._liquid.translateRestore();
4210
+ let Ls = !1, Qs = !1;
4211
+ E === I && w === P && H === $ && oe === ie && $e === Je && (Ls = !0), E === S && w === F && H === U && oe === ae && $e === ut && (Qs = !0), o && o(Tc, Bc, Ls, Qs, Wo, he, k, N, x), this._liquid.translateRestore();
4212
4212
  }
4213
4213
  this._liquid.translateRestore();
4214
4214
  }
@@ -4222,7 +4222,7 @@ function oA(n, e) {
4222
4222
  const { path: t } = n, { path: o } = e;
4223
4223
  if (t.length !== o.length || t.indexOf("cells") === -1)
4224
4224
  return !1;
4225
- const r = t.indexOf("skeTables") + 1, s = t.indexOf("rows") + 1, i = t.indexOf("cells") + 1, { tableId: a, sliceIndex: c } = Ws(t[r]), { tableId: d, sliceIndex: l } = Ws(o[r]);
4225
+ const r = t.indexOf("skeTables") + 1, s = t.indexOf("rows") + 1, i = t.indexOf("cells") + 1, { tableId: a, sliceIndex: c } = js(t[r]), { tableId: d, sliceIndex: l } = js(o[r]);
4226
4226
  if (a !== d)
4227
4227
  return !1;
4228
4228
  const A = t[s], h = o[s], u = t[i], g = o[i];
@@ -4245,7 +4245,7 @@ function ka(n, e, t) {
4245
4245
  }
4246
4246
  function Xo(n, e) {
4247
4247
  if (Ha(n, e))
4248
- return ms(n, e);
4248
+ return Es(n, e);
4249
4249
  const { path: t } = n, { path: o } = e, r = t[t.length - 5], s = o[o.length - 5];
4250
4250
  if (r !== s && typeof r == "string" && typeof s == "string") {
4251
4251
  const l = r.split("#-#")[1], A = s.split("#-#")[1];
@@ -4376,7 +4376,7 @@ class Va {
4376
4376
  };
4377
4377
  }
4378
4378
  }
4379
- const sA = "__TestSelectionRange__", iA = "__TestSelectionAnchor__", pi = 6, Zo = 500, aA = 500, mr = 3;
4379
+ const sA = "__TestSelectionRange__", iA = "__TestSelectionAnchor__", mi = 6, Zo = 500, aA = 500, mr = 3;
4380
4380
  function $n(n) {
4381
4381
  const e = n[0], t = e[0], o = e[2], { x: r, y: s } = t, { x: i, y: a } = o;
4382
4382
  return {
@@ -4386,7 +4386,7 @@ function $n(n) {
4386
4386
  height: a - s
4387
4387
  };
4388
4388
  }
4389
- function Es(n) {
4389
+ function Is(n) {
4390
4390
  return n.map((e) => {
4391
4391
  let t = 1 / 0, o = -1 / 0, r = 1 / 0, s = -1 / 0;
4392
4392
  return e.forEach((i) => {
@@ -4424,7 +4424,7 @@ class Zt {
4424
4424
  // The start position of the range
4425
4425
  get startOffset() {
4426
4426
  var r;
4427
- const { startOffset: e } = (r = fi(this._cursorList)) != null ? r : {}, t = this._docSkeleton.getViewModel().getDataModel().getSelfOrHeaderFooterModel(this._segmentId).getBody();
4427
+ const { startOffset: e } = (r = pi(this._cursorList)) != null ? r : {}, t = this._docSkeleton.getViewModel().getDataModel().getSelfOrHeaderFooterModel(this._segmentId).getBody();
4428
4428
  if (e == null || t == null)
4429
4429
  return e;
4430
4430
  const o = t.dataStream.length - 2;
@@ -4433,7 +4433,7 @@ class Zt {
4433
4433
  // The end position of the range
4434
4434
  get endOffset() {
4435
4435
  var r;
4436
- const { endOffset: e } = (r = fi(this._cursorList)) != null ? r : {}, t = this._docSkeleton.getViewModel().getDataModel().getSelfOrHeaderFooterModel(this._segmentId).getBody();
4436
+ const { endOffset: e } = (r = pi(this._cursorList)) != null ? r : {}, t = this._docSkeleton.getViewModel().getDataModel().getSelfOrHeaderFooterModel(this._segmentId).getBody();
4437
4437
  if (e == null || t == null)
4438
4438
  return e;
4439
4439
  const o = t.dataStream.length - 2;
@@ -4461,7 +4461,7 @@ class Zt {
4461
4461
  }
4462
4462
  get direction() {
4463
4463
  const { collapsed: e, anchorNodePosition: t, focusNodePosition: o } = this;
4464
- return e || t == null || o == null ? De.NONE : ms(t, o) ? De.FORWARD : De.BACKWARD;
4464
+ return e || t == null || o == null ? De.NONE : Es(t, o) ? De.FORWARD : De.BACKWARD;
4465
4465
  }
4466
4466
  get segmentId() {
4467
4467
  return this._segmentId;
@@ -4473,7 +4473,7 @@ class Zt {
4473
4473
  const e = this.anchorNodePosition, t = this.focusNodePosition;
4474
4474
  if (this._isEmpty())
4475
4475
  return;
4476
- const o = this._document.getOffsetConfig(), { docsLeft: r, docsTop: s } = o, i = new mt(o, this._docSkeleton);
4476
+ const o = this._document.getOffsetConfig(), { docsLeft: r, docsTop: s } = o, i = new It(o, this._docSkeleton);
4477
4477
  if (this._isCollapsed()) {
4478
4478
  const { contentBoxPointGroup: l, cursorList: A } = i.getRangePointData(e, e);
4479
4479
  if (this._setCursorList(A), l.length === 0)
@@ -4533,7 +4533,7 @@ class Zt {
4533
4533
  const { _document: e, _docSkeleton: t } = this, o = this.anchorNodePosition, r = this.focusNodePosition;
4534
4534
  if ((A = this._anchorShape) == null || A.hide(), (h = this._rangeShape) == null || h.hide(), this._isEmpty())
4535
4535
  return;
4536
- const s = e.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new mt(s, t);
4536
+ const s = e.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new It(s, t);
4537
4537
  if (this._isCollapsed()) {
4538
4538
  const { contentBoxPointGroup: u, cursorList: g } = c.getRangePointData(o, o);
4539
4539
  if (this._setCursorList(g), u.length > 0) {
@@ -4568,7 +4568,7 @@ class Zt {
4568
4568
  this._rangeShape.translate(t, o), this._rangeShape.updatePointGroup(e), this._rangeShape.show();
4569
4569
  return;
4570
4570
  }
4571
- const r = 0.3, s = new ta(sA + ge(pi), {
4571
+ const r = 0.3, s = new ta(sA + ge(mi), {
4572
4572
  pointsGroup: e,
4573
4573
  fill: ((i = this.style) == null ? void 0 : i.fill) || pn(fn.black, r),
4574
4574
  left: t,
@@ -4591,7 +4591,7 @@ class Zt {
4591
4591
  this._anchorShape.transformByState({ left: A, top: h, height: c }), this._anchorShape.show(), u ? this._anchorShape.skew(-l, 0) : this._anchorShape.skew(0, 0);
4592
4592
  return;
4593
4593
  }
4594
- const g = new qn(iA + ge(pi), {
4594
+ const g = new qn(iA + ge(mi), {
4595
4595
  left: A,
4596
4596
  top: h,
4597
4597
  height: c,
@@ -4757,7 +4757,7 @@ class Wa {
4757
4757
  this._rangeShape = s, this._scene.addObject(s, mr);
4758
4758
  }
4759
4759
  }
4760
- function mi(n, e, t, o, r, s, i, a, c = !0, d = !0) {
4760
+ function Ei(n, e, t, o, r, s, i, a, c = !0, d = !0) {
4761
4761
  const l = r.findNodePositionByCharIndex(n, c, i, a), A = r.findNodePositionByCharIndex(e, d, i, a);
4762
4762
  if (!(l == null || A == null))
4763
4763
  return new Zt(t, o, r, l, A, s, i, a);
@@ -4871,7 +4871,7 @@ function uA(n) {
4871
4871
  top: t
4872
4872
  };
4873
4873
  }
4874
- function Ei(n) {
4874
+ function Ii(n) {
4875
4875
  var c;
4876
4876
  const e = (c = n.parent) == null ? void 0 : c.parent, t = e == null ? void 0 : e.parent;
4877
4877
  if (e == null || t == null)
@@ -4932,7 +4932,7 @@ var gA = Object.getOwnPropertyDescriptor, fA = (n, e, t, o) => {
4932
4932
  (i = n[s]) && (r = i(r) || r);
4933
4933
  return r;
4934
4934
  }, Wn = (n, e) => (t, o) => e(t, o, n);
4935
- let Re = class extends St {
4935
+ let Re = class extends Ct {
4936
4936
  constructor(e, t, o, r, s) {
4937
4937
  super();
4938
4938
  O(this, "_onInputBefore$", new be());
@@ -4999,7 +4999,7 @@ let Re = class extends St {
4999
4999
  return this.isFocusing || document.activeElement === document.body || document.activeElement === null;
5000
5000
  }
5001
5001
  _listenCurrentUnitChange() {
5002
- this._univerInstanceService.getCurrentTypeOfUnit$(_.UNIVER_DOC).pipe(ft(this.dispose$)).subscribe((e) => {
5002
+ this._univerInstanceService.getCurrentTypeOfUnit$(_.UNIVER_DOC).pipe(pt(this.dispose$)).subscribe((e) => {
5003
5003
  if (e == null)
5004
5004
  return;
5005
5005
  e.getUnitId() !== this._context.unitId && !this._reserveRanges && this.removeAllRanges();
@@ -5067,7 +5067,7 @@ let Re = class extends St {
5067
5067
  } else if (f === He.TEXT)
5068
5068
  try {
5069
5069
  let I = null;
5070
- p && m ? I = mi(
5070
+ p && m ? I = Ei(
5071
5071
  p.isBack ? u : u - 1,
5072
5072
  m.isBack ? g : g - 1,
5073
5073
  a,
@@ -5078,7 +5078,7 @@ let Re = class extends St {
5078
5078
  s,
5079
5079
  p.isBack,
5080
5080
  m.isBack
5081
- ) : I = mi(
5081
+ ) : I = Ei(
5082
5082
  u,
5083
5083
  g,
5084
5084
  a,
@@ -5158,7 +5158,7 @@ let Re = class extends St {
5158
5158
  });
5159
5159
  if (r == null || r.node == null)
5160
5160
  return;
5161
- const s = Ei(r.node);
5161
+ const s = Ii(r.node);
5162
5162
  if (s == null)
5163
5163
  return;
5164
5164
  const { content: i, st: a, nodeIndex: c } = s;
@@ -5190,7 +5190,7 @@ let Re = class extends St {
5190
5190
  });
5191
5191
  if (r == null || r.node == null)
5192
5192
  return;
5193
- const s = Ei(r.node);
5193
+ const s = Ii(r.node);
5194
5194
  if (s == null)
5195
5195
  return;
5196
5196
  this.removeAllRanges();
@@ -5229,7 +5229,7 @@ let Re = class extends St {
5229
5229
  let u = s, g = i;
5230
5230
  this._onPointerEvent = !0, this._scenePointerMoveSubs.push(t.onPointerMove$.subscribeEvent((m) => {
5231
5231
  const { offsetX: I, offsetY: S } = m;
5232
- t.setCursor(Mt.TEXT), !(Math.sqrt((I - u) ** 2 + (S - g) ** 2) < 3) && (this._moving(I, S), h.scrolling(I, S, () => {
5232
+ t.setCursor(_t.TEXT), !(Math.sqrt((I - u) ** 2 + (S - g) ** 2) < 3) && (this._moving(I, S), h.scrolling(I, S, () => {
5233
5233
  this._moving(I, S);
5234
5234
  }), u = I, g = S);
5235
5235
  })), this._scenePointerUpSubs.push(t.onPointerUp$.subscribeEvent(() => {
@@ -5664,16 +5664,16 @@ const ko = {
5664
5664
  if (P == null)
5665
5665
  continue;
5666
5666
  const F = M.docTransform.positionV, { relativeFrom: w, posOffset: N } = F;
5667
- if (w === gt.PARAGRAPH)
5667
+ if (w === ft.PARAGRAPH)
5668
5668
  continue;
5669
5669
  const { startIndex: ee } = P, $ = a.findNodeByCharIndex(ee, d, l), U = (R = $ == null ? void 0 : $.parent) == null ? void 0 : R.parent, H = U == null ? void 0 : U.parent, k = H == null ? void 0 : H.lines.find((he) => he.paragraphIndex === (U == null ? void 0 : U.paragraphIndex) && he.paragraphStart), ne = (E = H == null ? void 0 : H.parent) == null ? void 0 : E.parent;
5670
5670
  if ($ == null || U == null || k == null || H == null || ne == null)
5671
5671
  continue;
5672
5672
  let ie = 0;
5673
- w === gt.LINE ? ie -= U.top : w === gt.PAGE && (ie += ne.marginTop), ie += k.top;
5673
+ w === ft.LINE ? ie -= U.top : w === ft.PAGE && (ie += ne.marginTop), ie += k.top;
5674
5674
  const ae = {
5675
5675
  ...F,
5676
- relativeFrom: gt.PARAGRAPH,
5676
+ relativeFrom: ft.PARAGRAPH,
5677
5677
  posOffset: (N != null ? N : 0) - ie
5678
5678
  }, oe = g.replaceOp(["drawings", x, "docTransform", "positionV"], F, ae);
5679
5679
  oe && f.push(oe);
@@ -5696,10 +5696,10 @@ const ko = {
5696
5696
  const u = A.getUnitId(), g = qe(n, u), f = g == null ? void 0 : g.getSkeleton();
5697
5697
  if (f == null)
5698
5698
  return !1;
5699
- const { startOffset: p } = c, I = ((ae = h.paragraphs) != null ? ae : []).find((At) => At.startIndex >= p), S = f.findNodeByCharIndex(p, d, l);
5699
+ const { startOffset: p } = c, I = ((ae = h.paragraphs) != null ? ae : []).find((ut) => ut.startIndex >= p), S = f.findNodeByCharIndex(p, d, l);
5700
5700
  if (S == null)
5701
5701
  return !1;
5702
- const v = new Ee(), R = W.getInstance(), E = [], b = p + 4, y = [{
5702
+ const v = new Ie(), R = W.getInstance(), E = [], b = p + 4, y = [{
5703
5703
  startOffset: b,
5704
5704
  endOffset: b,
5705
5705
  collapsed: !0
@@ -5755,9 +5755,9 @@ const ko = {
5755
5755
  const k = Ae(A, d);
5756
5756
  E.push(R.editOp(v.serialize(), k));
5757
5757
  const ne = R.insertOp(["tableSource", H.tableId], H);
5758
- return E.push(ne), C.params.actions = E.reduce((At, $e) => W.compose(At, $e), null), !!i.syncExecuteCommand(C.id, C.params);
5758
+ return E.push(ne), C.params.actions = E.reduce((ut, $e) => W.compose(ut, $e), null), !!i.syncExecuteCommand(C.id, C.params);
5759
5759
  }
5760
- }, Is = {
5760
+ }, Ss = {
5761
5761
  id: "doc.table.delete-rows",
5762
5762
  type: D.COMMAND,
5763
5763
  // eslint-disable-next-line max-lines-per-function
@@ -5771,7 +5771,7 @@ const ko = {
5771
5771
  const l = qe(n, c.getUnitId());
5772
5772
  if (l == null)
5773
5773
  return !1;
5774
- const A = l.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new Ee(), g = W.getInstance(), f = Ia(i, A);
5774
+ const A = l.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new Ie(), g = W.getInstance(), f = Ia(i, A);
5775
5775
  if (f == null)
5776
5776
  return !1;
5777
5777
  const { offset: p, rowIndexes: m, len: I, tableId: S, cursor: v, selectWholeTable: R } = f;
@@ -5804,7 +5804,7 @@ const ko = {
5804
5804
  }
5805
5805
  return y.params.actions = E.reduce((x, M) => W.compose(x, M), null), !!o.syncExecuteCommand(y.id, y.params);
5806
5806
  }
5807
- }, Ss = {
5807
+ }, vs = {
5808
5808
  id: "doc.table.delete-columns",
5809
5809
  type: D.COMMAND,
5810
5810
  // eslint-disable-next-line max-lines-per-function
@@ -5818,7 +5818,7 @@ const ko = {
5818
5818
  const l = qe(n, c.getUnitId());
5819
5819
  if (l == null)
5820
5820
  return !1;
5821
- const A = l.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new Ee(), g = W.getInstance(), f = Rd(i, A);
5821
+ const A = l.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new Ie(), g = W.getInstance(), f = Rd(i, A);
5822
5822
  if (f == null)
5823
5823
  return !1;
5824
5824
  const { offsets: p, columnIndexes: m, tableId: I, cursor: S, rowCount: v, selectWholeTable: R } = f;
@@ -5873,7 +5873,7 @@ const ko = {
5873
5873
  const l = qe(n, c.getUnitId());
5874
5874
  if (l == null)
5875
5875
  return !1;
5876
- const A = l.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new Ee(), g = W.getInstance(), f = Sa(i, A);
5876
+ const A = l.getViewModel(), h = c == null ? void 0 : c.getUnitId(), u = new Ie(), g = W.getInstance(), f = Sa(i, A);
5877
5877
  if (f == null)
5878
5878
  return !1;
5879
5879
  const { offset: p, len: m, tableId: I, cursor: S } = f, v = [], R = [{
@@ -5900,24 +5900,24 @@ const ko = {
5900
5900
  const y = g.removeOp(["tableSource", I]);
5901
5901
  return v.push(y), E.params.actions = v.reduce((B, x) => W.compose(B, x), null), !!o.syncExecuteCommand(E.id, E.params);
5902
5902
  }
5903
- }, vs = "doc.command.table-insert-row", Cs = "doc.command.table-insert-column", mA = "doc.command.table-insert-row-above", EA = "doc.command.table-insert-row-bellow", IA = "doc.command.table-insert-column-left", SA = "doc.command.table-insert-column-right", Rs = {
5903
+ }, Cs = "doc.command.table-insert-row", Rs = "doc.command.table-insert-column", mA = "doc.command.table-insert-row-above", EA = "doc.command.table-insert-row-bellow", IA = "doc.command.table-insert-column-left", SA = "doc.command.table-insert-column-right", bs = {
5904
5904
  id: mA,
5905
5905
  type: D.COMMAND,
5906
- handler: async (n) => n.get(T).executeCommand(vs, { position: _o.ABOVE })
5907
- }, bs = {
5906
+ handler: async (n) => n.get(T).executeCommand(Cs, { position: _o.ABOVE })
5907
+ }, ys = {
5908
5908
  id: EA,
5909
5909
  type: D.COMMAND,
5910
- handler: async (n) => n.get(T).executeCommand(vs, { position: _o.BELLOW })
5911
- }, ys = {
5910
+ handler: async (n) => n.get(T).executeCommand(Cs, { position: _o.BELLOW })
5911
+ }, xs = {
5912
5912
  id: IA,
5913
5913
  type: D.COMMAND,
5914
- handler: async (n) => n.get(T).executeCommand(Cs, { position: Yr.LEFT })
5915
- }, xs = {
5914
+ handler: async (n) => n.get(T).executeCommand(Rs, { position: Kr.LEFT })
5915
+ }, Os = {
5916
5916
  id: SA,
5917
5917
  type: D.COMMAND,
5918
- handler: async (n) => n.get(T).executeCommand(Cs, { position: Yr.RIGHT })
5918
+ handler: async (n) => n.get(T).executeCommand(Rs, { position: Kr.RIGHT })
5919
5919
  }, za = {
5920
- id: vs,
5920
+ id: Cs,
5921
5921
  type: D.COMMAND,
5922
5922
  // eslint-disable-next-line max-lines-per-function
5923
5923
  handler: async (n, e) => {
@@ -5930,7 +5930,7 @@ const ko = {
5930
5930
  const h = qe(n, l.getUnitId());
5931
5931
  if (h == null)
5932
5932
  return !1;
5933
- const u = h.getViewModel(), g = l == null ? void 0 : l.getUnitId(), f = new Ee(), p = W.getInstance(), m = Sd(c, t, u);
5933
+ const u = h.getViewModel(), g = l == null ? void 0 : l.getUnitId(), f = new Ie(), p = W.getInstance(), m = Sd(c, t, u);
5934
5934
  if (m == null)
5935
5935
  return !1;
5936
5936
  const { offset: I, colCount: S, tableId: v, insertRowIndex: R } = m, E = [], b = I + 2, y = [{
@@ -5957,11 +5957,11 @@ const ko = {
5957
5957
  });
5958
5958
  const x = Ae(l, d);
5959
5959
  E.push(p.editOp(f.serialize(), x));
5960
- const M = qr(S), P = p.insertOp(["tableSource", v, "tableRows", R], M);
5960
+ const M = Xr(S), P = p.insertOp(["tableSource", v, "tableRows", R], M);
5961
5961
  return E.push(P), C.params.actions = E.reduce((w, N) => W.compose(w, N), null), !!s.syncExecuteCommand(C.id, C.params);
5962
5962
  }
5963
5963
  }, vA = {
5964
- id: Cs,
5964
+ id: Rs,
5965
5965
  type: D.COMMAND,
5966
5966
  // eslint-disable-next-line max-lines-per-function
5967
5967
  handler: async (n, e) => {
@@ -5975,7 +5975,7 @@ const ko = {
5975
5975
  const h = qe(n, l.getUnitId());
5976
5976
  if (h == null)
5977
5977
  return !1;
5978
- const u = h.getViewModel(), g = l == null ? void 0 : l.getUnitId(), f = new Ee(), p = W.getInstance(), m = vd(c, t, u);
5978
+ const u = h.getViewModel(), g = l == null ? void 0 : l.getUnitId(), f = new Ie(), p = W.getInstance(), m = vd(c, t, u);
5979
5979
  if (m == null)
5980
5980
  return !1;
5981
5981
  const { offsets: I, columnIndex: S, tableId: v, rowCount: R } = m, E = [], b = I[0] + 1, y = [{
@@ -6005,7 +6005,7 @@ const ko = {
6005
6005
  const B = Ae(l, d);
6006
6006
  E.push(p.editOp(f.serialize(), B));
6007
6007
  for (let oe = 0; oe < R; oe++) {
6008
- const he = Kr(), Pe = p.insertOp(["tableSource", v, "tableRows", oe, "tableCells", S], he);
6008
+ const he = qr(), Pe = p.insertOp(["tableSource", v, "tableRows", oe, "tableCells", S], he);
6009
6009
  E.push(Pe);
6010
6010
  }
6011
6011
  const x = l.getSnapshot(), M = x.documentStyle, { marginLeft: P = 0, marginRight: F = 0 } = M, w = ((ie = (ne = M.pageSize) == null ? void 0 : ne.width) != null ? ie : 800) - P - F, N = (ae = x == null ? void 0 : x.tableSource) == null ? void 0 : ae[v].tableColumns, { newColWidth: ee, widths: $ } = Cd(w, N, S);
@@ -6013,7 +6013,7 @@ const ko = {
6013
6013
  const he = p.replaceOp(["tableSource", v, "tableColumns", oe, "size", "width", "v"], N[oe].size.width.v, $[oe]);
6014
6014
  E.push(he);
6015
6015
  }
6016
- const U = Xr(ee), H = p.insertOp(["tableSource", v, "tableColumns", S], U);
6016
+ const U = Zr(ee), H = p.insertOp(["tableSource", v, "tableColumns", S], U);
6017
6017
  return E.push(H), C.params.actions = E.reduce((oe, he) => W.compose(oe, he), null), !!s.syncExecuteCommand(C.id, C.params);
6018
6018
  }
6019
6019
  }, Ga = {
@@ -6028,7 +6028,7 @@ const ko = {
6028
6028
  if (h == null || c == null)
6029
6029
  return !1;
6030
6030
  let u = null;
6031
- if (t ? u = $s(h, c, Ar.PREV) : u = $s(h, c, Ar.NEXT), u) {
6031
+ if (t ? u = ei(h, c, Ar.PREV) : u = ei(h, c, Ar.NEXT), u) {
6032
6032
  const { startOffset: f, endOffset: p } = u, m = [{
6033
6033
  startOffset: f,
6034
6034
  endOffset: p
@@ -6039,7 +6039,7 @@ const ko = {
6039
6039
  position: _o.BELLOW
6040
6040
  }) : !0;
6041
6041
  }
6042
- }, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", $o = "doc.component.create-table-confirm", Os = {
6042
+ }, Ya = "COMPONENT_DOC_CREATE_TABLE_CONFIRM", $o = "doc.component.create-table-confirm", Ts = {
6043
6043
  id: "doc.operation.create-table",
6044
6044
  type: D.COMMAND,
6045
6045
  handler: async (n) => {
@@ -6070,11 +6070,11 @@ const ko = {
6070
6070
  }
6071
6071
  }), !0;
6072
6072
  }
6073
- }, Et = {
6073
+ }, St = {
6074
6074
  id: "doc.operation.move-cursor",
6075
6075
  type: D.OPERATION,
6076
6076
  handler: (n, e) => !!e
6077
- }, It = {
6077
+ }, vt = {
6078
6078
  id: "doc.operation.move-selection",
6079
6079
  type: D.OPERATION,
6080
6080
  handler: (n, e) => !!e
@@ -6284,7 +6284,7 @@ function Ac(n) {
6284
6284
  }
6285
6285
  return 0;
6286
6286
  }
6287
- class WA extends pe {
6287
+ class WA extends me {
6288
6288
  constructor(t, o, r, s, i, a) {
6289
6289
  super();
6290
6290
  // Emit change event when editor lose focus.
@@ -6491,7 +6491,7 @@ class WA extends pe {
6491
6491
  return (o = this._injector.get(fe).getRenderById(this._getEditorId())) == null ? void 0 : o.with(de).getSkeleton();
6492
6492
  }
6493
6493
  isSheetEditor() {
6494
- return vt(this._getEditorId());
6494
+ return Rt(this._getEditorId());
6495
6495
  }
6496
6496
  /**
6497
6497
  * @deprecated use getDocumentData.
@@ -6539,7 +6539,7 @@ var jA = Object.getOwnPropertyDescriptor, zA = (n, e, t, o) => {
6539
6539
  for (var r = o > 1 ? void 0 : o ? jA(e, t) : e, s = n.length - 1, i; s >= 0; s--)
6540
6540
  (i = n[s]) && (r = i(r) || r);
6541
6541
  return r;
6542
- }, xt = (n, e) => (t, o) => e(t, o, n);
6542
+ }, Ot = (n, e) => (t, o) => e(t, o, n);
6543
6543
  const GA = [
6544
6544
  "editor",
6545
6545
  "render-canvas"
@@ -6547,7 +6547,7 @@ const GA = [
6547
6547
  // 'univer-range-selector-editor',
6548
6548
  // 'univer-text-editor-container-placeholder',
6549
6549
  ];
6550
- let Sr = class extends pe {
6550
+ let Sr = class extends me {
6551
6551
  constructor(e, t, o, r, s, i, a) {
6552
6552
  super();
6553
6553
  O(this, "_editors", /* @__PURE__ */ new Map());
@@ -6593,7 +6593,7 @@ let Sr = class extends pe {
6593
6593
  }
6594
6594
  blur(e) {
6595
6595
  const t = this.getFocusEditor();
6596
- e && (t == null || t.setSelectionRanges([])), t == null || t.blur(), this._contextService.setContextValue(to, !1), this._contextService.setContextValue(Us, !1), this._setFocusId(null), this._blur$.next(null);
6596
+ e && (t == null || t.setSelectionRanges([])), t == null || t.blur(), this._contextService.setContextValue(to, !1), this._contextService.setContextValue(Fs, !1), this._setFocusId(null), this._blur$.next(null);
6597
6597
  }
6598
6598
  focus(e) {
6599
6599
  if (e === this._focusEditorUnitId || (this._focusEditorUnitId && this.blur(), e == null))
@@ -6603,7 +6603,7 @@ let Sr = class extends pe {
6603
6603
  return;
6604
6604
  this._univerInstanceService.setCurrentUnitForType(e);
6605
6605
  const o = t.getValue().length;
6606
- this._contextService.setContextValue(to, !0), vt(e) || this._contextService.setContextValue(Us, !0), t.focus(), this._setFocusId(e), this._focus$.next({
6606
+ this._contextService.setContextValue(to, !0), Rt(e) || this._contextService.setContextValue(Fs, !0), t.focus(), this._setFocusId(e), this._focus$.next({
6607
6607
  startOffset: o,
6608
6608
  endOffset: o
6609
6609
  });
@@ -6653,7 +6653,7 @@ let Sr = class extends pe {
6653
6653
  return {
6654
6654
  id: e,
6655
6655
  body: {
6656
- dataStream: `${qi}`,
6656
+ dataStream: `${Xi}`,
6657
6657
  textRuns: [],
6658
6658
  paragraphs: [
6659
6659
  {
@@ -6674,15 +6674,15 @@ let Sr = class extends pe {
6674
6674
  }
6675
6675
  };
6676
6676
  Sr = zA([
6677
- xt(0, L),
6678
- xt(1, fe),
6679
- xt(2, j(Y)),
6680
- xt(3, Fr),
6681
- xt(4, T),
6682
- xt(5, xo),
6683
- xt(6, j(Pn))
6677
+ Ot(0, L),
6678
+ Ot(1, fe),
6679
+ Ot(2, j(Y)),
6680
+ Ot(3, Fr),
6681
+ Ot(4, T),
6682
+ Ot(5, xo),
6683
+ Ot(6, j(Pn))
6684
6684
  ], Sr);
6685
- const Ye = Yi("univer.editor.service"), vr = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
6685
+ const Ye = Ki("univer.editor.service"), vr = "COMPONENT_DOC_HEADER_FOOTER_PANEL";
6686
6686
  function YA(n, e, t) {
6687
6687
  const {
6688
6688
  useFirstPageHeaderFooter: o,
@@ -6697,7 +6697,7 @@ function YA(n, e, t) {
6697
6697
  return e === ve.HEADER ? o === z.TRUE ? t === 0 ? a : r === z.TRUE && t % 2 === 1 ? d : s : r === z.TRUE && t % 2 === 1 ? d : s : o === z.TRUE ? t === 0 ? c : r === z.TRUE && t % 2 === 1 ? l : i : r === z.TRUE && t % 2 === 1 ? l : i;
6698
6698
  }
6699
6699
  const KA = (n) => {
6700
- const e = J(Ke), t = J(L), o = J(fe), r = J(T), s = J(Oo), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = me({}), l = (u, g) => {
6700
+ const e = J(Ke), t = J(L), o = J(fe), r = J(T), s = J(Oo), { unitId: i } = n, a = o.getRenderById(i).with(Re), [c, d] = Ee({}), l = (u, g) => {
6701
6701
  var b;
6702
6702
  d((y) => ({
6703
6703
  ...y,
@@ -6747,7 +6747,7 @@ const KA = (n) => {
6747
6747
  }
6748
6748
  }), a.removeAllRanges(), a.blur();
6749
6749
  }, h = () => {
6750
- r.executeCommand(Ms.id, {
6750
+ r.executeCommand(_s.id, {
6751
6751
  unitId: i
6752
6752
  });
6753
6753
  };
@@ -6770,7 +6770,7 @@ const KA = (n) => {
6770
6770
  }, [i]), /* @__PURE__ */ re("div", { className: "univer-grid univer-gap-4", children: [
6771
6771
  /* @__PURE__ */ re("div", { className: "univer-grid univer-gap-2", children: [
6772
6772
  /* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
6773
- Xs,
6773
+ Zs,
6774
6774
  {
6775
6775
  checked: c.useFirstPageHeaderFooter === z.TRUE,
6776
6776
  onChange: (u) => {
@@ -6780,7 +6780,7 @@ const KA = (n) => {
6780
6780
  }
6781
6781
  ) }),
6782
6782
  /* @__PURE__ */ Q("div", { children: /* @__PURE__ */ Q(
6783
- Xs,
6783
+ Zs,
6784
6784
  {
6785
6785
  checked: c.evenAndOddHeaders === z.TRUE,
6786
6786
  onChange: (u) => {
@@ -6828,7 +6828,7 @@ const KA = (n) => {
6828
6828
  ] });
6829
6829
  }, qA = () => {
6830
6830
  var d;
6831
- const n = J(Ke), e = J(fe), r = J(L).getCurrentUniverDocInstance().getUnitId(), i = ((d = e.getRenderById(r)) == null ? void 0 : d.with(de)).getViewModel(), [a, c] = me(!0);
6831
+ const n = J(Ke), e = J(fe), r = J(L).getCurrentUniverDocInstance().getUnitId(), i = ((d = e.getRenderById(r)) == null ? void 0 : d.with(de)).getViewModel(), [a, c] = Ee(!0);
6832
6832
  return Ce(() => {
6833
6833
  const l = i.getEditArea();
6834
6834
  c(l !== ve.BODY);
@@ -6839,7 +6839,7 @@ const KA = (n) => {
6839
6839
  A.unsubscribe();
6840
6840
  };
6841
6841
  }, []), /* @__PURE__ */ Q("div", { className: "univer-text-sm", children: a ? /* @__PURE__ */ Q(KA, { unitId: r }) : /* @__PURE__ */ Q("div", { className: "univer-text-gray-400", children: n.t("headerFooter.disableText") }) });
6842
- }, Ii = 18, Si = 200, er = 6, XA = 4;
6842
+ }, Si = 18, vi = 200, er = 6, XA = 4;
6843
6843
  function ZA(n, e) {
6844
6844
  let { radius: t, width: o, height: r } = e;
6845
6845
  t = t != null ? t : 0, o = o != null ? o : 30, r = r != null ? r : 30;
@@ -6858,15 +6858,15 @@ class co extends ul {
6858
6858
  t.save(), t.font = "13px Source Han Sans CN";
6859
6859
  const i = t.measureText(r).width, a = Math.min(
6860
6860
  i + 2 * er,
6861
- Si
6861
+ vi
6862
6862
  );
6863
6863
  ZA(t, {
6864
- height: Ii,
6864
+ height: Si,
6865
6865
  width: a,
6866
6866
  radius: 4,
6867
6867
  fill: s
6868
6868
  }), t.fillStyle = "rgba(58, 96, 247, 1)";
6869
- const c = er, d = Ii - XA, l = Si - 2 * er;
6869
+ const c = er, d = Si - XA, l = vi - 2 * er;
6870
6870
  if (i > l) {
6871
6871
  let A = "", h = 0;
6872
6872
  for (const u of r) {
@@ -6891,8 +6891,8 @@ var JA = Object.getOwnPropertyDescriptor, $A = (n, e, t, o) => {
6891
6891
  for (var r = o > 1 ? void 0 : o ? JA(e, t) : e, s = n.length - 1, i; s >= 0; s--)
6892
6892
  (i = n[s]) && (r = i(r) || r);
6893
6893
  return r;
6894
- }, ut = (n, e) => (t, o) => e(t, o, n);
6895
- const vi = "rgba(58, 96, 247, 1)", Ci = "rgba(58, 96, 247, 0.08)";
6894
+ }, ht = (n, e) => (t, o) => e(t, o, n);
6895
+ const Ci = "rgba(58, 96, 247, 1)", Ri = "rgba(58, 96, 247, 0.08)";
6896
6896
  var Qe = /* @__PURE__ */ ((n) => (n[n.FIRST_PAGE_HEADER = 0] = "FIRST_PAGE_HEADER", n[n.FIRST_PAGE_FOOTER = 1] = "FIRST_PAGE_FOOTER", n[n.DEFAULT_HEADER = 2] = "DEFAULT_HEADER", n[n.DEFAULT_FOOTER = 3] = "DEFAULT_FOOTER", n[n.EVEN_PAGE_HEADER = 4] = "EVEN_PAGE_HEADER", n[n.EVEN_PAGE_FOOTER = 5] = "EVEN_PAGE_FOOTER", n))(Qe || {});
6897
6897
  function eu(n, e, t) {
6898
6898
  const { documentStyle: o } = n.getDataModel().getSnapshot(), {
@@ -6943,7 +6943,7 @@ function eu(n, e, t) {
6943
6943
  throw new Error(`Invalid editArea: ${e}`);
6944
6944
  }
6945
6945
  }
6946
- let Cr = class extends pe {
6946
+ let Cr = class extends me {
6947
6947
  constructor(e, t, o, r, s, i, a, c, d) {
6948
6948
  super();
6949
6949
  O(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
@@ -6958,7 +6958,7 @@ let Cr = class extends pe {
6958
6958
  this._commandService.onCommandExecuted((e) => {
6959
6959
  if (X.id === e.id) {
6960
6960
  const t = this._context.unit, r = this._docSkeletonManagerService.getViewModel().getEditArea(), s = t.getSnapshot().documentStyle.documentFlavor;
6961
- r !== ve.BODY && s === we.MODERN && this._commandService.executeCommand(Ms.id, {
6961
+ r !== ve.BODY && s === we.MODERN && this._commandService.executeCommand(_s.id, {
6962
6962
  unitId: this._context.unitId
6963
6963
  });
6964
6964
  }
@@ -6969,11 +6969,11 @@ let Cr = class extends pe {
6969
6969
  this._componentManager.get(vr) || this.disposeWithMe(this._componentManager.register(vr, qA));
6970
6970
  }
6971
6971
  _init() {
6972
- const { unitId: e } = this._context, t = pt(this._context);
6972
+ const { unitId: e } = this._context, t = mt(this._context);
6973
6973
  t == null || t.document == null || this._loadedMap.has(t.document) || (this._initialMain(e), this._loadedMap.add(t.document));
6974
6974
  }
6975
6975
  _initialMain(e) {
6976
- const t = pt(this._context), { document: o } = t;
6976
+ const t = mt(this._context), { document: o } = t;
6977
6977
  this.disposeWithMe(o.onDblclick$.subscribeEvent(async (r) => {
6978
6978
  if (this._isEditorReadOnly(e) || !this._isTraditionalMode())
6979
6979
  return;
@@ -7007,7 +7007,7 @@ let Cr = class extends pe {
7007
7007
  }));
7008
7008
  }
7009
7009
  _getTransformCoordForDocumentOffset(e, t) {
7010
- const o = pt(this._context), { document: r, scene: s } = o, { documentTransform: i } = r.getOffsetConfig(), a = s.getViewports()[0];
7010
+ const o = mt(this._context), { document: r, scene: s } = o, { documentTransform: i } = r.getOffsetConfig(), a = s.getViewports()[0];
7011
7011
  if (a == null)
7012
7012
  return;
7013
7013
  const c = a.transformVector2SceneCoord(Cn.FromArray([e, t]));
@@ -7058,7 +7058,7 @@ let Cr = class extends pe {
7058
7058
  points: [f, m]
7059
7059
  }],
7060
7060
  strokeWidth: 1,
7061
- stroke: vi
7061
+ stroke: Ci
7062
7062
  }, v = {
7063
7063
  dataArray: [{
7064
7064
  command: "M",
@@ -7068,14 +7068,14 @@ let Cr = class extends pe {
7068
7068
  points: [f, p - I]
7069
7069
  }],
7070
7070
  strokeWidth: 1,
7071
- stroke: vi
7071
+ stroke: Ci
7072
7072
  };
7073
- js.drawWith(g, S), js.drawWith(g, v), g.translate(0, m + 1), co.drawWith(g, {
7073
+ zs.drawWith(g, S), zs.drawWith(g, v), g.translate(0, m + 1), co.drawWith(g, {
7074
7074
  text: e.t("headerFooter.header"),
7075
- color: Ci
7075
+ color: Ri
7076
7076
  }), g.translate(0, p - m - I), co.drawWith(g, {
7077
7077
  text: e.t("headerFooter.footer"),
7078
- color: Ci
7078
+ color: Ri
7079
7079
  });
7080
7080
  }
7081
7081
  g.restore();
@@ -7093,16 +7093,16 @@ let Cr = class extends pe {
7093
7093
  }
7094
7094
  };
7095
7095
  Cr = $A([
7096
- ut(1, T),
7097
- ut(2, Ye),
7098
- ut(3, L),
7099
- ut(4, fe),
7100
- ut(5, j(de)),
7101
- ut(6, j(Re)),
7102
- ut(7, j(Ke)),
7103
- ut(8, j(sn))
7096
+ ht(1, T),
7097
+ ht(2, Ye),
7098
+ ht(3, L),
7099
+ ht(4, fe),
7100
+ ht(5, j(de)),
7101
+ ht(6, j(Re)),
7102
+ ht(7, j(Ke)),
7103
+ ht(8, j(sn))
7104
7104
  ], Cr);
7105
- const Ts = {
7105
+ const Bs = {
7106
7106
  id: "sidebar.operation.doc-header-footer-panel",
7107
7107
  type: D.OPERATION,
7108
7108
  handler: async (n, e) => {
@@ -7125,7 +7125,7 @@ const Ts = {
7125
7125
  return !0;
7126
7126
  }
7127
7127
  };
7128
- function Ri() {
7128
+ function bi() {
7129
7129
  return {
7130
7130
  dataStream: `\r
7131
7131
  `,
@@ -7158,12 +7158,12 @@ function Ri() {
7158
7158
  function tr(n, e, t, o) {
7159
7159
  const r = W.getInstance(), s = 6, i = n != null ? n : ge(s), a = e === Qe.DEFAULT_HEADER || e === Qe.FIRST_PAGE_HEADER || e === Qe.EVEN_PAGE_HEADER, c = r.insertOp([a ? "headers" : "footers", i], {
7160
7160
  [a ? "headerId" : "footerId"]: i,
7161
- body: Ri()
7161
+ body: bi()
7162
7162
  });
7163
7163
  o.push(c);
7164
7164
  const d = ge(s), l = r.insertOp([a ? "footers" : "headers", d], {
7165
7165
  [a ? "footerId" : "headerId"]: d,
7166
- body: Ri()
7166
+ body: bi()
7167
7167
  });
7168
7168
  o.push(l);
7169
7169
  let A = "defaultHeaderId", h = "defaultFooterId";
@@ -7237,11 +7237,11 @@ const eo = "doc.command.core-header-footer", uc = {
7237
7237
  }
7238
7238
  }), I.length === 0 ? !1 : (p.params.actions = I.reduce((R, E) => W.compose(R, E), null), !!t.syncExecuteCommand(p.id, p.params));
7239
7239
  }
7240
- }, Bs = {
7240
+ }, Ms = {
7241
7241
  id: "doc.command.open-header-footer-panel",
7242
7242
  type: D.COMMAND,
7243
- handler: async (n, e) => n.get(T).executeCommand(Ts.id, { value: "open" })
7244
- }, Ms = {
7243
+ handler: async (n, e) => n.get(T).executeCommand(Bs.id, { value: "open" })
7244
+ }, _s = {
7245
7245
  id: "doc.command.close-header-footer",
7246
7246
  type: D.COMMAND,
7247
7247
  handler: async (n, e) => {
@@ -7261,7 +7261,7 @@ const eo = "doc.command.core-header-footer", uc = {
7261
7261
  endOffset: m
7262
7262
  }
7263
7263
  ]);
7264
- }), t.executeCommand(Ts.id, { value: "close" }), !0);
7264
+ }), t.executeCommand(Bs.id, { value: "close" }), !0);
7265
7265
  }
7266
7266
  }, hc = "UI_PLUGIN_DOCS", gc = (n) => {
7267
7267
  const { value: e, onChange: t, options: o } = n;
@@ -7355,7 +7355,7 @@ const eo = "doc.command.core-header-footer", uc = {
7355
7355
  return t != null ? t : "A4";
7356
7356
  };
7357
7357
  function iu(n) {
7358
- const { hooks: e } = n, r = J(L).getCurrentUnitOfType(_.UNIVER_DOC).getDocumentStyle(), s = J(Ke), [i, a] = me(() => {
7358
+ const { hooks: e } = n, r = J(L).getCurrentUnitOfType(_.UNIVER_DOC).getDocumentStyle(), s = J(Ke), [i, a] = Ee(() => {
7359
7359
  var l, A, h, u, g;
7360
7360
  return {
7361
7361
  paperSize: su(r.pageSize),
@@ -7528,7 +7528,7 @@ const Rr = "docs.component.page-setting", mc = {
7528
7528
  };
7529
7529
  return v.params.actions = S.reduce((E, b) => W.compose(E, b), null), !!o.syncExecuteCommand(v.id, v.params);
7530
7530
  }
7531
- }, _s = {
7531
+ }, Ds = {
7532
7532
  id: "docs.operation.open-page-setting",
7533
7533
  type: D.OPERATION,
7534
7534
  handler: (n) => {
@@ -7564,7 +7564,7 @@ const Rr = "docs.component.page-setting", mc = {
7564
7564
  };
7565
7565
  function au(n) {
7566
7566
  const e = n.get(L), t = n.get(fe);
7567
- return new Ie((o) => {
7567
+ return new pe((o) => {
7568
7568
  const r = e.focused$.subscribe((s) => {
7569
7569
  if (s == null || e.getUnitType(s) !== _.UNIVER_DOC)
7570
7570
  return o.next(!0);
@@ -7580,7 +7580,7 @@ function au(n) {
7580
7580
  }
7581
7581
  function cu(n) {
7582
7582
  const e = n.get(L), t = n.get(T);
7583
- return new Ie((o) => {
7583
+ return new pe((o) => {
7584
7584
  const r = t.onCommandExecuted((c) => {
7585
7585
  if (c.id === X.id) {
7586
7586
  const { unitId: d } = c.params, l = e.getUnit(d);
@@ -7607,7 +7607,7 @@ function cu(n) {
7607
7607
  }
7608
7608
  function lu(n) {
7609
7609
  const e = n.get(Y), t = n.get(L);
7610
- return new Ie((o) => {
7610
+ return new pe((o) => {
7611
7611
  const r = e.textSelection$.subscribe((s) => {
7612
7612
  if (s == null) {
7613
7613
  o.next(!0);
@@ -7651,7 +7651,7 @@ function lu(n) {
7651
7651
  }
7652
7652
  function xe(n) {
7653
7653
  const e = n.get(Y);
7654
- return new Ie((t) => {
7654
+ return new pe((t) => {
7655
7655
  const o = e.textSelection$.subscribe((r) => {
7656
7656
  if (r == null) {
7657
7657
  t.next(!0);
@@ -7675,10 +7675,10 @@ function du(n) {
7675
7675
  icon: "BoldIcon",
7676
7676
  title: "Set bold",
7677
7677
  tooltip: "toolbar.bold",
7678
- activated$: new Ie((t) => {
7678
+ activated$: new pe((t) => {
7679
7679
  const o = () => {
7680
7680
  var a;
7681
- const s = bt(n);
7681
+ const s = dt(n);
7682
7682
  if (s == null) {
7683
7683
  t.next(!1);
7684
7684
  return;
@@ -7687,7 +7687,7 @@ function du(n) {
7687
7687
  t.next(i === z.TRUE);
7688
7688
  }, r = e.onCommandExecuted((s) => {
7689
7689
  const i = s.id;
7690
- (i === Le.id || i === Rt.id) && o();
7690
+ (i === Le.id || i === yt.id) && o();
7691
7691
  });
7692
7692
  return o(), r.dispose;
7693
7693
  }),
@@ -7703,10 +7703,10 @@ function Au(n) {
7703
7703
  icon: "ItalicIcon",
7704
7704
  title: "Set italic",
7705
7705
  tooltip: "toolbar.italic",
7706
- activated$: new Ie((t) => {
7706
+ activated$: new pe((t) => {
7707
7707
  const o = () => {
7708
7708
  var a;
7709
- const s = bt(n);
7709
+ const s = dt(n);
7710
7710
  if (s == null) {
7711
7711
  t.next(!1);
7712
7712
  return;
@@ -7715,7 +7715,7 @@ function Au(n) {
7715
7715
  t.next(i === z.TRUE);
7716
7716
  }, r = e.onCommandExecuted((s) => {
7717
7717
  const i = s.id;
7718
- (i === Le.id || i === Rt.id) && o();
7718
+ (i === Le.id || i === yt.id) && o();
7719
7719
  });
7720
7720
  return o(), r.dispose;
7721
7721
  }),
@@ -7731,10 +7731,10 @@ function uu(n) {
7731
7731
  icon: "UnderlineIcon",
7732
7732
  title: "Set underline",
7733
7733
  tooltip: "toolbar.underline",
7734
- activated$: new Ie((t) => {
7734
+ activated$: new pe((t) => {
7735
7735
  const o = () => {
7736
7736
  var a;
7737
- const s = bt(n);
7737
+ const s = dt(n);
7738
7738
  if (s == null) {
7739
7739
  t.next(!1);
7740
7740
  return;
@@ -7743,7 +7743,7 @@ function uu(n) {
7743
7743
  t.next((i == null ? void 0 : i.s) === z.TRUE);
7744
7744
  }, r = e.onCommandExecuted((s) => {
7745
7745
  const i = s.id;
7746
- (i === Le.id || i === Rt.id) && o();
7746
+ (i === Le.id || i === yt.id) && o();
7747
7747
  });
7748
7748
  return o(), r.dispose;
7749
7749
  }),
@@ -7759,10 +7759,10 @@ function hu(n) {
7759
7759
  icon: "StrikethroughIcon",
7760
7760
  title: "Set strike through",
7761
7761
  tooltip: "toolbar.strikethrough",
7762
- activated$: new Ie((t) => {
7762
+ activated$: new pe((t) => {
7763
7763
  const o = () => {
7764
7764
  var a;
7765
- const s = bt(n);
7765
+ const s = dt(n);
7766
7766
  if (s == null) {
7767
7767
  t.next(!1);
7768
7768
  return;
@@ -7771,7 +7771,7 @@ function hu(n) {
7771
7771
  t.next((i == null ? void 0 : i.s) === z.TRUE);
7772
7772
  }, r = e.onCommandExecuted((s) => {
7773
7773
  const i = s.id;
7774
- (i === Le.id || i === Rt.id) && o();
7774
+ (i === Le.id || i === yt.id) && o();
7775
7775
  });
7776
7776
  return o(), r.dispose;
7777
7777
  }),
@@ -7782,14 +7782,14 @@ function hu(n) {
7782
7782
  function gu(n) {
7783
7783
  const e = n.get(T);
7784
7784
  return {
7785
- id: Ct.id,
7785
+ id: bt.id,
7786
7786
  type: Z.BUTTON,
7787
7787
  icon: "SubscriptIcon",
7788
7788
  tooltip: "toolbar.subscript",
7789
- activated$: new Ie((t) => {
7789
+ activated$: new pe((t) => {
7790
7790
  const o = () => {
7791
7791
  var a;
7792
- const s = bt(n);
7792
+ const s = dt(n);
7793
7793
  if (s == null) {
7794
7794
  t.next(!1);
7795
7795
  return;
@@ -7798,7 +7798,7 @@ function gu(n) {
7798
7798
  t.next(i === Ve.SUBSCRIPT);
7799
7799
  }, r = e.onCommandExecuted((s) => {
7800
7800
  const i = s.id;
7801
- (i === Le.id || i === Rt.id) && o();
7801
+ (i === Le.id || i === yt.id) && o();
7802
7802
  });
7803
7803
  return o(), r.dispose;
7804
7804
  }),
@@ -7813,10 +7813,10 @@ function fu(n) {
7813
7813
  type: Z.BUTTON,
7814
7814
  icon: "SuperscriptIcon",
7815
7815
  tooltip: "toolbar.superscript",
7816
- activated$: new Ie((t) => {
7816
+ activated$: new pe((t) => {
7817
7817
  const o = () => {
7818
7818
  var a;
7819
- const s = bt(n);
7819
+ const s = dt(n);
7820
7820
  if (s == null) {
7821
7821
  t.next(!1);
7822
7822
  return;
@@ -7825,7 +7825,7 @@ function fu(n) {
7825
7825
  t.next(i === Ve.SUPERSCRIPT);
7826
7826
  }, r = e.onCommandExecuted((s) => {
7827
7827
  const i = s.id;
7828
- (i === Le.id || i === Rt.id) && o();
7828
+ (i === Le.id || i === yt.id) && o();
7829
7829
  });
7830
7830
  return o(), r.dispose;
7831
7831
  }),
@@ -7847,10 +7847,10 @@ function pu(n) {
7847
7847
  value: t.value
7848
7848
  })),
7849
7849
  // disabled$: getCurrentSheetDisabled$(accessor),
7850
- value$: new Ie((t) => {
7851
- const o = Xi.ff, r = () => {
7850
+ value$: new pe((t) => {
7851
+ const o = Hr.ff, r = () => {
7852
7852
  var c;
7853
- const i = bt(n);
7853
+ const i = dt(n);
7854
7854
  if (i == null) {
7855
7855
  t.next(o);
7856
7856
  return;
@@ -7883,10 +7883,10 @@ function mu(n) {
7883
7883
  },
7884
7884
  selections: Ml,
7885
7885
  // disabled$,
7886
- value$: new Ie((t) => {
7887
- const o = Xi.fs, r = () => {
7886
+ value$: new pe((t) => {
7887
+ const o = Hr.fs, r = () => {
7888
7888
  var c;
7889
- const i = bt(n);
7889
+ const i = dt(n);
7890
7890
  if (i == null) {
7891
7891
  t.next(o);
7892
7892
  return;
@@ -7912,10 +7912,10 @@ function Eu(n) {
7912
7912
  label: {
7913
7913
  name: Dl,
7914
7914
  props: {
7915
- selections: Gs
7915
+ selections: Ys
7916
7916
  }
7917
7917
  },
7918
- selections: Gs.map((t) => ({
7918
+ selections: Ys.map((t) => ({
7919
7919
  label: {
7920
7920
  name: Pl,
7921
7921
  props: {
@@ -7925,7 +7925,7 @@ function Eu(n) {
7925
7925
  },
7926
7926
  value: t.value
7927
7927
  })),
7928
- value$: new Ie((t) => {
7928
+ value$: new pe((t) => {
7929
7929
  const o = K.NORMAL_TEXT, r = () => {
7930
7930
  var c, d;
7931
7931
  const i = Vt(n);
@@ -7948,7 +7948,7 @@ function Eu(n) {
7948
7948
  function Iu(n) {
7949
7949
  const e = n.get(T), t = n.get(Ur);
7950
7950
  return {
7951
- id: Dt.id,
7951
+ id: Et.id,
7952
7952
  icon: "FontColorDoubleIcon",
7953
7953
  tooltip: "toolbar.textColor.main",
7954
7954
  type: Z.BUTTON_SELECTOR,
@@ -7958,12 +7958,27 @@ function Iu(n) {
7958
7958
  name: da,
7959
7959
  hoverable: !1,
7960
7960
  selectable: !1
7961
- }
7961
+ },
7962
+ value$: new pe((o) => {
7963
+ const r = Hr.cl.rgb, s = () => {
7964
+ var d, l;
7965
+ const a = dt(n);
7966
+ if (!a) {
7967
+ o.next(r);
7968
+ return;
7969
+ }
7970
+ const c = (l = (d = a.ts) == null ? void 0 : d.cl) == null ? void 0 : l.rgb;
7971
+ o.next(c != null ? c : r);
7972
+ }, i = e.onCommandExecuted((a) => {
7973
+ a.id === Et.id && s();
7974
+ });
7975
+ return s(), i.dispose;
7976
+ })
7962
7977
  }
7963
7978
  ],
7964
- value$: new Ie((o) => {
7979
+ value$: new pe((o) => {
7965
7980
  const r = t.getColorFromTheme("gray.900"), s = e.onCommandExecuted((i) => {
7966
- if (i.id === Dt.id) {
7981
+ if (i.id === Et.id) {
7967
7982
  const a = i.params.value;
7968
7983
  o.next(a != null ? a : r);
7969
7984
  }
@@ -7977,7 +7992,7 @@ function Iu(n) {
7977
7992
  }
7978
7993
  function Su(n) {
7979
7994
  return {
7980
- id: Bs.id,
7995
+ id: Ms.id,
7981
7996
  type: Z.BUTTON,
7982
7997
  icon: "HeaderFooterIcon",
7983
7998
  tooltip: "toolbar.headerFooter",
@@ -7998,7 +8013,7 @@ function Cu(n) {
7998
8013
  }
7999
8014
  function Ru(n) {
8000
8015
  return {
8001
- id: Os.id,
8016
+ id: Ts.id,
8002
8017
  title: "toolbar.table.insert",
8003
8018
  type: Z.BUTTON,
8004
8019
  hidden$: se(n, _.UNIVER_DOC)
@@ -8012,7 +8027,7 @@ function bu(n) {
8012
8027
  icon: "LeftJustifyingIcon",
8013
8028
  tooltip: "toolbar.alignLeft",
8014
8029
  disabled$: xe(n),
8015
- activated$: new Ie((t) => {
8030
+ activated$: new pe((t) => {
8016
8031
  const o = e.onCommandExecuted((r) => {
8017
8032
  var i;
8018
8033
  const s = r.id;
@@ -8036,7 +8051,7 @@ function yu(n) {
8036
8051
  type: Z.BUTTON,
8037
8052
  icon: "HorizontallyIcon",
8038
8053
  tooltip: "toolbar.alignCenter",
8039
- activated$: new Ie((t) => {
8054
+ activated$: new pe((t) => {
8040
8055
  const o = e.onCommandExecuted((r) => {
8041
8056
  var i;
8042
8057
  const s = r.id;
@@ -8061,7 +8076,7 @@ function xu(n) {
8061
8076
  type: Z.BUTTON,
8062
8077
  icon: "RightJustifyingIcon",
8063
8078
  tooltip: "toolbar.alignRight",
8064
- activated$: new Ie((t) => {
8079
+ activated$: new pe((t) => {
8065
8080
  const o = e.onCommandExecuted((r) => {
8066
8081
  var i;
8067
8082
  const s = r.id;
@@ -8086,7 +8101,7 @@ function Ou(n) {
8086
8101
  type: Z.BUTTON,
8087
8102
  icon: "AlignTextBothIcon",
8088
8103
  tooltip: "toolbar.alignJustify",
8089
- activated$: new Ie((t) => {
8104
+ activated$: new pe((t) => {
8090
8105
  const o = e.onCommandExecuted((r) => {
8091
8106
  var i;
8092
8107
  const s = r.id;
@@ -8114,7 +8129,7 @@ function Tu(n) {
8114
8129
  hidden$: se(n, _.UNIVER_DOC, void 0, ot)
8115
8130
  };
8116
8131
  }
8117
- const Bn = (n) => new Ie((e) => {
8132
+ const Bn = (n) => new pe((e) => {
8118
8133
  const t = n.get(L), o = n.get(Y);
8119
8134
  let r;
8120
8135
  const s = t.focused$.subscribe((i) => {
@@ -8142,7 +8157,7 @@ const Bn = (n) => new Ie((e) => {
8142
8157
  s.unsubscribe(), r == null || r.unsubscribe();
8143
8158
  };
8144
8159
  });
8145
- function bi(n) {
8160
+ function yi(n) {
8146
8161
  return {
8147
8162
  id: Tn.id,
8148
8163
  type: Z.BUTTON_SELECTOR,
@@ -8164,7 +8179,7 @@ function bi(n) {
8164
8179
  activated$: Bn(n).pipe(wn((e) => !!(e && e.indexOf("ORDER_LIST") === 0)))
8165
8180
  };
8166
8181
  }
8167
- function yi(n) {
8182
+ function xi(n) {
8168
8183
  return {
8169
8184
  id: On.id,
8170
8185
  type: Z.BUTTON_SELECTOR,
@@ -8186,7 +8201,7 @@ function yi(n) {
8186
8201
  activated$: Bn(n).pipe(wn((e) => !!(e && e.indexOf("BULLET_LIST") === 0)))
8187
8202
  };
8188
8203
  }
8189
- function xi(n) {
8204
+ function Oi(n) {
8190
8205
  return {
8191
8206
  id: io.id,
8192
8207
  type: Z.BUTTON,
@@ -8205,7 +8220,7 @@ function Bu(n) {
8205
8220
  icon: "KeyboardIcon",
8206
8221
  tooltip: "toolbar.documentFlavor",
8207
8222
  hidden$: se(n, _.UNIVER_DOC, void 0, ot),
8208
- activated$: new Ie((o) => {
8223
+ activated$: new pe((o) => {
8209
8224
  var i;
8210
8225
  const r = e.onCommandExecuted((a) => {
8211
8226
  var c;
@@ -8242,7 +8257,7 @@ function _u(n) {
8242
8257
  }
8243
8258
  }
8244
8259
  ],
8245
- value$: new Ie((o) => {
8260
+ value$: new pe((o) => {
8246
8261
  const r = t.getColorFromTheme("primary.600"), s = e.onCommandExecuted((i) => {
8247
8262
  if (i.id === Pt.id) {
8248
8263
  const a = i.params.value;
@@ -8255,7 +8270,7 @@ function _u(n) {
8255
8270
  hidden$: se(n, _.UNIVER_DOC)
8256
8271
  };
8257
8272
  }
8258
- function bt(n) {
8273
+ function dt(n) {
8259
8274
  var g, f, p, m;
8260
8275
  const e = n.get(L), t = n.get(Y), o = n.get(at), r = e.getCurrentUnitForType(_.UNIVER_DOC), s = t.getDocRanges(), i = (g = s.find((I) => I.isActive)) != null ? g : s[0], a = o.getDefaultStyle(), c = (f = o.getStyleCache()) != null ? f : {}, d = Vt(n), l = (p = d == null ? void 0 : d.paragraphStyle) != null && p.namedStyleType ? zc[(m = d == null ? void 0 : d.paragraphStyle) == null ? void 0 : m.namedStyleType] : null;
8261
8276
  if (r == null || i == null)
@@ -8304,7 +8319,7 @@ function Vt(n) {
8304
8319
  }
8305
8320
  function Du(n) {
8306
8321
  return {
8307
- id: _s.id,
8322
+ id: Ds.id,
8308
8323
  type: Z.BUTTON,
8309
8324
  icon: "DocumentSettingIcon",
8310
8325
  tooltip: "toolbar.pageSetup",
@@ -8312,11 +8327,11 @@ function Du(n) {
8312
8327
  };
8313
8328
  }
8314
8329
  const Pu = {
8315
- [K.HEADING_1]: us,
8316
- [K.HEADING_2]: hs,
8317
- [K.HEADING_3]: gs,
8318
- [K.HEADING_4]: fs,
8319
- [K.HEADING_5]: ps,
8330
+ [K.HEADING_1]: hs,
8331
+ [K.HEADING_2]: gs,
8332
+ [K.HEADING_3]: fs,
8333
+ [K.HEADING_4]: ps,
8334
+ [K.HEADING_5]: ms,
8320
8335
  [K.NORMAL_TEXT]: ao,
8321
8336
  [K.TITLE]: Ua,
8322
8337
  [K.SUBTITLE]: Fa,
@@ -8331,7 +8346,7 @@ const Pu = {
8331
8346
  [K.TITLE]: { key: "TextTypeIcon", component: mn },
8332
8347
  [K.SUBTITLE]: { key: "TextTypeIcon", component: mn },
8333
8348
  [K.NAMED_STYLE_TYPE_UNSPECIFIED]: { key: "TextTypeIcon", component: mn }
8334
- }, yt = (n) => (e) => {
8349
+ }, xt = (n) => (e) => {
8335
8350
  const t = e.get(T), o = e.get(sn), r = Ic[n];
8336
8351
  return o.get(r.key) || o.register(r.key, r.component), {
8337
8352
  id: Pu[n].id,
@@ -8340,7 +8355,7 @@ const Pu = {
8340
8355
  tooltip: "toolbar.heading.tooltip",
8341
8356
  disabled$: xe(e),
8342
8357
  hidden$: se(e, _.UNIVER_DOC),
8343
- activated$: new Ie((s) => {
8358
+ activated$: new pe((s) => {
8344
8359
  const i = K.NORMAL_TEXT, a = () => {
8345
8360
  var A, h;
8346
8361
  const d = Vt(e);
@@ -8357,41 +8372,41 @@ const Pu = {
8357
8372
  return a(), c.dispose;
8358
8373
  })
8359
8374
  };
8360
- }, wu = yt(K.HEADING_1), Nu = yt(K.HEADING_2), Lu = yt(K.HEADING_3), Qu = yt(K.HEADING_4), Uu = yt(K.HEADING_5), Fu = yt(K.NORMAL_TEXT);
8361
- yt(K.TITLE);
8362
- yt(K.SUBTITLE);
8375
+ }, wu = xt(K.HEADING_1), Nu = xt(K.HEADING_2), Lu = xt(K.HEADING_3), Qu = xt(K.HEADING_4), Uu = xt(K.HEADING_5), Fu = xt(K.NORMAL_TEXT);
8376
+ xt(K.TITLE);
8377
+ xt(K.SUBTITLE);
8363
8378
  const Hu = (n) => ({
8364
- id: os.id,
8379
+ id: rs.id,
8365
8380
  type: Z.BUTTON,
8366
8381
  icon: "CopyDoubleIcon",
8367
8382
  title: "rightClick.copy"
8368
8383
  }), ku = (n) => ({
8369
- id: ss.id,
8384
+ id: is.id,
8370
8385
  type: Z.BUTTON,
8371
8386
  icon: "CutIcon",
8372
8387
  title: "rightClick.cut"
8373
8388
  }), Vu = (n) => ({
8374
- id: es.id,
8389
+ id: ts.id,
8375
8390
  type: Z.BUTTON,
8376
8391
  icon: "DeleteIcon",
8377
8392
  title: "rightClick.delete"
8378
8393
  }), Wu = (n) => ({
8379
- id: ls.id,
8394
+ id: ds.id,
8380
8395
  type: Z.BUTTON,
8381
8396
  icon: "UnorderIcon",
8382
8397
  title: "rightClick.bulletList"
8383
8398
  }), ju = (n) => ({
8384
- id: ds.id,
8399
+ id: As.id,
8385
8400
  type: Z.BUTTON,
8386
8401
  icon: "OrderIcon",
8387
8402
  title: "rightClick.orderList"
8388
8403
  }), zu = (n) => ({
8389
- id: As.id,
8404
+ id: us.id,
8390
8405
  type: Z.BUTTON,
8391
8406
  icon: "TodoListDoubleIcon",
8392
8407
  title: "rightClick.checkList"
8393
8408
  }), Gu = (n) => ({
8394
- id: as.id,
8409
+ id: cs.id,
8395
8410
  type: Z.BUTTON,
8396
8411
  icon: "ReduceIcon",
8397
8412
  title: "toolbar.horizontalLine"
@@ -8403,14 +8418,14 @@ function Yu(n) {
8403
8418
  title: "rightClick.insertBellow"
8404
8419
  };
8405
8420
  }
8406
- const Oi = 4;
8421
+ const Ti = 4;
8407
8422
  var Ku = Object.getOwnPropertyDescriptor, qu = (n, e, t, o) => {
8408
8423
  for (var r = o > 1 ? void 0 : o ? Ku(e, t) : e, s = n.length - 1, i; s >= 0; s--)
8409
8424
  (i = n[s]) && (r = i(r) || r);
8410
8425
  return r;
8411
8426
  }, jn = (n, e) => (t, o) => e(t, o, n);
8412
8427
  function vc(n, e) {
8413
- const t = Ti(n.left, n.top, e), o = Ti(n.right, n.bottom, e);
8428
+ const t = Bi(n.left, n.top, e), o = Bi(n.right, n.bottom, e);
8414
8429
  return {
8415
8430
  left: t.x,
8416
8431
  top: t.y,
@@ -8418,7 +8433,7 @@ function vc(n, e) {
8418
8433
  bottom: o.y
8419
8434
  };
8420
8435
  }
8421
- function Ti(n, e, t) {
8436
+ function Bi(n, e, t) {
8422
8437
  const { scaleX: o, scaleY: r } = t.getAncestorScale(), s = t.getViewport(je.VIEW_MAIN);
8423
8438
  if (!s)
8424
8439
  return {
@@ -8431,7 +8446,7 @@ function Ti(n, e, t) {
8431
8446
  y: d
8432
8447
  };
8433
8448
  }
8434
- function Bi(n, e, t) {
8449
+ function Mi(n, e, t) {
8435
8450
  const { scaleX: o, scaleY: r } = t.getAncestorScale(), s = t.getViewport(je.VIEW_MAIN);
8436
8451
  if (!s)
8437
8452
  return {
@@ -8448,15 +8463,15 @@ const nr = (n, e) => {
8448
8463
  const { scene: t, mainComponent: o, engine: r } = e, s = e.with(de).getSkeleton(), i = s.findNodePositionByCharIndex(n.startOffset, !0, n.segmentId, n.segmentPage), a = n.collapsed ? n.startOffset : n.endOffset - 1, c = s.findNodePositionByCharIndex(a, !0, n.segmentId, n.segmentPage), d = o;
8449
8464
  if (!c || !i)
8450
8465
  return;
8451
- const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = na(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new mt(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
8452
- return Es(b).map((B) => vc(B, t)).map((B) => ({
8466
+ const l = d.getOffsetConfig(), { docsLeft: A, docsTop: h } = l, u = r.getCanvasElement(), g = u.getBoundingClientRect(), f = na(u.style.width), { top: p, left: m, width: I } = g, S = I / f, { scaleX: v, scaleY: R } = t.getAncestorScale(), E = new It(l, s), { borderBoxPointGroup: b } = E.getRangePointData(i, c);
8467
+ return Is(b).map((B) => vc(B, t)).map((B) => ({
8453
8468
  left: (B.left + A * v) * S + m,
8454
8469
  right: (B.right + A * v) * S + m,
8455
8470
  top: (B.top + h * R) * S + p,
8456
8471
  bottom: (B.bottom + h * R) * S + p
8457
8472
  }));
8458
8473
  };
8459
- let Mn = class extends pe {
8474
+ let Mn = class extends me {
8460
8475
  constructor(n, e, t, o) {
8461
8476
  super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = o;
8462
8477
  }
@@ -8618,14 +8633,14 @@ const $u = (n, e, t, o) => {
8618
8633
  const a = t.findNodePositionByCharIndex(i, !0, n.segmentId, o);
8619
8634
  if (!a || !r)
8620
8635
  return;
8621
- const c = e.getOffsetConfig(), d = new mt(c, t), { borderBoxPointGroup: l } = d.getRangePointData(r, a);
8622
- return Es(l).map((m) => ({
8623
- top: m.top + c.docsTop - Oi,
8624
- bottom: m.bottom + c.docsTop + Oi,
8636
+ const c = e.getOffsetConfig(), d = new It(c, t), { borderBoxPointGroup: l } = d.getRangePointData(r, a);
8637
+ return Is(l).map((m) => ({
8638
+ top: m.top + c.docsTop - Ti,
8639
+ bottom: m.bottom + c.docsTop + Ti,
8625
8640
  left: m.left + c.docsLeft,
8626
8641
  right: m.right + c.docsLeft
8627
8642
  }));
8628
- }, Mi = (n, e, t, o) => {
8643
+ }, _i = (n, e, t, o) => {
8629
8644
  const r = [];
8630
8645
  for (const s of n) {
8631
8646
  const i = s.top;
@@ -8665,7 +8680,7 @@ const $u = (n, e, t, o) => {
8665
8680
  const r = t.findPositionByGlyph(n, o);
8666
8681
  if (!r)
8667
8682
  return;
8668
- const s = e.getOffsetConfig(), i = { ...r, isBack: !0 }, a = new mt(s, t), { borderBoxPointGroup: c } = a.getRangePointData(i, i), l = Es(c)[0];
8683
+ const s = e.getOffsetConfig(), i = { ...r, isBack: !0 }, a = new It(s, t), { borderBoxPointGroup: c } = a.getRangePointData(i, i), l = Is(c)[0];
8669
8684
  return {
8670
8685
  top: l.top + s.docsTop,
8671
8686
  bottom: l.bottom + s.docsTop,
@@ -8673,11 +8688,11 @@ const $u = (n, e, t, o) => {
8673
8688
  right: l.left + s.docsLeft + n.width
8674
8689
  };
8675
8690
  };
8676
- function Ot(n, e, t) {
8691
+ function Tt(n, e, t) {
8677
8692
  const { left: o, right: r, top: s, bottom: i } = t;
8678
8693
  return n >= o && n <= r && e >= s && e <= i;
8679
8694
  }
8680
- let wt = class extends pe {
8695
+ let wt = class extends me {
8681
8696
  constructor(e, t) {
8682
8697
  super();
8683
8698
  O(this, "_hoverCustomRanges$", new Fe([]));
@@ -8741,16 +8756,16 @@ let wt = class extends pe {
8741
8756
  this._hoverCustomRanges$.complete(), this._clickCustomRanges$.complete(), super.dispose();
8742
8757
  }
8743
8758
  _initPointer() {
8744
- let e = Mt.TEXT;
8759
+ let e = _t.TEXT;
8745
8760
  this.disposeWithMe(this.hoverCustomRanges$.subscribe((t) => {
8746
- t.length ? (e = this._context.scene.getCursor(), this._context.scene.setCursor(Mt.POINTER)) : this._context.scene.setCursor(e);
8761
+ t.length ? (e = this._context.scene.getCursor(), this._context.scene.setCursor(_t.POINTER)) : this._context.scene.setCursor(e);
8747
8762
  }));
8748
8763
  }
8749
8764
  _initResetDirty() {
8750
8765
  this.disposeWithMe(this._skeleton.dirty$.subscribe(() => {
8751
8766
  this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
8752
8767
  })), this.disposeWithMe(
8753
- Bt(this._context.engine.onTransformChange$).pipe(
8768
+ Mt(this._context.engine.onTransformChange$).pipe(
8754
8769
  ro((e) => e.type === oa.resize)
8755
8770
  ).subscribe(() => {
8756
8771
  this._customRangeDirty = !0, this._bulletDirty = !0, this._paragraphDirty = !0;
@@ -8758,12 +8773,12 @@ let wt = class extends pe {
8758
8773
  );
8759
8774
  }
8760
8775
  _initEvents() {
8761
- this.disposeWithMe(Bt(this._context.scene.onPointerMove$).pipe(bn(30)).subscribe((o) => {
8776
+ this.disposeWithMe(Mt(this._context.scene.onPointerMove$).pipe(bn(30)).subscribe((o) => {
8762
8777
  if (o.buttons > 0) {
8763
8778
  this._hoverBullet$.next(null), this._hoverCustomRanges$.next([]), this._hoverParagraph$.next(null), this._hoverParagraphLeft$.next(null), this._hoverTableCell$.next(null), this._hoverTable$.next(null);
8764
8779
  return;
8765
8780
  }
8766
- const { x: r, y: s } = Bi(o.offsetX, o.offsetY, this._context.scene);
8781
+ const { x: r, y: s } = Mi(o.offsetX, o.offsetY, this._context.scene);
8767
8782
  this._hoverCustomRanges$.next(
8768
8783
  this._calcActiveRanges({ x: r, y: s })
8769
8784
  ), this._hoverParagraph$.next(
@@ -8776,14 +8791,14 @@ let wt = class extends pe {
8776
8791
  })), this.disposeWithMe(this._context.scene.onPointerEnter$.subscribeEvent(() => {
8777
8792
  this._hoverBullet$.next(null), this._hoverCustomRanges$.next([]);
8778
8793
  }));
8779
- const e = Bt(this._context.mainComponent.onPointerDown$), t = Bt(this._context.scene.onPointerUp$);
8794
+ const e = Mt(this._context.mainComponent.onPointerDown$), t = Mt(this._context.scene.onPointerUp$);
8780
8795
  this.disposeWithMe(e.pipe(
8781
8796
  jl((o) => t.pipe(zl(1), wn((r) => ({ down: o, up: r })))),
8782
8797
  ro(({ down: o, up: r }) => o.target === r.target && r.timeStamp - o.timeStamp < 300)
8783
8798
  ).subscribe(({ down: o }) => {
8784
8799
  if (o.button === 2)
8785
8800
  return;
8786
- const r = Bi(o.offsetX, o.offsetY, this._context.scene), s = this._calcActiveRanges(r);
8801
+ const r = Mi(o.offsetX, o.offsetY, this._context.scene), s = this._calcActiveRanges(r);
8787
8802
  s.length && this._clickCustomRanges$.next(s.pop());
8788
8803
  const i = this._calcActiveBullet(r);
8789
8804
  i && this._clickBullet$.next(i);
@@ -8821,7 +8836,7 @@ let wt = class extends pe {
8821
8836
  _calcActiveRanges(e) {
8822
8837
  this._buildCustomRangeBounds();
8823
8838
  const { x: t, y: o } = e;
8824
- return this._customRangeBounds.filter((s) => s.rects.some((i) => Ot(t, o, i))).map(
8839
+ return this._customRangeBounds.filter((s) => s.rects.some((i) => Tt(t, o, i))).map(
8825
8840
  (s) => ({
8826
8841
  segmentId: s.segmentId,
8827
8842
  range: s.customRange,
@@ -8881,7 +8896,7 @@ let wt = class extends pe {
8881
8896
  _calcActiveBullet(e) {
8882
8897
  this._buildBulletBounds();
8883
8898
  const { x: t, y: o } = e;
8884
- return this._bulletBounds.find((s) => Ot(t, o, s.rect));
8899
+ return this._bulletBounds.find((s) => Tt(t, o, s.rect));
8885
8900
  }
8886
8901
  // eslint-disable-next-line max-lines-per-function
8887
8902
  _buildParagraphBoundsBySegment(e) {
@@ -8891,7 +8906,7 @@ let wt = class extends pe {
8891
8906
  return null;
8892
8907
  const s = (d) => {
8893
8908
  const l = /* @__PURE__ */ new Map(), A = (h, u, g, f) => {
8894
- Mi(h.sections, g, f, h.pageWidth - h.marginLeft - h.marginRight).forEach((m) => {
8909
+ _i(h.sections, g, f, h.pageWidth - h.marginLeft - h.marginRight).forEach((m) => {
8895
8910
  if (!l.has(m.startIndex))
8896
8911
  l.set(m.startIndex, {
8897
8912
  rect: m.rect,
@@ -8924,7 +8939,7 @@ let wt = class extends pe {
8924
8939
  tableId: R
8925
8940
  }), p.rows.forEach((E, b) => {
8926
8941
  E.cells.forEach((y, C) => {
8927
- const B = ((u.pageHeight === 1 / 0 ? 0 : u.pageHeight) + r.pageMarginTop) * h + p.top + r.docsTop + u.marginTop + E.top + y.marginTop, x = p.left + r.docsLeft + u.marginLeft + y.left + y.marginLeft, M = Mi(y.sections, B, x, y.pageWidth - y.marginLeft - y.marginRight);
8942
+ const B = ((u.pageHeight === 1 / 0 ? 0 : u.pageHeight) + r.pageMarginTop) * h + p.top + r.docsTop + u.marginTop + E.top + y.marginTop, x = p.left + r.docsLeft + u.marginLeft + y.left + y.marginLeft, M = _i(y.sections, B, x, y.pageWidth - y.marginLeft - y.marginRight);
8928
8943
  let P = this._tableParagraphBounds.get(R);
8929
8944
  P || (P = [], this._tableParagraphBounds.set(R, P)), P.push(
8930
8945
  ...M.map((w) => ({
@@ -8989,12 +9004,12 @@ let wt = class extends pe {
8989
9004
  _calcActiveParagraph(e) {
8990
9005
  var i, a;
8991
9006
  this._buildParagraphBounds();
8992
- const { x: t, y: o } = e, r = Array.from(this._tableBounds.values()).find((c) => Ot(t, o, c.rect));
9007
+ const { x: t, y: o } = e, r = Array.from(this._tableBounds.values()).find((c) => Tt(t, o, c.rect));
8993
9008
  if (this._hoverTable$.next(r), r) {
8994
- const c = (i = this._tableCellBounds.get(r.tableId)) == null ? void 0 : i.find((A) => Ot(t, o, A.rect));
9009
+ const c = (i = this._tableCellBounds.get(r.tableId)) == null ? void 0 : i.find((A) => Tt(t, o, A.rect));
8995
9010
  if (this._hoverTableCell$.next(c), !c)
8996
9011
  return null;
8997
- const d = (a = this._tableParagraphBounds.get(c.tableId)) == null ? void 0 : a.filter((A) => A.colIndex === c.colIndex && A.rowIndex === c.rowIndex), l = d == null ? void 0 : d.find((A) => Ot(t, o, A.rect));
9012
+ const d = (a = this._tableParagraphBounds.get(c.tableId)) == null ? void 0 : a.filter((A) => A.colIndex === c.colIndex && A.rowIndex === c.rowIndex), l = d == null ? void 0 : d.find((A) => Tt(t, o, A.rect));
8998
9013
  return l && {
8999
9014
  ...l,
9000
9015
  rects: [l.rect]
@@ -9003,7 +9018,7 @@ let wt = class extends pe {
9003
9018
  let s;
9004
9019
  for (const c of this._paragraphBounds) {
9005
9020
  const d = c[1];
9006
- if (d.rects.some((l) => Ot(t, o, l))) {
9021
+ if (d.rects.some((l) => Tt(t, o, l))) {
9007
9022
  s = d;
9008
9023
  break;
9009
9024
  }
@@ -9013,7 +9028,7 @@ let wt = class extends pe {
9013
9028
  _calcActiveParagraphLeft(e) {
9014
9029
  this._buildParagraphBounds();
9015
9030
  const { x: t, y: o } = e;
9016
- return this._paragraphLeftBounds.find((s) => Ot(t, o, s.rect));
9031
+ return this._paragraphLeftBounds.find((s) => Tt(t, o, s.rect));
9017
9032
  }
9018
9033
  get paragraphBounds() {
9019
9034
  return this._buildParagraphBounds(), this._paragraphBounds;
@@ -9033,13 +9048,13 @@ const th = [
9033
9048
  Ut.id,
9034
9049
  Ft.id,
9035
9050
  Ht.id,
9036
- Ct.id,
9051
+ bt.id,
9037
9052
  kt.id,
9038
- Dt.id,
9053
+ Et.id,
9039
9054
  Pt.id
9040
9055
  ];
9041
9056
  function nh(n) {
9042
- const { avaliableMenus: e = th } = n, t = J(Aa), [o, r] = me([]);
9057
+ const { avaliableMenus: e = th } = n, t = J(Aa), [o, r] = Ee([]);
9043
9058
  return Ce(() => {
9044
9059
  function s() {
9045
9060
  const a = t.getFlatMenuByPositionKey(Ll.RIBBON), c = [];
@@ -9067,7 +9082,7 @@ var oh = Object.getOwnPropertyDescriptor, rh = (n, e, t, o) => {
9067
9082
  (i = n[s]) && (r = i(r) || r);
9068
9083
  return r;
9069
9084
  }, dn = (n, e) => (t, o) => e(t, o, n);
9070
- const _i = "univer.doc.float-menu";
9085
+ const Di = "univer.doc.float-menu";
9071
9086
  function sh(n, e) {
9072
9087
  if (n == null || e == null)
9073
9088
  return !1;
@@ -9078,11 +9093,11 @@ const ih = [
9078
9093
  V.CUSTOM_BLOCK,
9079
9094
  V.PARAGRAPH
9080
9095
  ];
9081
- let lo = class extends pe {
9096
+ let lo = class extends me {
9082
9097
  constructor(e, t, o, r, s, i) {
9083
9098
  super();
9084
9099
  O(this, "_floatMenu", null);
9085
- this._context = e, this._docSelectionManagerService = t, this._docCanvasPopManagerService = o, this._componentManager = r, this._univerInstanceService = s, this._docSelectionRenderService = i, !vt(this._context.unitId) && (this._registerFloatMenu(), this._initSelectionChange(), this.disposeWithMe(() => {
9100
+ this._context = e, this._docSelectionManagerService = t, this._docCanvasPopManagerService = o, this._componentManager = r, this._univerInstanceService = s, this._docSelectionRenderService = i, !Rt(this._context.unitId) && (this._registerFloatMenu(), this._initSelectionChange(), this.disposeWithMe(() => {
9086
9101
  this._hideFloatMenu();
9087
9102
  }));
9088
9103
  }
@@ -9090,7 +9105,7 @@ let lo = class extends pe {
9090
9105
  return this._floatMenu;
9091
9106
  }
9092
9107
  _registerFloatMenu() {
9093
- this.disposeWithMe(this._componentManager.register(_i, nh));
9108
+ this.disposeWithMe(this._componentManager.register(Di, nh));
9094
9109
  }
9095
9110
  _initSelectionChange() {
9096
9111
  this.disposeWithMe(this._docSelectionRenderService.onSelectionStart$.subscribe(() => {
@@ -9128,7 +9143,7 @@ let lo = class extends pe {
9128
9143
  disposable: this._docCanvasPopManagerService.attachPopupToRange(
9129
9144
  t,
9130
9145
  {
9131
- componentKey: _i,
9146
+ componentKey: Di,
9132
9147
  direction: t.direction === "backward" || sh(t.startNodePosition, t.endNodePosition) ? "top-center" : "bottom-center",
9133
9148
  offset: [0, 4]
9134
9149
  },
@@ -9151,11 +9166,11 @@ var ah = Object.getOwnPropertyDescriptor, ch = (n, e, t, o) => {
9151
9166
  (i = n[s]) && (r = i(r) || r);
9152
9167
  return r;
9153
9168
  }, An = (n, e) => (t, o) => e(t, o, n);
9154
- let Ao = class extends pe {
9169
+ let Ao = class extends me {
9155
9170
  constructor(e, t, o, r, s, i) {
9156
9171
  super();
9157
9172
  O(this, "_paragrahMenu", null);
9158
- this._context = e, this._docSelectionManagerService = t, this._docEventManagerService = o, this._docPopupManagerService = r, this._docSkeletonManagerService = s, this._floatMenuService = i, !vt(this._context.unitId) && this._init();
9173
+ this._context = e, this._docSelectionManagerService = t, this._docEventManagerService = o, this._docPopupManagerService = r, this._docSkeletonManagerService = s, this._floatMenuService = i, !Rt(this._context.unitId) && this._init();
9159
9174
  }
9160
9175
  get activeParagraph() {
9161
9176
  var e;
@@ -9240,7 +9255,7 @@ Ao = ch([
9240
9255
  ], Ao);
9241
9256
  const lh = ({ popup: n }) => {
9242
9257
  var E, b;
9243
- const [e, t] = me(!1), o = ke(null), r = J(T), s = J(Oo), i = ke(null), a = ke(!1), c = J(fe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(Ao), u = l == null ? void 0 : l.with(wt), g = tt(u == null ? void 0 : u.hoverParagraph$), f = tt(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = _e(() => {
9258
+ const [e, t] = Ee(!1), o = ke(null), r = J(T), s = J(Oo), i = ke(null), a = ke(!1), c = J(fe), d = J(L), l = c.getRenderById(n.unitId), A = d.getUnit(n.unitId, _.UNIVER_DOC), h = l == null ? void 0 : l.with(Ao), u = l == null ? void 0 : l.with(wt), g = tt(u == null ? void 0 : u.hoverParagraph$), f = tt(u == null ? void 0 : u.hoverParagraphLeft$), p = (E = g != null ? g : f) == null ? void 0 : E.startIndex, m = _e(() => {
9244
9259
  var y, C;
9245
9260
  return (C = (y = A == null ? void 0 : A.getBody()) == null ? void 0 : y.paragraphs) == null ? void 0 : C.find((B) => B.startIndex === p);
9246
9261
  }, [A, g]), I = (b = m == null ? void 0 : m.paragraphStyle) == null ? void 0 : b.namedStyleType, S = Ic[I != null ? I : K.NORMAL_TEXT], v = _e(() => new Fe({
@@ -9332,10 +9347,10 @@ const lh = ({ popup: n }) => {
9332
9347
  ] });
9333
9348
  };
9334
9349
  function Se(n) {
9335
- return n.getContextValue(Dn) && n.getContextValue(Hr) && !n.getContextValue(Zi);
9350
+ return n.getContextValue(Dn) && n.getContextValue(kr) && !n.getContextValue(Zi);
9336
9351
  }
9337
9352
  function dh(n) {
9338
- return n.getContextValue(Dn) && n.getContextValue(Hr) && !n.getContextValue(Zi);
9353
+ return n.getContextValue(Dn) && n.getContextValue(kr) && !n.getContextValue(Zi);
9339
9354
  }
9340
9355
  const Ah = {
9341
9356
  id: Jt.id,
@@ -9365,7 +9380,7 @@ const Ah = {
9365
9380
  binding: q.X | te.SHIFT | te.CTRL_COMMAND,
9366
9381
  preconditions: Se
9367
9382
  }, mh = {
9368
- id: Ct.id,
9383
+ id: bt.id,
9369
9384
  binding: q.COMMA | te.CTRL_COMMAND,
9370
9385
  preconditions: Se
9371
9386
  }, Eh = {
@@ -9396,7 +9411,7 @@ const Ah = {
9396
9411
  id: On.id,
9397
9412
  binding: q.Digit8 | te.CTRL_COMMAND | te.SHIFT,
9398
9413
  preconditions: Se
9399
- }, Vo = "docs-ui.config", Di = {
9414
+ }, Vo = "docs-ui.config", Pi = {
9400
9415
  layout: {
9401
9416
  docContainerConfig: sd,
9402
9417
  toolbarConfig: rd
@@ -9408,7 +9423,7 @@ function Oh() {
9408
9423
  if (!o) return 100;
9409
9424
  const c = ((l = (d = o.getSettings()) == null ? void 0 : d.zoomRatio) != null ? l : 1) * 100;
9410
9425
  return Math.round(c);
9411
- }, [o]), [s, i] = me(() => r());
9426
+ }, [o]), [s, i] = Ee(() => r());
9412
9427
  Ce(() => (i(r()), n.onCommandExecuted((d) => {
9413
9428
  if (d.id === nt.id) {
9414
9429
  const l = r();
@@ -9570,7 +9585,7 @@ function Lh(n, e, t, o) {
9570
9585
  return A.paragraphStyle.headingId;
9571
9586
  }
9572
9587
  }
9573
- const Pi = "__title";
9588
+ const wi = "__title";
9574
9589
  function Qh() {
9575
9590
  var e, t, o;
9576
9591
  const n = ua(Vo);
@@ -9578,13 +9593,13 @@ function Qh() {
9578
9593
  }
9579
9594
  function Uh() {
9580
9595
  var B, x, M, P, F, w, N, ee, $;
9581
- const n = J(T), e = J(L), t = tt(_e(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC), [])), o = J(fe), r = (x = (B = t == null ? void 0 : t.getBody()) == null ? void 0 : B.dataStream) != null ? x : "", [s, i] = me(0), [a, c] = me(void 0), d = (M = t == null ? void 0 : t.getUnitId()) != null ? M : "", l = o.getRenderById(d), A = t == null ? void 0 : t.getTitle(), h = l == null ? void 0 : l.with(wt), u = h == null ? void 0 : h.paragraphBounds, g = (F = (P = l == null ? void 0 : l.mainComponent) == null ? void 0 : P.left) != null ? F : 0, f = (w = l == null ? void 0 : l.engine.height) != null ? w : 0, p = (N = l == null ? void 0 : l.scene.scaleY) != null ? N : 1, m = ($ = (ee = t == null ? void 0 : t.getBody()) == null ? void 0 : ee.paragraphs) != null ? $ : [], I = _e(() => {
9596
+ const n = J(T), e = J(L), t = tt(_e(() => e.getCurrentTypeOfUnit$(_.UNIVER_DOC), [])), o = J(fe), r = (x = (B = t == null ? void 0 : t.getBody()) == null ? void 0 : B.dataStream) != null ? x : "", [s, i] = Ee(0), [a, c] = Ee(void 0), d = (M = t == null ? void 0 : t.getUnitId()) != null ? M : "", l = o.getRenderById(d), A = t == null ? void 0 : t.getTitle(), h = l == null ? void 0 : l.with(wt), u = h == null ? void 0 : h.paragraphBounds, g = (F = (P = l == null ? void 0 : l.mainComponent) == null ? void 0 : P.left) != null ? F : 0, f = (w = l == null ? void 0 : l.engine.height) != null ? w : 0, p = (N = l == null ? void 0 : l.scene.scaleY) != null ? N : 1, m = ($ = (ee = t == null ? void 0 : t.getBody()) == null ? void 0 : ee.paragraphs) != null ? $ : [], I = _e(() => {
9582
9597
  const U = /* @__PURE__ */ new Map();
9583
9598
  return m.forEach((H) => {
9584
9599
  U.set(H.startIndex, H);
9585
9600
  }), U;
9586
9601
  }, [m]);
9587
- tt(_e(() => l != null && l.engine.onTransformChange$ ? Bt(l == null ? void 0 : l.engine.onTransformChange$).pipe(bn(33)) : Yl(null), [l == null ? void 0 : l.engine.onTransformChange$]));
9602
+ tt(_e(() => l != null && l.engine.onTransformChange$ ? Mt(l == null ? void 0 : l.engine.onTransformChange$).pipe(bn(33)) : Yl(null), [l == null ? void 0 : l.engine.onTransformChange$]));
9588
9603
  const S = g < 180 ? "float" : "side-bar", v = m == null ? void 0 : m.filter(
9589
9604
  (U) => {
9590
9605
  var H;
@@ -9606,15 +9621,15 @@ function Uh() {
9606
9621
  ne && c(ne);
9607
9622
  }), E = v != null && v.find((U) => U.isTitle) ? v : [
9608
9623
  ...A ? [{
9609
- id: Pi,
9624
+ id: wi,
9610
9625
  text: A,
9611
9626
  level: 1,
9612
9627
  isTitle: !0
9613
9628
  }] : [],
9614
9629
  ...v != null ? v : []
9615
- ].filter(Boolean), [b, y] = me(!0);
9630
+ ].filter(Boolean), [b, y] = Ee(!0);
9616
9631
  Ce(() => {
9617
- const U = kr(i, 100), H = n.onCommandExecuted((k) => {
9632
+ const U = Vr(i, 100), H = n.onCommandExecuted((k) => {
9618
9633
  k.id === X.id && k.params.unitId === (t == null ? void 0 : t.getUnitId()) && U((ie) => ie + 1);
9619
9634
  });
9620
9635
  return () => {
@@ -9624,7 +9639,7 @@ function Uh() {
9624
9639
  const U = l == null ? void 0 : l.scene.getViewport(je.VIEW_MAIN);
9625
9640
  if (!U)
9626
9641
  return;
9627
- const H = Bt(U.onScrollAfter$).pipe(bn(33)).subscribe(R);
9642
+ const H = Mt(U.onScrollAfter$).pipe(bn(33)).subscribe(R);
9628
9643
  return () => {
9629
9644
  H.unsubscribe();
9630
9645
  };
@@ -9633,7 +9648,7 @@ function Uh() {
9633
9648
  const H = l == null ? void 0 : l.scene.getViewport(je.VIEW_MAIN);
9634
9649
  if (!H)
9635
9650
  return;
9636
- if (U.id === Pi) {
9651
+ if (U.id === wi) {
9637
9652
  H.scrollToViewportPos({ viewportScrollY: 0 });
9638
9653
  return;
9639
9654
  }
@@ -9646,7 +9661,7 @@ function Uh() {
9646
9661
  const ne = u == null ? void 0 : u.get(k.startIndex);
9647
9662
  ne && (H.scrollToViewportPos({ viewportScrollY: ne.rect.top }), c(U.id));
9648
9663
  });
9649
- return !t || vt(d) || !(E != null && E.length) ? null : /* @__PURE__ */ Q(
9664
+ return !t || Rt(d) || !(E != null && E.length) ? null : /* @__PURE__ */ Q(
9650
9665
  "div",
9651
9666
  {
9652
9667
  className: "univer-absolute univer-bottom-0 univer-left-0 univer-top-0 univer-z-[100] univer-w-[0px]",
@@ -9684,7 +9699,7 @@ const rt = {
9684
9699
  }
9685
9700
  }, g = new Nt();
9686
9701
  g.reset();
9687
- const f = new Ee(), p = W.getInstance();
9702
+ const f = new Ie(), p = W.getInstance();
9688
9703
  for (const y of h) {
9689
9704
  const { startIndex: C } = y;
9690
9705
  f.push({
@@ -9727,7 +9742,7 @@ const rt = {
9727
9742
  const o = t[0].segmentId, r = e.getSelfOrHeaderFooterModel(o), s = (d = (c = r.getBody()) == null ? void 0 : c.paragraphs) != null ? d : [], i = (A = (l = r.getBody()) == null ? void 0 : l.dataStream) != null ? A : "";
9728
9743
  return (h = ce.range.getParagraphsInRanges(t, s, i)) != null ? h : [];
9729
9744
  }, kh = (n, e) => {
9730
- const t = J(T), [o, r] = me(() => {
9745
+ const t = J(T), [o, r] = Ee(() => {
9731
9746
  var a, c;
9732
9747
  const i = n[0];
9733
9748
  return i ? String((c = (a = i.paragraphStyle) == null ? void 0 : a.horizontalAlign) != null ? c : e) : e;
@@ -9736,7 +9751,7 @@ const rt = {
9736
9751
  paragraph: { horizontalAlign: Number(i) }
9737
9752
  }))];
9738
9753
  }, Vh = (n) => {
9739
- const e = J(T), [t, o] = me(() => {
9754
+ const e = J(T), [t, o] = Ee(() => {
9740
9755
  var i;
9741
9756
  const s = n[0];
9742
9757
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.indentStart, 0) : 0;
@@ -9745,7 +9760,7 @@ const rt = {
9745
9760
  paragraph: { indentStart: { v: s } }
9746
9761
  }))];
9747
9762
  }, Wh = (n) => {
9748
- const e = J(T), [t, o] = me(() => {
9763
+ const e = J(T), [t, o] = Ee(() => {
9749
9764
  var i;
9750
9765
  const s = n[0];
9751
9766
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.indentEnd, 0) : 0;
@@ -9754,7 +9769,7 @@ const rt = {
9754
9769
  paragraph: { indentEnd: { v: s } }
9755
9770
  }))];
9756
9771
  }, jh = (n) => {
9757
- const e = J(T), [t, o] = me(() => {
9772
+ const e = J(T), [t, o] = Ee(() => {
9758
9773
  var i;
9759
9774
  const s = n[0];
9760
9775
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.indentFirstLine, 0) : 0;
@@ -9763,7 +9778,7 @@ const rt = {
9763
9778
  paragraph: { indentFirstLine: { v: s } }
9764
9779
  }))];
9765
9780
  }, zh = (n) => {
9766
- const e = J(T), [t, o] = me(() => {
9781
+ const e = J(T), [t, o] = Ee(() => {
9767
9782
  var i;
9768
9783
  const s = n[0];
9769
9784
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.hanging, 0) : 0;
@@ -9772,7 +9787,7 @@ const rt = {
9772
9787
  paragraph: { hanging: { v: s } }
9773
9788
  }))];
9774
9789
  }, Gh = (n) => {
9775
- const e = J(T), [t, o] = me(() => {
9790
+ const e = J(T), [t, o] = Ee(() => {
9776
9791
  var i;
9777
9792
  const s = n[0];
9778
9793
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.spaceAbove, 0) : 0;
@@ -9781,7 +9796,7 @@ const rt = {
9781
9796
  paragraph: { spaceAbove: { v: s } }
9782
9797
  }))];
9783
9798
  }, Yh = (n) => {
9784
- const e = J(T), [t, o] = me(() => {
9799
+ const e = J(T), [t, o] = Ee(() => {
9785
9800
  var i;
9786
9801
  const s = n[0];
9787
9802
  return s ? rn((i = s.paragraphStyle) == null ? void 0 : i.spaceBelow, 0) : 0;
@@ -9795,11 +9810,11 @@ const rt = {
9795
9810
  const u = o.getCurrentUnitForType(_.UNIVER_DOC);
9796
9811
  if (u)
9797
9812
  return (g = t.getRenderById(u == null ? void 0 : u.getUnitId())) == null ? void 0 : g.with(de).getSkeleton();
9798
- }, []), s = _e(() => new Fe({}), []), [i, a] = me(() => {
9813
+ }, []), s = _e(() => new Fe({}), []), [i, a] = Ee(() => {
9799
9814
  var g, f;
9800
9815
  const u = n[0];
9801
9816
  return u && (f = (g = u.paragraphStyle) == null ? void 0 : g.lineSpacing) != null ? f : 1;
9802
- }), c = ke(i), [d, l] = me(() => {
9817
+ }), c = ke(i), [d, l] = Ee(() => {
9803
9818
  var g, f;
9804
9819
  const u = n[0];
9805
9820
  return u ? (f = (g = u.paragraphStyle) == null ? void 0 : g.spacingRule) != null ? f : Xt.AUTO : Xt.AUTO;
@@ -9832,7 +9847,7 @@ const rt = {
9832
9847
  lineSpacing: [i, A],
9833
9848
  spacingRule: [d, h]
9834
9849
  };
9835
- }, Tt = (n) => {
9850
+ }, Bt = (n) => {
9836
9851
  const { value: e, onChange: t, className: o = "", min: r = 0, max: s = 100, step: i = 1 } = n, a = ke(null);
9837
9852
  return /* @__PURE__ */ Q(
9838
9853
  it,
@@ -9886,28 +9901,28 @@ function qh() {
9886
9901
  n.t("doc.paragraphSetting.left"),
9887
9902
  "(px)"
9888
9903
  ] }),
9889
- /* @__PURE__ */ Q(Tt, { className: "univer-mt-4", value: s, onChange: (E) => i(E != null ? E : 0) })
9904
+ /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: s, onChange: (E) => i(E != null ? E : 0) })
9890
9905
  ] }),
9891
9906
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9892
9907
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9893
9908
  n.t("doc.paragraphSetting.right"),
9894
9909
  "(px)"
9895
9910
  ] }),
9896
- /* @__PURE__ */ Q(Tt, { className: "univer-mt-4", value: a, onChange: (E) => c(E != null ? E : 0) })
9911
+ /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: a, onChange: (E) => c(E != null ? E : 0) })
9897
9912
  ] }),
9898
9913
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9899
9914
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9900
9915
  n.t("doc.paragraphSetting.firstLine"),
9901
9916
  "(px)"
9902
9917
  ] }),
9903
- /* @__PURE__ */ Q(Tt, { className: "univer-mt-4", value: d, onChange: (E) => l(E != null ? E : 0) })
9918
+ /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: d, onChange: (E) => l(E != null ? E : 0) })
9904
9919
  ] }),
9905
9920
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9906
9921
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9907
9922
  n.t("doc.paragraphSetting.hanging"),
9908
9923
  "(px)"
9909
9924
  ] }),
9910
- /* @__PURE__ */ Q(Tt, { className: "univer-mt-4", value: A, onChange: (E) => h(E != null ? E : 0) })
9925
+ /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: A, onChange: (E) => h(E != null ? E : 0) })
9911
9926
  ] })
9912
9927
  ] }),
9913
9928
  /* @__PURE__ */ Q("div", { className: "univer-t-4 univer-text-sm univer-font-medium", children: n.t("doc.paragraphSetting.spacing") }),
@@ -9917,14 +9932,14 @@ function qh() {
9917
9932
  n.t("doc.paragraphSetting.before"),
9918
9933
  "(px)"
9919
9934
  ] }),
9920
- /* @__PURE__ */ Q(Tt, { className: "univer-mt-4", value: u, onChange: (E) => g(E != null ? E : 0) })
9935
+ /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: u, onChange: (E) => g(E != null ? E : 0) })
9921
9936
  ] }),
9922
9937
  /* @__PURE__ */ re("div", { className: "univer-item-center univer-flex univer-justify-between", children: [
9923
9938
  /* @__PURE__ */ re("div", { className: "univer-mt-3 univer-text-xs", children: [
9924
9939
  n.t("doc.paragraphSetting.after"),
9925
9940
  "(px)"
9926
9941
  ] }),
9927
- /* @__PURE__ */ Q(Tt, { className: "univer-mt-4", value: f, onChange: (E) => p(E != null ? E : 0) })
9942
+ /* @__PURE__ */ Q(Bt, { className: "univer-mt-4", value: f, onChange: (E) => p(E != null ? E : 0) })
9928
9943
  ] }),
9929
9944
  /* @__PURE__ */ re("div", { className: "item-center univer-flex univer-justify-between", children: [
9930
9945
  /* @__PURE__ */ Q("div", { className: "univer-mt-3 univer-text-xs", children: n.t("doc.paragraphSetting.lineSpace") }),
@@ -9945,7 +9960,7 @@ function qh() {
9945
9960
  }
9946
9961
  ),
9947
9962
  /* @__PURE__ */ Q(
9948
- Tt,
9963
+ Bt,
9949
9964
  {
9950
9965
  ...R,
9951
9966
  value: m,
@@ -9961,7 +9976,7 @@ function qh() {
9961
9976
  }
9962
9977
  const Xh = (n, e) => e.length === n.length && n.some((t) => e.some((o) => o.startOffset === t.startOffset && o.endOffset === t.endOffset));
9963
9978
  function Zh() {
9964
- const n = J(T), e = J(Ke), t = tt(e.currentLocale$), [o, r] = me(""), s = _e(() => kr(() => r(ge(4)), 300), []), i = ke([]);
9979
+ const n = J(T), e = J(Ke), t = tt(e.currentLocale$), [o, r] = Ee(""), s = _e(() => Vr(() => r(ge(4)), 300), []), i = ke([]);
9965
9980
  return Ce(() => {
9966
9981
  const a = n.onCommandExecuted((c) => {
9967
9982
  if (Le.id === c.id) {
@@ -9980,22 +9995,22 @@ var Jh = Object.getOwnPropertyDescriptor, $h = (n, e, t, o) => {
9980
9995
  (i = n[s]) && (r = i(r) || r);
9981
9996
  return r;
9982
9997
  }, or = (n, e) => (t, o) => e(t, o, n);
9983
- const wi = "doc_ui_paragraph-setting-panel";
9984
- let nn = class extends pe {
9998
+ const Ni = "doc_ui_paragraph-setting-panel";
9999
+ let nn = class extends me {
9985
10000
  constructor(e, t, o) {
9986
10001
  super();
9987
10002
  O(this, "_id");
9988
10003
  this._commandService = e, this._componentManager = t, this._sidebarService = o, this._init();
9989
10004
  }
9990
10005
  _init() {
9991
- this.disposeWithMe(this._componentManager.register(wi, Zh));
10006
+ this.disposeWithMe(this._componentManager.register(Ni, Zh));
9992
10007
  }
9993
10008
  openPanel() {
9994
10009
  const e = {
9995
10010
  header: { title: "doc.slider.paragraphSetting" },
9996
10011
  id: this._id,
9997
10012
  children: {
9998
- label: wi
10013
+ label: Ni
9999
10014
  },
10000
10015
  width: 300
10001
10016
  };
@@ -10010,13 +10025,13 @@ nn = $h([
10010
10025
  or(1, j(sn)),
10011
10026
  or(2, j(la))
10012
10027
  ], nn);
10013
- const Ds = {
10028
+ const Ps = {
10014
10029
  id: "sidebar.operation.doc-paragraph-setting-panel",
10015
10030
  type: D.OPERATION,
10016
10031
  handler: (n) => (n.get(nn).openPanel(), !0)
10017
- }, Ps = (n) => {
10032
+ }, ws = (n) => {
10018
10033
  const e = n.get(Y);
10019
- return new Ie((t) => {
10034
+ return new pe((t) => {
10020
10035
  const o = e.textSelection$.subscribe(() => {
10021
10036
  e.getDocRanges().some((i) => i.collapsed === !1 || i.rangeType === He.RECT) ? t.next(!1) : t.next(!0);
10022
10037
  });
@@ -10029,7 +10044,7 @@ function eg(n) {
10029
10044
  const e = n.map((t) => t.tableId);
10030
10045
  return e.every((t) => t === e[0]);
10031
10046
  }
10032
- function Ni(n, e, t) {
10047
+ function Li(n, e, t) {
10033
10048
  var s;
10034
10049
  const o = e.getRectRanges(), r = e.getActiveTextRange();
10035
10050
  if (o && o.length && eg(o) && r == null) {
@@ -10048,13 +10063,13 @@ function Ni(n, e, t) {
10048
10063
  }
10049
10064
  n.next(!0);
10050
10065
  }
10051
- const dt = (n) => {
10066
+ const At = (n) => {
10052
10067
  const e = n.get(Y), t = n.get(L);
10053
- return new Ie((o) => {
10068
+ return new pe((o) => {
10054
10069
  const r = e.textSelection$.subscribe(() => {
10055
- Ni(o, e, t);
10070
+ Li(o, e, t);
10056
10071
  });
10057
- return Ni(o, e, t), () => r.unsubscribe();
10072
+ return Li(o, e, t), () => r.unsubscribe();
10058
10073
  });
10059
10074
  }, tg = (n) => ({
10060
10075
  id: so.name,
@@ -10062,23 +10077,23 @@ const dt = (n) => {
10062
10077
  type: Z.BUTTON,
10063
10078
  icon: "CopyDoubleIcon",
10064
10079
  title: "rightClick.copy",
10065
- disabled$: Ps(n),
10080
+ disabled$: ws(n),
10066
10081
  hidden$: se(n, _.UNIVER_DOC)
10067
10082
  }), ng = (n) => ({
10068
- id: Ds.id,
10083
+ id: Ps.id,
10069
10084
  type: Z.BUTTON,
10070
10085
  icon: "MenuIcon",
10071
10086
  title: "doc.menu.paragraphSetting",
10072
10087
  hidden$: se(n, _.UNIVER_DOC)
10073
10088
  }), og = (n) => ({
10074
- id: rs.id,
10089
+ id: ss.id,
10075
10090
  type: Z.BUTTON,
10076
10091
  icon: "CopyDoubleIcon",
10077
10092
  title: "rightClick.cut",
10078
- disabled$: Ps(n),
10093
+ disabled$: ws(n),
10079
10094
  hidden$: se(n, _.UNIVER_DOC)
10080
10095
  }), rg = (n) => ({
10081
- id: is.id,
10096
+ id: as.id,
10082
10097
  type: Z.BUTTON,
10083
10098
  icon: "PasteSpecialDoubleIcon",
10084
10099
  title: "rightClick.paste",
@@ -10088,7 +10103,7 @@ const dt = (n) => {
10088
10103
  type: Z.BUTTON,
10089
10104
  icon: "PasteSpecialDoubleIcon",
10090
10105
  title: "rightClick.delete",
10091
- disabled$: Ps(n),
10106
+ disabled$: ws(n),
10092
10107
  hidden$: se(n, _.UNIVER_DOC)
10093
10108
  }), Cc = "doc.menu.table-insert";
10094
10109
  function ig(n) {
@@ -10097,46 +10112,46 @@ function ig(n) {
10097
10112
  type: Z.SUBITEMS,
10098
10113
  title: "table.insert",
10099
10114
  icon: "InsertDoubleIcon",
10100
- hidden$: Nn(se(n, _.UNIVER_DOC), dt(n), (e, t) => e || t)
10115
+ hidden$: Nn(se(n, _.UNIVER_DOC), At(n), (e, t) => e || t)
10101
10116
  };
10102
10117
  }
10103
10118
  function ag(n) {
10104
10119
  return {
10105
- id: Rs.id,
10120
+ id: bs.id,
10106
10121
  type: Z.BUTTON,
10107
10122
  title: "table.insertRowAbove",
10108
10123
  icon: "InsertRowAboveDoubleIcon",
10109
- disabled$: dt(n),
10124
+ disabled$: At(n),
10110
10125
  hidden$: se(n, _.UNIVER_DOC)
10111
10126
  };
10112
10127
  }
10113
10128
  function cg(n) {
10114
10129
  return {
10115
- id: bs.id,
10130
+ id: ys.id,
10116
10131
  type: Z.BUTTON,
10117
10132
  title: "table.insertRowBelow",
10118
10133
  icon: "InsertRowBelowDoubleIcon",
10119
- disabled$: dt(n),
10134
+ disabled$: At(n),
10120
10135
  hidden$: se(n, _.UNIVER_DOC)
10121
10136
  };
10122
10137
  }
10123
10138
  function lg(n) {
10124
10139
  return {
10125
- id: ys.id,
10140
+ id: xs.id,
10126
10141
  type: Z.BUTTON,
10127
10142
  title: "table.insertColumnLeft",
10128
10143
  icon: "LeftInsertColumnDoubleIcon",
10129
- disabled$: dt(n),
10144
+ disabled$: At(n),
10130
10145
  hidden$: se(n, _.UNIVER_DOC)
10131
10146
  };
10132
10147
  }
10133
10148
  function dg(n) {
10134
10149
  return {
10135
- id: xs.id,
10150
+ id: Os.id,
10136
10151
  type: Z.BUTTON,
10137
10152
  title: "table.insertColumnRight",
10138
10153
  icon: "RightInsertColumnDoubleIcon",
10139
- disabled$: dt(n),
10154
+ disabled$: At(n),
10140
10155
  hidden$: se(n, _.UNIVER_DOC)
10141
10156
  };
10142
10157
  }
@@ -10147,26 +10162,26 @@ function Ag(n) {
10147
10162
  type: Z.SUBITEMS,
10148
10163
  title: "table.delete",
10149
10164
  icon: "ReduceDoubleIcon",
10150
- hidden$: Nn(se(n, _.UNIVER_DOC), dt(n), (e, t) => e || t)
10165
+ hidden$: Nn(se(n, _.UNIVER_DOC), At(n), (e, t) => e || t)
10151
10166
  };
10152
10167
  }
10153
10168
  function ug(n) {
10154
10169
  return {
10155
- id: Is.id,
10170
+ id: Ss.id,
10156
10171
  type: Z.BUTTON,
10157
10172
  title: "table.deleteRows",
10158
10173
  icon: "DeleteRowDoubleIcon",
10159
- disabled$: dt(n),
10174
+ disabled$: At(n),
10160
10175
  hidden$: se(n, _.UNIVER_DOC)
10161
10176
  };
10162
10177
  }
10163
10178
  function hg(n) {
10164
10179
  return {
10165
- id: Ss.id,
10180
+ id: vs.id,
10166
10181
  type: Z.BUTTON,
10167
10182
  title: "table.deleteColumns",
10168
10183
  icon: "DeleteColumnDoubleIcon",
10169
- disabled$: dt(n),
10184
+ disabled$: At(n),
10170
10185
  hidden$: se(n, _.UNIVER_DOC)
10171
10186
  };
10172
10187
  }
@@ -10176,12 +10191,12 @@ function gg(n) {
10176
10191
  type: Z.BUTTON,
10177
10192
  title: "table.deleteTable",
10178
10193
  icon: "GridIcon",
10179
- disabled$: dt(n),
10194
+ disabled$: At(n),
10180
10195
  hidden$: se(n, _.UNIVER_DOC)
10181
10196
  };
10182
10197
  }
10183
10198
  const fg = {
10184
- [Ys.FORMAT]: {
10199
+ [Ks.FORMAT]: {
10185
10200
  [Qt.id]: {
10186
10201
  order: 0,
10187
10202
  menuItemFactory: du
@@ -10198,7 +10213,7 @@ const fg = {
10198
10213
  order: 3,
10199
10214
  menuItemFactory: hu
10200
10215
  },
10201
- [Ct.id]: {
10216
+ [bt.id]: {
10202
10217
  order: 4,
10203
10218
  menuItemFactory: gu
10204
10219
  },
@@ -10218,7 +10233,7 @@ const fg = {
10218
10233
  order: 7,
10219
10234
  menuItemFactory: pu
10220
10235
  },
10221
- [Dt.id]: {
10236
+ [Et.id]: {
10222
10237
  order: 8,
10223
10238
  menuItemFactory: Iu
10224
10239
  },
@@ -10231,7 +10246,7 @@ const fg = {
10231
10246
  }
10232
10247
  }
10233
10248
  },
10234
- [Ys.LAYOUT]: {
10249
+ [Ks.LAYOUT]: {
10235
10250
  [Qo.id]: {
10236
10251
  order: 2,
10237
10252
  menuItemFactory: bu
@@ -10254,17 +10269,17 @@ const fg = {
10254
10269
  },
10255
10270
  [Tn.id]: {
10256
10271
  order: 7,
10257
- menuItemFactory: bi
10272
+ menuItemFactory: yi
10258
10273
  },
10259
10274
  [On.id]: {
10260
10275
  order: 8,
10261
- menuItemFactory: yi
10276
+ menuItemFactory: xi
10262
10277
  },
10263
10278
  [io.id]: {
10264
10279
  order: 9,
10265
- menuItemFactory: xi
10280
+ menuItemFactory: Oi
10266
10281
  },
10267
- [Bs.id]: {
10282
+ [Ms.id]: {
10268
10283
  order: 10,
10269
10284
  menuItemFactory: Su
10270
10285
  },
@@ -10272,7 +10287,7 @@ const fg = {
10272
10287
  order: 11,
10273
10288
  menuItemFactory: Bu
10274
10289
  },
10275
- [_s.id]: {
10290
+ [Ds.id]: {
10276
10291
  order: 12,
10277
10292
  menuItemFactory: Du
10278
10293
  }
@@ -10281,7 +10296,7 @@ const fg = {
10281
10296
  [Ec]: {
10282
10297
  order: 2,
10283
10298
  menuItemFactory: Cu,
10284
- [Os.id]: {
10299
+ [Ts.id]: {
10285
10300
  order: 0,
10286
10301
  menuItemFactory: Ru
10287
10302
  }
@@ -10293,11 +10308,11 @@ const fg = {
10293
10308
  order: 0,
10294
10309
  menuItemFactory: tg
10295
10310
  },
10296
- [rs.id]: {
10311
+ [ss.id]: {
10297
10312
  order: 1,
10298
10313
  menuItemFactory: og
10299
10314
  },
10300
- [is.id]: {
10315
+ [as.id]: {
10301
10316
  order: 2,
10302
10317
  menuItemFactory: rg
10303
10318
  },
@@ -10307,26 +10322,26 @@ const fg = {
10307
10322
  }
10308
10323
  },
10309
10324
  [cn.LAYOUT]: {
10310
- [Ds.id]: {
10325
+ [Ps.id]: {
10311
10326
  order: 0,
10312
10327
  menuItemFactory: ng
10313
10328
  },
10314
10329
  [Cc]: {
10315
10330
  order: 1,
10316
10331
  menuItemFactory: ig,
10317
- [Rs.id]: {
10332
+ [bs.id]: {
10318
10333
  order: 1,
10319
10334
  menuItemFactory: ag
10320
10335
  },
10321
- [bs.id]: {
10336
+ [ys.id]: {
10322
10337
  order: 2,
10323
10338
  menuItemFactory: cg
10324
10339
  },
10325
- [ys.id]: {
10340
+ [xs.id]: {
10326
10341
  order: 3,
10327
10342
  menuItemFactory: lg
10328
10343
  },
10329
- [xs.id]: {
10344
+ [Os.id]: {
10330
10345
  order: 4,
10331
10346
  menuItemFactory: dg
10332
10347
  }
@@ -10334,11 +10349,11 @@ const fg = {
10334
10349
  [Rc]: {
10335
10350
  order: 2,
10336
10351
  menuItemFactory: Ag,
10337
- [Is.id]: {
10352
+ [Ss.id]: {
10338
10353
  order: 1,
10339
10354
  menuItemFactory: ug
10340
10355
  },
10341
- [Ss.id]: {
10356
+ [vs.id]: {
10342
10357
  order: 2,
10343
10358
  menuItemFactory: hg
10344
10359
  },
@@ -10351,23 +10366,23 @@ const fg = {
10351
10366
  },
10352
10367
  [oo.PARAGRAPH]: {
10353
10368
  [cn.QUICK]: {
10354
- [us.id]: {
10369
+ [hs.id]: {
10355
10370
  order: 0,
10356
10371
  menuItemFactory: wu
10357
10372
  },
10358
- [hs.id]: {
10373
+ [gs.id]: {
10359
10374
  order: 1,
10360
10375
  menuItemFactory: Nu
10361
10376
  },
10362
- [gs.id]: {
10377
+ [fs.id]: {
10363
10378
  order: 2,
10364
10379
  menuItemFactory: Lu
10365
10380
  },
10366
- [fs.id]: {
10381
+ [ps.id]: {
10367
10382
  order: 3,
10368
10383
  menuItemFactory: Qu
10369
10384
  },
10370
- [ps.id]: {
10385
+ [ms.id]: {
10371
10386
  order: 4,
10372
10387
  menuItemFactory: Uu
10373
10388
  },
@@ -10377,27 +10392,27 @@ const fg = {
10377
10392
  },
10378
10393
  [Tn.id]: {
10379
10394
  order: 6,
10380
- menuItemFactory: bi
10395
+ menuItemFactory: yi
10381
10396
  },
10382
10397
  [On.id]: {
10383
10398
  order: 7,
10384
- menuItemFactory: yi
10399
+ menuItemFactory: xi
10385
10400
  },
10386
10401
  [io.id]: {
10387
10402
  order: 8,
10388
- menuItemFactory: xi
10403
+ menuItemFactory: Oi
10389
10404
  }
10390
10405
  },
10391
10406
  [cn.FORMAT]: {
10392
- [os.id]: {
10407
+ [rs.id]: {
10393
10408
  order: 0,
10394
10409
  menuItemFactory: Hu
10395
10410
  },
10396
- [ss.id]: {
10411
+ [is.id]: {
10397
10412
  order: 1,
10398
10413
  menuItemFactory: ku
10399
10414
  },
10400
- [es.id]: {
10415
+ [ts.id]: {
10401
10416
  order: 2,
10402
10417
  menuItemFactory: Vu
10403
10418
  }
@@ -10406,19 +10421,19 @@ const fg = {
10406
10421
  // title: 'rightClick.insertBellow',
10407
10422
  [Sc]: {
10408
10423
  menuItemFactory: Yu,
10409
- [ls.id]: {
10424
+ [ds.id]: {
10410
10425
  order: 0,
10411
10426
  menuItemFactory: Wu
10412
10427
  },
10413
- [ds.id]: {
10428
+ [As.id]: {
10414
10429
  order: 1,
10415
10430
  menuItemFactory: ju
10416
10431
  },
10417
- [As.id]: {
10432
+ [us.id]: {
10418
10433
  order: 2,
10419
10434
  menuItemFactory: zu
10420
10435
  },
10421
- [as.id]: {
10436
+ [cs.id]: {
10422
10437
  order: 3,
10423
10438
  menuItemFactory: Gu
10424
10439
  }
@@ -10431,7 +10446,7 @@ var pg = Object.getOwnPropertyDescriptor, mg = (n, e, t, o) => {
10431
10446
  (i = n[s]) && (r = i(r) || r);
10432
10447
  return r;
10433
10448
  }, st = (n, e) => (t, o) => e(t, o, n);
10434
- let uo = class extends pe {
10449
+ let uo = class extends me {
10435
10450
  constructor(n, e, t, o, r, s, i, a, c) {
10436
10451
  super(), this._injector = n, this._componentManager = e, this._commandService = t, this._layoutService = o, this._menuManagerService = r, this._uiPartsService = s, this._univerInstanceService = i, this._shortcutService = a, this._configService = c, this._init();
10437
10452
  }
@@ -10452,7 +10467,7 @@ let uo = class extends pe {
10452
10467
  });
10453
10468
  }
10454
10469
  _initUiParts() {
10455
- this.disposeWithMe(this._uiPartsService.registerComponent(Ks.FOOTER, () => qs(Bh, this._injector))), this.disposeWithMe(this._uiPartsService.registerComponent(Ks.CONTENT, () => qs(Qh, this._injector)));
10470
+ this.disposeWithMe(this._uiPartsService.registerComponent(qs.FOOTER, () => Xs(Bh, this._injector))), this.disposeWithMe(this._uiPartsService.registerComponent(qs.CONTENT, () => Xs(Qh, this._injector)));
10456
10471
  }
10457
10472
  _initMenus() {
10458
10473
  this._menuManagerService.mergeMenu(fg);
@@ -10482,8 +10497,8 @@ let uo = class extends pe {
10482
10497
  _initCommands() {
10483
10498
  [
10484
10499
  uc,
10485
- Bs,
10486
- Ts
10500
+ Ms,
10501
+ Bs
10487
10502
  ].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
10488
10503
  }
10489
10504
  _initFocusHandler() {
@@ -10503,20 +10518,20 @@ uo = mg([
10503
10518
  st(5, kl),
10504
10519
  st(6, L),
10505
10520
  st(7, To),
10506
- st(8, Vr)
10521
+ st(8, Wr)
10507
10522
  ], uo);
10508
10523
  var Eg = Object.getOwnPropertyDescriptor, Ig = (n, e, t, o) => {
10509
10524
  for (var r = o > 1 ? void 0 : o ? Eg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10510
10525
  (i = n[s]) && (r = i(r) || r);
10511
10526
  return r;
10512
10527
  }, rr = (n, e) => (t, o) => e(t, o, n);
10513
- const Li = 1.5;
10514
- let ho = class extends St {
10528
+ const Qi = 1.5;
10529
+ let ho = class extends Ct {
10515
10530
  constructor(n, e, t, o) {
10516
10531
  super(), this._context = n, this._textSelectionManagerService = e, this._editorService = t, this._docSkeletonManagerService = o, this._init();
10517
10532
  }
10518
10533
  _init() {
10519
- this._textSelectionManagerService.textSelection$.pipe(ft(this.dispose$)).subscribe((n) => {
10534
+ this._textSelectionManagerService.textSelection$.pipe(pt(this.dispose$)).subscribe((n) => {
10520
10535
  if (n == null)
10521
10536
  return;
10522
10537
  const { isEditing: e, unitId: t } = n;
@@ -10535,7 +10550,7 @@ let ho = class extends St {
10535
10550
  const { unitId: e, scene: t, mainComponent: o } = this._context, r = this._docSkeletonManagerService.getSkeleton();
10536
10551
  if (o == null || r == null)
10537
10552
  return;
10538
- const s = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new mt(s, r), { contentBoxPointGroup: d } = c.getRangePointData(n, n), { left: l, top: A, height: h } = $n(d), u = l + i, g = A + a, f = t.getViewport(je.VIEW_MAIN), p = this._editorService.getEditor(e);
10553
+ const s = o.getOffsetConfig(), { docsLeft: i, docsTop: a } = s, c = new It(s, r), { contentBoxPointGroup: d } = c.getRangePointData(n, n), { left: l, top: A, height: h } = $n(d), u = l + i, g = A + a, f = t.getViewport(je.VIEW_MAIN), p = this._editorService.getEditor(e);
10539
10554
  if (f == null)
10540
10555
  return;
10541
10556
  const {
@@ -10546,7 +10561,7 @@ let ho = class extends St {
10546
10561
  } = f.getBounding().viewBound;
10547
10562
  let R = 0, E = 0;
10548
10563
  const b = p ? (C = p.params.backScrollOffset) != null ? C : 0 : 100;
10549
- g < I ? R = g - I - b : g > v - h && (R = g - v + h + b), u < m ? E = u - m : u > S - Li && (E = u - S + Li);
10564
+ g < I ? R = g - I - b : g > v - h && (R = g - v + h + b), u < m ? E = u - m : u > S - Qi && (E = u - S + Qi);
10550
10565
  const y = f.transViewportScroll2ScrollValue(E, R);
10551
10566
  f.scrollByBarDeltaValue(y);
10552
10567
  }
@@ -10569,7 +10584,7 @@ var Sg = Object.getOwnPropertyDescriptor, vg = (n, e, t, o) => {
10569
10584
  (i = n[s]) && (r = i(r) || r);
10570
10585
  return r;
10571
10586
  }, zt = (n, e) => (t, o) => e(t, o, n);
10572
- let br = class extends St {
10587
+ let br = class extends Ct {
10573
10588
  constructor(n, e, t, o, r, s, i) {
10574
10589
  super(), this._context = n, this._commandService = e, this._docSelectionRenderService = t, this._docSkeletonManagerService = o, this._editorService = r, this._renderManagerService = s, this._univerInstanceService = i, this._addNewRender(), this._initRenderRefresh(), this._initCommandListener();
10575
10590
  }
@@ -10606,8 +10621,8 @@ let br = class extends St {
10606
10621
  } else
10607
10622
  t.onMouseWheel(a, s);
10608
10623
  }), new lr(t), n.addLayer(
10609
- new zs(n, [], zo),
10610
- new zs(n, [], cd)
10624
+ new Gs(n, [], zo),
10625
+ new Gs(n, [], cd)
10611
10626
  ), this._addComponent();
10612
10627
  const o = () => n.render();
10613
10628
  this.disposeWithMe(this._context.activated$.subscribe((r) => {
@@ -10619,12 +10634,12 @@ let br = class extends St {
10619
10634
  pageMarginLeft: 20,
10620
10635
  pageMarginTop: 20
10621
10636
  }, i = new gl(et.MAIN, void 0, s);
10622
- i.zIndex = Js;
10637
+ i.zIndex = $s;
10623
10638
  const a = new fl(et.BACKGROUND, void 0, s);
10624
- a.zIndex = Js, this._context.mainComponent = i, t.set(et.MAIN, i), t.set(et.BACKGROUND, a), n.addObjects([i], zo), n.addObjects([a], ad), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(zo);
10639
+ a.zIndex = $s, this._context.mainComponent = i, t.set(et.MAIN, i), t.set(et.BACKGROUND, a), n.addObjects([i], zo), n.addObjects([a], ad), this._editorService.getEditor(e.getUnitId()) == null && n.enableLayerCache(zo);
10625
10640
  }
10626
10641
  _initRenderRefresh() {
10627
- this._docSkeletonManagerService.currentSkeletonBefore$.pipe(ft(this.dispose$)).subscribe((n) => {
10642
+ this._docSkeletonManagerService.currentSkeletonBefore$.pipe(pt(this.dispose$)).subscribe((n) => {
10628
10643
  this._create(n);
10629
10644
  });
10630
10645
  }
@@ -10736,14 +10751,14 @@ let yr = class {
10736
10751
  yr = bg([
10737
10752
  sr(0, j(Ke)),
10738
10753
  sr(1, j(Pn)),
10739
- sr(2, Vr)
10754
+ sr(2, Wr)
10740
10755
  ], yr);
10741
10756
  var yg = Object.getOwnPropertyDescriptor, xg = (n, e, t, o) => {
10742
10757
  for (var r = o > 1 ? void 0 : o ? yg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10743
10758
  (i = n[s]) && (r = i(r) || r);
10744
10759
  return r;
10745
10760
  }, Og = (n, e) => (t, o) => e(t, o, n);
10746
- let go = class extends St {
10761
+ let go = class extends Ct {
10747
10762
  constructor(e) {
10748
10763
  super();
10749
10764
  O(this, "_docContainerController");
@@ -10757,8 +10772,8 @@ var Tg = Object.getOwnPropertyDescriptor, Bg = (n, e, t, o) => {
10757
10772
  for (var r = o > 1 ? void 0 : o ? Tg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
10758
10773
  (i = n[s]) && (r = i(r) || r);
10759
10774
  return r;
10760
- }, Qi = (n, e) => (t, o) => e(t, o, n);
10761
- let fo = class extends pe {
10775
+ }, Ui = (n, e) => (t, o) => e(t, o, n);
10776
+ let fo = class extends me {
10762
10777
  constructor(n, e) {
10763
10778
  super(), this._docAutoFormatService = n, this._renderManagerService = e, this._initListTabAutoFormat(), this._initSpaceAutoFormat(), this._initDefaultEnterFormat(), this._initExitListAutoFormat();
10764
10779
  }
@@ -10882,7 +10897,7 @@ let fo = class extends pe {
10882
10897
  match: () => !0,
10883
10898
  getMutations() {
10884
10899
  return [{
10885
- id: Gr.id
10900
+ id: Yr.id
10886
10901
  }];
10887
10902
  },
10888
10903
  priority: -9999
@@ -10891,8 +10906,8 @@ let fo = class extends pe {
10891
10906
  }
10892
10907
  };
10893
10908
  fo = Bg([
10894
- Qi(0, j(_t)),
10895
- Qi(1, fe)
10909
+ Ui(0, j(Dt)),
10910
+ Ui(1, fe)
10896
10911
  ], fo);
10897
10912
  function Mg(n) {
10898
10913
  return n.rows[0].cells[0].sections[0].columns[0].lines[0];
@@ -10911,7 +10926,7 @@ function Dg(n, e) {
10911
10926
  }
10912
10927
  return r;
10913
10928
  }
10914
- function Ui(n) {
10929
+ function Fi(n) {
10915
10930
  const e = n == null ? void 0 : n.parent;
10916
10931
  let t = null, o = null;
10917
10932
  if (n == null || e == null)
@@ -11004,7 +11019,7 @@ var Lg = Object.getOwnPropertyDescriptor, Qg = (n, e, t, o) => {
11004
11019
  (i = n[s]) && (r = i(r) || r);
11005
11020
  return r;
11006
11021
  }, zn = (n, e) => (t, o) => e(t, o, n);
11007
- let po = class extends pe {
11022
+ let po = class extends me {
11008
11023
  constructor(e, t, o, r) {
11009
11024
  super();
11010
11025
  O(this, "_onInputSubscription");
@@ -11015,16 +11030,16 @@ let po = class extends pe {
11015
11030
  super.dispose(), (e = this._onInputSubscription) == null || e.unsubscribe();
11016
11031
  }
11017
11032
  _commandExecutedListener() {
11018
- const e = [Et.id, It.id];
11033
+ const e = [St.id, vt.id];
11019
11034
  this.disposeWithMe(
11020
11035
  this._commandService.onCommandExecuted((t) => {
11021
11036
  if (!e.includes(t.id))
11022
11037
  return;
11023
11038
  const o = t.params;
11024
11039
  switch (t.id) {
11025
- case Et.id:
11040
+ case St.id:
11026
11041
  return this._handleMoveCursor(o.direction);
11027
- case It.id:
11042
+ case vt.id:
11028
11043
  return this._handleShiftMoveSelection(o.direction);
11029
11044
  default:
11030
11045
  throw new Error("Unknown command");
@@ -11092,7 +11107,7 @@ let po = class extends pe {
11092
11107
  ], !1);
11093
11108
  return;
11094
11109
  }
11095
- const B = new mt(b, s).getRangePointData(
11110
+ const B = new It(b, s).getRangePointData(
11096
11111
  C,
11097
11112
  C
11098
11113
  ).cursorList[0];
@@ -11171,7 +11186,7 @@ let po = class extends pe {
11171
11186
  ], !1);
11172
11187
  return;
11173
11188
  }
11174
- const B = new mt(y, s).getRangePointData(
11189
+ const B = new It(y, s).getRangePointData(
11175
11190
  C,
11176
11191
  C
11177
11192
  ).cursorList[0];
@@ -11229,7 +11244,7 @@ let po = class extends pe {
11229
11244
  return;
11230
11245
  let l;
11231
11246
  if (c.type === Oe.CELL && o) {
11232
- const x = Fi(c, t);
11247
+ const x = Hi(c, t);
11233
11248
  if (x)
11234
11249
  return x;
11235
11250
  }
@@ -11273,7 +11288,7 @@ let po = class extends pe {
11273
11288
  if (l != null)
11274
11289
  return l;
11275
11290
  if (c.type === Oe.CELL)
11276
- return Fi(c, t);
11291
+ return Hi(c, t);
11277
11292
  const u = c.parent;
11278
11293
  if (u == null)
11279
11294
  return;
@@ -11311,7 +11326,7 @@ po = Qg([
11311
11326
  zn(2, j(Y)),
11312
11327
  zn(3, T)
11313
11328
  ], po);
11314
- function Fi(n, e) {
11329
+ function Hi(n, e) {
11315
11330
  var o, r;
11316
11331
  let t = null;
11317
11332
  if (e === !0) {
@@ -11319,7 +11334,7 @@ function Fi(n, e) {
11319
11334
  if (s)
11320
11335
  t = wg(s);
11321
11336
  else {
11322
- const i = (o = n.parent) == null ? void 0 : o.parent, { lineAfterTable: a } = Ui(i);
11337
+ const i = (o = n.parent) == null ? void 0 : o.parent, { lineAfterTable: a } = Fi(i);
11323
11338
  a && (t = a);
11324
11339
  }
11325
11340
  } else {
@@ -11327,7 +11342,7 @@ function Fi(n, e) {
11327
11342
  if (s)
11328
11343
  t = Ng(s);
11329
11344
  else {
11330
- const i = (r = n.parent) == null ? void 0 : r.parent, { lineBeforeTable: a } = Ui(i);
11345
+ const i = (r = n.parent) == null ? void 0 : r.parent, { lineBeforeTable: a } = Fi(i);
11331
11346
  a && (t = a);
11332
11347
  }
11333
11348
  }
@@ -11337,7 +11352,7 @@ const Ug = ({
11337
11352
  handleRowColChange: n,
11338
11353
  tableCreateParams: e
11339
11354
  }) => {
11340
- const t = J(Ke), [o, r] = me(3), [s, i] = me(5);
11355
+ const t = J(Ke), [o, r] = Ee(3), [s, i] = Ee(5);
11341
11356
  function a(c, d) {
11342
11357
  r(c), i(d), n(c, d);
11343
11358
  }
@@ -11382,8 +11397,8 @@ var Fg = Object.getOwnPropertyDescriptor, Hg = (n, e, t, o) => {
11382
11397
  for (var r = o > 1 ? void 0 : o ? Fg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11383
11398
  (i = n[s]) && (r = i(r) || r);
11384
11399
  return r;
11385
- }, Hi = (n, e) => (t, o) => e(t, o, n);
11386
- let mo = class extends pe {
11400
+ }, ki = (n, e) => (t, o) => e(t, o, n);
11401
+ let mo = class extends me {
11387
11402
  constructor(n, e) {
11388
11403
  super(), this._commandService = n, this._componentManager = e, this._initialize();
11389
11404
  }
@@ -11392,7 +11407,7 @@ let mo = class extends pe {
11392
11407
  }
11393
11408
  _registerCommands() {
11394
11409
  [
11395
- Os
11410
+ Ts
11396
11411
  ].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
11397
11412
  }
11398
11413
  _initCustomComponents() {
@@ -11403,15 +11418,15 @@ let mo = class extends pe {
11403
11418
  }
11404
11419
  };
11405
11420
  mo = Hg([
11406
- Hi(0, T),
11407
- Hi(1, j(sn))
11421
+ ki(0, T),
11422
+ ki(1, j(sn))
11408
11423
  ], mo);
11409
11424
  var kg = Object.getOwnPropertyDescriptor, Vg = (n, e, t, o) => {
11410
11425
  for (var r = o > 1 ? void 0 : o ? kg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11411
11426
  (i = n[s]) && (r = i(r) || r);
11412
11427
  return r;
11413
11428
  }, Gn = (n, e) => (t, o) => e(t, o, n);
11414
- let xr = class extends pe {
11429
+ let xr = class extends me {
11415
11430
  constructor(n, e, t, o, r) {
11416
11431
  super(), this._context = n, this._docSkeletonManagerService = e, this._commandService = t, this._docEventManagerService = o, this._textSelectionManagerService = r, this._initPointerDownObserver(), this._initHoverCursor();
11417
11432
  }
@@ -11428,7 +11443,7 @@ let xr = class extends pe {
11428
11443
  _initHoverCursor() {
11429
11444
  this.disposeWithMe(
11430
11445
  this._docEventManagerService.hoverBullet$.subscribe((n) => {
11431
- n ? this._context.mainComponent.setCursor(Mt.POINTER) : this._context.mainComponent.setCursor(Mt.TEXT);
11446
+ n ? this._context.mainComponent.setCursor(_t.POINTER) : this._context.mainComponent.setCursor(_t.TEXT);
11432
11447
  })
11433
11448
  );
11434
11449
  }
@@ -11449,7 +11464,7 @@ var Wg = Object.getOwnPropertyDescriptor, jg = (n, e, t, o) => {
11449
11464
  (i = n[s]) && (r = i(r) || r);
11450
11465
  return r;
11451
11466
  }, un = (n, e) => (t, o) => e(t, o, n);
11452
- let Eo = class extends St {
11467
+ let Eo = class extends Ct {
11453
11468
  constructor(n, e, t, o, r, s) {
11454
11469
  super(), this._context = n, this._commandService = e, this._docClipboardService = t, this._docSelectionRenderService = o, this._contextService = r, this._editorService = s, this._init();
11455
11470
  }
@@ -11458,7 +11473,7 @@ let Eo = class extends St {
11458
11473
  }
11459
11474
  _initLegacyPasteCommand() {
11460
11475
  var n;
11461
- (n = this._docSelectionRenderService) == null || n.onPaste$.pipe(ft(this.dispose$)).subscribe((e) => {
11476
+ (n = this._docSelectionRenderService) == null || n.onPaste$.pipe(pt(this.dispose$)).subscribe((e) => {
11462
11477
  var a, c, d;
11463
11478
  if (!Po(this._contextService))
11464
11479
  return;
@@ -11481,14 +11496,14 @@ var zg = Object.getOwnPropertyDescriptor, Gg = (n, e, t, o) => {
11481
11496
  for (var r = o > 1 ? void 0 : o ? zg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11482
11497
  (i = n[s]) && (r = i(r) || r);
11483
11498
  return r;
11484
- }, ki = (n, e) => (t, o) => e(t, o, n);
11499
+ }, Vi = (n, e) => (t, o) => e(t, o, n);
11485
11500
  const Yg = [
11486
- qi,
11501
+ Xi,
11487
11502
  Yc,
11488
11503
  yo,
11489
11504
  ot
11490
11505
  ];
11491
- let Or = class extends pe {
11506
+ let Or = class extends me {
11492
11507
  constructor(n, e, t) {
11493
11508
  super(), this._context = n, this._contextMenuService = e, this._commandService = t, Yg.includes(this._context.unitId) || (this._initPointerDown(), this._initEditChange());
11494
11509
  }
@@ -11508,15 +11523,15 @@ let Or = class extends pe {
11508
11523
  }
11509
11524
  };
11510
11525
  Or = Gg([
11511
- ki(1, Wl),
11512
- ki(2, T)
11526
+ Vi(1, Wl),
11527
+ Vi(2, T)
11513
11528
  ], Or);
11514
11529
  var Kg = Object.getOwnPropertyDescriptor, qg = (n, e, t, o) => {
11515
11530
  for (var r = o > 1 ? void 0 : o ? Kg(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11516
11531
  (i = n[s]) && (r = i(r) || r);
11517
11532
  return r;
11518
11533
  }, Gt = (n, e) => (t, o) => e(t, o, n);
11519
- let Io = class extends pe {
11534
+ let Io = class extends me {
11520
11535
  constructor(e, t, o, r, s, i, a) {
11521
11536
  super();
11522
11537
  O(this, "_initialEditors", /* @__PURE__ */ new Set());
@@ -11621,7 +11636,7 @@ var Xg = Object.getOwnPropertyDescriptor, Zg = (n, e, t, o) => {
11621
11636
  (i = n[s]) && (r = i(r) || r);
11622
11637
  return r;
11623
11638
  }, Yn = (n, e) => (t, o) => e(t, o, n);
11624
- let Tr = class extends pe {
11639
+ let Tr = class extends me {
11625
11640
  constructor(e, t, o, r, s) {
11626
11641
  super();
11627
11642
  O(this, "_previousIMEContent", "");
@@ -11687,7 +11702,7 @@ var Jg = Object.getOwnPropertyDescriptor, $g = (n, e, t, o) => {
11687
11702
  (i = n[s]) && (r = i(r) || r);
11688
11703
  return r;
11689
11704
  }, Kn = (n, e) => (t, o) => e(t, o, n);
11690
- let Br = class extends pe {
11705
+ let Br = class extends me {
11691
11706
  constructor(e, t, o, r, s) {
11692
11707
  super();
11693
11708
  O(this, "_onInputSubscription");
@@ -11708,7 +11723,7 @@ let Br = class extends pe {
11708
11723
  const { unitId: t } = this._context, { event: o, content: r = "", activeRange: s } = e, i = o, a = this._docSkeletonManagerService.getSkeleton();
11709
11724
  if (i.data == null || a == null || s == null)
11710
11725
  return;
11711
- const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = jr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, In.includes(t)), g = Bo(l, s.endOffset, A, h, In.includes(t)), f = zr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
11726
+ const { segmentId: c } = s, l = this._context.unit.getSelfOrHeaderFooterModel(c).getBody(), A = this._docMenuStyleService.getDefaultStyle(), h = this._docMenuStyleService.getStyleCache(), u = zr((p = l == null ? void 0 : l.customRanges) != null ? p : [], s.endOffset, In.includes(t)), g = Bo(l, s.endOffset, A, h, In.includes(t)), f = Gr((m = l == null ? void 0 : l.customDecorations) != null ? m : [], s.endOffset);
11712
11727
  await this._commandService.executeCommand(Ca.id, {
11713
11728
  unitId: t,
11714
11729
  body: {
@@ -11743,13 +11758,13 @@ Br = $g([
11743
11758
  Kn(3, T),
11744
11759
  Kn(4, j(at))
11745
11760
  ], Br);
11746
- class ws extends pe {
11761
+ class Ns extends me {
11747
11762
  constructor(e) {
11748
11763
  super(), this._context = e;
11749
11764
  }
11750
11765
  calculatePagePosition() {
11751
11766
  var v, R;
11752
- const e = pt(this._context), o = (R = (v = this._context.unit.getSettings()) == null ? void 0 : v.zoomRatio) != null ? R : 1, { document: r, scene: s, docBackground: i } = e, a = s == null ? void 0 : s.getParent(), { width: c, height: d, pageMarginLeft: l, pageMarginTop: A } = r;
11767
+ const e = mt(this._context), o = (R = (v = this._context.unit.getSettings()) == null ? void 0 : v.zoomRatio) != null ? R : 1, { document: r, scene: s, docBackground: i } = e, a = s == null ? void 0 : s.getParent(), { width: c, height: d, pageMarginLeft: l, pageMarginTop: A } = r;
11753
11768
  if (a == null || c === Number.POSITIVE_INFINITY || d === Number.POSITIVE_INFINITY)
11754
11769
  return;
11755
11770
  const { width: h, height: u } = a;
@@ -11765,17 +11780,17 @@ var ef = Object.getOwnPropertyDescriptor, tf = (n, e, t, o) => {
11765
11780
  for (var r = o > 1 ? void 0 : o ? ef(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11766
11781
  (i = n[s]) && (r = i(r) || r);
11767
11782
  return r;
11768
- }, Vi = (n, e) => (t, o) => e(t, o, n);
11769
- let Mr = class extends pe {
11783
+ }, Wi = (n, e) => (t, o) => e(t, o, n);
11784
+ let Mr = class extends me {
11770
11785
  constructor(n, e, t) {
11771
11786
  super(), this._context = n, this._docPageLayoutService = e, this._textSelectionManagerService = t;
11772
11787
  const o = this._context.unitId;
11773
- if (vt(o) && o !== ot) return this;
11788
+ if (Rt(o) && o !== ot) return this;
11774
11789
  this._initResize();
11775
11790
  }
11776
11791
  _initResize() {
11777
11792
  this.disposeWithMe(
11778
- Bt(this._context.engine.onTransformChange$).pipe(
11793
+ Mt(this._context.engine.onTransformChange$).pipe(
11779
11794
  ro((n) => n.type === oa.resize),
11780
11795
  bn(0, Kl)
11781
11796
  ).subscribe(() => {
@@ -11785,15 +11800,15 @@ let Mr = class extends pe {
11785
11800
  }
11786
11801
  };
11787
11802
  Mr = tf([
11788
- Vi(1, j(ws)),
11789
- Vi(2, j(Y))
11803
+ Wi(1, j(Ns)),
11804
+ Wi(2, j(Y))
11790
11805
  ], Mr);
11791
11806
  var nf = Object.getOwnPropertyDescriptor, of = (n, e, t, o) => {
11792
11807
  for (var r = o > 1 ? void 0 : o ? nf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11793
11808
  (i = n[s]) && (r = i(r) || r);
11794
11809
  return r;
11795
11810
  }, Yt = (n, e) => (t, o) => e(t, o, n);
11796
- let _r = class extends pe {
11811
+ let _r = class extends me {
11797
11812
  constructor(e, t, o, r, s, i, a) {
11798
11813
  super();
11799
11814
  O(this, "_loadedMap", /* @__PURE__ */ new WeakSet());
@@ -11803,7 +11818,7 @@ let _r = class extends pe {
11803
11818
  this._init(), this._skeletonListener(), this._commandExecutedListener(), this._refreshListener(), this._syncSelection();
11804
11819
  }
11805
11820
  _init() {
11806
- const { unitId: e } = this._context, t = pt(this._context);
11821
+ const { unitId: e } = this._context, t = mt(this._context);
11807
11822
  t == null || t.document == null || this._loadedMap.has(t.document) || (this._initialMain(e), this._loadedMap.add(t.document));
11808
11823
  }
11809
11824
  _refreshListener() {
@@ -11828,11 +11843,11 @@ let _r = class extends pe {
11828
11843
  }
11829
11844
  // eslint-disable-next-line max-lines-per-function
11830
11845
  _initialMain(e) {
11831
- const t = pt(this._context), { document: o, scene: r } = t;
11846
+ const t = mt(this._context), { document: o, scene: r } = t;
11832
11847
  this.disposeWithMe(o.onPointerEnter$.subscribeEvent(() => {
11833
- this._isEditorReadOnly(e) || (o.cursor = Mt.TEXT);
11848
+ this._isEditorReadOnly(e) || (o.cursor = _t.TEXT);
11834
11849
  })), this.disposeWithMe(o.onPointerLeave$.subscribeEvent(() => {
11835
- o.cursor = Mt.DEFAULT, r.resetCursor();
11850
+ o.cursor = _t.DEFAULT, r.resetCursor();
11836
11851
  })), this.disposeWithMe(o.onPointerDown$.subscribeEvent((s, i) => {
11837
11852
  if (this._isEditorReadOnly(e))
11838
11853
  return;
@@ -11867,7 +11882,7 @@ let _r = class extends pe {
11867
11882
  }));
11868
11883
  }
11869
11884
  _getTransformCoordForDocumentOffset(e, t) {
11870
- const o = pt(this._context), { document: r, scene: s } = o, { documentTransform: i } = r.getOffsetConfig(), a = s.getViewports()[0];
11885
+ const o = mt(this._context), { document: r, scene: s } = o, { documentTransform: i } = r.getOffsetConfig(), a = s.getViewports()[0];
11871
11886
  if (a == null)
11872
11887
  return;
11873
11888
  const c = a.transformVector2SceneCoord(Cn.FromArray([e, t]));
@@ -11898,7 +11913,7 @@ let _r = class extends pe {
11898
11913
  this.disposeWithMe(this._docSkeletonManagerService.currentSkeleton$.subscribe((e) => {
11899
11914
  if (!e) return;
11900
11915
  const { unitId: t } = this._context;
11901
- if (!vt(t)) {
11916
+ if (!Rt(t)) {
11902
11917
  this._docSelectionRenderService.focus();
11903
11918
  const s = this._context.unit.getSnapshot(), i = Ac(s);
11904
11919
  this._docSelectionManagerService.replaceDocRanges([
@@ -11926,14 +11941,14 @@ var rf = Object.getOwnPropertyDescriptor, sf = (n, e, t, o) => {
11926
11941
  for (var r = o > 1 ? void 0 : o ? rf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
11927
11942
  (i = n[s]) && (r = i(r) || r);
11928
11943
  return r;
11929
- }, ht = (n, e) => (t, o) => e(t, o, n);
11930
- let Dr = class extends pe {
11944
+ }, gt = (n, e) => (t, o) => e(t, o, n);
11945
+ let Dr = class extends me {
11931
11946
  constructor(e, t, o, r, s, i, a, c, d) {
11932
11947
  super();
11933
11948
  O(this, "_isSheetEditor", !1);
11934
11949
  this._context = e, this._contextService = t, this._docSkeletonManagerService = o, this._univerInstanceService = r, this._commandService = s, this._textSelectionManagerService = i, this._editorService = a, this._docPageLayoutService = c, this._renderManagerService = d, this._initSkeletonListener(), this._initCommandExecutedListener(), this._initRenderRefresher(), this._isSheetEditor = this._context.unitId === yo;
11935
11950
  const l = this._univerInstanceService.getCurrentUnitOfType(_.UNIVER_SHEET), A = l && this._renderManagerService.getRenderById(l.getUnitId());
11936
- setTimeout(() => this.updateViewZoom(A && this._isSheetEditor ? A.scene.scaleX : 1, !0), 20), vt(this._context.unitId) || this._initZoomEventListener();
11951
+ setTimeout(() => this.updateViewZoom(A && this._isSheetEditor ? A.scene.scaleX : 1, !0), 20), Rt(this._context.unitId) || this._initZoomEventListener();
11937
11952
  }
11938
11953
  _initRenderRefresher() {
11939
11954
  this._docSkeletonManagerService.currentSkeleton$.subscribe((e) => {
@@ -11990,7 +12005,7 @@ let Dr = class extends pe {
11990
12005
  }
11991
12006
  updateViewZoom(e, t = !0) {
11992
12007
  var r;
11993
- const o = pt(this._context);
12008
+ const o = mt(this._context);
11994
12009
  o.scene.scale(e, e), this._editorService.isEditor(this._context.unitId) || this._docPageLayoutService.calculatePagePosition(), t && !this._editorService.isEditor(this._context.unitId) && this._textSelectionManagerService.refreshSelection(), (r = o.scene.getTransformer()) == null || r.clearSelectedObjects();
11995
12010
  }
11996
12011
  _initZoomEventListener() {
@@ -12014,17 +12029,17 @@ let Dr = class extends pe {
12014
12029
  }
12015
12030
  };
12016
12031
  Dr = sf([
12017
- ht(1, Fr),
12018
- ht(2, j(de)),
12019
- ht(3, L),
12020
- ht(4, T),
12021
- ht(5, j(Y)),
12022
- ht(6, Ye),
12023
- ht(7, j(ws)),
12024
- ht(8, fe)
12032
+ gt(1, Fr),
12033
+ gt(2, j(de)),
12034
+ gt(3, L),
12035
+ gt(4, T),
12036
+ gt(5, j(Y)),
12037
+ gt(6, Ye),
12038
+ gt(7, j(Ns)),
12039
+ gt(8, fe)
12025
12040
  ], Dr);
12026
12041
  const af = Ji("PRINTING_COMPONENT_COLLECT"), cf = Ji("PRINTING_DOM_COLLECT");
12027
- class lf extends pe {
12042
+ class lf extends me {
12028
12043
  constructor() {
12029
12044
  super();
12030
12045
  O(this, "_printComponentMap", /* @__PURE__ */ new Map());
@@ -12052,8 +12067,8 @@ var df = Object.getOwnPropertyDescriptor, Af = (n, e, t, o) => {
12052
12067
  (i = n[s]) && (r = i(r) || r);
12053
12068
  return r;
12054
12069
  }, hn = (n, e) => (t, o) => e(t, o, n);
12055
- const Wi = 300;
12056
- let So = class extends St {
12070
+ const ji = 300;
12071
+ let So = class extends Ct {
12057
12072
  constructor(e, t, o, r, s) {
12058
12073
  super();
12059
12074
  O(this, "_docStateChange$", new Fe(null));
@@ -12082,7 +12097,7 @@ let So = class extends St {
12082
12097
  _initialize() {
12083
12098
  this.disposeWithMe(
12084
12099
  this._commandService.beforeCommandExecuted((e) => {
12085
- if (e.id === Fs || e.id === Hs) {
12100
+ if (e.id === Hs || e.id === ks) {
12086
12101
  const t = this._univerInstanceService.getCurrentUniverDocInstance();
12087
12102
  if (t == null)
12088
12103
  return;
@@ -12093,7 +12108,7 @@ let So = class extends St {
12093
12108
  );
12094
12109
  }
12095
12110
  _listenDocStateChange() {
12096
- this._docStateEmitService.docStateChangeParams$.pipe(ft(this.dispose$)).subscribe((e) => {
12111
+ this._docStateEmitService.docStateChangeParams$.pipe(pt(this.dispose$)).subscribe((e) => {
12097
12112
  var a;
12098
12113
  if (e == null)
12099
12114
  return;
@@ -12112,7 +12127,7 @@ let So = class extends St {
12112
12127
  }
12113
12128
  _cacheChangeState(e, t = "history") {
12114
12129
  const { trigger: o, unitId: r, noHistory: s, debounce: i = !1 } = e;
12115
- if (s || o == null || t === "history" && (o === Hs || o === Fs))
12130
+ if (s || o == null || t === "history" && (o === ks || o === Hs))
12116
12131
  return;
12117
12132
  const a = t === "history" ? this._historyStateCache : this._changeStateCache, c = t === "history" ? this._pushHistory.bind(this) : this._emitChangeState.bind(this);
12118
12133
  if (a.has(r)) {
@@ -12122,9 +12137,9 @@ let So = class extends St {
12122
12137
  a.set(r, [e]);
12123
12138
  i ? t === "history" ? (this._historyTimer && clearTimeout(this._historyTimer), this._historyTimer = setTimeout(() => {
12124
12139
  c(r);
12125
- }, Wi)) : (this._changeStateCacheTimer && clearTimeout(this._changeStateCacheTimer), this._changeStateCacheTimer = setTimeout(() => {
12140
+ }, ji)) : (this._changeStateCacheTimer && clearTimeout(this._changeStateCacheTimer), this._changeStateCacheTimer = setTimeout(() => {
12126
12141
  c(r);
12127
- }, Wi)) : c(r);
12142
+ }, ji)) : c(r);
12128
12143
  }
12129
12144
  _pushHistory(e) {
12130
12145
  const t = this._undoRedoService, o = this._historyStateCache.get(e);
@@ -12183,20 +12198,20 @@ var uf = Object.getOwnPropertyDescriptor, hf = (n, e, t, o) => {
12183
12198
  for (var r = o > 1 ? void 0 : o ? uf(e, t) : e, s = n.length - 1, i; s >= 0; s--)
12184
12199
  (i = n[s]) && (r = i(r) || r);
12185
12200
  return r;
12186
- }, ji = (n, e) => (t, o) => e(t, o, n);
12187
- const zi = "univer-doc-main-canvas";
12188
- let vo = class extends St {
12201
+ }, zi = (n, e) => (t, o) => e(t, o, n);
12202
+ const Gi = "univer-doc-main-canvas";
12203
+ let vo = class extends Ct {
12189
12204
  constructor(n, e) {
12190
12205
  super(), this._instanceSrv = n, this._renderManagerService = e, this._init();
12191
12206
  }
12192
12207
  _init() {
12193
- this._renderManagerService.createRender$.pipe(ft(this.dispose$)).subscribe((n) => this._createRenderWithId(n)), this._instanceSrv.getAllUnitsForType(_.UNIVER_DOC).forEach((n) => this._createRenderer(n)), this._instanceSrv.getTypeOfUnitAdded$(_.UNIVER_DOC).pipe(ft(this.dispose$)).subscribe((n) => this._createRenderer(n)), this._instanceSrv.getTypeOfUnitDisposed$(_.UNIVER_DOC).pipe(ft(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
12208
+ this._renderManagerService.createRender$.pipe(pt(this.dispose$)).subscribe((n) => this._createRenderWithId(n)), this._instanceSrv.getAllUnitsForType(_.UNIVER_DOC).forEach((n) => this._createRenderer(n)), this._instanceSrv.getTypeOfUnitAdded$(_.UNIVER_DOC).pipe(pt(this.dispose$)).subscribe((n) => this._createRenderer(n)), this._instanceSrv.getTypeOfUnitDisposed$(_.UNIVER_DOC).pipe(pt(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
12194
12209
  }
12195
12210
  _createRenderer(n) {
12196
12211
  var o;
12197
12212
  const e = n.getUnitId(), t = (o = this._instanceSrv.getCurrentUnitForType(_.UNIVER_DOC)) == null ? void 0 : o.getUnitId();
12198
12213
  this._renderManagerService.created$.subscribe((r) => {
12199
- r.unitId === t && (r.engine.getCanvas().setId(zi), r.engine.getCanvas().getContext().setId(zi));
12214
+ r.unitId === t && (r.engine.getCanvas().setId(Gi), r.engine.getCanvas().getContext().setId(Gi));
12200
12215
  }), this._renderManagerService.has(e) || this._createRenderWithId(e);
12201
12216
  }
12202
12217
  _createRenderWithId(n) {
@@ -12208,8 +12223,8 @@ let vo = class extends St {
12208
12223
  }
12209
12224
  };
12210
12225
  vo = hf([
12211
- ji(0, L),
12212
- ji(1, fe)
12226
+ zi(0, L),
12227
+ zi(1, fe)
12213
12228
  ], vo);
12214
12229
  const gf = {
12215
12230
  id: yn.id,
@@ -12224,56 +12239,56 @@ const gf = {
12224
12239
  preconditions: Se,
12225
12240
  binding: q.DELETE
12226
12241
  }, mf = {
12227
- id: Et.id,
12242
+ id: St.id,
12228
12243
  binding: q.ARROW_UP,
12229
12244
  preconditions: Se,
12230
12245
  staticParameters: {
12231
12246
  direction: le.UP
12232
12247
  }
12233
12248
  }, Ef = {
12234
- id: Et.id,
12249
+ id: St.id,
12235
12250
  binding: q.ARROW_DOWN,
12236
12251
  preconditions: Se,
12237
12252
  staticParameters: {
12238
12253
  direction: le.DOWN
12239
12254
  }
12240
12255
  }, If = {
12241
- id: Et.id,
12256
+ id: St.id,
12242
12257
  binding: q.ARROW_LEFT,
12243
12258
  preconditions: Se,
12244
12259
  staticParameters: {
12245
12260
  direction: le.LEFT
12246
12261
  }
12247
12262
  }, Sf = {
12248
- id: Et.id,
12263
+ id: St.id,
12249
12264
  binding: q.ARROW_RIGHT,
12250
12265
  preconditions: Se,
12251
12266
  staticParameters: {
12252
12267
  direction: le.RIGHT
12253
12268
  }
12254
12269
  }, vf = {
12255
- id: It.id,
12270
+ id: vt.id,
12256
12271
  binding: q.ARROW_UP | te.SHIFT,
12257
12272
  preconditions: Se,
12258
12273
  staticParameters: {
12259
12274
  direction: le.UP
12260
12275
  }
12261
12276
  }, Cf = {
12262
- id: It.id,
12277
+ id: vt.id,
12263
12278
  binding: q.ARROW_DOWN | te.SHIFT,
12264
12279
  preconditions: Se,
12265
12280
  staticParameters: {
12266
12281
  direction: le.DOWN
12267
12282
  }
12268
12283
  }, Rf = {
12269
- id: It.id,
12284
+ id: vt.id,
12270
12285
  binding: q.ARROW_LEFT | te.SHIFT,
12271
12286
  preconditions: Se,
12272
12287
  staticParameters: {
12273
12288
  direction: le.LEFT
12274
12289
  }
12275
12290
  }, bf = {
12276
- id: It.id,
12291
+ id: vt.id,
12277
12292
  binding: q.ARROW_RIGHT | te.SHIFT,
12278
12293
  preconditions: Se,
12279
12294
  staticParameters: {
@@ -12282,7 +12297,7 @@ const gf = {
12282
12297
  }, yf = {
12283
12298
  id: Ta.id,
12284
12299
  binding: q.A | te.CTRL_COMMAND,
12285
- preconditions: (n) => n.getContextValue(Hr) && (n.getContextValue(Dn) || n.getContextValue(to))
12300
+ preconditions: (n) => n.getContextValue(kr) && (n.getContextValue(Dn) || n.getContextValue(to))
12286
12301
  };
12287
12302
  var xf = Object.defineProperty, Of = Object.getOwnPropertyDescriptor, Tf = (n, e, t) => e in n ? xf(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Bf = (n, e, t, o) => {
12288
12303
  for (var r = o > 1 ? void 0 : o ? Of(e, t) : e, s = n.length - 1, i; s >= 0; s--)
@@ -12291,23 +12306,23 @@ var xf = Object.defineProperty, Of = Object.getOwnPropertyDescriptor, Tf = (n, e
12291
12306
  }, gn = (n, e) => (t, o) => e(t, o, n), Mf = (n, e, t) => Tf(n, e + "", t);
12292
12307
  let Pr = class extends Zc {
12293
12308
  // static override type = UniverInstanceType.UNIVER_DOC;
12294
- constructor(n = Di, e, t, o, r, s) {
12309
+ constructor(n = Pi, e, t, o, r, s) {
12295
12310
  super(), this._config = n, this._injector = e, this._renderManagerSrv = t, this._commandService = o, this._logService = r, this._configService = s;
12296
12311
  const { menu: i, ...a } = Jc(
12297
12312
  {},
12298
- Di,
12313
+ Pi,
12299
12314
  this._config
12300
12315
  );
12301
12316
  i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(Vo, a), this._initDependencies(e), this._initializeShortcut(), this._initCommand();
12302
12317
  }
12303
12318
  onReady() {
12304
- this._initRenderBasics(), this._markDocAsFocused(), ks(this._injector, [
12319
+ this._initRenderBasics(), this._markDocAsFocused(), Vs(this._injector, [
12305
12320
  [So],
12306
12321
  [vo]
12307
12322
  ]);
12308
12323
  }
12309
12324
  onRendered() {
12310
- this._initUI(), this._initRenderModules(), ks(this._injector, [
12325
+ this._initUI(), this._initRenderModules(), Vs(this._injector, [
12311
12326
  [fo],
12312
12327
  [po],
12313
12328
  [nn],
@@ -12326,20 +12341,20 @@ let Pr = class extends Zc {
12326
12341
  Ut,
12327
12342
  Ft,
12328
12343
  Ht,
12329
- Ct,
12344
+ bt,
12330
12345
  kt,
12331
12346
  ct,
12332
12347
  tn,
12333
- Dt,
12348
+ Et,
12334
12349
  Fn,
12335
12350
  Pt,
12336
- Rt,
12337
- Gr,
12351
+ yt,
12352
+ Yr,
12338
12353
  Ca,
12339
12354
  xn,
12340
- Zr,
12341
- Ra,
12342
12355
  Jr,
12356
+ Ra,
12357
+ $r,
12343
12358
  ba,
12344
12359
  nt,
12345
12360
  Tn,
@@ -12353,15 +12368,15 @@ let Pr = class extends Zc {
12353
12368
  wo,
12354
12369
  ja,
12355
12370
  za,
12356
- Rs,
12357
12371
  bs,
12358
- vA,
12359
12372
  ys,
12373
+ vA,
12360
12374
  xs,
12361
- Is,
12375
+ Os,
12362
12376
  Ss,
12377
+ vs,
12363
12378
  kn,
12364
- Ms,
12379
+ _s,
12365
12380
  Ga,
12366
12381
  Jt,
12367
12382
  Mo,
@@ -12381,34 +12396,34 @@ let Pr = class extends Zc {
12381
12396
  Zd,
12382
12397
  Zn,
12383
12398
  Ta,
12384
- Ds,
12385
- Et,
12386
- It,
12399
+ Ps,
12400
+ St,
12401
+ vt,
12387
12402
  $d,
12388
12403
  wa,
12389
12404
  eA,
12390
12405
  Ze,
12391
12406
  Qa,
12392
- es,
12393
- os,
12394
- ss,
12395
- us,
12407
+ ts,
12408
+ rs,
12409
+ is,
12396
12410
  hs,
12397
12411
  gs,
12398
12412
  fs,
12399
12413
  ps,
12414
+ ms,
12400
12415
  ao,
12401
12416
  Ua,
12402
12417
  Fa,
12403
- ls,
12404
12418
  ds,
12405
12419
  As,
12406
- as,
12420
+ us,
12421
+ cs,
12407
12422
  mc,
12408
- _s
12423
+ Ds
12409
12424
  ].forEach((n) => {
12410
12425
  this.disposeWithMe(this._commandService.registerCommand(n));
12411
- }), [so, rs, is].forEach((n) => this.disposeWithMe(this._commandService.registerMultipleCommand(n)));
12426
+ }), [so, ss, as].forEach((n) => this.disposeWithMe(this._commandService.registerMultipleCommand(n)));
12412
12427
  }
12413
12428
  _initializeShortcut() {
12414
12429
  [
@@ -12445,7 +12460,7 @@ let Pr = class extends Zc {
12445
12460
  [Mn],
12446
12461
  [vo],
12447
12462
  [So],
12448
- [_t],
12463
+ [Dt],
12449
12464
  [at]
12450
12465
  ], this._config.override).forEach((t) => n.add(t));
12451
12466
  }
@@ -12468,7 +12483,7 @@ let Pr = class extends Zc {
12468
12483
  [de],
12469
12484
  [Re],
12470
12485
  [nl],
12471
- [ws],
12486
+ [Ns],
12472
12487
  [No],
12473
12488
  [br],
12474
12489
  [Dr]
@@ -12503,7 +12518,7 @@ Pr = Bf([
12503
12518
  gn(2, fe),
12504
12519
  gn(3, T),
12505
12520
  gn(4, Qr),
12506
- gn(5, Vr)
12521
+ gn(5, Wr)
12507
12522
  ], Pr);
12508
12523
  function _f(n, e, t) {
12509
12524
  const o = J(T), r = J(To), s = _e(() => ge(4), []);
@@ -12544,7 +12559,7 @@ const Df = (n, e = !0, t, o) => {
12544
12559
  height: l
12545
12560
  }), a == null || a.resize(d, l);
12546
12561
  }
12547
- }, [n, e]), s = _e(() => kr(() => {
12562
+ }, [n, e]), s = _e(() => Vr(() => {
12548
12563
  var I, S;
12549
12564
  if (!t || !n || !t)
12550
12565
  return;
@@ -12587,7 +12602,7 @@ const Df = (n, e = !0, t, o) => {
12587
12602
  }, [n, t, s]), { resize: r, checkScrollBar: s };
12588
12603
  };
12589
12604
  function Pf(n) {
12590
- const { editorId: e, initialValue: t, container: o, autoFocus: r, isSingle: s } = n, i = _e(() => r != null ? r : !1, []), [a, c] = me(), d = J(Ye);
12605
+ const { editorId: e, initialValue: t, container: o, autoFocus: r, isSingle: s } = n, i = _e(() => r != null ? r : !1, []), [a, c] = Ee(), d = J(Ye);
12591
12606
  return fa(() => {
12592
12607
  var l, A;
12593
12608
  if (o.current) {
@@ -12645,9 +12660,9 @@ const wf = (n, e, t, o) => {
12645
12660
  return;
12646
12661
  }
12647
12662
  let f = le.LEFT;
12648
- u === q.ARROW_DOWN ? f = le.DOWN : u === q.ARROW_UP ? f = le.UP : u === q.ARROW_RIGHT && (f = le.RIGHT), g === te.SHIFT ? r.executeCommand(It.id, {
12663
+ u === q.ARROW_DOWN ? f = le.DOWN : u === q.ARROW_UP ? f = le.UP : u === q.ARROW_RIGHT && (f = le.RIGHT), g === te.SHIFT ? r.executeCommand(vt.id, {
12649
12664
  direction: f
12650
- }) : r.executeCommand(Et.id, {
12665
+ }) : r.executeCommand(St.id, {
12651
12666
  direction: f
12652
12667
  });
12653
12668
  };
@@ -12728,13 +12743,13 @@ const ep = (n) => {
12728
12743
  icon: f,
12729
12744
  editorRef: p,
12730
12745
  placeholder: m
12731
- } = n, I = J(Ye), S = En(o), v = En(s), [R, E] = me(u), b = ke(null), y = _e(() => l != null ? l : el(`RICH_TEXT_EDITOR-${ge(4)}`), [l]), C = Pf({
12746
+ } = n, I = J(Ye), S = En(o), v = En(s), [R, E] = Ee(u), b = ke(null), y = _e(() => l != null ? l : el(`RICH_TEXT_EDITOR-${ge(4)}`), [l]), C = Pf({
12732
12747
  editorId: y,
12733
12748
  initialValue: r,
12734
12749
  container: b,
12735
12750
  autoFocus: t,
12736
12751
  isSingle: d
12737
- }), x = J(fe).getRenderById(y), M = x == null ? void 0 : x.with(Re), P = tt(M == null ? void 0 : M.textSelectionInner$), F = !!((H = M == null ? void 0 : M.isFocusing) != null && H && (P != null && P.textRanges.some((k) => k.collapsed))), w = ke(null), [N, ee] = me(() => {
12752
+ }), x = J(fe).getRenderById(y), M = x == null ? void 0 : x.with(Re), P = tt(M == null ? void 0 : M.textSelectionInner$), F = !!((H = M == null ? void 0 : M.isFocusing) != null && H && (P != null && P.textRanges.some((k) => k.collapsed))), w = ke(null), [N, ee] = Ee(() => {
12738
12753
  var k, ne;
12739
12754
  return !ce.transform.getPlainText((ne = (k = C == null ? void 0 : C.getDocumentData().body) == null ? void 0 : k.dataStream) != null ? ne : "");
12740
12755
  }), { checkScrollBar: $ } = Df(C, d, !0, !0);
@@ -12810,7 +12825,7 @@ export {
12810
12825
  Qo as AlignLeftCommand,
12811
12826
  lt as AlignOperationCommand,
12812
12827
  Fo as AlignRightCommand,
12813
- Gr as BreakLineCommand,
12828
+ Yr as BreakLineCommand,
12814
12829
  On as BulletListCommand,
12815
12830
  gr as ChangeListNestingLevelCommand,
12816
12831
  Xn as ChangeListNestingLevelType,
@@ -12820,40 +12835,40 @@ export {
12820
12835
  ja as CreateDocTableCommand,
12821
12836
  $t as CutContentCommand,
12822
12837
  ad as DOCS_COMPONENT_BACKGROUND_LAYER_INDEX,
12823
- Js as DOCS_COMPONENT_DEFAULT_Z_INDEX,
12838
+ $s as DOCS_COMPONENT_DEFAULT_Z_INDEX,
12824
12839
  cd as DOCS_COMPONENT_HEADER_LAYER_INDEX,
12825
12840
  zo as DOCS_COMPONENT_MAIN_LAYER_INDEX,
12826
12841
  et as DOCS_VIEW_KEY,
12827
12842
  id as DOC_UI_PLUGIN_NAME,
12828
- Oi as DOC_VERTICAL_PADDING,
12843
+ Ti as DOC_VERTICAL_PADDING,
12829
12844
  sd as DefaultDocContainerConfig,
12830
12845
  rd as DefaultToolbarConfig,
12831
12846
  xn as DeleteCommand,
12832
- Zr as DeleteCustomBlockCommand,
12847
+ Jr as DeleteCustomBlockCommand,
12833
12848
  Do as DeleteLeftCommand,
12834
12849
  ya as DeleteRightCommand,
12835
- _t as DocAutoFormatService,
12850
+ Dt as DocAutoFormatService,
12836
12851
  ho as DocBackScrollRenderController,
12837
12852
  Mn as DocCanvasPopManagerService,
12838
12853
  so as DocCopyCommand,
12839
- Os as DocCreateTableOperation,
12840
- rs as DocCutCommand,
12854
+ Ts as DocCreateTableOperation,
12855
+ ss as DocCutCommand,
12841
12856
  wt as DocEventManagerService,
12842
12857
  No as DocIMEInputManagerService,
12843
- is as DocPasteCommand,
12858
+ as as DocPasteCommand,
12844
12859
  lf as DocPrintInterceptorService,
12845
12860
  br as DocRenderController,
12846
12861
  Ta as DocSelectAllCommand,
12847
12862
  Re as DocSelectionRenderService,
12848
12863
  So as DocStateChangeManagerService,
12849
- Ss as DocTableDeleteColumnsCommand,
12850
- Is as DocTableDeleteRowsCommand,
12864
+ vs as DocTableDeleteColumnsCommand,
12865
+ Ss as DocTableDeleteRowsCommand,
12851
12866
  kn as DocTableDeleteTableCommand,
12852
12867
  vA as DocTableInsertColumnCommand,
12853
- ys as DocTableInsertColumnLeftCommand,
12854
- xs as DocTableInsertColumnRightCommand,
12855
- Rs as DocTableInsertRowAboveCommand,
12856
- bs as DocTableInsertRowBellowCommand,
12868
+ xs as DocTableInsertColumnLeftCommand,
12869
+ Os as DocTableInsertColumnRightCommand,
12870
+ bs as DocTableInsertRowAboveCommand,
12871
+ ys as DocTableInsertRowBellowCommand,
12857
12872
  za as DocTableInsertRowCommand,
12858
12873
  Ga as DocTableTabCommand,
12859
12874
  uo as DocUIController,
@@ -12871,11 +12886,11 @@ export {
12871
12886
  Ca as InsertCommand,
12872
12887
  eA as InsertCustomRangeCommand,
12873
12888
  Hn as ListOperationCommand,
12874
- Jr as MergeTwoParagraphCommand,
12875
- Et as MoveCursorOperation,
12876
- It as MoveSelectionOperation,
12889
+ $r as MergeTwoParagraphCommand,
12890
+ St as MoveCursorOperation,
12891
+ vt as MoveSelectionOperation,
12877
12892
  Yf as NORMAL_TEXT_SELECTION_PLUGIN_NAME,
12878
- mt as NodePositionConvertToCursor,
12893
+ It as NodePositionConvertToCursor,
12879
12894
  Va as NodePositionConvertToRectRange,
12880
12895
  Tn as OrderListCommand,
12881
12896
  Fd as PastePluginLark,
@@ -12892,15 +12907,15 @@ export {
12892
12907
  Zn as SetDocZoomRatioCommand,
12893
12908
  nt as SetDocZoomRatioOperation,
12894
12909
  Qt as SetInlineFormatBoldCommand,
12895
- Rt as SetInlineFormatCommand,
12910
+ yt as SetInlineFormatCommand,
12896
12911
  tn as SetInlineFormatFontFamilyCommand,
12897
12912
  ct as SetInlineFormatFontSizeCommand,
12898
12913
  Ut as SetInlineFormatItalicCommand,
12899
12914
  Ht as SetInlineFormatStrikethroughCommand,
12900
- Ct as SetInlineFormatSubscriptCommand,
12915
+ bt as SetInlineFormatSubscriptCommand,
12901
12916
  kt as SetInlineFormatSuperscriptCommand,
12902
12917
  Pt as SetInlineFormatTextBackgroundColorCommand,
12903
- Dt as SetInlineFormatTextColorCommand,
12918
+ Et as SetInlineFormatTextColorCommand,
12904
12919
  Ft as SetInlineFormatUnderlineCommand,
12905
12920
  Ze as SetParagraphNamedStyleCommand,
12906
12921
  ko as SwitchDocModeCommand,
@@ -12923,21 +12938,21 @@ export {
12923
12938
  $n as getAnchorBounding,
12924
12939
  uA as getCanvasOffsetByEngine,
12925
12940
  qe as getCommandSkeleton,
12926
- $r as getCursorWhenDelete,
12941
+ es as getCursorWhenDelete,
12927
12942
  yd as getCustomBlockIdsInSelections,
12928
12943
  _d as getCutActionsFromDocRanges,
12929
12944
  ld as getDocObject,
12930
12945
  Kf as getDocObjectById,
12931
- Kr as getEmptyTableCell,
12932
- qr as getEmptyTableRow,
12933
- Es as getLineBounding,
12934
- fi as getOneTextSelectionRange,
12946
+ qr as getEmptyTableCell,
12947
+ Xr as getEmptyTableRow,
12948
+ Is as getLineBounding,
12949
+ pi as getOneTextSelectionRange,
12935
12950
  Ae as getRichTextEditPath,
12936
- Xr as getTableColumn,
12951
+ Zr as getTableColumn,
12937
12952
  Zf as hasParagraphInTable,
12938
12953
  Ha as isInSameTableCell,
12939
12954
  oA as isValidRectRange,
12940
- pt as neoGetDocObject,
12955
+ mt as neoGetDocObject,
12941
12956
  $f as transformToDocDrawingPosition,
12942
12957
  _f as useKeyboardEvent,
12943
12958
  Df as useResize,