@univerjs/core 0.1.8 → 0.1.10

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/es/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var ws = Object.defineProperty;
2
2
  var Ls = (t, e, s) => e in t ? ws(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var d = (t, e, s) => (Ls(t, typeof e != "symbol" ? e + "" : e, s), s);
4
- import { Subject as W, Observable as re, filter as zt, BehaviorSubject as q, map as bs, distinctUntilChanged as vs, combineLatest as Us } from "rxjs";
5
- import { createIdentifier as G, Inject as x, Injector as tt } from "@wendellhu/redi";
6
- import { map as Ts } from "rxjs/operators";
7
- function Ms() {
8
- Ds();
4
+ import { Subject as H, Observable as ie, filter as Xt, merge as bs, timer as vs, BehaviorSubject as q, map as Us, distinctUntilChanged as Ts, combineLatest as Ms } from "rxjs";
5
+ import { filter as Ds, debounceTime as ps, first as xs, map as Ps } from "rxjs/operators";
6
+ import { createIdentifier as G, Inject as P, Injector as tt } from "@wendellhu/redi";
7
+ function Hs() {
8
+ Fs();
9
9
  }
10
10
  const dt = typeof global < "u" ? global : typeof self < "u" ? self : window;
11
- function Ds() {
11
+ function Fs() {
12
12
  typeof dt.requestIdleCallback != "function" && (dt.requestIdleCallback = function(s) {
13
13
  const n = Date.now();
14
14
  return setTimeout(function() {
@@ -24,7 +24,7 @@ function Ds() {
24
24
  clearTimeout(s);
25
25
  });
26
26
  }
27
- function ps(t, e) {
27
+ function Ws(t, e) {
28
28
  let s = 0, n = t.length - 1;
29
29
  for (; s <= n; ) {
30
30
  const r = Math.floor((n + s) / 2);
@@ -39,7 +39,7 @@ function ps(t, e) {
39
39
  }
40
40
  return -1;
41
41
  }
42
- function Ps(t, e) {
42
+ function Gs(t, e) {
43
43
  let s = 0, n = 0, r = 0, i = -1, o = t.length - 1;
44
44
  for (; s < t.length && o >= 0 && o >= s; ) {
45
45
  if (n = t[o], o === 0 ? r = 0 : r = t[o - 1], e >= r && e <= n) {
@@ -54,16 +54,16 @@ function Ps(t, e) {
54
54
  }
55
55
  return i;
56
56
  }
57
- function ho(t, e) {
57
+ function Co(t, e) {
58
58
  let s = t.length - 1;
59
- return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[s - 20] ? s = Ps(t, e) : s = ps(t, e), s);
59
+ return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[s - 20] ? s = Gs(t, e) : s = Ws(t, e), s);
60
60
  }
61
- function _o(t) {
61
+ function Oo(t) {
62
62
  const e = new Blob([t], { type: "text/javascript" });
63
63
  return window.URL.createObjectURL(e);
64
64
  }
65
- var xs = /* @__PURE__ */ ((t) => (t[t.DEFAULT_SERIES = 0] = "DEFAULT_SERIES", t[t.ALTERNATE_SERIES = 1] = "ALTERNATE_SERIES", t))(xs || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.THIN = 1] = "THIN", t[t.HAIR = 2] = "HAIR", t[t.DOTTED = 3] = "DOTTED", t[t.DASHED = 4] = "DASHED", t[t.DASH_DOT = 5] = "DASH_DOT", t[t.DASH_DOT_DOT = 6] = "DASH_DOT_DOT", t[t.DOUBLE = 7] = "DOUBLE", t[t.MEDIUM = 8] = "MEDIUM", t[t.MEDIUM_DASHED = 9] = "MEDIUM_DASHED", t[t.MEDIUM_DASH_DOT = 10] = "MEDIUM_DASH_DOT", t[t.MEDIUM_DASH_DOT_DOT = 11] = "MEDIUM_DASH_DOT_DOT", t[t.SLANT_DASH_DOT = 12] = "SLANT_DASH_DOT", t[t.THICK = 13] = "THICK", t))(S || {}), Hs = /* @__PURE__ */ ((t) => (t.TOP = "top", t.BOTTOM = "bottom", t.LEFT = "left", t.RIGHT = "right", t.NONE = "none", t.ALL = "all", t.OUTSIDE = "outside", t.INSIDE = "inside", t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t.TLBR = "tlbr", t.TLBC_TLMR = "tlbc_tlmr", t.TLBR_TLBC_TLMR = "tlbr_tlbc_tlmr", t.BLTR = "bl_tr", t.MLTR_BCTR = "mltr_bctr", t))(Hs || {}), B = /* @__PURE__ */ ((t) => (t[t.UNSUPPORTED = 0] = "UNSUPPORTED", t[t.RGB = 1] = "RGB", t[t.HEX = 2] = "HEX", t[t.THEME = 3] = "THEME", t))(B || {}), Fs = /* @__PURE__ */ ((t) => (t[t.ON = 0] = "ON", t[t.OFF = 1] = "OFF", t))(Fs || {}), Ws = /* @__PURE__ */ ((t) => (t[t.PASTE_NORMAL = 0] = "PASTE_NORMAL", t[t.PASTE_NO_BORDERS = 1] = "PASTE_NO_BORDERS", t[t.PASTE_FORMAT = 2] = "PASTE_FORMAT", t[t.PASTE_FORMULA = 3] = "PASTE_FORMULA", t[t.PASTE_DATA_VALIDATION = 4] = "PASTE_DATA_VALIDATION", t[t.PASTE_VALUES = 5] = "PASTE_VALUES", t[t.PASTE_CONDITIONAL_FORMATTING = 6] = "PASTE_CONDITIONAL_FORMATTING", t[t.PASTE_COLUMN_WIDTHS = 7] = "PASTE_COLUMN_WIDTHS", t))(Ws || {}), Gs = /* @__PURE__ */ ((t) => (t[t.DOCUMENT = 0] = "DOCUMENT", t[t.PROJECT = 1] = "PROJECT", t))(Gs || {}), Bs = /* @__PURE__ */ ((t) => (t[t.COLUMNS = 0] = "COLUMNS", t[t.ROWS = 1] = "ROWS", t))(Bs || {}), ks = /* @__PURE__ */ ((t) => (t[t.UP = 0] = "UP", t[t.RIGHT = 1] = "RIGHT", t[t.DOWN = 2] = "DOWN", t[t.LEFT = 3] = "LEFT", t))(ks || {});
66
- function fo(t) {
65
+ var Bs = /* @__PURE__ */ ((t) => (t[t.DEFAULT_SERIES = 0] = "DEFAULT_SERIES", t[t.ALTERNATE_SERIES = 1] = "ALTERNATE_SERIES", t))(Bs || {}), S = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.THIN = 1] = "THIN", t[t.HAIR = 2] = "HAIR", t[t.DOTTED = 3] = "DOTTED", t[t.DASHED = 4] = "DASHED", t[t.DASH_DOT = 5] = "DASH_DOT", t[t.DASH_DOT_DOT = 6] = "DASH_DOT_DOT", t[t.DOUBLE = 7] = "DOUBLE", t[t.MEDIUM = 8] = "MEDIUM", t[t.MEDIUM_DASHED = 9] = "MEDIUM_DASHED", t[t.MEDIUM_DASH_DOT = 10] = "MEDIUM_DASH_DOT", t[t.MEDIUM_DASH_DOT_DOT = 11] = "MEDIUM_DASH_DOT_DOT", t[t.SLANT_DASH_DOT = 12] = "SLANT_DASH_DOT", t[t.THICK = 13] = "THICK", t))(S || {}), $s = /* @__PURE__ */ ((t) => (t.TOP = "top", t.BOTTOM = "bottom", t.LEFT = "left", t.RIGHT = "right", t.NONE = "none", t.ALL = "all", t.OUTSIDE = "outside", t.INSIDE = "inside", t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t.TLBR = "tlbr", t.TLBC_TLMR = "tlbc_tlmr", t.TLBR_TLBC_TLMR = "tlbr_tlbc_tlmr", t.BLTR = "bl_tr", t.MLTR_BCTR = "mltr_bctr", t))($s || {}), B = /* @__PURE__ */ ((t) => (t[t.UNSUPPORTED = 0] = "UNSUPPORTED", t[t.RGB = 1] = "RGB", t[t.HEX = 2] = "HEX", t[t.THEME = 3] = "THEME", t))(B || {}), ks = /* @__PURE__ */ ((t) => (t[t.ON = 0] = "ON", t[t.OFF = 1] = "OFF", t))(ks || {}), Vs = /* @__PURE__ */ ((t) => (t[t.PASTE_NORMAL = 0] = "PASTE_NORMAL", t[t.PASTE_NO_BORDERS = 1] = "PASTE_NO_BORDERS", t[t.PASTE_FORMAT = 2] = "PASTE_FORMAT", t[t.PASTE_FORMULA = 3] = "PASTE_FORMULA", t[t.PASTE_DATA_VALIDATION = 4] = "PASTE_DATA_VALIDATION", t[t.PASTE_VALUES = 5] = "PASTE_VALUES", t[t.PASTE_CONDITIONAL_FORMATTING = 6] = "PASTE_CONDITIONAL_FORMATTING", t[t.PASTE_COLUMN_WIDTHS = 7] = "PASTE_COLUMN_WIDTHS", t))(Vs || {}), js = /* @__PURE__ */ ((t) => (t[t.DOCUMENT = 0] = "DOCUMENT", t[t.PROJECT = 1] = "PROJECT", t))(js || {}), Ks = /* @__PURE__ */ ((t) => (t[t.COLUMNS = 0] = "COLUMNS", t[t.ROWS = 1] = "ROWS", t))(Ks || {}), Ys = /* @__PURE__ */ ((t) => (t[t.UP = 0] = "UP", t[t.RIGHT = 1] = "RIGHT", t[t.DOWN = 2] = "DOWN", t[t.LEFT = 3] = "LEFT", t))(Ys || {});
66
+ function Ao(t) {
67
67
  switch (t) {
68
68
  case 3:
69
69
  return 1;
@@ -75,37 +75,37 @@ function fo(t) {
75
75
  return 0;
76
76
  }
77
77
  }
78
- var $s = /* @__PURE__ */ ((t) => (t[t.NUMBER_FORMAT_TYPE_UNSPECIFIED = 0] = "NUMBER_FORMAT_TYPE_UNSPECIFIED", t[t.TEXT = 1] = "TEXT", t[t.NUMBER = 2] = "NUMBER", t[t.PERCENT = 3] = "PERCENT", t[t.CURRENCY = 4] = "CURRENCY", t[t.DATE = 5] = "DATE", t[t.TIME = 6] = "TIME", t[t.DATE_TIME = 7] = "DATE_TIME", t[t.SCIENTIFIC = 8] = "SCIENTIFIC", t))($s || {}), Vs = /* @__PURE__ */ ((t) => (t[t.INTERPOLATION_POINT_TYPE_UNSPECIFIED = 0] = "INTERPOLATION_POINT_TYPE_UNSPECIFIED", t[t.MIN = 1] = "MIN", t[t.MAX = 2] = "MAX", t[t.NUMBER = 3] = "NUMBER", t[t.PERCENT = 4] = "PERCENT", t[t.PERCENTILE = 5] = "PERCENTILE", t))(Vs || {}), ut = /* @__PURE__ */ ((t) => (t.EN_US = "enUS", t.ZH_CN = "zhCN", t))(ut || {}), js = /* @__PURE__ */ ((t) => (t[t.RANGE = 0] = "RANGE", t[t.SHEET = 1] = "SHEET", t))(js || {}), Ks = /* @__PURE__ */ ((t) => (t[t.RELATIVE_DATE_UNSPECIFIED = 0] = "RELATIVE_DATE_UNSPECIFIED", t[t.PAST_YEAR = 1] = "PAST_YEAR", t[t.PAST_MONTH = 2] = "PAST_MONTH", t[t.PAST_WEEK = 3] = "PAST_WEEK", t[t.YESTERDAY = 4] = "YESTERDAY", t[t.TODAY = 5] = "TODAY", t[t.TOMORROW = 6] = "TOMORROW", t))(Ks || {}), Ys = /* @__PURE__ */ ((t) => (t[t.TYPE_UNSPECIFIED = 0] = "TYPE_UNSPECIFIED", t[t.TEXT_BOX = 1] = "TEXT_BOX", t[t.RECTANGLE = 2] = "RECTANGLE", t[t.ROUND_RECTANGLE = 3] = "ROUND_RECTANGLE", t[t.ELLIPSE = 4] = "ELLIPSE", t[t.ARC = 5] = "ARC", t[t.BENT_ARROW = 6] = "BENT_ARROW", t[t.BENT_UP_ARROW = 7] = "BENT_UP_ARROW", t[t.BEVEL = 8] = "BEVEL", t[t.BLOCK_ARC = 9] = "BLOCK_ARC", t[t.BRACE_PAIR = 10] = "BRACE_PAIR", t[t.BRACKET_PAIR = 11] = "BRACKET_PAIR", t[t.CAN = 12] = "CAN", t[t.CHEVRON = 13] = "CHEVRON", t[t.CHORD = 14] = "CHORD", t[t.CLOUD = 15] = "CLOUD", t[t.CORNER = 16] = "CORNER", t[t.CUBE = 17] = "CUBE", t[t.CURVED_DOWN_ARROW = 18] = "CURVED_DOWN_ARROW", t[t.CURVED_LEFT_ARROW = 19] = "CURVED_LEFT_ARROW", t[t.CURVED_RIGHT_ARROW = 20] = "CURVED_RIGHT_ARROW", t[t.CURVED_UP_ARROW = 21] = "CURVED_UP_ARROW", t[t.DECAGON = 22] = "DECAGON", t[t.DIAGONAL_STRIPE = 23] = "DIAGONAL_STRIPE", t[t.DIAMOND = 24] = "DIAMOND", t[t.DODECAGON = 25] = "DODECAGON", t[t.DONUT = 26] = "DONUT", t[t.DOUBLE_WAVE = 27] = "DOUBLE_WAVE", t[t.DOWN_ARROW = 28] = "DOWN_ARROW", t[t.DOWN_ARROW_CALLOUT = 29] = "DOWN_ARROW_CALLOUT", t[t.FOLDED_CORNER = 30] = "FOLDED_CORNER", t[t.FRAME = 31] = "FRAME", t[t.HALF_FRAME = 32] = "HALF_FRAME", t[t.HEART = 33] = "HEART", t[t.HEPTAGON = 34] = "HEPTAGON", t[t.HEXAGON = 35] = "HEXAGON", t[t.HOME_PLATE = 36] = "HOME_PLATE", t[t.HORIZONTAL_SCROLL = 37] = "HORIZONTAL_SCROLL", t[t.IRREGULAR_SEAL_1 = 38] = "IRREGULAR_SEAL_1", t[t.IRREGULAR_SEAL_2 = 39] = "IRREGULAR_SEAL_2", t[t.LEFT_ARROW = 40] = "LEFT_ARROW", t[t.LEFT_ARROW_CALLOUT = 41] = "LEFT_ARROW_CALLOUT", t[t.LEFT_BRACE = 42] = "LEFT_BRACE", t[t.LEFT_BRACKET = 43] = "LEFT_BRACKET", t[t.LEFT_RIGHT_ARROW = 44] = "LEFT_RIGHT_ARROW", t[t.LEFT_RIGHT_ARROW_CALLOUT = 45] = "LEFT_RIGHT_ARROW_CALLOUT", t[t.LEFT_RIGHT_UP_ARROW = 46] = "LEFT_RIGHT_UP_ARROW", t[t.LEFT_UP_ARROW = 47] = "LEFT_UP_ARROW", t[t.LIGHTNING_BOLT = 48] = "LIGHTNING_BOLT", t[t.MATH_DIVIDE = 49] = "MATH_DIVIDE", t[t.MATH_EQUAL = 50] = "MATH_EQUAL", t[t.MATH_MINUS = 51] = "MATH_MINUS", t[t.MATH_MULTIPLY = 52] = "MATH_MULTIPLY", t[t.MATH_NOT_EQUAL = 53] = "MATH_NOT_EQUAL", t[t.MATH_PLUS = 54] = "MATH_PLUS", t[t.MOON = 55] = "MOON", t[t.NO_SMOKING = 56] = "NO_SMOKING", t[t.NOTCHED_RIGHT_ARROW = 57] = "NOTCHED_RIGHT_ARROW", t[t.OCTAGON = 58] = "OCTAGON", t[t.PARALLELOGRAM = 59] = "PARALLELOGRAM", t[t.PENTAGON = 60] = "PENTAGON", t[t.PIE = 61] = "PIE", t[t.PLAQUE = 62] = "PLAQUE", t[t.PLUS = 63] = "PLUS", t[t.QUAD_ARROW = 64] = "QUAD_ARROW", t[t.QUAD_ARROW_CALLOUT = 65] = "QUAD_ARROW_CALLOUT", t[t.RIBBON = 66] = "RIBBON", t[t.RIBBON_2 = 67] = "RIBBON_2", t[t.RIGHT_ARROW = 68] = "RIGHT_ARROW", t[t.RIGHT_ARROW_CALLOUT = 69] = "RIGHT_ARROW_CALLOUT", t[t.RIGHT_BRACE = 70] = "RIGHT_BRACE", t[t.RIGHT_BRACKET = 71] = "RIGHT_BRACKET", t[t.ROUND_1_RECTANGLE = 72] = "ROUND_1_RECTANGLE", t[t.ROUND_2_DIAGONAL_RECTANGLE = 73] = "ROUND_2_DIAGONAL_RECTANGLE", t[t.ROUND_2_SAME_RECTANGLE = 74] = "ROUND_2_SAME_RECTANGLE", t[t.RIGHT_TRIANGLE = 75] = "RIGHT_TRIANGLE", t[t.SMILEY_FACE = 76] = "SMILEY_FACE", t[t.SNIP_1_RECTANGLE = 77] = "SNIP_1_RECTANGLE", t[t.SNIP_2_DIAGONAL_RECTANGLE = 78] = "SNIP_2_DIAGONAL_RECTANGLE", t[t.SNIP_2_SAME_RECTANGLE = 79] = "SNIP_2_SAME_RECTANGLE", t[t.SNIP_ROUND_RECTANGLE = 80] = "SNIP_ROUND_RECTANGLE", t[t.STAR_10 = 81] = "STAR_10", t[t.STAR_12 = 82] = "STAR_12", t[t.STAR_16 = 83] = "STAR_16", t[t.STAR_24 = 84] = "STAR_24", t[t.STAR_32 = 85] = "STAR_32", t[t.STAR_4 = 86] = "STAR_4", t[t.STAR_5 = 87] = "STAR_5", t[t.STAR_6 = 88] = "STAR_6", t[t.STAR_7 = 89] = "STAR_7", t[t.STAR_8 = 90] = "STAR_8", t[t.STRIPED_RIGHT_ARROW = 91] = "STRIPED_RIGHT_ARROW", t[t.SUN = 92] = "SUN", t[t.TRAPEZOID = 93] = "TRAPEZOID", t[t.TRIANGLE = 94] = "TRIANGLE", t[t.UP_ARROW = 95] = "UP_ARROW", t[t.UP_ARROW_CALLOUT = 96] = "UP_ARROW_CALLOUT", t[t.UP_DOWN_ARROW = 97] = "UP_DOWN_ARROW", t[t.UTURN_ARROW = 98] = "UTURN_ARROW", t[t.VERTICAL_SCROLL = 99] = "VERTICAL_SCROLL", t[t.WAVE = 100] = "WAVE", t[t.WEDGE_ELLIPSE_CALLOUT = 101] = "WEDGE_ELLIPSE_CALLOUT", t[t.WEDGE_RECTANGLE_CALLOUT = 102] = "WEDGE_RECTANGLE_CALLOUT", t[t.WEDGE_ROUND_RECTANGLE_CALLOUT = 103] = "WEDGE_ROUND_RECTANGLE_CALLOUT", t[t.FLOW_CHART_ALTERNATE_PROCESS = 104] = "FLOW_CHART_ALTERNATE_PROCESS", t[t.FLOW_CHART_COLLATE = 105] = "FLOW_CHART_COLLATE", t[t.FLOW_CHART_CONNECTOR = 106] = "FLOW_CHART_CONNECTOR", t[t.FLOW_CHART_DECISION = 107] = "FLOW_CHART_DECISION", t[t.FLOW_CHART_DELAY = 108] = "FLOW_CHART_DELAY", t[t.FLOW_CHART_DISPLAY = 109] = "FLOW_CHART_DISPLAY", t[t.FLOW_CHART_DOCUMENT = 110] = "FLOW_CHART_DOCUMENT", t[t.FLOW_CHART_EXTRACT = 111] = "FLOW_CHART_EXTRACT", t[t.FLOW_CHART_INPUT_OUTPUT = 112] = "FLOW_CHART_INPUT_OUTPUT", t[t.FLOW_CHART_INTERNAL_STORAGE = 113] = "FLOW_CHART_INTERNAL_STORAGE", t[t.FLOW_CHART_MAGNETIC_DISK = 114] = "FLOW_CHART_MAGNETIC_DISK", t[t.FLOW_CHART_MAGNETIC_DRUM = 115] = "FLOW_CHART_MAGNETIC_DRUM", t[t.FLOW_CHART_MAGNETIC_TAPE = 116] = "FLOW_CHART_MAGNETIC_TAPE", t[t.FLOW_CHART_MANUAL_INPUT = 117] = "FLOW_CHART_MANUAL_INPUT", t[t.FLOW_CHART_MANUAL_OPERATION = 118] = "FLOW_CHART_MANUAL_OPERATION", t[t.FLOW_CHART_MERGE = 119] = "FLOW_CHART_MERGE", t[t.FLOW_CHART_MULTIDOCUMENT = 120] = "FLOW_CHART_MULTIDOCUMENT", t[t.FLOW_CHART_OFFLINE_STORAGE = 121] = "FLOW_CHART_OFFLINE_STORAGE", t[t.FLOW_CHART_OFFPAGE_CONNECTOR = 122] = "FLOW_CHART_OFFPAGE_CONNECTOR", t[t.FLOW_CHART_ONLINE_STORAGE = 123] = "FLOW_CHART_ONLINE_STORAGE", t[t.FLOW_CHART_OR = 124] = "FLOW_CHART_OR", t[t.FLOW_CHART_PREDEFINED_PROCESS = 125] = "FLOW_CHART_PREDEFINED_PROCESS", t[t.FLOW_CHART_PREPARATION = 126] = "FLOW_CHART_PREPARATION", t[t.FLOW_CHART_PROCESS = 127] = "FLOW_CHART_PROCESS", t[t.FLOW_CHART_PUNCHED_CARD = 128] = "FLOW_CHART_PUNCHED_CARD", t[t.FLOW_CHART_PUNCHED_TAPE = 129] = "FLOW_CHART_PUNCHED_TAPE", t[t.FLOW_CHART_SORT = 130] = "FLOW_CHART_SORT", t[t.FLOW_CHART_SUMMING_JUNCTION = 131] = "FLOW_CHART_SUMMING_JUNCTION", t[t.FLOW_CHART_TERMINATOR = 132] = "FLOW_CHART_TERMINATOR", t[t.ARROW_EAST = 133] = "ARROW_EAST", t[t.ARROW_NORTH_EAST = 134] = "ARROW_NORTH_EAST", t[t.ARROW_NORTH = 135] = "ARROW_NORTH", t[t.SPEECH = 136] = "SPEECH", t[t.STARBURST = 137] = "STARBURST", t[t.TEARDROP = 138] = "TEARDROP", t[t.ELLIPSE_RIBBON = 139] = "ELLIPSE_RIBBON", t[t.ELLIPSE_RIBBON_2 = 140] = "ELLIPSE_RIBBON_2", t[t.CLOUD_CALLOUT = 141] = "CLOUD_CALLOUT", t[t.CUSTOM = 142] = "CUSTOM", t))(Ys || {}), ie = /* @__PURE__ */ ((t) => (t[t.GRID = 0] = "GRID", t[t.KANBAN = 1] = "KANBAN", t[t.GANTT = 2] = "GANTT", t))(ie || {}), wt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t))(wt || {}), zs = /* @__PURE__ */ ((t) => (t[t.DASH = 0] = "DASH", t[t.DASH_DOT_DOT_HEAVY = 1] = "DASH_DOT_DOT_HEAVY", t[t.DASH_DOT_HEAVY = 2] = "DASH_DOT_HEAVY", t[t.DASHED_HEAVY = 3] = "DASHED_HEAVY", t[t.DASH_LONG = 4] = "DASH_LONG", t[t.DASH_LONG_HEAVY = 5] = "DASH_LONG_HEAVY", t[t.DOT_DASH = 6] = "DOT_DASH", t[t.DOT_DOT_DASH = 7] = "DOT_DOT_DASH", t[t.DOTTED = 8] = "DOTTED", t[t.DOTTED_HEAVY = 9] = "DOTTED_HEAVY", t[t.DOUBLE = 10] = "DOUBLE", t[t.NONE = 11] = "NONE", t[t.SINGLE = 12] = "SINGLE", t[t.THICK = 13] = "THICK", t[t.WAVE = 14] = "WAVE", t[t.WAVY_DOUBLE = 15] = "WAVY_DOUBLE", t[t.WAVY_HEAVY = 16] = "WAVY_HEAVY", t[t.WORDS = 17] = "WORDS", t))(zs || {}), st = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT = 1] = "LEFT", t[t.CENTER = 2] = "CENTER", t[t.RIGHT = 3] = "RIGHT", t[t.JUSTIFIED = 4] = "JUSTIFIED", t))(st || {}), at = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.TOP = 1] = "TOP", t[t.MIDDLE = 2] = "MIDDLE", t[t.BOTTOM = 3] = "BOTTOM", t))(at || {}), Lt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.OVERFLOW = 1] = "OVERFLOW", t[t.CLIP = 2] = "CLIP", t[t.WRAP = 3] = "WRAP", t))(Lt || {}), Xt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ITALIC = 1] = "ITALIC", t))(Xt || {}), Jt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.BOLD = 1] = "BOLD", t))(Jt || {}), ct = /* @__PURE__ */ ((t) => (t[t.NORMAL = 1] = "NORMAL", t[t.SUBSCRIPT = 2] = "SUBSCRIPT", t[t.SUPERSCRIPT = 3] = "SUPERSCRIPT", t))(ct || {}), C = /* @__PURE__ */ ((t) => (t[t.FALSE = 0] = "FALSE", t[t.TRUE = 1] = "TRUE", t))(C || {}), nt = /* @__PURE__ */ ((t) => (t[t.STRING = 1] = "STRING", t[t.NUMBER = 2] = "NUMBER", t[t.BOOLEAN = 3] = "BOOLEAN", t[t.FORCE_STRING = 4] = "FORCE_STRING", t))(nt || {}), P = /* @__PURE__ */ ((t) => (t[t.DARK1 = 0] = "DARK1", t[t.LIGHT1 = 1] = "LIGHT1", t[t.DARK2 = 2] = "DARK2", t[t.LIGHT2 = 3] = "LIGHT2", t[t.ACCENT1 = 4] = "ACCENT1", t[t.ACCENT2 = 5] = "ACCENT2", t[t.ACCENT3 = 6] = "ACCENT3", t[t.ACCENT4 = 7] = "ACCENT4", t[t.ACCENT5 = 8] = "ACCENT5", t[t.ACCENT6 = 9] = "ACCENT6", t[t.HYPERLINK = 10] = "HYPERLINK", t[t.FOLLOWED_HYPERLINK = 11] = "FOLLOWED_HYPERLINK", t))(P || {}), oe = /* @__PURE__ */ ((t) => (t.OFFICE = "Office", t.OFFICE_2007_2010 = "Office 2007-2010", t.GRAYSCALE = "Grayscale", t.BLUE_WARM = "Blue Warm", t.BLUE = "Blue", t.BLUE_II = "Blue II", t.BLUE_GREEN = "Blue Green", t.GREEN = "Green", t.GREEN_YELLOW = "Green Yellow", t.YELLOW = "Yellow", t.YELLOW_ORANGE = "Yellow Orange", t.ORANGE = "Orange", t.ORANGE_RED = "Orange Red", t.RED_ORANGE = "Red Orange", t.RED = "Red", t.RED_VIOLET = "Red Violet", t.VIOLET = "Violet", t.VIOLET_II = "Violet II", t.MEDIAN = "Median", t.PAPER = "Paper", t.MARQUEE = "Marquee", t.SLIPSTREAM = "Slipstream", t.Aspect = "Aspect", t))(oe || {});
79
- const Xs = {
80
- [oe.OFFICE]: {
81
- [P.ACCENT1]: "#4472C4",
82
- [P.ACCENT2]: "#ED7D31",
83
- [P.ACCENT3]: "#A5A5A5",
84
- [P.ACCENT4]: "#70AD47",
85
- [P.ACCENT5]: "#5B9BD5",
86
- [P.ACCENT6]: "#70AD47",
87
- [P.DARK1]: "#000000",
88
- [P.DARK2]: "#44546A",
89
- [P.LIGHT1]: "#FFFFFF",
90
- [P.LIGHT2]: "#E7E6E6",
91
- [P.HYPERLINK]: "#0563C1",
92
- [P.FOLLOWED_HYPERLINK]: "#954F72"
78
+ var zs = /* @__PURE__ */ ((t) => (t[t.NUMBER_FORMAT_TYPE_UNSPECIFIED = 0] = "NUMBER_FORMAT_TYPE_UNSPECIFIED", t[t.TEXT = 1] = "TEXT", t[t.NUMBER = 2] = "NUMBER", t[t.PERCENT = 3] = "PERCENT", t[t.CURRENCY = 4] = "CURRENCY", t[t.DATE = 5] = "DATE", t[t.TIME = 6] = "TIME", t[t.DATE_TIME = 7] = "DATE_TIME", t[t.SCIENTIFIC = 8] = "SCIENTIFIC", t))(zs || {}), Xs = /* @__PURE__ */ ((t) => (t[t.INTERPOLATION_POINT_TYPE_UNSPECIFIED = 0] = "INTERPOLATION_POINT_TYPE_UNSPECIFIED", t[t.MIN = 1] = "MIN", t[t.MAX = 2] = "MAX", t[t.NUMBER = 3] = "NUMBER", t[t.PERCENT = 4] = "PERCENT", t[t.PERCENTILE = 5] = "PERCENTILE", t))(Xs || {}), ut = /* @__PURE__ */ ((t) => (t.EN_US = "enUS", t.ZH_CN = "zhCN", t))(ut || {}), Js = /* @__PURE__ */ ((t) => (t[t.RANGE = 0] = "RANGE", t[t.SHEET = 1] = "SHEET", t))(Js || {}), qs = /* @__PURE__ */ ((t) => (t[t.RELATIVE_DATE_UNSPECIFIED = 0] = "RELATIVE_DATE_UNSPECIFIED", t[t.PAST_YEAR = 1] = "PAST_YEAR", t[t.PAST_MONTH = 2] = "PAST_MONTH", t[t.PAST_WEEK = 3] = "PAST_WEEK", t[t.YESTERDAY = 4] = "YESTERDAY", t[t.TODAY = 5] = "TODAY", t[t.TOMORROW = 6] = "TOMORROW", t))(qs || {}), Zs = /* @__PURE__ */ ((t) => (t[t.TYPE_UNSPECIFIED = 0] = "TYPE_UNSPECIFIED", t[t.TEXT_BOX = 1] = "TEXT_BOX", t[t.RECTANGLE = 2] = "RECTANGLE", t[t.ROUND_RECTANGLE = 3] = "ROUND_RECTANGLE", t[t.ELLIPSE = 4] = "ELLIPSE", t[t.ARC = 5] = "ARC", t[t.BENT_ARROW = 6] = "BENT_ARROW", t[t.BENT_UP_ARROW = 7] = "BENT_UP_ARROW", t[t.BEVEL = 8] = "BEVEL", t[t.BLOCK_ARC = 9] = "BLOCK_ARC", t[t.BRACE_PAIR = 10] = "BRACE_PAIR", t[t.BRACKET_PAIR = 11] = "BRACKET_PAIR", t[t.CAN = 12] = "CAN", t[t.CHEVRON = 13] = "CHEVRON", t[t.CHORD = 14] = "CHORD", t[t.CLOUD = 15] = "CLOUD", t[t.CORNER = 16] = "CORNER", t[t.CUBE = 17] = "CUBE", t[t.CURVED_DOWN_ARROW = 18] = "CURVED_DOWN_ARROW", t[t.CURVED_LEFT_ARROW = 19] = "CURVED_LEFT_ARROW", t[t.CURVED_RIGHT_ARROW = 20] = "CURVED_RIGHT_ARROW", t[t.CURVED_UP_ARROW = 21] = "CURVED_UP_ARROW", t[t.DECAGON = 22] = "DECAGON", t[t.DIAGONAL_STRIPE = 23] = "DIAGONAL_STRIPE", t[t.DIAMOND = 24] = "DIAMOND", t[t.DODECAGON = 25] = "DODECAGON", t[t.DONUT = 26] = "DONUT", t[t.DOUBLE_WAVE = 27] = "DOUBLE_WAVE", t[t.DOWN_ARROW = 28] = "DOWN_ARROW", t[t.DOWN_ARROW_CALLOUT = 29] = "DOWN_ARROW_CALLOUT", t[t.FOLDED_CORNER = 30] = "FOLDED_CORNER", t[t.FRAME = 31] = "FRAME", t[t.HALF_FRAME = 32] = "HALF_FRAME", t[t.HEART = 33] = "HEART", t[t.HEPTAGON = 34] = "HEPTAGON", t[t.HEXAGON = 35] = "HEXAGON", t[t.HOME_PLATE = 36] = "HOME_PLATE", t[t.HORIZONTAL_SCROLL = 37] = "HORIZONTAL_SCROLL", t[t.IRREGULAR_SEAL_1 = 38] = "IRREGULAR_SEAL_1", t[t.IRREGULAR_SEAL_2 = 39] = "IRREGULAR_SEAL_2", t[t.LEFT_ARROW = 40] = "LEFT_ARROW", t[t.LEFT_ARROW_CALLOUT = 41] = "LEFT_ARROW_CALLOUT", t[t.LEFT_BRACE = 42] = "LEFT_BRACE", t[t.LEFT_BRACKET = 43] = "LEFT_BRACKET", t[t.LEFT_RIGHT_ARROW = 44] = "LEFT_RIGHT_ARROW", t[t.LEFT_RIGHT_ARROW_CALLOUT = 45] = "LEFT_RIGHT_ARROW_CALLOUT", t[t.LEFT_RIGHT_UP_ARROW = 46] = "LEFT_RIGHT_UP_ARROW", t[t.LEFT_UP_ARROW = 47] = "LEFT_UP_ARROW", t[t.LIGHTNING_BOLT = 48] = "LIGHTNING_BOLT", t[t.MATH_DIVIDE = 49] = "MATH_DIVIDE", t[t.MATH_EQUAL = 50] = "MATH_EQUAL", t[t.MATH_MINUS = 51] = "MATH_MINUS", t[t.MATH_MULTIPLY = 52] = "MATH_MULTIPLY", t[t.MATH_NOT_EQUAL = 53] = "MATH_NOT_EQUAL", t[t.MATH_PLUS = 54] = "MATH_PLUS", t[t.MOON = 55] = "MOON", t[t.NO_SMOKING = 56] = "NO_SMOKING", t[t.NOTCHED_RIGHT_ARROW = 57] = "NOTCHED_RIGHT_ARROW", t[t.OCTAGON = 58] = "OCTAGON", t[t.PARALLELOGRAM = 59] = "PARALLELOGRAM", t[t.PENTAGON = 60] = "PENTAGON", t[t.PIE = 61] = "PIE", t[t.PLAQUE = 62] = "PLAQUE", t[t.PLUS = 63] = "PLUS", t[t.QUAD_ARROW = 64] = "QUAD_ARROW", t[t.QUAD_ARROW_CALLOUT = 65] = "QUAD_ARROW_CALLOUT", t[t.RIBBON = 66] = "RIBBON", t[t.RIBBON_2 = 67] = "RIBBON_2", t[t.RIGHT_ARROW = 68] = "RIGHT_ARROW", t[t.RIGHT_ARROW_CALLOUT = 69] = "RIGHT_ARROW_CALLOUT", t[t.RIGHT_BRACE = 70] = "RIGHT_BRACE", t[t.RIGHT_BRACKET = 71] = "RIGHT_BRACKET", t[t.ROUND_1_RECTANGLE = 72] = "ROUND_1_RECTANGLE", t[t.ROUND_2_DIAGONAL_RECTANGLE = 73] = "ROUND_2_DIAGONAL_RECTANGLE", t[t.ROUND_2_SAME_RECTANGLE = 74] = "ROUND_2_SAME_RECTANGLE", t[t.RIGHT_TRIANGLE = 75] = "RIGHT_TRIANGLE", t[t.SMILEY_FACE = 76] = "SMILEY_FACE", t[t.SNIP_1_RECTANGLE = 77] = "SNIP_1_RECTANGLE", t[t.SNIP_2_DIAGONAL_RECTANGLE = 78] = "SNIP_2_DIAGONAL_RECTANGLE", t[t.SNIP_2_SAME_RECTANGLE = 79] = "SNIP_2_SAME_RECTANGLE", t[t.SNIP_ROUND_RECTANGLE = 80] = "SNIP_ROUND_RECTANGLE", t[t.STAR_10 = 81] = "STAR_10", t[t.STAR_12 = 82] = "STAR_12", t[t.STAR_16 = 83] = "STAR_16", t[t.STAR_24 = 84] = "STAR_24", t[t.STAR_32 = 85] = "STAR_32", t[t.STAR_4 = 86] = "STAR_4", t[t.STAR_5 = 87] = "STAR_5", t[t.STAR_6 = 88] = "STAR_6", t[t.STAR_7 = 89] = "STAR_7", t[t.STAR_8 = 90] = "STAR_8", t[t.STRIPED_RIGHT_ARROW = 91] = "STRIPED_RIGHT_ARROW", t[t.SUN = 92] = "SUN", t[t.TRAPEZOID = 93] = "TRAPEZOID", t[t.TRIANGLE = 94] = "TRIANGLE", t[t.UP_ARROW = 95] = "UP_ARROW", t[t.UP_ARROW_CALLOUT = 96] = "UP_ARROW_CALLOUT", t[t.UP_DOWN_ARROW = 97] = "UP_DOWN_ARROW", t[t.UTURN_ARROW = 98] = "UTURN_ARROW", t[t.VERTICAL_SCROLL = 99] = "VERTICAL_SCROLL", t[t.WAVE = 100] = "WAVE", t[t.WEDGE_ELLIPSE_CALLOUT = 101] = "WEDGE_ELLIPSE_CALLOUT", t[t.WEDGE_RECTANGLE_CALLOUT = 102] = "WEDGE_RECTANGLE_CALLOUT", t[t.WEDGE_ROUND_RECTANGLE_CALLOUT = 103] = "WEDGE_ROUND_RECTANGLE_CALLOUT", t[t.FLOW_CHART_ALTERNATE_PROCESS = 104] = "FLOW_CHART_ALTERNATE_PROCESS", t[t.FLOW_CHART_COLLATE = 105] = "FLOW_CHART_COLLATE", t[t.FLOW_CHART_CONNECTOR = 106] = "FLOW_CHART_CONNECTOR", t[t.FLOW_CHART_DECISION = 107] = "FLOW_CHART_DECISION", t[t.FLOW_CHART_DELAY = 108] = "FLOW_CHART_DELAY", t[t.FLOW_CHART_DISPLAY = 109] = "FLOW_CHART_DISPLAY", t[t.FLOW_CHART_DOCUMENT = 110] = "FLOW_CHART_DOCUMENT", t[t.FLOW_CHART_EXTRACT = 111] = "FLOW_CHART_EXTRACT", t[t.FLOW_CHART_INPUT_OUTPUT = 112] = "FLOW_CHART_INPUT_OUTPUT", t[t.FLOW_CHART_INTERNAL_STORAGE = 113] = "FLOW_CHART_INTERNAL_STORAGE", t[t.FLOW_CHART_MAGNETIC_DISK = 114] = "FLOW_CHART_MAGNETIC_DISK", t[t.FLOW_CHART_MAGNETIC_DRUM = 115] = "FLOW_CHART_MAGNETIC_DRUM", t[t.FLOW_CHART_MAGNETIC_TAPE = 116] = "FLOW_CHART_MAGNETIC_TAPE", t[t.FLOW_CHART_MANUAL_INPUT = 117] = "FLOW_CHART_MANUAL_INPUT", t[t.FLOW_CHART_MANUAL_OPERATION = 118] = "FLOW_CHART_MANUAL_OPERATION", t[t.FLOW_CHART_MERGE = 119] = "FLOW_CHART_MERGE", t[t.FLOW_CHART_MULTIDOCUMENT = 120] = "FLOW_CHART_MULTIDOCUMENT", t[t.FLOW_CHART_OFFLINE_STORAGE = 121] = "FLOW_CHART_OFFLINE_STORAGE", t[t.FLOW_CHART_OFFPAGE_CONNECTOR = 122] = "FLOW_CHART_OFFPAGE_CONNECTOR", t[t.FLOW_CHART_ONLINE_STORAGE = 123] = "FLOW_CHART_ONLINE_STORAGE", t[t.FLOW_CHART_OR = 124] = "FLOW_CHART_OR", t[t.FLOW_CHART_PREDEFINED_PROCESS = 125] = "FLOW_CHART_PREDEFINED_PROCESS", t[t.FLOW_CHART_PREPARATION = 126] = "FLOW_CHART_PREPARATION", t[t.FLOW_CHART_PROCESS = 127] = "FLOW_CHART_PROCESS", t[t.FLOW_CHART_PUNCHED_CARD = 128] = "FLOW_CHART_PUNCHED_CARD", t[t.FLOW_CHART_PUNCHED_TAPE = 129] = "FLOW_CHART_PUNCHED_TAPE", t[t.FLOW_CHART_SORT = 130] = "FLOW_CHART_SORT", t[t.FLOW_CHART_SUMMING_JUNCTION = 131] = "FLOW_CHART_SUMMING_JUNCTION", t[t.FLOW_CHART_TERMINATOR = 132] = "FLOW_CHART_TERMINATOR", t[t.ARROW_EAST = 133] = "ARROW_EAST", t[t.ARROW_NORTH_EAST = 134] = "ARROW_NORTH_EAST", t[t.ARROW_NORTH = 135] = "ARROW_NORTH", t[t.SPEECH = 136] = "SPEECH", t[t.STARBURST = 137] = "STARBURST", t[t.TEARDROP = 138] = "TEARDROP", t[t.ELLIPSE_RIBBON = 139] = "ELLIPSE_RIBBON", t[t.ELLIPSE_RIBBON_2 = 140] = "ELLIPSE_RIBBON_2", t[t.CLOUD_CALLOUT = 141] = "CLOUD_CALLOUT", t[t.CUSTOM = 142] = "CUSTOM", t))(Zs || {}), oe = /* @__PURE__ */ ((t) => (t[t.GRID = 0] = "GRID", t[t.KANBAN = 1] = "KANBAN", t[t.GANTT = 2] = "GANTT", t))(oe || {}), wt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t))(wt || {}), Qs = /* @__PURE__ */ ((t) => (t[t.DASH = 0] = "DASH", t[t.DASH_DOT_DOT_HEAVY = 1] = "DASH_DOT_DOT_HEAVY", t[t.DASH_DOT_HEAVY = 2] = "DASH_DOT_HEAVY", t[t.DASHED_HEAVY = 3] = "DASHED_HEAVY", t[t.DASH_LONG = 4] = "DASH_LONG", t[t.DASH_LONG_HEAVY = 5] = "DASH_LONG_HEAVY", t[t.DOT_DASH = 6] = "DOT_DASH", t[t.DOT_DOT_DASH = 7] = "DOT_DOT_DASH", t[t.DOTTED = 8] = "DOTTED", t[t.DOTTED_HEAVY = 9] = "DOTTED_HEAVY", t[t.DOUBLE = 10] = "DOUBLE", t[t.NONE = 11] = "NONE", t[t.SINGLE = 12] = "SINGLE", t[t.THICK = 13] = "THICK", t[t.WAVE = 14] = "WAVE", t[t.WAVY_DOUBLE = 15] = "WAVY_DOUBLE", t[t.WAVY_HEAVY = 16] = "WAVY_HEAVY", t[t.WORDS = 17] = "WORDS", t))(Qs || {}), st = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.LEFT = 1] = "LEFT", t[t.CENTER = 2] = "CENTER", t[t.RIGHT = 3] = "RIGHT", t[t.JUSTIFIED = 4] = "JUSTIFIED", t))(st || {}), at = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.TOP = 1] = "TOP", t[t.MIDDLE = 2] = "MIDDLE", t[t.BOTTOM = 3] = "BOTTOM", t))(at || {}), Lt = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.OVERFLOW = 1] = "OVERFLOW", t[t.CLIP = 2] = "CLIP", t[t.WRAP = 3] = "WRAP", t))(Lt || {}), Jt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ITALIC = 1] = "ITALIC", t))(Jt || {}), qt = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.BOLD = 1] = "BOLD", t))(qt || {}), ct = /* @__PURE__ */ ((t) => (t[t.NORMAL = 1] = "NORMAL", t[t.SUBSCRIPT = 2] = "SUBSCRIPT", t[t.SUPERSCRIPT = 3] = "SUPERSCRIPT", t))(ct || {}), C = /* @__PURE__ */ ((t) => (t[t.FALSE = 0] = "FALSE", t[t.TRUE = 1] = "TRUE", t))(C || {}), nt = /* @__PURE__ */ ((t) => (t[t.STRING = 1] = "STRING", t[t.NUMBER = 2] = "NUMBER", t[t.BOOLEAN = 3] = "BOOLEAN", t[t.FORCE_STRING = 4] = "FORCE_STRING", t))(nt || {}), x = /* @__PURE__ */ ((t) => (t[t.DARK1 = 0] = "DARK1", t[t.LIGHT1 = 1] = "LIGHT1", t[t.DARK2 = 2] = "DARK2", t[t.LIGHT2 = 3] = "LIGHT2", t[t.ACCENT1 = 4] = "ACCENT1", t[t.ACCENT2 = 5] = "ACCENT2", t[t.ACCENT3 = 6] = "ACCENT3", t[t.ACCENT4 = 7] = "ACCENT4", t[t.ACCENT5 = 8] = "ACCENT5", t[t.ACCENT6 = 9] = "ACCENT6", t[t.HYPERLINK = 10] = "HYPERLINK", t[t.FOLLOWED_HYPERLINK = 11] = "FOLLOWED_HYPERLINK", t))(x || {}), ue = /* @__PURE__ */ ((t) => (t.OFFICE = "Office", t.OFFICE_2007_2010 = "Office 2007-2010", t.GRAYSCALE = "Grayscale", t.BLUE_WARM = "Blue Warm", t.BLUE = "Blue", t.BLUE_II = "Blue II", t.BLUE_GREEN = "Blue Green", t.GREEN = "Green", t.GREEN_YELLOW = "Green Yellow", t.YELLOW = "Yellow", t.YELLOW_ORANGE = "Yellow Orange", t.ORANGE = "Orange", t.ORANGE_RED = "Orange Red", t.RED_ORANGE = "Red Orange", t.RED = "Red", t.RED_VIOLET = "Red Violet", t.VIOLET = "Violet", t.VIOLET_II = "Violet II", t.MEDIAN = "Median", t.PAPER = "Paper", t.MARQUEE = "Marquee", t.SLIPSTREAM = "Slipstream", t.Aspect = "Aspect", t))(ue || {});
79
+ const ys = {
80
+ [ue.OFFICE]: {
81
+ [x.ACCENT1]: "#4472C4",
82
+ [x.ACCENT2]: "#ED7D31",
83
+ [x.ACCENT3]: "#A5A5A5",
84
+ [x.ACCENT4]: "#70AD47",
85
+ [x.ACCENT5]: "#5B9BD5",
86
+ [x.ACCENT6]: "#70AD47",
87
+ [x.DARK1]: "#000000",
88
+ [x.DARK2]: "#44546A",
89
+ [x.LIGHT1]: "#FFFFFF",
90
+ [x.LIGHT2]: "#E7E6E6",
91
+ [x.HYPERLINK]: "#0563C1",
92
+ [x.FOLLOWED_HYPERLINK]: "#954F72"
93
93
  }
94
94
  };
