@univerjs/core 0.1.11 → 0.1.12
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/cjs/index.js +9 -9
- package/lib/es/index.js +167 -150
- package/lib/types/services/command/command.service.d.ts +3 -1
- package/lib/types/services/locale/locale.service.d.ts +3 -1
- package/lib/types/services/user-manager/user-manager.service.d.ts +5 -0
- package/lib/types/types/interfaces/i-document-data.d.ts +2 -1
- package/lib/umd/index.js +9 -9
- package/package.json +5 -5
package/lib/es/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var Ss = Object.defineProperty;
|
|
2
2
|
var Ls = (t, e, s) => e in t ? Ss(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 H, Observable as ie, filter as Xt, merge as bs, timer as vs, BehaviorSubject as
|
|
4
|
+
import { Subject as H, Observable as ie, filter as Xt, merge as bs, timer as vs, BehaviorSubject as j, map as Us, distinctUntilChanged as Ts, combineLatest as Ms, finalize as Ds } from "rxjs";
|
|
5
5
|
import { filter as ps, debounceTime as xs, first as Ps, map as Hs } from "rxjs/operators";
|
|
6
|
-
import { createIdentifier as
|
|
6
|
+
import { createIdentifier as $, Inject as P, Injector as tt } from "@wendellhu/redi";
|
|
7
7
|
function Fs() {
|
|
8
8
|
Ws();
|
|
9
9
|
}
|
|
@@ -24,7 +24,7 @@ function Ws() {
|
|
|
24
24
|
clearTimeout(s);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function $s(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 Gs(t, e) {
|
|
|
39
39
|
}
|
|
40
40
|
return -1;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
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) {
|
|
@@ -56,13 +56,13 @@ function Bs(t, e) {
|
|
|
56
56
|
}
|
|
57
57
|
function Oo(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 =
|
|
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 = $s(t, e), s);
|
|
60
60
|
}
|
|
61
61
|
function Ao(t) {
|
|
62
62
|
const e = new Blob([t], { type: "text/javascript" });
|
|
63
63
|
return window.URL.createObjectURL(e);
|
|
64
64
|
}
|
|
65
|
-
var
|
|
65
|
+
var Bs = /* @__PURE__ */ ((t) => (t[t.DEFAULT_SERIES = 0] = "DEFAULT_SERIES", t[t.ALTERNATE_SERIES = 1] = "ALTERNATE_SERIES", t))(Bs || {}), w = /* @__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))(w || {}), ks = /* @__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))(ks || {}), G = /* @__PURE__ */ ((t) => (t[t.UNSUPPORTED = 0] = "UNSUPPORTED", t[t.RGB = 1] = "RGB", t[t.HEX = 2] = "HEX", t[t.THEME = 3] = "THEME", t))(G || {}), Vs = /* @__PURE__ */ ((t) => (t[t.ON = 0] = "ON", t[t.OFF = 1] = "OFF", t))(Vs || {}), js = /* @__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))(js || {}), Ks = /* @__PURE__ */ ((t) => (t[t.DOCUMENT = 0] = "DOCUMENT", t[t.PROJECT = 1] = "PROJECT", t))(Ks || {}), Ys = /* @__PURE__ */ ((t) => (t[t.COLUMNS = 0] = "COLUMNS", t[t.ROWS = 1] = "ROWS", t))(Ys || {}), zs = /* @__PURE__ */ ((t) => (t[t.UP = 0] = "UP", t[t.RIGHT = 1] = "RIGHT", t[t.DOWN = 2] = "DOWN", t[t.LEFT = 3] = "LEFT", t))(zs || {});
|
|
66
66
|
function Io(t) {
|
|
67
67
|
switch (t) {
|
|
68
68
|
case 3:
|
|
@@ -99,7 +99,7 @@ class ae {
|
|
|
99
99
|
d(this, "_themeTint");
|
|
100
100
|
d(this, "_rgbValue", "");
|
|
101
101
|
d(this, "_colorType");
|
|
102
|
-
this._colorType =
|
|
102
|
+
this._colorType = G.UNSUPPORTED, this._themeColors = ue.OFFICE, this._themeTint = 0;
|
|
103
103
|
}
|
|
104
104
|
asRgbColor() {
|
|
105
105
|
return new Zt(this._rgbValue, this);
|
|
@@ -109,25 +109,25 @@ class ae {
|
|
|
109
109
|
}
|
|
110
110
|
build() {
|
|
111
111
|
switch (this._colorType) {
|
|
112
|
-
case
|
|
112
|
+
case G.THEME:
|
|
113
113
|
return this.asThemeColor();
|
|
114
|
-
case
|
|
114
|
+
case G.RGB:
|
|
115
115
|
return this.asRgbColor();
|
|
116
|
-
case
|
|
116
|
+
case G.UNSUPPORTED:
|
|
117
117
|
throw new Error("unsupported color type");
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
setRgbColor(e) {
|
|
121
|
-
return this._colorType =
|
|
121
|
+
return this._colorType = G.RGB, this._rgbValue = e, this;
|
|
122
122
|
}
|
|
123
123
|
setThemeColors(e) {
|
|
124
|
-
this._colorType =
|
|
124
|
+
this._colorType = G.THEME, this._themeColors = e;
|
|
125
125
|
}
|
|
126
126
|
setThemeTint(e) {
|
|
127
|
-
this._colorType =
|
|
127
|
+
this._colorType = G.THEME, this._themeTint = e;
|
|
128
128
|
}
|
|
129
129
|
setThemeColor(e) {
|
|
130
|
-
return this._colorType =
|
|
130
|
+
return this._colorType = G.THEME, this._themeValue = e, this;
|
|
131
131
|
}
|
|
132
132
|
getColorType() {
|
|
133
133
|
return this._colorType;
|
|
@@ -260,7 +260,7 @@ const F = class F extends rt {
|
|
|
260
260
|
return this._alpha;
|
|
261
261
|
}
|
|
262
262
|
getColorType() {
|
|
263
|
-
return
|
|
263
|
+
return G.RGB;
|
|
264
264
|
}
|
|
265
265
|
clone() {
|
|
266
266
|
return new F(this._cssString, this._builder);
|
|
@@ -279,7 +279,7 @@ 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
280
|
)), d(F, "RGB_EXTRACT", new RegExp("\\s*rgb\\s*\\((\\s*\\d+\\s*),(\\s*\\d+\\s*),(\\s*\\d+\\s*)\\)\\s*"));
|
|
281
281
|
let Zt = F;
|
|
282
|
-
const
|
|
282
|
+
const z = class z extends rt {
|
|
283
283
|
constructor(s, n, r, i) {
|
|
284
284
|
super(i);
|
|
285
285
|
d(this, "_themeColorType");
|
|
@@ -301,31 +301,31 @@ const Y = class Y extends rt {
|
|
|
301
301
|
if (n == null)
|
|
302
302
|
throw new Error("not find themeColors value");
|
|
303
303
|
let r;
|
|
304
|
-
if (
|
|
305
|
-
if (r =
|
|
304
|
+
if (z._cacheThemeColor.has(this._themeColors)) {
|
|
305
|
+
if (r = z._cacheThemeColor.get(this._themeColors), r.has(this._themeColorType))
|
|
306
306
|
return r.get(this._themeColorType);
|
|
307
307
|
} else
|
|
308
|
-
r = /* @__PURE__ */ new Map(),
|
|
308
|
+
r = /* @__PURE__ */ new Map(), z._cacheThemeColor.set(this._themeColors, r);
|
|
309
309
|
const i = new en(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;
|
|
313
313
|
}
|
|
314
314
|
clone() {
|
|
315
|
-
return new
|
|
315
|
+
return new z(this._themeColorType, this._themeTint, this._themeColors, this._builder);
|
|
316
316
|
}
|
|
317
317
|
equals(s) {
|
|
318
|
-
return s instanceof
|
|
318
|
+
return s instanceof z ? s._themeColorType === this._themeColorType : !1;
|
|
319
319
|
}
|
|
320
320
|
getColorType() {
|
|
321
|
-
return
|
|
321
|
+
return G.THEME;
|
|
322
322
|
}
|
|
323
323
|
getThemeColorType() {
|
|
324
324
|
return this._themeColorType;
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
|
-
d(
|
|
328
|
-
let Qt =
|
|
327
|
+
d(z, "_cacheThemeColor", /* @__PURE__ */ new Map());
|
|
328
|
+
let Qt = z;
|
|
329
329
|
const No = "rgb(", wo = "rgba(", Ce = {
|
|
330
330
|
aliceBlue: [240, 248, 255],
|
|
331
331
|
antiqueWhite: [250, 235, 215],
|
|
@@ -477,7 +477,7 @@ const No = "rgb(", wo = "rgba(", Ce = {
|
|
|
477
477
|
yellow: [255, 255, 0],
|
|
478
478
|
yellowGreen: [154, 205, 5]
|
|
479
479
|
};
|
|
480
|
-
class
|
|
480
|
+
class B {
|
|
481
481
|
constructor(e) {
|
|
482
482
|
d(this, "_color");
|
|
483
483
|
d(this, "_rgbColor");
|
|
@@ -486,11 +486,11 @@ class $ {
|
|
|
486
486
|
this._setNullColor();
|
|
487
487
|
return;
|
|
488
488
|
}
|
|
489
|
-
if (e instanceof
|
|
489
|
+
if (e instanceof B) {
|
|
490
490
|
this._color = { ...e._color }, this._rgbColor = { ...e._rgbColor };
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
|
-
const s =
|
|
493
|
+
const s = Be(e);
|
|
494
494
|
if (s == null) {
|
|
495
495
|
this._setNullColor();
|
|
496
496
|
return;
|
|
@@ -506,16 +506,16 @@ class $ {
|
|
|
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
|
|
509
|
+
const r = new B(e).toRgb(), i = new B(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
|
|
515
|
+
return new B(a);
|
|
516
516
|
}
|
|
517
517
|
static getContrastRatio(e, s) {
|
|
518
|
-
const n = new
|
|
518
|
+
const n = new B(e).getLuminance(), r = new B(s).getLuminance();
|
|
519
519
|
return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05);
|
|
520
520
|
}
|
|
521
521
|
get isValid() {
|
|
@@ -548,14 +548,14 @@ class $ {
|
|
|
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
|
|
551
|
+
return s.l += e, s.l = Math.min(Math.max(s.l, 0), 100), new B(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
|
|
555
|
+
return s.l -= e, s.l = Math.min(Math.max(s.l, 0), 100), new B(s);
|
|
556
556
|
}
|
|
557
557
|
setAlpha(e) {
|
|
558
|
-
return new
|
|
558
|
+
return new B({ ...this._rgbColor, a: e });
|
|
559
559
|
}
|
|
560
560
|
getLuminance() {
|
|
561
561
|
let { r: e, g: s, b: n } = this.toRgb();
|
|
@@ -589,7 +589,7 @@ class $ {
|
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
}
|
|
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),
|
|
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), Be = (t) => {
|
|
593
593
|
if (_n(t)) {
|
|
594
594
|
if ("r" in t) {
|
|
595
595
|
const n = {
|
|
@@ -683,7 +683,7 @@ const _t = (t) => t.length === 1 ? `0${t}` : t, Ft = (t) => (t /= 255, t <= 0.03
|
|
|
683
683
|
};
|
|
684
684
|
return s.length > 3 && (n.a = Number.parseFloat(s[3])), n;
|
|
685
685
|
}, un = (t) => {
|
|
686
|
-
const e =
|
|
686
|
+
const e = Be(t);
|
|
687
687
|
if (e != null)
|
|
688
688
|
return "r" in e ? e : "l" in e ? an(e) : ln(e);
|
|
689
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), an = (t) => {
|
|
@@ -799,12 +799,12 @@ function Uo(t) {
|
|
|
799
799
|
function To(t) {
|
|
800
800
|
return t != null && (typeof t == "string" || typeof t == "number" || typeof t == "boolean");
|
|
801
801
|
}
|
|
802
|
-
var fn = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(fn || {}), gn = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(gn || {}), 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 || {}),
|
|
802
|
+
var fn = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(fn || {}), gn = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(gn || {}), 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 || {}), J = /* @__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))(J || {}), En = /* @__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[t.MENTION = 6] = "MENTION", t))(En || {}), Rn = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(Rn || {}), mn = /* @__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))(mn || {}), Cn = /* @__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))(Cn || {}), On = /* @__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))(On || {}), An = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(An || {}), In = /* @__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))(In || {}), Nn = /* @__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))(Nn || {}), wn = /* @__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))(wn || {}), 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 || {}), Ln = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(Ln || {}), bn = /* @__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))(bn || {}), vn = /* @__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))(vn || {}), Un = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(Un || {}), Tn = /* @__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))(Tn || {}), Mn = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(Mn || {}), Dn = /* @__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))(Dn || {}), pn = /* @__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))(pn || {}), xn = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t))(xn || {}), Pn = /* @__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))(Pn || {}), Hn = /* @__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))(Hn || {}), Fn = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(Fn || {}), Wn = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(Wn || {}), 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
803
|
function Mo(t) {
|
|
804
804
|
return [t.startRow, t.startColumn, t.endRow, t.endColumn];
|
|
805
805
|
}
|
|
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 || {}),
|
|
807
|
-
const
|
|
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 || {}), $n = /* @__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))($n || {}), 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
808
|
let kn = (t) => crypto.getRandomValues(new Uint8Array(t)), Vn = (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) => {
|
|
@@ -819,10 +819,10 @@ let kn = (t) => crypto.getRandomValues(new Uint8Array(t)), Vn = (t, e, s) => {
|
|
|
819
819
|
}, jn = (t, e = 21) => Vn(t, e, kn), Kn = (t = 21) => {
|
|
820
820
|
let e = "", s = crypto.getRandomValues(new Uint8Array(t));
|
|
821
821
|
for (; t--; )
|
|
822
|
-
e +=
|
|
822
|
+
e += Bn[s[t] & 63];
|
|
823
823
|
return e;
|
|
824
824
|
};
|
|
825
|
-
const Yn = /^-ms-/, zn = /-([a-z])/g,
|
|
825
|
+
const Yn = /^-ms-/, zn = /-([a-z])/g, Y = [
|
|
826
826
|
"A",
|
|
827
827
|
"B",
|
|
828
828
|
"C",
|
|
@@ -853,16 +853,16 @@ const Yn = /^-ms-/, zn = /-([a-z])/g, K = [
|
|
|
853
853
|
class R {
|
|
854
854
|
static stringAt(e) {
|
|
855
855
|
let s = "", n = e;
|
|
856
|
-
for (; n >=
|
|
857
|
-
n /=
|
|
858
|
-
const r = e %
|
|
859
|
-
return s +=
|
|
856
|
+
for (; n >= Y.length; )
|
|
857
|
+
n /= Y.length, n -= 1, s += Y[n % Y.length];
|
|
858
|
+
const r = e % Y.length;
|
|
859
|
+
return s += Y[r], s;
|
|
860
860
|
}
|
|
861
861
|
static indexAt(e) {
|
|
862
862
|
let s = 0;
|
|
863
863
|
for (let n = 0; n < e.length - 1; n += 1) {
|
|
864
864
|
const r = e.charCodeAt(n) - 65, i = e.length - 1 - n;
|
|
865
|
-
s +=
|
|
865
|
+
s += Y.length ** i + Y.length * r;
|
|
866
866
|
}
|
|
867
867
|
return s += e.charCodeAt(e.length - 1) - 65, s;
|
|
868
868
|
}
|
|
@@ -1247,10 +1247,10 @@ function Do(t) {
|
|
|
1247
1247
|
endColumn: I,
|
|
1248
1248
|
startY: v,
|
|
1249
1249
|
endY: M,
|
|
1250
|
-
startX:
|
|
1250
|
+
startX: K,
|
|
1251
1251
|
endX: ws
|
|
1252
1252
|
} = i;
|
|
1253
|
-
c = g, h = E, _ = m, f = I, o = v, u = M, a =
|
|
1253
|
+
c = g, h = E, _ = m, f = I, o = v, u = M, a = K, l = ws;
|
|
1254
1254
|
}
|
|
1255
1255
|
return r && (o = i.startY, u = i.endY, a = i.startX, l = i.endX, _ = i.endRow, f = i.endColumn), {
|
|
1256
1256
|
startRow: c,
|
|
@@ -1431,7 +1431,7 @@ function ft(t) {
|
|
|
1431
1431
|
let e = "";
|
|
1432
1432
|
return t === w.NONE ? e = "none" : t === w.THIN ? e = "0.5pt solid" : t === w.HAIR ? e = "0.5pt double" : t === w.DOTTED ? e = "0.5pt dotted" : t === w.DASHED || t === w.DASH_DOT ? e = "0.5pt dashed" : t === w.DASH_DOT_DOT ? e = "0.5pt dotted" : t === w.DOUBLE ? e = "0.5pt double" : t === w.MEDIUM ? e = "1pt solid" : t === w.MEDIUM_DASHED || t === w.MEDIUM_DASH_DOT ? e = "1pt dashed" : t === w.MEDIUM_DASH_DOT_DOT ? e = "1pt dotted" : t === w.SLANT_DASH_DOT ? e = "0.5pt dashed" : t === w.THICK && (e = "1.5pt solid"), e;
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function $o(t) {
|
|
1435
1435
|
let e = 0;
|
|
1436
1436
|
if (t = t.trim(), t === "none")
|
|
1437
1437
|
e = w.NONE;
|
|
@@ -1457,7 +1457,7 @@ function Go(t) {
|
|
|
1457
1457
|
return w.NONE;
|
|
1458
1458
|
return e;
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function $t(t, e) {
|
|
1461
1461
|
let s = t.body;
|
|
1462
1462
|
if (e) {
|
|
1463
1463
|
const { headers: n, footers: r } = t;
|
|
@@ -1465,11 +1465,11 @@ function Gt(t, e) {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
return s;
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
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
|
|
1472
|
+
function Bo(t, e) {
|
|
1473
1473
|
return { startRow: t, endRow: t, startColumn: e, endColumn: e };
|
|
1474
1474
|
}
|
|
1475
1475
|
function Ve(t, e) {
|
|
@@ -1567,7 +1567,7 @@ function Qn(t) {
|
|
|
1567
1567
|
}, s = t(e);
|
|
1568
1568
|
return s.prototype = Object.create(Error.prototype), s.prototype.constructor = s, s;
|
|
1569
1569
|
}
|
|
1570
|
-
var
|
|
1570
|
+
var Gt = Qn(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
|
|
1618
|
+
i = E instanceof Gt ? 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
|
we(g);
|
|
1628
1628
|
} catch (E) {
|
|
1629
|
-
i = i != null ? i : [], E instanceof
|
|
1629
|
+
i = i != null ? i : [], E instanceof Gt ? 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
|
|
1644
|
+
throw new Gt(i);
|
|
1645
1645
|
}
|
|
1646
1646
|
}, t.prototype.add = function(e) {
|
|
1647
1647
|
var s;
|
|
@@ -2182,7 +2182,7 @@ class or {
|
|
|
2182
2182
|
return e;
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function q(t) {
|
|
2186
2186
|
let e = 0;
|
|
2187
2187
|
const s = Object.keys(t);
|
|
2188
2188
|
for (const n of s) {
|
|
@@ -2192,7 +2192,7 @@ function J(t) {
|
|
|
2192
2192
|
return e + 1;
|
|
2193
2193
|
}
|
|
2194
2194
|
function Le(t, e, s) {
|
|
2195
|
-
const n =
|
|
2195
|
+
const n = q(s), r = s;
|
|
2196
2196
|
for (let i = n - 1; i >= t; i--)
|
|
2197
2197
|
r[i + 1] = r[i];
|
|
2198
2198
|
r[t] = e;
|
|
@@ -2217,7 +2217,7 @@ function Qo(t, e) {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
function yo(t, e, s) {
|
|
2219
2219
|
const n = s;
|
|
2220
|
-
if (
|
|
2220
|
+
if (q(s) > 0) {
|
|
2221
2221
|
const i = {};
|
|
2222
2222
|
let o = 0;
|
|
2223
2223
|
for (let u = t; u <= e; u++)
|
|
@@ -2436,7 +2436,7 @@ class k {
|
|
|
2436
2436
|
return Object.keys(this._matrix).length;
|
|
2437
2437
|
}
|
|
2438
2438
|
getLength() {
|
|
2439
|
-
return
|
|
2439
|
+
return q(this._matrix);
|
|
2440
2440
|
}
|
|
2441
2441
|
getRange() {
|
|
2442
2442
|
const n = this.getLength() - 1;
|
|
@@ -2445,7 +2445,7 @@ class k {
|
|
|
2445
2445
|
for (let o = 0; o < i; o++) {
|
|
2446
2446
|
const u = this.getRow(o);
|
|
2447
2447
|
if (u) {
|
|
2448
|
-
const a =
|
|
2448
|
+
const a = q(u) - 1;
|
|
2449
2449
|
r = a > r ? a : r;
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
@@ -2514,7 +2514,7 @@ class k {
|
|
|
2514
2514
|
return this.forEach((u, a) => {
|
|
2515
2515
|
if (i || (i = !0, e = u), a == null)
|
|
2516
2516
|
return;
|
|
2517
|
-
const l =
|
|
2517
|
+
const l = q(a) - 1;
|
|
2518
2518
|
l > n && (n = l), Object.keys(a).forEach((c) => {
|
|
2519
2519
|
const h = Number(c);
|
|
2520
2520
|
o ? h < s && (s = h) : (o = !0, s = h);
|
|
@@ -2568,7 +2568,7 @@ const tu = (t) => t.some(
|
|
|
2568
2568
|
) ? "init" : t.some(
|
|
2569
2569
|
(e) => e.status === "fetching"
|
|
2570
2570
|
/* FETCHING */
|
|
2571
|
-
) ? "fetching" : "done",
|
|
2571
|
+
) ? "fetching" : "done", X = class X {
|
|
2572
2572
|
static clone(e) {
|
|
2573
2573
|
return e.rangeType !== void 0 ? {
|
|
2574
2574
|
startRow: e.startRow,
|
|
@@ -2632,7 +2632,7 @@ const tu = (t) => t.some(
|
|
|
2632
2632
|
return e.startRow <= s.startRow && e.endRow >= s.endRow && e.startColumn <= s.startColumn && e.endColumn >= s.endColumn;
|
|
2633
2633
|
}
|
|
2634
2634
|
static realContain(e, s) {
|
|
2635
|
-
return
|
|
2635
|
+
return X.contains(e, s) && (e.startRow < s.startRow || e.endRow > s.endRow || e.startColumn < s.startColumn || e.endColumn > s.endColumn);
|
|
2636
2636
|
}
|
|
2637
2637
|
static union(...e) {
|
|
2638
2638
|
return e.reduce(
|
|
@@ -2675,33 +2675,33 @@ const tu = (t) => t.some(
|
|
|
2675
2675
|
}), n.filter((u) => u.startRow <= u.endRow && u.startColumn <= u.endColumn);
|
|
2676
2676
|
}
|
|
2677
2677
|
};
|
|
2678
|
-
d(
|
|
2678
|
+
d(X, "getRelativeRange", (e, s) => ({
|
|
2679
2679
|
startRow: e.startRow - s.startRow,
|
|
2680
2680
|
endRow: e.endRow - e.startRow,
|
|
2681
2681
|
startColumn: e.startColumn - s.startColumn,
|
|
2682
2682
|
endColumn: e.endColumn - e.startColumn
|
|
2683
|
-
})), d(
|
|
2683
|
+
})), d(X, "getPositionRange", (e, s, n) => ({
|
|
2684
2684
|
...n || {},
|
|
2685
2685
|
startRow: n && [L.ROW, L.ALL].includes(n.startAbsoluteRefType || 0) ? n.startRow : e.startRow + s.startRow,
|
|
2686
2686
|
endRow: n && [L.ROW, L.ALL].includes(n.endAbsoluteRefType || 0) ? n.endRow : e.endRow + e.startRow + s.startRow,
|
|
2687
2687
|
startColumn: n && [L.COLUMN, L.ALL].includes(n.startAbsoluteRefType || 0) ? n.startColumn : e.startColumn + s.startColumn,
|
|
2688
2688
|
endColumn: n && [L.COLUMN, L.ALL].includes(n.endAbsoluteRefType || 0) ? n.endColumn : e.endColumn + e.startColumn + s.startColumn
|
|
2689
|
-
})), d(
|
|
2689
|
+
})), d(X, "moveHorizontal", (e, s = 0, n = 0) => ({
|
|
2690
2690
|
...e,
|
|
2691
2691
|
startColumn: e.startColumn + s,
|
|
2692
2692
|
endColumn: e.endColumn + s + n
|
|
2693
|
-
})), d(
|
|
2693
|
+
})), d(X, "moveVertical", (e, s = 0, n = 0) => ({
|
|
2694
2694
|
...e,
|
|
2695
2695
|
startRow: e.startRow + s,
|
|
2696
2696
|
endRow: e.endRow + s + n
|
|
2697
|
-
})), d(
|
|
2697
|
+
})), d(X, "moveOffset", (e, s, n) => ({
|
|
2698
2698
|
...e,
|
|
2699
2699
|
startRow: e.startRow + n,
|
|
2700
2700
|
endRow: e.endRow + n,
|
|
2701
2701
|
startColumn: e.startColumn + s,
|
|
2702
2702
|
endColumn: e.endColumn + s
|
|
2703
2703
|
}));
|
|
2704
|
-
let Z =
|
|
2704
|
+
let Z = X;
|
|
2705
2705
|
class eu {
|
|
2706
2706
|
constructor(e, s) {
|
|
2707
2707
|
d(this, "_values", []);
|
|
@@ -2827,7 +2827,7 @@ function uu(t, e) {
|
|
|
2827
2827
|
clearTimeout(s), s = setTimeout(i, e);
|
|
2828
2828
|
};
|
|
2829
2829
|
}
|
|
2830
|
-
function
|
|
2830
|
+
function Bt(t, e, s) {
|
|
2831
2831
|
const { dataStream: n, textRuns: r = [] } = t;
|
|
2832
2832
|
let i = e;
|
|
2833
2833
|
const o = [];
|
|
@@ -2851,11 +2851,11 @@ function au(t, e = !0) {
|
|
|
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("; ")};"` : ""}>${
|
|
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;
|
|
2855
2855
|
}
|
|
2856
|
-
return o !== n.length && (i +=
|
|
2856
|
+
return o !== n.length && (i += Bt(t, o, n.length)), i;
|
|
2857
2857
|
} else
|
|
2858
|
-
return
|
|
2858
|
+
return Bt(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;
|
|
@@ -3583,7 +3583,7 @@ function mr(t) {
|
|
|
3583
3583
|
index: -1
|
|
3584
3584
|
};
|
|
3585
3585
|
}
|
|
3586
|
-
const pt =
|
|
3586
|
+
const pt = $("univer.context-service");
|
|
3587
3587
|
class Cr extends T {
|
|
3588
3588
|
constructor() {
|
|
3589
3589
|
super(...arguments);
|
|
@@ -3609,7 +3609,7 @@ class Cr extends T {
|
|
|
3609
3609
|
}
|
|
3610
3610
|
}
|
|
3611
3611
|
var Or = /* @__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))(Or || {});
|
|
3612
|
-
const et =
|
|
3612
|
+
const et = $("univer.log");
|
|
3613
3613
|
class Ar extends T {
|
|
3614
3614
|
constructor() {
|
|
3615
3615
|
super(...arguments);
|
|
@@ -3640,17 +3640,18 @@ var Ir = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, wr = (t, e
|
|
|
3640
3640
|
(o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
|
|
3641
3641
|
return n && r && Ir(e, s, r), r;
|
|
3642
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 =
|
|
3643
|
+
const Pt = $("anywhere.command-service");
|
|
3644
3644
|
class Sr {
|
|
3645
3645
|
constructor() {
|
|
3646
3646
|
d(this, "_commands", /* @__PURE__ */ new Map());
|
|
3647
|
+
d(this, "_commandTypes", /* @__PURE__ */ new Map());
|
|
3647
3648
|
}
|
|
3648
3649
|
registerCommand(e) {
|
|
3649
3650
|
if (this._commands.has(e.id))
|
|
3650
3651
|
throw new Error(`[CommandRegistry]: command "${e.id}" has been registered before.`);
|
|
3651
|
-
return this._commands.set(e.id, e), b(() => {
|
|
3652
|
+
return this._commands.set(e.id, e), this._commandTypes.set(e.id, e.type), b(() => {
|
|
3652
3653
|
var s;
|
|
3653
|
-
this._commands.delete(e.id), (s = e.onDispose) == null || s.call(e);
|
|
3654
|
+
this._commands.delete(e.id), this._commandTypes.delete(e.id), (s = e.onDispose) == null || s.call(e);
|
|
3654
3655
|
});
|
|
3655
3656
|
}
|
|
3656
3657
|
hasCommand(e) {
|
|
@@ -3659,6 +3660,9 @@ class Sr {
|
|
|
3659
3660
|
getCommand(e) {
|
|
3660
3661
|
return this._commands.has(e) ? [this._commands.get(e)] : null;
|
|
3661
3662
|
}
|
|
3663
|
+
getCommandType(e) {
|
|
3664
|
+
return this._commandTypes.get(e);
|
|
3665
|
+
}
|
|
3662
3666
|
}
|
|
3663
3667
|
const Lr = {
|
|
3664
3668
|
id: "nil",
|
|
@@ -3852,7 +3856,7 @@ const gu = (t) => new Promise((e) => {
|
|
|
3852
3856
|
e();
|
|
3853
3857
|
});
|
|
3854
3858
|
});
|
|
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 || {});
|
|
3859
|
+
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.APPLY_PERMISSION_DENIED = 7004] = "APPLY_PERMISSION_DENIED", 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
3860
|
function qe(t) {
|
|
3857
3861
|
return !!(t && t.code && t.code !== W.OK && t.code !== "OK");
|
|
3858
3862
|
}
|
|
@@ -4234,7 +4238,7 @@ const Eu = {
|
|
|
4234
4238
|
listType: "BULLET_LIST",
|
|
4235
4239
|
nestingLevel: [
|
|
4236
4240
|
{
|
|
4237
|
-
bulletAlignment:
|
|
4241
|
+
bulletAlignment: J.START,
|
|
4238
4242
|
glyphFormat: " %0",
|
|
4239
4243
|
textStyle: {
|
|
4240
4244
|
fs: 12
|
|
@@ -4245,7 +4249,7 @@ const Eu = {
|
|
|
4245
4249
|
indentStart: 21
|
|
4246
4250
|
},
|
|
4247
4251
|
{
|
|
4248
|
-
bulletAlignment:
|
|
4252
|
+
bulletAlignment: J.START,
|
|
4249
4253
|
glyphFormat: " %1",
|
|
4250
4254
|
textStyle: {
|
|
4251
4255
|
fs: 12
|
|
@@ -4256,7 +4260,7 @@ const Eu = {
|
|
|
4256
4260
|
indentStart: 42
|
|
4257
4261
|
},
|
|
4258
4262
|
{
|
|
4259
|
-
bulletAlignment:
|
|
4263
|
+
bulletAlignment: J.START,
|
|
4260
4264
|
glyphFormat: " %1",
|
|
4261
4265
|
textStyle: {
|
|
4262
4266
|
fs: 12
|
|
@@ -4272,7 +4276,7 @@ const Eu = {
|
|
|
4272
4276
|
listType: "ORDER_LIST",
|
|
4273
4277
|
nestingLevel: [
|
|
4274
4278
|
{
|
|
4275
|
-
bulletAlignment:
|
|
4279
|
+
bulletAlignment: J.START,
|
|
4276
4280
|
glyphFormat: " %1.",
|
|
4277
4281
|
textStyle: {
|
|
4278
4282
|
fs: 12
|
|
@@ -4283,7 +4287,7 @@ const Eu = {
|
|
|
4283
4287
|
indentStart: 21
|
|
4284
4288
|
},
|
|
4285
4289
|
{
|
|
4286
|
-
bulletAlignment:
|
|
4290
|
+
bulletAlignment: J.START,
|
|
4287
4291
|
glyphFormat: " %1.%2)",
|
|
4288
4292
|
textStyle: {
|
|
4289
4293
|
fs: 12
|
|
@@ -4294,7 +4298,7 @@ const Eu = {
|
|
|
4294
4298
|
indentStart: 42
|
|
4295
4299
|
},
|
|
4296
4300
|
{
|
|
4297
|
-
bulletAlignment:
|
|
4301
|
+
bulletAlignment: J.START,
|
|
4298
4302
|
glyphFormat: " %1.%2.%3.",
|
|
4299
4303
|
textStyle: {
|
|
4300
4304
|
fs: 12
|
|
@@ -4308,7 +4312,7 @@ const Eu = {
|
|
|
4308
4312
|
}
|
|
4309
4313
|
};
|
|
4310
4314
|
function Pr(t, e, s, n, r) {
|
|
4311
|
-
const i = Hr(t, e, s, n, r), o = Fr(t, e, s, n, r), u = Wr(t, e, s, n, r), a =
|
|
4315
|
+
const i = Hr(t, e, s, n, r), o = Fr(t, e, s, n, r), u = Wr(t, e, s, n, r), a = $r(t, e, s, n, r), l = Gr(t, e, s, n, r), c = Br(t, e, s, n, r);
|
|
4312
4316
|
return {
|
|
4313
4317
|
dataStream: "",
|
|
4314
4318
|
textRuns: i,
|
|
@@ -4341,8 +4345,8 @@ function ls(t, e, s) {
|
|
|
4341
4345
|
}
|
|
4342
4346
|
for (; o < r && u < i; ) {
|
|
4343
4347
|
const { st: f, ed: g, ts: E } = t[o], { st: m, ed: I, ts: v, sId: M } = e[u];
|
|
4344
|
-
let
|
|
4345
|
-
s === D.COVER ?
|
|
4348
|
+
let K;
|
|
4349
|
+
s === D.COVER ? K = { ...v, ...E } : K = { ...E, ...v }, g < m ? (l() || n.push(t[o]), o++) : I < f ? (l() || n.push(e[u]), u++) : (n.push({
|
|
4346
4350
|
st: Math.min(f, m),
|
|
4347
4351
|
ed: Math.max(f, m),
|
|
4348
4352
|
ts: f < m ? { ...E } : { ...v },
|
|
@@ -4350,7 +4354,7 @@ function ls(t, e, s) {
|
|
|
4350
4354
|
}), n.push({
|
|
4351
4355
|
st: Math.max(f, m),
|
|
4352
4356
|
ed: Math.min(g, I),
|
|
4353
|
-
ts:
|
|
4357
|
+
ts: K,
|
|
4354
4358
|
sId: M
|
|
4355
4359
|
}), g < I ? (o++, e[u].st = g) : (u++, t[o].st = I), a = {
|
|
4356
4360
|
st: Math.min(g, I),
|
|
@@ -4442,7 +4446,7 @@ function Wr(t, e, s, n, r) {
|
|
|
4442
4446
|
}
|
|
4443
4447
|
return _e(t, e, s, n), u;
|
|
4444
4448
|
}
|
|
4445
|
-
function
|
|
4449
|
+
function $r(t, e, s, n, r) {
|
|
4446
4450
|
const { customBlocks: i } = t, { customBlocks: o } = e;
|
|
4447
4451
|
if (i == null || o == null)
|
|
4448
4452
|
return;
|
|
@@ -4471,7 +4475,7 @@ function Gr(t, e, s, n, r) {
|
|
|
4471
4475
|
}
|
|
4472
4476
|
return ss(t, e, s, n), u;
|
|
4473
4477
|
}
|
|
4474
|
-
function
|
|
4478
|
+
function Gr(t, e, s, n, r) {
|
|
4475
4479
|
const { tables: i } = t, { tables: o } = e;
|
|
4476
4480
|
if (i == null || o == null)
|
|
4477
4481
|
return;
|
|
@@ -4500,7 +4504,7 @@ function Br(t, e, s, n, r) {
|
|
|
4500
4504
|
}
|
|
4501
4505
|
return fe(t, e, s, n), u;
|
|
4502
4506
|
}
|
|
4503
|
-
function
|
|
4507
|
+
function Br(t, e, s, n, r) {
|
|
4504
4508
|
const { customRanges: i } = t, { tables: o } = e;
|
|
4505
4509
|
if (i == null || o == null)
|
|
4506
4510
|
return;
|
|
@@ -4809,19 +4813,19 @@ class ot extends jr {
|
|
|
4809
4813
|
_updateApply(s, n, r, i = D.COVER, o) {
|
|
4810
4814
|
if (s == null)
|
|
4811
4815
|
throw new Error("updateBody is none");
|
|
4812
|
-
const u = this.snapshot, a =
|
|
4816
|
+
const u = this.snapshot, a = $t(u, o);
|
|
4813
4817
|
if (a == null)
|
|
4814
4818
|
throw new Error("no body has changed");
|
|
4815
4819
|
return Pr(a, s, n, r, i);
|
|
4816
4820
|
}
|
|
4817
4821
|
_deleteApply(s, n, r) {
|
|
4818
|
-
const i = this.snapshot, o =
|
|
4822
|
+
const i = this.snapshot, o = $t(i, r);
|
|
4819
4823
|
if (o == null)
|
|
4820
4824
|
throw new Error("no body has changed");
|
|
4821
4825
|
return s <= 0 ? { dataStream: "" } : pr(o, s, n);
|
|
4822
4826
|
}
|
|
4823
4827
|
_insertApply(s, n, r, i) {
|
|
4824
|
-
const o = this.snapshot, u =
|
|
4828
|
+
const o = this.snapshot, u = $t(o, i);
|
|
4825
4829
|
if (n !== 0) {
|
|
4826
4830
|
if (u == null)
|
|
4827
4831
|
throw new Error("no body has changed");
|
|
@@ -4845,7 +4849,7 @@ class ot extends jr {
|
|
|
4845
4849
|
super.updateDocumentId(s), this._unitId = s;
|
|
4846
4850
|
}
|
|
4847
4851
|
}
|
|
4848
|
-
const Kr =
|
|
4852
|
+
const Kr = $("univer.config-service");
|
|
4849
4853
|
class Yr {
|
|
4850
4854
|
constructor() {
|
|
4851
4855
|
d(this, "_config", /* @__PURE__ */ new Map());
|
|
@@ -4963,7 +4967,7 @@ class Xr {
|
|
|
4963
4967
|
return n == null ? [] : (s == null || s.delete(e.floatingObjectId), [{ ...e, floatingObject: n }]);
|
|
4964
4968
|
}
|
|
4965
4969
|
}
|
|
4966
|
-
const Jr =
|
|
4970
|
+
const Jr = $(
|
|
4967
4971
|
"univer.floating-object.service"
|
|
4968
4972
|
);
|
|
4969
4973
|
class qr {
|
|
@@ -5105,7 +5109,7 @@ class Zr {
|
|
|
5105
5109
|
* @returns
|
|
5106
5110
|
*/
|
|
5107
5111
|
getSize() {
|
|
5108
|
-
return
|
|
5112
|
+
return q(this._columnData);
|
|
5109
5113
|
}
|
|
5110
5114
|
/**
|
|
5111
5115
|
* Get the width of column
|
|
@@ -5250,7 +5254,7 @@ class Qr {
|
|
|
5250
5254
|
* @returns
|
|
5251
5255
|
*/
|
|
5252
5256
|
getSize() {
|
|
5253
|
-
return
|
|
5257
|
+
return q(this._rowData);
|
|
5254
5258
|
}
|
|
5255
5259
|
}
|
|
5256
5260
|
const mu = "DEFAULT_WORKSHEET_ROW_COUNT", yr = 1e3, Cu = "DEFAULT_WORKSHEET_COLUMN_COUNT", ti = 20, Ou = "DEFAULT_WORKSHEET_ROW_HEIGHT", ei = 19, Au = "DEFAULT_WORKSHEET_COLUMN_WIDTH", si = 73, Iu = "DEFAULT_WORKSHEET_ROW_TITLE_WIDTH", ni = 46, Nu = "DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT", ri = 20;
|
|
@@ -5745,7 +5749,7 @@ function wu(t) {
|
|
|
5745
5749
|
const s = t.v;
|
|
5746
5750
|
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" : "";
|
|
5747
5751
|
}
|
|
5748
|
-
const ui = "0.1.
|
|
5752
|
+
const ui = "0.1.12";
|
|
5749
5753
|
function ai(t = "", e = ut.ZH_CN, s = "") {
|
|
5750
5754
|
return {
|
|
5751
5755
|
id: t,
|
|
@@ -5774,7 +5778,7 @@ let Ut = class extends de {
|
|
|
5774
5778
|
d(this, "sheetCreated$", this._sheetCreated$.asObservable());
|
|
5775
5779
|
d(this, "_sheetDisposed$", new H());
|
|
5776
5780
|
d(this, "sheetDisposed$", this._sheetDisposed$.asObservable());
|
|
5777
|
-
d(this, "_activeSheet$", new
|
|
5781
|
+
d(this, "_activeSheet$", new j(null));
|
|
5778
5782
|
d(this, "activeSheet$", this._activeSheet$.asObservable());
|
|
5779
5783
|
/**
|
|
5780
5784
|
* sheets list
|
|
@@ -6145,20 +6149,20 @@ var gi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Ri = (t, e
|
|
|
6145
6149
|
(o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
|
|
6146
6150
|
return n && r && gi(e, s, r), r;
|
|
6147
6151
|
}, pe = (t, e) => (s, n) => e(s, n, t);
|
|
6148
|
-
const Q =
|
|
6152
|
+
const Q = $("univer.current");
|
|
6149
6153
|
let ee = class extends T {
|
|
6150
6154
|
constructor(e, s) {
|
|
6151
6155
|
super();
|
|
6152
6156
|
d(this, "_unitsByType", /* @__PURE__ */ new Map());
|
|
6153
6157
|
d(this, "_createHandler");
|
|
6154
6158
|
d(this, "_ctorByType", /* @__PURE__ */ new Map());
|
|
6155
|
-
d(this, "_currentUnits$", new
|
|
6159
|
+
d(this, "_currentUnits$", new j({}));
|
|
6156
6160
|
d(this, "currentUnits$", this._currentUnits$.asObservable());
|
|
6157
6161
|
d(this, "_unitAdded$", new H());
|
|
6158
6162
|
d(this, "unitAdded$", this._unitAdded$.asObservable());
|
|
6159
6163
|
d(this, "_unitDisposed$", new H());
|
|
6160
6164
|
d(this, "unitDisposed$", this._unitDisposed$.asObservable());
|
|
6161
|
-
d(this, "_focused$", new
|
|
6165
|
+
d(this, "_focused$", new j(null));
|
|
6162
6166
|
d(this, "focused$", this._focused$.asObservable());
|
|
6163
6167
|
this._injector = e, this._contextService = s;
|
|
6164
6168
|
}
|
|
@@ -6288,7 +6292,7 @@ var Ci = Object.defineProperty, Oi = Object.getOwnPropertyDescriptor, gs = (t, e
|
|
|
6288
6292
|
let y = class extends T {
|
|
6289
6293
|
constructor(e) {
|
|
6290
6294
|
super();
|
|
6291
|
-
d(this, "_lifecycle$", new
|
|
6295
|
+
d(this, "_lifecycle$", new j(S.Starting));
|
|
6292
6296
|
d(this, "lifecycle$", this._lifecycle$.asObservable());
|
|
6293
6297
|
d(this, "_lock", !1);
|
|
6294
6298
|
this._logService = e, this._reportProgress(S.Starting);
|
|
@@ -6347,7 +6351,8 @@ Tt = gs([
|
|
|
6347
6351
|
class It extends T {
|
|
6348
6352
|
constructor() {
|
|
6349
6353
|
super();
|
|
6350
|
-
d(this, "_currentLocale", ut.ZH_CN);
|
|
6354
|
+
d(this, "_currentLocale$", new j(ut.ZH_CN));
|
|
6355
|
+
d(this, "currentLocale$", this._currentLocale$.asObservable());
|
|
6351
6356
|
d(this, "_locales", null);
|
|
6352
6357
|
d(this, "localeChanged$", new H());
|
|
6353
6358
|
/**
|
|
@@ -6389,6 +6394,9 @@ class It extends T {
|
|
|
6389
6394
|
});
|
|
6390
6395
|
this.disposeWithMe(b(() => this.localeChanged$.complete()));
|
|
6391
6396
|
}
|
|
6397
|
+
get _currentLocale() {
|
|
6398
|
+
return this._currentLocale$.value;
|
|
6399
|
+
}
|
|
6392
6400
|
/**
|
|
6393
6401
|
* Load more locales after init.
|
|
6394
6402
|
*
|
|
@@ -6399,7 +6407,7 @@ class It extends T {
|
|
|
6399
6407
|
this._locales = R.deepMerge((n = this._locales) != null ? n : {}, s);
|
|
6400
6408
|
}
|
|
6401
6409
|
setLocale(s) {
|
|
6402
|
-
this._currentLocale
|
|
6410
|
+
this._currentLocale$.next(s), this.localeChanged$.next();
|
|
6403
6411
|
}
|
|
6404
6412
|
getLocales() {
|
|
6405
6413
|
var s;
|
|
@@ -6417,13 +6425,13 @@ class It extends T {
|
|
|
6417
6425
|
return null;
|
|
6418
6426
|
}
|
|
6419
6427
|
}
|
|
6420
|
-
const ge =
|
|
6428
|
+
const ge = $("resource-manager-service");
|
|
6421
6429
|
var Ai = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, Ni = (t, e, s, n) => {
|
|
6422
6430
|
for (var r = n > 1 ? void 0 : n ? Ii(e, s) : e, i = t.length - 1, o; i >= 0; i--)
|
|
6423
6431
|
(o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
|
|
6424
6432
|
return n && r && Ai(e, s, r), r;
|
|
6425
6433
|
}, xe = (t, e) => (s, n) => e(s, n, t);
|
|
6426
|
-
const Es =
|
|
6434
|
+
const Es = $("univer.permission-service");
|
|
6427
6435
|
let Nt = class extends T {
|
|
6428
6436
|
constructor(e, s) {
|
|
6429
6437
|
super();
|
|
@@ -6437,7 +6445,7 @@ let Nt = class extends T {
|
|
|
6437
6445
|
});
|
|
6438
6446
|
d(this, "addPermissionPoint", (e, s) => {
|
|
6439
6447
|
const n = this._permissionPointMap.get(e) || /* @__PURE__ */ new Map();
|
|
6440
|
-
return n.has(s.id) ? !1 : (n.set(s.id, new
|
|
6448
|
+
return n.has(s.id) ? !1 : (n.set(s.id, new j(s)), this._permissionPointMap.set(e, n), !0);
|
|
6441
6449
|
});
|
|
6442
6450
|
d(this, "updatePermissionPoint", (e, s, n) => {
|
|
6443
6451
|
const r = this._permissionPointMap.get(e);
|
|
@@ -6676,13 +6684,13 @@ ne = Mi([
|
|
|
6676
6684
|
He(0, P(ge)),
|
|
6677
6685
|
He(1, P(Q))
|
|
6678
6686
|
], ne);
|
|
6679
|
-
const Rs =
|
|
6687
|
+
const Rs = $("resource-loader-service");
|
|
6680
6688
|
fs(S.Ready, Rs);
|
|
6681
6689
|
class ms extends T {
|
|
6682
6690
|
constructor() {
|
|
6683
6691
|
super();
|
|
6684
6692
|
d(this, "_currentTheme");
|
|
6685
|
-
d(this, "_currentTheme$", new
|
|
6693
|
+
d(this, "_currentTheme$", new j({}));
|
|
6686
6694
|
d(this, "currentTheme$", this._currentTheme$.asObservable());
|
|
6687
6695
|
this.disposeWithMe(b(() => this._currentTheme$.complete()));
|
|
6688
6696
|
}
|
|
@@ -6708,7 +6716,7 @@ var xi = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, Hi = (t, e
|
|
|
6708
6716
|
(o = t[i]) && (r = (n ? o(e, s, r) : o(r)) || r);
|
|
6709
6717
|
return n && r && xi(e, s, r), r;
|
|
6710
6718
|
}, Yt = (t, e) => (s, n) => e(s, n, t);
|
|
6711
|
-
const Ee =
|
|
6719
|
+
const Ee = $("univer.undo-redo.service"), Fi = 20;
|
|
6712
6720
|
class Cs {
|
|
6713
6721
|
dispose() {
|
|
6714
6722
|
}
|
|
@@ -6716,11 +6724,11 @@ class Cs {
|
|
|
6716
6724
|
return !1;
|
|
6717
6725
|
}
|
|
6718
6726
|
}
|
|
6719
|
-
const Wi = "univer.command.redo",
|
|
6727
|
+
const Wi = "univer.command.redo", $i = "univer.command.undo", Gi = new class extends Cs {
|
|
6720
6728
|
constructor() {
|
|
6721
6729
|
super(...arguments);
|
|
6722
6730
|
d(this, "type", xt.COMMAND);
|
|
6723
|
-
d(this, "id",
|
|
6731
|
+
d(this, "id", $i);
|
|
6724
6732
|
}
|
|
6725
6733
|
async handler(e) {
|
|
6726
6734
|
const s = e.get(Ee), n = s.pitchTopUndoElement();
|
|
@@ -6729,7 +6737,7 @@ const Wi = "univer.command.redo", Gi = "univer.command.undo", Bi = new class ext
|
|
|
6729
6737
|
const r = e.get(Pt);
|
|
6730
6738
|
return Je(n.undoMutations, r) ? (s.popUndoToRedo(), !0) : !1;
|
|
6731
6739
|
}
|
|
6732
|
-
}(),
|
|
6740
|
+
}(), Bi = new class extends Cs {
|
|
6733
6741
|
constructor() {
|
|
6734
6742
|
super(...arguments);
|
|
6735
6743
|
d(this, "type", xt.COMMAND);
|
|
@@ -6747,12 +6755,12 @@ let re = class extends T {
|
|
|
6747
6755
|
constructor(e, s, n) {
|
|
6748
6756
|
super();
|
|
6749
6757
|
d(this, "undoRedoStatus$");
|
|
6750
|
-
d(this, "_undoRedoStatus$", new
|
|
6758
|
+
d(this, "_undoRedoStatus$", new j({ undos: 0, redos: 0 }));
|
|
6751
6759
|
// Undo and redo stacks are per unit.
|
|
6752
6760
|
d(this, "_undoStacks", /* @__PURE__ */ new Map());
|
|
6753
6761
|
d(this, "_redoStacks", /* @__PURE__ */ new Map());
|
|
6754
6762
|
d(this, "_batchingStatus", /* @__PURE__ */ new Map());
|
|
6755
|
-
this._univerInstanceService = e, this._commandService = s, this._contextService = n, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(
|
|
6763
|
+
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())));
|
|
6756
6764
|
}
|
|
6757
6765
|
pushUndoRedo(e) {
|
|
6758
6766
|
const { unitID: s } = e, n = this._getRedoStack(s, !0), r = this._getUndoStack(s, !0);
|
|
@@ -7051,6 +7059,15 @@ class yi {
|
|
|
7051
7059
|
d(this, "_model", /* @__PURE__ */ new Map());
|
|
7052
7060
|
d(this, "_userChange$", new H());
|
|
7053
7061
|
d(this, "userChange$", this._userChange$.asObservable());
|
|
7062
|
+
d(this, "_currentUser");
|
|
7063
|
+
d(this, "_currentUser$", new j(null));
|
|
7064
|
+
d(this, "currentUser$", this._currentUser$.asObservable());
|
|
7065
|
+
}
|
|
7066
|
+
getCurrentUser() {
|
|
7067
|
+
return this._currentUser;
|
|
7068
|
+
}
|
|
7069
|
+
setCurrentUser(e) {
|
|
7070
|
+
this._currentUser = e, this.addUser(e), this._currentUser$.next(e);
|
|
7054
7071
|
}
|
|
7055
7072
|
addUser(e) {
|
|
7056
7073
|
this._model.set(e.userID, e), this._userChange$.next({ type: "add", user: e });
|
|
@@ -7195,13 +7212,13 @@ function eo(t) {
|
|
|
7195
7212
|
function Wu(t) {
|
|
7196
7213
|
return eo(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
|
|
7197
7214
|
}
|
|
7198
|
-
function
|
|
7215
|
+
function $u(t) {
|
|
7199
7216
|
return ["true", "false"].includes(t.toLowerCase());
|
|
7200
7217
|
}
|
|
7201
|
-
function
|
|
7218
|
+
function Gu(t, e) {
|
|
7202
7219
|
return e.forEach((s) => t.add(s)), t;
|
|
7203
7220
|
}
|
|
7204
|
-
function
|
|
7221
|
+
function Bu(t, e = 16) {
|
|
7205
7222
|
let s = 0, n = null;
|
|
7206
7223
|
return function(...i) {
|
|
7207
7224
|
const o = Date.now();
|
|
@@ -7270,7 +7287,7 @@ class We {
|
|
|
7270
7287
|
return [];
|
|
7271
7288
|
}
|
|
7272
7289
|
}
|
|
7273
|
-
function
|
|
7290
|
+
function $e(t) {
|
|
7274
7291
|
return Object.keys(t).length === 1;
|
|
7275
7292
|
}
|
|
7276
7293
|
class Re {
|
|
@@ -7345,7 +7362,7 @@ class Re {
|
|
|
7345
7362
|
return this._actions.unshift(r), this;
|
|
7346
7363
|
if (n.t === A.RETAIN && r.t === A.RETAIN && n.body == null && r.body == null)
|
|
7347
7364
|
return n.len += r.len, this;
|
|
7348
|
-
if (n.t === A.INSERT &&
|
|
7365
|
+
if (n.t === A.INSERT && $e(n.body) && r.t === A.INSERT && $e(r.body))
|
|
7349
7366
|
return n.len += r.len, n.body.dataStream += r.body.dataStream, this;
|
|
7350
7367
|
}
|
|
7351
7368
|
return s === this._actions.length ? this._actions.push(r) : this._actions.splice(s, 0, r), this;
|
|
@@ -7404,7 +7421,7 @@ class ju extends ce {
|
|
|
7404
7421
|
makeObserverBottomPriority() {
|
|
7405
7422
|
}
|
|
7406
7423
|
}
|
|
7407
|
-
const Ku =
|
|
7424
|
+
const Ku = $("ILocalStorageService");
|
|
7408
7425
|
function Yu(t) {
|
|
7409
7426
|
return `sheet_interceptor_${t}`;
|
|
7410
7427
|
}
|
|
@@ -7444,7 +7461,7 @@ class zu {
|
|
|
7444
7461
|
return this._interceptorPoints;
|
|
7445
7462
|
}
|
|
7446
7463
|
}
|
|
7447
|
-
const Xu =
|
|
7464
|
+
const Xu = $(
|
|
7448
7465
|
"univer.snapshot-server-service"
|
|
7449
7466
|
);
|
|
7450
7467
|
class Ju {
|
|
@@ -7558,7 +7575,7 @@ function ro(t) {
|
|
|
7558
7575
|
const e = R.deepClone(t);
|
|
7559
7576
|
return delete e.id, delete e.rev, delete e.title, delete e.resources, Ht.encode(JSON.stringify(e));
|
|
7560
7577
|
}
|
|
7561
|
-
function
|
|
7578
|
+
function Ge(t) {
|
|
7562
7579
|
return JSON.parse(me.decode(t));
|
|
7563
7580
|
}
|
|
7564
7581
|
function io(t) {
|
|
@@ -7669,8 +7686,8 @@ async function Qu(t, e, s, n, r) {
|
|
|
7669
7686
|
)
|
|
7670
7687
|
);
|
|
7671
7688
|
if (v.some((M) => {
|
|
7672
|
-
var
|
|
7673
|
-
return ((
|
|
7689
|
+
var K;
|
|
7690
|
+
return ((K = M.error) == null ? void 0 : K.code) !== W.OK;
|
|
7674
7691
|
}))
|
|
7675
7692
|
return !1;
|
|
7676
7693
|
i[g] = {
|
|
@@ -7719,7 +7736,7 @@ function yu(t, e, s) {
|
|
|
7719
7736
|
throw new Error("");
|
|
7720
7737
|
const r = {};
|
|
7721
7738
|
Object.entries(n.sheets).forEach(([a, l]) => {
|
|
7722
|
-
const c =
|
|
7739
|
+
const c = Ge(l.originalMeta);
|
|
7723
7740
|
r[a] = {
|
|
7724
7741
|
id: l.id,
|
|
7725
7742
|
name: l.name,
|
|
@@ -7752,7 +7769,7 @@ function yu(t, e, s) {
|
|
|
7752
7769
|
});
|
|
7753
7770
|
});
|
|
7754
7771
|
});
|
|
7755
|
-
const o =
|
|
7772
|
+
const o = Ge(n.originalMeta);
|
|
7756
7773
|
return {
|
|
7757
7774
|
id: t.unitID,
|
|
7758
7775
|
rev: n.rev,
|
|
@@ -7838,20 +7855,20 @@ export {
|
|
|
7838
7855
|
We as ActionIterator,
|
|
7839
7856
|
Pn as AlignTypeH,
|
|
7840
7857
|
Hn as AlignTypeV,
|
|
7841
|
-
|
|
7858
|
+
Bs as AutoFillSeries,
|
|
7842
7859
|
ct as BaselineOffset,
|
|
7843
7860
|
Rn as BlockType,
|
|
7844
7861
|
C as BooleanNumber,
|
|
7845
7862
|
w as BorderStyleTypes,
|
|
7846
7863
|
ks as BorderType,
|
|
7847
|
-
|
|
7864
|
+
J as BulletAlignment,
|
|
7848
7865
|
Ce as COLORS,
|
|
7849
7866
|
nt as CellValueType,
|
|
7850
7867
|
Ju as ClientSnapshotServerService,
|
|
7851
7868
|
rt as Color,
|
|
7852
7869
|
ae as ColorBuilder,
|
|
7853
|
-
|
|
7854
|
-
|
|
7870
|
+
B as ColorKit,
|
|
7871
|
+
G as ColorType,
|
|
7855
7872
|
On as ColumnSeparatorType,
|
|
7856
7873
|
yt as CommandService,
|
|
7857
7874
|
xt as CommandType,
|
|
@@ -7962,7 +7979,7 @@ export {
|
|
|
7962
7979
|
le as Observer,
|
|
7963
7980
|
_s as OnLifecycle,
|
|
7964
7981
|
Eu as PRESET_LIST_TYPE,
|
|
7965
|
-
|
|
7982
|
+
$n as PageElementType,
|
|
7966
7983
|
Wn as PageOrientType,
|
|
7967
7984
|
ke as PageType,
|
|
7968
7985
|
In as ParagraphElementType,
|
|
@@ -7980,13 +7997,13 @@ export {
|
|
|
7980
7997
|
No as RGB_PAREN,
|
|
7981
7998
|
it as Range,
|
|
7982
7999
|
Z as Rectangle,
|
|
7983
|
-
|
|
8000
|
+
Bi as RedoCommand,
|
|
7984
8001
|
Wi as RedoCommandId,
|
|
7985
8002
|
eu as RefAlias,
|
|
7986
8003
|
Ze as Registry,
|
|
7987
8004
|
Qe as RegistryAsMap,
|
|
7988
8005
|
Zs as RelativeDate,
|
|
7989
|
-
|
|
8006
|
+
Gn as RelativeSlideLink,
|
|
7990
8007
|
vi as ResourceManagerService,
|
|
7991
8008
|
Zt as RgbColor,
|
|
7992
8009
|
Xo as RxDisposable,
|
|
@@ -8009,8 +8026,8 @@ export {
|
|
|
8009
8026
|
ue as ThemeColors,
|
|
8010
8027
|
ms as ThemeService,
|
|
8011
8028
|
R as Tools,
|
|
8012
|
-
|
|
8013
|
-
|
|
8029
|
+
Gi as UndoCommand,
|
|
8030
|
+
$i as UndoCommandId,
|
|
8014
8031
|
de as UnitModel,
|
|
8015
8032
|
xu as Univer,
|
|
8016
8033
|
Kt as UniverEditablePermission,
|
|
@@ -8030,8 +8047,8 @@ export {
|
|
|
8030
8047
|
gu as afterInitApply,
|
|
8031
8048
|
Os as b64DecodeUnicode,
|
|
8032
8049
|
qu as b64EncodeUnicode,
|
|
8033
|
-
|
|
8034
|
-
|
|
8050
|
+
$s as binarySearchArray,
|
|
8051
|
+
Bo as cellToRange,
|
|
8035
8052
|
Fn as characterSpacingControlType,
|
|
8036
8053
|
ko as checkForSubstrings,
|
|
8037
8054
|
Vo as checkParagraphHasBullet,
|
|
@@ -8054,13 +8071,13 @@ export {
|
|
|
8054
8071
|
vr as fromCallback,
|
|
8055
8072
|
zo as fromObservable,
|
|
8056
8073
|
Zu as generateTemporarySnap,
|
|
8057
|
-
|
|
8074
|
+
q as getArrayLength,
|
|
8058
8075
|
cs as getBodySlice,
|
|
8059
|
-
|
|
8060
|
-
|
|
8076
|
+
Bt as getBodySliceHtml,
|
|
8077
|
+
$o as getBorderStyleType,
|
|
8061
8078
|
vo as getCellValueType,
|
|
8062
8079
|
V as getColorStyle,
|
|
8063
|
-
|
|
8080
|
+
$t as getDocsUpdateBody,
|
|
8064
8081
|
Io as getReverseDirection,
|
|
8065
8082
|
sa as getSheetBlocksFromSnapshot,
|
|
8066
8083
|
tu as getTypeFromPermissionItemList,
|
|
@@ -8073,7 +8090,7 @@ export {
|
|
|
8073
8090
|
Le as insertMatrixArray,
|
|
8074
8091
|
qn as insertTextToContent,
|
|
8075
8092
|
So as isBlackColor,
|
|
8076
|
-
|
|
8093
|
+
$u as isBooleanString,
|
|
8077
8094
|
To as isCellV,
|
|
8078
8095
|
xo as isEmptyCell,
|
|
8079
8096
|
Ho as isFormulaId,
|
|
@@ -8088,19 +8105,19 @@ export {
|
|
|
8088
8105
|
Wu as isSafeNumeric,
|
|
8089
8106
|
Xn as isSameStyleTextRun,
|
|
8090
8107
|
Hu as isUnitRangesEqual,
|
|
8091
|
-
|
|
8108
|
+
Go as isValidRange,
|
|
8092
8109
|
Lo as isWhiteColor,
|
|
8093
8110
|
po as makeCellRangeToRangeData,
|
|
8094
8111
|
Do as makeCellToSelection,
|
|
8095
8112
|
Qi as mergeOverrideWithDependencies,
|
|
8096
|
-
|
|
8113
|
+
Gu as mergeSets,
|
|
8097
8114
|
ii as mergeWorksheetSnapshotWithDefault,
|
|
8098
8115
|
ve as moveMatrixArray,
|
|
8099
8116
|
_u as moveRangeByOffset,
|
|
8100
8117
|
ts as normalizeTextRuns,
|
|
8101
8118
|
nu as numberToABC,
|
|
8102
8119
|
ru as numberToListABC,
|
|
8103
|
-
|
|
8120
|
+
Gs as orderSearchArray,
|
|
8104
8121
|
du as queryObjectMatrix,
|
|
8105
8122
|
he as remove,
|
|
8106
8123
|
hr as repeatStringNumTimes,
|
|
@@ -8122,7 +8139,7 @@ export {
|
|
|
8122
8139
|
be as spliceArray,
|
|
8123
8140
|
me as textDecoder,
|
|
8124
8141
|
Ht as textEncoder,
|
|
8125
|
-
|
|
8142
|
+
Bu as throttle,
|
|
8126
8143
|
b as toDisposable,
|
|
8127
8144
|
ea as transformDocumentDataToSnapshot,
|
|
8128
8145
|
ta as transformSnapshotToDocumentData,
|