95
- class ue {
95
+ class ae {
96
96
  constructor() {
97
- d(this, "_themeValue", P.LIGHT1);
97
+ d(this, "_themeValue", x.LIGHT1);
98
98
  d(this, "_themeColors");
99
99
  d(this, "_themeTint");
100
100
  d(this, "_rgbValue", "");
101
101
  d(this, "_colorType");
102
- this._colorType = B.UNSUPPORTED, this._themeColors = oe.OFFICE, this._themeTint = 0;
102
+ this._colorType = B.UNSUPPORTED, this._themeColors = ue.OFFICE, this._themeTint = 0;
103
103
  }
104
104
  asRgbColor() {
105
- return new qt(this._rgbValue, this);
105
+ return new Zt(this._rgbValue, this);
106
106
  }
107
107
  asThemeColor() {
108
- return new Zt(this._themeValue, this._themeTint, this._themeColors, this);
108
+ return new Qt(this._themeValue, this._themeTint, this._themeColors, this);
109
109
  }
110
110
  build() {
111
111
  switch (this._colorType) {
@@ -144,7 +144,7 @@ class rt {
144
144
  static hexValueToRgbColor(e) {
145
145
  e ? e.indexOf("#") > -1 && (e = e.substring(1)) : e = "#000000";
146
146
  const s = +`0x${e[0]}${e[1]}`, n = +`0x${e[2]}${e[3]}`, r = +`0x${e[4]}${e[5]}`;
147
- return new ue().setRgbColor(`rgb(${s},${n},${r})`).asRgbColor();
147
+ return new ae().setRgbColor(`rgb(${s},${n},${r})`).asRgbColor();
148
148
  }
149
149
  static hexToRgbString(e) {
150
150
  const s = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
@@ -173,7 +173,7 @@ class rt {
173
173
  return !1;
174
174
  }
175
175
  }
176
- class Js {
176
+ class tn {
177
177
  constructor(e) {
178
178
  d(this, "_saturation", 0);
179
179
  d(this, "_hue", 0);
@@ -187,7 +187,7 @@ class Js {
187
187
  this._lightness = (o + u) / 2, this._lightness < 0.5 ? this._saturation = a / (u + o) : this._saturation = a / (2 - u - o), s === u && (this._hue = (n - r) / a), n === u && (this._hue = 2 + (r - s) / a), r === u && (this._hue = 4 + (s - n) / a), this._hue *= 60, this._hue < 0 && (this._hue += 360), this._alpha = i;
188
188
  }
189
189
  asRgbColor() {
190
- const e = new ue();
190
+ const e = new ae();
191
191
  if (this._saturation === 0)
192
192
  return e.setRgbColor(
193
193
  `rgba(${this._lightness * 255},${this._lightness * 255},${this._lightness * 255},${this._alpha * 255})`
@@ -220,7 +220,7 @@ class Js {
220
220
  this._lightness = e;
221
221
  }
222
222
  }
223
- const H = class H extends rt {
223
+ const F = class F extends rt {
224
224
  constructor(s, n) {
225
225
  super(n);
226
226
  d(this, "_cssString");
@@ -228,13 +228,13 @@ const H = class H extends rt {
228
228
  d(this, "_green");
229
229
  d(this, "_blue");
230
230
  d(this, "_alpha");
231
- let r = s.match(H.RGBA_EXTRACT);
231
+ let r = s.match(F.RGBA_EXTRACT);
232
232
  if (r) {
233
233
  const i = +r[1], o = +r[2], u = +r[3], a = +r[4];
234
234
  this._cssString = s, this._red = i, this._green = o, this._blue = u, this._alpha = a;
235
235
  return;
236
236
  }
237
- if (r = s.match(H.RGB_EXTRACT), r) {
237
+ if (r = s.match(F.RGB_EXTRACT), r) {
238
238
  const i = +r[1], o = +r[2], u = +r[3];
239
239
  this._cssString = s, this._red = i, this._green = o, this._blue = u, this._alpha = 1;
240
240
  return;
@@ -245,15 +245,15 @@ const H = class H extends rt {
245
245
  return rt.rgbColorToHexValue(this);
246
246
  }
247
247
  getRed() {
248
- let s = this._red + H.RGB_COLOR_AMT;
248
+ let s = this._red + F.RGB_COLOR_AMT;
249
249
  return s > 255 ? s = 255 : s < 0 && (s = 0), s;
250
250
  }
251
251
  getGreen() {
252
- let s = this._green + H.RGB_COLOR_AMT;
252
+ let s = this._green + F.RGB_COLOR_AMT;
253
253
  return s > 255 ? s = 255 : s < 0 && (s = 0), s;
254
254
  }
255
255
  getBlue() {
256
- let s = this._blue + H.RGB_COLOR_AMT;
256
+ let s = this._blue + F.RGB_COLOR_AMT;
257
257
  return s > 255 ? s = 255 : s < 0 && (s = 0), s;
258
258
  }
259
259
  getAlpha() {
@@ -263,22 +263,22 @@ const H = class H extends rt {
263
263
  return B.RGB;
264
264
  }
265
265
  clone() {
266
- return new H(this._cssString, this._builder);
266
+ return new F(this._cssString, this._builder);
267
267
  }
268
268
  asThemeColor() {
269
269
  throw new Error("rgb color not support to themeColor");
270
270
  }
271
271
  equals(s) {
272
- return s instanceof H ? s._red === this._red && s._blue === this._blue && s._green === this._green && s._alpha === this._alpha : !1;
272
+ return s instanceof F ? s._red === this._red && s._blue === this._blue && s._green === this._green && s._alpha === this._alpha : !1;
273
273
  }
274
274
  getCssString() {
275
275
  return this._cssString;
276
276
  }
277
277
  };
278
- d(H, "RGB_COLOR_AMT", 0), d(H, "RGBA_EXTRACT", new RegExp(
278
+ d(F, "RGB_COLOR_AMT", 0), d(F, "RGBA_EXTRACT", new RegExp(
279
279
  "\\s*rgba\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d.\\d|\\d\\s*)\\)\\s*"
280
- )), d(H, "RGB_EXTRACT", new RegExp("\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*"));
281
- let qt = H;
280
+ )), d(F, "RGB_EXTRACT", new RegExp("\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*"));
281
+ let Zt = F;
282
282
  const Y = class Y extends rt {
283
283
  constructor(s, n, r, i) {
284
284
  super(i);
@@ -294,7 +294,7 @@ const Y = class Y extends rt {
294
294
  return s < 0 ? r = n * (1 + s) : r = n * (1 - s) + (255 - 255 * (1 - s)), r;
295
295
  }
296
296
  asRgbColor() {
297
- const s = Xs[this._themeColors];
297
+ const s = ys[this._themeColors];
298
298
  if (s == null)
299
299
  throw new Error("not find themeColors type");
300
300
  const n = s[this._themeColorType];
@@ -306,7 +306,7 @@ const Y = class Y extends rt {
306
306
  return r.get(this._themeColorType);
307
307
  } else
308
308
  r = /* @__PURE__ */ new Map(), Y._cacheThemeColor.set(this._themeColors, r);
309
- const i = new Js(rt.hexValueToRgbColor(n));
309
+ const i = new tn(rt.hexValueToRgbColor(n));
310
310
  i.setLightness(this.lumValue(this._themeTint, i.getLightness() * 255) / 255);
311
311
  const o = i.asRgbColor();
312
312
  return r.set(this._themeColorType, o), o;
@@ -325,8 +325,8 @@ const Y = class Y extends rt {
325
325
  }
326
326
  };
327
327
  d(Y, "_cacheThemeColor", /* @__PURE__ */ new Map());
328
- let Zt = Y;
329
- const go = "rgb(", Eo = "rgba(", Ce = {
328
+ let Qt = Y;
329
+ const Io = "rgb(", No = "rgba(", Ce = {
330
330
  aliceBlue: [240, 248, 255],
331
331
  antiqueWhite: [250, 235, 215],
332
332
  aqua: [0, 255, 255],
@@ -477,7 +477,7 @@ const go = "rgb(", Eo = "rgba(", Ce = {
477
477
  yellow: [255, 255, 0],
478
478
  yellowGreen: [154, 205, 5]
479
479
  };
480
- class k {
480
+ class $ {
481
481
  constructor(e) {
482
482
  d(this, "_color");
483
483
  d(this, "_rgbColor");
@@ -486,17 +486,17 @@ class k {
486
486
  this._setNullColor();
487
487
  return;
488
488
  }
489
- if (e instanceof k) {
489
+ if (e instanceof $) {
490
490
  this._color = { ...e._color }, this._rgbColor = { ...e._rgbColor };
491
491
  return;
492
492
  }
493
- const s = ke(e);
493
+ const s = $e(e);
494
494
  if (s == null) {
495
495
  this._setNullColor();
496
496
  return;
497
497
  }
498
498
  this._color = s;
499
- const n = tn(this._color);
499
+ const n = on(this._color);
500
500
  if (n == null) {
501
501
  this._setNullColor();
502
502
  return;
@@ -506,16 +506,16 @@ class k {
506
506
  static mix(e, s, n) {
507
507
  var l, c;
508
508
  n = Math.min(1, Math.max(0, n));
509
- const r = new k(e).toRgb(), i = new k(s).toRgb(), o = (l = r.a) != null ? l : 1, u = (c = i.a) != null ? c : 1, a = {
509
+ const r = new $(e).toRgb(), i = new $(s).toRgb(), o = (l = r.a) != null ? l : 1, u = (c = i.a) != null ? c : 1, a = {
510
510
  r: (i.r - r.r) * n + r.r,
511
511
  g: (i.g - r.g) * n + r.g,
512
512
  b: (i.b - r.b) * n + r.b,
513
513
  a: (u - o) * n + o
514
514
  };
515
- return new k(a);
515
+ return new $(a);
516
516
  }
517
517
  static getContrastRatio(e, s) {
518
- const n = new k(e).getLuminance(), r = new k(s).getLuminance();
518
+ const n = new $(e).getLuminance(), r = new $(s).getLuminance();
519
519
  return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05);
520
520
  }
521
521
  get isValid() {
@@ -541,25 +541,25 @@ class k {
541
541
  return e && u[0][0] === u[0][1] && u[1][0] === u[1][1] && u[2][0] === u[2][1] && u[3][0] === u[3][1] ? o ? `#${u[0][0]}${u[1][0]}${u[2][0]}${u[3][0]}` : `#${u[0][0]}${u[1][0]}${u[2][0]}` : o ? `#${u[0]}${u[1]}${u[2]}${u[3]}` : `#${u[0]}${u[1]}${u[2]}`;
542
542
  }
543
543
  toHsv() {
544
- return rn(this.toRgb());
544
+ return cn(this.toRgb());
545
545
  }
546
546
  toHsl() {
547
- return nn(this.toRgb());
547
+ return ln(this.toRgb());
548
548
  }
549
549
  lighten(e = 10) {
550
550
  const s = this.toHsl();
551
- return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new k(s);
551
+ return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new $(s);
552
552
  }
553
553
  darken(e = 10) {
554
554
  const s = this.toHsl();
555
- return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new k(s);
555
+ return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new $(s);
556
556
  }
557
557
  setAlpha(e) {
558
- return new k({ ...this._rgbColor, a: e });
558
+ return new $({ ...this._rgbColor, a: e });
559
559
  }
560
560
  getLuminance() {
561
561
  let { r: e, g: s, b: n } = this.toRgb();
562
- return e = Ht(e), s = Ht(s), n = Ht(n), Number((0.2126 * e + 0.7152 * s + 0.0722 * n).toFixed(3));
562
+ return e = Ft(e), s = Ft(s), n = Ft(n), Number((0.2126 * e + 0.7152 * s + 0.0722 * n).toFixed(3));
563
563
  }
564
564
  getBrightness() {
565
565
  const { r: e, g: s, b: n } = this.toRgb();
@@ -589,8 +589,8 @@ class k {
589
589
  };
590
590
  }
591
591
  }
592
- const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4), ke = (t) => {
593
- if (un(t)) {
592
+ const _t = (t) => t.length === 1 ? `0${t}` : t, Ft = (t) => (t /= 255, t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4), $e = (t) => {
593
+ if (dn(t)) {
594
594
  if ("r" in t) {
595
595
  const n = {
596
596
  r: Math.round(t.r),
@@ -624,14 +624,14 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
624
624
  return n.a = s[3] || 1, n;
625
625
  }
626
626
  if (e.startsWith("#"))
627
- return qs(e);
627
+ return en(e);
628
628
  if (e.startsWith("rgb"))
629
- return Zs(e);
629
+ return sn(e);
630
630
  if (e.startsWith("hsl"))
631
- return Qs(e);
631
+ return nn(e);
632
632
  if (e.startsWith("hsv"))
633
- return ys(e);
634
- }, qs = (t) => {
633
+ return rn(e);
634
+ }, en = (t) => {
635
635
  const e = t.substring(1), s = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g");
636
636
  let n = e.match(s);
637
637
  if (!n || n.length < 3)
@@ -643,7 +643,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
643
643
  b: Number.parseInt(n[2], 16)
644
644
  };
645
645
  return n.length > 3 && (r.a = Number.parseInt(n[3], 16) / 255), r;
646
- }, Zs = (t) => {
646
+ }, sn = (t) => {
647
647
  const e = t.indexOf("(");
648
648
  if (e === -1)
649
649
  throw new Error(`The color '${t}' is illegal rgb color`);
@@ -656,7 +656,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
656
656
  b: Number.parseInt(s[2], 10)
657
657
  };
658
658
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
659
- }, Qs = (t) => {
659
+ }, nn = (t) => {
660
660
  const e = t.indexOf("(");
661
661
  if (e === -1)
662
662
  throw new Error(`The color '${t}' is illegal hsl color`);
@@ -669,7 +669,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
669
669
  l: Number.parseFloat(s[2])
670
670
  };
671
671
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
672
- }, ys = (t) => {
672
+ }, rn = (t) => {
673
673
  const e = t.indexOf("(");
674
674
  if (e === -1)
675
675
  throw new Error(`The color '${t}' is illegal hsv color`);
@@ -682,11 +682,11 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
682
682
  v: Number.parseFloat(s[2])
683
683
  };
684
684
  return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
685
- }, tn = (t) => {
686
- const e = ke(t);
685
+ }, on = (t) => {
686
+ const e = $e(t);
687
687
  if (e != null)
688
- return "r" in e ? e : "l" in e ? en(e) : sn(e);
689
- }, Ft = (t, e, s) => (s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (e - t) * 6 * s : s < 1 / 2 ? e : s < 2 / 3 ? t + (e - t) * (2 / 3 - s) * 6 : t), en = (t) => {
688
+ return "r" in e ? e : "l" in e ? un(e) : an(e);
689
+ }, Wt = (t, e, s) => (s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (e - t) * 6 * s : s < 1 / 2 ? e : s < 2 / 3 ? t + (e - t) * (2 / 3 - s) * 6 : t), un = (t) => {
690
690
  let { h: e, s, l: n } = t;
691
691
  e /= 360, s /= 100, n /= 100;
692
692
  let r = 0, i = 0, o = 0;
@@ -694,7 +694,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
694
694
  r = i = o = n;
695
695
  else {
696
696
  const a = n < 0.5 ? n * (1 + s) : n + s - n * s, l = 2 * n - a;
697
- r = Ft(l, a, e + 1 / 3), i = Ft(l, a, e), o = Ft(l, a, e - 1 / 3);
697
+ r = Wt(l, a, e + 1 / 3), i = Wt(l, a, e), o = Wt(l, a, e - 1 / 3);
698
698
  }
699
699
  const u = {
700
700
  r: Math.round(r * 255),
@@ -702,7 +702,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
702
702
  b: Math.round(o * 255)
703
703
  };
704
704
  return t.a !== void 0 && (u.a = t.a), u;
705
- }, sn = (t) => {
705
+ }, an = (t) => {
706
706
  let { h: e, s, v: n } = t;
707
707
  e = e / 360 * 6, s /= 100, n /= 100;
708
708
  const r = Math.floor(e), i = e - r, o = n * (1 - s), u = n * (1 - i * s), a = n * (1 - (1 - i) * s), l = r % 6, c = [n, u, o, o, a, n][l], h = [a, n, n, u, o, o][l], _ = [o, o, a, n, n, u][l], f = {
@@ -711,7 +711,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
711
711
  b: _ * 255
712
712
  };
713
713
  return t.a !== void 0 && (f.a = t.a), f;
714
- }, nn = (t) => {
714
+ }, ln = (t) => {
715
715
  let { r: e, g: s, b: n } = t;
716
716
  e /= 255, s /= 255, n /= 255;
717
717
  const r = Math.max(e, s, n), i = Math.min(e, s, n), o = (r + i) / 2;
@@ -739,7 +739,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
739
739
  l: Math.round(o * 100)
740
740
  };
741
741
  return t.a !== void 0 && (l.a = t.a), l;
742
- }, rn = (t) => {
742
+ }, cn = (t) => {
743
743
  let { r: e, g: s, b: n } = t;
744
744
  e /= 255, s /= 255, n /= 255;
745
745
  const r = Math.max(e, s, n), i = Math.min(e, s, n);
@@ -767,20 +767,20 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ht = (t) => (t /= 255, t <= 0.03
767
767
  v: Math.round(u * 100)
768
768
  };
769
769
  return t.a !== void 0 && (c.a = t.a), c;
770
- }, on = (t) => t == null, un = (t) => !on(t) && typeof t == "object";
771
- function Ro(t) {
770
+ }, hn = (t) => t == null, dn = (t) => !hn(t) && typeof t == "object";
771
+ function So(t) {
772
772
  const e = /^#(?:[0]{3}|[0]{6})\b/, s = /^rgb\s*\(\s*0+\s*,\s*0+\s*,\s*0+\s*\)$/, n = /^rgba\s*\(\s*0+\s*,\s*0+\s*,\s*0+\s*,\s*(1|1\.0*|0?\.\d+)\)$/, r = /^hsl\s*\(\s*0*\s*,\s*0%*\s*,\s*0%*\s*\)$/, i = /^hsla\s*\(\s*0*\s*,\s*0%*\s*,\s*0%*\s*,\s*(1|1\.0*|0?\.\d+)\)$/;
773
773
  return !!(e.test(t) || s.test(t) || n.test(t) || r.test(t) || i.test(t));
774
774
  }
775
- function mo(t) {
775
+ function wo(t) {
776
776
  const e = /^#(?:[Ff]{3}|[Ff]{6})\b/, s = /^rgb\s*\(\s*255\s*,\s*255\s*,\s*255\s*\)$/, n = /^rgba\s*\(\s*255\s*,\s*255\s*,\s*255\s*,\s*(1|1\.0*|0?\.\d+)\)$/, r = /^hsl\s*\(\s*0*\s*,\s*0%*\s*,\s*100%*\s*\)$/, i = /^hsla\s*\(\s*0*\s*,\s*0%*\s*,\s*100%*\s*,\s*(1|1\.0*|0?\.\d+)\)$/;
777
777
  return !!(e.test(t) || s.test(t) || n.test(t) || r.test(t) || i.test(t));
778
778
  }
779
779
  var D = /* @__PURE__ */ ((t) => (t[t.COVER = 0] = "COVER", t[t.REPLACE = 1] = "REPLACE", t[t.INTERSECTION = 2] = "INTERSECTION", t))(D || {});
780
- function Co(t) {
780
+ function Lo(t) {
781
781
  return t && (t.s !== void 0 || t.p !== void 0 || t.v !== void 0 || t.t !== void 0 || t.f !== void 0 || t.si !== void 0);
782
782
  }
783
- function Oo(t) {
783
+ function bo(t) {
784
784
  if (t.t !== void 0)
785
785
  return t.t;
786
786
  if (typeof t.v == "string")
@@ -790,22 +790,22 @@ function Oo(t) {
790
790
  if (typeof t.v == "boolean")
791
791
  return nt.BOOLEAN;
792
792
  }
793
- function Ao(t) {
793
+ function vo(t) {
794
794
  if (t == null)
795
795
  return !0;
796
796
  const { v: e, f: s, si: n, p: r, s: i } = t;
797
797
  return !(!(e == null || typeof e == "string" && e.length === 0) || s != null && s.length > 0 || n != null && n.length > 0 || r != null);
798
798
  }
799
- function Io(t) {
799
+ function Uo(t) {
800
800
  return t != null && (typeof t == "string" || typeof t == "number" || typeof t == "boolean");
801
801
  }
802
- var an = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(an || {}), ln = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(ln || {}), Ct = /* @__PURE__ */ ((t) => (t[t.GLYPH_TYPE_UNSPECIFIED = 0] = "GLYPH_TYPE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.DECIMAL = 2] = "DECIMAL", t[t.ZERO_DECIMAL = 3] = "ZERO_DECIMAL", t[t.UPPER_ALPHA = 4] = "UPPER_ALPHA", t[t.ALPHA = 5] = "ALPHA", t[t.UPPER_ROMAN = 6] = "UPPER_ROMAN", t[t.ROMAN = 7] = "ROMAN", t))(Ct || {}), X = /* @__PURE__ */ ((t) => (t[t.BULLET_ALIGNMENT_UNSPECIFIED = 0] = "BULLET_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(X || {}), cn = /* @__PURE__ */ ((t) => (t[t.HYPERLINK = 0] = "HYPERLINK", t[t.FIELD = 1] = "FIELD", t[t.SDT = 2] = "SDT", t[t.BOOKMARK = 3] = "BOOKMARK", t[t.COMMENT = 4] = "COMMENT", t[t.CUSTOM = 5] = "CUSTOM", t))(cn || {}), hn = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(hn || {}), dn = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LINES = 1] = "LINES", t[t.LINES_AND_CHARS = 2] = "LINES_AND_CHARS", t[t.SNAP_TO_CHARS = 3] = "SNAP_TO_CHARS", t))(dn || {}), _n = /* @__PURE__ */ ((t) => (t[t.SECTION_TYPE_UNSPECIFIED = 0] = "SECTION_TYPE_UNSPECIFIED", t[t.CONTINUOUS = 1] = "CONTINUOUS", t[t.NEXT_PAGE = 2] = "NEXT_PAGE", t[t.EVEN_PAGE = 3] = "EVEN_PAGE", t[t.ODD_PAGE = 4] = "ODD_PAGE", t))(_n || {}), fn = /* @__PURE__ */ ((t) => (t[t.COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0] = "COLUMN_SEPARATOR_STYLE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.BETWEEN_EACH_COLUMN = 2] = "BETWEEN_EACH_COLUMN", t))(fn || {}), gn = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(gn || {}), En = /* @__PURE__ */ ((t) => (t[t.TEXT_RUN = 0] = "TEXT_RUN", t[t.AUTO_TEXT = 1] = "AUTO_TEXT", t[t.PAGE_BREAK = 2] = "PAGE_BREAK", t[t.COLUMN_BREAK = 3] = "COLUMN_BREAK", t[t.FOOT_NOTE_REFERENCE = 4] = "FOOT_NOTE_REFERENCE", t[t.HORIZONTAL_RULE = 5] = "HORIZONTAL_RULE", t[t.EQUATION = 6] = "EQUATION", t[t.DRAWING = 7] = "DRAWING", t[t.PERSON = 8] = "PERSON", t[t.RICH_LINK = 9] = "RICH_LINK", t))(En || {}), Rn = /* @__PURE__ */ ((t) => (t[t.BOTH_SIDES = 0] = "BOTH_SIDES", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.LARGEST = 3] = "LARGEST", t))(Rn || {}), mn = /* @__PURE__ */ ((t) => (t[t.INLINE = 0] = "INLINE", t[t.WRAP_NONE = 1] = "WRAP_NONE", t[t.WRAP_POLYGON = 2] = "WRAP_POLYGON", t[t.WRAP_SQUARE = 3] = "WRAP_SQUARE", t[t.WRAP_THROUGH = 4] = "WRAP_THROUGH", t[t.WRAP_TIGHT = 5] = "WRAP_TIGHT", t[t.WRAP_TOP_AND_BOTTOM = 6] = "WRAP_TOP_AND_BOTTOM", t))(mn || {}), Cn = /* @__PURE__ */ ((t) => (t[t.NAMED_STYLE_TYPE_UNSPECIFIED = 0] = "NAMED_STYLE_TYPE_UNSPECIFIED", t[t.NORMAL_TEXT = 1] = "NORMAL_TEXT", t[t.TITLE = 2] = "TITLE", t[t.SUBTITLE = 3] = "SUBTITLE", t[t.HEADING_1 = 4] = "HEADING_1", t[t.HEADING_2 = 5] = "HEADING_2", t[t.HEADING_3 = 6] = "HEADING_3", t[t.HEADING_4 = 7] = "HEADING_4", t[t.HEADING_5 = 8] = "HEADING_5", t[t.HEADING_6 = 9] = "HEADING_6", t))(Cn || {}), On = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(On || {}), An = /* @__PURE__ */ ((t) => (t[t.DASH_STYLE_UNSPECIFIED = 0] = "DASH_STYLE_UNSPECIFIED", t[t.SOLID = 1] = "SOLID", t[t.DOT = 2] = "DOT", t[t.DASH = 3] = "DASH", t))(An || {}), In = /* @__PURE__ */ ((t) => (t[t.TAB_STOP_ALIGNMENT_UNSPECIFIED = 0] = "TAB_STOP_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(In || {}), Nn = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(Nn || {}), Sn = /* @__PURE__ */ ((t) => (t[t.CONTENT_ALIGNMENT_UNSPECIFIED = 0] = "CONTENT_ALIGNMENT_UNSPECIFIED", t[t.CONTENT_ALIGNMENT_UNSUPPORTED = 1] = "CONTENT_ALIGNMENT_UNSUPPORTED", t[t.TOP = 2] = "TOP", t[t.MIDDLE = 3] = "MIDDLE", t[t.BOTTOM = 4] = "BOTTOM", t))(Sn || {}), wn = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(wn || {}), Ln = /* @__PURE__ */ ((t) => (t[t.CHARACTER = 0] = "CHARACTER", t[t.COLUMN = 1] = "COLUMN", t[t.INSIDE_MARGIN = 2] = "INSIDE_MARGIN", t[t.LEFT_MARGIN = 3] = "LEFT_MARGIN", t[t.MARGIN = 4] = "MARGIN", t[t.OUTSIDE_MARGIN = 5] = "OUTSIDE_MARGIN", t[t.PAGE = 6] = "PAGE", t[t.RIGHT_MARGIN = 7] = "RIGHT_MARGIN", t))(Ln || {}), bn = /* @__PURE__ */ ((t) => (t[t.BOTTOM_MARGIN = 0] = "BOTTOM_MARGIN", t[t.INSIDE_MARGIN = 1] = "INSIDE_MARGIN", t[t.LINE = 2] = "LINE", t[t.MARGIN = 3] = "MARGIN", t[t.OUTSIDE_MARGIN = 4] = "OUTSIDE_MARGIN", t[t.PAGE = 5] = "PAGE", t[t.PARAGRAPH = 6] = "PARAGRAPH", t[t.TOP_MARGIN = 7] = "TOP_MARGIN", t))(bn || {}), vn = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(vn || {}), Un = /* @__PURE__ */ ((t) => (t[t.CENTER = 0] = "CENTER", t[t.INSIDE = 1] = "INSIDE", t[t.LEFT = 2] = "LEFT", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.RIGHT = 4] = "RIGHT", t))(Un || {}), Tn = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.CENTER = 1] = "CENTER", t[t.INSIDE = 2] = "INSIDE", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.TOP = 4] = "TOP", t))(Tn || {}), Mn = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(Mn || {}), Dn = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(Dn || {}), p = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(p || {}), L = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(L || {});
803
- function No(t) {
802
+ var _n = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(_n || {}), fn = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(fn || {}), Ct = /* @__PURE__ */ ((t) => (t[t.GLYPH_TYPE_UNSPECIFIED = 0] = "GLYPH_TYPE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.DECIMAL = 2] = "DECIMAL", t[t.ZERO_DECIMAL = 3] = "ZERO_DECIMAL", t[t.UPPER_ALPHA = 4] = "UPPER_ALPHA", t[t.ALPHA = 5] = "ALPHA", t[t.UPPER_ROMAN = 6] = "UPPER_ROMAN", t[t.ROMAN = 7] = "ROMAN", t))(Ct || {}), X = /* @__PURE__ */ ((t) => (t[t.BULLET_ALIGNMENT_UNSPECIFIED = 0] = "BULLET_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(X || {}), gn = /* @__PURE__ */ ((t) => (t[t.HYPERLINK = 0] = "HYPERLINK", t[t.FIELD = 1] = "FIELD", t[t.SDT = 2] = "SDT", t[t.BOOKMARK = 3] = "BOOKMARK", t[t.COMMENT = 4] = "COMMENT", t[t.CUSTOM = 5] = "CUSTOM", t))(gn || {}), En = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(En || {}), Rn = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LINES = 1] = "LINES", t[t.LINES_AND_CHARS = 2] = "LINES_AND_CHARS", t[t.SNAP_TO_CHARS = 3] = "SNAP_TO_CHARS", t))(Rn || {}), mn = /* @__PURE__ */ ((t) => (t[t.SECTION_TYPE_UNSPECIFIED = 0] = "SECTION_TYPE_UNSPECIFIED", t[t.CONTINUOUS = 1] = "CONTINUOUS", t[t.NEXT_PAGE = 2] = "NEXT_PAGE", t[t.EVEN_PAGE = 3] = "EVEN_PAGE", t[t.ODD_PAGE = 4] = "ODD_PAGE", t))(mn || {}), Cn = /* @__PURE__ */ ((t) => (t[t.COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0] = "COLUMN_SEPARATOR_STYLE_UNSPECIFIED", t[t.NONE = 1] = "NONE", t[t.BETWEEN_EACH_COLUMN = 2] = "BETWEEN_EACH_COLUMN", t))(Cn || {}), On = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(On || {}), An = /* @__PURE__ */ ((t) => (t[t.TEXT_RUN = 0] = "TEXT_RUN", t[t.AUTO_TEXT = 1] = "AUTO_TEXT", t[t.PAGE_BREAK = 2] = "PAGE_BREAK", t[t.COLUMN_BREAK = 3] = "COLUMN_BREAK", t[t.FOOT_NOTE_REFERENCE = 4] = "FOOT_NOTE_REFERENCE", t[t.HORIZONTAL_RULE = 5] = "HORIZONTAL_RULE", t[t.EQUATION = 6] = "EQUATION", t[t.DRAWING = 7] = "DRAWING", t[t.PERSON = 8] = "PERSON", t[t.RICH_LINK = 9] = "RICH_LINK", t))(An || {}), In = /* @__PURE__ */ ((t) => (t[t.BOTH_SIDES = 0] = "BOTH_SIDES", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.LARGEST = 3] = "LARGEST", t))(In || {}), Nn = /* @__PURE__ */ ((t) => (t[t.INLINE = 0] = "INLINE", t[t.WRAP_NONE = 1] = "WRAP_NONE", t[t.WRAP_POLYGON = 2] = "WRAP_POLYGON", t[t.WRAP_SQUARE = 3] = "WRAP_SQUARE", t[t.WRAP_THROUGH = 4] = "WRAP_THROUGH", t[t.WRAP_TIGHT = 5] = "WRAP_TIGHT", t[t.WRAP_TOP_AND_BOTTOM = 6] = "WRAP_TOP_AND_BOTTOM", t))(Nn || {}), Sn = /* @__PURE__ */ ((t) => (t[t.NAMED_STYLE_TYPE_UNSPECIFIED = 0] = "NAMED_STYLE_TYPE_UNSPECIFIED", t[t.NORMAL_TEXT = 1] = "NORMAL_TEXT", t[t.TITLE = 2] = "TITLE", t[t.SUBTITLE = 3] = "SUBTITLE", t[t.HEADING_1 = 4] = "HEADING_1", t[t.HEADING_2 = 5] = "HEADING_2", t[t.HEADING_3 = 6] = "HEADING_3", t[t.HEADING_4 = 7] = "HEADING_4", t[t.HEADING_5 = 8] = "HEADING_5", t[t.HEADING_6 = 9] = "HEADING_6", t))(Sn || {}), wn = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(wn || {}), Ln = /* @__PURE__ */ ((t) => (t[t.DASH_STYLE_UNSPECIFIED = 0] = "DASH_STYLE_UNSPECIFIED", t[t.SOLID = 1] = "SOLID", t[t.DOT = 2] = "DOT", t[t.DASH = 3] = "DASH", t))(Ln || {}), bn = /* @__PURE__ */ ((t) => (t[t.TAB_STOP_ALIGNMENT_UNSPECIFIED = 0] = "TAB_STOP_ALIGNMENT_UNSPECIFIED", t[t.START = 1] = "START", t[t.CENTER = 2] = "CENTER", t[t.END = 3] = "END", t))(bn || {}), vn = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(vn || {}), Un = /* @__PURE__ */ ((t) => (t[t.CONTENT_ALIGNMENT_UNSPECIFIED = 0] = "CONTENT_ALIGNMENT_UNSPECIFIED", t[t.CONTENT_ALIGNMENT_UNSUPPORTED = 1] = "CONTENT_ALIGNMENT_UNSUPPORTED", t[t.TOP = 2] = "TOP", t[t.MIDDLE = 3] = "MIDDLE", t[t.BOTTOM = 4] = "BOTTOM", t))(Un || {}), Tn = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(Tn || {}), Mn = /* @__PURE__ */ ((t) => (t[t.PAGE = 0] = "PAGE", t[t.COLUMN = 1] = "COLUMN", t[t.CHARACTER = 2] = "CHARACTER", t[t.MARGIN = 3] = "MARGIN", t[t.INSIDE_MARGIN = 4] = "INSIDE_MARGIN", t[t.OUTSIDE_MARGIN = 5] = "OUTSIDE_MARGIN", t[t.LEFT_MARGIN = 6] = "LEFT_MARGIN", t[t.RIGHT_MARGIN = 7] = "RIGHT_MARGIN", t))(Mn || {}), Dn = /* @__PURE__ */ ((t) => (t[t.PAGE = 0] = "PAGE", t[t.PARAGRAPH = 1] = "PARAGRAPH", t[t.LINE = 2] = "LINE", t[t.MARGIN = 3] = "MARGIN", t[t.TOP_MARGIN = 4] = "TOP_MARGIN", t[t.BOTTOM_MARGIN = 5] = "BOTTOM_MARGIN", t[t.INSIDE_MARGIN = 6] = "INSIDE_MARGIN", t[t.OUTSIDE_MARGIN = 7] = "OUTSIDE_MARGIN", t))(Dn || {}), pn = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(pn || {}), xn = /* @__PURE__ */ ((t) => (t[t.CENTER = 0] = "CENTER", t[t.INSIDE = 1] = "INSIDE", t[t.LEFT = 2] = "LEFT", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.RIGHT = 4] = "RIGHT", t))(xn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.CENTER = 1] = "CENTER", t[t.INSIDE = 2] = "INSIDE", t[t.OUTSIDE = 3] = "OUTSIDE", t[t.TOP = 4] = "TOP", t))(Pn || {}), Hn = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(Hn || {}), Fn = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(Fn || {}), p = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(p || {}), L = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(L || {});
803
+ function To(t) {
804
804
  return [t.startRow, t.startColumn, t.endRow, t.endColumn];
805
805
  }
806
- var $e = /* @__PURE__ */ ((t) => (t[t.SLIDE = 0] = "SLIDE", t[t.MASTER = 1] = "MASTER", t[t.LAYOUT = 2] = "LAYOUT", t[t.HANDOUT_MASTER = 3] = "HANDOUT_MASTER", t[t.NOTES_MASTER = 4] = "NOTES_MASTER", t))($e || {}), pn = /* @__PURE__ */ ((t) => (t[t.SHAPE = 0] = "SHAPE", t[t.IMAGE = 1] = "IMAGE", t[t.TEXT = 2] = "TEXT", t[t.SPREADSHEET = 3] = "SPREADSHEET", t[t.DOCUMENT = 4] = "DOCUMENT", t[t.SLIDE = 5] = "SLIDE", t))(pn || {}), Pn = /* @__PURE__ */ ((t) => (t[t.RELATIVE_SLIDE_LINK_UNSPECIFIED = 0] = "RELATIVE_SLIDE_LINK_UNSPECIFIED", t[t.NEXT_SLIDE = 1] = "NEXT_SLIDE", t[t.PREVIOUS_SLIDE = 2] = "PREVIOUS_SLIDE", t[t.FIRST_SLIDE = 3] = "FIRST_SLIDE", t[t.LAST_SLIDE = 4] = "LAST_SLIDE", t))(Pn || {});
807
- const xn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
808
- let Hn = (t) => crypto.getRandomValues(new Uint8Array(t)), Fn = (t, e, s) => {
806
+ var ke = /* @__PURE__ */ ((t) => (t[t.SLIDE = 0] = "SLIDE", t[t.MASTER = 1] = "MASTER", t[t.LAYOUT = 2] = "LAYOUT", t[t.HANDOUT_MASTER = 3] = "HANDOUT_MASTER", t[t.NOTES_MASTER = 4] = "NOTES_MASTER", t))(ke || {}), Wn = /* @__PURE__ */ ((t) => (t[t.SHAPE = 0] = "SHAPE", t[t.IMAGE = 1] = "IMAGE", t[t.TEXT = 2] = "TEXT", t[t.SPREADSHEET = 3] = "SPREADSHEET", t[t.DOCUMENT = 4] = "DOCUMENT", t[t.SLIDE = 5] = "SLIDE", t))(Wn || {}), Gn = /* @__PURE__ */ ((t) => (t[t.RELATIVE_SLIDE_LINK_UNSPECIFIED = 0] = "RELATIVE_SLIDE_LINK_UNSPECIFIED", t[t.NEXT_SLIDE = 1] = "NEXT_SLIDE", t[t.PREVIOUS_SLIDE = 2] = "PREVIOUS_SLIDE", t[t.FIRST_SLIDE = 3] = "FIRST_SLIDE", t[t.LAST_SLIDE = 4] = "LAST_SLIDE", t))(Gn || {});
807
+ const Bn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
808
+ let $n = (t) => crypto.getRandomValues(new Uint8Array(t)), kn = (t, e, s) => {
809
809
  let n = (2 << Math.log(t.length - 1) / Math.LN2) - 1, r = -~(1.6 * n * e / t.length);
810
810
  return (i = e) => {
811
811
  let o = "";
@@ -816,13 +816,13 @@ let Hn = (t) => crypto.getRandomValues(new Uint8Array(t)), Fn = (t, e, s) => {
816
816
  return o;
817
817
  }
818
818
  };
819
- }, Wn = (t, e = 21) => Fn(t, e, Hn), Gn = (t = 21) => {
819
+ }, Vn = (t, e = 21) => kn(t, e, $n), jn = (t = 21) => {
820
820
  let e = "", s = crypto.getRandomValues(new Uint8Array(t));
821
821
  for (; t--; )
822
- e += xn[s[t] & 63];
822
+ e += Bn[s[t] & 63];
823
823
  return e;
824
824
  };
825
- const Bn = /^-ms-/, kn = /-([a-z])/g, K = [
825
+ const Kn = /^-ms-/, Yn = /-([a-z])/g, K = [
826
826
  "A",
827
827
  "B",
828
828
  "C",
@@ -905,7 +905,7 @@ class R {
905
905
  return o ? "FF" : s ? "Opera" : u ? "Safari" : a ? "Chrome" : i ? "Edge" : r ? "IE11" : "Unknown browser";
906
906
  }
907
907
  static generateRandomId(e = 21, s) {
908
- return s ? Wn(s, e)() : Gn(e);
908
+ return s ? Vn(s, e)() : jn(e);
909
909
  }
910
910
  static getClassName(e) {
911
911
  return e.constructor.name;
@@ -1108,7 +1108,7 @@ class R {
1108
1108
  // Support: IE <=9 - 11, Edge 12 - 15
1109
1109
  // Microsoft forgot to hump their vendor prefix (#9572)
1110
1110
  static camelCase(e) {
1111
- return e.replace(Bn, "ms-").replace(kn, this.fCamelCase);
1111
+ return e.replace(Kn, "ms-").replace(Yn, this.fCamelCase);
1112
1112
  }
1113
1113
  /**
1114
1114
  * remove all null from object
@@ -1234,7 +1234,7 @@ class R {
1234
1234
  return !s && n;
1235
1235
  }
1236
1236
  }
1237
- function So(t) {
1237
+ function Mo(t) {
1238
1238
  if (!t)
1239
1239
  return;
1240
1240
  const { actualRow: e, actualColumn: s, isMerged: n, isMergedMainCell: r, mergeInfo: i } = t;
@@ -1263,7 +1263,7 @@ function So(t) {
1263
1263
  endX: l
1264
1264
  };
1265
1265
  }
1266
- function wo(t) {
1266
+ function Do(t) {
1267
1267
  if (!t)
1268
1268
  return;
1269
1269
  const {
@@ -1284,7 +1284,7 @@ function wo(t) {
1284
1284
  endColumn: _
1285
1285
  };
1286
1286
  }
1287
- function Lo(t) {
1287
+ function po(t) {
1288
1288
  var s;
1289
1289
  return !t || (((s = t == null ? void 0 : t.v) == null ? void 0 : s.toString()) || "").length === 0 && !t.p;
1290
1290
  }
@@ -1293,20 +1293,20 @@ function V(t) {
1293
1293
  if (t.rgb)
1294
1294
  return t.rgb;
1295
1295
  if (t.th)
1296
- return new ue().setThemeColor(t.th).asThemeColor().asRgbColor().getCssString();
1296
+ return new ae().setThemeColor(t.th).asThemeColor().asRgbColor().getCssString();
1297
1297
  }
1298
1298
  return null;
1299
1299
  }
1300
- function bo(t) {
1300
+ function xo(t) {
1301
1301
  return R.isString(t) && t.substring(0, 1) === "=" && t.length > 1;
1302
1302
  }
1303
- function vo(t) {
1303
+ function Po(t) {
1304
1304
  return R.isString(t) && t.length > 0;
1305
1305
  }
1306
- function Uo(t) {
1306
+ function Ho(t) {
1307
1307
  return "";
1308
1308
  }
1309
- function To(t, e = !1) {
1309
+ function Fo(t, e = !1) {
1310
1310
  var i;
1311
1311
  let s = "";
1312
1312
  const n = /* @__PURE__ */ new Map([
@@ -1431,7 +1431,7 @@ function ft(t) {
1431
1431
  let e = "";
1432
1432
  return t === S.NONE ? e = "none" : t === S.THIN ? e = "0.5pt solid" : t === S.HAIR ? e = "0.5pt double" : t === S.DOTTED ? e = "0.5pt dotted" : t === S.DASHED || t === S.DASH_DOT ? e = "0.5pt dashed" : t === S.DASH_DOT_DOT ? e = "0.5pt dotted" : t === S.DOUBLE ? e = "0.5pt double" : t === S.MEDIUM ? e = "1pt solid" : t === S.MEDIUM_DASHED || t === S.MEDIUM_DASH_DOT ? e = "1pt dashed" : t === S.MEDIUM_DASH_DOT_DOT ? e = "1pt dotted" : t === S.SLANT_DASH_DOT ? e = "0.5pt dashed" : t === S.THICK && (e = "1.5pt solid"), e;
1433
1433
  }
1434
- function Mo(t) {
1434
+ function Wo(t) {
1435
1435
  let e = 0;
1436
1436
  if (t = t.trim(), t === "none")
1437
1437
  e = S.NONE;
@@ -1457,7 +1457,7 @@ function Mo(t) {
1457
1457
  return S.NONE;
1458
1458
  return e;
1459
1459
  }
1460
- function Wt(t, e) {
1460
+ function Gt(t, e) {
1461
1461
  let s = t.body;
1462
1462
  if (e) {
1463
1463
  const { headers: n, footers: r } = t;
@@ -1465,21 +1465,21 @@ function Wt(t, e) {
1465
1465
  }
1466
1466
  return s;
1467
1467
  }
1468
- function Do(t) {
1468
+ function Go(t) {
1469
1469
  const { startRow: e, endRow: s, startColumn: n, endColumn: r, rangeType: i } = t;
1470
1470
  return !(e < 0 || n < 0 || s < 0 || r < 0 || !(Number.isNaN(e) && Number.isNaN(s)) && i === p.COLUMN || !(Number.isNaN(n) && Number.isNaN(r)) && i === p.ROW);
1471
1471
  }
1472
- function po(t, e) {
1472
+ function Bo(t, e) {
1473
1473
  return { startRow: t, endRow: t, startColumn: e, endColumn: e };
1474
1474
  }
1475
1475
  function Ve(t, e) {
1476
1476
  return Object.prototype.toString.call(t) === Object.prototype.toString.call(e) ? Object.prototype.toString.call(t) === "[object Object]" || Object.prototype.toString.call(t) === "[object Array]" ? Object.keys(t).length !== Object.keys(e).length ? !1 : Object.keys(t).every((s) => Ve(t[s], e[s])) : t === e : !1;
1477
1477
  }
1478
- function $n(t, e) {
1478
+ function zn(t, e) {
1479
1479
  const s = t.ts || {}, n = e.ts || {};
1480
1480
  return t.sId !== e.sId ? !1 : Ve(s, n);
1481
1481
  }
1482
- function Po(t, e) {
1482
+ function $o(t, e) {
1483
1483
  return e.some((s) => t.indexOf(s) > -1);
1484
1484
  }
1485
1485
  function je(t, e, s, n) {
@@ -1490,31 +1490,31 @@ function je(t, e, s, n) {
1490
1490
  let i = [];
1491
1491
  return t === s ? i = [n + 1 - r, e - r] : e === n ? i = [t, s - 1] : i = [t, e - r], i;
1492
1492
  }
1493
- function xo(t) {
1493
+ function ko(t) {
1494
1494
  if (t == null)
1495
1495
  return !1;
1496
1496
  const e = t.bullet;
1497
1497
  return (e == null ? void 0 : e.listId) != null;
1498
1498
  }
1499
- function Ho(t) {
1499
+ function Vo(t) {
1500
1500
  if (t == null)
1501
1501
  return !1;
1502
1502
  const e = t.paragraphStyle;
1503
- return Vn(e);
1503
+ return Xn(e);
1504
1504
  }
1505
- function Vn(t) {
1505
+ function Xn(t) {
1506
1506
  return !(t == null || (t.indentStart == null || t.indentStart === 0) && t.hanging == null || t.hanging === 0);
1507
1507
  }
1508
- function jn(t, e, s) {
1508
+ function Jn(t, e, s) {
1509
1509
  return t.slice(0, e) + s + t.slice(e);
1510
1510
  }
1511
- function Kn(t, e, s) {
1511
+ function qn(t, e, s) {
1512
1512
  return e > s ? t : t.slice(0, e) + t.slice(s);
1513
1513
  }
1514
- function Fo(t) {
1514
+ function jo(t) {
1515
1515
  return t === null || t.toString().replace(/\s/g, "") === "" || typeof t == "boolean" ? !1 : !isNaN(t);
1516
1516
  }
1517
- function Wo(t) {
1517
+ function Ko(t) {
1518
1518
  let e = 0;
1519
1519
  for (let s = 0; s < t.length; s++)
1520
1520
  e = t.charCodeAt(s) + (e << 6) + (e << 16) - e;
@@ -1561,13 +1561,13 @@ function Ie(t, e, s) {
1561
1561
  function lt(t) {
1562
1562
  return typeof t == "function";
1563
1563
  }
1564
- function Yn(t) {
1564
+ function Zn(t) {
1565
1565
  var e = function(n) {
1566
1566
  Error.call(n), n.stack = new Error().stack;
1567
1567
  }, s = t(e);
1568
1568
  return s.prototype = Object.create(Error.prototype), s.prototype.constructor = s, s;
1569
1569
  }
1570
- var Gt = Yn(function(t) {
1570
+ var Bt = Zn(function(t) {
1571
1571
  return function(s) {
1572
1572
  t(this), this.message = s ? s.length + ` errors occurred during unsubscription:
1573
1573
  ` + s.map(function(n, r) {
@@ -1615,7 +1615,7 @@ var Ke = function() {
1615
1615
  try {
1616
1616
  c();
1617
1617
  } catch (E) {
1618
- i = E instanceof Gt ? E.errors : [E];
1618
+ i = E instanceof Bt ? E.errors : [E];
1619
1619
  }
1620
1620
  var h = this._finalizers;
1621
1621
  if (h) {
@@ -1626,7 +1626,7 @@ var Ke = function() {
1626
1626
  try {
1627
1627
  Se(g);
1628
1628
  } catch (E) {
1629
- i = i != null ? i : [], E instanceof Gt ? i = Ie(Ie([], Ae(i)), Ae(E.errors)) : i.push(E);
1629
+ i = i != null ? i : [], E instanceof Bt ? i = Ie(Ie([], Ae(i)), Ae(E.errors)) : i.push(E);
1630
1630
  }
1631
1631
  }
1632
1632
  } catch (E) {
@@ -1641,7 +1641,7 @@ var Ke = function() {
1641
1641
  }
1642
1642
  }
1643
1643
  if (i)
1644
- throw new Gt(i);
1644
+ throw new Bt(i);
1645
1645
  }
1646
1646
  }, t.prototype.add = function(e) {
1647
1647
  var s;
@@ -1674,13 +1674,13 @@ var Ke = function() {
1674
1674
  }(), t;
1675
1675
  }();
1676
1676
  Ke.EMPTY;
1677
- function zn(t) {
1677
+ function Qn(t) {
1678
1678
  return t instanceof Ke || t && "closed" in t && lt(t.remove) && lt(t.add) && lt(t.unsubscribe);
1679
1679
  }
1680
1680
  function Se(t) {
1681
1681
  lt(t) ? t() : t.unsubscribe();
1682
1682
  }
1683
- class Xn {
1683
+ class yn {
1684
1684
  /**
1685
1685
  * Create a new EventState
1686
1686
  * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true
@@ -1714,10 +1714,10 @@ class Xn {
1714
1714
  this.isStopPropagation = !0;
1715
1715
  }
1716
1716
  }
1717
- function Jn(t) {
1718
- return t instanceof ae;
1717
+ function tr(t) {
1718
+ return t instanceof le;
1719
1719
  }
1720
- class ae {
1720
+ class le {
1721
1721
  /**
1722
1722
  * Creates a new observer
1723
1723
  * @param callback defines the callback to call when the observer is notified
@@ -1735,7 +1735,7 @@ class ae {
1735
1735
  this.observable.remove(this);
1736
1736
  }
1737
1737
  }
1738
- class le {
1738
+ class ce {
1739
1739
  /**
1740
1740
  * Creates a new observable
1741
1741
  * @param onObserverAdded defines a callback to call when a new observer is added
@@ -1744,7 +1744,7 @@ class le {
1744
1744
  d(this, "_observers", new Array());
1745
1745
  d(this, "_eventState");
1746
1746
  d(this, "_onObserverAdded");
1747
- this._eventState = new Xn(), e && (this._onObserverAdded = e);
1747
+ this._eventState = new yn(), e && (this._onObserverAdded = e);
1748
1748
  }
1749
1749
  /**
1750
1750
  * Gets the list of observers
@@ -1762,7 +1762,7 @@ class le {
1762
1762
  add(e, s = !1, n = !1) {
1763
1763
  if (!e)
1764
1764
  return null;
1765
- const r = new ae(e, this);
1765
+ const r = new le(e, this);
1766
1766
  return r.unregisterOnNextCall = n, s ? this._observers.unshift(r) : this._observers.push(r), this._onObserverAdded && this._onObserverAdded(r), r;
1767
1767
  }
1768
1768
  /**
@@ -1887,7 +1887,7 @@ class le {
1887
1887
  * @returns a new observable
1888
1888
  */
1889
1889
  clone() {
1890
- const e = new le();
1890
+ const e = new ce();
1891
1891
  return e._observers = this._observers.slice(0), e;
1892
1892
  }
1893
1893
  _deferUnregister(e) {
@@ -1906,9 +1906,9 @@ class le {
1906
1906
  }
1907
1907
  function b(t) {
1908
1908
  let e = !1;
1909
- return t ? zn(t) ? {
1909
+ return t ? Qn(t) ? {
1910
1910
  dispose: () => t.unsubscribe()
1911
- } : Jn(t) ? {
1911
+ } : tr(t) ? {
1912
1912
  dispose: () => {
1913
1913
  e || (e = !0, t.dispose());
1914
1914
  }
@@ -1919,7 +1919,7 @@ function b(t) {
1919
1919
  } : t : b(() => {
1920
1920
  });
1921
1921
  }
1922
- function Go(t) {
1922
+ function Yo(t) {
1923
1923
  return b(() => {
1924
1924
  t.unsubscribe();
1925
1925
  });
@@ -1958,10 +1958,10 @@ class T {
1958
1958
  this._disposed || (this._disposed = !0, this._collection.dispose());
1959
1959
  }
1960
1960
  }
1961
- class Bo extends T {
1961
+ class zo extends T {
1962
1962
  constructor() {
1963
1963
  super(...arguments);
1964
- d(this, "dispose$", new W());
1964
+ d(this, "dispose$", new H());
1965
1965
  }
1966
1966
  dispose() {
1967
1967
  super.dispose(), this.dispose$.next(), this.dispose$.complete();
@@ -1984,17 +1984,17 @@ class gt {
1984
1984
  return this.getValueType(e) === "[object Number]";
1985
1985
  }
1986
1986
  }
1987
- function ce(t, e) {
1987
+ function he(t, e) {
1988
1988
  const s = t.indexOf(e);
1989
1989
  return s > -1 ? (t.splice(s, 1), !0) : !1;
1990
1990
  }
1991
- function ko(t) {
1991
+ function Xo(t) {
1992
1992
  const e = /* @__PURE__ */ new Set(), s = [];
1993
1993
  for (const n of t)
1994
1994
  e.has(n) || (e.add(n), s.push(n));
1995
1995
  return s;
1996
1996
  }
1997
- function qn(t, e) {
1997
+ function er(t, e) {
1998
1998
  for (let s = t.length - 1; s > -1; s--) {
1999
1999
  const n = t[s];
2000
2000
  if (e(n, s))
@@ -2002,13 +2002,13 @@ function qn(t, e) {
2002
2002
  }
2003
2003
  return null;
2004
2004
  }
2005
- function $o(t, e) {
2005
+ function Jo(t, e) {
2006
2006
  if (t.length === 0)
2007
2007
  return t;
2008
2008
  const s = e % t.length;
2009
2009
  return t.slice(s).concat(t.slice(0, s));
2010
2010
  }
2011
- function Vo(t, e) {
2011
+ function qo(t, e) {
2012
2012
  const s = /* @__PURE__ */ new Map();
2013
2013
  return t.forEach((n) => {
2014
2014
  const r = e(n);
@@ -2017,7 +2017,7 @@ function Vo(t, e) {
2017
2017
  }), s;
2018
2018
  }
2019
2019
  const N = Symbol("newer"), U = Symbol("older");
2020
- class Zn {
2020
+ class sr {
2021
2021
  constructor(e) {
2022
2022
  d(this, "entry");
2023
2023
  this.entry = e;
@@ -2030,7 +2030,7 @@ class Zn {
2030
2030
  return e ? (this.entry = e[N], { done: !1, value: e.key }) : { done: !0, value: void 0 };
2031
2031
  }
2032
2032
  }
2033
- class Qn {
2033
+ class nr {
2034
2034
  constructor(e) {
2035
2035
  d(this, "entry");
2036
2036
  this.entry = e;
@@ -2043,7 +2043,7 @@ class Qn {
2043
2043
  return e ? (this.entry = e[N], { done: !1, value: e.value }) : { done: !0, value: void 0 };
2044
2044
  }
2045
2045
  }
2046
- class yn {
2046
+ class rr {
2047
2047
  constructor(e) {
2048
2048
  d(this, "entry");
2049
2049
  this.entry = e;
@@ -2056,13 +2056,13 @@ class yn {
2056
2056
  return e ? (this.entry = e[N], { done: !1, value: [e.key, e.value] }) : { done: !0, value: void 0 };
2057
2057
  }
2058
2058
  }
2059
- var io, oo;
2059
+ var _o, fo;
2060
2060
  class we {
2061
2061
  constructor(e, s) {
2062
2062
  d(this, "key");
2063
2063
  d(this, "value");
2064
- d(this, io);
2065
- d(this, oo);
2064
+ d(this, _o);
2065
+ d(this, fo);
2066
2066
  this.key = e, this.value = s, this[N] = void 0, this[U] = void 0;
2067
2067
  }
2068
2068
  toJSON() {
@@ -2072,8 +2072,8 @@ class we {
2072
2072
  };
2073
2073
  }
2074
2074
  }
2075
- io = N, oo = U;
2076
- class tr {
2075
+ _o = N, fo = U;
2076
+ class ir {
2077
2077
  constructor(...e) {
2078
2078
  d(this, "_keymap");
2079
2079
  d(this, "size", 0);
@@ -2101,7 +2101,7 @@ class tr {
2101
2101
  }
2102
2102
  onShift(e) {
2103
2103
  if (this._onShiftListeners.indexOf(e) === -1)
2104
- return this._onShiftListeners.push(e), b(() => ce(this._onShiftListeners, e));
2104
+ return this._onShiftListeners.push(e), b(() => he(this._onShiftListeners, e));
2105
2105
  throw new Error("[LRUMap]: the listener has been registered!");
2106
2106
  }
2107
2107
  _initialize(e, s) {
@@ -2151,16 +2151,16 @@ class tr {
2151
2151
  this.oldest = void 0, this.newest = void 0, this.size = 0, this._keymap.clear();
2152
2152
  }
2153
2153
  keys() {
2154
- return new Zn(this.oldest);
2154
+ return new sr(this.oldest);
2155
2155
  }
2156
2156
  values() {
2157
- return new Qn(this.oldest);
2157
+ return new nr(this.oldest);
2158
2158
  }
2159
2159
  entries() {
2160
2160
  return this[Symbol.iterator]();
2161
2161
  }
2162
2162
  [Symbol.iterator]() {
2163
- return new yn(this.oldest);
2163
+ return new rr(this.oldest);
2164
2164
  }
2165
2165
  forEach(e, s) {
2166
2166
  typeof s != "object" && (s = this);
@@ -2202,7 +2202,7 @@ function be(t, e, s) {
2202
2202
  for (let r = t; r < n; r++)
2203
2203
  r < t + e ? delete s[r] : s[r] !== void 0 && (s[r - e] = s[r], delete s[r]);
2204
2204
  }
2205
- function jo(t, e) {
2205
+ function Zo(t, e) {
2206
2206
  const s = t, n = Object.keys(s), r = n.length, i = e, o = Object.keys(i), u = o.length, a = {};
2207
2207
  let l = 0;
2208
2208
  for (let c = 0; c < r; c++, l++) {
@@ -2215,7 +2215,7 @@ function jo(t, e) {
2215
2215
  }
2216
2216
  return a;
2217
2217
  }
2218
- function Ko(t, e, s) {
2218
+ function Qo(t, e, s) {
2219
2219
  const n = s;
2220
2220
  if (J(s) > 0) {
2221
2221
  const i = {};
@@ -2230,9 +2230,9 @@ function ve(t, e, s, n) {
2230
2230
  const r = t > s;
2231
2231
  if (!r && t + e > s)
2232
2232
  throw new Error("Invalid move operation");
2233
- r ? er(t, e, s, n) : sr(t, e, s, n);
2233
+ r ? or(t, e, s, n) : ur(t, e, s, n);
2234
2234
  }
2235
- function er(t, e, s, n) {
2235
+ function or(t, e, s, n) {
2236
2236
  const r = n, i = [];
2237
2237
  for (let o = t; o < t + e; o++)
2238
2238
  i.push(r[o]);
@@ -2244,7 +2244,7 @@ function er(t, e, s, n) {
2244
2244
  r[s + u] = o, o === void 0 && delete r[s + u];
2245
2245
  });
2246
2246
  }
2247
- function sr(t, e, s, n) {
2247
+ function ur(t, e, s, n) {
2248
2248
  const r = n, i = [];
2249
2249
  for (let o = t; o < t + e; o++)
2250
2250
  i.push(r[o]);
@@ -2256,13 +2256,13 @@ function sr(t, e, s, n) {
2256
2256
  r[s + u - e] = o, o === void 0 && delete r[s + u - e];
2257
2257
  });
2258
2258
  }
2259
- class $ {
2259
+ class k {
2260
2260
  constructor(e = {}) {
2261
2261
  d(this, "_matrix");
2262
2262
  this._setOriginValue(e);
2263
2263
  }
2264
2264
  static MakeObjectMatrixSize(e) {
2265
- return new $({
2265
+ return new k({
2266
2266
  [e - 1]: {}
2267
2267
  });
2268
2268
  }
@@ -2399,7 +2399,7 @@ class $ {
2399
2399
  * @returns
2400
2400
  */
2401
2401
  getFragment(e, s, n, r) {
2402
- const i = new $();
2402
+ const i = new k();
2403
2403
  let o = 0;
2404
2404
  for (let u = e; u <= s; u++) {
2405
2405
  const a = {};
@@ -2424,7 +2424,7 @@ class $ {
2424
2424
  * @returns
2425
2425
  */
2426
2426
  getSlice(e, s, n, r) {
2427
- const i = new $();
2427
+ const i = new k();
2428
2428
  for (let o = e; o <= s; o++)
2429
2429
  for (let u = n; u <= r; u++) {
2430
2430
  const a = this.getValue(o, u);
@@ -2499,7 +2499,7 @@ class $ {
2499
2499
  }
2500
2500
  getArrayData() {
2501
2501
  let e = 0, s = 0, n = !1, r = !1;
2502
- const i = new $();
2502
+ const i = new k();
2503
2503
  return this.forEach((o, u) => {
2504
2504
  n || (n = !0, e = o), Object.keys(u).forEach((a) => {
2505
2505
  const l = Number(a);
@@ -2557,12 +2557,12 @@ class $ {
2557
2557
  }
2558
2558
  }
2559
2559
  var ze = /* @__PURE__ */ ((t) => (t.INIT = "init", t.FETCHING = "fetching", t.DONE = "done", t))(ze || {});
2560
- class nr {
2560
+ class ar {
2561
2561
  constructor() {
2562
2562
  d(this, "status", "init");
2563
2563
  }
2564
2564
  }
2565
- const Yo = (t) => t.some(
2565
+ const yo = (t) => t.some(
2566
2566
  (e) => e.status === "init"
2567
2567
  /* INIT */
2568
2568
  ) ? "init" : t.some(
@@ -2702,7 +2702,7 @@ d(z, "getRelativeRange", (e, s) => ({
2702
2702
  endColumn: e.endColumn + s
2703
2703
  }));
2704
2704
  let Z = z;
2705
- class zo {
2705
+ class tu {
2706
2706
  constructor(e, s) {
2707
2707
  d(this, "_values", []);
2708
2708
  d(this, "_keys", []);
@@ -2779,7 +2779,7 @@ function Ue(t, e, s, n) {
2779
2779
  }
2780
2780
  };
2781
2781
  }
2782
- function Xo(t) {
2782
+ function eu(t) {
2783
2783
  if (t == null || t.length === 0)
2784
2784
  return Number.NaN;
2785
2785
  const e = t.toLowerCase().split(""), s = e.length, n = (o) => o.charCodeAt(0) - 96;
@@ -2788,37 +2788,37 @@ function Xo(t) {
2788
2788
  i = n(e[o]), r += i * 26 ** (s - o - 1);
2789
2789
  return r === 0 ? Number.NaN : r - 1;
2790
2790
  }
2791
- const bt = 65, Xe = 90, rr = 97;
2792
- function Jo(t) {
2791
+ const bt = 65, Xe = 90, lr = 97;
2792
+ function su(t) {
2793
2793
  const e = Xe - bt + 1;
2794
2794
  let s = "";
2795
2795
  for (; t >= 0; )
2796
2796
  s = String.fromCharCode(t % e + bt) + s, t = Math.floor(t / e) - 1;
2797
2797
  return s;
2798
2798
  }
2799
- function ir(t, e) {
2799
+ function cr(t, e) {
2800
2800
  let s = "";
2801
2801
  for (; e > 0; )
2802
2802
  s += t, e--;
2803
2803
  return s;
2804
2804
  }
2805
- function qo(t, e = !1) {
2805
+ function nu(t, e = !1) {
2806
2806
  const s = Xe - bt + 1;
2807
- let n = rr;
2807
+ let n = lr;
2808
2808
  e && (n = bt);
2809
2809
  const r = String.fromCharCode(t % s + n), i = Math.floor(t / s) + 1;
2810
- return ir(r, i);
2810
+ return cr(r, i);
2811
2811
  }
2812
- function Zo(t, e) {
2812
+ function ru(t, e) {
2813
2813
  return t.zIndex > e.zIndex ? 1 : t.zIndex === e.zIndex ? 0 : -1;
2814
2814
  }
2815
- function Qo(t, e) {
2815
+ function iu(t, e) {
2816
2816
  return t.zIndex > e.zIndex ? -1 : t.zIndex === e.zIndex ? 0 : 1;
2817
2817
  }
2818
2818
  function ht(t = "index", e = 1) {
2819
2819
  return (s, n) => s[t] > n[t] ? e : s[t] === n[t] ? 0 : -e;
2820
2820
  }
2821
- function yo(t, e) {
2821
+ function ou(t, e) {
2822
2822
  let s;
2823
2823
  return function(...n) {
2824
2824
  const r = this, i = function() {
@@ -2827,7 +2827,7 @@ function yo(t, e) {
2827
2827
  clearTimeout(s), s = setTimeout(i, e);
2828
2828
  };
2829
2829
  }
2830
- function Bt(t, e, s) {
2830
+ function $t(t, e, s) {
2831
2831
  const { dataStream: n, textRuns: r = [] } = t;
2832
2832
  let i = e;
2833
2833
  const o = [];
@@ -2844,18 +2844,18 @@ function Bt(t, e, s) {
2844
2844
  }
2845
2845
  return i !== s && o.push(n.slice(i, s)), o.join("");
2846
2846
  }
2847
- function tu(t, e = !0) {
2847
+ function uu(t, e = !0) {
2848
2848
  var s;
2849
2849
  if (e && ((s = t.paragraphs) != null && s.length)) {
2850
2850
  const { dataStream: n, paragraphs: r = [] } = t;
2851
2851
  let i = "", o = -1;
2852
2852
  for (const u of r) {
2853
2853
  const { startIndex: a, paragraphStyle: l = {} } = u, { spaceAbove: c, spaceBelow: h, lineSpacing: _ } = l, f = [];
2854
- c != null && (typeof c == "number" ? f.push(`margin-top: ${c}px`) : f.push(`margin-top: ${c.v}px`)), h != null && (typeof h == "number" ? f.push(`margin-bottom: ${h}px`) : f.push(`margin-bottom: ${h.v}px`)), _ != null && f.push(`line-height: ${_}`), a > o + 1 ? i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}>${Bt(t, o + 1, a)}</p>` : i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}></p>`, o = a;
2854
+ c != null && (typeof c == "number" ? f.push(`margin-top: ${c}px`) : f.push(`margin-top: ${c.v}px`)), h != null && (typeof h == "number" ? f.push(`margin-bottom: ${h}px`) : f.push(`margin-bottom: ${h.v}px`)), _ != null && f.push(`line-height: ${_}`), a > o + 1 ? i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}>${$t(t, o + 1, a)}</p>` : i += `<p class="UniverNormal" ${f.length ? `style="${f.join("; ")};"` : ""}></p>`, o = a;
2855
2855
  }
2856
- return o !== n.length && (i += Bt(t, o, n.length)), i;
2856
+ return o !== n.length && (i += $t(t, o, n.length)), i;
2857
2857
  } else
2858
- return Bt(t, 0, t.dataStream.length);
2858
+ return $t(t, 0, t.dataStream.length);
2859
2859
  }
2860
2860
  function Te(t, e) {
2861
2861
  const { st: s, ed: n, ts: r = {} } = e, { ff: i, fs: o, it: u, bl: a, ul: l, st: c, ol: h, bg: _, cl: f, va: g } = r;
@@ -2871,17 +2871,17 @@ const Et = {
2871
2871
  startColumn: -1,
2872
2872
  endColumn: -1
2873
2873
  }
2874
- }, eu = {
2874
+ }, au = {
2875
2875
  startRow: -1,
2876
2876
  startColumn: -1,
2877
2877
  endRow: -1,
2878
2878
  endColumn: -1
2879
- }, su = {
2879
+ }, lu = {
2880
2880
  startRow: 0,
2881
2881
  startColumn: 0,
2882
2882
  endRow: 0,
2883
2883
  endColumn: 0
2884
- }, nu = {
2884
+ }, cu = {
2885
2885
  row: 0,
2886
2886
  column: 0
2887
2887
  }, kt = {
@@ -2971,7 +2971,7 @@ const Et = {
2971
2971
  b: 0,
2972
2972
  l: 0
2973
2973
  }
2974
- }, or = {
2974
+ }, hr = {
2975
2975
  id: "default_slide",
2976
2976
  title: "defaultSlide",
2977
2977
  pageSize: {
@@ -2979,7 +2979,7 @@ const Et = {
2979
2979
  height: 300
2980
2980
  }
2981
2981
  };
2982
- var ur = /* @__PURE__ */ ((t) => (t.ARRAY_CONVERTOR = "ARRAY_CONVERTOR", t.MATRIX_CONVERTOR = "MATRIX_CONVERTOR", t))(ur || {});
2982
+ var dr = /* @__PURE__ */ ((t) => (t.ARRAY_CONVERTOR = "ARRAY_CONVERTOR", t.MATRIX_CONVERTOR = "MATRIX_CONVERTOR", t))(dr || {});
2983
2983
  function Rt(t, e) {
2984
2984
  const { textRuns: s = [] } = e;
2985
2985
  let n = 0;
@@ -3065,7 +3065,7 @@ class it {
3065
3065
  * @returns range matrix
3066
3066
  */
3067
3067
  getMatrix() {
3068
- const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new $();
3068
+ const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new k();
3069
3069
  for (let u = e; u <= s; u++)
3070
3070
  for (let a = n; a <= r; a++)
3071
3071
  o.setValue(u, a, i.getValue(u, a) || null);
@@ -3077,7 +3077,7 @@ class it {
3077
3077
  * @returns range matrix object
3078
3078
  */
3079
3079
  getMatrixObject() {
3080
- const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new $();
3080
+ const { startRow: e, endRow: s, startColumn: n, endColumn: r } = this._range, i = this._worksheet.getCellMatrix(), o = new k();
3081
3081
  for (let u = e; u <= s; u++)
3082
3082
  for (let a = n; a <= r; a++)
3083
3083
  o.setValue(u - e, a - n, i.getValue(u, a) || {});
@@ -3281,7 +3281,7 @@ class it {
3281
3281
  getFontStyle() {
3282
3282
  var s, n;
3283
3283
  const { p: e } = (s = this.getValue()) != null ? s : {};
3284
- return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("it", e.body) === C.TRUE ? Xt.ITALIC : Xt.NORMAL : this._getFontStyles()[0][0];
3284
+ return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("it", e.body) === C.TRUE ? Jt.ITALIC : Jt.NORMAL : this._getFontStyles()[0][0];
3285
3285
  }
3286
3286
  /**
3287
3287
  * Returns the font styles of the cells in the range.
@@ -3298,7 +3298,7 @@ class it {
3298
3298
  getFontWeight() {
3299
3299
  var s, n;
3300
3300
  const { p: e } = (s = this.getValue()) != null ? s : {};
3301
- return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("bl", e.body) === C.TRUE ? Jt.BOLD : Jt.NORMAL : this._getFontWeights()[0][0];
3301
+ return e && Array.isArray((n = e.body) == null ? void 0 : n.textRuns) && e.body.textRuns.length > 0 ? Rt("bl", e.body) === C.TRUE ? qt.BOLD : qt.NORMAL : this._getFontWeights()[0][0];
3302
3302
  }
3303
3303
  /**
3304
3304
  * Returns the font weights of the cells in the range.
@@ -3489,7 +3489,7 @@ class it {
3489
3489
  );
3490
3490
  }
3491
3491
  }
3492
- function ar(t, e) {
3492
+ function _r(t, e) {
3493
3493
  if (t.length === 0 || t[0].length === 0)
3494
3494
  return null;
3495
3495
  const s = new Array(t[0].length).fill(0);
@@ -3497,7 +3497,7 @@ function ar(t, e) {
3497
3497
  for (let i = 0; i < t.length; i++) {
3498
3498
  for (let u = 0; u < t[0].length; u++)
3499
3499
  s[u] = e(t[i][u]) ? s[u] + 1 : 0;
3500
- const o = lr(s);
3500
+ const o = fr(s);
3501
3501
  o.area > n && (n = o.area, r = {
3502
3502
  startColumn: o.start,
3503
3503
  startRow: i - o.height + 1,
@@ -3507,7 +3507,7 @@ function ar(t, e) {
3507
3507
  }
3508
3508
  return r;
3509
3509
  }
3510
- function lr(t) {
3510
+ function fr(t) {
3511
3511
  const e = [];
3512
3512
  let s = 0, n = { area: 0, height: 0, start: 0, end: 0 }, r = 0;
3513
3513
  for (; r < t.length; )
@@ -3523,174 +3523,483 @@ function lr(t) {
3523
3523
  }
3524
3524
  return n;
3525
3525
  }
3526
- function cr(t, e) {
3526
+ function gr(t, e) {
3527
3527
  it.foreach(e, (s, n) => {
3528
3528
  t[s][n] = void 0;
3529
3529
  });
3530
3530
  }
3531
- function ru(t, e) {
3531
+ function hu(t, e) {
3532
3532
  const s = t.toFullArray(), n = [];
3533
3533
  for (; ; ) {
3534
- const r = ar(s, e);
3534
+ const r = _r(s, e);
3535
3535
  if (!r)
3536
3536
  break;
3537
- n.push(r), cr(s, r);
3537
+ n.push(r), gr(s, r);
3538
3538
  }
3539
3539
  return n;
3540
3540
  }
3541
- function iu(t, e, s, n = !1) {
3541
+ function du(t, e, s, n = !1) {
3542
3542
  let r = { ...t };
3543
3543
  const i = r.startAbsoluteRefType || L.NONE, o = r.endAbsoluteRefType || L.NONE;
3544
3544
  return !n && i === L.ALL && o === L.ALL ? r : n || i === L.NONE && o === L.NONE ? Z.moveOffset(r, e, s) : (i === L.NONE ? r = { ...r, startRow: r.startRow + s, startColumn: r.startColumn + e } : i === L.COLUMN ? r = { ...r, startRow: r.startRow + s } : i === L.ROW && (r = { ...r, startColumn: r.startColumn + e }), o === L.NONE ? r = { ...r, endRow: r.endRow + s, endColumn: r.endColumn + e } : o === L.COLUMN ? r = { ...r, endRow: r.endRow + s } : o === L.ROW && (r = { ...r, endColumn: r.endColumn + e }), r);
3545
3545
  }
3546
- var F = /* @__PURE__ */ ((t) => (t[t.UNDEFINED = 0] = "UNDEFINED", t[t.OK = 1] = "OK", t[t.INTERNAL_ERROR = 2] = "INTERNAL_ERROR", t[t.PERMISSION_DENIED = 3] = "PERMISSION_DENIED", t[t.NOT_FOUND = 4] = "NOT_FOUND", t[t.UNAUTHENTICATED = 5] = "UNAUTHENTICATED", t[t.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", t[t.INVALID_ARGUMENT = 7] = "INVALID_ARGUMENT", t[t.TOO_MANY_REQUESTS = 8] = "TOO_MANY_REQUESTS", t[t.CHANGESET_REVISION_CONFILICT = 5001] = "CHANGESET_REVISION_CONFILICT", t[t.SNAPSHOT_INVALID_SNAPSHOT = 6001] = "SNAPSHOT_INVALID_SNAPSHOT", t[t.APPLY_REJECT = 7001] = "APPLY_REJECT", t[t.APPLY_NON_SEQUENTIAL_REVISION = 7002] = "APPLY_NON_SEQUENTIAL_REVISION", t[t.APPLY_REVISION_CONFILICT = 7003] = "APPLY_REVISION_CONFILICT", t[t.CONNECTOR_DATA_TOO_LARGE = 8001] = "CONNECTOR_DATA_TOO_LARGE", t[t.LICENSE_MAX_UNITS_EXCEEDED = 9001] = "LICENSE_MAX_UNITS_EXCEEDED", t[t.LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED = 9002] = "LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED", t[t.LICENSE_IMPORT_SIZE_EXCEEDED = 9003] = "LICENSE_IMPORT_SIZE_EXCEEDED", t[t.LICENSE_EXPORT_SIZE_EXCEEDED = 9004] = "LICENSE_EXPORT_SIZE_EXCEEDED", t[t.LICENSE_DISTRO_REJECTED = 9005] = "LICENSE_DISTRO_REJECTED", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(F || {});
3547
- function Je(t) {
3548
- return !!(t && t.code && t.code !== F.OK && t.code !== "OK");
3546
+ async function Er(t) {
3547
+ for (const [e, s] of t.entries())
3548
+ try {
3549
+ if (!await s())
3550
+ return {
3551
+ index: e,
3552
+ result: !1
3553
+ };
3554
+ } catch (n) {
3555
+ return {
3556
+ index: e,
3557
+ result: !1,
3558
+ error: n
3559
+ };
3560
+ }
3561
+ return {
3562
+ result: !0,
3563
+ index: -1
3564
+ };
3549
3565
  }
3550
- var O = /* @__PURE__ */ ((t) => (t[t.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", t[t.UNIVER_DOC = 1] = "UNIVER_DOC", t[t.UNIVER_SHEET = 2] = "UNIVER_SHEET", t[t.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(O || {});
3551
- class he extends T {
3566
+ function Rr(t) {
3567
+ for (const [e, s] of t.entries())
3568
+ try {
3569
+ if (!s())
3570
+ return {
3571
+ index: e,
3572
+ result: !1
3573
+ };
3574
+ } catch (n) {
3575
+ return {
3576
+ index: e,
3577
+ result: !1,
3578
+ error: n
3579
+ };
3580
+ }
3581
+ return {
3582
+ result: !0,
3583
+ index: -1
3584
+ };
3552
3585
  }
3553
- class qe {
3586
+ const pt = G("univer.context-service");
3587
+ class mr extends T {
3554
3588
  constructor() {
3555
- d(this, "_data", []);
3589
+ super(...arguments);
3590
+ d(this, "_contextChanged$", new H());
3591
+ d(this, "contextChanged$", this._contextChanged$.asObservable());
3592
+ d(this, "_contextMap", /* @__PURE__ */ new Map());
3556
3593
  }
3557
- static create() {
3558
- return new qe();
3594
+ dispose() {
3595
+ super.dispose(), this._contextChanged$.complete();
3559
3596
  }
3560
- add(e) {
3561
- this._data.indexOf(e) > -1 || this._data.push(e);
3597
+ getContextValue(s) {
3598
+ var n;
3599
+ return (n = this._contextMap.get(s)) != null ? n : !1;
3562
3600
  }
3563
- delete(e) {
3564
- const s = this._data.indexOf(e);
3565
- this._data.splice(s, 1);
3601
+ setContextValue(s, n) {
3602
+ this._contextMap.set(s, n), this._contextChanged$.next({ [s]: n });
3566
3603
  }
3567
- getData() {
3568
- return this._data;
3604
+ subscribeContextValue$(s) {
3605
+ return new ie((n) => {
3606
+ const r = this._contextChanged$.pipe(Xt((i) => typeof i[s] < "u")).subscribe((i) => n.next(i[s]));
3607
+ return this._contextMap.has(s) && n.next(this._contextMap.get(s)), () => r.unsubscribe();
3608
+ });
3569
3609
  }
3570
3610
  }
3571
- class Ze {
3611
+ var Cr = /* @__PURE__ */ ((t) => (t[t.SILENT = 0] = "SILENT", t[t.ERROR = 1] = "ERROR", t[t.WARN = 2] = "WARN", t[t.INFO = 3] = "INFO", t[t.VERBOSE = 4] = "VERBOSE", t))(Cr || {});
3612
+ const et = G("univer.log");
3613
+ class Or extends T {
3572
3614
  constructor() {
3573
- d(this, "_data", /* @__PURE__ */ new Map());
3615
+ super(...arguments);
3616
+ d(this, "_logLevel", 3);
3574
3617
  }
3575
- static create() {
3576
- return new Ze();
3618
+ debug(...s) {
3619
+ this._logLevel >= 4 && this._log(console.debug, ...s);
3577
3620
  }
3578
- add(e, s) {
3579
- this._data.has(e) || this._data.set(e, s);
3621
+ log(...s) {
3622
+ this._logLevel >= 3 && this._log(console.log, ...s);
3580
3623
  }
3581
- delete(e) {
3582
- this._data.delete(e);
3624
+ warn(...s) {
3625
+ this._logLevel >= 2 && this._log(console.warn, ...s);
3583
3626
  }
3584
- getData() {
3585
- return this._data;
3627
+ error(...s) {
3628
+ this._logLevel >= 1 && this._log(console.error, ...s);
3629
+ }
3630
+ setLogLevel(s) {
3631
+ this._logLevel = s;
3632
+ }
3633
+ _log(s, ...n) {
3634
+ const r = n[0];
3635
+ /^\[(.*?)\]/g.test(r) ? s(`\x1B[97;104m${r}\x1B[0m`, ...n.slice(1)) : s(...n);
3586
3636
  }
3587
3637
  }
3588
- class hr {
3638
+ var Ar = Object.defineProperty, Ir = Object.getOwnPropertyDescriptor, Nr = (t, e, s, n) => {
3639
+ for (var r = n > 1 ? void 0 : n ? Ir(e, s) : e, i = t.length - 1, o; i >= 0; i--)
3640
+ (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
3641
+ return n && r && Ar(e, s, r), r;
3642
+ }, Me = (t, e) => (s, n) => e(s, n, t), xt = /* @__PURE__ */ ((t) => (t[t.COMMAND = 0] = "COMMAND", t[t.OPERATION = 1] = "OPERATION", t[t.MUTATION = 2] = "MUTATION", t))(xt || {});
3643
+ const Pt = G("anywhere.command-service");
3644
+ class Sr {
3589
3645
  constructor() {
3590
- d(this, "cursor", 0);
3646
+ d(this, "_commands", /* @__PURE__ */ new Map());
3591
3647
  }
3592
- reset() {
3593
- return this.cursor = 0, this;
3648
+ registerCommand(e) {
3649
+ if (this._commands.has(e.id))
3650
+ throw new Error(`[CommandRegistry]: command "${e.id}" has been registered before.`);
3651
+ return this._commands.set(e.id, e), b(() => {
3652
+ var s;
3653
+ this._commands.delete(e.id), (s = e.onDispose) == null || s.call(e);
3654
+ });
3594
3655
  }
3595
- moveCursor(e) {
3596
- this.cursor += e;
3656
+ hasCommand(e) {
3657
+ return this._commands.has(e);
3597
3658
  }
3598
- moveCursorTo(e) {
3599
- this.cursor = e;
3659
+ getCommand(e) {
3660
+ return this._commands.has(e) ? [this._commands.get(e)] : null;
3600
3661
  }
3601
3662
  }
3602
- var dr = /* @__PURE__ */ ((t) => (t[t.PARAGRAPH = 0] = "PARAGRAPH", t[t.SECTION_BREAK = 1] = "SECTION_BREAK", t[t.TABLE = 2] = "TABLE", t[t.TABLE_ROW = 3] = "TABLE_ROW", t[t.TABLE_CELL = 4] = "TABLE_CELL", t))(dr || {}), Qe = /* @__PURE__ */ ((t) => (t.PARAGRAPH = "\r", t.SECTION_BREAK = `
3603
- `, t.TABLE_START = "", t.TABLE_ROW_START = "\x1B", t.TABLE_CELL_START = "", t.TABLE_CELL_END = "", t.TABLE_ROW_END = "", t.TABLE_END = "", t.CUSTOM_RANGE_START = "", t.CUSTOM_RANGE_END = "", t.COLUMN_BREAK = "\v", t.PAGE_BREAK = "\f", t.DOCS_END = "\0", t.TAB = " ", t.CUSTOM_BLOCK = "\b", t.LETTER = "", t.SPACE = " ", t))(Qe || {});
3604
- function ye(t) {
3605
- const e = [];
3606
- for (const s of t) {
3607
- const { st: n, ed: r, ts: i } = s;
3608
- if (s.sId === void 0 && delete s.sId, n === r || R.isEmptyObject(i) && s.sId == null)
3609
- continue;
3610
- if (e.length === 0) {
3611
- e.push(s);
3612
- continue;
3613
- }
3614
- const o = e.pop();
3615
- $n(s, o) && R.hasIntersectionBetweenTwoRanges(o.st, o.ed, s.st, s.ed) ? e.push({
3616
- ...s,
3617
- st: o.st,
3618
- ed: r
3619
- }) : e.push(o, s);
3663
+ const wr = {
3664
+ id: "nil",
3665
+ type: 0,
3666
+ handler: () => !0
3667
+ };
3668
+ let yt = class {
3669
+ constructor(t, e) {
3670
+ d(this, "_commandRegistry");
3671
+ d(this, "_beforeCommandExecutionListeners", []);
3672
+ d(this, "_commandExecutedListeners", []);
3673
+ d(this, "_multiCommandDisposables", /* @__PURE__ */ new Map());
3674
+ d(this, "_commandExecutingLevel", 0);
3675
+ d(this, "_commandExecutionStack", []);
3676
+ this._injector = t, this._logService = e, this._commandRegistry = new Sr(), this._registerCommand(wr);
3620
3677
  }
3621
- return e;
3622
- }
3623
- function ts(t, e, s, n) {
3624
- var l;
3625
- const { textRuns: r } = t;
3626
- if (r == null)
3627
- return;
3628
- const i = [], o = r.length;
3629
- let u = !1;
3630
- const a = (l = e.textRuns) != null ? l : [];
3631
- if (a.length)
3632
- for (let c = 0, h = a.length; c < h; c++) {
3633
- const _ = a[c];
3634
- _.st += n, _.ed += n;
3635
- }
3636
- for (let c = 0; c < o; c++) {
3637
- const h = r[c], { st: _, ed: f } = h;
3638
- if (f < n)
3639
- i.push(h);
3640
- else if (n >= _ && n <= f)
3641
- if (u)
3642
- h.st += s, h.ed += s, i.push(h);
3643
- else {
3644
- u = !0, h.ed += s;
3645
- const g = [];
3646
- if (a.length) {
3647
- const E = {
3648
- ...h,
3649
- st: _,
3650
- ed: a[0].st
3651
- };
3652
- g.push(E), g.push(...a);
3653
- const m = a[a.length - 1], I = {
3654
- ...h,
3655
- st: m.ed,
3656
- ed: f + s
3657
- };
3658
- g.push(I);
3659
- } else
3660
- g.push(h);
3661
- i.push(...g);
3662
- }
3663
- else
3664
- h.st += s, h.ed += s, u || (u = !0, i.push(...a)), i.push(h);
3678
+ hasCommand(t) {
3679
+ return this._commandRegistry.hasCommand(t);
3665
3680
  }
3666
- u || (u = !0, i.push(...a)), t.textRuns = ye(i);
3667
- }
3668
- function de(t, e, s, n) {
3669
- const { paragraphs: r } = t;
3670
- if (r == null)
3671
- return;
3672
- const { paragraphs: i, dataStream: o } = e, u = [];
3673
- let a = -1;
3674
- for (let c = 0, h = r.length; c < h; c++) {
3675
- const _ = r[c], { startIndex: f } = _;
3676
- f >= n && (_.startIndex += s), a === -1 && f >= n && (a = c), u.push(_.startIndex);
3681
+ registerCommand(t) {
3682
+ return this._registerCommand(t);
3677
3683
  }
3678
- let l = -1;
3679
- if (i) {
3680
- for (let c = 0, h = i.length; c < h; c++) {
3681
- const _ = i[c];
3682
- _.startIndex += n;
3683
- const f = _.startIndex;
3684
- l = u.indexOf(f);
3684
+ registerMultipleCommand(t) {
3685
+ return this._registerMultiCommand(t);
3686
+ }
3687
+ beforeCommandExecuted(t) {
3688
+ if (this._beforeCommandExecutionListeners.indexOf(t) === -1)
3689
+ return this._beforeCommandExecutionListeners.push(t), b(() => {
3690
+ const e = this._beforeCommandExecutionListeners.indexOf(t);
3691
+ this._beforeCommandExecutionListeners.splice(e, 1);
3692
+ });
3693
+ throw new Error("[CommandService]: could not add a listener twice.");
3694
+ }
3695
+ onCommandExecuted(t) {
3696
+ if (this._commandExecutedListeners.indexOf(t) === -1)
3697
+ return this._commandExecutedListeners.push(t), b(() => {
3698
+ const e = this._commandExecutedListeners.indexOf(t);
3699
+ this._commandExecutedListeners.splice(e, 1);
3700
+ });
3701
+ throw new Error("[CommandService]: could not add a listener twice.");
3702
+ }
3703
+ async executeCommand(t, e, s) {
3704
+ const n = this._commandRegistry.getCommand(t);
3705
+ if (n) {
3706
+ const [r] = n, i = {
3707
+ id: r.id,
3708
+ type: r.type,
3709
+ params: e
3710
+ }, o = this._pushCommandExecutionStack(i);
3711
+ this._beforeCommandExecutionListeners.forEach((a) => a(i, s));
3712
+ const u = await this._execute(r, e, s);
3713
+ return this._commandExecutedListeners.forEach((a) => a(i, s)), o.dispose(), u;
3714
+ }
3715
+ throw new Error(`[CommandService]: command "${t}" is not registered.`);
3716
+ }
3717
+ syncExecuteCommand(t, e, s) {
3718
+ var r;
3719
+ const n = this._commandRegistry.getCommand(t);
3720
+ if (n) {
3721
+ const [i] = n, o = {
3722
+ id: i.id,
3723
+ type: i.type,
3724
+ params: e
3725
+ };
3726
+ if (i.type === 2) {
3727
+ const l = er(
3728
+ this._commandExecutionStack,
3729
+ (c) => c.type === 0
3730
+ /* COMMAND */
3731
+ );
3732
+ l && (o.params = (r = o.params) != null ? r : {}, o.params.trigger = l.id);
3733
+ }
3734
+ const u = this._pushCommandExecutionStack(o);
3735
+ this._beforeCommandExecutionListeners.forEach((l) => l(o, s));
3736
+ const a = this._syncExecute(i, e, s);
3737
+ return this._commandExecutedListeners.forEach((l) => l(o, s)), u.dispose(), a;
3738
+ }
3739
+ throw new Error(`[CommandService]: command "${t}" is not registered.`);
3740
+ }
3741
+ _pushCommandExecutionStack(t) {
3742
+ return this._commandExecutionStack.push(t), b(() => he(this._commandExecutionStack, t));
3743
+ }
3744
+ _registerCommand(t) {
3745
+ return this._commandRegistry.registerCommand(t);
3746
+ }
3747
+ _registerMultiCommand(t) {
3748
+ const e = this._commandRegistry.getCommand(t.id);
3749
+ let s;
3750
+ if (e) {
3751
+ if (e[0].multi !== !0)
3752
+ throw new Error("Command has registered as a single command.");
3753
+ s = e[0];
3754
+ } else {
3755
+ const r = new Ye();
3756
+ s = new Lr(t.id), r.add(this._commandRegistry.registerCommand(s)), r.add(
3757
+ b(() => {
3758
+ this._multiCommandDisposables.delete(t.id);
3759
+ })
3760
+ ), this._multiCommandDisposables.set(t.id, r);
3761
+ }
3762
+ const n = s.registerImplementation(t);
3763
+ return b(() => {
3764
+ var r;
3765
+ n.dispose(), s.hasImplementations() || (r = this._multiCommandDisposables.get(t.id)) == null || r.dispose();
3766
+ });
3767
+ }
3768
+ async _execute(t, e, s) {
3769
+ this._logService.debug(
3770
+ "[CommandService]",
3771
+ `${"|-".repeat(Math.max(this._commandExecutingLevel, 0))}executing command "${t.id}"`
3772
+ ), this._commandExecutingLevel++;
3773
+ let n;
3774
+ try {
3775
+ n = await this._injector.invoke(t.handler, e, s), this._commandExecutingLevel--;
3776
+ } catch (r) {
3777
+ throw n = !1, this._commandExecutingLevel = 0, r;
3778
+ }
3779
+ return n;
3780
+ }
3781
+ _syncExecute(t, e, s) {
3782
+ this._logService.debug(
3783
+ "[CommandService]",
3784
+ `${"|-".repeat(Math.max(0, this._commandExecutingLevel))}executing command "${t.id}".`
3785
+ ), this._commandExecutingLevel++;
3786
+ let n;
3787
+ try {
3788
+ if (n = this._injector.invoke(t.handler, e, s), n instanceof Promise)
3789
+ throw new TypeError("[CommandService]: Command handler should not return a promise.");
3790
+ this._commandExecutingLevel--;
3791
+ } catch (r) {
3792
+ throw n = !1, this._commandExecutingLevel = 0, r;
3793
+ }
3794
+ return n;
3795
+ }
3796
+ };
3797
+ yt = Nr([
3798
+ Me(0, P(tt)),
3799
+ Me(1, et)
3800
+ ], yt);
3801
+ class Lr {
3802
+ constructor(e) {
3803
+ d(this, "name");
3804
+ d(this, "multi", !0);
3805
+ d(this, "type", 0);
3806
+ d(this, "priority", 0);
3807
+ d(this, "_implementations", []);
3808
+ d(this, "handler", async (e, s) => {
3809
+ if (!this._implementations.length)
3810
+ return !1;
3811
+ const n = e.get(et), r = e.get(pt), i = e.get(tt);
3812
+ for (const o of this._implementations) {
3813
+ const u = o.command.preconditions;
3814
+ if ((!u || u && u(r)) && (n.debug("[MultiCommand]", `executing implementation "${o.command.name}".`), await i.invoke(o.command.handler, s)))
3815
+ return !0;
3816
+ }
3817
+ return !1;
3818
+ });
3819
+ this.id = e, this.name = e;
3820
+ }
3821
+ registerImplementation(e) {
3822
+ const s = { command: e };
3823
+ return this._implementations.push(s), this._implementations.sort((n, r) => r.command.priority - n.command.priority), b(() => {
3824
+ var r;
3825
+ const n = this._implementations.indexOf(s);
3826
+ this._implementations.splice(n, 1), (r = e.onDispose) == null || r.call(e);
3827
+ });
3828
+ }
3829
+ hasImplementations() {
3830
+ return this._implementations.length > 0;
3831
+ }
3832
+ }
3833
+ function Je(t, e, s) {
3834
+ const n = t.map((r) => () => e.syncExecuteCommand(r.id, r.params, s));
3835
+ return Rr(n);
3836
+ }
3837
+ function _u(t, e, s) {
3838
+ const n = t.map((r) => () => e.executeCommand(r.id, r.params, s));
3839
+ return Er(n);
3840
+ }
3841
+ function br(t) {
3842
+ return new ie((e) => {
3843
+ const s = t((...n) => e.next(n));
3844
+ return () => s == null ? void 0 : s.dispose();
3845
+ });
3846
+ }
3847
+ const fu = (t) => new Promise((e) => {
3848
+ bs(
3849
+ br(t.onCommandExecuted).pipe(Ds(([s]) => s.type === xt.MUTATION)),
3850
+ vs(300)
3851
+ ).pipe(ps(16), xs()).subscribe(() => {
3852
+ e();
3853
+ });
3854
+ });
3855
+ var W = /* @__PURE__ */ ((t) => (t[t.UNDEFINED = 0] = "UNDEFINED", t[t.OK = 1] = "OK", t[t.INTERNAL_ERROR = 2] = "INTERNAL_ERROR", t[t.PERMISSION_DENIED = 3] = "PERMISSION_DENIED", t[t.NOT_FOUND = 4] = "NOT_FOUND", t[t.UNAUTHENTICATED = 5] = "UNAUTHENTICATED", t[t.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", t[t.INVALID_ARGUMENT = 7] = "INVALID_ARGUMENT", t[t.TOO_MANY_REQUESTS = 8] = "TOO_MANY_REQUESTS", t[t.CHANGESET_REVISION_CONFILICT = 5001] = "CHANGESET_REVISION_CONFILICT", t[t.SNAPSHOT_INVALID_SNAPSHOT = 6001] = "SNAPSHOT_INVALID_SNAPSHOT", t[t.APPLY_REJECT = 7001] = "APPLY_REJECT", t[t.APPLY_NON_SEQUENTIAL_REVISION = 7002] = "APPLY_NON_SEQUENTIAL_REVISION", t[t.APPLY_REVISION_CONFILICT = 7003] = "APPLY_REVISION_CONFILICT", t[t.CONNECTOR_DATA_TOO_LARGE = 8001] = "CONNECTOR_DATA_TOO_LARGE", t[t.LICENSE_MAX_UNITS_EXCEEDED = 9001] = "LICENSE_MAX_UNITS_EXCEEDED", t[t.LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED = 9002] = "LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED", t[t.LICENSE_IMPORT_SIZE_EXCEEDED = 9003] = "LICENSE_IMPORT_SIZE_EXCEEDED", t[t.LICENSE_EXPORT_SIZE_EXCEEDED = 9004] = "LICENSE_EXPORT_SIZE_EXCEEDED", t[t.LICENSE_DISTRO_REJECTED = 9005] = "LICENSE_DISTRO_REJECTED", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(W || {});
3856
+ function qe(t) {
3857
+ return !!(t && t.code && t.code !== W.OK && t.code !== "OK");
3858
+ }
3859
+ var O = /* @__PURE__ */ ((t) => (t[t.UNIVER_UNKNOWN = 0] = "UNIVER_UNKNOWN", t[t.UNIVER_DOC = 1] = "UNIVER_DOC", t[t.UNIVER_SHEET = 2] = "UNIVER_SHEET", t[t.UNIVER_SLIDE = 3] = "UNIVER_SLIDE", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(O || {});
3860
+ class de extends T {
3861
+ }
3862
+ class Ze {
3863
+ constructor() {
3864
+ d(this, "_data", []);
3865
+ }
3866
+ static create() {
3867
+ return new Ze();
3868
+ }
3869
+ add(e) {
3870
+ this._data.indexOf(e) > -1 || this._data.push(e);
3871
+ }
3872
+ delete(e) {
3873
+ const s = this._data.indexOf(e);
3874
+ this._data.splice(s, 1);
3875
+ }
3876
+ getData() {
3877
+ return this._data;
3878
+ }
3879
+ }
3880
+ class Qe {
3881
+ constructor() {
3882
+ d(this, "_data", /* @__PURE__ */ new Map());
3883
+ }
3884
+ static create() {
3885
+ return new Qe();
3886
+ }
3887
+ add(e, s) {
3888
+ this._data.has(e) || this._data.set(e, s);
3889
+ }
3890
+ delete(e) {
3891
+ this._data.delete(e);
3892
+ }
3893
+ getData() {
3894
+ return this._data;
3895
+ }
3896
+ }
3897
+ class vr {
3898
+ constructor() {
3899
+ d(this, "cursor", 0);
3900
+ }
3901
+ reset() {
3902
+ return this.cursor = 0, this;
3903
+ }
3904
+ moveCursor(e) {
3905
+ this.cursor += e;
3906
+ }
3907
+ moveCursorTo(e) {
3908
+ this.cursor = e;
3909
+ }
3910
+ }
3911
+ var Ur = /* @__PURE__ */ ((t) => (t[t.PARAGRAPH = 0] = "PARAGRAPH", t[t.SECTION_BREAK = 1] = "SECTION_BREAK", t[t.TABLE = 2] = "TABLE", t[t.TABLE_ROW = 3] = "TABLE_ROW", t[t.TABLE_CELL = 4] = "TABLE_CELL", t[t.CUSTOM_BLOCK = 5] = "CUSTOM_BLOCK", t))(Ur || {}), ye = /* @__PURE__ */ ((t) => (t.PARAGRAPH = "\r", t.SECTION_BREAK = `
3912
+ `, t.TABLE_START = "", t.TABLE_ROW_START = "\x1B", t.TABLE_CELL_START = "", t.TABLE_CELL_END = "", t.TABLE_ROW_END = "", t.TABLE_END = "", t.CUSTOM_RANGE_START = "", t.CUSTOM_RANGE_END = "", t.COLUMN_BREAK = "\v", t.PAGE_BREAK = "\f", t.DOCS_END = "\0", t.TAB = " ", t.CUSTOM_BLOCK = "\b", t.LETTER = "", t.SPACE = " ", t))(ye || {});
3913
+ function ts(t) {
3914
+ const e = [];
3915
+ for (const s of t) {
3916
+ const { st: n, ed: r, ts: i } = s;
3917
+ if (s.sId === void 0 && delete s.sId, n === r || R.isEmptyObject(i) && s.sId == null)
3918
+ continue;
3919
+ if (e.length === 0) {
3920
+ e.push(s);
3921
+ continue;
3685
3922
  }
3686
- if (o === Qe.PARAGRAPH && i.length === 1) {
3923
+ const o = e.pop();
3924
+ zn(s, o) && R.hasIntersectionBetweenTwoRanges(o.st, o.ed, s.st, s.ed) ? e.push({
3925
+ ...s,
3926
+ st: o.st,
3927
+ ed: r
3928
+ }) : e.push(o, s);
3929
+ }
3930
+ return e;
3931
+ }
3932
+ function es(t, e, s, n) {
3933
+ var l;
3934
+ const { textRuns: r } = t;
3935
+ if (r == null)
3936
+ return;
3937
+ const i = [], o = r.length;
3938
+ let u = !1;
3939
+ const a = (l = e.textRuns) != null ? l : [];
3940
+ if (a.length)
3941
+ for (let c = 0, h = a.length; c < h; c++) {
3942
+ const _ = a[c];
3943
+ _.st += n, _.ed += n;
3944
+ }
3945
+ for (let c = 0; c < o; c++) {
3946
+ const h = r[c], { st: _, ed: f } = h;
3947
+ if (f < n)
3948
+ i.push(h);
3949
+ else if (n >= _ && n <= f)
3950
+ if (u)
3951
+ h.st += s, h.ed += s, i.push(h);
3952
+ else {
3953
+ u = !0, h.ed += s;
3954
+ const g = [];
3955
+ if (a.length) {
3956
+ const E = {
3957
+ ...h,
3958
+ st: _,
3959
+ ed: a[0].st
3960
+ };
3961
+ g.push(E), g.push(...a);
3962
+ const m = a[a.length - 1], I = {
3963
+ ...h,
3964
+ st: m.ed,
3965
+ ed: f + s
3966
+ };
3967
+ g.push(I);
3968
+ } else
3969
+ g.push(h);
3970
+ i.push(...g);
3971
+ }
3972
+ else
3973
+ h.st += s, h.ed += s, u || (u = !0, i.push(...a)), i.push(h);
3974
+ }
3975
+ u || (u = !0, i.push(...a)), t.textRuns = ts(i);
3976
+ }
3977
+ function _e(t, e, s, n) {
3978
+ const { paragraphs: r } = t;
3979
+ if (r == null)
3980
+ return;
3981
+ const { paragraphs: i, dataStream: o } = e, u = [];
3982
+ let a = -1;
3983
+ for (let c = 0, h = r.length; c < h; c++) {
3984
+ const _ = r[c], { startIndex: f } = _;
3985
+ f >= n && (_.startIndex += s), a === -1 && f >= n && (a = c), u.push(_.startIndex);
3986
+ }
3987
+ let l = -1;
3988
+ if (i) {
3989
+ for (let c = 0, h = i.length; c < h; c++) {
3990
+ const _ = i[c];
3991
+ _.startIndex += n;
3992
+ const f = _.startIndex;
3993
+ l = u.indexOf(f);
3994
+ }
3995
+ if (o === ye.PARAGRAPH && i.length === 1) {
3687
3996
  const c = r[a], h = i[0], _ = c.paragraphStyle, f = c.bullet;
3688
3997
  c.paragraphStyle = h.paragraphStyle, c.bullet = h.bullet, h.paragraphStyle = _, h.bullet = f;
3689
3998
  }
3690
3999
  l !== -1 && r.splice(l, 1), r.push(...i), r.sort(ht("startIndex"));
3691
4000
  }
3692
4001
  }
3693
- function _r(t, e, s, n) {
4002
+ function Tr(t, e, s, n) {
3694
4003
  const { sectionBreaks: r } = t;
3695
4004
  if (r == null)
3696
4005
  return;
@@ -3707,7 +4016,7 @@ function _r(t, e, s, n) {
3707
4016
  r.push(...i), r.sort(ht("startIndex"));
3708
4017
  }
3709
4018
  }
3710
- function es(t, e, s, n) {
4019
+ function ss(t, e, s, n) {
3711
4020
  const { customBlocks: r } = t;
3712
4021
  if (r == null)
3713
4022
  return;
@@ -3724,7 +4033,7 @@ function es(t, e, s, n) {
3724
4033
  r.push(...i), r.sort(ht("startIndex"));
3725
4034
  }
3726
4035
  }
3727
- function _e(t, e, s, n) {
4036
+ function fe(t, e, s, n) {
3728
4037
  const { tables: r } = t;
3729
4038
  if (r == null)
3730
4039
  return;
@@ -3741,7 +4050,7 @@ function _e(t, e, s, n) {
3741
4050
  r.push(...i), r.sort(ht("startIndex"));
3742
4051
  }
3743
4052
  }
3744
- function fr(t, e, s, n) {
4053
+ function Mr(t, e, s, n) {
3745
4054
  const { customRanges: r } = t;
3746
4055
  if (r == null)
3747
4056
  return;
@@ -3758,7 +4067,7 @@ function fr(t, e, s, n) {
3758
4067
  r.push(...i), r.sort(ht("startIndex"));
3759
4068
  }
3760
4069
  }
3761
- function ss(t, e, s) {
4070
+ function ns(t, e, s) {
3762
4071
  const { textRuns: n } = t, r = s, i = s + e, o = [];
3763
4072
  if (n) {
3764
4073
  const u = [];
@@ -3791,7 +4100,7 @@ function ss(t, e, s) {
3791
4100
  }
3792
4101
  return o;
3793
4102
  }
3794
- function ns(t, e, s) {
4103
+ function rs(t, e, s) {
3795
4104
  const { paragraphs: n } = t, r = s, i = s + e, o = [];
3796
4105
  if (n) {
3797
4106
  const u = [];
@@ -3811,7 +4120,7 @@ function ns(t, e, s) {
3811
4120
  }
3812
4121
  return o;
3813
4122
  }
3814
- function rs(t, e, s) {
4123
+ function is(t, e, s) {
3815
4124
  const { sectionBreaks: n } = t, r = s, i = s + e - 1, o = [];
3816
4125
  if (n) {
3817
4126
  const u = [];
@@ -3831,7 +4140,7 @@ function rs(t, e, s) {
3831
4140
  }
3832
4141
  return o;
3833
4142
  }
3834
- function is(t, e, s) {
4143
+ function os(t, e, s) {
3835
4144
  const { customBlocks: n } = t, r = s, i = s + e - 1, o = [];
3836
4145
  if (n) {
3837
4146
  const u = [];
@@ -3851,7 +4160,7 @@ function is(t, e, s) {
3851
4160
  }
3852
4161
  return o;
3853
4162
  }
3854
- function os(t, e, s) {
4163
+ function us(t, e, s) {
3855
4164
  const { tables: n } = t, r = s, i = s + e - 1, o = [];
3856
4165
  if (n) {
3857
4166
  const u = [];
@@ -3875,7 +4184,7 @@ function os(t, e, s) {
3875
4184
  }
3876
4185
  return o;
3877
4186
  }
3878
- function us(t, e, s) {
4187
+ function as(t, e, s) {
3879
4188
  const { customRanges: n } = t, r = s, i = s + e - 1, o = [];
3880
4189
  if (n) {
3881
4190
  const u = [];
@@ -3899,10 +4208,10 @@ function us(t, e, s) {
3899
4208
  }
3900
4209
  return o;
3901
4210
  }
3902
- function gr(t, e, s) {
3903
- const { dataStream: n } = t, r = s, i = s + e, o = ss(t, e, s), u = ns(t, e, s), a = rs(t, e, s), l = is(t, e, s), c = os(t, e, s), h = us(t, e, s);
4211
+ function Dr(t, e, s) {
4212
+ const { dataStream: n } = t, r = s, i = s + e, o = ns(t, e, s), u = rs(t, e, s), a = is(t, e, s), l = os(t, e, s), c = us(t, e, s), h = as(t, e, s);
3904
4213
  let _ = "";
3905
- return n && (t.dataStream = Kn(n, r, i), _ = n.slice(r, i)), {
4214
+ return n && (t.dataStream = qn(n, r, i), _ = n.slice(r, i)), {
3906
4215
  dataStream: _,
3907
4216
  textRuns: o,
3908
4217
  paragraphs: u,
@@ -3912,11 +4221,11 @@ function gr(t, e, s) {
3912
4221
  customRanges: h
3913
4222
  };
3914
4223
  }
3915
- function Er(t, e, s, n) {
3916
- t.dataStream = jn(t.dataStream, n, e.dataStream), ts(t, e, s, n), de(t, e, s, n), _r(t, e, s, n), es(t, e, s, n), _e(t, e, s, n), fr(t, e, s, n);
4224
+ function pr(t, e, s, n) {
4225
+ t.dataStream = Jn(t.dataStream, n, e.dataStream), es(t, e, s, n), _e(t, e, s, n), Tr(t, e, s, n), ss(t, e, s, n), fe(t, e, s, n), Mr(t, e, s, n);
3917
4226
  }
3918
- var Qt = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(Qt || {});
3919
- const ou = {
4227
+ var te = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(te || {});
4228
+ const gu = {
3920
4229
  BULLET_LIST: {
3921
4230
  listType: "BULLET_LIST",
3922
4231
  nestingLevel: [
@@ -3994,8 +4303,8 @@ const ou = {
3994
4303
  ]
3995
4304
  }
3996
4305
  };
3997
- function Rr(t, e, s, n, r) {
3998
- const i = mr(t, e, s, n, r), o = Cr(t, e, s, n, r), u = Or(t, e, s, n, r), a = Ar(t, e, s, n, r), l = Ir(t, e, s, n, r), c = Nr(t, e, s, n, r);
4306
+ function xr(t, e, s, n, r) {
4307
+ const i = Pr(t, e, s, n, r), o = Hr(t, e, s, n, r), u = Fr(t, e, s, n, r), a = Wr(t, e, s, n, r), l = Gr(t, e, s, n, r), c = Br(t, e, s, n, r);
3999
4308
  return {
4000
4309
  dataStream: "",
4001
4310
  textRuns: i,
@@ -4006,18 +4315,18 @@ function Rr(t, e, s, n, r) {
4006
4315
  customRanges: c
4007
4316
  };
4008
4317
  }
4009
- function mr(t, e, s, n, r) {
4318
+ function Pr(t, e, s, n, r) {
4010
4319
  const { textRuns: i } = t, { textRuns: o } = e;
4011
4320
  if (i == null || o == null)
4012
4321
  return;
4013
- const u = ss(t, s, n);
4322
+ const u = ns(t, s, n);
4014
4323
  if (r !== D.REPLACE) {
4015
- const a = as(o, u, r);
4324
+ const a = ls(o, u, r);
4016
4325
  e.textRuns = a;
4017
4326
  }
4018
- return ts(t, e, s, n), u;
4327
+ return es(t, e, s, n), u;
4019
4328
  }
4020
- function as(t, e, s) {
4329
+ function ls(t, e, s) {
4021
4330
  if (e.length === 0)
4022
4331
  return t;
4023
4332
  t = R.deepClone(t), e = R.deepClone(e);
@@ -4048,13 +4357,13 @@ function as(t, e, s) {
4048
4357
  }
4049
4358
  l();
4050
4359
  const c = n[n.length - 1], h = t[r - 1], _ = e[i - 1];
4051
- return c.ed !== Math.max(h.ed, _.ed) && (h.ed > _.ed ? n.push(h) : n.push(_)), ye(n);
4360
+ return c.ed !== Math.max(h.ed, _.ed) && (h.ed > _.ed ? n.push(h) : n.push(_)), ts(n);
4052
4361
  }
4053
- function Cr(t, e, s, n, r) {
4362
+ function Hr(t, e, s, n, r) {
4054
4363
  const { paragraphs: i } = t, { paragraphs: o } = e;
4055
4364
  if (i == null || o == null)
4056
4365
  return;
4057
- const u = ns(t, s, n);
4366
+ const u = rs(t, s, n);
4058
4367
  if (r !== D.REPLACE) {
4059
4368
  const a = [];
4060
4369
  for (const l of o) {
@@ -4073,14 +4382,14 @@ function Cr(t, e, s, n, r) {
4073
4382
  let v, M;
4074
4383
  if (r === D.COVER ? (v = { ...m, ...h }, M = {
4075
4384
  listId: "",
4076
- listType: Qt.BULLET_LIST,
4385
+ listType: te.BULLET_LIST,
4077
4386
  nestingLevel: 0,
4078
4387
  textStyle: {},
4079
4388
  ...I,
4080
4389
  ..._
4081
4390
  }) : (v = { ...h, ...m }, M = {
4082
4391
  listId: "",
4083
- listType: Qt.BULLET_LIST,
4392
+ listType: te.BULLET_LIST,
4084
4393
  nestingLevel: 0,
4085
4394
  textStyle: {},
4086
4395
  ..._,
@@ -4098,13 +4407,13 @@ function Cr(t, e, s, n, r) {
4098
4407
  }
4099
4408
  e.paragraphs = a;
4100
4409
  }
4101
- return de(t, e, s, n), u;
4410
+ return _e(t, e, s, n), u;
4102
4411
  }
4103
- function Or(t, e, s, n, r) {
4412
+ function Fr(t, e, s, n, r) {
4104
4413
  const { sectionBreaks: i } = t, { sectionBreaks: o } = e;
4105
4414
  if (i == null || o == null)
4106
4415
  return;
4107
- const u = rs(t, s, n);
4416
+ const u = is(t, s, n);
4108
4417
  if (r !== D.REPLACE) {
4109
4418
  const a = [];
4110
4419
  for (const l of o) {
@@ -4127,13 +4436,13 @@ function Or(t, e, s, n, r) {
4127
4436
  }
4128
4437
  e.sectionBreaks = a;
4129
4438
  }
4130
- return de(t, e, s, n), u;
4439
+ return _e(t, e, s, n), u;
4131
4440
  }
4132
- function Ar(t, e, s, n, r) {
4441
+ function Wr(t, e, s, n, r) {
4133
4442
  const { customBlocks: i } = t, { customBlocks: o } = e;
4134
4443
  if (i == null || o == null)
4135
4444
  return;
4136
- const u = is(t, s, n);
4445
+ const u = os(t, s, n);
4137
4446
  if (r !== D.REPLACE) {
4138
4447
  const a = [];
4139
4448
  for (const l of o) {
@@ -4156,13 +4465,13 @@ function Ar(t, e, s, n, r) {
4156
4465
  }
4157
4466
  e.customBlocks = a;
4158
4467
  }
4159
- return es(t, e, s, n), u;
4468
+ return ss(t, e, s, n), u;
4160
4469
  }
4161
- function Ir(t, e, s, n, r) {
4470
+ function Gr(t, e, s, n, r) {
4162
4471
  const { tables: i } = t, { tables: o } = e;
4163
4472
  if (i == null || o == null)
4164
4473
  return;
4165
- const u = os(t, s, n);
4474
+ const u = us(t, s, n);
4166
4475
  if (r !== D.REPLACE) {
4167
4476
  const a = [];
4168
4477
  for (const l of o) {
@@ -4185,13 +4494,13 @@ function Ir(t, e, s, n, r) {
4185
4494
  }
4186
4495
  e.tables = a;
4187
4496
  }
4188
- return _e(t, e, s, n), u;
4497
+ return fe(t, e, s, n), u;
4189
4498
  }
4190
- function Nr(t, e, s, n, r) {
4499
+ function Br(t, e, s, n, r) {
4191
4500
  const { customRanges: i } = t, { tables: o } = e;
4192
4501
  if (i == null || o == null)
4193
4502
  return;
4194
- const u = us(t, s, n);
4503
+ const u = as(t, s, n);
4195
4504
  if (r !== D.REPLACE) {
4196
4505
  const a = [];
4197
4506
  for (const l of o) {
@@ -4214,10 +4523,10 @@ function Nr(t, e, s, n, r) {
4214
4523
  }
4215
4524
  e.customRanges = a;
4216
4525
  }
4217
- return _e(t, e, s, n), u;
4526
+ return fe(t, e, s, n), u;
4218
4527
  }
4219
4528
  var A = /* @__PURE__ */ ((t) => (t.RETAIN = "r", t.INSERT = "i", t.DELETE = "d", t))(A || {});
4220
- function ls(t, e, s) {
4529
+ function cs(t, e, s) {
4221
4530
  const { dataStream: n, textRuns: r = [], paragraphs: i = [] } = t, o = {
4222
4531
  dataStream: n.slice(e, s)
4223
4532
  }, u = [];
@@ -4251,12 +4560,12 @@ function ls(t, e, s) {
4251
4560
  startIndex: l.startIndex - e
4252
4561
  }))), o;
4253
4562
  }
4254
- function Me(t, e, s = D.COVER) {
4563
+ function De(t, e, s = D.COVER) {
4255
4564
  if (e.dataStream !== "")
4256
4565
  throw new Error("Cannot compose other body with non-empty dataStream");
4257
4566
  const n = {
4258
4567
  dataStream: t.dataStream
4259
- }, { textRuns: r = [], paragraphs: i = [] } = t, { textRuns: o = [], paragraphs: u = [] } = e, a = as(o, r, s);
4568
+ }, { textRuns: r = [], paragraphs: i = [] } = t, { textRuns: o = [], paragraphs: u = [] } = e, a = ls(o, r, s);
4260
4569
  a.length && (n.textRuns = a);
4261
4570
  const l = [];
4262
4571
  let c = 0, h = 0;
@@ -4266,14 +4575,14 @@ function Me(t, e, s = D.COVER) {
4266
4575
  }
4267
4576
  return c < i.length && l.push(...i.slice(c)), h < u.length && l.push(...u.slice(h)), l.length && (n.paragraphs = l), n;
4268
4577
  }
4269
- function Sr(t) {
4578
+ function $r(t) {
4270
4579
  const { body: e } = t;
4271
4580
  if (e == null)
4272
4581
  return !0;
4273
4582
  const { textRuns: s = [], paragraphs: n = [] } = e;
4274
4583
  return s.length === 0 && n.length === 0;
4275
4584
  }
4276
- function wr(t = R.generateRandomId(6), e = ut.EN_US, s = "") {
4585
+ function kr(t = R.generateRandomId(6), e = ut.EN_US, s = "") {
4277
4586
  return {
4278
4587
  id: t,
4279
4588
  locale: e,
@@ -4316,16 +4625,16 @@ function wr(t = R.generateRandomId(6), e = ut.EN_US, s = "") {
4316
4625
  settings: {}
4317
4626
  };
4318
4627
  }
4319
- const cs = {
4628
+ const hs = {
4320
4629
  id: "default_doc",
4321
4630
  documentStyle: {}
4322
4631
  };
4323
- class Lr extends he {
4632
+ class Vr extends de {
4324
4633
  constructor(s) {
4325
4634
  super();
4326
4635
  d(this, "type", O.UNIVER_DOC);
4327
4636
  d(this, "snapshot");
4328
- this.snapshot = { ...cs, ...s };
4637
+ this.snapshot = { ...hs, ...s };
4329
4638
  }
4330
4639
  getUnitId() {
4331
4640
  throw new Error("Method not implemented.");
@@ -4408,10 +4717,10 @@ class Lr extends he {
4408
4717
  } : this.snapshot.settings.zoomRatio = 1;
4409
4718
  }
4410
4719
  }
4411
- class ot extends Lr {
4720
+ class ot extends Vr {
4412
4721
  constructor(s) {
4413
4722
  var r;
4414
- super(R.isEmptyObject(s) ? wr() : s);
4723
+ super(R.isEmptyObject(s) ? kr() : s);
4415
4724
  d(this, "_unitId");
4416
4725
  d(this, "headerModelMap", /* @__PURE__ */ new Map());
4417
4726
  d(this, "footerModelMap", /* @__PURE__ */ new Map());
@@ -4429,409 +4738,114 @@ class ot extends Lr {
4429
4738
  var s;
4430
4739
  return (s = this.snapshot.rev) != null ? s : 1;
4431
4740
  }
4432
- incrementRev() {
4433
- this.snapshot.rev = this.getRev() + 1;
4434
- }
4435
- getSettings() {
4436
- return this.snapshot.settings;
4437
- }
4438
- // TODO: @JOCS do not use reset, please use apply to modify the snapshot.
4439
- reset(s) {
4440
- if (s.id && s.id !== this._unitId)
4441
- throw new Error("Cannot reset a document model with a different unit id!");
4442
- this.snapshot = { ...cs, ...s }, this._initializeHeaderFooterModel();
4443
- }
4444
- getSelfOrHeaderFooterModel(s) {
4445
- if (s != null) {
4446
- if (this.headerModelMap.has(s))
4447
- return this.headerModelMap.get(s);
4448
- if (this.footerModelMap.has(s))
4449
- return this.footerModelMap.get(s);
4450
- }
4451
- return this;
4452
- }
4453
- getUnitId() {
4454
- return this._unitId;
4455
- }
4456
- apply(s) {
4457
- const n = [], r = new hr();
4458
- return r.reset(), s.forEach((i) => {
4459
- if (i = R.deepClone(i), i.t === A.RETAIN) {
4460
- const { coverType: o, body: u, len: a, segmentId: l } = i;
4461
- if (u != null) {
4462
- const c = this._updateApply(u, a, r.cursor, o, l);
4463
- n.push({
4464
- ...i,
4465
- t: A.RETAIN,
4466
- coverType: D.REPLACE,
4467
- body: c
4468
- });
4469
- } else
4470
- n.push({
4471
- ...i,
4472
- t: A.RETAIN
4473
- });
4474
- r.moveCursor(a);
4475
- } else if (i.t === A.INSERT) {
4476
- const { body: o, len: u, segmentId: a, line: l } = i;
4477
- this._insertApply(o, u, r.cursor, a), r.moveCursor(u), n.push({
4478
- t: A.DELETE,
4479
- len: u,
4480
- line: l,
4481
- segmentId: a
4482
- });
4483
- } else if (i.t === A.DELETE) {
4484
- const { len: o, segmentId: u } = i, a = this._deleteApply(o, r.cursor, u);
4485
- n.push({
4486
- ...i,
4487
- t: A.INSERT,
4488
- body: a
4489
- });
4490
- } else
4491
- throw new Error(`Unknown action type for action: ${i}.`);
4492
- }), n;
4493
- }
4494
- sliceBody(s, n) {
4495
- const r = this.getBody();
4496
- if (r != null)
4497
- return ls(r, s, n);
4498
- }
4499
- _updateApply(s, n, r, i = D.COVER, o) {
4500
- if (s == null)
4501
- throw new Error("updateBody is none");
4502
- const u = this.snapshot, a = Wt(u, o);
4503
- if (a == null)
4504
- throw new Error("no body has changed");
4505
- return Rr(a, s, n, r, i);
4506
- }
4507
- _deleteApply(s, n, r) {
4508
- const i = this.snapshot, o = Wt(i, r);
4509
- if (o == null)
4510
- throw new Error("no body has changed");
4511
- return s <= 0 ? { dataStream: "" } : gr(o, s, n);
4512
- }
4513
- _insertApply(s, n, r, i) {
4514
- const o = this.snapshot, u = Wt(o, i);
4515
- if (n !== 0) {
4516
- if (u == null)
4517
- throw new Error("no body has changed");
4518
- Er(u, s, n, r);
4519
- }
4520
- }
4521
- _initializeHeaderFooterModel() {
4522
- const { headers: s, footers: n } = this.getSnapshot();
4523
- if (s)
4524
- for (const r in s) {
4525
- const i = s[r];
4526
- this.headerModelMap.set(r, new ot(i));
4527
- }
4528
- if (n)
4529
- for (const r in n) {
4530
- const i = n[r];
4531
- this.footerModelMap.set(r, new ot(i));
4532
- }
4533
- }
4534
- updateDocumentId(s) {
4535
- super.updateDocumentId(s), this._unitId = s;
4536
- }
4537
- }
4538
- async function br(t) {
4539
- for (const [e, s] of t.entries())
4540
- try {
4541
- if (!await s())
4542
- return {
4543
- index: e,
4544
- result: !1
4545
- };
4546
- } catch (n) {
4547
- return {
4548
- index: e,
4549
- result: !1,
4550
- error: n
4551
- };
4552
- }
4553
- return {
4554
- result: !0,
4555
- index: -1
4556
- };
4557
- }
4558
- function vr(t) {
4559
- for (const [e, s] of t.entries())
4560
- try {
4561
- if (!s())
4562
- return {
4563
- index: e,
4564
- result: !1
4565
- };
4566
- } catch (n) {
4567
- return {
4568
- index: e,
4569
- result: !1,
4570
- error: n
4571
- };
4572
- }
4573
- return {
4574
- result: !0,
4575
- index: -1
4576
- };
4577
- }
4578
- const pt = G("univer.context-service");
4579
- class Ur extends T {
4580
- constructor() {
4581
- super(...arguments);
4582
- d(this, "_contextChanged$", new W());
4583
- d(this, "contextChanged$", this._contextChanged$.asObservable());
4584
- d(this, "_contextMap", /* @__PURE__ */ new Map());
4585
- }
4586
- dispose() {
4587
- super.dispose(), this._contextChanged$.complete();
4588
- }
4589
- getContextValue(s) {
4590
- var n;
4591
- return (n = this._contextMap.get(s)) != null ? n : !1;
4592
- }
4593
- setContextValue(s, n) {
4594
- this._contextMap.set(s, n), this._contextChanged$.next({ [s]: n });
4595
- }
4596
- subscribeContextValue$(s) {
4597
- return new re((n) => {
4598
- const r = this._contextChanged$.pipe(zt((i) => typeof i[s] < "u")).subscribe((i) => n.next(i[s]));
4599
- return this._contextMap.has(s) && n.next(this._contextMap.get(s)), () => r.unsubscribe();
4600
- });
4601
- }
4602
- }
4603
- var Tr = /* @__PURE__ */ ((t) => (t[t.SILENT = 0] = "SILENT", t[t.ERROR = 1] = "ERROR", t[t.WARN = 2] = "WARN", t[t.INFO = 3] = "INFO", t[t.VERBOSE = 4] = "VERBOSE", t))(Tr || {});
4604
- const et = G("univer.log");
4605
- class Mr extends T {
4606
- constructor() {
4607
- super(...arguments);
4608
- d(this, "_logLevel", 3);
4609
- }
4610
- debug(...s) {
4611
- this._logLevel >= 4 && this._log(console.debug, ...s);
4612
- }
4613
- log(...s) {
4614
- this._logLevel >= 3 && this._log(console.log, ...s);
4615
- }
4616
- warn(...s) {
4617
- this._logLevel >= 2 && this._log(console.warn, ...s);
4618
- }
4619
- error(...s) {
4620
- this._logLevel >= 1 && this._log(console.error, ...s);
4621
- }
4622
- setLogLevel(s) {
4623
- this._logLevel = s;
4624
- }
4625
- _log(s, ...n) {
4626
- const r = n[0];
4627
- /^\[(.*?)\]/g.test(r) ? s(`\x1B[97;104m${r}\x1B[0m`, ...n.slice(1)) : s(...n);
4628
- }
4629
- }
4630
- var Dr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, Pr = (t, e, s, n) => {
4631
- for (var r = n > 1 ? void 0 : n ? pr(e, s) : e, i = t.length - 1, o; i >= 0; i--)
4632
- (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
4633
- return n && r && Dr(e, s, r), r;
4634
- }, De = (t, e) => (s, n) => e(s, n, t), fe = /* @__PURE__ */ ((t) => (t[t.COMMAND = 0] = "COMMAND", t[t.OPERATION = 1] = "OPERATION", t[t.MUTATION = 2] = "MUTATION", t))(fe || {});
4635
- const Pt = G("anywhere.command-service");
4636
- class xr {
4637
- constructor() {
4638
- d(this, "_commands", /* @__PURE__ */ new Map());
4639
- }
4640
- registerCommand(e) {
4641
- if (this._commands.has(e.id))
4642
- throw new Error(`[CommandRegistry]: command "${e.id}" has been registered before.`);
4643
- return this._commands.set(e.id, e), b(() => {
4644
- var s;
4645
- this._commands.delete(e.id), (s = e.onDispose) == null || s.call(e);
4646
- });
4647
- }
4648
- hasCommand(e) {
4649
- return this._commands.has(e);
4650
- }
4651
- getCommand(e) {
4652
- return this._commands.has(e) ? [this._commands.get(e)] : null;
4653
- }
4654
- }
4655
- const Hr = {
4656
- id: "nil",
4657
- type: 0,
4658
- handler: () => !0
4659
- };
4660
- let yt = class {
4661
- constructor(t, e) {
4662
- d(this, "_commandRegistry");
4663
- d(this, "_beforeCommandExecutionListeners", []);
4664
- d(this, "_commandExecutedListeners", []);
4665
- d(this, "_multiCommandDisposables", /* @__PURE__ */ new Map());
4666
- d(this, "_commandExecutingLevel", 0);
4667
- d(this, "_commandExecutionStack", []);
4668
- this._injector = t, this._logService = e, this._commandRegistry = new xr(), this._registerCommand(Hr);
4669
- }
4670
- hasCommand(t) {
4671
- return this._commandRegistry.hasCommand(t);
4672
- }
4673
- registerCommand(t) {
4674
- return this._registerCommand(t);
4675
- }
4676
- registerMultipleCommand(t) {
4677
- return this._registerMultiCommand(t);
4678
- }
4679
- beforeCommandExecuted(t) {
4680
- if (this._beforeCommandExecutionListeners.indexOf(t) === -1)
4681
- return this._beforeCommandExecutionListeners.push(t), b(() => {
4682
- const e = this._beforeCommandExecutionListeners.indexOf(t);
4683
- this._beforeCommandExecutionListeners.splice(e, 1);
4684
- });
4685
- throw new Error("[CommandService]: could not add a listener twice.");
4686
- }
4687
- onCommandExecuted(t) {
4688
- if (this._commandExecutedListeners.indexOf(t) === -1)
4689
- return this._commandExecutedListeners.push(t), b(() => {
4690
- const e = this._commandExecutedListeners.indexOf(t);
4691
- this._commandExecutedListeners.splice(e, 1);
4692
- });
4693
- throw new Error("[CommandService]: could not add a listener twice.");
4741
+ incrementRev() {
4742
+ this.snapshot.rev = this.getRev() + 1;
4694
4743
  }
4695
- async executeCommand(t, e, s) {
4696
- const n = this._commandRegistry.getCommand(t);
4697
- if (n) {
4698
- const [r] = n, i = {
4699
- id: r.id,
4700
- type: r.type,
4701
- params: e
4702
- }, o = this._pushCommandExecutionStack(i);
4703
- this._beforeCommandExecutionListeners.forEach((a) => a(i, s));
4704
- const u = await this._execute(r, e, s);
4705
- return this._commandExecutedListeners.forEach((a) => a(i, s)), o.dispose(), u;
4706
- }
4707
- throw new Error(`[CommandService]: command "${t}" is not registered.`);
4744
+ getSettings() {
4745
+ return this.snapshot.settings;
4708
4746
  }
4709
- syncExecuteCommand(t, e, s) {
4710
- var r;
4711
- const n = this._commandRegistry.getCommand(t);
4712
- if (n) {
4713
- const [i] = n, o = {
4714
- id: i.id,
4715
- type: i.type,
4716
- params: e
4717
- };
4718
- if (i.type === 2) {
4719
- const l = qn(
4720
- this._commandExecutionStack,
4721
- (c) => c.type === 0
4722
- /* COMMAND */
4723
- );
4724
- l && (o.params = (r = o.params) != null ? r : {}, o.params.trigger = l.id);
4725
- }
4726
- const u = this._pushCommandExecutionStack(o);
4727
- this._beforeCommandExecutionListeners.forEach((l) => l(o, s));
4728
- const a = this._syncExecute(i, e, s);
4729
- return this._commandExecutedListeners.forEach((l) => l(o, s)), u.dispose(), a;
4747
+ // TODO: @JOCS do not use reset, please use apply to modify the snapshot.
4748
+ reset(s) {
4749
+ if (s.id && s.id !== this._unitId)
4750
+ throw new Error("Cannot reset a document model with a different unit id!");
4751
+ this.snapshot = { ...hs, ...s }, this._initializeHeaderFooterModel();
4752
+ }
4753
+ getSelfOrHeaderFooterModel(s) {
4754
+ if (s != null) {
4755
+ if (this.headerModelMap.has(s))
4756
+ return this.headerModelMap.get(s);
4757
+ if (this.footerModelMap.has(s))
4758
+ return this.footerModelMap.get(s);
4730
4759
  }
4731
- throw new Error(`[CommandService]: command "${t}" is not registered.`);
4760
+ return this;
4732
4761
  }
4733
- _pushCommandExecutionStack(t) {
4734
- return this._commandExecutionStack.push(t), b(() => ce(this._commandExecutionStack, t));
4762
+ getUnitId() {
4763
+ return this._unitId;
4735
4764
  }
4736
- _registerCommand(t) {
4737
- return this._commandRegistry.registerCommand(t);
4765
+ apply(s) {
4766
+ const n = [], r = new vr();
4767
+ return r.reset(), s.forEach((i) => {
4768
+ if (i = R.deepClone(i), i.t === A.RETAIN) {
4769
+ const { coverType: o, body: u, len: a, segmentId: l } = i;
4770
+ if (u != null) {
4771
+ const c = this._updateApply(u, a, r.cursor, o, l);
4772
+ n.push({
4773
+ ...i,
4774
+ t: A.RETAIN,
4775
+ coverType: D.REPLACE,
4776
+ body: c
4777
+ });
4778
+ } else
4779
+ n.push({
4780
+ ...i,
4781
+ t: A.RETAIN
4782
+ });
4783
+ r.moveCursor(a);
4784
+ } else if (i.t === A.INSERT) {
4785
+ const { body: o, len: u, segmentId: a, line: l } = i;
4786
+ this._insertApply(o, u, r.cursor, a), r.moveCursor(u), n.push({
4787
+ t: A.DELETE,
4788
+ len: u,
4789
+ line: l,
4790
+ segmentId: a
4791
+ });
4792
+ } else if (i.t === A.DELETE) {
4793
+ const { len: o, segmentId: u } = i, a = this._deleteApply(o, r.cursor, u);
4794
+ n.push({
4795
+ ...i,
4796
+ t: A.INSERT,
4797
+ body: a
4798
+ });
4799
+ } else
4800
+ throw new Error(`Unknown action type for action: ${i}.`);
4801
+ }), n;
4738
4802
  }
4739
- _registerMultiCommand(t) {
4740
- const e = this._commandRegistry.getCommand(t.id);
4741
- let s;
4742
- if (e) {
4743
- if (e[0].multi !== !0)
4744
- throw new Error("Command has registered as a single command.");
4745
- s = e[0];
4746
- } else {
4747
- const r = new Ye();
4748
- s = new Fr(t.id), r.add(this._commandRegistry.registerCommand(s)), r.add(
4749
- b(() => {
4750
- this._multiCommandDisposables.delete(t.id);
4751
- })
4752
- ), this._multiCommandDisposables.set(t.id, r);
4753
- }
4754
- const n = s.registerImplementation(t);
4755
- return b(() => {
4756
- var r;
4757
- n.dispose(), s.hasImplementations() || (r = this._multiCommandDisposables.get(t.id)) == null || r.dispose();
4758
- });
4803
+ sliceBody(s, n) {
4804
+ const r = this.getBody();
4805
+ if (r != null)
4806
+ return cs(r, s, n);
4759
4807
  }
4760
- async _execute(t, e, s) {
4761
- this._logService.debug(
4762
- "[CommandService]",
4763
- `${"|-".repeat(Math.max(this._commandExecutingLevel, 0))}executing command "${t.id}"`
4764
- ), this._commandExecutingLevel++;
4765
- let n;
4766
- try {
4767
- n = await this._injector.invoke(t.handler, e, s), this._commandExecutingLevel--;
4768
- } catch (r) {
4769
- throw n = !1, this._commandExecutingLevel = 0, r;
4770
- }
4771
- return n;
4808
+ _updateApply(s, n, r, i = D.COVER, o) {
4809
+ if (s == null)
4810
+ throw new Error("updateBody is none");
4811
+ const u = this.snapshot, a = Gt(u, o);
4812
+ if (a == null)
4813
+ throw new Error("no body has changed");
4814
+ return xr(a, s, n, r, i);
4772
4815
  }
4773
- _syncExecute(t, e, s) {
4774
- this._logService.debug(
4775
- "[CommandService]",
4776
- `${"|-".repeat(Math.max(0, this._commandExecutingLevel))}executing command "${t.id}".`
4777
- ), this._commandExecutingLevel++;
4778
- let n;
4779
- try {
4780
- if (n = this._injector.invoke(t.handler, e, s), n instanceof Promise)
4781
- throw new TypeError("[CommandService]: Command handler should not return a promise.");
4782
- this._commandExecutingLevel--;
4783
- } catch (r) {
4784
- throw n = !1, this._commandExecutingLevel = 0, r;
4816
+ _deleteApply(s, n, r) {
4817
+ const i = this.snapshot, o = Gt(i, r);
4818
+ if (o == null)
4819
+ throw new Error("no body has changed");
4820
+ return s <= 0 ? { dataStream: "" } : Dr(o, s, n);
4821
+ }
4822
+ _insertApply(s, n, r, i) {
4823
+ const o = this.snapshot, u = Gt(o, i);
4824
+ if (n !== 0) {
4825
+ if (u == null)
4826
+ throw new Error("no body has changed");
4827
+ pr(u, s, n, r);
4785
4828
  }
4786
- return n;
4787
4829
  }
4788
- };
4789
- yt = Pr([
4790
- De(0, x(tt)),
4791
- De(1, et)
4792
- ], yt);
4793
- class Fr {
4794
- constructor(e) {
4795
- d(this, "name");
4796
- d(this, "multi", !0);
4797
- d(this, "type", 0);
4798
- d(this, "priority", 0);
4799
- d(this, "_implementations", []);
4800
- d(this, "handler", async (e, s) => {
4801
- if (!this._implementations.length)
4802
- return !1;
4803
- const n = e.get(et), r = e.get(pt), i = e.get(tt);
4804
- for (const o of this._implementations) {
4805
- const u = o.command.preconditions;
4806
- if ((!u || u && u(r)) && (n.debug("[MultiCommand]", `executing implementation "${o.command.name}".`), await i.invoke(o.command.handler, s)))
4807
- return !0;
4830
+ _initializeHeaderFooterModel() {
4831
+ const { headers: s, footers: n } = this.getSnapshot();
4832
+ if (s)
4833
+ for (const r in s) {
4834
+ const i = s[r];
4835
+ this.headerModelMap.set(r, new ot(i));
4836
+ }
4837
+ if (n)
4838
+ for (const r in n) {
4839
+ const i = n[r];
4840
+ this.footerModelMap.set(r, new ot(i));
4808
4841
  }
4809
- return !1;
4810
- });
4811
- this.id = e, this.name = e;
4812
- }
4813
- registerImplementation(e) {
4814
- const s = { command: e };
4815
- return this._implementations.push(s), this._implementations.sort((n, r) => r.command.priority - n.command.priority), b(() => {
4816
- var r;
4817
- const n = this._implementations.indexOf(s);
4818
- this._implementations.splice(n, 1), (r = e.onDispose) == null || r.call(e);
4819
- });
4820
4842
  }
4821
- hasImplementations() {
4822
- return this._implementations.length > 0;
4843
+ updateDocumentId(s) {
4844
+ super.updateDocumentId(s), this._unitId = s;
4823
4845
  }
4824
4846
  }
4825
- function hs(t, e, s) {
4826
- const n = t.map((r) => () => e.syncExecuteCommand(r.id, r.params, s));
4827
- return vr(n);
4828
- }
4829
- function uu(t, e, s) {
4830
- const n = t.map((r) => () => e.executeCommand(r.id, r.params, s));
4831
- return br(n);
4832
- }
4833
- const Wr = G("univer.config-service");
4834
- class Gr {
4847
+ const jr = G("univer.config-service");
4848
+ class Kr {
4835
4849
  constructor() {
4836
4850
  d(this, "_config", /* @__PURE__ */ new Map());
4837
4851
  }
@@ -4845,10 +4859,10 @@ class Gr {
4845
4859
  this._config.delete(e);
4846
4860
  }
4847
4861
  }
4848
- class Br extends T {
4862
+ class Yr extends T {
4849
4863
  constructor() {
4850
4864
  super(...arguments);
4851
- d(this, "_error$", new W());
4865
+ d(this, "_error$", new H());
4852
4866
  d(this, "error$", this._error$.asObservable());
4853
4867
  }
4854
4868
  dispose() {
@@ -4858,28 +4872,28 @@ class Br extends T {
4858
4872
  this._error$.next({ errorKey: s });
4859
4873
  }
4860
4874
  }
4861
- const au = "__default_document_sub_component_id20231101__";
4862
- class kr {
4875
+ const Eu = "__default_document_sub_component_id20231101__";
4876
+ class zr {
4863
4877
  constructor() {
4864
4878
  d(this, "_managerInfo", /* @__PURE__ */ new Map());
4865
4879
  /**
4866
4880
  * The deletion action is triggered and broadcasted within the core business plugin.
4867
4881
  * Upon receiving the deletion broadcast, the plugin executes the plugin command logic.
4868
4882
  */
4869
- d(this, "_remove$", new W());
4883
+ d(this, "_remove$", new H());
4870
4884
  d(this, "remove$", this._remove$.asObservable());
4871
4885
  /**
4872
4886
  * Addition and updates are also triggered and broadcasted within the core business plugin.
4873
4887
  * Upon receiving the update broadcast, the plugin updates the location of its business components.
4874
4888
  */
4875
- d(this, "_andOrUpdate$", new W());
4889
+ d(this, "_andOrUpdate$", new H());
4876
4890
  d(this, "andOrUpdate$", this._andOrUpdate$.asObservable());
4877
4891
  /**
4878
4892
  * The position, width, and height of the plugin's business components can be changed by the user through interface operations.
4879
4893
  * Here, it is necessary to notify the core business plugin to update the relevant location model.
4880
4894
  * The logic converges in the core business plugin.
4881
4895
  */
4882
- d(this, "_pluginUpdate$", new W());
4896
+ d(this, "_pluginUpdate$", new H());
4883
4897
  d(this, "pluginUpdate$", this._pluginUpdate$.asObservable());
4884
4898
  }
4885
4899
  getFloatObject(e) {
@@ -4899,7 +4913,7 @@ class kr {
4899
4913
  const s = this._addByParam(e);
4900
4914
  this._andOrUpdate$.next(s);
4901
4915
  }
4902
- BatchAddOrUpdate(e) {
4916
+ batchAddOrUpdate(e) {
4903
4917
  const s = [];
4904
4918
  e.forEach((n) => {
4905
4919
  s.push(...this._addByParam(n));
@@ -4927,10 +4941,10 @@ class kr {
4927
4941
  return (o = (i = this._managerInfo.get(s)) == null ? void 0 : i.get(n)) == null ? void 0 : o.get(r);
4928
4942
  }
4929
4943
  _addByParam(e) {
4930
- const { unitId: s, subUnitId: n, floatingObject: r, floatingObjectId: i } = e;
4944
+ const { unitId: s, subUnitId: n, floatingObject: r, floatingObjectId: i, behindText: o } = e;
4931
4945
  this._managerInfo.has(s) || this._managerInfo.set(s, /* @__PURE__ */ new Map());
4932
- const o = this._managerInfo.get(s);
4933
- return o.has(n) || o.set(n, /* @__PURE__ */ new Map()), o.get(n).set(i, r), [{ unitId: s, subUnitId: n, floatingObjectId: i, floatingObject: r }];
4946
+ const u = this._managerInfo.get(s);
4947
+ return u.has(n) || u.set(n, /* @__PURE__ */ new Map()), u.get(n).set(i, r), [{ unitId: s, subUnitId: n, floatingObjectId: i, floatingObject: r, behindText: o }];
4934
4948
  }
4935
4949
  _clearByParam(e) {
4936
4950
  const s = this._getFloatingObjects(e), { unitId: n, subUnitId: r } = e, i = [];
@@ -4948,13 +4962,13 @@ class kr {
4948
4962
  return n == null ? [] : (s == null || s.delete(e.floatingObjectId), [{ ...e, floatingObject: n }]);
4949
4963
  }
4950
4964
  }
4951
- const $r = G(
4965
+ const Xr = G(
4952
4966
  "univer.floating-object.service"
4953
4967
  );
4954
- class Vr {
4968
+ class Jr {
4955
4969
  constructor(e = {}) {
4956
4970
  d(this, "_styles");
4957
- d(this, "_cacheMap", new tr(1e5));
4971
+ d(this, "_cacheMap", new ir(1e5));
4958
4972
  this._styles = e, this._generateCacheMap();
4959
4973
  }
4960
4974
  each(e) {
@@ -5006,7 +5020,7 @@ class Vr {
5006
5020
  return null;
5007
5021
  }
5008
5022
  }
5009
- class jr {
5023
+ class qr {
5010
5024
  constructor(e, s) {
5011
5025
  d(this, "_columnData", {});
5012
5026
  this._config = e, this._columnData = s;
@@ -5131,7 +5145,7 @@ class jr {
5131
5145
  return this._columnData[e] = i, i;
5132
5146
  }
5133
5147
  }
5134
- class Kr {
5148
+ class Zr {
5135
5149
  constructor(e, s, n) {
5136
5150
  d(this, "_rowData");
5137
5151
  this._config = e, this._viewModel = s, this._rowData = n;
@@ -5238,15 +5252,15 @@ class Kr {
5238
5252
  return J(this._rowData);
5239
5253
  }
5240
5254
  }
5241
- const lu = "DEFAULT_WORKSHEET_ROW_COUNT", Yr = 1e3, cu = "DEFAULT_WORKSHEET_COLUMN_COUNT", zr = 20, hu = "DEFAULT_WORKSHEET_ROW_HEIGHT", Xr = 19, du = "DEFAULT_WORKSHEET_COLUMN_WIDTH", Jr = 73, _u = "DEFAULT_WORKSHEET_ROW_TITLE_WIDTH", qr = 46, fu = "DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT", Zr = 20;
5242
- function Qr(t) {
5255
+ const Ru = "DEFAULT_WORKSHEET_ROW_COUNT", Qr = 1e3, mu = "DEFAULT_WORKSHEET_COLUMN_COUNT", yr = 20, Cu = "DEFAULT_WORKSHEET_ROW_HEIGHT", ti = 19, Ou = "DEFAULT_WORKSHEET_COLUMN_WIDTH", ei = 73, Au = "DEFAULT_WORKSHEET_ROW_TITLE_WIDTH", si = 46, Iu = "DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT", ni = 20;
5256
+ function ri(t) {
5243
5257
  const e = {
5244
5258
  name: "Sheet1",
5245
5259
  id: "sheet-01",
5246
5260
  tabColor: "",
5247
5261
  hidden: C.FALSE,
5248
- rowCount: Yr,
5249
- columnCount: zr,
5262
+ rowCount: Qr,
5263
+ columnCount: yr,
5250
5264
  zoomRatio: 1,
5251
5265
  freeze: {
5252
5266
  xSplit: 0,
@@ -5256,19 +5270,19 @@ function Qr(t) {
5256
5270
  },
5257
5271
  scrollTop: 0,
5258
5272
  scrollLeft: 0,
5259
- defaultColumnWidth: Jr,
5260
- defaultRowHeight: Xr,
5273
+ defaultColumnWidth: ei,
5274
+ defaultRowHeight: ti,
5261
5275
  mergeData: [],
5262
5276
  cellData: {},
5263
5277
  rowData: {},
5264
5278
  columnData: {},
5265
5279
  showGridlines: C.TRUE,
5266
5280
  rowHeader: {
5267
- width: qr,
5281
+ width: si,
5268
5282
  hidden: C.FALSE
5269
5283
  },
5270
5284
  columnHeader: {
5271
- height: Zr,
5285
+ height: ni,
5272
5286
  hidden: C.FALSE
5273
5287
  },
5274
5288
  selections: ["A1"],
@@ -5279,7 +5293,7 @@ function Qr(t) {
5279
5293
  typeof t[n] > "u" && (t[n] = e[n]);
5280
5294
  }), t;
5281
5295
  }
5282
- class yr extends T {
5296
+ class ii extends T {
5283
5297
  constructor(s) {
5284
5298
  super();
5285
5299
  d(this, "_cellContentInterceptor", null);
@@ -5316,9 +5330,9 @@ class vt {
5316
5330
  d(this, "_columnManager");
5317
5331
  d(this, "_viewModel");
5318
5332
  var u;
5319
- this.unitId = e, this._styles = n, this._snapshot = Qr(s);
5333
+ this.unitId = e, this._styles = n, this._snapshot = ri(s);
5320
5334
  const { columnData: r, rowData: i, cellData: o } = this._snapshot;
5321
- this._sheetId = (u = this._snapshot.id) != null ? u : R.generateRandomId(6), this._cellData = new $(o), this._viewModel = new yr((a, l) => this.getCellRaw(a, l)), this._rowManager = new Kr(this._snapshot, this._viewModel, i), this._columnManager = new jr(this._snapshot, r);
5335
+ this._sheetId = (u = this._snapshot.id) != null ? u : R.generateRandomId(6), this._cellData = new k(o), this._viewModel = new ii((a, l) => this.getCellRaw(a, l)), this._rowManager = new Zr(this._snapshot, this._viewModel, i), this._columnManager = new qr(this._snapshot, r);
5322
5336
  }
5323
5337
  /**
5324
5338
  * @internal
@@ -5439,7 +5453,7 @@ class vt {
5439
5453
  getMatrixWithMergedCells(e, s, n, r, i = !1) {
5440
5454
  const o = this.getCellMatrix(), u = this._snapshot.mergeData.filter(
5441
5455
  (l) => Z.intersects({ startRow: e, startColumn: s, endRow: n, endColumn: r }, l)
5442
- ), a = new $();
5456
+ ), a = new k();
5443
5457
  return Ue(e, n, s, r).forEach((l, c) => {
5444
5458
  const h = i ? this.getCellRaw(l, c) : this.getCell(l, c);
5445
5459
  h && a.setValue(l, c, h);
@@ -5720,7 +5734,7 @@ class vt {
5720
5734
  };
5721
5735
  }
5722
5736
  }
5723
- function gu(t) {
5737
+ function Nu(t) {
5724
5738
  var n, r;
5725
5739
  if (!t)
5726
5740
  return "";
@@ -5730,34 +5744,34 @@ function gu(t) {
5730
5744
  const s = t.v;
5731
5745
  return typeof s == "string" ? t.t === nt.BOOLEAN ? s.toUpperCase() : s : typeof s == "number" ? t.t === nt.BOOLEAN ? s ? "TRUE" : "FALSE" : s.toString() : typeof s == "boolean" ? s ? "TRUE" : "FALSE" : "";
5732
5746
  }
5733
- const ti = "0.1.8";
5734
- function ei(t = "", e = ut.ZH_CN, s = "") {
5747
+ const oi = "0.1.10";
5748
+ function ui(t = "", e = ut.ZH_CN, s = "") {
5735
5749
  return {
5736
5750
  id: t,
5737
5751
  sheetOrder: [],
5738
5752
  name: s,
5739
- appVersion: ti,
5753
+ appVersion: oi,
5740
5754
  locale: e,
5741
5755
  styles: {},
5742
5756
  sheets: {},
5743
5757
  resources: []
5744
5758
  };
5745
5759
  }
5746
- var si = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ri = (t, e, s, n) => {
5747
- for (var r = n > 1 ? void 0 : n ? ni(e, s) : e, i = t.length - 1, o; i >= 0; i--)
5760
+ var ai = Object.defineProperty, li = Object.getOwnPropertyDescriptor, ci = (t, e, s, n) => {
5761
+ for (var r = n > 1 ? void 0 : n ? li(e, s) : e, i = t.length - 1, o; i >= 0; i--)
5748
5762
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
5749
- return n && r && si(e, s, r), r;
5750
- }, ii = (t, e) => (s, n) => e(s, n, t);
5751
- function Eu(t, e) {
5763
+ return n && r && ai(e, s, r), r;
5764
+ }, hi = (t, e) => (s, n) => e(s, n, t);
5765
+ function Su(t, e) {
5752
5766
  return `${t.getUnitId()}|${e.getSheetId()}`;
5753
5767
  }
5754
- let Ut = class extends he {
5768
+ let Ut = class extends de {
5755
5769
  constructor(e = {}, s) {
5756
5770
  super();
5757
5771
  d(this, "type", O.UNIVER_SHEET);
5758
- d(this, "_sheetCreated$", new W());
5772
+ d(this, "_sheetCreated$", new H());
5759
5773
  d(this, "sheetCreated$", this._sheetCreated$.asObservable());
5760
- d(this, "_sheetDisposed$", new W());
5774
+ d(this, "_sheetDisposed$", new H());
5761
5775
  d(this, "sheetDisposed$", this._sheetDisposed$.asObservable());
5762
5776
  d(this, "_activeSheet$", new q(null));
5763
5777
  d(this, "activeSheet$", this._activeSheet$.asObservable());
@@ -5780,10 +5794,10 @@ let Ut = class extends he {
5780
5794
  d(this, "_unitId");
5781
5795
  d(this, "_count");
5782
5796
  this._logService = s;
5783
- const n = ei();
5797
+ const n = ui();
5784
5798
  R.isEmptyObject(e) ? this._snapshot = n : this._snapshot = R.commonExtend(n, e);
5785
5799
  const { styles: r } = this._snapshot;
5786
- (this._snapshot.id == null || this._snapshot.id.length === 0) && (this._snapshot.id = R.generateRandomId(6)), this._unitId = this._snapshot.id, this._styles = new Vr(r), this._count = 1, this._worksheets = /* @__PURE__ */ new Map(), this._passWorksheetSnapshots();
5800
+ (this._snapshot.id == null || this._snapshot.id.length === 0) && (this._snapshot.id = R.generateRandomId(6)), this._unitId = this._snapshot.id, this._styles = new Jr(r), this._count = 1, this._worksheets = /* @__PURE__ */ new Map(), this._passWorksheetSnapshots();
5787
5801
  }
5788
5802
  get _activeSheet() {
5789
5803
  return this._activeSheet$.getValue();
@@ -6066,17 +6080,17 @@ let Ut = class extends he {
6066
6080
  }
6067
6081
  }
6068
6082
  };
6069
- Ut = ri([
6070
- ii(1, et)
6083
+ Ut = ci([
6084
+ hi(1, et)
6071
6085
  ], Ut);
6072
- class ds extends he {
6086
+ class ds extends de {
6073
6087
  constructor(s) {
6074
6088
  var n;
6075
6089
  super();
6076
6090
  d(this, "type", O.UNIVER_SLIDE);
6077
6091
  d(this, "_snapshot");
6078
6092
  d(this, "_unitId");
6079
- this._snapshot = { ...or, ...s }, this._unitId = (n = this._snapshot.id) != null ? n : R.generateRandomId(6);
6093
+ this._snapshot = { ...hr, ...s }, this._unitId = (n = this._snapshot.id) != null ? n : R.generateRandomId(6);
6080
6094
  }
6081
6095
  getContainer() {
6082
6096
  return this._snapshot.container;
@@ -6116,7 +6130,7 @@ class ds extends he {
6116
6130
  addPage() {
6117
6131
  return {
6118
6132
  id: "cover_1",
6119
- pageType: $e.SLIDE,
6133
+ pageType: ke.SLIDE,
6120
6134
  zIndex: 1,
6121
6135
  title: "cover",
6122
6136
  description: "this is first page, cover",
@@ -6127,14 +6141,14 @@ class ds extends he {
6127
6141
  };
6128
6142
  }
6129
6143
  }
6130
- const Ot = "FOCUSING_SHEET", $t = "FOCUSING_DOC", Vt = "FOCUSING_SLIDE", Ru = "FOCUSING_EDITOR_BUT_HIDDEN", oi = "EDITOR_ACTIVATED", mu = "FOCUSING_EDITOR_INPUT_FORMULA", ui = "FOCUSING_FORMULA_EDITOR", Cu = "FOCUSING_UNIVER_EDITOR", Ou = "FOCUSING_EDITOR_INPUT_FORMULA", Au = "FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE";
6131
- var ai = Object.defineProperty, li = Object.getOwnPropertyDescriptor, ci = (t, e, s, n) => {
6132
- for (var r = n > 1 ? void 0 : n ? li(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6144
+ const Ot = "FOCUSING_SHEET", Vt = "FOCUSING_DOC", jt = "FOCUSING_SLIDE", wu = "FOCUSING_EDITOR_BUT_HIDDEN", di = "EDITOR_ACTIVATED", Lu = "FOCUSING_EDITOR_INPUT_FORMULA", _i = "FOCUSING_FORMULA_EDITOR", bu = "FOCUSING_UNIVER_EDITOR", vu = "FOCUSING_EDITOR_INPUT_FORMULA", Uu = "FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE";
6145
+ var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, Ei = (t, e, s, n) => {
6146
+ for (var r = n > 1 ? void 0 : n ? gi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6133
6147
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6134
- return n && r && ai(e, s, r), r;
6148
+ return n && r && fi(e, s, r), r;
6135
6149
  }, pe = (t, e) => (s, n) => e(s, n, t);
6136
6150
  const Q = G("univer.current");
6137
- let te = class extends T {
6151
+ let ee = class extends T {
6138
6152
  constructor(e, s) {
6139
6153
  super();
6140
6154
  d(this, "_unitsByType", /* @__PURE__ */ new Map());
@@ -6142,9 +6156,9 @@ let te = class extends T {
6142
6156
  d(this, "_ctorByType", /* @__PURE__ */ new Map());
6143
6157
  d(this, "_currentUnits$", new q({}));
6144
6158
  d(this, "currentUnits$", this._currentUnits$.asObservable());
6145
- d(this, "_unitAdded$", new W());
6159
+ d(this, "_unitAdded$", new H());
6146
6160
  d(this, "unitAdded$", this._unitAdded$.asObservable());
6147
- d(this, "_unitDisposed$", new W());
6161
+ d(this, "_unitDisposed$", new H());
6148
6162
  d(this, "unitDisposed$", this._unitDisposed$.asObservable());
6149
6163
  d(this, "_focused$", new q(null));
6150
6164
  d(this, "focused$", this._focused$.asObservable());
@@ -6167,10 +6181,10 @@ let te = class extends T {
6167
6181
  };
6168
6182
  }
6169
6183
  getCurrentTypeOfUnit$(e) {
6170
- return this.currentUnits$.pipe(bs((s) => {
6184
+ return this.currentUnits$.pipe(Us((s) => {
6171
6185
  var n;
6172
6186
  return (n = s[e]) != null ? n : null;
6173
- }), vs());
6187
+ }), Ts());
6174
6188
  }
6175
6189
  getCurrentUnitForType(e) {
6176
6190
  return this._currentUnits$.getValue()[e];
@@ -6182,14 +6196,14 @@ let te = class extends T {
6182
6196
  this._currentUnits$.next({ ...this._currentUnits$.getValue(), [s[1]]: s[0] });
6183
6197
  }
6184
6198
  getTypeOfUnitAdded$(e) {
6185
- return this._unitAdded$.pipe(zt((s) => s.type === e));
6199
+ return this._unitAdded$.pipe(Xt((s) => s.type === e));
6186
6200
  }
6187
6201
  __addUnit(e) {
6188
6202
  const s = e.type;
6189
6203
  this._unitsByType.has(s) || this._unitsByType.set(s, []), this._unitsByType.get(s).push(e), this._unitAdded$.next(e), this._currentUnits$.next({ ...this._currentUnits$.getValue(), [s]: e });
6190
6204
  }
6191
6205
  getTypeOfUnitDisposed$(e) {
6192
- return this.unitDisposed$.pipe(zt((s) => s.type === e));
6206
+ return this.unitDisposed$.pipe(Xt((s) => s.type === e));
6193
6207
  }
6194
6208
  getUnit(e, s) {
6195
6209
  var r;
@@ -6223,7 +6237,7 @@ let te = class extends T {
6223
6237
  return e ? (s = this._getUnitById(e)) == null ? void 0 : s[0] : null;
6224
6238
  }
6225
6239
  focusUnit(e) {
6226
- this._focused$.next(e), this.focused instanceof Ut ? (this._contextService.setContextValue($t, !1), this._contextService.setContextValue(Ot, !0), this._contextService.setContextValue(Vt, !1)) : this.focused instanceof ot ? (this._contextService.setContextValue($t, !0), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(Vt, !1)) : this.focused instanceof ds && (this._contextService.setContextValue($t, !1), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(Vt, !0));
6240
+ this._focused$.next(e), this.focused instanceof Ut ? (this._contextService.setContextValue(Vt, !1), this._contextService.setContextValue(Ot, !0), this._contextService.setContextValue(jt, !1)) : this.focused instanceof ot ? (this._contextService.setContextValue(Vt, !0), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(jt, !1)) : this.focused instanceof ds && (this._contextService.setContextValue(Vt, !1), this._contextService.setContextValue(Ot, !1), this._contextService.setContextValue(jt, !0));
6227
6241
  }
6228
6242
  getFocusedUnit() {
6229
6243
  return this.focused;
@@ -6249,12 +6263,12 @@ let te = class extends T {
6249
6263
  }
6250
6264
  }
6251
6265
  };
6252
- te = ci([
6253
- pe(0, x(tt)),
6266
+ ee = Ei([
6267
+ pe(0, P(tt)),
6254
6268
  pe(1, pt)
6255
- ], te);
6269
+ ], ee);
6256
6270
  var w = /* @__PURE__ */ ((t) => (t[t.Starting = 0] = "Starting", t[t.Ready = 1] = "Ready", t[t.Rendered = 2] = "Rendered", t[t.Steady = 3] = "Steady", t))(w || {});
6257
- const hi = {
6271
+ const Ri = {
6258
6272
  0: "Starting",
6259
6273
  1: "Ready",
6260
6274
  2: "Rendered",
@@ -6268,11 +6282,11 @@ function _s(t, e) {
6268
6282
  function fs(t, e) {
6269
6283
  At.has(t) || At.set(t, []), At.get(t).push(e);
6270
6284
  }
6271
- var di = Object.defineProperty, _i = Object.getOwnPropertyDescriptor, gs = (t, e, s, n) => {
6272
- for (var r = n > 1 ? void 0 : n ? _i(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6285
+ var mi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, gs = (t, e, s, n) => {
6286
+ for (var r = n > 1 ? void 0 : n ? Ci(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6273
6287
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6274
- return n && r && di(e, s, r), r;
6275
- }, ee = (t, e) => (s, n) => e(s, n, t);
6288
+ return n && r && mi(e, s, r), r;
6289
+ }, se = (t, e) => (s, n) => e(s, n, t);
6276
6290
  let y = class extends T {
6277
6291
  constructor(e) {
6278
6292
  super();
@@ -6302,14 +6316,14 @@ let y = class extends T {
6302
6316
  * @returns
6303
6317
  */
6304
6318
  subscribeWithPrevious() {
6305
- return new re((e) => (this.stage === w.Starting || (this.stage === w.Ready ? e.next(w.Starting) : this.stage === w.Rendered ? (e.next(w.Starting), e.next(w.Ready)) : (e.next(w.Starting), e.next(w.Ready), e.next(w.Rendered))), this._lifecycle$.subscribe(e)));
6319
+ return new ie((e) => (this.stage === w.Starting || (this.stage === w.Ready ? e.next(w.Starting) : this.stage === w.Rendered ? (e.next(w.Starting), e.next(w.Ready)) : (e.next(w.Starting), e.next(w.Ready), e.next(w.Rendered))), this._lifecycle$.subscribe(e)));
6306
6320
  }
6307
6321
  _reportProgress(e) {
6308
- this._logService.debug("[LifecycleService]", `lifecycle progressed to "${hi[e]}".`);
6322
+ this._logService.debug("[LifecycleService]", `lifecycle progressed to "${Ri[e]}".`);
6309
6323
  }
6310
6324
  };
6311
6325
  y = gs([
6312
- ee(0, et)
6326
+ se(0, et)
6313
6327
  ], y);
6314
6328
  let Tt = class extends T {
6315
6329
  constructor(e, s) {
@@ -6325,15 +6339,15 @@ let Tt = class extends T {
6325
6339
  }
6326
6340
  };
6327
6341
  Tt = gs([
6328
- ee(0, x(y)),
6329
- ee(1, x(tt))
6342
+ se(0, P(y)),
6343
+ se(1, P(tt))
6330
6344
  ], Tt);
6331
6345
  class It extends T {
6332
6346
  constructor() {
6333
6347
  super();
6334
6348
  d(this, "_currentLocale", ut.ZH_CN);
6335
6349
  d(this, "_locales", null);
6336
- d(this, "localeChanged$", new W());
6350
+ d(this, "localeChanged$", new H());
6337
6351
  /**
6338
6352
  * Translate a key to the current locale
6339
6353
  *
@@ -6402,11 +6416,11 @@ class It extends T {
6402
6416
  }
6403
6417
  }
6404
6418
  const ge = G("resource-manager-service");
6405
- var fi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, Ei = (t, e, s, n) => {
6406
- for (var r = n > 1 ? void 0 : n ? gi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6419
+ var Oi = Object.defineProperty, Ai = Object.getOwnPropertyDescriptor, Ii = (t, e, s, n) => {
6420
+ for (var r = n > 1 ? void 0 : n ? Ai(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6407
6421
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6408
- return n && r && fi(e, s, r), r;
6409
- }, Pe = (t, e) => (s, n) => e(s, n, t);
6422
+ return n && r && Oi(e, s, r), r;
6423
+ }, xe = (t, e) => (s, n) => e(s, n, t);
6410
6424
  const Es = G("univer.permission-service");
6411
6425
  let Nt = class extends T {
6412
6426
  constructor(e, s) {
@@ -6489,9 +6503,9 @@ let Nt = class extends T {
6489
6503
  throw new Error(`${i} permissionPoint is not exist`);
6490
6504
  return o.asObservable();
6491
6505
  });
6492
- return Us(r).pipe(
6506
+ return Ms(r).pipe(
6493
6507
  // Check that all permissions exist
6494
- Ts((i) => (i.every((o) => this._permissionPointMap.get(o.id)), i))
6508
+ Ps((i) => (i.every((o) => this._permissionPointMap.get(o.id)), i))
6495
6509
  );
6496
6510
  }
6497
6511
  composePermission(e, s) {
@@ -6504,57 +6518,57 @@ let Nt = class extends T {
6504
6518
  });
6505
6519
  }
6506
6520
  };
6507
- Nt = Ei([
6521
+ Nt = Ii([
6508
6522
  _s(w.Starting, Nt),
6509
- Pe(0, x(ge)),
6510
- Pe(1, x(Q))
6523
+ xe(0, P(ge)),
6524
+ xe(1, P(Q))
6511
6525
  ], Nt);
6512
- const Ri = "univer.editable";
6513
- class jt extends nr {
6526
+ const Ni = "univer.editable";
6527
+ class Kt extends ar {
6514
6528
  constructor(s) {
6515
6529
  super();
6516
- d(this, "id", Ri);
6530
+ d(this, "id", Ni);
6517
6531
  d(this, "value", !0);
6518
6532
  d(this, "unitID");
6519
6533
  this.unitID = s;
6520
6534
  }
6521
6535
  }
6522
- var mi = Object.defineProperty, Ci = Object.getOwnPropertyDescriptor, Oi = (t, e, s, n) => {
6523
- for (var r = n > 1 ? void 0 : n ? Ci(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6536
+ var Si = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, Li = (t, e, s, n) => {
6537
+ for (var r = n > 1 ? void 0 : n ? wi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6524
6538
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6525
- return n && r && mi(e, s, r), r;
6526
- }, xe = (t, e) => (s, n) => e(s, n, t);
6539
+ return n && r && Si(e, s, r), r;
6540
+ }, Pe = (t, e) => (s, n) => e(s, n, t);
6527
6541
  let St = class extends T {
6528
6542
  constructor(t, e) {
6529
6543
  super(), this._permissionService = t, this._univerInstanceService = e, this._init();
6530
6544
  }
6531
6545
  _init() {
6532
6546
  this._univerInstanceService.getTypeOfUnitAdded$(O.UNIVER_SHEET).subscribe((t) => {
6533
- const e = new jt(t.getUnitId());
6547
+ const e = new Kt(t.getUnitId());
6534
6548
  this._permissionService.addPermissionPoint(t.getUnitId(), e);
6535
6549
  });
6536
6550
  }
6537
6551
  getEditable(t = ((e) => (e = this._univerInstanceService.getCurrentUnitForType(O.UNIVER_SHEET)) == null ? void 0 : e.getUnitId())()) {
6538
6552
  if (!t)
6539
6553
  return;
6540
- const s = new jt(t), n = this._permissionService.getPermissionPoint(t, s.id);
6554
+ const s = new Kt(t), n = this._permissionService.getPermissionPoint(t, s.id);
6541
6555
  return n == null ? void 0 : n.value;
6542
6556
  }
6543
6557
  setEditable(t, e) {
6544
- const s = new jt(t);
6558
+ const s = new Kt(t);
6545
6559
  this._permissionService.updatePermissionPoint(t, s.id, e);
6546
6560
  }
6547
6561
  };
6548
- St = Oi([
6562
+ St = Li([
6549
6563
  _s(w.Starting, St),
6550
- xe(0, x(Es)),
6551
- xe(1, x(Q))
6564
+ Pe(0, P(Es)),
6565
+ Pe(1, P(Q))
6552
6566
  ], St);
6553
- class Ai extends T {
6567
+ class bi extends T {
6554
6568
  constructor() {
6555
6569
  super(...arguments);
6556
6570
  d(this, "_resourceMap", /* @__PURE__ */ new Map());
6557
- d(this, "_register$", new W());
6571
+ d(this, "_register$", new H());
6558
6572
  d(this, "register$", this._register$.asObservable());
6559
6573
  }
6560
6574
  getAllResourceHooks() {
@@ -6600,12 +6614,12 @@ class Ai extends T {
6600
6614
  this._register$.complete(), this._resourceMap.clear();
6601
6615
  }
6602
6616
  }
6603
- var Ii = Object.defineProperty, Ni = Object.getOwnPropertyDescriptor, Si = (t, e, s, n) => {
6604
- for (var r = n > 1 ? void 0 : n ? Ni(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6617
+ var vi = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, Ti = (t, e, s, n) => {
6618
+ for (var r = n > 1 ? void 0 : n ? Ui(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6605
6619
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6606
- return n && r && Ii(e, s, r), r;
6620
+ return n && r && vi(e, s, r), r;
6607
6621
  }, He = (t, e) => (s, n) => e(s, n, t);
6608
- let se = class extends T {
6622
+ let ne = class extends T {
6609
6623
  constructor(e, s) {
6610
6624
  super();
6611
6625
  d(this, "saveWorkbook", (e) => {
@@ -6656,10 +6670,10 @@ let se = class extends T {
6656
6670
  );
6657
6671
  }
6658
6672
  };
6659
- se = Si([
6660
- He(0, x(ge)),
6661
- He(1, x(Q))
6662
- ], se);
6673
+ ne = Ti([
6674
+ He(0, P(ge)),
6675
+ He(1, P(Q))
6676
+ ], ne);
6663
6677
  const Rs = G("resource-loader-service");
6664
6678
  fs(w.Ready, Rs);
6665
6679
  class ms extends T {
@@ -6679,20 +6693,20 @@ class ms extends T {
6679
6693
  this._currentTheme = s, this._currentTheme$.next(s);
6680
6694
  }
6681
6695
  }
6682
- const wi = "__defaultDocumentNormalEditorSpecialUnitId_20231006__", Li = "__defaultDocumentFormulaBarEditorSpecialUnitId_20231012__", Iu = `\r
6696
+ const Mi = "__defaultDocumentNormalEditorSpecialUnitId_20231006__", Di = "__defaultDocumentFormulaBarEditorSpecialUnitId_20231012__", Tu = `\r
6683
6697
  `;
6684
- function Nu(t) {
6698
+ function Mu(t) {
6685
6699
  return `__internalEditorId__${t}`;
6686
6700
  }
6687
- function Su(t) {
6701
+ function Du(t) {
6688
6702
  return t.startsWith("__");
6689
6703
  }
6690
- var bi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Ui = (t, e, s, n) => {
6691
- for (var r = n > 1 ? void 0 : n ? vi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6704
+ var pi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Pi = (t, e, s, n) => {
6705
+ for (var r = n > 1 ? void 0 : n ? xi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6692
6706
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6693
- return n && r && bi(e, s, r), r;
6694
- }, Kt = (t, e) => (s, n) => e(s, n, t);
6695
- const Ee = G("univer.undo-redo.service"), Ti = 20;
6707
+ return n && r && pi(e, s, r), r;
6708
+ }, Yt = (t, e) => (s, n) => e(s, n, t);
6709
+ const Ee = G("univer.undo-redo.service"), Hi = 20;
6696
6710
  class Cs {
6697
6711
  dispose() {
6698
6712
  }
@@ -6700,34 +6714,34 @@ class Cs {
6700
6714
  return !1;
6701
6715
  }
6702
6716
  }
6703
- const Mi = "univer.command.redo", Di = "univer.command.undo", pi = new class extends Cs {
6717
+ const Fi = "univer.command.redo", Wi = "univer.command.undo", Gi = new class extends Cs {
6704
6718
  constructor() {
6705
6719
  super(...arguments);
6706
- d(this, "type", fe.COMMAND);
6707
- d(this, "id", Di);
6720
+ d(this, "type", xt.COMMAND);
6721
+ d(this, "id", Wi);
6708
6722
  }
6709
6723
  async handler(e) {
6710
6724
  const s = e.get(Ee), n = s.pitchTopUndoElement();
6711
6725
  if (!n)
6712
6726
  return !1;
6713
6727
  const r = e.get(Pt);
6714
- return hs(n.undoMutations, r) ? (s.popUndoToRedo(), !0) : !1;
6728
+ return Je(n.undoMutations, r) ? (s.popUndoToRedo(), !0) : !1;
6715
6729
  }
6716
- }(), Pi = new class extends Cs {
6730
+ }(), Bi = new class extends Cs {
6717
6731
  constructor() {
6718
6732
  super(...arguments);
6719
- d(this, "type", fe.COMMAND);
6720
- d(this, "id", Mi);
6733
+ d(this, "type", xt.COMMAND);
6734
+ d(this, "id", Fi);
6721
6735
  }
6722
6736
  async handler(e) {
6723
6737
  const s = e.get(Ee), n = s.pitchTopRedoElement();
6724
6738
  if (!n)
6725
6739
  return !1;
6726
6740
  const r = e.get(Pt);
6727
- return hs(n.redoMutations, r) ? (s.popRedoToUndo(), !0) : !1;
6741
+ return Je(n.redoMutations, r) ? (s.popRedoToUndo(), !0) : !1;
6728
6742
  }
6729
6743
  }();
6730
- let ne = class extends T {
6744
+ let re = class extends T {
6731
6745
  constructor(e, s, n) {
6732
6746
  super();
6733
6747
  d(this, "undoRedoStatus$");
@@ -6736,7 +6750,7 @@ let ne = class extends T {
6736
6750
  d(this, "_undoStacks", /* @__PURE__ */ new Map());
6737
6751
  d(this, "_redoStacks", /* @__PURE__ */ new Map());
6738
6752
  d(this, "_batchingStatus", /* @__PURE__ */ new Map());
6739
- this._univerInstanceService = e, this._commandService = s, this._contextService = n, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(pi)), this.disposeWithMe(this._commandService.registerCommand(Pi)), this.disposeWithMe(b(() => this._undoRedoStatus$.complete())), this.disposeWithMe(b(this._univerInstanceService.focused$.subscribe(() => this._updateStatus())));
6753
+ this._univerInstanceService = e, this._commandService = s, this._contextService = n, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(Gi)), this.disposeWithMe(this._commandService.registerCommand(Bi)), this.disposeWithMe(b(() => this._undoRedoStatus$.complete())), this.disposeWithMe(b(this._univerInstanceService.focused$.subscribe(() => this._updateStatus())));
6740
6754
  }
6741
6755
  pushUndoRedo(e) {
6742
6756
  const { unitID: s } = e, n = this._getRedoStack(s, !0), r = this._getUndoStack(s, !0);
@@ -6750,7 +6764,7 @@ let ne = class extends T {
6750
6764
  } else
6751
6765
  i(e);
6752
6766
  function i(o) {
6753
- r.push(o), r.length > Ti && r.splice(0, 1);
6767
+ r.push(o), r.length > Hi && r.splice(0, 1);
6754
6768
  }
6755
6769
  this._updateStatus();
6756
6770
  }
@@ -6827,15 +6841,15 @@ let ne = class extends T {
6827
6841
  _getFocusedUnitId() {
6828
6842
  var i, o, u, a;
6829
6843
  let e = "";
6830
- const s = this._contextService.getContextValue(Ot), n = this._contextService.getContextValue(ui), r = this._contextService.getContextValue(oi);
6831
- return s ? n ? e = Li : r ? e = wi : e = (o = (i = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (a = (u = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : u.getUnitId()) != null ? a : "", e;
6844
+ const s = this._contextService.getContextValue(Ot), n = this._contextService.getContextValue(_i), r = this._contextService.getContextValue(di);
6845
+ return s ? n ? e = Di : r ? e = Mi : e = (o = (i = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (a = (u = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : u.getUnitId()) != null ? a : "", e;
6832
6846
  }
6833
6847
  };
6834
- ne = Ui([
6835
- Kt(0, Q),
6836
- Kt(1, Pt),
6837
- Kt(2, pt)
6838
- ], ne);
6848
+ re = Pi([
6849
+ Yt(0, Q),
6850
+ Yt(1, Pt),
6851
+ Yt(2, pt)
6852
+ ], re);
6839
6853
  class Fe extends T {
6840
6854
  // eslint-disable-next-line unused-imports/no-unused-vars
6841
6855
  onStarting(e) {
@@ -6854,7 +6868,7 @@ class Fe extends T {
6854
6868
  }
6855
6869
  }
6856
6870
  d(Fe, "pluginName"), d(Fe, "type", O.UNIVER_UNKNOWN);
6857
- class xi {
6871
+ class $i {
6858
6872
  constructor() {
6859
6873
  d(this, "_plugins", []);
6860
6874
  }
@@ -6869,7 +6883,7 @@ class xi {
6869
6883
  this._plugins.forEach(e);
6870
6884
  }
6871
6885
  }
6872
- class Hi {
6886
+ class ki {
6873
6887
  constructor() {
6874
6888
  d(this, "_pluginsRegistered", []);
6875
6889
  }
@@ -6884,18 +6898,18 @@ class Hi {
6884
6898
  this._pluginsRegistered = [];
6885
6899
  }
6886
6900
  }
6887
- var Fi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, Gi = (t, e, s, n) => {
6888
- for (var r = n > 1 ? void 0 : n ? Wi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6901
+ var Vi = Object.defineProperty, ji = Object.getOwnPropertyDescriptor, Ki = (t, e, s, n) => {
6902
+ for (var r = n > 1 ? void 0 : n ? ji(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6889
6903
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6890
- return n && r && Fi(e, s, r), r;
6904
+ return n && r && Vi(e, s, r), r;
6891
6905
  }, mt = (t, e) => (s, n) => e(s, n, t);
6892
6906
  let Mt = class extends T {
6893
6907
  constructor(e, s, n, r) {
6894
6908
  super();
6895
6909
  d(this, "_started", !1);
6896
6910
  d(this, "_pluginRegistered", /* @__PURE__ */ new Set());
6897
- d(this, "_pluginStore", new xi());
6898
- d(this, "_pluginRegistry", new Hi());
6911
+ d(this, "_pluginStore", new $i());
6912
+ d(this, "_pluginRegistry", new ki());
6899
6913
  this._logService = e, this._injector = s, this._lifecycleService = n, this._lifecycleInitializerService = r;
6900
6914
  }
6901
6915
  get started() {
@@ -6946,18 +6960,18 @@ let Mt = class extends T {
6946
6960
  return this._injector.createInstance(e, s);
6947
6961
  }
6948
6962
  };
6949
- Mt = Gi([
6963
+ Mt = Ki([
6950
6964
  mt(0, et),
6951
- mt(1, x(tt)),
6952
- mt(2, x(y)),
6953
- mt(3, x(Tt))
6965
+ mt(1, P(tt)),
6966
+ mt(2, P(y)),
6967
+ mt(3, P(Tt))
6954
6968
  ], Mt);
6955
- var Bi = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, $i = (t, e, s, n) => {
6956
- for (var r = n > 1 ? void 0 : n ? ki(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6969
+ var Yi = Object.defineProperty, zi = Object.getOwnPropertyDescriptor, Xi = (t, e, s, n) => {
6970
+ for (var r = n > 1 ? void 0 : n ? zi(e, s) : e, i = t.length - 1, o; i >= 0; i--)
6957
6971
  (o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
6958
- return n && r && Bi(e, s, r), r;
6959
- }, Vi = (t, e) => (s, n) => e(s, n, t);
6960
- const ji = 4;
6972
+ return n && r && Yi(e, s, r), r;
6973
+ }, Ji = (t, e) => (s, n) => e(s, n, t);
6974
+ const qi = 4;
6961
6975
  let Dt = class {
6962
6976
  constructor(t) {
6963
6977
  d(this, "_pluginHolderForUniver");
@@ -6999,7 +7013,7 @@ let Dt = class {
6999
7013
  () => {
7000
7014
  this._pluginHolderForUniver.started || this._pluginHolderForUniver.start(), this._flushPlugins(), this._clearFlushTimer();
7001
7015
  },
7002
- ji
7016
+ qi
7003
7017
  ));
7004
7018
  }
7005
7019
  _clearFlushTimer() {
@@ -7011,18 +7025,14 @@ let Dt = class {
7011
7025
  e.started && e.flush();
7012
7026
  }
7013
7027
  };
7014
- Dt = $i([
7015
- Vi(0, x(tt))
7028
+ Dt = Xi([
7029
+ Ji(0, P(tt))
7016
7030
  ], Dt);
7017
- function Ki(t, e) {
7031
+ function Zi(t, e) {
7018
7032
  if (!e)
7019
7033
  return t;
7020
7034
  const s = [];
7021
7035
  for (const n of t) {
7022
- if (n.length === 1) {
7023
- s.push(n);
7024
- continue;
7025
- }
7026
7036
  const r = e.find(([i]) => i === n[0]);
7027
7037
  if (r) {
7028
7038
  if (r[1] === null)
@@ -7033,7 +7043,30 @@ function Ki(t, e) {
7033
7043
  }
7034
7044
  return s;
7035
7045
  }
7036
- class wu {
7046
+ class Qi {
7047
+ constructor() {
7048
+ d(this, "_model", /* @__PURE__ */ new Map());
7049
+ d(this, "_userChange$", new H());
7050
+ d(this, "userChange$", this._userChange$.asObservable());
7051
+ }
7052
+ addUser(e) {
7053
+ this._model.set(e.userID, e), this._userChange$.next({ type: "add", user: e });
7054
+ }
7055
+ getUser(e, s) {
7056
+ const n = this._model.get(e);
7057
+ if (n)
7058
+ return n;
7059
+ s && s();
7060
+ }
7061
+ delete(e) {
7062
+ const s = this.getUser(e);
7063
+ this._model.delete(e), s && this._userChange$.next({ type: "delete", user: s });
7064
+ }
7065
+ clear() {
7066
+ this._model.clear(), this._userChange$.next({ type: "clear" });
7067
+ }
7068
+ }
7069
+ class pu {
7037
7070
  /**
7038
7071
  * Create a Univer instance.
7039
7072
  * @param config Configuration data for Univer
@@ -7042,7 +7075,7 @@ class wu {
7042
7075
  constructor(e = {}, s) {
7043
7076
  d(this, "_startedTypes", /* @__PURE__ */ new Set());
7044
7077
  d(this, "_injector");
7045
- const n = this._injector = Yi(s, e == null ? void 0 : e.override), { theme: r, locale: i, locales: o, logLevel: u } = e;
7078
+ const n = this._injector = yi(s, e == null ? void 0 : e.override), { theme: r, locale: i, locales: o, logLevel: u } = e;
7046
7079
  r && this._injector.get(ms).setTheme(r), o && this._injector.get(It).load(o), i && this._injector.get(It).setLocale(i), u && this._injector.get(et).setLogLevel(u), this._init(n), this._pluginService;
7047
7080
  }
7048
7081
  get _univerInstanceService() {
@@ -7106,34 +7139,35 @@ class wu {
7106
7139
  this._pluginService.registerPlugin(e, s);
7107
7140
  }
7108
7141
  }
7109
- function Yi(t, e) {
7110
- const s = Ki([
7111
- [Br],
7142
+ function yi(t, e) {
7143
+ const s = Zi([
7144
+ [Yr],
7112
7145
  [It],
7113
7146
  [ms],
7114
7147
  [y],
7115
7148
  [Tt],
7116
7149
  [St],
7117
7150
  [Dt],
7151
+ [Qi],
7118
7152
  // abstract services
7119
- [Q, { useClass: te }],
7153
+ [Q, { useClass: ee }],
7120
7154
  [Es, { useClass: Nt }],
7121
- [et, { useClass: Mr, lazy: !0 }],
7155
+ [et, { useClass: Or, lazy: !0 }],
7122
7156
  [Pt, { useClass: yt, lazy: !0 }],
7123
- [Ee, { useClass: ne, lazy: !0 }],
7124
- [Wr, { useClass: Gr }],
7125
- [pt, { useClass: Ur }],
7126
- [$r, { useClass: kr, lazy: !0 }],
7127
- [ge, { useClass: Ai, lazy: !0 }],
7128
- [Rs, { useClass: se, lazy: !0 }]
7157
+ [Ee, { useClass: re, lazy: !0 }],
7158
+ [jr, { useClass: Kr }],
7159
+ [pt, { useClass: mr }],
7160
+ [Xr, { useClass: zr, lazy: !0 }],
7161
+ [ge, { useClass: bi, lazy: !0 }],
7162
+ [Rs, { useClass: ne, lazy: !0 }]
7129
7163
  ], e);
7130
7164
  return t ? t.createChild(s) : new tt(s);
7131
7165
  }
7132
- const Lu = (t, e) => e.length === t.length && !t.some((s) => e.some((n) => !Z.equals(n, s))), bu = (t, e) => e.length === t.length && t.every((s, n) => {
7166
+ const xu = (t, e) => e.length === t.length && !t.some((s) => e.some((n) => !Z.equals(n, s))), Pu = (t, e) => e.length === t.length && t.every((s, n) => {
7133
7167
  const r = e[n];
7134
7168
  return r.unitId === s.unitId && r.sheetId === s.sheetId && Z.equals(s.range, r.range);
7135
7169
  });
7136
- function vu(t, e) {
7170
+ function Hu(t, e) {
7137
7171
  if (Object.is(t, e))
7138
7172
  return !0;
7139
7173
  if (typeof t != "object" || !t || typeof e != "object" || !e)
@@ -7152,19 +7186,19 @@ function vu(t, e) {
7152
7186
  }
7153
7187
  return !0;
7154
7188
  }
7155
- function zi(t) {
7189
+ function to(t) {
7156
7190
  return /^-?\d+(\.\d+)?$/.test(t);
7157
7191
  }
7158
- function Uu(t) {
7159
- return zi(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
7192
+ function Fu(t) {
7193
+ return to(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
7160
7194
  }
7161
- function Tu(t) {
7195
+ function Wu(t) {
7162
7196
  return ["true", "false"].includes(t.toLowerCase());
7163
7197
  }
7164
- function Mu(t, e) {
7198
+ function Gu(t, e) {
7165
7199
  return e.forEach((s) => t.add(s)), t;
7166
7200
  }
7167
- function Du(t, e = 16) {
7201
+ function Bu(t, e = 16) {
7168
7202
  let s = 0, n = null;
7169
7203
  return function(...i) {
7170
7204
  const o = Date.now();
@@ -7173,7 +7207,7 @@ function Du(t, e = 16) {
7173
7207
  }, e)) : (s = o, t.apply(this, i));
7174
7208
  };
7175
7209
  }
7176
- function pu(t) {
7210
+ function $u(t) {
7177
7211
  const e = new MessageChannel();
7178
7212
  let s = !1;
7179
7213
  return e.port1.onmessage = () => {
@@ -7182,7 +7216,7 @@ function pu(t) {
7182
7216
  s = !0;
7183
7217
  };
7184
7218
  }
7185
- var Xi = /* @__PURE__ */ ((t) => (t[t.TEXT = 0] = "TEXT", t[t.ARROW = 1] = "ARROW", t[t.CUSTOM = 2] = "CUSTOM", t))(Xi || {});
7219
+ var eo = /* @__PURE__ */ ((t) => (t[t.TEXT = 0] = "TEXT", t[t.ARROW = 1] = "ARROW", t[t.CUSTOM = 2] = "CUSTOM", t))(eo || {});
7186
7220
  class We {
7187
7221
  constructor(e) {
7188
7222
  d(this, "_index", 0);
@@ -7203,7 +7237,7 @@ class We {
7203
7237
  }) : R.deepClone({
7204
7238
  ...s,
7205
7239
  len: e,
7206
- body: ls(s.body, n, n + e)
7240
+ body: cs(s.body, n, n + e)
7207
7241
  });
7208
7242
  } else
7209
7243
  return {
@@ -7251,10 +7285,10 @@ class Re {
7251
7285
  const o = Math.min(n.peekLength(), r.peekLength()), u = n.next(o), a = r.next(o);
7252
7286
  u.t === A.INSERT && a.t === A.RETAIN ? a.body == null ? i.push(u) : i.push({
7253
7287
  ...u,
7254
- body: Me(u.body, a.body, a.coverType)
7288
+ body: De(u.body, a.body, a.coverType)
7255
7289
  }) : u.t === A.RETAIN && a.t === A.RETAIN ? u.body == null && a.body == null ? i.push(u.len !== Number.POSITIVE_INFINITY ? u : a) : u.body && a.body ? i.push({
7256
7290
  ...u,
7257
- body: Me(u.body, a.body, a.coverType)
7291
+ body: De(u.body, a.body, a.coverType)
7258
7292
  }) : i.push(u.body ? u : a) : u.t === A.RETAIN && a.t === A.DELETE ? i.push(a) : u.t === A.INSERT && (a.t, A.DELETE);
7259
7293
  }
7260
7294
  return i.trimEndUselessRetainAction(), i.serialize();
@@ -7315,12 +7349,12 @@ class Re {
7315
7349
  }
7316
7350
  trimEndUselessRetainAction() {
7317
7351
  let e = this._actions[this._actions.length - 1];
7318
- for (; e && e.t === A.RETAIN && Sr(e); )
7352
+ for (; e && e.t === A.RETAIN && $r(e); )
7319
7353
  this._actions.pop(), e = this._actions[this._actions.length - 1];
7320
7354
  return this;
7321
7355
  }
7322
7356
  }
7323
- function Pu(t, e, s) {
7357
+ function ku(t, e, s) {
7324
7358
  if (e === "")
7325
7359
  return t;
7326
7360
  const n = {
@@ -7348,7 +7382,7 @@ function Pu(t, e, s) {
7348
7382
  const u = r.getBody();
7349
7383
  return r.dispose(), u;
7350
7384
  }
7351
- class xu extends le {
7385
+ class Vu extends ce {
7352
7386
  /**
7353
7387
  * Create a new WorkBookObserver with the specified callback
7354
7388
  * @param callback the callback that will be executed for that WorkBookObserver
@@ -7359,7 +7393,7 @@ class xu extends le {
7359
7393
  add(e) {
7360
7394
  if (!e)
7361
7395
  return null;
7362
- const s = new ae(e, this);
7396
+ const s = new le(e, this);
7363
7397
  return this._observers = [s], this._onObserverAdded && this._onObserverAdded(s), s;
7364
7398
  }
7365
7399
  makeObserverTopPriority() {
@@ -7367,17 +7401,11 @@ class xu extends le {
7367
7401
  makeObserverBottomPriority() {
7368
7402
  }
7369
7403
  }
7370
- const Hu = G("ILocalStorageService");
7371
- function Fu(t) {
7372
- return new re((e) => {
7373
- const s = t((...n) => e.next(n));
7374
- return () => s == null ? void 0 : s.dispose();
7375
- });
7376
- }
7377
- function Wu(t) {
7404
+ const ju = G("ILocalStorageService");
7405
+ function Ku(t) {
7378
7406
  return `sheet_interceptor_${t}`;
7379
7407
  }
7380
- const Ji = (t) => function(e, s) {
7408
+ const so = (t) => function(e, s) {
7381
7409
  let n = -1;
7382
7410
  function r(i, o) {
7383
7411
  if (i <= n)
@@ -7386,7 +7414,7 @@ const Ji = (t) => function(e, s) {
7386
7414
  }
7387
7415
  return r(0, e);
7388
7416
  };
7389
- class Gu {
7417
+ class Yu {
7390
7418
  constructor(e) {
7391
7419
  d(this, "_interceptorsByName", /* @__PURE__ */ new Map());
7392
7420
  d(this, "_interceptorPoints");
@@ -7394,7 +7422,7 @@ class Gu {
7394
7422
  }
7395
7423
  fetchThroughInterceptors(e) {
7396
7424
  const s = e, n = this._interceptorsByName.get(s);
7397
- return Ji(n || []);
7425
+ return so(n || []);
7398
7426
  }
7399
7427
  intercept(e, s) {
7400
7428
  const n = e;
@@ -7407,16 +7435,16 @@ class Gu {
7407
7435
  return ((u = o.priority) != null ? u : 0) - ((a = i.priority) != null ? a : 0);
7408
7436
  })
7409
7437
  // from large to small
7410
- ), () => ce(this._interceptorsByName.get(n), s);
7438
+ ), () => he(this._interceptorsByName.get(n), s);
7411
7439
  }
7412
7440
  getInterceptPoints() {
7413
7441
  return this._interceptorPoints;
7414
7442
  }
7415
7443
  }
7416
- const Bu = G(
7444
+ const zu = G(
7417
7445
  "univer.snapshot-server-service"
7418
7446
  );
7419
- class ku {
7447
+ class Xu {
7420
7448
  constructor() {
7421
7449
  d(this, "_sheetBlockCache", /* @__PURE__ */ new Map());
7422
7450
  }
@@ -7432,7 +7460,7 @@ class ku {
7432
7460
  },
7433
7461
  changesets: [],
7434
7462
  error: {
7435
- code: F.OK,
7463
+ code: W.OK,
7436
7464
  message: ""
7437
7465
  }
7438
7466
  });
@@ -7443,7 +7471,7 @@ class ku {
7443
7471
  return Promise.resolve({
7444
7472
  block: n,
7445
7473
  error: {
7446
- code: F.OK,
7474
+ code: W.OK,
7447
7475
  message: ""
7448
7476
  }
7449
7477
  });
@@ -7453,7 +7481,7 @@ class ku {
7453
7481
  return Promise.resolve({
7454
7482
  changesets: [],
7455
7483
  error: {
7456
- code: F.OK,
7484
+ code: W.OK,
7457
7485
  message: ""
7458
7486
  }
7459
7487
  });
@@ -7462,7 +7490,7 @@ class ku {
7462
7490
  return Promise.resolve({
7463
7491
  resources: {},
7464
7492
  error: {
7465
- code: F.OK,
7493
+ code: W.OK,
7466
7494
  message: ""
7467
7495
  }
7468
7496
  });
@@ -7471,7 +7499,7 @@ class ku {
7471
7499
  saveSnapshot(e, s) {
7472
7500
  return Promise.resolve({
7473
7501
  error: {
7474
- code: F.OK,
7502
+ code: W.OK,
7475
7503
  message: ""
7476
7504
  }
7477
7505
  });
@@ -7481,13 +7509,13 @@ class ku {
7481
7509
  const { block: n } = s;
7482
7510
  return n ? (this._sheetBlockCache.set(n.id, n), Promise.resolve({
7483
7511
  error: {
7484
- code: F.OK,
7512
+ code: W.OK,
7485
7513
  message: ""
7486
7514
  },
7487
7515
  blockID: n.id
7488
7516
  })) : Promise.resolve({
7489
7517
  error: {
7490
- code: F.UNDEFINED,
7518
+ code: W.UNDEFINED,
7491
7519
  message: "block is required"
7492
7520
  },
7493
7521
  blockID: ""
@@ -7497,14 +7525,14 @@ class ku {
7497
7525
  saveChangeset(e, s) {
7498
7526
  return Promise.resolve({
7499
7527
  error: {
7500
- code: F.OK,
7528
+ code: W.OK,
7501
7529
  message: ""
7502
7530
  },
7503
7531
  concurrent: []
7504
7532
  });
7505
7533
  }
7506
7534
  }
7507
- function $u(t) {
7535
+ function Ju(t) {
7508
7536
  return btoa(
7509
7537
  encodeURIComponent(t).replace(/%([0-9A-F]{2})/g, (e, s) => String.fromCharCode(Number.parseInt(s, 16)))
7510
7538
  );
@@ -7514,55 +7542,55 @@ function Os(t) {
7514
7542
  Array.prototype.map.call(atob(t), (e) => `%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")
7515
7543
  );
7516
7544
  }
7517
- const xt = new TextEncoder(), me = new TextDecoder();
7545
+ const Ht = new TextEncoder(), me = new TextDecoder();
7518
7546
  function As(t) {
7519
7547
  const e = R.deepClone(t);
7520
- return delete e.id, delete e.name, delete e.rowCount, delete e.columnCount, delete e.cellData, xt.encode(JSON.stringify(e));
7548
+ return delete e.id, delete e.name, delete e.rowCount, delete e.columnCount, delete e.cellData, Ht.encode(JSON.stringify(e));
7521
7549
  }
7522
7550
  function Is(t) {
7523
7551
  const e = R.deepClone(t);
7524
- return delete e.id, delete e.rev, delete e.name, delete e.sheetOrder, delete e.sheets, xt.encode(JSON.stringify(e));
7552
+ return delete e.id, delete e.rev, delete e.name, delete e.sheetOrder, delete e.sheets, Ht.encode(JSON.stringify(e));
7525
7553
  }
7526
- function qi(t) {
7554
+ function no(t) {
7527
7555
  const e = R.deepClone(t);
7528
- return delete e.id, delete e.rev, delete e.title, delete e.resources, xt.encode(JSON.stringify(e));
7556
+ return delete e.id, delete e.rev, delete e.title, delete e.resources, Ht.encode(JSON.stringify(e));
7529
7557
  }
7530
7558
  function Be(t) {
7531
7559
  return JSON.parse(me.decode(t));
7532
7560
  }
7533
- function Zi(t) {
7561
+ function ro(t) {
7534
7562
  return JSON.parse(typeof t == "string" ? Os(t) : me.decode(t));
7535
7563
  }
7536
- function Qi(t) {
7564
+ function io(t) {
7537
7565
  return JSON.parse(typeof t == "string" ? Os(t) : me.decode(t));
7538
7566
  }
7539
- const Yt = 256;
7567
+ const zt = 256;
7540
7568
  function Ns(t, e) {
7541
- const s = new $(t), n = s.getLength(), r = [];
7569
+ const s = new k(t), n = s.getLength(), r = [];
7542
7570
  let i = 0;
7543
7571
  for (; i < n; ) {
7544
- const o = Math.min(i + Yt, n - 1), u = s.getSlice(i, Math.min(i + Yt, n - 1), 0, e), a = yi(u);
7572
+ const o = Math.min(i + zt, n - 1), u = s.getSlice(i, Math.min(i + zt, n - 1), 0, e), a = oo(u);
7545
7573
  r.push({
7546
7574
  id: R.generateRandomId(19, "0123456789"),
7547
7575
  // an random ID for client, this would be changed after the block is saved in the server
7548
7576
  startRow: i,
7549
7577
  endRow: o,
7550
7578
  data: a
7551
- }), i += Yt;
7579
+ }), i += zt;
7552
7580
  }
7553
7581
  return r;
7554
7582
  }
7555
- function yi(t) {
7583
+ function oo(t) {
7556
7584
  const e = t.getData();
7557
- return xt.encode(JSON.stringify(e));
7585
+ return Ht.encode(JSON.stringify(e));
7558
7586
  }
7559
- async function Vu(t, e, s, n, r) {
7587
+ async function qu(t, e, s, n, r) {
7560
7588
  const i = {}, o = {};
7561
7589
  if (!await Promise.all(
7562
7590
  Object.entries(e.sheets).map(async ([h, _]) => {
7563
7591
  const f = {
7564
7592
  id: _.id,
7565
- type: ie.GRID,
7593
+ type: oe.GRID,
7566
7594
  name: _.name,
7567
7595
  rowCount: _.rowCount,
7568
7596
  columnCount: _.columnCount,
@@ -7580,7 +7608,7 @@ async function Vu(t, e, s, n, r) {
7580
7608
  );
7581
7609
  if (E.some((m) => {
7582
7610
  var I;
7583
- return ((I = m.error) == null ? void 0 : I.code) !== F.OK;
7611
+ return ((I = m.error) == null ? void 0 : I.code) !== W.OK;
7584
7612
  }))
7585
7613
  return !1;
7586
7614
  i[h] = {
@@ -7614,14 +7642,14 @@ async function Vu(t, e, s, n, r) {
7614
7642
  }
7615
7643
  };
7616
7644
  }
7617
- async function ju(t, e, s, n, r) {
7645
+ async function Zu(t, e, s, n, r) {
7618
7646
  var _, f;
7619
7647
  const i = {}, o = {};
7620
7648
  if (!await Promise.all(
7621
7649
  Object.entries(e.sheets).map(async ([g, E]) => {
7622
7650
  const m = {
7623
7651
  id: E.id,
7624
- type: ie.GRID,
7652
+ type: oe.GRID,
7625
7653
  name: E.name,
7626
7654
  rowCount: E.rowCount,
7627
7655
  columnCount: E.columnCount,
@@ -7639,7 +7667,7 @@ async function ju(t, e, s, n, r) {
7639
7667
  );
7640
7668
  if (v.some((M) => {
7641
7669
  var j;
7642
- return ((j = M.error) == null ? void 0 : j.code) !== F.OK;
7670
+ return ((j = M.error) == null ? void 0 : j.code) !== W.OK;
7643
7671
  }))
7644
7672
  return !1;
7645
7673
  i[g] = {
@@ -7673,7 +7701,7 @@ async function ju(t, e, s, n, r) {
7673
7701
  type: O.UNIVER_SHEET,
7674
7702
  snapshot: c
7675
7703
  });
7676
- if (Je(h.error))
7704
+ if (qe(h.error))
7677
7705
  throw new Error(
7678
7706
  `transformWorkbookDataToSnapshot(): Failed to save snapshot.
7679
7707
  ErrorCode: ${(_ = h.error) == null ? void 0 : _.code}:${(f = h.error) == null ? void 0 : f.message}`
@@ -7682,7 +7710,7 @@ ErrorCode: ${(_ = h.error) == null ? void 0 : _.code}:${(f = h.error) == null ?
7682
7710
  snapshot: c
7683
7711
  };
7684
7712
  }
7685
- function Ku(t, e, s) {
7713
+ function Qu(t, e, s) {
7686
7714
  const n = t.workbook;
7687
7715
  if (!n)
7688
7716
  throw new Error("");
@@ -7712,7 +7740,7 @@ function Ku(t, e, s) {
7712
7740
  else
7713
7741
  throw new Error("");
7714
7742
  }), h.forEach((f) => {
7715
- const g = Zi(f.data);
7743
+ const g = ro(f.data);
7716
7744
  Object.entries(g).forEach(([E, m]) => {
7717
7745
  const I = c.cellData[+E] = {};
7718
7746
  Object.entries(m).forEach(([v, M]) => {
@@ -7735,11 +7763,11 @@ function Ku(t, e, s) {
7735
7763
  ...o
7736
7764
  };
7737
7765
  }
7738
- function Yu(t) {
7766
+ function yu(t) {
7739
7767
  const e = t.doc;
7740
7768
  if (e == null)
7741
7769
  throw new Error("transformSnapshotToDocumentData(): snapshot.doc is undefined.");
7742
- const { unitID: s, rev: n, name: r, originalMeta: i } = e, { body: o, documentStyle: u = {}, settings: a = {} } = Qi(i);
7770
+ const { unitID: s, rev: n, name: r, originalMeta: i } = e, { body: o, documentStyle: u = {}, settings: a = {} } = io(i);
7743
7771
  return {
7744
7772
  id: s,
7745
7773
  rev: n,
@@ -7750,7 +7778,7 @@ function Yu(t) {
7750
7778
  settings: a
7751
7779
  };
7752
7780
  }
7753
- async function zu(t, e, s, n, r) {
7781
+ async function ta(t, e, s, n, r) {
7754
7782
  var a, l, c;
7755
7783
  const i = {
7756
7784
  unitID: e.id,
@@ -7758,7 +7786,7 @@ async function zu(t, e, s, n, r) {
7758
7786
  creator: "",
7759
7787
  name: (a = e.title) != null ? a : "",
7760
7788
  resources: e.resources || [],
7761
- originalMeta: qi(e)
7789
+ originalMeta: no(e)
7762
7790
  }, o = {
7763
7791
  unitID: s,
7764
7792
  rev: i.rev,
@@ -7770,7 +7798,7 @@ async function zu(t, e, s, n, r) {
7770
7798
  type: O.UNIVER_DOC,
7771
7799
  snapshot: o
7772
7800
  });
7773
- if (Je(u.error))
7801
+ if (qe(u.error))
7774
7802
  throw new Error(
7775
7803
  `transformDocumentDataToSnapshot(): Failed to save snapshot.
7776
7804
  ErrorCode: ${(l = u.error) == null ? void 0 : l.code}:${(c = u.error) == null ? void 0 : c.message}`
@@ -7779,7 +7807,7 @@ ErrorCode: ${(l = u.error) == null ? void 0 : l.code}:${(c = u.error) == null ?
7779
7807
  snapshot: o
7780
7808
  };
7781
7809
  }
7782
- async function Xu(t, e) {
7810
+ async function ea(t, e) {
7783
7811
  const s = t.workbook;
7784
7812
  if (!s)
7785
7813
  throw new Error("Workbook metadata is not available");
@@ -7799,300 +7827,302 @@ async function Xu(t, e) {
7799
7827
  r.push(...u);
7800
7828
  }), await Promise.all(r), n;
7801
7829
  }
7802
- var to = /* @__PURE__ */ ((t) => (t[t.INFO = 0] = "INFO", t[t.STOP = 1] = "STOP", t[t.WARNING = 2] = "WARNING", t))(to || {}), eo = /* @__PURE__ */ ((t) => (t[t.DISABLED = 0] = "DISABLED", t[t.FULL_ALPHA = 1] = "FULL_ALPHA", t[t.FULL_HANGUL = 2] = "FULL_HANGUL", t[t.FULL_KATAKANA = 3] = "FULL_KATAKANA", t[t.HALF_ALPHA = 4] = "HALF_ALPHA", t[t.HALF_HANGUL = 5] = "HALF_HANGUL", t[t.HALF_KATAKANA = 6] = "HALF_KATAKANA", t[t.HIRAGANA = 7] = "HIRAGANA", t[t.NO_CONTROL = 8] = "NO_CONTROL", t[t.OFF = 9] = "OFF", t[t.ON = 10] = "ON", t))(eo || {}), so = /* @__PURE__ */ ((t) => (t.BETWEEN = "between", t.EQUAL = "equal", t.GREATER_THAN = "greaterThan", t.GREATER_THAN_OR_EQUAL = "greaterThanOrEqual", t.LESS_THAN = "lessThan", t.LESS_THAN_OR_EQUAL = "lessThanOrEqual", t.NOT_BETWEEN = "notBetween", t.NOT_EQUAL = "notEqual", t))(so || {}), no = /* @__PURE__ */ ((t) => (t.CUSTOM = "custom", t.LIST = "list", t.LIST_MULTIPLE = "listMultiple", t.NONE = "none", t.TEXT_LENGTH = "textLength", t.DATE = "date", t.TIME = "time", t.WHOLE = "whole", t.DECIMAL = "decimal", t.CHECKBOX = "checkbox", t))(no || {}), ro = /* @__PURE__ */ ((t) => (t.VALID = "valid", t.INVALID = "invalid", t.VALIDATING = "validating", t))(ro || {});
7803
- Ms();
7830
+ var uo = /* @__PURE__ */ ((t) => (t[t.INFO = 0] = "INFO", t[t.STOP = 1] = "STOP", t[t.WARNING = 2] = "WARNING", t))(uo || {}), ao = /* @__PURE__ */ ((t) => (t[t.DISABLED = 0] = "DISABLED", t[t.FULL_ALPHA = 1] = "FULL_ALPHA", t[t.FULL_HANGUL = 2] = "FULL_HANGUL", t[t.FULL_KATAKANA = 3] = "FULL_KATAKANA", t[t.HALF_ALPHA = 4] = "HALF_ALPHA", t[t.HALF_HANGUL = 5] = "HALF_HANGUL", t[t.HALF_KATAKANA = 6] = "HALF_KATAKANA", t[t.HIRAGANA = 7] = "HIRAGANA", t[t.NO_CONTROL = 8] = "NO_CONTROL", t[t.OFF = 9] = "OFF", t[t.ON = 10] = "ON", t))(ao || {}), lo = /* @__PURE__ */ ((t) => (t.BETWEEN = "between", t.EQUAL = "equal", t.GREATER_THAN = "greaterThan", t.GREATER_THAN_OR_EQUAL = "greaterThanOrEqual", t.LESS_THAN = "lessThan", t.LESS_THAN_OR_EQUAL = "lessThanOrEqual", t.NOT_BETWEEN = "notBetween", t.NOT_EQUAL = "notEqual", t))(lo || {}), co = /* @__PURE__ */ ((t) => (t.CUSTOM = "custom", t.LIST = "list", t.LIST_MULTIPLE = "listMultiple", t.NONE = "none", t.TEXT_LENGTH = "textLength", t.DATE = "date", t.TIME = "time", t.WHOLE = "whole", t.DECIMAL = "decimal", t.CHECKBOX = "checkbox", t))(co || {}), ho = /* @__PURE__ */ ((t) => (t.VALID = "valid", t.INVALID = "invalid", t.VALIDATING = "validating", t))(ho || {});
7831
+ Hs();
7804
7832
  export {
7805
- Xo as ABCToNumber,
7833
+ eu as ABCToNumber,
7806
7834
  L as AbsoluteRefType,
7807
7835
  We as ActionIterator,
7808
- Un as AlignTypeH,
7809
- Tn as AlignTypeV,
7810
- xs as AutoFillSeries,
7836
+ xn as AlignTypeH,
7837
+ Pn as AlignTypeV,
7838
+ Bs as AutoFillSeries,
7811
7839
  ct as BaselineOffset,
7812
- hn as BlockType,
7840
+ En as BlockType,
7813
7841
  C as BooleanNumber,
7814
7842
  S as BorderStyleTypes,
7815
- Hs as BorderType,
7843
+ $s as BorderType,
7816
7844
  X as BulletAlignment,
7817
7845
  Ce as COLORS,
7818
7846
  nt as CellValueType,
7819
- ku as ClientSnapshotServerService,
7847
+ Xu as ClientSnapshotServerService,
7820
7848
  rt as Color,
7821
- ue as ColorBuilder,
7822
- k as ColorKit,
7849
+ ae as ColorBuilder,
7850
+ $ as ColorKit,
7823
7851
  B as ColorType,
7824
- fn as ColumnSeparatorType,
7852
+ Cn as ColumnSeparatorType,
7825
7853
  yt as CommandService,
7826
- fe as CommandType,
7827
- Fs as CommonHideTypes,
7828
- Gr as ConfigService,
7829
- Sn as ContentAlignment,
7830
- Ur as ContextService,
7831
- Ws as CopyPasteType,
7832
- cn as CustomRangeType,
7833
- nu as DEFAULT_CELL,
7834
- cs as DEFAULT_DOC,
7835
- au as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
7836
- Iu as DEFAULT_EMPTY_DOCUMENT_VALUE,
7837
- eu as DEFAULT_RANGE,
7854
+ xt as CommandType,
7855
+ ks as CommonHideTypes,
7856
+ Kr as ConfigService,
7857
+ Un as ContentAlignment,
7858
+ mr as ContextService,
7859
+ Vs as CopyPasteType,
7860
+ gn as CustomRangeType,
7861
+ cu as DEFAULT_CELL,
7862
+ hs as DEFAULT_DOC,
7863
+ Eu as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
7864
+ Tu as DEFAULT_EMPTY_DOCUMENT_VALUE,
7865
+ au as DEFAULT_RANGE,
7838
7866
  Et as DEFAULT_RANGE_ARRAY,
7839
- su as DEFAULT_SELECTION,
7840
- or as DEFAULT_SLIDE,
7867
+ lu as DEFAULT_SELECTION,
7868
+ hr as DEFAULT_SLIDE,
7841
7869
  kt as DEFAULT_STYLES,
7842
- zr as DEFAULT_WORKSHEET_COLUMN_COUNT,
7843
- cu as DEFAULT_WORKSHEET_COLUMN_COUNT_KEY,
7844
- Zr as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT,
7845
- fu as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY,
7846
- Jr as DEFAULT_WORKSHEET_COLUMN_WIDTH,
7847
- du as DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY,
7848
- Yr as DEFAULT_WORKSHEET_ROW_COUNT,
7849
- lu as DEFAULT_WORKSHEET_ROW_COUNT_KEY,
7850
- Xr as DEFAULT_WORKSHEET_ROW_HEIGHT,
7851
- hu as DEFAULT_WORKSHEET_ROW_HEIGHT_KEY,
7852
- qr as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH,
7853
- _u as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
7854
- Li as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
7855
- wi as DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
7856
- An as DashStyleType,
7857
- dr as DataStreamTreeNodeType,
7858
- Qe as DataStreamTreeTokenType,
7859
- to as DataValidationErrorStyle,
7860
- eo as DataValidationImeMode,
7861
- so as DataValidationOperator,
7862
- Xi as DataValidationRenderMode,
7863
- ro as DataValidationStatus,
7864
- no as DataValidationType,
7865
- Mr as DesktopLogService,
7866
- Gs as DeveloperMetadataVisibility,
7867
- Bs as Dimension,
7868
- ks as Direction,
7870
+ yr as DEFAULT_WORKSHEET_COLUMN_COUNT,
7871
+ mu as DEFAULT_WORKSHEET_COLUMN_COUNT_KEY,
7872
+ ni as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT,
7873
+ Iu as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY,
7874
+ ei as DEFAULT_WORKSHEET_COLUMN_WIDTH,
7875
+ Ou as DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY,
7876
+ Qr as DEFAULT_WORKSHEET_ROW_COUNT,
7877
+ Ru as DEFAULT_WORKSHEET_ROW_COUNT_KEY,
7878
+ ti as DEFAULT_WORKSHEET_ROW_HEIGHT,
7879
+ Cu as DEFAULT_WORKSHEET_ROW_HEIGHT_KEY,
7880
+ si as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH,
7881
+ Au as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
7882
+ Di as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
7883
+ Mi as DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
7884
+ Ln as DashStyleType,
7885
+ Ur as DataStreamTreeNodeType,
7886
+ ye as DataStreamTreeTokenType,
7887
+ uo as DataValidationErrorStyle,
7888
+ ao as DataValidationImeMode,
7889
+ lo as DataValidationOperator,
7890
+ eo as DataValidationRenderMode,
7891
+ ho as DataValidationStatus,
7892
+ co as DataValidationType,
7893
+ Or as DesktopLogService,
7894
+ js as DeveloperMetadataVisibility,
7895
+ Ks as Dimension,
7896
+ Ys as Direction,
7869
7897
  T as Disposable,
7870
7898
  Ye as DisposableCollection,
7871
- an as DocStyleType,
7899
+ _n as DocStyleType,
7872
7900
  ot as DocumentDataModel,
7873
- oi as EDITOR_ACTIVATED,
7874
- ur as EXTENSION_NAMES,
7901
+ di as EDITOR_ACTIVATED,
7902
+ dr as EXTENSION_NAMES,
7875
7903
  we as Entry,
7876
- yn as EntryIterator,
7877
- Br as ErrorService,
7878
- Xn as EventState,
7879
- $t as FOCUSING_DOC,
7880
- Ru as FOCUSING_EDITOR_BUT_HIDDEN,
7881
- mu as FOCUSING_EDITOR_INPUT_FORMULA,
7882
- Ou as FOCUSING_EDITOR_STANDALONE,
7883
- ui as FOCUSING_FORMULA_EDITOR,
7904
+ rr as EntryIterator,
7905
+ Yr as ErrorService,
7906
+ yn as EventState,
7907
+ Vt as FOCUSING_DOC,
7908
+ wu as FOCUSING_EDITOR_BUT_HIDDEN,
7909
+ Lu as FOCUSING_EDITOR_INPUT_FORMULA,
7910
+ vu as FOCUSING_EDITOR_STANDALONE,
7911
+ _i as FOCUSING_FORMULA_EDITOR,
7884
7912
  Ot as FOCUSING_SHEET,
7885
- Vt as FOCUSING_SLIDE,
7886
- Cu as FOCUSING_UNIVER_EDITOR,
7887
- Au as FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE,
7888
- kr as FloatingObjectManagerService,
7889
- ln as FollowNumberWithType,
7890
- Xt as FontItalic,
7891
- wn as FontStyleType,
7892
- Jt as FontWeight,
7893
- $s as FormatType,
7913
+ jt as FOCUSING_SLIDE,
7914
+ bu as FOCUSING_UNIVER_EDITOR,
7915
+ Uu as FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE,
7916
+ zr as FloatingObjectManagerService,
7917
+ fn as FollowNumberWithType,
7918
+ Jt as FontItalic,
7919
+ Tn as FontStyleType,
7920
+ qt as FontWeight,
7921
+ zs as FormatType,
7894
7922
  Ct as GlyphType,
7895
- dn as GridType,
7896
- Js as HLSColor,
7923
+ Rn as GridType,
7924
+ tn as HLSColor,
7897
7925
  st as HorizontalAlign,
7898
7926
  Pt as ICommandService,
7899
- Wr as IConfigService,
7927
+ jr as IConfigService,
7900
7928
  pt as IContextService,
7901
- $r as IFloatingObjectManagerService,
7902
- Hu as ILocalStorageService,
7929
+ Xr as IFloatingObjectManagerService,
7930
+ ju as ILocalStorageService,
7903
7931
  et as ILogService,
7904
7932
  Es as IPermissionService,
7905
7933
  Rs as IResourceLoaderService,
7906
7934
  ge as IResourceManagerService,
7907
- Bu as ISnapshotServerService,
7935
+ zu as ISnapshotServerService,
7908
7936
  Ee as IUndoRedoService,
7909
7937
  Q as IUniverInstanceService,
7910
- Gu as InterceptorManager,
7911
- Vs as InterpolationPointType,
7912
- Zn as KeyIterator,
7938
+ Yu as InterceptorManager,
7939
+ Xs as InterpolationPointType,
7940
+ sr as KeyIterator,
7913
7941
  gt as LRUHelper,
7914
- tr as LRUMap,
7942
+ ir as LRUMap,
7915
7943
  Tt as LifecycleInitializerService,
7916
7944
  y as LifecycleService,
7917
7945
  w as LifecycleStages,
7918
- ne as LocalUndoRedoService,
7946
+ re as LocalUndoRedoService,
7919
7947
  It as LocaleService,
7920
7948
  ut as LocaleType,
7921
- Tr as LogLevel,
7922
- hr as MemoryCursor,
7923
- Cn as NamedStyleType,
7924
- Hr as NilCommand,
7925
- vn as NumberUnitType,
7926
- $ as ObjectMatrix,
7927
- Ln as ObjectRelativeFromH,
7928
- bn as ObjectRelativeFromV,
7929
- le as Observable,
7930
- xu as ObservableHooks,
7931
- ae as Observer,
7949
+ Cr as LogLevel,
7950
+ vr as MemoryCursor,
7951
+ Sn as NamedStyleType,
7952
+ wr as NilCommand,
7953
+ pn as NumberUnitType,
7954
+ k as ObjectMatrix,
7955
+ Mn as ObjectRelativeFromH,
7956
+ Dn as ObjectRelativeFromV,
7957
+ ce as Observable,
7958
+ Vu as ObservableHooks,
7959
+ le as Observer,
7932
7960
  _s as OnLifecycle,
7933
- ou as PRESET_LIST_TYPE,
7934
- pn as PageElementType,
7935
- Dn as PageOrientType,
7936
- $e as PageType,
7937
- En as ParagraphElementType,
7938
- nr as PermissionPoint,
7961
+ gu as PRESET_LIST_TYPE,
7962
+ Wn as PageElementType,
7963
+ Fn as PageOrientType,
7964
+ ke as PageType,
7965
+ An as ParagraphElementType,
7966
+ ar as PermissionPoint,
7939
7967
  Nt as PermissionService,
7940
7968
  ze as PermissionStatus,
7941
7969
  Fe as Plugin,
7942
7970
  Mt as PluginHolder,
7943
7971
  Dt as PluginService,
7944
- mn as PositionedObjectLayoutType,
7945
- Qt as PresetListType,
7946
- js as ProtectionType,
7972
+ Nn as PositionedObjectLayoutType,
7973
+ te as PresetListType,
7974
+ Js as ProtectionType,
7947
7975
  p as RANGE_TYPE,
7948
- Eo as RGBA_PAREN,
7949
- go as RGB_PAREN,
7976
+ No as RGBA_PAREN,
7977
+ Io as RGB_PAREN,
7950
7978
  it as Range,
7951
7979
  Z as Rectangle,
7952
- Pi as RedoCommand,
7953
- Mi as RedoCommandId,
7954
- zo as RefAlias,
7955
- qe as Registry,
7956
- Ze as RegistryAsMap,
7957
- Ks as RelativeDate,
7958
- Pn as RelativeSlideLink,
7959
- Ai as ResourceManagerService,
7960
- qt as RgbColor,
7961
- Bo as RxDisposable,
7962
- _n as SectionType,
7963
- Ys as ShapeType,
7964
- ie as SheetTypes,
7965
- yr as SheetViewModel,
7980
+ Bi as RedoCommand,
7981
+ Fi as RedoCommandId,
7982
+ tu as RefAlias,
7983
+ Ze as Registry,
7984
+ Qe as RegistryAsMap,
7985
+ qs as RelativeDate,
7986
+ Gn as RelativeSlideLink,
7987
+ bi as ResourceManagerService,
7988
+ Zt as RgbColor,
7989
+ zo as RxDisposable,
7990
+ mn as SectionType,
7991
+ Zs as ShapeType,
7992
+ oe as SheetTypes,
7993
+ ii as SheetViewModel,
7966
7994
  ds as SlideDataModel,
7967
- On as SpacingRule,
7968
- Vr as Styles,
7969
- Xs as THEME_COLORS,
7970
- In as TabStopAlignment,
7971
- zs as TextDecoration,
7995
+ wn as SpacingRule,
7996
+ Jr as Styles,
7997
+ ys as THEME_COLORS,
7998
+ bn as TabStopAlignment,
7999
+ Qs as TextDecoration,
7972
8000
  wt as TextDirection,
7973
- gn as TextDirectionType,
8001
+ On as TextDirectionType,
7974
8002
  Re as TextX,
7975
8003
  A as TextXActionType,
7976
- Zt as ThemeColor,
7977
- P as ThemeColorType,
7978
- oe as ThemeColors,
8004
+ Qt as ThemeColor,
8005
+ x as ThemeColorType,
8006
+ ue as ThemeColors,
7979
8007
  ms as ThemeService,
7980
8008
  R as Tools,
7981
- pi as UndoCommand,
7982
- Di as UndoCommandId,
7983
- he as UnitModel,
7984
- wu as Univer,
7985
- jt as UniverEditablePermission,
7986
- Ri as UniverEditablePermissionPoint,
7987
- te as UniverInstanceService,
8009
+ Gi as UndoCommand,
8010
+ Wi as UndoCommandId,
8011
+ de as UnitModel,
8012
+ pu as Univer,
8013
+ Kt as UniverEditablePermission,
8014
+ Ni as UniverEditablePermissionPoint,
8015
+ ee as UniverInstanceService,
7988
8016
  O as UniverInstanceType,
7989
8017
  St as UniverPermissionService,
7990
8018
  D as UpdateDocsAttributeType,
7991
- Qn as ValueIterator,
8019
+ Qi as UserManagerService,
8020
+ nr as ValueIterator,
7992
8021
  at as VerticalAlign,
7993
- Nn as WidthType,
8022
+ vn as WidthType,
7994
8023
  Ut as Workbook,
7995
8024
  vt as Worksheet,
7996
8025
  Lt as WrapStrategy,
7997
- Rn as WrapTextType,
8026
+ In as WrapTextType,
8027
+ fu as afterInitApply,
7998
8028
  Os as b64DecodeUnicode,
7999
- $u as b64EncodeUnicode,
8000
- ps as binarySearchArray,
8001
- po as cellToRange,
8002
- Mn as characterSpacingControlType,
8003
- Po as checkForSubstrings,
8004
- xo as checkParagraphHasBullet,
8005
- Ho as checkParagraphHasIndent,
8006
- Vn as checkParagraphHasIndentByStyle,
8007
- _o as codeToBlob,
8008
- Me as composeBody,
8009
- Ji as composeInterceptors,
8010
- jo as concatMatrixArray,
8011
- tu as convertBodyToHtml,
8029
+ Ju as b64EncodeUnicode,
8030
+ Ws as binarySearchArray,
8031
+ Bo as cellToRange,
8032
+ Hn as characterSpacingControlType,
8033
+ $o as checkForSubstrings,
8034
+ ko as checkParagraphHasBullet,
8035
+ Vo as checkParagraphHasIndent,
8036
+ Xn as checkParagraphHasIndentByStyle,
8037
+ Oo as codeToBlob,
8038
+ De as composeBody,
8039
+ so as composeInterceptors,
8040
+ Zo as concatMatrixArray,
8041
+ uu as convertBodyToHtml,
8012
8042
  Te as covertTextRunToHtml,
8013
- Wu as createInterceptorKey,
8014
- Nu as createInternalEditorID,
8043
+ Ku as createInterceptorKey,
8044
+ Mu as createInternalEditorID,
8015
8045
  Ue as createRowColIter,
8016
- yo as debounce,
8017
- ko as dedupe,
8046
+ ou as debounce,
8047
+ Xo as dedupe,
8018
8048
  Ve as deepCompare,
8019
- Kn as deleteContent,
8020
- gu as extractPureTextFromCell,
8021
- Fu as fromCallback,
8022
- Go as fromObservable,
8023
- Vu as generateTemporarySnap,
8049
+ qn as deleteContent,
8050
+ Nu as extractPureTextFromCell,
8051
+ br as fromCallback,
8052
+ Yo as fromObservable,
8053
+ qu as generateTemporarySnap,
8024
8054
  J as getArrayLength,
8025
- ls as getBodySlice,
8026
- Bt as getBodySliceHtml,
8027
- Mo as getBorderStyleType,
8028
- Oo as getCellValueType,
8055
+ cs as getBodySlice,
8056
+ $t as getBodySliceHtml,
8057
+ Wo as getBorderStyleType,
8058
+ bo as getCellValueType,
8029
8059
  V as getColorStyle,
8030
- Wt as getDocsUpdateBody,
8031
- fo as getReverseDirection,
8032
- Xu as getSheetBlocksFromSnapshot,
8033
- Yo as getTypeFromPermissionItemList,
8034
- Eu as getWorksheetUID,
8035
- Vo as groupBy,
8036
- Uo as handleJsonToDom,
8037
- To as handleStyleToString,
8038
- Wo as hashAlgorithm,
8060
+ Gt as getDocsUpdateBody,
8061
+ Ao as getReverseDirection,
8062
+ ea as getSheetBlocksFromSnapshot,
8063
+ yo as getTypeFromPermissionItemList,
8064
+ Su as getWorksheetUID,
8065
+ qo as groupBy,
8066
+ Ho as handleJsonToDom,
8067
+ Fo as handleStyleToString,
8068
+ Ko as hashAlgorithm,
8039
8069
  je as horizontalLineSegmentsSubtraction,
8040
8070
  Le as insertMatrixArray,
8041
- jn as insertTextToContent,
8042
- Ro as isBlackColor,
8043
- Tu as isBooleanString,
8044
- Io as isCellV,
8045
- Lo as isEmptyCell,
8046
- vo as isFormulaId,
8047
- bo as isFormulaString,
8048
- Co as isICellData,
8049
- Su as isInternalEditorID,
8050
- Ao as isNullCell,
8051
- zi as isNumeric,
8052
- Jn as isObserver,
8053
- Lu as isRangesEqual,
8054
- Fo as isRealNum,
8055
- Uu as isSafeNumeric,
8056
- $n as isSameStyleTextRun,
8057
- bu as isUnitRangesEqual,
8058
- Do as isValidRange,
8059
- mo as isWhiteColor,
8060
- wo as makeCellRangeToRangeData,
8061
- So as makeCellToSelection,
8062
- Ki as mergeOverrideWithDependencies,
8063
- Mu as mergeSets,
8064
- Qr as mergeWorksheetSnapshotWithDefault,
8071
+ Jn as insertTextToContent,
8072
+ So as isBlackColor,
8073
+ Wu as isBooleanString,
8074
+ Uo as isCellV,
8075
+ po as isEmptyCell,
8076
+ Po as isFormulaId,
8077
+ xo as isFormulaString,
8078
+ Lo as isICellData,
8079
+ Du as isInternalEditorID,
8080
+ vo as isNullCell,
8081
+ to as isNumeric,
8082
+ tr as isObserver,
8083
+ xu as isRangesEqual,
8084
+ jo as isRealNum,
8085
+ Fu as isSafeNumeric,
8086
+ zn as isSameStyleTextRun,
8087
+ Pu as isUnitRangesEqual,
8088
+ Go as isValidRange,
8089
+ wo as isWhiteColor,
8090
+ Do as makeCellRangeToRangeData,
8091
+ Mo as makeCellToSelection,
8092
+ Zi as mergeOverrideWithDependencies,
8093
+ Gu as mergeSets,
8094
+ ri as mergeWorksheetSnapshotWithDefault,
8065
8095
  ve as moveMatrixArray,
8066
- iu as moveRangeByOffset,
8067
- ye as normalizeTextRuns,
8068
- Jo as numberToABC,
8069
- qo as numberToListABC,
8070
- Ps as orderSearchArray,
8071
- ru as queryObjectMatrix,
8072
- ce as remove,
8073
- ir as repeatStringNumTimes,
8074
- Pu as replaceInDocumentBody,
8075
- pu as requestImmediateMacroTask,
8076
- $o as rotate,
8096
+ du as moveRangeByOffset,
8097
+ ts as normalizeTextRuns,
8098
+ su as numberToABC,
8099
+ nu as numberToListABC,
8100
+ Gs as orderSearchArray,
8101
+ hu as queryObjectMatrix,
8102
+ he as remove,
8103
+ cr as repeatStringNumTimes,
8104
+ ku as replaceInDocumentBody,
8105
+ $u as requestImmediateMacroTask,
8106
+ Jo as rotate,
8077
8107
  fs as runOnLifecycle,
8078
- ho as searchArray,
8079
- No as selectionToArray,
8080
- vr as sequence,
8081
- br as sequenceAsync,
8082
- hs as sequenceExecute,
8083
- uu as sequenceExecuteAsync,
8084
- vu as shallowEqual,
8085
- Ko as sliceMatrixArray,
8086
- Zo as sortRules,
8087
- Qo as sortRulesByDesc,
8108
+ Co as searchArray,
8109
+ To as selectionToArray,
8110
+ Rr as sequence,
8111
+ Er as sequenceAsync,
8112
+ Je as sequenceExecute,
8113
+ _u as sequenceExecuteAsync,
8114
+ Hu as shallowEqual,
8115
+ Qo as sliceMatrixArray,
8116
+ ru as sortRules,
8117
+ iu as sortRulesByDesc,
8088
8118
  ht as sortRulesFactory,
8089
8119
  be as spliceArray,
8090
8120
  me as textDecoder,
8091
- xt as textEncoder,
8092
- Du as throttle,
8121
+ Ht as textEncoder,
8122
+ Bu as throttle,
8093
8123
  b as toDisposable,
8094
- zu as transformDocumentDataToSnapshot,
8095
- Yu as transformSnapshotToDocumentData,
8096
- Ku as transformSnapshotToWorkbookData,
8097
- ju as transformWorkbookDataToSnapshot
8124
+ ta as transformDocumentDataToSnapshot,
8125
+ yu as transformSnapshotToDocumentData,
8126
+ Qu as transformSnapshotToWorkbookData,
8127
+ Zu as transformWorkbookDataToSnapshot
8098
8128
  };