@univerjs/core 0.2.3 → 0.2.4
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 +8 -8
- package/lib/es/index.js +1061 -1010
- package/lib/types/common/__tests__/url.spec.d.ts +16 -0
- package/lib/types/common/url.d.ts +1 -0
- package/lib/types/docs/data-model/document-data-model.d.ts +2 -1
- package/lib/types/docs/data-model/preset-list-type.d.ts +3 -29
- package/lib/types/docs/data-model/text-x/text-x.d.ts +1 -0
- package/lib/types/docs/data-model/text-x/utils.d.ts +6 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/services/authz-io/authz-io-local.service.d.ts +1 -0
- package/lib/types/services/user-manager/user-manager.service.d.ts +1 -0
- package/lib/types/shared/lifecycle.d.ts +7 -0
- package/lib/types/shared/tools.d.ts +7 -0
- package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +10 -0
- package/lib/types/types/interfaces/i-document-data.d.ts +32 -21
- package/lib/types/types/interfaces/i-range.d.ts +15 -2
- package/lib/types/types/interfaces/index.d.ts +1 -0
- package/lib/umd/index.js +8 -8
- package/package.json +7 -7
package/lib/es/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var g = (t, e, n) =>
|
|
4
|
-
import { Subject as Yt, Observable as ts, filter as Fn, merge as zs, timer as
|
|
5
|
-
import { filter as
|
|
1
|
+
var Br = Object.defineProperty;
|
|
2
|
+
var Gr = (t, e, n) => e in t ? Br(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var g = (t, e, n) => Gr(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { Subject as Yt, Observable as ts, filter as Fn, merge as zs, timer as jr, BehaviorSubject as te, map as Vr, distinctUntilChanged as Kr, skip as Xs, of as Ze, combineLatest as Yr } from "rxjs";
|
|
5
|
+
import { filter as zr, debounceTime as Xr, first as qr, map as Zr } from "rxjs/operators";
|
|
6
6
|
import { createIdentifier as zt, Inject as ie, Injector as we } from "@wendellhu/redi";
|
|
7
|
-
function
|
|
7
|
+
function Jr(t, e) {
|
|
8
8
|
for (var n = 0; n < e.length; n++) {
|
|
9
9
|
const s = e[n];
|
|
10
10
|
if (typeof s != "string" && !Array.isArray(s)) {
|
|
@@ -20,11 +20,11 @@ function Zr(t, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
23
|
+
function Qr() {
|
|
24
|
+
ti();
|
|
25
25
|
}
|
|
26
26
|
const Je = typeof global < "u" ? global : typeof self < "u" ? self : window;
|
|
27
|
-
function
|
|
27
|
+
function ti() {
|
|
28
28
|
typeof Je.requestIdleCallback != "function" && (Je.requestIdleCallback = function(n) {
|
|
29
29
|
const s = Date.now();
|
|
30
30
|
return setTimeout(function() {
|
|
@@ -40,14 +40,14 @@ function Qr() {
|
|
|
40
40
|
clearTimeout(n);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
43
|
+
const eu = "__default_document_sub_component_id20231101__", Qe = 2, ei = 1;
|
|
44
|
+
function nu(t, e) {
|
|
45
45
|
if (e == null || t == null)
|
|
46
46
|
return !0;
|
|
47
47
|
const { left: n = 0, top: s = 0, height: r = 0, width: i = 0, angle: o = 0 } = e, { left: l = 0, top: a = 0, height: h = 0, width: c = 0, angle: u = 0 } = t, d = c, f = h, m = i, p = r;
|
|
48
|
-
return Math.abs(l - n) > Qe || Math.abs(a - s) > Qe || Math.abs(d - m) > Qe || Math.abs(f - p) > Qe || Math.abs(u - o) >
|
|
48
|
+
return Math.abs(l - n) > Qe || Math.abs(a - s) > Qe || Math.abs(d - m) > Qe || Math.abs(f - p) > Qe || Math.abs(u - o) > ei;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ni(t, e) {
|
|
51
51
|
let n = 0, s = t.length - 1;
|
|
52
52
|
for (; n <= s; ) {
|
|
53
53
|
const r = Math.floor((s + n) / 2);
|
|
@@ -62,7 +62,7 @@ function ei(t, e) {
|
|
|
62
62
|
}
|
|
63
63
|
return -1;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function si(t, e) {
|
|
66
66
|
let n = 0, s = 0, r = 0, i = -1, o = t.length - 1;
|
|
67
67
|
for (; n < t.length && o >= 0 && o >= n; ) {
|
|
68
68
|
if (s = t[o], o === 0 ? r = 0 : r = t[o - 1], e >= r && e <= s) {
|
|
@@ -77,16 +77,16 @@ function ni(t, e) {
|
|
|
77
77
|
}
|
|
78
78
|
return i;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function su(t, e) {
|
|
81
81
|
let n = t.length - 1;
|
|
82
|
-
return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[n - 20] ? n =
|
|
82
|
+
return e < 0 ? -1 : e < t[0] ? 0 : e > t[t.length - 1] ? Number.POSITIVE_INFINITY : (t.length < 40 || e <= t[20] || e >= t[n - 20] ? n = si(t, e) : n = ni(t, e), n);
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ru(t) {
|
|
85
85
|
const e = new Blob([t], { type: "text/javascript" });
|
|
86
86
|
return window.URL.createObjectURL(e);
|
|
87
87
|
}
|
|
88
|
-
var
|
|
89
|
-
function
|
|
88
|
+
var ri = /* @__PURE__ */ ((t) => (t[t.DEFAULT_SERIES = 0] = "DEFAULT_SERIES", t[t.ALTERNATE_SERIES = 1] = "ALTERNATE_SERIES", t))(ri || {}), dt = /* @__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))(dt || {}), ii = /* @__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))(ii || {}), Qt = /* @__PURE__ */ ((t) => (t[t.UNSUPPORTED = 0] = "UNSUPPORTED", t[t.RGB = 1] = "RGB", t[t.HEX = 2] = "HEX", t[t.THEME = 3] = "THEME", t))(Qt || {}), oi = /* @__PURE__ */ ((t) => (t[t.ON = 0] = "ON", t[t.OFF = 1] = "OFF", t))(oi || {}), li = /* @__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))(li || {}), ai = /* @__PURE__ */ ((t) => (t[t.DOCUMENT = 0] = "DOCUMENT", t[t.PROJECT = 1] = "PROJECT", t))(ai || {}), ui = /* @__PURE__ */ ((t) => (t[t.COLUMNS = 0] = "COLUMNS", t[t.ROWS = 1] = "ROWS", t))(ui || {}), ci = /* @__PURE__ */ ((t) => (t[t.UP = 0] = "UP", t[t.RIGHT = 1] = "RIGHT", t[t.DOWN = 2] = "DOWN", t[t.LEFT = 3] = "LEFT", t))(ci || {});
|
|
89
|
+
function iu(t) {
|
|
90
90
|
switch (t) {
|
|
91
91
|
case 3:
|
|
92
92
|
return 1;
|
|
@@ -98,8 +98,8 @@ function eu(t) {
|
|
|
98
98
|
return 0;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
var
|
|
102
|
-
const
|
|
101
|
+
var hi = /* @__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))(hi || {}), di = /* @__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))(di || {}), ke = /* @__PURE__ */ ((t) => (t.EN_US = "enUS", t.ZH_CN = "zhCN", t.RU_RU = "ruRU", t.ZH_TW = "zhTW", t.VI_VN = "viVN", t))(ke || {}), fi = /* @__PURE__ */ ((t) => (t[t.RANGE = 0] = "RANGE", t[t.SHEET = 1] = "SHEET", t))(fi || {}), gi = /* @__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))(gi || {}), es = /* @__PURE__ */ ((t) => (t[t.GRID = 0] = "GRID", t[t.KANBAN = 1] = "KANBAN", t[t.GANTT = 2] = "GANTT", t))(es || {}), hn = /* @__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))(hn || {}), _i = /* @__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))(_i || {}), Me = /* @__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))(Me || {}), We = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.TOP = 1] = "TOP", t[t.MIDDLE = 2] = "MIDDLE", t[t.BOTTOM = 3] = "BOTTOM", t))(We || {}), Ke = /* @__PURE__ */ ((t) => (t[t.UNSPECIFIED = 0] = "UNSPECIFIED", t[t.OVERFLOW = 1] = "OVERFLOW", t[t.CLIP = 2] = "CLIP", t[t.WRAP = 3] = "WRAP", t))(Ke || {}), $n = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ITALIC = 1] = "ITALIC", t))($n || {}), Wn = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.BOLD = 1] = "BOLD", t))(Wn || {}), Ye = /* @__PURE__ */ ((t) => (t[t.NORMAL = 1] = "NORMAL", t[t.SUBSCRIPT = 2] = "SUBSCRIPT", t[t.SUPERSCRIPT = 3] = "SUPERSCRIPT", t))(Ye || {}), Y = /* @__PURE__ */ ((t) => (t[t.FALSE = 0] = "FALSE", t[t.TRUE = 1] = "TRUE", t))(Y || {}), Le = /* @__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))(Le || {}), kt = /* @__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))(kt || {}), ns = /* @__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))(ns || {}), mi = /* @__PURE__ */ ((t) => (t.Line = "line", t.LineInv = "lineInv", t.Triangle = "triangle", t.RtTriangle = "rtTriangle", t.Rect = "rect", t.Diamond = "diamond", t.Parallelogram = "parallelogram", t.Trapezoid = "trapezoid", t.NonIsocelesTrapezoid = "nonIsocelesTrapezoid", t.Pentagon = "pentagon", t.Hexagon = "hexagon", t.Heptagon = "heptagon", t.Octagon = "octagon", t.Decagon = "decagon", t.Dodecagon = "dodecagon", t.Star4 = "star4", t.Star5 = "star5", t.Star6 = "star6", t.Star7 = "star7", t.Star8 = "star8", t.Star10 = "star10", t.Star12 = "star12", t.Star16 = "star16", t.Star24 = "star24", t.Star32 = "star32", t.RoundRect = "roundRect", t.Round1Rect = "round1Rect", t.Round2SameRect = "round2SameRect", t.Round2DiagRect = "round2DiagRect", t.Ellipse = "ellipse", t))(mi || {}), pi = /* @__PURE__ */ ((t) => (t.RightArrow = "rightArrow", t.LeftArrow = "leftArrow", t.UpArrow = "upArrow", t.DownArrow = "downArrow", t.LeftRightArrow = "leftRightArrow", t.UpDownArrow = "upDownArrow", t.QuadArrow = "quadArrow", t.LeftRightUpArrow = "leftRightUpArrow", t.BentArrow = "bentArrow", t.UturnArrow = "uturnArrow", t.CircularArrow = "circularArrow", t.NotchedRightArrow = "notchedRightArrow", t.HomePlate = "homePlate", t.Chevron = "chevron", t.LeftCircularArrow = "leftCircularArrow", t.LeftRightCircularArrow = "leftRightCircularArrow", t))(pi || {}), Ei = /* @__PURE__ */ ((t) => (t.Plaque = "plaque", t.Can = "can", t.Cube = "cube", t.Bevel = "bevel", t.Donut = "donut", t.NoSmoking = "noSmoking", t.BlockArc = "blockArc", t.FoldedCorner = "foldedCorner", t))(Ei || {}), Ri = /* @__PURE__ */ ((t) => (t.SmileyFace = "smileyFace", t.Heart = "heart", t.LightningBolt = "lightningBolt", t.Sun = "sun", t.Moon = "moon", t.Cloud = "cloud", t.Arc = "arc", t.Backpack = "backpack", t.Frame = "frame", t.HalfFrame = "halfFrame", t.Corner = "corner", t.Chord = "chord", t.Pie = "pie", t.Teardrop = "teardrop", t.WedgeRectCallout = "wedgeRectCallout", t.WedgeRRectCallout = "wedgeRRectCallout", t.WedgeEllipseCallout = "wedgeEllipseCallout", t.CloudCallout = "cloudCallout", t.BorderCallout1 = "borderCallout1", t.BorderCallout2 = "borderCallout2", t.BorderCallout3 = "borderCallout3", t.AccentCallout1 = "accentCallout1", t.AccentCallout2 = "accentCallout2", t.AccentCallout3 = "accentCallout3", t.Callout1 = "callout1", t.Callout2 = "callout2", t.Callout3 = "callout3", t.ActionButtonBackPrevious = "actionButtonBackPrevious", t.ActionButtonEnd = "actionButtonEnd", t.ActionButtonForwardNext = "actionButtonForwardNext", t.ActionButtonHelp = "actionButtonHelp", t.ActionButtonHome = "actionButtonHome", t.ActionButtonInformation = "actionButtonInformation", t.ActionButtonMovie = "actionButtonMovie", t.ActionButtonReturn = "actionButtonReturn", t.ActionButtonSound = "actionButtonSound", t))(Ri || {});
|
|
102
|
+
const Ci = {
|
|
103
103
|
[ns.OFFICE]: {
|
|
104
104
|
[kt.ACCENT1]: "#4472C4",
|
|
105
105
|
[kt.ACCENT2]: "#ED7D31",
|
|
@@ -196,7 +196,7 @@ class De {
|
|
|
196
196
|
return !1;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
class
|
|
199
|
+
class Ii {
|
|
200
200
|
constructor(e) {
|
|
201
201
|
g(this, "_saturation", 0);
|
|
202
202
|
g(this, "_hue", 0);
|
|
@@ -317,7 +317,7 @@ const ge = class ge extends De {
|
|
|
317
317
|
return n < 0 ? r = s * (1 + n) : r = s * (1 - n) + (255 - 255 * (1 - n)), r;
|
|
318
318
|
}
|
|
319
319
|
asRgbColor() {
|
|
320
|
-
const n =
|
|
320
|
+
const n = Ci[this._themeColors];
|
|
321
321
|
if (n == null)
|
|
322
322
|
throw new Error("not find themeColors type");
|
|
323
323
|
const s = n[this._themeColorType];
|
|
@@ -329,7 +329,7 @@ const ge = class ge extends De {
|
|
|
329
329
|
return r.get(this._themeColorType);
|
|
330
330
|
} else
|
|
331
331
|
r = /* @__PURE__ */ new Map(), ge._cacheThemeColor.set(this._themeColors, r);
|
|
332
|
-
const i = new
|
|
332
|
+
const i = new Ii(De.hexValueToRgbColor(s));
|
|
333
333
|
i.setLightness(this.lumValue(this._themeTint, i.getLightness() * 255) / 255);
|
|
334
334
|
const o = i.asRgbColor();
|
|
335
335
|
return r.set(this._themeColorType, o), o;
|
|
@@ -349,7 +349,7 @@ const ge = class ge extends De {
|
|
|
349
349
|
};
|
|
350
350
|
g(ge, "_cacheThemeColor", /* @__PURE__ */ new Map());
|
|
351
351
|
let Gn = ge;
|
|
352
|
-
const
|
|
352
|
+
const ou = "rgb(", lu = "rgba(", Is = {
|
|
353
353
|
aliceBlue: [240, 248, 255],
|
|
354
354
|
antiqueWhite: [250, 235, 215],
|
|
355
355
|
aqua: [0, 255, 255],
|
|
@@ -519,7 +519,7 @@ class se {
|
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
521
|
this._color = n;
|
|
522
|
-
const s =
|
|
522
|
+
const s = bi(this._color);
|
|
523
523
|
if (s == null) {
|
|
524
524
|
this._setNullColor();
|
|
525
525
|
return;
|
|
@@ -564,10 +564,10 @@ class se {
|
|
|
564
564
|
return e && l[0][0] === l[0][1] && l[1][0] === l[1][1] && l[2][0] === l[2][1] && l[3][0] === l[3][1] ? o ? `#${l[0][0]}${l[1][0]}${l[2][0]}${l[3][0]}` : `#${l[0][0]}${l[1][0]}${l[2][0]}` : o ? `#${l[0]}${l[1]}${l[2]}${l[3]}` : `#${l[0]}${l[1]}${l[2]}`;
|
|
565
565
|
}
|
|
566
566
|
toHsv() {
|
|
567
|
-
return
|
|
567
|
+
return Mi(this.toRgb());
|
|
568
568
|
}
|
|
569
569
|
toHsl() {
|
|
570
|
-
return
|
|
570
|
+
return Ti(this.toRgb());
|
|
571
571
|
}
|
|
572
572
|
lighten(e = 10) {
|
|
573
573
|
const n = this.toHsl();
|
|
@@ -613,7 +613,7 @@ class se {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4), qs = (t) => {
|
|
616
|
-
if (
|
|
616
|
+
if (Li(t)) {
|
|
617
617
|
if ("r" in t) {
|
|
618
618
|
const s = {
|
|
619
619
|
r: Math.round(t.r),
|
|
@@ -647,14 +647,14 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
647
647
|
return s.a = n[3] || 1, s;
|
|
648
648
|
}
|
|
649
649
|
if (e.startsWith("#"))
|
|
650
|
-
return Ii(e);
|
|
651
|
-
if (e.startsWith("rgb"))
|
|
652
650
|
return Oi(e);
|
|
653
|
-
if (e.startsWith("
|
|
651
|
+
if (e.startsWith("rgb"))
|
|
654
652
|
return Ni(e);
|
|
655
|
-
if (e.startsWith("
|
|
653
|
+
if (e.startsWith("hsl"))
|
|
656
654
|
return Si(e);
|
|
657
|
-
|
|
655
|
+
if (e.startsWith("hsv"))
|
|
656
|
+
return wi(e);
|
|
657
|
+
}, Oi = (t) => {
|
|
658
658
|
const e = t.substring(1), n = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g");
|
|
659
659
|
let s = e.match(n);
|
|
660
660
|
if (!s || s.length < 3)
|
|
@@ -666,7 +666,7 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
666
666
|
b: Number.parseInt(s[2], 16)
|
|
667
667
|
};
|
|
668
668
|
return s.length > 3 && (r.a = Number.parseInt(s[3], 16) / 255), r;
|
|
669
|
-
},
|
|
669
|
+
}, Ni = (t) => {
|
|
670
670
|
const e = t.indexOf("(");
|
|
671
671
|
if (e === -1)
|
|
672
672
|
throw new Error(`The color '${t}' is illegal rgb color`);
|
|
@@ -679,7 +679,7 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
679
679
|
b: Number.parseInt(n[2], 10)
|
|
680
680
|
};
|
|
681
681
|
return n.length > 3 && (s.a = Number.parseFloat(n[3])), s;
|
|
682
|
-
},
|
|
682
|
+
}, Si = (t) => {
|
|
683
683
|
const e = t.indexOf("(");
|
|
684
684
|
if (e === -1)
|
|
685
685
|
throw new Error(`The color '${t}' is illegal hsl color`);
|
|
@@ -692,7 +692,7 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
692
692
|
l: Number.parseFloat(n[2])
|
|
693
693
|
};
|
|
694
694
|
return n.length > 3 && (s.a = Number.parseFloat(n[3])), s;
|
|
695
|
-
},
|
|
695
|
+
}, wi = (t) => {
|
|
696
696
|
const e = t.indexOf("(");
|
|
697
697
|
if (e === -1)
|
|
698
698
|
throw new Error(`The color '${t}' is illegal hsv color`);
|
|
@@ -705,11 +705,11 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
705
705
|
v: Number.parseFloat(n[2])
|
|
706
706
|
};
|
|
707
707
|
return n.length > 3 && (s.a = Number.parseFloat(n[3])), s;
|
|
708
|
-
},
|
|
708
|
+
}, bi = (t) => {
|
|
709
709
|
const e = qs(t);
|
|
710
710
|
if (e != null)
|
|
711
|
-
return "r" in e ? e : "l" in e ?
|
|
712
|
-
}, vn = (t, e, n) => (n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t),
|
|
711
|
+
return "r" in e ? e : "l" in e ? Ai(e) : vi(e);
|
|
712
|
+
}, vn = (t, e, n) => (n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t), Ai = (t) => {
|
|
713
713
|
let { h: e, s: n, l: s } = t;
|
|
714
714
|
e /= 360, n /= 100, s /= 100;
|
|
715
715
|
let r = 0, i = 0, o = 0;
|
|
@@ -725,7 +725,7 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
725
725
|
b: Math.round(o * 255)
|
|
726
726
|
};
|
|
727
727
|
return t.a !== void 0 && (l.a = t.a), l;
|
|
728
|
-
},
|
|
728
|
+
}, vi = (t) => {
|
|
729
729
|
let { h: e, s: n, v: s } = t;
|
|
730
730
|
e = e / 360 * 6, n /= 100, s /= 100;
|
|
731
731
|
const r = Math.floor(e), i = e - r, o = s * (1 - n), l = s * (1 - i * n), a = s * (1 - (1 - i) * n), h = r % 6, c = [s, l, o, o, a, s][h], u = [a, s, s, l, o, o][h], d = [o, o, a, s, s, l][h], f = {
|
|
@@ -734,7 +734,7 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
734
734
|
b: d * 255
|
|
735
735
|
};
|
|
736
736
|
return t.a !== void 0 && (f.a = t.a), f;
|
|
737
|
-
},
|
|
737
|
+
}, Ti = (t) => {
|
|
738
738
|
let { r: e, g: n, b: s } = t;
|
|
739
739
|
e /= 255, n /= 255, s /= 255;
|
|
740
740
|
const r = Math.max(e, n, s), i = Math.min(e, n, s), o = (r + i) / 2;
|
|
@@ -762,7 +762,7 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
762
762
|
l: Math.round(o * 100)
|
|
763
763
|
};
|
|
764
764
|
return t.a !== void 0 && (h.a = t.a), h;
|
|
765
|
-
},
|
|
765
|
+
}, Mi = (t) => {
|
|
766
766
|
let { r: e, g: n, b: s } = t;
|
|
767
767
|
e /= 255, n /= 255, s /= 255;
|
|
768
768
|
const r = Math.max(e, n, s), i = Math.min(e, n, s);
|
|
@@ -790,20 +790,20 @@ const tn = (t) => t.length === 1 ? `0${t}` : t, An = (t) => (t /= 255, t <= 0.03
|
|
|
790
790
|
v: Math.round(l * 100)
|
|
791
791
|
};
|
|
792
792
|
return t.a !== void 0 && (c.a = t.a), c;
|
|
793
|
-
},
|
|
794
|
-
function
|
|
793
|
+
}, Ui = (t) => t == null, Li = (t) => !Ui(t) && typeof t == "object";
|
|
794
|
+
function au(t) {
|
|
795
795
|
const e = /^#(?:[0]{3}|[0]{6})\b/, n = /^rgb\s*\(\s*0+\s*,\s*0+\s*,\s*0+\s*\)$/, s = /^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+)\)$/;
|
|
796
796
|
return !!(e.test(t) || n.test(t) || s.test(t) || r.test(t) || i.test(t));
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function uu(t) {
|
|
799
799
|
const e = /^#(?:[Ff]{3}|[Ff]{6})\b/, n = /^rgb\s*\(\s*255\s*,\s*255\s*,\s*255\s*\)$/, s = /^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+)\)$/;
|
|
800
800
|
return !!(e.test(t) || n.test(t) || s.test(t) || r.test(t) || i.test(t));
|
|
801
801
|
}
|
|
802
802
|
var Pt = /* @__PURE__ */ ((t) => (t[t.COVER = 0] = "COVER", t[t.REPLACE = 1] = "REPLACE", t[t.INTERSECTION = 2] = "INTERSECTION", t))(Pt || {});
|
|
803
|
-
function
|
|
803
|
+
function cu(t) {
|
|
804
804
|
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);
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function hu(t) {
|
|
807
807
|
if (t.t !== void 0)
|
|
808
808
|
return t.t;
|
|
809
809
|
if (typeof t.v == "string")
|
|
@@ -813,20 +813,20 @@ function lu(t) {
|
|
|
813
813
|
if (typeof t.v == "boolean")
|
|
814
814
|
return Le.BOOLEAN;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function du(t) {
|
|
817
817
|
if (t == null)
|
|
818
818
|
return !0;
|
|
819
819
|
const { v: e, f: n, si: s, p: r, s: i, custom: o } = t;
|
|
820
820
|
return !(!(e == null || typeof e == "string" && e.length === 0) || n != null && n.length > 0 || s != null && s.length > 0 || r != null || o != null);
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function fu(t) {
|
|
823
823
|
return t != null && (typeof t == "string" || typeof t == "number" || typeof t == "boolean");
|
|
824
824
|
}
|
|
825
|
-
var
|
|
826
|
-
function
|
|
825
|
+
var Di = /* @__PURE__ */ ((t) => (t[t.character = 0] = "character", t[t.paragraph = 1] = "paragraph", t[t.table = 2] = "table", t[t.numbering = 3] = "numbering", t))(Di || {}), xi = /* @__PURE__ */ ((t) => (t[t.TAB = 0] = "TAB", t[t.SPACE = 1] = "SPACE", t[t.NOTHING = 2] = "NOTHING", t))(xi || {}), on = /* @__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))(on || {}), Ie = /* @__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))(Ie || {}), Pi = /* @__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[t.UNI_FORMULA = 7] = "UNI_FORMULA", t))(Pi || {}), yi = /* @__PURE__ */ ((t) => (t[t.COMMENT = 0] = "COMMENT", t))(yi || {}), ki = /* @__PURE__ */ ((t) => (t[t.DRAWING = 0] = "DRAWING", t[t.CUSTOM = 1] = "CUSTOM", t))(ki || {}), Hi = /* @__PURE__ */ ((t) => (t[t.TRADITIONAL = 0] = "TRADITIONAL", t[t.MODERN = 1] = "MODERN", t))(Hi || {}), Fi = /* @__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))(Fi || {}), $i = /* @__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))($i || {}), Wi = /* @__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))(Wi || {}), Bi = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.TBRL = 1] = "TBRL", t[t.LRTBV = 2] = "LRTBV", t))(Bi || {}), Gi = /* @__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))(Gi || {}), ji = /* @__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))(ji || {}), Vi = /* @__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))(Vi || {}), Ki = /* @__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))(Ki || {}), Yi = /* @__PURE__ */ ((t) => (t[t.AUTO = 0] = "AUTO", t[t.AT_LEAST = 1] = "AT_LEAST", t[t.EXACT = 2] = "EXACT", t))(Yi || {}), zi = /* @__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))(zi || {}), Xi = /* @__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))(Xi || {}), qi = /* @__PURE__ */ ((t) => (t.EVENLY_DISTRIBUTED = "0", t.FIXED_WIDTH = "1", t))(qi || {}), Zi = /* @__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))(Zi || {}), Ji = /* @__PURE__ */ ((t) => (t.NORMAL = "normal", t.BOLD = "bold", t.ITALIC = "italic", t))(Ji || {}), Qi = /* @__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))(Qi || {}), to = /* @__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))(to || {}), eo = /* @__PURE__ */ ((t) => (t[t.POINT = 0] = "POINT", t[t.LINE = 1] = "LINE", t[t.CHARACTER = 2] = "CHARACTER", t[t.PIXEL = 3] = "PIXEL", t))(eo || {}), no = /* @__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[t.BOTH = 5] = "BOTH", t[t.DISTRIBUTE = 6] = "DISTRIBUTE", t))(no || {}), so = /* @__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))(so || {}), ro = /* @__PURE__ */ ((t) => (t[t.compressPunctuation = 0] = "compressPunctuation", t[t.compressPunctuationAndJapaneseKana = 1] = "compressPunctuationAndJapaneseKana", t[t.doNotCompress = 2] = "doNotCompress", t))(ro || {}), io = /* @__PURE__ */ ((t) => (t[t.PORTRAIT = 0] = "PORTRAIT", t[t.LANDSCAPE = 1] = "LANDSCAPE", t))(io || {}), oo = /* @__PURE__ */ ((t) => (t[t.forward = 0] = "forward", t[t.backward = 1] = "backward", t[t.front = 2] = "front", t[t.back = 3] = "back", t))(oo || {}), lo = /* @__PURE__ */ ((t) => (t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t[t.DRAWING_IMAGE = 0] = "DRAWING_IMAGE", t[t.DRAWING_SHAPE = 1] = "DRAWING_SHAPE", t[t.DRAWING_CHART = 2] = "DRAWING_CHART", t[t.DRAWING_TABLE = 3] = "DRAWING_TABLE", t[t.DRAWING_SMART_ART = 4] = "DRAWING_SMART_ART", t[t.DRAWING_VIDEO = 5] = "DRAWING_VIDEO", t[t.DRAWING_GROUP = 6] = "DRAWING_GROUP", t[t.DRAWING_UNIT = 7] = "DRAWING_UNIT", t[t.DRAWING_DOM = 8] = "DRAWING_DOM", t))(lo || {}), it = /* @__PURE__ */ ((t) => (t[t.NORMAL = 0] = "NORMAL", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(it || {}), wt = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.ROW = 1] = "ROW", t[t.COLUMN = 2] = "COLUMN", t[t.ALL = 3] = "ALL", t))(wt || {});
|
|
826
|
+
function gu(t) {
|
|
827
827
|
return [t.startRow, t.startColumn, t.endRow, t.endColumn];
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function _u(t, e, n) {
|
|
830
830
|
let s = !1, r = !1, i = t, o = e, l = t, a = e;
|
|
831
831
|
if (n == null)
|
|
832
832
|
return {
|
|
@@ -866,9 +866,9 @@ function hu(t, e, n) {
|
|
|
866
866
|
startColumn: a
|
|
867
867
|
};
|
|
868
868
|
}
|
|
869
|
-
var Zs = /* @__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))(Zs || {}),
|
|
870
|
-
const
|
|
871
|
-
let
|
|
869
|
+
var Zs = /* @__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))(Zs || {}), ao = /* @__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))(ao || {}), uo = /* @__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))(uo || {});
|
|
870
|
+
const co = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
871
|
+
let ho = (t) => crypto.getRandomValues(new Uint8Array(t)), fo = (t, e, n) => {
|
|
872
872
|
let s = (2 << Math.log(t.length - 1) / Math.LN2) - 1, r = -~(1.6 * s * e / t.length);
|
|
873
873
|
return (i = e) => {
|
|
874
874
|
let o = "";
|
|
@@ -878,17 +878,29 @@ let co = (t) => crypto.getRandomValues(new Uint8Array(t)), ho = (t, e, n) => {
|
|
|
878
878
|
if (o += t[l[a] & s] || "", o.length === i) return o;
|
|
879
879
|
}
|
|
880
880
|
};
|
|
881
|
-
},
|
|
881
|
+
}, go = (t, e = 21) => fo(t, e, ho), _o = (t = 21) => {
|
|
882
882
|
let e = "", n = crypto.getRandomValues(new Uint8Array(t));
|
|
883
883
|
for (; t--; )
|
|
884
|
-
e +=
|
|
884
|
+
e += co[n[t] & 63];
|
|
885
885
|
return e;
|
|
886
886
|
};
|
|
887
|
-
const
|
|
887
|
+
const mo = new RegExp(
|
|
888
|
+
"^(?:(?:(?:https?|ftp):)?\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z0-9\\u00a1-\\uffff][a-z0-9\\u00a1-\\uffff_-]{0,62})?[a-z0-9\\u00a1-\\uffff]\\.)+(?:[a-z\\u00a1-\\uffff]{2,}\\.?))(?::\\d{2,5})?(?:[/?#]\\S*)?$",
|
|
889
|
+
"i"
|
|
890
|
+
);
|
|
888
891
|
function po(t) {
|
|
889
|
-
return Number.isNaN(+t) ? t.startsWith("http://localhost:3002") || t.startsWith("localhost:3002") ? !0 :
|
|
892
|
+
return Number.isNaN(+t) ? t.startsWith("http://localhost:3002") || t.startsWith("localhost:3002") ? !0 : mo.test(t) : !1;
|
|
890
893
|
}
|
|
891
|
-
|
|
894
|
+
function Eo(t) {
|
|
895
|
+
return /^[a-zA-Z]+:\/\//.test(t);
|
|
896
|
+
}
|
|
897
|
+
function Ro(t) {
|
|
898
|
+
return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/.test(t);
|
|
899
|
+
}
|
|
900
|
+
function Co(t) {
|
|
901
|
+
return Eo(t) ? t : Ro(t) ? `mailto://${t}` : `https://${t}`;
|
|
902
|
+
}
|
|
903
|
+
const Io = /^-ms-/, Oo = /-([a-z])/g, fe = [
|
|
892
904
|
"A",
|
|
893
905
|
"B",
|
|
894
906
|
"C",
|
|
@@ -916,7 +928,7 @@ const Eo = /^-ms-/, Ro = /-([a-z])/g, fe = [
|
|
|
916
928
|
"Y",
|
|
917
929
|
"Z"
|
|
918
930
|
];
|
|
919
|
-
class
|
|
931
|
+
class P {
|
|
920
932
|
static stringAt(e) {
|
|
921
933
|
let n = "", s = e;
|
|
922
934
|
for (; s >= fe.length; )
|
|
@@ -933,7 +945,7 @@ class x {
|
|
|
933
945
|
return n += e.charCodeAt(e.length - 1) - 65, n;
|
|
934
946
|
}
|
|
935
947
|
static deleteBlank(e) {
|
|
936
|
-
return
|
|
948
|
+
return P.isString(e) ? e.replace(/\s/g, "") : e;
|
|
937
949
|
}
|
|
938
950
|
// eslint-disable-next-line complexity
|
|
939
951
|
static getSystemType() {
|
|
@@ -961,8 +973,13 @@ class x {
|
|
|
961
973
|
}
|
|
962
974
|
return o ? "FF" : n ? "Opera" : l ? "Safari" : a ? "Chrome" : i ? "Edge" : r ? "IE11" : "Unknown browser";
|
|
963
975
|
}
|
|
976
|
+
/**
|
|
977
|
+
* Use this method without `Tools`.
|
|
978
|
+
*
|
|
979
|
+
* @deprecated
|
|
980
|
+
*/
|
|
964
981
|
static generateRandomId(e = 21, n) {
|
|
965
|
-
return
|
|
982
|
+
return No(e, n);
|
|
966
983
|
}
|
|
967
984
|
static getClassName(e) {
|
|
968
985
|
return e.constructor.name;
|
|
@@ -972,12 +989,12 @@ class x {
|
|
|
972
989
|
function s(o, l) {
|
|
973
990
|
o.forEach((a, h) => {
|
|
974
991
|
var c, u;
|
|
975
|
-
if (
|
|
992
|
+
if (P.isArray(a)) {
|
|
976
993
|
const d = (c = l[h]) != null ? c : [];
|
|
977
994
|
l[h] = d, s(a, d);
|
|
978
995
|
return;
|
|
979
996
|
}
|
|
980
|
-
if (
|
|
997
|
+
if (P.isObject(a)) {
|
|
981
998
|
const d = (u = l[h]) != null ? u : {};
|
|
982
999
|
l[h] = d, r(a, d);
|
|
983
1000
|
return;
|
|
@@ -989,12 +1006,12 @@ class x {
|
|
|
989
1006
|
Object.keys(o).forEach((a) => {
|
|
990
1007
|
var c, u;
|
|
991
1008
|
const h = o[a];
|
|
992
|
-
if (
|
|
1009
|
+
if (P.isObject(h)) {
|
|
993
1010
|
const d = (c = l[a]) != null ? c : {};
|
|
994
1011
|
l[a] = d, r(h, d);
|
|
995
1012
|
return;
|
|
996
1013
|
}
|
|
997
|
-
if (
|
|
1014
|
+
if (P.isArray(h)) {
|
|
998
1015
|
const d = (u = l[a]) != null ? u : [];
|
|
999
1016
|
l[a] = d, s(h, d);
|
|
1000
1017
|
return;
|
|
@@ -1006,12 +1023,12 @@ class x {
|
|
|
1006
1023
|
Object.keys(o).forEach((l) => {
|
|
1007
1024
|
var h, c;
|
|
1008
1025
|
const a = o[l];
|
|
1009
|
-
if (
|
|
1026
|
+
if (P.isArray(a)) {
|
|
1010
1027
|
const u = (h = e[l]) != null ? h : [];
|
|
1011
1028
|
e[l] = u, s(a, u);
|
|
1012
1029
|
return;
|
|
1013
1030
|
}
|
|
1014
|
-
if (
|
|
1031
|
+
if (P.isObject(a)) {
|
|
1015
1032
|
const u = (c = e[l]) != null ? c : {};
|
|
1016
1033
|
e[l] = u, r(a, u);
|
|
1017
1034
|
return;
|
|
@@ -1026,8 +1043,8 @@ class x {
|
|
|
1026
1043
|
}
|
|
1027
1044
|
static diffValue(e, n) {
|
|
1028
1045
|
function s(o, l) {
|
|
1029
|
-
const a =
|
|
1030
|
-
return a !== h ? !1 :
|
|
1046
|
+
const a = P.getValueType(o), h = P.getValueType(l);
|
|
1047
|
+
return a !== h ? !1 : P.isArray(o) ? r(o, l) : P.isObject(o) ? i(o, l) : P.isDate(o) ? o.getTime() === l.getTime() : P.isRegExp(o) ? o.toString() === l.toString() : o === l;
|
|
1031
1048
|
}
|
|
1032
1049
|
function r(o, l) {
|
|
1033
1050
|
if (e.length !== n.length)
|
|
@@ -1064,14 +1081,14 @@ class x {
|
|
|
1064
1081
|
if (this.isArray(e)) {
|
|
1065
1082
|
const n = [];
|
|
1066
1083
|
return e.forEach((s, r) => {
|
|
1067
|
-
n[r] =
|
|
1084
|
+
n[r] = P.deepClone(s);
|
|
1068
1085
|
}), n;
|
|
1069
1086
|
}
|
|
1070
1087
|
if (this.isObject(e)) {
|
|
1071
1088
|
const n = {};
|
|
1072
1089
|
return Object.keys(e).forEach((s) => {
|
|
1073
1090
|
const r = e[s];
|
|
1074
|
-
n[s] =
|
|
1091
|
+
n[s] = P.deepClone(r);
|
|
1075
1092
|
}), Object.setPrototypeOf(n, Object.getPrototypeOf(e)), n;
|
|
1076
1093
|
}
|
|
1077
1094
|
return e;
|
|
@@ -1148,6 +1165,9 @@ class x {
|
|
|
1148
1165
|
static isLegalUrl(e) {
|
|
1149
1166
|
return po(e);
|
|
1150
1167
|
}
|
|
1168
|
+
static normalizeUrl(e) {
|
|
1169
|
+
return Co(e);
|
|
1170
|
+
}
|
|
1151
1171
|
static itCount(e) {
|
|
1152
1172
|
return (n) => {
|
|
1153
1173
|
for (let s = 0; s < e; s++)
|
|
@@ -1155,7 +1175,7 @@ class x {
|
|
|
1155
1175
|
};
|
|
1156
1176
|
}
|
|
1157
1177
|
static hasLength(e, n) {
|
|
1158
|
-
return
|
|
1178
|
+
return P.isDefine(e) ? P.isDefine(n) ? e.length === n : e.length > 0 : !1;
|
|
1159
1179
|
}
|
|
1160
1180
|
static capitalize(e) {
|
|
1161
1181
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
@@ -1168,7 +1188,7 @@ class x {
|
|
|
1168
1188
|
// Support: IE <=9 - 11, Edge 12 - 15
|
|
1169
1189
|
// Microsoft forgot to hump their vendor prefix (#9572)
|
|
1170
1190
|
static camelCase(e) {
|
|
1171
|
-
return e.replace(
|
|
1191
|
+
return e.replace(Io, "ms-").replace(Oo, this.fCamelCase);
|
|
1172
1192
|
}
|
|
1173
1193
|
/**
|
|
1174
1194
|
* remove all null from object
|
|
@@ -1178,7 +1198,7 @@ class x {
|
|
|
1178
1198
|
static removeNull(e) {
|
|
1179
1199
|
return this.isObject(e) && Object.keys(e).forEach((n) => {
|
|
1180
1200
|
const s = e[n];
|
|
1181
|
-
s == null ? delete e[n] :
|
|
1201
|
+
s == null ? delete e[n] : P.removeNull(s);
|
|
1182
1202
|
}), e;
|
|
1183
1203
|
}
|
|
1184
1204
|
/**
|
|
@@ -1310,21 +1330,24 @@ class x {
|
|
|
1310
1330
|
return Math.max(n, Math.min(s, e));
|
|
1311
1331
|
}
|
|
1312
1332
|
}
|
|
1313
|
-
function
|
|
1333
|
+
function No(t = 21, e) {
|
|
1334
|
+
return e ? go(e, t)() : _o(t);
|
|
1335
|
+
}
|
|
1336
|
+
function mu(t) {
|
|
1314
1337
|
const { actualRow: e, actualColumn: n, isMerged: s, isMergedMainCell: r, mergeInfo: i } = t;
|
|
1315
1338
|
let { startY: o, endY: l, startX: a, endX: h } = t, c = e, u = n, d = e, f = n;
|
|
1316
1339
|
if (s && i) {
|
|
1317
1340
|
const {
|
|
1318
1341
|
startRow: m,
|
|
1319
1342
|
startColumn: p,
|
|
1320
|
-
endRow:
|
|
1321
|
-
endColumn:
|
|
1343
|
+
endRow: M,
|
|
1344
|
+
endColumn: L,
|
|
1322
1345
|
startY: Z,
|
|
1323
1346
|
endY: gt,
|
|
1324
1347
|
startX: ut,
|
|
1325
1348
|
endX: E
|
|
1326
1349
|
} = i;
|
|
1327
|
-
c = m, u = p, d =
|
|
1350
|
+
c = m, u = p, d = M, f = L, o = Z, l = gt, a = ut, h = E;
|
|
1328
1351
|
}
|
|
1329
1352
|
return r && (o = i.startY, l = i.endY, a = i.startX, h = i.endX, d = i.endRow, f = i.endColumn), {
|
|
1330
1353
|
startRow: c,
|
|
@@ -1337,7 +1360,7 @@ function du(t) {
|
|
|
1337
1360
|
endX: h
|
|
1338
1361
|
};
|
|
1339
1362
|
}
|
|
1340
|
-
function
|
|
1363
|
+
function pu(t) {
|
|
1341
1364
|
if (!t)
|
|
1342
1365
|
return;
|
|
1343
1366
|
const {
|
|
@@ -1358,12 +1381,12 @@ function fu(t) {
|
|
|
1358
1381
|
endColumn: d
|
|
1359
1382
|
};
|
|
1360
1383
|
}
|
|
1361
|
-
function
|
|
1384
|
+
function So(t) {
|
|
1362
1385
|
var n;
|
|
1363
1386
|
return !t || (((n = t == null ? void 0 : t.v) == null ? void 0 : n.toString()) || "").length === 0 && !t.p;
|
|
1364
1387
|
}
|
|
1365
|
-
function
|
|
1366
|
-
return
|
|
1388
|
+
function Eu(t) {
|
|
1389
|
+
return So(t) && (t == null ? void 0 : t.coverable) !== !1;
|
|
1367
1390
|
}
|
|
1368
1391
|
function ce(t) {
|
|
1369
1392
|
if (t) {
|
|
@@ -1374,13 +1397,13 @@ function ce(t) {
|
|
|
1374
1397
|
}
|
|
1375
1398
|
return null;
|
|
1376
1399
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return
|
|
1400
|
+
function Ru(t) {
|
|
1401
|
+
return P.isString(t) && t.substring(0, 1) === "=" && t.length > 1;
|
|
1379
1402
|
}
|
|
1380
|
-
function
|
|
1381
|
-
return
|
|
1403
|
+
function Cu(t) {
|
|
1404
|
+
return P.isString(t) && t.length > 0;
|
|
1382
1405
|
}
|
|
1383
|
-
function
|
|
1406
|
+
function Iu(t, e = !1) {
|
|
1384
1407
|
var i;
|
|
1385
1408
|
let n = "";
|
|
1386
1409
|
const s = /* @__PURE__ */ new Map([
|
|
@@ -1441,8 +1464,8 @@ function pu(t, e = !1) {
|
|
|
1441
1464
|
[
|
|
1442
1465
|
"bd",
|
|
1443
1466
|
() => {
|
|
1444
|
-
var o, l, a, h, c, u, d, f, m, p,
|
|
1445
|
-
(o = t.bd) != null && o.b && (n += `border-bottom: ${en((l = t.bd) == null ? void 0 : l.b.s)} ${(a = ce(t.bd.b.cl)) != null ? a : ""}; `), (h = t.bd) != null && h.t && (n += `border-top: ${en((c = t.bd) == null ? void 0 : c.t.s)} ${(u = ce(t.bd.t.cl)) != null ? u : ""}; `), (d = t.bd) != null && d.r && (n += `border-right: ${en((f = t.bd) == null ? void 0 : f.r.s)} ${(m = ce(t.bd.r.cl)) != null ? m : ""}; `), (p = t.bd) != null && p.l && (n += `border-left: ${en((
|
|
1467
|
+
var o, l, a, h, c, u, d, f, m, p, M, L;
|
|
1468
|
+
(o = t.bd) != null && o.b && (n += `border-bottom: ${en((l = t.bd) == null ? void 0 : l.b.s)} ${(a = ce(t.bd.b.cl)) != null ? a : ""}; `), (h = t.bd) != null && h.t && (n += `border-top: ${en((c = t.bd) == null ? void 0 : c.t.s)} ${(u = ce(t.bd.t.cl)) != null ? u : ""}; `), (d = t.bd) != null && d.r && (n += `border-right: ${en((f = t.bd) == null ? void 0 : f.r.s)} ${(m = ce(t.bd.r.cl)) != null ? m : ""}; `), (p = t.bd) != null && p.l && (n += `border-left: ${en((M = t.bd) == null ? void 0 : M.l.s)} ${(L = ce(t.bd.l.cl)) != null ? L : ""}; `);
|
|
1446
1469
|
}
|
|
1447
1470
|
],
|
|
1448
1471
|
[
|
|
@@ -1485,15 +1508,15 @@ function pu(t, e = !1) {
|
|
|
1485
1508
|
[
|
|
1486
1509
|
"tb",
|
|
1487
1510
|
() => {
|
|
1488
|
-
t.tb === Ke.CLIP ? n += "white-space:
|
|
1511
|
+
t.tb === Ke.CLIP ? n += "white-space: nowrap; overflow-x: hidden; " : t.tb === Ke.WRAP && (n += "white-space: normal;");
|
|
1489
1512
|
}
|
|
1490
1513
|
],
|
|
1491
1514
|
[
|
|
1492
1515
|
"pd",
|
|
1493
1516
|
() => {
|
|
1494
|
-
var c, u, d, f, m, p,
|
|
1517
|
+
var c, u, d, f, m, p, M, L;
|
|
1495
1518
|
const o = `${(c = t.pd) == null ? void 0 : c.b}pt`, l = `${(u = t.pd) == null ? void 0 : u.t}pt`, a = `${(d = t.pd) == null ? void 0 : d.l}pt`, h = `${(f = t.pd) == null ? void 0 : f.r}pt`;
|
|
1496
|
-
(m = t.pd) != null && m.b && (n += `padding-bottom: ${o}; `), (p = t.pd) != null && p.t && (n += `padding-top: ${l}; `), (
|
|
1519
|
+
(m = t.pd) != null && m.b && (n += `padding-bottom: ${o}; `), (p = t.pd) != null && p.t && (n += `padding-top: ${l}; `), (M = t.pd) != null && M.l && (n += `padding-left: ${a}; `), (L = t.pd) != null && L.r && (n += `padding-right: ${h}; `);
|
|
1497
1520
|
}
|
|
1498
1521
|
]
|
|
1499
1522
|
]), r = ["bd", "tr", "tb"];
|
|
@@ -1505,7 +1528,7 @@ function en(t) {
|
|
|
1505
1528
|
let e = "";
|
|
1506
1529
|
return t === dt.NONE ? e = "none" : t === dt.THIN ? e = "0.5pt solid" : t === dt.HAIR ? e = "0.5pt double" : t === dt.DOTTED ? e = "0.5pt dotted" : t === dt.DASHED || t === dt.DASH_DOT ? e = "0.5pt dashed" : t === dt.DASH_DOT_DOT ? e = "0.5pt dotted" : t === dt.DOUBLE ? e = "0.5pt double" : t === dt.MEDIUM ? e = "1pt solid" : t === dt.MEDIUM_DASHED || t === dt.MEDIUM_DASH_DOT ? e = "1pt dashed" : t === dt.MEDIUM_DASH_DOT_DOT ? e = "1pt dotted" : t === dt.SLANT_DASH_DOT ? e = "0.5pt dashed" : t === dt.THICK && (e = "1.5pt solid"), e;
|
|
1507
1530
|
}
|
|
1508
|
-
function
|
|
1531
|
+
function Ou(t) {
|
|
1509
1532
|
let e = 0;
|
|
1510
1533
|
if (t = t.trim(), t === "none")
|
|
1511
1534
|
e = dt.NONE;
|
|
@@ -1531,7 +1554,7 @@ function Eu(t) {
|
|
|
1531
1554
|
return dt.NONE;
|
|
1532
1555
|
return e;
|
|
1533
1556
|
}
|
|
1534
|
-
function
|
|
1557
|
+
function Nu(t, e) {
|
|
1535
1558
|
let n = t.body;
|
|
1536
1559
|
if (e) {
|
|
1537
1560
|
const { headers: s, footers: r } = t;
|
|
@@ -1539,21 +1562,21 @@ function Ru(t, e) {
|
|
|
1539
1562
|
}
|
|
1540
1563
|
return n;
|
|
1541
1564
|
}
|
|
1542
|
-
function
|
|
1565
|
+
function Su(t) {
|
|
1543
1566
|
const { startRow: e, endRow: n, startColumn: s, endColumn: r, rangeType: i } = t;
|
|
1544
1567
|
return !(e < 0 || s < 0 || n < 0 || r < 0 || !(Number.isNaN(e) && Number.isNaN(n)) && i === it.COLUMN || !(Number.isNaN(s) && Number.isNaN(r)) && i === it.ROW || i !== it.ROW && i !== it.COLUMN && (Number.isNaN(s) || Number.isNaN(e) || Number.isNaN(r) || Number.isNaN(n)));
|
|
1545
1568
|
}
|
|
1546
|
-
function
|
|
1569
|
+
function wu(t, e) {
|
|
1547
1570
|
return { startRow: t, endRow: t, startColumn: e, endColumn: e };
|
|
1548
1571
|
}
|
|
1549
1572
|
function Js(t, e) {
|
|
1550
1573
|
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((n) => Js(t[n], e[n])) : t === e : !1;
|
|
1551
1574
|
}
|
|
1552
|
-
function
|
|
1575
|
+
function wo(t, e) {
|
|
1553
1576
|
const n = t.ts || {}, s = e.ts || {};
|
|
1554
1577
|
return t.sId !== e.sId ? !1 : Js(n, s);
|
|
1555
1578
|
}
|
|
1556
|
-
function
|
|
1579
|
+
function bu(t, e) {
|
|
1557
1580
|
return e.some((n) => t.indexOf(n) > -1);
|
|
1558
1581
|
}
|
|
1559
1582
|
function rs(t, e, n, s) {
|
|
@@ -1564,31 +1587,32 @@ function rs(t, e, n, s) {
|
|
|
1564
1587
|
let i = [];
|
|
1565
1588
|
return t === n ? i = [s + 1 - r, e - r] : e === s ? i = [t, n - 1] : i = [t, e - r], i;
|
|
1566
1589
|
}
|
|
1567
|
-
function
|
|
1590
|
+
function Au(t) {
|
|
1568
1591
|
if (t == null)
|
|
1569
1592
|
return !1;
|
|
1570
1593
|
const e = t.bullet;
|
|
1571
1594
|
return (e == null ? void 0 : e.listId) != null;
|
|
1572
1595
|
}
|
|
1573
|
-
function
|
|
1596
|
+
function vu(t) {
|
|
1574
1597
|
if (t == null)
|
|
1575
1598
|
return !1;
|
|
1576
1599
|
const e = t.paragraphStyle;
|
|
1577
|
-
return
|
|
1600
|
+
return bo(e);
|
|
1578
1601
|
}
|
|
1579
|
-
function
|
|
1580
|
-
|
|
1602
|
+
function bo(t) {
|
|
1603
|
+
var e;
|
|
1604
|
+
return !(t == null || (t.indentStart == null || t.indentStart.v === 0) && t.hanging == null || ((e = t.hanging) == null ? void 0 : e.v) === 0);
|
|
1581
1605
|
}
|
|
1582
|
-
function
|
|
1606
|
+
function Ao(t, e, n) {
|
|
1583
1607
|
return t.slice(0, e) + n + t.slice(e);
|
|
1584
1608
|
}
|
|
1585
|
-
function
|
|
1609
|
+
function vo(t, e, n) {
|
|
1586
1610
|
return e > n ? t : t.slice(0, e) + t.slice(n);
|
|
1587
1611
|
}
|
|
1588
|
-
function
|
|
1612
|
+
function Tu(t) {
|
|
1589
1613
|
return t === null || t.toString().replace(/\s/g, "") === "" || typeof t == "boolean" ? !1 : !isNaN(t);
|
|
1590
1614
|
}
|
|
1591
|
-
function
|
|
1615
|
+
function Mu(t) {
|
|
1592
1616
|
let e = 0;
|
|
1593
1617
|
for (let n = 0; n < t.length; n++)
|
|
1594
1618
|
e = t.charCodeAt(n) + (e << 6) + (e << 16) - e;
|
|
@@ -1629,13 +1653,13 @@ function Ss(t, e, n) {
|
|
|
1629
1653
|
function Be(t) {
|
|
1630
1654
|
return typeof t == "function";
|
|
1631
1655
|
}
|
|
1632
|
-
function
|
|
1656
|
+
function To(t) {
|
|
1633
1657
|
var e = function(s) {
|
|
1634
1658
|
Error.call(s), s.stack = new Error().stack;
|
|
1635
1659
|
}, n = t(e);
|
|
1636
1660
|
return n.prototype = Object.create(Error.prototype), n.prototype.constructor = n, n;
|
|
1637
1661
|
}
|
|
1638
|
-
var Tn =
|
|
1662
|
+
var Tn = To(function(t) {
|
|
1639
1663
|
return function(n) {
|
|
1640
1664
|
t(this), this.message = n ? n.length + ` errors occurred during unsubscription:
|
|
1641
1665
|
` + n.map(function(s, r) {
|
|
@@ -1740,7 +1764,7 @@ var Qs = function() {
|
|
|
1740
1764
|
}(), t;
|
|
1741
1765
|
}();
|
|
1742
1766
|
Qs.EMPTY;
|
|
1743
|
-
function
|
|
1767
|
+
function Mo(t) {
|
|
1744
1768
|
return t instanceof Qs || t && "closed" in t && Be(t.remove) && Be(t.add) && Be(t.unsubscribe);
|
|
1745
1769
|
}
|
|
1746
1770
|
function bs(t) {
|
|
@@ -1748,7 +1772,7 @@ function bs(t) {
|
|
|
1748
1772
|
}
|
|
1749
1773
|
function bt(t) {
|
|
1750
1774
|
let e = !1;
|
|
1751
|
-
return t ?
|
|
1775
|
+
return t ? Mo(t) ? {
|
|
1752
1776
|
dispose: () => t.unsubscribe()
|
|
1753
1777
|
} : typeof t == "function" ? {
|
|
1754
1778
|
dispose: () => {
|
|
@@ -1757,7 +1781,7 @@ function bt(t) {
|
|
|
1757
1781
|
} : t : bt(() => {
|
|
1758
1782
|
});
|
|
1759
1783
|
}
|
|
1760
|
-
function
|
|
1784
|
+
function Uu(t) {
|
|
1761
1785
|
return bt(() => {
|
|
1762
1786
|
t.unsubscribe();
|
|
1763
1787
|
});
|
|
@@ -1780,7 +1804,7 @@ class tr {
|
|
|
1780
1804
|
}), this._disposables.clear();
|
|
1781
1805
|
}
|
|
1782
1806
|
}
|
|
1783
|
-
class
|
|
1807
|
+
class Ut {
|
|
1784
1808
|
constructor() {
|
|
1785
1809
|
g(this, "_disposed", !1);
|
|
1786
1810
|
g(this, "_collection", new tr());
|
|
@@ -1796,7 +1820,7 @@ class Lt {
|
|
|
1796
1820
|
this._disposed || (this._disposed = !0, this._collection.dispose());
|
|
1797
1821
|
}
|
|
1798
1822
|
}
|
|
1799
|
-
class
|
|
1823
|
+
class Lu extends Ut {
|
|
1800
1824
|
constructor() {
|
|
1801
1825
|
super(...arguments);
|
|
1802
1826
|
g(this, "dispose$", new Yt());
|
|
@@ -1805,6 +1829,21 @@ class vu extends Lt {
|
|
|
1805
1829
|
super.dispose(), this.dispose$.next(), this.dispose$.complete();
|
|
1806
1830
|
}
|
|
1807
1831
|
}
|
|
1832
|
+
class Du extends Ut {
|
|
1833
|
+
constructor(n) {
|
|
1834
|
+
super();
|
|
1835
|
+
g(this, "_ref", 0);
|
|
1836
|
+
this._rootDisposable = n;
|
|
1837
|
+
}
|
|
1838
|
+
inc() {
|
|
1839
|
+
if (this._disposed)
|
|
1840
|
+
throw new Error("[RCDisposable]: should not ref to a disposed.");
|
|
1841
|
+
this._ref += 1;
|
|
1842
|
+
}
|
|
1843
|
+
dec() {
|
|
1844
|
+
this._ref -= 1, this._ref === 0 && (this._rootDisposable.dispose(), this.dispose());
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1808
1847
|
class nn {
|
|
1809
1848
|
static hasLength(e, n) {
|
|
1810
1849
|
return e.length === n;
|
|
@@ -1826,13 +1865,13 @@ function is(t, e) {
|
|
|
1826
1865
|
const n = t.indexOf(e);
|
|
1827
1866
|
return n > -1 ? (t.splice(n, 1), !0) : !1;
|
|
1828
1867
|
}
|
|
1829
|
-
function
|
|
1868
|
+
function xu(t) {
|
|
1830
1869
|
const e = /* @__PURE__ */ new Set(), n = [];
|
|
1831
1870
|
for (const s of t)
|
|
1832
1871
|
e.has(s) || (e.add(s), n.push(s));
|
|
1833
1872
|
return n;
|
|
1834
1873
|
}
|
|
1835
|
-
function
|
|
1874
|
+
function Uo(t, e) {
|
|
1836
1875
|
for (let n = t.length - 1; n > -1; n--) {
|
|
1837
1876
|
const s = t[n];
|
|
1838
1877
|
if (e(s, n))
|
|
@@ -1840,13 +1879,13 @@ function Ao(t, e) {
|
|
|
1840
1879
|
}
|
|
1841
1880
|
return null;
|
|
1842
1881
|
}
|
|
1843
|
-
function
|
|
1882
|
+
function Pu(t, e) {
|
|
1844
1883
|
if (t.length === 0)
|
|
1845
1884
|
return t;
|
|
1846
1885
|
const n = e % t.length;
|
|
1847
1886
|
return t.slice(n).concat(t.slice(0, n));
|
|
1848
1887
|
}
|
|
1849
|
-
function
|
|
1888
|
+
function yu(t, e) {
|
|
1850
1889
|
const n = /* @__PURE__ */ new Map();
|
|
1851
1890
|
return t.forEach((s) => {
|
|
1852
1891
|
const r = e(s);
|
|
@@ -1854,11 +1893,11 @@ function Uu(t, e) {
|
|
|
1854
1893
|
n.has(r) || (i = [], n.set(r, i)), i.push(s);
|
|
1855
1894
|
}), n;
|
|
1856
1895
|
}
|
|
1857
|
-
function
|
|
1896
|
+
function ku(t) {
|
|
1858
1897
|
return Array.isArray(t) ? t : [t];
|
|
1859
1898
|
}
|
|
1860
1899
|
const at = Symbol("newer"), Mt = Symbol("older");
|
|
1861
|
-
class
|
|
1900
|
+
class Lo {
|
|
1862
1901
|
constructor(e) {
|
|
1863
1902
|
g(this, "entry");
|
|
1864
1903
|
this.entry = e;
|
|
@@ -1871,7 +1910,7 @@ class vo {
|
|
|
1871
1910
|
return e ? (this.entry = e[at], { done: !1, value: e.key }) : { done: !0, value: void 0 };
|
|
1872
1911
|
}
|
|
1873
1912
|
}
|
|
1874
|
-
class
|
|
1913
|
+
class Do {
|
|
1875
1914
|
constructor(e) {
|
|
1876
1915
|
g(this, "entry");
|
|
1877
1916
|
this.entry = e;
|
|
@@ -1884,7 +1923,7 @@ class To {
|
|
|
1884
1923
|
return e ? (this.entry = e[at], { done: !1, value: e.value }) : { done: !0, value: void 0 };
|
|
1885
1924
|
}
|
|
1886
1925
|
}
|
|
1887
|
-
class
|
|
1926
|
+
class xo {
|
|
1888
1927
|
constructor(e) {
|
|
1889
1928
|
g(this, "entry");
|
|
1890
1929
|
this.entry = e;
|
|
@@ -1914,7 +1953,7 @@ class As {
|
|
|
1914
1953
|
};
|
|
1915
1954
|
}
|
|
1916
1955
|
}
|
|
1917
|
-
class
|
|
1956
|
+
class Po {
|
|
1918
1957
|
constructor(...e) {
|
|
1919
1958
|
g(this, "_keymap");
|
|
1920
1959
|
g(this, "size", 0);
|
|
@@ -1992,16 +2031,16 @@ class Uo {
|
|
|
1992
2031
|
this.oldest = void 0, this.newest = void 0, this.size = 0, this._keymap.clear();
|
|
1993
2032
|
}
|
|
1994
2033
|
keys() {
|
|
1995
|
-
return new
|
|
2034
|
+
return new Lo(this.oldest);
|
|
1996
2035
|
}
|
|
1997
2036
|
values() {
|
|
1998
|
-
return new
|
|
2037
|
+
return new Do(this.oldest);
|
|
1999
2038
|
}
|
|
2000
2039
|
entries() {
|
|
2001
2040
|
return this[Symbol.iterator]();
|
|
2002
2041
|
}
|
|
2003
2042
|
[Symbol.iterator]() {
|
|
2004
|
-
return new
|
|
2043
|
+
return new xo(this.oldest);
|
|
2005
2044
|
}
|
|
2006
2045
|
forEach(e, n) {
|
|
2007
2046
|
typeof n != "object" && (n = this);
|
|
@@ -2043,7 +2082,7 @@ function Ts(t, e, n) {
|
|
|
2043
2082
|
for (let r = t; r < s; r++)
|
|
2044
2083
|
r < t + e ? delete n[r] : n[r] !== void 0 && (n[r - e] = n[r], delete n[r]);
|
|
2045
2084
|
}
|
|
2046
|
-
function
|
|
2085
|
+
function Hu(t, e) {
|
|
2047
2086
|
const n = t, s = Object.keys(n), r = s.length, i = e, o = Object.keys(i), l = o.length, a = {};
|
|
2048
2087
|
let h = 0;
|
|
2049
2088
|
for (let c = 0; c < r; c++, h++) {
|
|
@@ -2056,7 +2095,7 @@ function Du(t, e) {
|
|
|
2056
2095
|
}
|
|
2057
2096
|
return a;
|
|
2058
2097
|
}
|
|
2059
|
-
function
|
|
2098
|
+
function Fu(t, e, n) {
|
|
2060
2099
|
const s = n;
|
|
2061
2100
|
if (Oe(n) > 0) {
|
|
2062
2101
|
const i = {};
|
|
@@ -2071,9 +2110,9 @@ function Ms(t, e, n, s) {
|
|
|
2071
2110
|
const r = t > n;
|
|
2072
2111
|
if (!r && t + e > n)
|
|
2073
2112
|
throw new Error("Invalid move operation");
|
|
2074
|
-
r ?
|
|
2113
|
+
r ? yo(t, e, n, s) : ko(t, e, n, s);
|
|
2075
2114
|
}
|
|
2076
|
-
function
|
|
2115
|
+
function yo(t, e, n, s) {
|
|
2077
2116
|
const r = s, i = [];
|
|
2078
2117
|
for (let o = t; o < t + e; o++)
|
|
2079
2118
|
i.push(r[o]);
|
|
@@ -2085,7 +2124,7 @@ function Lo(t, e, n, s) {
|
|
|
2085
2124
|
r[n + l] = o, o === void 0 && delete r[n + l];
|
|
2086
2125
|
});
|
|
2087
2126
|
}
|
|
2088
|
-
function
|
|
2127
|
+
function ko(t, e, n, s) {
|
|
2089
2128
|
const r = s, i = [];
|
|
2090
2129
|
for (let o = t; o < t + e; o++)
|
|
2091
2130
|
i.push(r[o]);
|
|
@@ -2268,7 +2307,7 @@ class re {
|
|
|
2268
2307
|
for (let o = e; o <= n; o++)
|
|
2269
2308
|
for (let l = s; l <= r; l++) {
|
|
2270
2309
|
const a = this.getValue(o, l);
|
|
2271
|
-
a && i.setValue(o, l,
|
|
2310
|
+
a && i.setValue(o, l, P.deepClone(a));
|
|
2272
2311
|
}
|
|
2273
2312
|
return i;
|
|
2274
2313
|
}
|
|
@@ -2563,7 +2602,7 @@ g(he, "getRelativeRange", (e, n) => ({
|
|
|
2563
2602
|
endColumn: e.endColumn + n
|
|
2564
2603
|
}));
|
|
2565
2604
|
let Ne = he;
|
|
2566
|
-
class
|
|
2605
|
+
class $u {
|
|
2567
2606
|
constructor(e, n) {
|
|
2568
2607
|
g(this, "_values", []);
|
|
2569
2608
|
g(this, "_keys", []);
|
|
@@ -2640,7 +2679,7 @@ function Us(t, e, n, s) {
|
|
|
2640
2679
|
}
|
|
2641
2680
|
};
|
|
2642
2681
|
}
|
|
2643
|
-
function
|
|
2682
|
+
function Wu(t) {
|
|
2644
2683
|
if (t == null || t.length === 0)
|
|
2645
2684
|
return Number.NaN;
|
|
2646
2685
|
const e = t.toLowerCase().split(""), n = e.length, s = (o) => o.charCodeAt(0) - 96;
|
|
@@ -2649,37 +2688,37 @@ function yu(t) {
|
|
|
2649
2688
|
i = s(e[o]), r += i * 26 ** (n - o - 1);
|
|
2650
2689
|
return r === 0 ? Number.NaN : r - 1;
|
|
2651
2690
|
}
|
|
2652
|
-
const dn = 65, er = 90,
|
|
2653
|
-
function
|
|
2691
|
+
const dn = 65, er = 90, Ho = 97;
|
|
2692
|
+
function Bu(t) {
|
|
2654
2693
|
const e = er - dn + 1;
|
|
2655
2694
|
let n = "";
|
|
2656
2695
|
for (; t >= 0; )
|
|
2657
2696
|
n = String.fromCharCode(t % e + dn) + n, t = Math.floor(t / e) - 1;
|
|
2658
2697
|
return n;
|
|
2659
2698
|
}
|
|
2660
|
-
function
|
|
2699
|
+
function Fo(t, e) {
|
|
2661
2700
|
let n = "";
|
|
2662
2701
|
for (; e > 0; )
|
|
2663
2702
|
n += t, e--;
|
|
2664
2703
|
return n;
|
|
2665
2704
|
}
|
|
2666
|
-
function
|
|
2705
|
+
function Gu(t, e = !1) {
|
|
2667
2706
|
const n = er - dn + 1;
|
|
2668
|
-
let s =
|
|
2707
|
+
let s = Ho;
|
|
2669
2708
|
e && (s = dn);
|
|
2670
2709
|
const r = String.fromCharCode(t % n + s), i = Math.floor(t / n) + 1;
|
|
2671
|
-
return
|
|
2710
|
+
return Fo(r, i);
|
|
2672
2711
|
}
|
|
2673
|
-
function
|
|
2712
|
+
function ju(t, e) {
|
|
2674
2713
|
return t.zIndex > e.zIndex ? 1 : t.zIndex === e.zIndex ? 0 : -1;
|
|
2675
2714
|
}
|
|
2676
|
-
function
|
|
2715
|
+
function Vu(t, e) {
|
|
2677
2716
|
return t.zIndex > e.zIndex ? -1 : t.zIndex === e.zIndex ? 0 : 1;
|
|
2678
2717
|
}
|
|
2679
2718
|
function He(t = "index", e = 1) {
|
|
2680
2719
|
return (n, s) => n[t] > s[t] ? e : n[t] === s[t] ? 0 : -e;
|
|
2681
2720
|
}
|
|
2682
|
-
function
|
|
2721
|
+
function Ku(t, e) {
|
|
2683
2722
|
let n;
|
|
2684
2723
|
function s(...r) {
|
|
2685
2724
|
const i = this, o = function() {
|
|
@@ -2701,7 +2740,7 @@ function Mn(t, e, n) {
|
|
|
2701
2740
|
const o = [];
|
|
2702
2741
|
for (const l of r) {
|
|
2703
2742
|
const { st: a, ed: h } = l;
|
|
2704
|
-
|
|
2743
|
+
P.hasIntersectionBetweenTwoRanges(e, n, a, h) && (a > i ? (o.push(s.slice(i, a)), o.push(Ls(s, {
|
|
2705
2744
|
...l,
|
|
2706
2745
|
ed: Math.min(h, n)
|
|
2707
2746
|
}))) : o.push(Ls(s, {
|
|
@@ -2712,7 +2751,7 @@ function Mn(t, e, n) {
|
|
|
2712
2751
|
}
|
|
2713
2752
|
return i !== n && o.push(s.slice(i, n)), o.join("");
|
|
2714
2753
|
}
|
|
2715
|
-
function
|
|
2754
|
+
function Yu(t, e = !0) {
|
|
2716
2755
|
var n;
|
|
2717
2756
|
if (e && ((n = t.paragraphs) != null && n.length)) {
|
|
2718
2757
|
const { dataStream: s, paragraphs: r = [] } = t;
|
|
@@ -2728,10 +2767,10 @@ function Bu(t, e = !0) {
|
|
|
2728
2767
|
function Ls(t, e) {
|
|
2729
2768
|
const { st: n, ed: s, ts: r = {} } = e, { ff: i, fs: o, it: l, bl: a, ul: h, st: c, ol: u, bg: d, cl: f, va: m } = r;
|
|
2730
2769
|
let p = t.slice(n, s);
|
|
2731
|
-
const
|
|
2732
|
-
return l === Y.TRUE && (p = `<i>${p}</i>`), m === Ye.SUPERSCRIPT ? p = `<sup>${p}</sup>` : m === Ye.SUBSCRIPT && (p = `<sub>${p}</sub>`), (h == null ? void 0 : h.s) === Y.TRUE && (p = `<u>${p}</u>`), (c == null ? void 0 : c.s) === Y.TRUE && (p = `<s>${p}</s>`), a === Y.TRUE && (p = `<strong>${p}</strong>`), i &&
|
|
2770
|
+
const M = [];
|
|
2771
|
+
return l === Y.TRUE && (p = `<i>${p}</i>`), m === Ye.SUPERSCRIPT ? p = `<sup>${p}</sup>` : m === Ye.SUBSCRIPT && (p = `<sub>${p}</sub>`), (h == null ? void 0 : h.s) === Y.TRUE && (p = `<u>${p}</u>`), (c == null ? void 0 : c.s) === Y.TRUE && (p = `<s>${p}</s>`), a === Y.TRUE && (p = `<strong>${p}</strong>`), i && M.push(`font-family: ${i}`), f && M.push(`color: ${f.rgb}`), o && M.push(`font-size: ${o}pt`), u && M.push("text-decoration: overline"), d && M.push(`background: ${d.rgb}`), M.length ? `<span style="${M.join("; ")};">${p}</span>` : p;
|
|
2733
2772
|
}
|
|
2734
|
-
const
|
|
2773
|
+
const zu = {
|
|
2735
2774
|
sheetId: "",
|
|
2736
2775
|
range: {
|
|
2737
2776
|
startRow: -1,
|
|
@@ -2739,17 +2778,17 @@ const Gu = {
|
|
|
2739
2778
|
startColumn: -1,
|
|
2740
2779
|
endColumn: -1
|
|
2741
2780
|
}
|
|
2742
|
-
},
|
|
2781
|
+
}, Xu = {
|
|
2743
2782
|
startRow: -1,
|
|
2744
2783
|
startColumn: -1,
|
|
2745
2784
|
endRow: -1,
|
|
2746
2785
|
endColumn: -1
|
|
2747
|
-
},
|
|
2786
|
+
}, qu = {
|
|
2748
2787
|
startRow: 0,
|
|
2749
2788
|
startColumn: 0,
|
|
2750
2789
|
endRow: 0,
|
|
2751
2790
|
endColumn: 0
|
|
2752
|
-
},
|
|
2791
|
+
}, Zu = {
|
|
2753
2792
|
row: 0,
|
|
2754
2793
|
column: 0
|
|
2755
2794
|
}, Un = {
|
|
@@ -2839,7 +2878,7 @@ const Gu = {
|
|
|
2839
2878
|
b: 0,
|
|
2840
2879
|
l: 0
|
|
2841
2880
|
}
|
|
2842
|
-
},
|
|
2881
|
+
}, $o = {
|
|
2843
2882
|
id: "default_slide",
|
|
2844
2883
|
title: "defaultSlide",
|
|
2845
2884
|
pageSize: {
|
|
@@ -2847,7 +2886,7 @@ const Gu = {
|
|
|
2847
2886
|
height: 300
|
|
2848
2887
|
}
|
|
2849
2888
|
};
|
|
2850
|
-
var
|
|
2889
|
+
var Wo = /* @__PURE__ */ ((t) => (t.ARRAY_CONVERTOR = "ARRAY_CONVERTOR", t.MATRIX_CONVERTOR = "MATRIX_CONVERTOR", t))(Wo || {});
|
|
2851
2890
|
function sn(t, e) {
|
|
2852
2891
|
const { textRuns: n = [] } = e;
|
|
2853
2892
|
let s = 0;
|
|
@@ -2959,7 +2998,7 @@ const je = class je {
|
|
|
2959
2998
|
getA1Notation() {
|
|
2960
2999
|
const { startRow: e, endRow: n, startColumn: s, endColumn: r } = this._range;
|
|
2961
3000
|
let i, o;
|
|
2962
|
-
return s < r ? (i =
|
|
3001
|
+
return s < r ? (i = P.numToWord(s + 1) + (e + 1), o = P.numToWord(r + 1) + (n + 1)) : (i = P.numToWord(r + 1) + (n + 1), o = P.numToWord(s + 1) + (e + 1)), i === o ? `${i}` : `${i}:${o}`;
|
|
2963
3002
|
}
|
|
2964
3003
|
/**
|
|
2965
3004
|
* Returns the background color of the top-left cell in the range (for example, '#ffffff').
|
|
@@ -3368,14 +3407,14 @@ g(je, "transformRange", (e, n) => e.rangeType === it.ALL ? {
|
|
|
3368
3407
|
endRow: e.endRow
|
|
3369
3408
|
} : e);
|
|
3370
3409
|
let ze = je;
|
|
3371
|
-
function
|
|
3410
|
+
function Bo(t, e) {
|
|
3372
3411
|
if (t.length === 0 || t[0].length === 0) return null;
|
|
3373
3412
|
const n = new Array(t[0].length).fill(0);
|
|
3374
3413
|
let s = 0, r = null;
|
|
3375
3414
|
for (let i = 0; i < t.length; i++) {
|
|
3376
3415
|
for (let l = 0; l < t[0].length; l++)
|
|
3377
3416
|
n[l] = e(t[i][l]) ? n[l] + 1 : 0;
|
|
3378
|
-
const o =
|
|
3417
|
+
const o = Go(n);
|
|
3379
3418
|
o.area > s && (s = o.area, r = {
|
|
3380
3419
|
startColumn: o.start,
|
|
3381
3420
|
startRow: i - o.height + 1,
|
|
@@ -3385,7 +3424,7 @@ function Ho(t, e) {
|
|
|
3385
3424
|
}
|
|
3386
3425
|
return r;
|
|
3387
3426
|
}
|
|
3388
|
-
function
|
|
3427
|
+
function Go(t) {
|
|
3389
3428
|
const e = [];
|
|
3390
3429
|
let n = 0, s = { area: 0, height: 0, start: 0, end: 0 }, r = 0;
|
|
3391
3430
|
for (; r < t.length; )
|
|
@@ -3401,27 +3440,27 @@ function Fo(t) {
|
|
|
3401
3440
|
}
|
|
3402
3441
|
return s;
|
|
3403
3442
|
}
|
|
3404
|
-
function
|
|
3443
|
+
function jo(t, e) {
|
|
3405
3444
|
ze.foreach(e, (n, s) => {
|
|
3406
3445
|
t[n][s] = void 0;
|
|
3407
3446
|
});
|
|
3408
3447
|
}
|
|
3409
|
-
function
|
|
3448
|
+
function Ju(t, e) {
|
|
3410
3449
|
const n = t.toFullArray(), s = [];
|
|
3411
3450
|
for (; ; ) {
|
|
3412
|
-
const r =
|
|
3451
|
+
const r = Bo(n, e);
|
|
3413
3452
|
if (!r)
|
|
3414
3453
|
break;
|
|
3415
|
-
s.push(r),
|
|
3454
|
+
s.push(r), jo(n, r);
|
|
3416
3455
|
}
|
|
3417
3456
|
return s;
|
|
3418
3457
|
}
|
|
3419
|
-
function
|
|
3458
|
+
function Qu(t, e, n, s = !1) {
|
|
3420
3459
|
let r = { ...t };
|
|
3421
3460
|
const i = r.startAbsoluteRefType || wt.NONE, o = r.endAbsoluteRefType || wt.NONE;
|
|
3422
3461
|
return !s && i === wt.ALL && o === wt.ALL ? r : s || i === wt.NONE && o === wt.NONE ? Ne.moveOffset(r, e, n) : (i === wt.NONE ? r = { ...r, startRow: r.startRow + n, startColumn: r.startColumn + e } : i === wt.COLUMN ? r = { ...r, startRow: r.startRow + n } : i === wt.ROW && (r = { ...r, startColumn: r.startColumn + e }), o === wt.NONE ? r = { ...r, endRow: r.endRow + n, endColumn: r.endColumn + e } : o === wt.COLUMN ? r = { ...r, endRow: r.endRow + n } : o === wt.ROW && (r = { ...r, endColumn: r.endColumn + e }), r);
|
|
3423
3462
|
}
|
|
3424
|
-
async function
|
|
3463
|
+
async function Vo(t) {
|
|
3425
3464
|
for (const [e, n] of t.entries())
|
|
3426
3465
|
try {
|
|
3427
3466
|
if (!await n())
|
|
@@ -3441,7 +3480,7 @@ async function Wo(t) {
|
|
|
3441
3480
|
index: -1
|
|
3442
3481
|
};
|
|
3443
3482
|
}
|
|
3444
|
-
function
|
|
3483
|
+
function Ko(t) {
|
|
3445
3484
|
for (const [e, n] of t.entries())
|
|
3446
3485
|
try {
|
|
3447
3486
|
if (!n())
|
|
@@ -3462,7 +3501,7 @@ function Bo(t) {
|
|
|
3462
3501
|
};
|
|
3463
3502
|
}
|
|
3464
3503
|
const Rn = zt("univer.context-service");
|
|
3465
|
-
class
|
|
3504
|
+
class Yo extends Ut {
|
|
3466
3505
|
constructor() {
|
|
3467
3506
|
super(...arguments);
|
|
3468
3507
|
g(this, "_contextChanged$", new Yt());
|
|
@@ -3486,9 +3525,9 @@ class Go extends Lt {
|
|
|
3486
3525
|
});
|
|
3487
3526
|
}
|
|
3488
3527
|
}
|
|
3489
|
-
var
|
|
3528
|
+
var zo = /* @__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))(zo || {});
|
|
3490
3529
|
const be = zt("univer.log");
|
|
3491
|
-
class
|
|
3530
|
+
class Xo extends Ut {
|
|
3492
3531
|
constructor() {
|
|
3493
3532
|
super(...arguments);
|
|
3494
3533
|
g(this, "_logLevel", 3);
|
|
@@ -3513,13 +3552,13 @@ class Vo extends Lt {
|
|
|
3513
3552
|
/^\[(.*?)\]/g.test(r) ? n(`\x1B[97;104m${r}\x1B[0m`, ...s.slice(1)) : n(...s);
|
|
3514
3553
|
}
|
|
3515
3554
|
}
|
|
3516
|
-
var
|
|
3517
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
3555
|
+
var qo = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, Jo = (t, e, n, s) => {
|
|
3556
|
+
for (var r = s > 1 ? void 0 : s ? Zo(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
3518
3557
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
3519
|
-
return s && r &&
|
|
3558
|
+
return s && r && qo(e, n, r), r;
|
|
3520
3559
|
}, Ds = (t, e) => (n, s) => e(n, s, t), Cn = /* @__PURE__ */ ((t) => (t[t.COMMAND = 0] = "COMMAND", t[t.OPERATION = 1] = "OPERATION", t[t.MUTATION = 2] = "MUTATION", t))(Cn || {});
|
|
3521
3560
|
const In = zt("anywhere.command-service");
|
|
3522
|
-
class
|
|
3561
|
+
class Qo {
|
|
3523
3562
|
constructor() {
|
|
3524
3563
|
g(this, "_commands", /* @__PURE__ */ new Map());
|
|
3525
3564
|
g(this, "_commandTypes", /* @__PURE__ */ new Map());
|
|
@@ -3542,12 +3581,12 @@ class Xo {
|
|
|
3542
3581
|
return this._commandTypes.get(e);
|
|
3543
3582
|
}
|
|
3544
3583
|
}
|
|
3545
|
-
const
|
|
3584
|
+
const tl = {
|
|
3546
3585
|
id: "nil",
|
|
3547
3586
|
type: 0,
|
|
3548
3587
|
handler: () => !0
|
|
3549
3588
|
};
|
|
3550
|
-
let jn = class extends
|
|
3589
|
+
let jn = class extends Ut {
|
|
3551
3590
|
constructor(e, n) {
|
|
3552
3591
|
super();
|
|
3553
3592
|
g(this, "_commandRegistry");
|
|
@@ -3556,7 +3595,7 @@ let jn = class extends Lt {
|
|
|
3556
3595
|
g(this, "_multiCommandDisposables", /* @__PURE__ */ new Map());
|
|
3557
3596
|
g(this, "_commandExecutingLevel", 0);
|
|
3558
3597
|
g(this, "_commandExecutionStack", []);
|
|
3559
|
-
this._injector = e, this._logService = n, this._commandRegistry = new
|
|
3598
|
+
this._injector = e, this._logService = n, this._commandRegistry = new Qo(), this._registerCommand(tl);
|
|
3560
3599
|
}
|
|
3561
3600
|
dispose() {
|
|
3562
3601
|
super.dispose(), this._commandExecutedListeners.length = 0, this._beforeCommandExecutionListeners.length = 0;
|
|
@@ -3614,7 +3653,7 @@ let jn = class extends Lt {
|
|
|
3614
3653
|
params: n
|
|
3615
3654
|
};
|
|
3616
3655
|
if (o.type === 2) {
|
|
3617
|
-
const c =
|
|
3656
|
+
const c = Uo(
|
|
3618
3657
|
this._commandExecutionStack,
|
|
3619
3658
|
(u) => u.type === 0
|
|
3620
3659
|
/* COMMAND */
|
|
@@ -3643,7 +3682,7 @@ let jn = class extends Lt {
|
|
|
3643
3682
|
s = n[0];
|
|
3644
3683
|
} else {
|
|
3645
3684
|
const i = new tr();
|
|
3646
|
-
s = new
|
|
3685
|
+
s = new el(e.id), i.add(this._commandRegistry.registerCommand(s)), i.add(
|
|
3647
3686
|
bt(() => {
|
|
3648
3687
|
this._multiCommandDisposables.delete(e.id);
|
|
3649
3688
|
})
|
|
@@ -3684,11 +3723,11 @@ let jn = class extends Lt {
|
|
|
3684
3723
|
return r;
|
|
3685
3724
|
}
|
|
3686
3725
|
};
|
|
3687
|
-
jn =
|
|
3726
|
+
jn = Jo([
|
|
3688
3727
|
Ds(0, ie(we)),
|
|
3689
3728
|
Ds(1, be)
|
|
3690
3729
|
], jn);
|
|
3691
|
-
class
|
|
3730
|
+
class el {
|
|
3692
3731
|
constructor(e) {
|
|
3693
3732
|
g(this, "name");
|
|
3694
3733
|
g(this, "multi", !0);
|
|
@@ -3722,19 +3761,19 @@ class Zo {
|
|
|
3722
3761
|
}
|
|
3723
3762
|
function nr(t, e, n) {
|
|
3724
3763
|
const s = t.map((r) => () => e.syncExecuteCommand(r.id, r.params, n));
|
|
3725
|
-
return
|
|
3764
|
+
return Ko(s);
|
|
3726
3765
|
}
|
|
3727
|
-
function
|
|
3766
|
+
function tc(t, e, n) {
|
|
3728
3767
|
const s = t.map((r) => () => e.executeCommand(r.id, r.params, n));
|
|
3729
|
-
return
|
|
3768
|
+
return Vo(s);
|
|
3730
3769
|
}
|
|
3731
|
-
function
|
|
3770
|
+
function nl(t) {
|
|
3732
3771
|
return new ts((e) => {
|
|
3733
3772
|
const n = t((...s) => e.next(s));
|
|
3734
3773
|
return () => n == null ? void 0 : n.dispose();
|
|
3735
3774
|
});
|
|
3736
3775
|
}
|
|
3737
|
-
function
|
|
3776
|
+
function sl(t) {
|
|
3738
3777
|
return function(n) {
|
|
3739
3778
|
return new ts((s) => (n.subscribe({
|
|
3740
3779
|
next: (r) => {
|
|
@@ -3745,11 +3784,11 @@ function Qo(t) {
|
|
|
3745
3784
|
}), () => s.unsubscribe()));
|
|
3746
3785
|
};
|
|
3747
3786
|
}
|
|
3748
|
-
const
|
|
3787
|
+
const ec = (t) => new Promise((e) => {
|
|
3749
3788
|
zs(
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
).pipe(
|
|
3789
|
+
nl(t.onCommandExecuted.bind(t)).pipe(zr(([n]) => n.type === Cn.MUTATION)),
|
|
3790
|
+
jr(300)
|
|
3791
|
+
).pipe(Xr(16), qr()).subscribe(() => {
|
|
3753
3792
|
e();
|
|
3754
3793
|
});
|
|
3755
3794
|
});
|
|
@@ -3758,7 +3797,7 @@ function sr(t) {
|
|
|
3758
3797
|
return !!(t && t.code && t.code !== Kt.OK && t.code !== "OK");
|
|
3759
3798
|
}
|
|
3760
3799
|
var tt = /* @__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))(tt || {}), rr = /* @__PURE__ */ ((t) => (t[t.SomeCollaborator = 0] = "SomeCollaborator", t[t.AllCollaborator = 1] = "AllCollaborator", t[t.OneSelf = 2] = "OneSelf", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(rr || {}), yt = /* @__PURE__ */ ((t) => (t[t.Reader = 0] = "Reader", t[t.Editor = 1] = "Editor", t[t.Owner = 2] = "Owner", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(yt || {}), ln = /* @__PURE__ */ ((t) => (t[t.Unkonwn = 0] = "Unkonwn", t[t.Workbook = 1] = "Workbook", t[t.Worksheet = 2] = "Worksheet", t[t.SelectRange = 3] = "SelectRange", t[t.Document = 4] = "Document", t[t.Slide = 5] = "Slide", t[t.UNRECOGNIZED = -1] = "UNRECOGNIZED", t))(ln || {});
|
|
3761
|
-
class os extends
|
|
3800
|
+
class os extends Ut {
|
|
3762
3801
|
}
|
|
3763
3802
|
class ir {
|
|
3764
3803
|
constructor() {
|
|
@@ -3795,9 +3834,9 @@ class or {
|
|
|
3795
3834
|
return this._data;
|
|
3796
3835
|
}
|
|
3797
3836
|
}
|
|
3798
|
-
var
|
|
3837
|
+
var rl = /* @__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))(rl || {}), _e = /* @__PURE__ */ ((t) => (t.PARAGRAPH = "\r", t.SECTION_BREAK = `
|
|
3799
3838
|
`, 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))(_e || {}), Vn = /* @__PURE__ */ ((t) => (t.BULLET_LIST = "BULLET_LIST", t.ORDER_LIST = "ORDER_LIST", t))(Vn || {});
|
|
3800
|
-
const
|
|
3839
|
+
const nc = {
|
|
3801
3840
|
BULLET_LIST: {
|
|
3802
3841
|
listType: "BULLET_LIST",
|
|
3803
3842
|
nestingLevel: [
|
|
@@ -3809,8 +3848,8 @@ const Zu = {
|
|
|
3809
3848
|
},
|
|
3810
3849
|
startNumber: 0,
|
|
3811
3850
|
glyphSymbol: "●",
|
|
3812
|
-
hanging: 21,
|
|
3813
|
-
indentStart: 21
|
|
3851
|
+
hanging: { v: 21 },
|
|
3852
|
+
indentStart: { v: 21 }
|
|
3814
3853
|
},
|
|
3815
3854
|
{
|
|
3816
3855
|
bulletAlignment: Ie.START,
|
|
@@ -3820,8 +3859,8 @@ const Zu = {
|
|
|
3820
3859
|
},
|
|
3821
3860
|
startNumber: 0,
|
|
3822
3861
|
glyphSymbol: "■",
|
|
3823
|
-
hanging: 21,
|
|
3824
|
-
indentStart: 42
|
|
3862
|
+
hanging: { v: 21 },
|
|
3863
|
+
indentStart: { v: 42 }
|
|
3825
3864
|
},
|
|
3826
3865
|
{
|
|
3827
3866
|
bulletAlignment: Ie.START,
|
|
@@ -3831,8 +3870,8 @@ const Zu = {
|
|
|
3831
3870
|
},
|
|
3832
3871
|
startNumber: 0,
|
|
3833
3872
|
glyphSymbol: "◆",
|
|
3834
|
-
hanging: 21,
|
|
3835
|
-
indentStart: 63
|
|
3873
|
+
hanging: { v: 21 },
|
|
3874
|
+
indentStart: { v: 63 }
|
|
3836
3875
|
}
|
|
3837
3876
|
]
|
|
3838
3877
|
},
|
|
@@ -3847,8 +3886,8 @@ const Zu = {
|
|
|
3847
3886
|
},
|
|
3848
3887
|
startNumber: 0,
|
|
3849
3888
|
glyphType: on.DECIMAL,
|
|
3850
|
-
hanging: 21,
|
|
3851
|
-
indentStart: 21
|
|
3889
|
+
hanging: { v: 21 },
|
|
3890
|
+
indentStart: { v: 21 }
|
|
3852
3891
|
},
|
|
3853
3892
|
{
|
|
3854
3893
|
bulletAlignment: Ie.START,
|
|
@@ -3858,8 +3897,8 @@ const Zu = {
|
|
|
3858
3897
|
},
|
|
3859
3898
|
startNumber: 0,
|
|
3860
3899
|
glyphType: on.DECIMAL,
|
|
3861
|
-
hanging: 21,
|
|
3862
|
-
indentStart: 42
|
|
3900
|
+
hanging: { v: 21 },
|
|
3901
|
+
indentStart: { v: 42 }
|
|
3863
3902
|
},
|
|
3864
3903
|
{
|
|
3865
3904
|
bulletAlignment: Ie.START,
|
|
@@ -3869,8 +3908,8 @@ const Zu = {
|
|
|
3869
3908
|
},
|
|
3870
3909
|
startNumber: 0,
|
|
3871
3910
|
glyphType: on.DECIMAL,
|
|
3872
|
-
hanging: 21,
|
|
3873
|
-
indentStart: 63
|
|
3911
|
+
hanging: { v: 21 },
|
|
3912
|
+
indentStart: { v: 63 }
|
|
3874
3913
|
}
|
|
3875
3914
|
]
|
|
3876
3915
|
}
|
|
@@ -3879,14 +3918,14 @@ function lr(t) {
|
|
|
3879
3918
|
const e = [];
|
|
3880
3919
|
for (const n of t) {
|
|
3881
3920
|
const { ed: s, ts: r } = n;
|
|
3882
|
-
if (n.sId === void 0 && delete n.sId,
|
|
3921
|
+
if (n.sId === void 0 && delete n.sId, P.isEmptyObject(r) && n.sId == null)
|
|
3883
3922
|
continue;
|
|
3884
3923
|
if (e.length === 0) {
|
|
3885
3924
|
e.push(n);
|
|
3886
3925
|
continue;
|
|
3887
3926
|
}
|
|
3888
3927
|
const i = e.pop();
|
|
3889
|
-
|
|
3928
|
+
wo(n, i) && P.hasIntersectionBetweenTwoRanges(i.st, i.ed, n.st, n.ed) ? e.push({
|
|
3890
3929
|
...n,
|
|
3891
3930
|
st: i.st,
|
|
3892
3931
|
ed: s
|
|
@@ -3920,15 +3959,15 @@ function ar(t, e, n, s) {
|
|
|
3920
3959
|
l = !0, u.ed += n;
|
|
3921
3960
|
const p = [];
|
|
3922
3961
|
if (a.length) {
|
|
3923
|
-
const
|
|
3962
|
+
const M = {
|
|
3924
3963
|
...u,
|
|
3925
3964
|
st: f,
|
|
3926
3965
|
ed: a[0].st
|
|
3927
3966
|
};
|
|
3928
|
-
|
|
3929
|
-
const
|
|
3967
|
+
M.ed > M.st && p.push(M), p.push(...a);
|
|
3968
|
+
const L = a[a.length - 1], Z = {
|
|
3930
3969
|
...u,
|
|
3931
|
-
st:
|
|
3970
|
+
st: L.ed,
|
|
3932
3971
|
ed: m + n
|
|
3933
3972
|
};
|
|
3934
3973
|
Z.ed > Z.st && p.push(Z);
|
|
@@ -3966,7 +4005,7 @@ function ls(t, e, n, s) {
|
|
|
3966
4005
|
h !== -1 && r.splice(h, 1), r.push(...i), r.sort(He("startIndex"));
|
|
3967
4006
|
}
|
|
3968
4007
|
}
|
|
3969
|
-
function
|
|
4008
|
+
function il(t, e, n, s) {
|
|
3970
4009
|
const { sectionBreaks: r } = t;
|
|
3971
4010
|
if (r == null)
|
|
3972
4011
|
return;
|
|
@@ -4020,38 +4059,36 @@ function cr(t, e, n, s) {
|
|
|
4020
4059
|
function hr(t, e, n, s) {
|
|
4021
4060
|
t.customRanges || (t.customRanges = []);
|
|
4022
4061
|
const { customRanges: r } = t, i = {};
|
|
4023
|
-
for (let
|
|
4024
|
-
const
|
|
4025
|
-
i[
|
|
4026
|
-
const { startIndex:
|
|
4027
|
-
|
|
4062
|
+
for (let a = 0, h = r.length; a < h; a++) {
|
|
4063
|
+
const c = r[a];
|
|
4064
|
+
i[c.rangeId] = c;
|
|
4065
|
+
const { startIndex: u, endIndex: d } = c;
|
|
4066
|
+
u >= s ? (c.startIndex += n, c.endIndex += n) : d > s - 1 && (c.endIndex += n);
|
|
4028
4067
|
}
|
|
4029
|
-
|
|
4068
|
+
if (r.find((a) => a.startIndex > s && a.endIndex < s))
|
|
4069
|
+
return;
|
|
4070
|
+
const l = [];
|
|
4030
4071
|
if (e.customRanges) {
|
|
4031
|
-
for (let
|
|
4032
|
-
const
|
|
4033
|
-
if (
|
|
4034
|
-
if (
|
|
4035
|
-
continue;
|
|
4036
|
-
if (t.dataStream[c.startIndex] === _e.CUSTOM_RANGE_START && t.dataStream[c.endIndex] === _e.CUSTOM_RANGE_END) {
|
|
4037
|
-
o.push(h);
|
|
4072
|
+
for (let a = 0, h = e.customRanges.length; a < h; a++) {
|
|
4073
|
+
const c = e.customRanges[a], u = i[c.rangeId];
|
|
4074
|
+
if (c.startIndex += s, c.endIndex += s, u) {
|
|
4075
|
+
if (u.startIndex <= c.startIndex && u.endIndex >= c.endIndex || t.dataStream[u.startIndex] === _e.CUSTOM_RANGE_START && t.dataStream[u.endIndex] === _e.CUSTOM_RANGE_END)
|
|
4038
4076
|
continue;
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
c.endIndex = h.endIndex;
|
|
4077
|
+
if (t.dataStream[u.startIndex] === _e.CUSTOM_RANGE_START) {
|
|
4078
|
+
u.endIndex = c.endIndex;
|
|
4042
4079
|
continue;
|
|
4043
4080
|
}
|
|
4044
|
-
if (t.dataStream[
|
|
4045
|
-
|
|
4081
|
+
if (t.dataStream[u.endIndex] === _e.CUSTOM_RANGE_END) {
|
|
4082
|
+
u.startIndex = c.startIndex;
|
|
4046
4083
|
continue;
|
|
4047
4084
|
}
|
|
4048
4085
|
}
|
|
4049
|
-
|
|
4086
|
+
l.push(c);
|
|
4050
4087
|
}
|
|
4051
|
-
r.push(...
|
|
4088
|
+
r.push(...l), r.sort(He("startIndex"));
|
|
4052
4089
|
}
|
|
4053
4090
|
}
|
|
4054
|
-
function
|
|
4091
|
+
function ol(t) {
|
|
4055
4092
|
t.sort((s, r) => s.startIndex - r.startIndex);
|
|
4056
4093
|
const e = [];
|
|
4057
4094
|
let n = t[0];
|
|
@@ -4059,14 +4096,14 @@ function nl(t) {
|
|
|
4059
4096
|
n.endIndex + 1 >= t[s].startIndex ? n.endIndex = Math.max(n.endIndex, t[s].endIndex) : (e.push(n), n = t[s]);
|
|
4060
4097
|
return e.push(n), e;
|
|
4061
4098
|
}
|
|
4062
|
-
function
|
|
4099
|
+
function ll(t) {
|
|
4063
4100
|
const e = {};
|
|
4064
4101
|
for (let n = 0, s = t.length; n < s; n++) {
|
|
4065
4102
|
const r = t[n], i = e[r.id];
|
|
4066
4103
|
e[r.id] = [...i != null ? i : [], r];
|
|
4067
4104
|
}
|
|
4068
4105
|
return Object.keys(e).forEach((n) => {
|
|
4069
|
-
const s = e[n], r =
|
|
4106
|
+
const s = e[n], r = ol(s);
|
|
4070
4107
|
e[n] = r;
|
|
4071
4108
|
}), Object.values(e).flat();
|
|
4072
4109
|
}
|
|
@@ -4084,7 +4121,7 @@ function dr(t, e, n, s) {
|
|
|
4084
4121
|
const a = e.customDecorations[o];
|
|
4085
4122
|
i.push(a), a.startIndex += s, a.endIndex += s;
|
|
4086
4123
|
}
|
|
4087
|
-
r.push(...i), t.customDecorations =
|
|
4124
|
+
r.push(...i), t.customDecorations = ll(r), t.customDecorations.sort(He("startIndex"));
|
|
4088
4125
|
}
|
|
4089
4126
|
}
|
|
4090
4127
|
function fr(t, e, n) {
|
|
@@ -4254,8 +4291,8 @@ function Rr(t, e, n, s = !0) {
|
|
|
4254
4291
|
}
|
|
4255
4292
|
return l;
|
|
4256
4293
|
}
|
|
4257
|
-
function
|
|
4258
|
-
const i =
|
|
4294
|
+
function al(t, e, n, s, r) {
|
|
4295
|
+
const i = ul(t, e, n, s, r), o = cl(t, e, n, s, r), l = hl(t, e, n, s, r), a = dl(t, e, n, s, r), h = fl(t, e, n, s, r), c = gl(t, e, n, s, r), u = _l(t, e, n, s, r);
|
|
4259
4296
|
return {
|
|
4260
4297
|
dataStream: "",
|
|
4261
4298
|
textRuns: i,
|
|
@@ -4267,7 +4304,7 @@ function rl(t, e, n, s, r) {
|
|
|
4267
4304
|
customDecorations: u
|
|
4268
4305
|
};
|
|
4269
4306
|
}
|
|
4270
|
-
function
|
|
4307
|
+
function ul(t, e, n, s, r) {
|
|
4271
4308
|
const { textRuns: i } = t, { textRuns: o } = e;
|
|
4272
4309
|
if (i == null || o == null)
|
|
4273
4310
|
return;
|
|
@@ -4281,37 +4318,37 @@ function il(t, e, n, s, r) {
|
|
|
4281
4318
|
function Cr(t, e, n) {
|
|
4282
4319
|
if (e.length === 0)
|
|
4283
4320
|
return t;
|
|
4284
|
-
t =
|
|
4321
|
+
t = P.deepClone(t), e = P.deepClone(e);
|
|
4285
4322
|
const s = [], r = t.length, i = e.length;
|
|
4286
4323
|
let o = 0, l = 0, a = null;
|
|
4287
4324
|
function h() {
|
|
4288
4325
|
return a ? (s.push(a), a = null, !0) : !1;
|
|
4289
4326
|
}
|
|
4290
4327
|
for (; o < r && l < i; ) {
|
|
4291
|
-
const { st: f, ed: m, ts: p } = t[o], { st:
|
|
4328
|
+
const { st: f, ed: m, ts: p } = t[o], { st: M, ed: L, ts: Z, sId: gt } = e[l];
|
|
4292
4329
|
let ut;
|
|
4293
|
-
if (n === Pt.COVER ? ut = { ...Z, ...p } : ut = { ...p, ...Z }, m <
|
|
4330
|
+
if (n === Pt.COVER ? ut = { ...Z, ...p } : ut = { ...p, ...Z }, m < M)
|
|
4294
4331
|
h() || s.push(t[o]), o++;
|
|
4295
|
-
else if (
|
|
4332
|
+
else if (L < f)
|
|
4296
4333
|
h() || s.push(e[l]), l++;
|
|
4297
4334
|
else {
|
|
4298
4335
|
const E = {
|
|
4299
|
-
st: Math.min(f,
|
|
4300
|
-
ed: Math.max(f,
|
|
4301
|
-
ts: f <
|
|
4302
|
-
sId: f <
|
|
4336
|
+
st: Math.min(f, M),
|
|
4337
|
+
ed: Math.max(f, M),
|
|
4338
|
+
ts: f < M ? { ...p } : { ...Z },
|
|
4339
|
+
sId: f < M ? void 0 : gt
|
|
4303
4340
|
};
|
|
4304
4341
|
E.ed > E.st && s.push(E), s.push({
|
|
4305
|
-
st: Math.max(f,
|
|
4306
|
-
ed: Math.min(m,
|
|
4342
|
+
st: Math.max(f, M),
|
|
4343
|
+
ed: Math.min(m, L),
|
|
4307
4344
|
ts: ut,
|
|
4308
4345
|
sId: gt
|
|
4309
|
-
}), m <
|
|
4346
|
+
}), m < L ? (o++, e[l].st = m, e[l].st === e[l].ed && l++) : (l++, t[o].st = L, t[o].st === t[o].ed && o++);
|
|
4310
4347
|
const O = {
|
|
4311
|
-
st: Math.min(m,
|
|
4312
|
-
ed: Math.max(m,
|
|
4313
|
-
ts: m <
|
|
4314
|
-
sId: m <
|
|
4348
|
+
st: Math.min(m, L),
|
|
4349
|
+
ed: Math.max(m, L),
|
|
4350
|
+
ts: m < L ? { ...Z } : { ...p },
|
|
4351
|
+
sId: m < L ? gt : void 0
|
|
4315
4352
|
};
|
|
4316
4353
|
a = O.ed > O.st ? O : null;
|
|
4317
4354
|
}
|
|
@@ -4320,7 +4357,7 @@ function Cr(t, e, n) {
|
|
|
4320
4357
|
const c = s[s.length - 1], u = t[r - 1], d = e[i - 1];
|
|
4321
4358
|
return c.ed !== Math.max(u.ed, d.ed) && (u.ed > d.ed ? s.push(u) : s.push(d)), lr(s);
|
|
4322
4359
|
}
|
|
4323
|
-
function
|
|
4360
|
+
function cl(t, e, n, s, r) {
|
|
4324
4361
|
const { paragraphs: i } = t, { paragraphs: o } = e;
|
|
4325
4362
|
if (i == null || o == null)
|
|
4326
4363
|
return;
|
|
@@ -4337,24 +4374,24 @@ function ol(t, e, n, s, r) {
|
|
|
4337
4374
|
for (const m of l) {
|
|
4338
4375
|
const {
|
|
4339
4376
|
startIndex: p,
|
|
4340
|
-
paragraphStyle:
|
|
4341
|
-
bullet:
|
|
4377
|
+
paragraphStyle: M,
|
|
4378
|
+
bullet: L
|
|
4342
4379
|
} = m;
|
|
4343
4380
|
let Z, gt;
|
|
4344
|
-
if (r === Pt.COVER ? (Z = { ...
|
|
4381
|
+
if (r === Pt.COVER ? (Z = { ...M, ...u }, gt = {
|
|
4345
4382
|
listId: "",
|
|
4346
4383
|
listType: Vn.BULLET_LIST,
|
|
4347
4384
|
nestingLevel: 0,
|
|
4348
4385
|
textStyle: {},
|
|
4349
|
-
...
|
|
4386
|
+
...L,
|
|
4350
4387
|
...d
|
|
4351
|
-
}) : (Z = { ...u, ...
|
|
4388
|
+
}) : (Z = { ...u, ...M }, gt = {
|
|
4352
4389
|
listId: "",
|
|
4353
4390
|
listType: Vn.BULLET_LIST,
|
|
4354
4391
|
nestingLevel: 0,
|
|
4355
4392
|
textStyle: {},
|
|
4356
4393
|
...d,
|
|
4357
|
-
...
|
|
4394
|
+
...L
|
|
4358
4395
|
}), c === p) {
|
|
4359
4396
|
f.push({
|
|
4360
4397
|
startIndex: c,
|
|
@@ -4370,7 +4407,7 @@ function ol(t, e, n, s, r) {
|
|
|
4370
4407
|
}
|
|
4371
4408
|
return ls(t, e, n, s), l;
|
|
4372
4409
|
}
|
|
4373
|
-
function
|
|
4410
|
+
function hl(t, e, n, s, r) {
|
|
4374
4411
|
const { sectionBreaks: i } = t, { sectionBreaks: o } = e;
|
|
4375
4412
|
if (i == null || o == null)
|
|
4376
4413
|
return;
|
|
@@ -4399,7 +4436,7 @@ function ll(t, e, n, s, r) {
|
|
|
4399
4436
|
}
|
|
4400
4437
|
return ls(t, e, n, s), l;
|
|
4401
4438
|
}
|
|
4402
|
-
function
|
|
4439
|
+
function dl(t, e, n, s, r) {
|
|
4403
4440
|
const { customBlocks: i } = t, { customBlocks: o } = e;
|
|
4404
4441
|
if (i == null || o == null)
|
|
4405
4442
|
return;
|
|
@@ -4428,7 +4465,7 @@ function al(t, e, n, s, r) {
|
|
|
4428
4465
|
}
|
|
4429
4466
|
return ur(t, e, n, s), l;
|
|
4430
4467
|
}
|
|
4431
|
-
function
|
|
4468
|
+
function fl(t, e, n, s, r) {
|
|
4432
4469
|
const { tables: i } = t, { tables: o } = e;
|
|
4433
4470
|
if (i == null || o == null)
|
|
4434
4471
|
return;
|
|
@@ -4457,7 +4494,7 @@ function ul(t, e, n, s, r) {
|
|
|
4457
4494
|
}
|
|
4458
4495
|
return cr(t, e, n, s), l;
|
|
4459
4496
|
}
|
|
4460
|
-
function
|
|
4497
|
+
function gl(t, e, n, s, r) {
|
|
4461
4498
|
t.customRanges || (t.customRanges = []);
|
|
4462
4499
|
const { customRanges: i } = t, { customRanges: o } = e;
|
|
4463
4500
|
if (i == null || o == null)
|
|
@@ -4465,61 +4502,62 @@ function cl(t, e, n, s, r) {
|
|
|
4465
4502
|
let l = [];
|
|
4466
4503
|
return r === Pt.REPLACE && (l = Er(t, n, s)), hr(t, e, 0, s), l;
|
|
4467
4504
|
}
|
|
4468
|
-
function
|
|
4505
|
+
function _l(t, e, n, s, r) {
|
|
4469
4506
|
t.customDecorations || (t.customDecorations = []);
|
|
4470
4507
|
let i = [];
|
|
4471
4508
|
return r === Pt.REPLACE && (i = Rr(t, n, s, !1)), dr(t, e, 0, s), i;
|
|
4472
4509
|
}
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4510
|
+
var Ir = /* @__PURE__ */ ((t) => (t[t.copy = 0] = "copy", t[t.cut = 1] = "cut", t))(Ir || {});
|
|
4511
|
+
function fn(t, e, n, s = !1, r = 1) {
|
|
4512
|
+
const { dataStream: i, textRuns: o = [], paragraphs: l = [], customBlocks: a = [] } = t, h = {
|
|
4513
|
+
dataStream: i.slice(e, n)
|
|
4514
|
+
}, c = [];
|
|
4515
|
+
for (const m of o) {
|
|
4516
|
+
const p = P.deepClone(m), { st: M, ed: L } = p;
|
|
4517
|
+
P.hasIntersectionBetweenTwoRanges(M, L, e, n) && (e >= M && e <= L ? c.push({
|
|
4518
|
+
...p,
|
|
4481
4519
|
st: e,
|
|
4482
|
-
ed: Math.min(n,
|
|
4483
|
-
}) : n >=
|
|
4484
|
-
...
|
|
4485
|
-
st: Math.max(e,
|
|
4520
|
+
ed: Math.min(n, L)
|
|
4521
|
+
}) : n >= M && n <= L ? c.push({
|
|
4522
|
+
...p,
|
|
4523
|
+
st: Math.max(e, M),
|
|
4486
4524
|
ed: n
|
|
4487
|
-
}) :
|
|
4525
|
+
}) : c.push(p));
|
|
4488
4526
|
}
|
|
4489
|
-
|
|
4490
|
-
const { st:
|
|
4527
|
+
c.length ? h.textRuns = c.map((m) => {
|
|
4528
|
+
const { st: p, ed: M } = m;
|
|
4491
4529
|
return {
|
|
4492
|
-
...
|
|
4493
|
-
st:
|
|
4494
|
-
ed:
|
|
4530
|
+
...m,
|
|
4531
|
+
st: p - e,
|
|
4532
|
+
ed: M - e
|
|
4495
4533
|
};
|
|
4496
|
-
}) : s && (
|
|
4534
|
+
}) : s && (h.textRuns = [{
|
|
4497
4535
|
st: 0,
|
|
4498
4536
|
ed: n - e,
|
|
4499
4537
|
ts: {}
|
|
4500
4538
|
}]);
|
|
4501
|
-
const
|
|
4502
|
-
for (const
|
|
4503
|
-
const { startIndex:
|
|
4504
|
-
|
|
4505
|
-
}
|
|
4506
|
-
|
|
4507
|
-
...
|
|
4508
|
-
startIndex:
|
|
4509
|
-
}))),
|
|
4510
|
-
const { customRanges:
|
|
4511
|
-
|
|
4512
|
-
const
|
|
4513
|
-
for (const
|
|
4514
|
-
const { startIndex:
|
|
4515
|
-
|
|
4516
|
-
}
|
|
4517
|
-
return
|
|
4518
|
-
...
|
|
4519
|
-
startIndex:
|
|
4520
|
-
}))),
|
|
4521
|
-
}
|
|
4522
|
-
function
|
|
4539
|
+
const u = [];
|
|
4540
|
+
for (const m of l) {
|
|
4541
|
+
const { startIndex: p } = m;
|
|
4542
|
+
p >= e && p <= n && u.push(P.deepClone(m));
|
|
4543
|
+
}
|
|
4544
|
+
u.length && (h.paragraphs = u.map((m) => ({
|
|
4545
|
+
...m,
|
|
4546
|
+
startIndex: m.startIndex - e
|
|
4547
|
+
}))), r === 1 && (h.customDecorations = pl(t, e, n));
|
|
4548
|
+
const { customRanges: d } = ml(t, e, n);
|
|
4549
|
+
h.customRanges = d;
|
|
4550
|
+
const f = [];
|
|
4551
|
+
for (const m of a) {
|
|
4552
|
+
const { startIndex: p } = m;
|
|
4553
|
+
p >= e && p <= n && f.push(P.deepClone(m));
|
|
4554
|
+
}
|
|
4555
|
+
return f.length && (h.customBlocks = f.map((m) => ({
|
|
4556
|
+
...m,
|
|
4557
|
+
startIndex: m.startIndex - e
|
|
4558
|
+
}))), h;
|
|
4559
|
+
}
|
|
4560
|
+
function sc(t) {
|
|
4523
4561
|
const { dataStream: e, textRuns: n, paragraphs: s, customRanges: r, customDecorations: i } = t;
|
|
4524
4562
|
let o = 0, l = 0;
|
|
4525
4563
|
r == null || r.forEach((h) => {
|
|
@@ -4543,7 +4581,7 @@ function Ju(t) {
|
|
|
4543
4581
|
customDecorations: i
|
|
4544
4582
|
};
|
|
4545
4583
|
}
|
|
4546
|
-
function
|
|
4584
|
+
function ml(t, e, n) {
|
|
4547
4585
|
const { customRanges: s = [] } = t;
|
|
4548
4586
|
let r = 0, i = 0;
|
|
4549
4587
|
const o = s.filter((l) => Math.max(l.startIndex, e) <= Math.min(l.endIndex, n - 1)).map((l) => ({
|
|
@@ -4577,11 +4615,11 @@ function dl(t, e, n) {
|
|
|
4577
4615
|
rightOffset: i
|
|
4578
4616
|
};
|
|
4579
4617
|
}
|
|
4580
|
-
function
|
|
4618
|
+
function pl(t, e, n) {
|
|
4581
4619
|
const { customDecorations: s = [] } = t, r = [];
|
|
4582
4620
|
return s.forEach((i) => {
|
|
4583
4621
|
if (Math.max(i.startIndex, e) <= Math.min(i.endIndex, n - 1)) {
|
|
4584
|
-
const o =
|
|
4622
|
+
const o = P.deepClone(i);
|
|
4585
4623
|
r.push({
|
|
4586
4624
|
...o,
|
|
4587
4625
|
startIndex: Math.max(o.startIndex - e, 0),
|
|
@@ -4601,18 +4639,18 @@ function xs(t, e, n = Pt.COVER) {
|
|
|
4601
4639
|
let c = 0, u = 0;
|
|
4602
4640
|
for (; c < i.length && u < l.length; ) {
|
|
4603
4641
|
const d = i[c], f = l[u], { startIndex: m } = d, { startIndex: p } = f;
|
|
4604
|
-
m === p ? (h.push(
|
|
4642
|
+
m === p ? (h.push(P.deepMerge(d, f)), c++, u++) : m < p ? (h.push(P.deepClone(d)), c++) : (h.push(P.deepClone(f)), u++);
|
|
4605
4643
|
}
|
|
4606
4644
|
return c < i.length && h.push(...i.slice(c)), u < l.length && h.push(...l.slice(u)), h.length && (s.paragraphs = h), s;
|
|
4607
4645
|
}
|
|
4608
|
-
function
|
|
4646
|
+
function El(t) {
|
|
4609
4647
|
const { body: e } = t;
|
|
4610
4648
|
if (e == null)
|
|
4611
4649
|
return !0;
|
|
4612
4650
|
const { textRuns: n = [], paragraphs: s = [] } = e;
|
|
4613
4651
|
return n.length === 0 && s.length === 0;
|
|
4614
4652
|
}
|
|
4615
|
-
function
|
|
4653
|
+
function Rl(t = P.generateRandomId(6), e = ke.EN_US, n = "") {
|
|
4616
4654
|
return {
|
|
4617
4655
|
id: t,
|
|
4618
4656
|
locale: e,
|
|
@@ -4626,9 +4664,9 @@ function _l(t = x.generateRandomId(6), e = ke.EN_US, n = "") {
|
|
|
4626
4664
|
{
|
|
4627
4665
|
startIndex: 0,
|
|
4628
4666
|
paragraphStyle: {
|
|
4629
|
-
spaceAbove: 5,
|
|
4667
|
+
spaceAbove: { v: 5 },
|
|
4630
4668
|
lineSpacing: 1,
|
|
4631
|
-
spaceBelow: 0
|
|
4669
|
+
spaceBelow: { v: 0 }
|
|
4632
4670
|
}
|
|
4633
4671
|
}
|
|
4634
4672
|
],
|
|
@@ -4656,12 +4694,12 @@ function _l(t = x.generateRandomId(6), e = ke.EN_US, n = "") {
|
|
|
4656
4694
|
};
|
|
4657
4695
|
}
|
|
4658
4696
|
var Ft = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4659
|
-
function
|
|
4697
|
+
function Cl(t) {
|
|
4660
4698
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
4661
4699
|
}
|
|
4662
|
-
var Ht = {},
|
|
4700
|
+
var Ht = {}, Or = {}, as = {};
|
|
4663
4701
|
Object.defineProperty(as, "__esModule", { value: !0 });
|
|
4664
|
-
function
|
|
4702
|
+
function Il(t, e) {
|
|
4665
4703
|
if (Array.isArray(e))
|
|
4666
4704
|
return !1;
|
|
4667
4705
|
for (let n in t)
|
|
@@ -4672,7 +4710,7 @@ function pl(t, e) {
|
|
|
4672
4710
|
return !1;
|
|
4673
4711
|
return !0;
|
|
4674
4712
|
}
|
|
4675
|
-
function
|
|
4713
|
+
function Ol(t, e) {
|
|
4676
4714
|
if (!Array.isArray(e) || t.length !== e.length)
|
|
4677
4715
|
return !1;
|
|
4678
4716
|
for (let n = 0; n < t.length; n++)
|
|
@@ -4681,7 +4719,7 @@ function El(t, e) {
|
|
|
4681
4719
|
return !0;
|
|
4682
4720
|
}
|
|
4683
4721
|
function us(t, e) {
|
|
4684
|
-
return t === e ? !0 : t === null || e === null || typeof t != "object" || typeof e != "object" ? !1 : Array.isArray(t) ?
|
|
4722
|
+
return t === e ? !0 : t === null || e === null || typeof t != "object" || typeof e != "object" ? !1 : Array.isArray(t) ? Ol(t, e) : Il(t, e);
|
|
4685
4723
|
}
|
|
4686
4724
|
as.default = us;
|
|
4687
4725
|
var cs = {};
|
|
@@ -4866,9 +4904,9 @@ var hs = {};
|
|
|
4866
4904
|
throw Error("Cannot merge into my own tree");
|
|
4867
4905
|
const f = this.lcIdx, m = this.parents.length;
|
|
4868
4906
|
let p = 0;
|
|
4869
|
-
for (let
|
|
4870
|
-
const
|
|
4871
|
-
typeof
|
|
4907
|
+
for (let M = 0; M < u.length; M++) {
|
|
4908
|
+
const L = u[M];
|
|
4909
|
+
typeof L == "string" || typeof L == "number" ? (p++, this.descend(L)) : Array.isArray(L) ? this.mergeTree(L, d) : typeof L == "object" && d(L, this);
|
|
4872
4910
|
}
|
|
4873
4911
|
for (; p--; )
|
|
4874
4912
|
this.ascend();
|
|
@@ -4897,18 +4935,18 @@ var hs = {};
|
|
|
4897
4935
|
function a(c, u, d) {
|
|
4898
4936
|
let f, m;
|
|
4899
4937
|
m = f = c ? c.descendFirst() : !1;
|
|
4900
|
-
function p(
|
|
4901
|
-
let
|
|
4938
|
+
function p(M) {
|
|
4939
|
+
let L;
|
|
4902
4940
|
for (; m; ) {
|
|
4903
|
-
const Z =
|
|
4904
|
-
if (
|
|
4941
|
+
const Z = L = c.getKey();
|
|
4942
|
+
if (M != null) {
|
|
4905
4943
|
let gt = !1;
|
|
4906
|
-
if (u && typeof Z == "number" && (
|
|
4944
|
+
if (u && typeof Z == "number" && (L = u(Z, c.getComponent()), L < 0 && (L = ~L, gt = !0)), s(L, M))
|
|
4907
4945
|
return null;
|
|
4908
|
-
if (
|
|
4946
|
+
if (L === M && !gt)
|
|
4909
4947
|
return c;
|
|
4910
4948
|
}
|
|
4911
|
-
d && typeof
|
|
4949
|
+
d && typeof L == "number" && d(L, c.getComponent()), m = c.nextSibling();
|
|
4912
4950
|
}
|
|
4913
4951
|
return null;
|
|
4914
4952
|
}
|
|
@@ -4918,12 +4956,12 @@ var hs = {};
|
|
|
4918
4956
|
}
|
|
4919
4957
|
t.advancer = a;
|
|
4920
4958
|
function h(c, u, d) {
|
|
4921
|
-
let f, m, p,
|
|
4922
|
-
for (f = m = c && c.descendFirst(), p =
|
|
4923
|
-
let
|
|
4924
|
-
|
|
4959
|
+
let f, m, p, M;
|
|
4960
|
+
for (f = m = c && c.descendFirst(), p = M = u && u.descendFirst(); f || p; ) {
|
|
4961
|
+
let L = f ? c.getKey() : null, Z = p ? u.getKey() : null;
|
|
4962
|
+
L !== null && Z !== null && (s(Z, L) ? Z = null : L !== Z && (L = null)), d(L == null ? Z : L, L != null ? c : null, Z != null ? u : null), L != null && f && (f = c.nextSibling()), Z != null && p && (p = u.nextSibling());
|
|
4925
4963
|
}
|
|
4926
|
-
m && c.ascend(),
|
|
4964
|
+
m && c.ascend(), M && u.ascend();
|
|
4927
4965
|
}
|
|
4928
4966
|
t.eachChildOf = h;
|
|
4929
4967
|
})(hs);
|
|
@@ -5146,10 +5184,10 @@ function Yn() {
|
|
|
5146
5184
|
}
|
|
5147
5185
|
return E;
|
|
5148
5186
|
}, p = (E, O) => typeof E == "number" ? m(E, O) : E.map((A) => m(A, O));
|
|
5149
|
-
function
|
|
5187
|
+
function M(E, O, A) {
|
|
5150
5188
|
return r(E, (z, et) => typeof z == "object" && typeof z.d == "number" ? { d: A.slice(O, et, et + z.d) } : z);
|
|
5151
5189
|
}
|
|
5152
|
-
function
|
|
5190
|
+
function L(E) {
|
|
5153
5191
|
return r(E, (O) => {
|
|
5154
5192
|
switch (typeof O) {
|
|
5155
5193
|
case "object":
|
|
@@ -5216,12 +5254,12 @@ function Yn() {
|
|
|
5216
5254
|
transformSelection: p,
|
|
5217
5255
|
isInvertible: gt,
|
|
5218
5256
|
makeInvertible(O, A) {
|
|
5219
|
-
return
|
|
5257
|
+
return M(O, A, E);
|
|
5220
5258
|
},
|
|
5221
5259
|
stripInvertible: Z,
|
|
5222
|
-
invert:
|
|
5260
|
+
invert: L,
|
|
5223
5261
|
invertWithDoc(O, A) {
|
|
5224
|
-
return
|
|
5262
|
+
return L(M(O, A, E));
|
|
5225
5263
|
},
|
|
5226
5264
|
isNoop: (O) => O.length === 0
|
|
5227
5265
|
};
|
|
@@ -5230,7 +5268,7 @@ function Yn() {
|
|
|
5230
5268
|
}(Dn)), Dn;
|
|
5231
5269
|
}
|
|
5232
5270
|
var rn = {}, ks;
|
|
5233
|
-
function
|
|
5271
|
+
function Nl() {
|
|
5234
5272
|
if (ks) return rn;
|
|
5235
5273
|
ks = 1, Object.defineProperty(rn, "__esModule", { value: !0 });
|
|
5236
5274
|
const t = Yn(), e = fs();
|
|
@@ -5274,7 +5312,7 @@ function Rl() {
|
|
|
5274
5312
|
return rn.default = n, n.provides = { text: !0 }, rn;
|
|
5275
5313
|
}
|
|
5276
5314
|
var Hs;
|
|
5277
|
-
function
|
|
5315
|
+
function Sl() {
|
|
5278
5316
|
return Hs || (Hs = 1, function(t) {
|
|
5279
5317
|
var e = Ft && Ft.__createBinding || (Object.create ? function(d, f, m, p) {
|
|
5280
5318
|
p === void 0 && (p = m), Object.defineProperty(d, p, { enumerable: !0, get: function() {
|
|
@@ -5295,7 +5333,7 @@ function Cl() {
|
|
|
5295
5333
|
return d && d.__esModule ? d : { default: d };
|
|
5296
5334
|
};
|
|
5297
5335
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.type = t.remove = t.insert = void 0;
|
|
5298
|
-
const i = fs(), o = s(Yn()), l = r(
|
|
5336
|
+
const i = fs(), o = s(Yn()), l = r(Nl()), a = {
|
|
5299
5337
|
create(d) {
|
|
5300
5338
|
return d;
|
|
5301
5339
|
},
|
|
@@ -5355,23 +5393,23 @@ function Cl() {
|
|
|
5355
5393
|
isNoop: (_) => _ == null,
|
|
5356
5394
|
setDebug(_) {
|
|
5357
5395
|
},
|
|
5358
|
-
registerSubtype:
|
|
5396
|
+
registerSubtype: L,
|
|
5359
5397
|
checkValidOp: et,
|
|
5360
5398
|
normalize: X,
|
|
5361
5399
|
apply: Wt,
|
|
5362
5400
|
transformPosition: It,
|
|
5363
5401
|
compose: ct,
|
|
5364
5402
|
tryTransform: wn,
|
|
5365
|
-
transform:
|
|
5403
|
+
transform: $r,
|
|
5366
5404
|
makeInvertible: Bt,
|
|
5367
5405
|
invert: Rt,
|
|
5368
|
-
invertWithDoc:
|
|
5406
|
+
invertWithDoc: Fr,
|
|
5369
5407
|
RM_UNEXPECTED_CONTENT: i.ConflictType.RM_UNEXPECTED_CONTENT,
|
|
5370
5408
|
DROP_COLLISION: i.ConflictType.DROP_COLLISION,
|
|
5371
5409
|
BLACKHOLE: i.ConflictType.BLACKHOLE,
|
|
5372
5410
|
transformNoConflict: (_, R, S) => Rs(() => !0, _, R, S),
|
|
5373
5411
|
typeAllowingConflictsPred: (_) => Object.assign(Object.assign({}, t.type), {
|
|
5374
|
-
transform: (R, S,
|
|
5412
|
+
transform: (R, S, U) => Rs(_, R, S, U)
|
|
5375
5413
|
})
|
|
5376
5414
|
};
|
|
5377
5415
|
const l = (_) => _ ? _.getComponent() : null;
|
|
@@ -5385,31 +5423,31 @@ function Cl() {
|
|
|
5385
5423
|
function f(_, R, S) {
|
|
5386
5424
|
return typeof R == "number" ? (o(_ != null, "Container is missing for key"), o(Array.isArray(_), "Cannot use numerical key for object container"), o(_.length >= R, "Cannot insert into out of bounds index"), _.splice(R, 0, S)) : (o(a(_), "Cannot insert into missing item"), o(_[R] === void 0, "Trying to overwrite value at key. Your op needs to remove it first"), _[R] = S), S;
|
|
5387
5425
|
}
|
|
5388
|
-
t.removeOp = (_, R = !0) => r.writeCursor().writeAtPath(_, "r", R).get(), t.moveOp = (_, R) => r.writeCursor().writeMove(_, R).get(), t.insertOp = (_, R) => r.writeCursor().writeAtPath(_, "i", R).get(), t.replaceOp = (_, R, S) => r.writeCursor().at(_, (
|
|
5389
|
-
|
|
5390
|
-
}).get(), t.editOp = (_, R, S,
|
|
5391
|
-
const m = (_, R) => _ != null && (typeof R == "number" ? Array.isArray(_) : typeof _ == "object"), p = (_, R) => m(_, R) ? _[R] : void 0,
|
|
5392
|
-
function
|
|
5426
|
+
t.removeOp = (_, R = !0) => r.writeCursor().writeAtPath(_, "r", R).get(), t.moveOp = (_, R) => r.writeCursor().writeMove(_, R).get(), t.insertOp = (_, R) => r.writeCursor().writeAtPath(_, "i", R).get(), t.replaceOp = (_, R, S) => r.writeCursor().at(_, (U) => {
|
|
5427
|
+
U.write("r", R), U.write("i", S);
|
|
5428
|
+
}).get(), t.editOp = (_, R, S, U = !1) => r.writeCursor().at(_, (w) => O(w, R, S, U)).get();
|
|
5429
|
+
const m = (_, R) => _ != null && (typeof R == "number" ? Array.isArray(_) : typeof _ == "object"), p = (_, R) => m(_, R) ? _[R] : void 0, M = {};
|
|
5430
|
+
function L(_) {
|
|
5393
5431
|
let R = _.type ? _.type : _;
|
|
5394
|
-
R.name && (
|
|
5432
|
+
R.name && (M[R.name] = R), R.uri && (M[R.uri] = R);
|
|
5395
5433
|
}
|
|
5396
5434
|
const Z = (_) => {
|
|
5397
|
-
const R =
|
|
5435
|
+
const R = M[_];
|
|
5398
5436
|
if (R) return R;
|
|
5399
5437
|
throw Error("Missing type: " + _);
|
|
5400
5438
|
};
|
|
5401
|
-
|
|
5439
|
+
L(Sl());
|
|
5402
5440
|
const gt = (_, R) => _ + R;
|
|
5403
|
-
|
|
5441
|
+
L({
|
|
5404
5442
|
name: "number",
|
|
5405
5443
|
apply: gt,
|
|
5406
5444
|
compose: gt,
|
|
5407
5445
|
invert: (_) => -_,
|
|
5408
5446
|
transform: (_) => _
|
|
5409
5447
|
});
|
|
5410
|
-
const ut = (_) => _ == null ? null : _.et ? Z(_.et) : _.es ?
|
|
5448
|
+
const ut = (_) => _ == null ? null : _.et ? Z(_.et) : _.es ? M["text-unicode"] : _.ena != null ? M.number : null, E = (_) => _.es ? _.es : _.ena != null ? _.ena : _.e, O = (_, R, S, U = !1) => {
|
|
5411
5449
|
const [w, T] = typeof R == "string" ? [Z(R), R] : [R, R.name];
|
|
5412
|
-
!
|
|
5450
|
+
!U && w.isNoop && w.isNoop(S) || (T === "number" ? _.write("ena", S) : T === "text-unicode" ? _.write("es", S) : (_.write("et", T), _.write("e", S)));
|
|
5413
5451
|
};
|
|
5414
5452
|
function A(_) {
|
|
5415
5453
|
o(typeof _ == "number"), o(_ >= 0), o(_ === (0 | _));
|
|
@@ -5419,7 +5457,7 @@ function Cl() {
|
|
|
5419
5457
|
}
|
|
5420
5458
|
function et(_) {
|
|
5421
5459
|
if (_ === null) return;
|
|
5422
|
-
const R = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(),
|
|
5460
|
+
const R = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), U = (T) => {
|
|
5423
5461
|
let G = !0, W = !1;
|
|
5424
5462
|
for (let C in T) {
|
|
5425
5463
|
const N = T[C];
|
|
@@ -5446,7 +5484,7 @@ function Cl() {
|
|
|
5446
5484
|
I === H ? o(b < j, "descent keys are not in order") : o(I === "number" && H === "string");
|
|
5447
5485
|
}
|
|
5448
5486
|
b = j, N++, C = 3;
|
|
5449
|
-
} else typeof B == "object" ? (o(C === 1, `Prev not scalar - instead ${C}`),
|
|
5487
|
+
} else typeof B == "object" ? (o(C === 1, `Prev not scalar - instead ${C}`), U(B), C = 2) : (o(C !== 3), z(B), o(r.isValidPathItem(B), "Invalid path key"), C = 1);
|
|
5450
5488
|
}
|
|
5451
5489
|
return o(N !== 1, "Operation makes multiple descents. Remove some []"), o(C === 2 || C === 3), T[0];
|
|
5452
5490
|
};
|
|
@@ -5455,8 +5493,8 @@ function Cl() {
|
|
|
5455
5493
|
}
|
|
5456
5494
|
function X(_) {
|
|
5457
5495
|
let R = 0, S = [];
|
|
5458
|
-
const
|
|
5459
|
-
return
|
|
5496
|
+
const U = r.writeCursor();
|
|
5497
|
+
return U.mergeTree(_, (w, T) => {
|
|
5460
5498
|
const G = ut(w);
|
|
5461
5499
|
if (G) {
|
|
5462
5500
|
const C = E(w);
|
|
@@ -5467,12 +5505,12 @@ function Cl() {
|
|
|
5467
5505
|
T.write(C, N);
|
|
5468
5506
|
}
|
|
5469
5507
|
var W;
|
|
5470
|
-
}),
|
|
5508
|
+
}), U.get();
|
|
5471
5509
|
}
|
|
5472
5510
|
function Wt(_, R) {
|
|
5473
5511
|
if (et(R), R === null) return _;
|
|
5474
5512
|
const S = [];
|
|
5475
|
-
return function
|
|
5513
|
+
return function U(w, T) {
|
|
5476
5514
|
let G = w, W = 0, C = {
|
|
5477
5515
|
root: w
|
|
5478
5516
|
}, N = 0, b = C, v = "root";
|
|
@@ -5485,7 +5523,7 @@ function Cl() {
|
|
|
5485
5523
|
for (; W < T.length; W++) {
|
|
5486
5524
|
const j = T[W];
|
|
5487
5525
|
if (Array.isArray(j)) {
|
|
5488
|
-
const I =
|
|
5526
|
+
const I = U(G, j);
|
|
5489
5527
|
I !== G && I !== void 0 && (B(), G = b[v] = I);
|
|
5490
5528
|
} else if (typeof j == "object") {
|
|
5491
5529
|
j.d != null ? (B(), G = f(b, v, S[j.d])) : j.i !== void 0 && (B(), G = f(b, v, j.i));
|
|
@@ -5495,7 +5533,7 @@ function Cl() {
|
|
|
5495
5533
|
} else G = p(G, j);
|
|
5496
5534
|
}
|
|
5497
5535
|
return C.root;
|
|
5498
|
-
}(_ = function
|
|
5536
|
+
}(_ = function U(w, T) {
|
|
5499
5537
|
const G = [];
|
|
5500
5538
|
let W = 0;
|
|
5501
5539
|
for (; W < T.length; W++) {
|
|
@@ -5503,7 +5541,7 @@ function Cl() {
|
|
|
5503
5541
|
if (Array.isArray(v)) break;
|
|
5504
5542
|
typeof v != "object" && (G.push(w), w = p(w, v));
|
|
5505
5543
|
}
|
|
5506
|
-
for (let v = T.length - 1; v >= W; v--) w =
|
|
5544
|
+
for (let v = T.length - 1; v >= W; v--) w = U(w, T[v]);
|
|
5507
5545
|
for (--W; W >= 0; W--) {
|
|
5508
5546
|
const v = T[W];
|
|
5509
5547
|
if (typeof v != "object") {
|
|
@@ -5518,11 +5556,11 @@ function Cl() {
|
|
|
5518
5556
|
function It(_, R) {
|
|
5519
5557
|
_ = _.slice(), et(R);
|
|
5520
5558
|
const S = r.readCursor(R);
|
|
5521
|
-
let
|
|
5559
|
+
let U, w, T = !1;
|
|
5522
5560
|
const G = [];
|
|
5523
5561
|
for (let C = 0; ; C++) {
|
|
5524
5562
|
const N = _[C], b = S.getComponent();
|
|
5525
|
-
if (b && (b.r !== void 0 ? T = !0 : b.p != null && (T = !1,
|
|
5563
|
+
if (b && (b.r !== void 0 ? T = !0 : b.p != null && (T = !1, U = b.p, w = C)), C >= _.length) break;
|
|
5526
5564
|
let v = 0;
|
|
5527
5565
|
const B = r.advancer(S, void 0, (I, H) => {
|
|
5528
5566
|
c(H) && v++;
|
|
@@ -5534,7 +5572,7 @@ function Cl() {
|
|
|
5534
5572
|
if (G.forEach((C) => C.end()), T) return null;
|
|
5535
5573
|
const W = () => {
|
|
5536
5574
|
let C = 0;
|
|
5537
|
-
if (
|
|
5575
|
+
if (U != null) {
|
|
5538
5576
|
const N = S.getPath();
|
|
5539
5577
|
C = N.length, _ = N.concat(_.slice(w));
|
|
5540
5578
|
}
|
|
@@ -5552,17 +5590,17 @@ function Cl() {
|
|
|
5552
5590
|
if (typeof N == "number" && (_[C] += B), !j) break;
|
|
5553
5591
|
}
|
|
5554
5592
|
};
|
|
5555
|
-
return
|
|
5556
|
-
C ===
|
|
5593
|
+
return U != null ? S.eachDrop(null, (C) => {
|
|
5594
|
+
C === U && W();
|
|
5557
5595
|
}) : W(), _;
|
|
5558
5596
|
}
|
|
5559
5597
|
function ct(_, R) {
|
|
5560
5598
|
if (et(_), et(R), _ == null) return R;
|
|
5561
5599
|
if (R == null) return _;
|
|
5562
5600
|
let S = 0;
|
|
5563
|
-
const
|
|
5564
|
-
|
|
5565
|
-
I.p != null && (C[I.p] =
|
|
5601
|
+
const U = r.readCursor(_), w = r.readCursor(R), T = r.writeCursor(), G = [], W = [], C = [], N = [], b = [], v = [], B = /* @__PURE__ */ new Set();
|
|
5602
|
+
U.traverse(null, (I) => {
|
|
5603
|
+
I.p != null && (C[I.p] = U.clone());
|
|
5566
5604
|
}), w.traverse(null, (I) => {
|
|
5567
5605
|
I.d != null && (N[I.d] = w.clone());
|
|
5568
5606
|
});
|
|
@@ -5573,59 +5611,59 @@ function Cl() {
|
|
|
5573
5611
|
if ($t != null) q = N[$t], Dt = W[$t] = new r.WriteCursor();
|
|
5574
5612
|
else if (Gt && Gt.r !== void 0) q = null;
|
|
5575
5613
|
else {
|
|
5576
|
-
const
|
|
5577
|
-
|
|
5614
|
+
const x = l(q);
|
|
5615
|
+
x && x.d != null && (q = null);
|
|
5578
5616
|
}
|
|
5579
5617
|
const rt = l(q);
|
|
5580
5618
|
if (jt != null) if (H = C[jt], vt = G[jt] = new r.WriteCursor(), le) oe && !Xt && vt.write("r", !0);
|
|
5581
5619
|
else {
|
|
5582
|
-
const
|
|
5583
|
-
Dt.write("d",
|
|
5620
|
+
const x = b[jt] = S++;
|
|
5621
|
+
Dt.write("d", x);
|
|
5584
5622
|
}
|
|
5585
5623
|
else if (pt && pt.i !== void 0) H = null;
|
|
5586
5624
|
else {
|
|
5587
|
-
const
|
|
5588
|
-
|
|
5625
|
+
const x = l(H);
|
|
5626
|
+
x && x.p != null && (H = null);
|
|
5589
5627
|
}
|
|
5590
|
-
let
|
|
5591
|
-
me ? (o(mt === void 0),
|
|
5592
|
-
const V = ($t == null ? !me || oe || Xt :
|
|
5628
|
+
let y;
|
|
5629
|
+
me ? (o(mt === void 0), y = pt.i) : y = mt;
|
|
5630
|
+
const V = ($t == null ? !me || oe || Xt : y === void 0) ? null : Dt.getComponent();
|
|
5593
5631
|
if ($t != null) {
|
|
5594
5632
|
if (!(mt !== void 0 || me)) {
|
|
5595
|
-
const
|
|
5596
|
-
v[$t] =
|
|
5633
|
+
const x = jt != null ? b[jt] : S++;
|
|
5634
|
+
v[$t] = x, vt.write("p", x);
|
|
5597
5635
|
}
|
|
5598
5636
|
} else Xt && (me || mt !== void 0 || (Gt.r, vt.write("r", Gt.r)));
|
|
5599
|
-
const k = le ? null : ut(pt),
|
|
5600
|
-
if ((k ||
|
|
5601
|
-
o(k ===
|
|
5602
|
-
const
|
|
5637
|
+
const k = le ? null : ut(pt), D = ut(rt);
|
|
5638
|
+
if ((k || D) && (k && k.name, D && D.name), k && D) {
|
|
5639
|
+
o(k === D);
|
|
5640
|
+
const x = E(pt), K = E(rt), St = k.compose(x, K);
|
|
5603
5641
|
O(Dt, k, St), B.add(rt);
|
|
5604
|
-
} else k ? O(Dt, k, E(pt)) :
|
|
5605
|
-
const F = typeof
|
|
5642
|
+
} else k ? O(Dt, k, E(pt)) : D && (O(Dt, D, E(rt)), B.add(rt));
|
|
5643
|
+
const F = typeof y == "object" && y != null;
|
|
5606
5644
|
let nt = !1, st = 0, ot = 0, Nt = 0, Ot = 0, Et = 0;
|
|
5607
|
-
const
|
|
5645
|
+
const Lt = r.advancer(q, (x, K) => u(K) ? Ot - x - 1 : x - Ot, (x, K) => {
|
|
5608
5646
|
u(K) && Ot++;
|
|
5609
|
-
}), J = r.advancer(H, (
|
|
5647
|
+
}), J = r.advancer(H, (x, K) => c(K) ? st - x - 1 : x - st, (x, K) => {
|
|
5610
5648
|
c(K) && st++;
|
|
5611
5649
|
});
|
|
5612
|
-
if (r.eachChildOf(ht, lt, (
|
|
5613
|
-
let xt, ae, pe =
|
|
5614
|
-
if (typeof
|
|
5615
|
-
let Tt =
|
|
5616
|
-
ae =
|
|
5617
|
-
let Ct =
|
|
5618
|
-
xt = J(Ct), u(l(ae)) && (xt = null), pe = Ct + st, Fe =
|
|
5650
|
+
if (r.eachChildOf(ht, lt, (x, K, St) => {
|
|
5651
|
+
let xt, ae, pe = x, qt = x, Fe = x;
|
|
5652
|
+
if (typeof x == "number") {
|
|
5653
|
+
let Tt = x + Nt;
|
|
5654
|
+
ae = Lt(Tt), qt = Tt + Ot;
|
|
5655
|
+
let Ct = x + ot;
|
|
5656
|
+
xt = J(Ct), u(l(ae)) && (xt = null), pe = Ct + st, Fe = x + Et, o(pe >= 0, "p1PickKey is negative"), o(qt >= 0, "p2DropKey is negative");
|
|
5619
5657
|
const Zt = u(l(K)), ue = c(l(St));
|
|
5620
5658
|
(Zt || ue && !le) && Et--, Zt && ot--, ue && Nt--;
|
|
5621
|
-
} else xt = J(
|
|
5659
|
+
} else xt = J(x), ae = Lt(x);
|
|
5622
5660
|
vt.descend(pe), Dt.descend(qt);
|
|
5623
|
-
const ve = F && !u(l(K)) ?
|
|
5661
|
+
const ve = F && !u(l(K)) ? y[Fe] : void 0, ee = I(xt, K, St, ae, ve, le, Dt, vt);
|
|
5624
5662
|
var ne, $, _t;
|
|
5625
|
-
F && !le ? ve !== ee && (nt || (
|
|
5626
|
-
}), J.end(),
|
|
5627
|
-
else if (!oe && !Xt && $t == null) return
|
|
5628
|
-
}(
|
|
5663
|
+
F && !le ? ve !== ee && (nt || (y = Array.isArray(y) ? y.slice() : Object.assign({}, y), nt = !0), ne = y, _t = ee, typeof ($ = Fe) == "number" ? (o(Array.isArray(ne)), o($ < ne.length)) : (o(!Array.isArray(ne)), o(ne[$] !== void 0)), _t === void 0 ? typeof $ == "number" ? ne.splice($, 1) : delete ne[$] : ne[$] = _t) : o(ee === void 0), Dt.ascend(), vt.ascend();
|
|
5664
|
+
}), J.end(), Lt.end(), V != null) V.i = y;
|
|
5665
|
+
else if (!oe && !Xt && $t == null) return y;
|
|
5666
|
+
}(U, U.clone(), w, w.clone(), void 0, !1, T, j), T.reset(), T.mergeTree(j.get()), T.reset(), T.get(), G.map((I) => I.get()), W.map((I) => I.get()), U.traverse(T, (I, H) => {
|
|
5629
5667
|
const ht = I.p;
|
|
5630
5668
|
if (ht != null) {
|
|
5631
5669
|
const lt = b[ht];
|
|
@@ -5648,7 +5686,7 @@ function Cl() {
|
|
|
5648
5686
|
function Rt(_) {
|
|
5649
5687
|
if (_ == null) return null;
|
|
5650
5688
|
const R = new r.ReadCursor(_), S = new r.WriteCursor();
|
|
5651
|
-
let
|
|
5689
|
+
let U;
|
|
5652
5690
|
const w = [], T = [];
|
|
5653
5691
|
return function G(W, C, N) {
|
|
5654
5692
|
const b = W.getComponent();
|
|
@@ -5656,7 +5694,7 @@ function Cl() {
|
|
|
5656
5694
|
if (b) {
|
|
5657
5695
|
b.p != null && (C.write("d", b.p), w[b.p] = W.clone()), b.r !== void 0 && C.write("i", b.r), b.d != null && (C.write("p", b.d), N = void 0), b.i !== void 0 && (N = v = b.i);
|
|
5658
5696
|
const I = ut(b);
|
|
5659
|
-
I && (N === void 0 ? (
|
|
5697
|
+
I && (N === void 0 ? (U || (U = /* @__PURE__ */ new Set()), U.add(b)) : (E(b), N = I.apply(N, E(b)), B = !0));
|
|
5660
5698
|
}
|
|
5661
5699
|
let j = 0;
|
|
5662
5700
|
for (const I of W) {
|
|
@@ -5672,11 +5710,11 @@ function Cl() {
|
|
|
5672
5710
|
}
|
|
5673
5711
|
if (v === void 0) return B ? N : void 0;
|
|
5674
5712
|
C.write("r", N);
|
|
5675
|
-
}(R, S, void 0),
|
|
5713
|
+
}(R, S, void 0), U && (S.reset(), function G(W, C, N) {
|
|
5676
5714
|
const b = C.getComponent();
|
|
5677
5715
|
if (b) {
|
|
5678
5716
|
const I = b.d;
|
|
5679
|
-
if (I != null && (W = w[I], N = T[I] = r.writeCursor()),
|
|
5717
|
+
if (I != null && (W = w[I], N = T[I] = r.writeCursor()), U.has(b)) {
|
|
5680
5718
|
const H = ut(b);
|
|
5681
5719
|
if (!H.invert) throw Error(`Cannot invert subtype ${H.name}`);
|
|
5682
5720
|
O(N, H, H.invert(E(b)));
|
|
@@ -5705,7 +5743,7 @@ function Cl() {
|
|
|
5705
5743
|
var N;
|
|
5706
5744
|
return C.r !== void 0 || ((N = ut(C)) === null || N === void 0 ? void 0 : N.makeInvertible) != null;
|
|
5707
5745
|
})) return _;
|
|
5708
|
-
const S = new r.ReadCursor(_),
|
|
5746
|
+
const S = new r.ReadCursor(_), U = new r.WriteCursor();
|
|
5709
5747
|
let w = !1;
|
|
5710
5748
|
const T = [], G = [], W = (C, N, b) => {
|
|
5711
5749
|
const v = C.getComponent();
|
|
@@ -5725,7 +5763,7 @@ function Cl() {
|
|
|
5725
5763
|
}
|
|
5726
5764
|
return v && (v.r !== void 0 ? (N.write("r", s.default(b)), b = void 0) : v.p != null && (b = void 0)), b;
|
|
5727
5765
|
};
|
|
5728
|
-
return W(S,
|
|
5766
|
+
return W(S, U, R), U.get(), w && (U.reset(), function C(N, b, v, B, j) {
|
|
5729
5767
|
const I = b.getComponent();
|
|
5730
5768
|
if (I) {
|
|
5731
5769
|
I.i !== void 0 ? (B = I.i, j = !0) : I.d != null && (B = G[I.d], N = T[I.d], j = !1, I.d);
|
|
@@ -5747,23 +5785,23 @@ function Cl() {
|
|
|
5747
5785
|
v.descend(q), C(lt(q), b, v, mt, j), v.ascend();
|
|
5748
5786
|
}
|
|
5749
5787
|
lt.end();
|
|
5750
|
-
}(S.clone(), S,
|
|
5788
|
+
}(S.clone(), S, U, R, !1)), U.get();
|
|
5751
5789
|
}
|
|
5752
|
-
function
|
|
5790
|
+
function Fr(_, R) {
|
|
5753
5791
|
return Rt(Bt(_, R));
|
|
5754
5792
|
}
|
|
5755
5793
|
const Sn = (_) => {
|
|
5756
5794
|
if (_ == null) return null;
|
|
5757
5795
|
const R = _.slice();
|
|
5758
5796
|
for (let S = 0; S < _.length; S++) {
|
|
5759
|
-
const
|
|
5760
|
-
Array.isArray(
|
|
5797
|
+
const U = R[S];
|
|
5798
|
+
Array.isArray(U) && (R[S] = Sn(U));
|
|
5761
5799
|
}
|
|
5762
5800
|
return R;
|
|
5763
5801
|
};
|
|
5764
5802
|
function wn(_, R, S) {
|
|
5765
5803
|
o(S === "left" || S === "right", "Direction must be left or right");
|
|
5766
|
-
const
|
|
5804
|
+
const U = S === "left" ? 0 : 1;
|
|
5767
5805
|
if (R == null) return {
|
|
5768
5806
|
ok: !0,
|
|
5769
5807
|
result: _
|
|
@@ -5773,47 +5811,47 @@ function Cl() {
|
|
|
5773
5811
|
const T = [], G = [], W = [], C = [], N = [], b = [], v = [], B = [], j = [], I = [], H = [], ht = [], lt = [], q = [], mt = [];
|
|
5774
5812
|
let oe = 0;
|
|
5775
5813
|
const Dt = r.readCursor(_), vt = r.readCursor(R), pt = r.writeCursor();
|
|
5776
|
-
if (function rt(
|
|
5777
|
-
const
|
|
5778
|
-
|
|
5779
|
-
const F =
|
|
5814
|
+
if (function rt(y, V = null, k) {
|
|
5815
|
+
const D = l(V);
|
|
5816
|
+
D && (D.r !== void 0 ? k = V.clone() : D.p != null && (k = null, b[D.p] = y.clone()));
|
|
5817
|
+
const F = y.getComponent();
|
|
5780
5818
|
let nt;
|
|
5781
|
-
F && (nt = F.p) != null && (N[nt] = V ? V.clone() : null, W[nt] =
|
|
5819
|
+
F && (nt = F.p) != null && (N[nt] = V ? V.clone() : null, W[nt] = y.clone(), k && (I[nt] = !0, j[nt] = k), D && D.p != null && (q[nt] = D.p));
|
|
5782
5820
|
const st = r.advancer(V);
|
|
5783
|
-
for (const ot of
|
|
5821
|
+
for (const ot of y) rt(y, st(ot), k);
|
|
5784
5822
|
st.end();
|
|
5785
|
-
}(vt, Dt, null), function rt(
|
|
5823
|
+
}(vt, Dt, null), function rt(y, V, k, D, F) {
|
|
5786
5824
|
const nt = k.getComponent();
|
|
5787
5825
|
let st, ot = !1;
|
|
5788
|
-
nt && ((st = nt.d) != null ? (C[st] = k.clone(),
|
|
5826
|
+
nt && ((st = nt.d) != null ? (C[st] = k.clone(), D != null && (mt[D] == null && (mt[D] = []), mt[D].push(st)), y = N[st] || null, V = W[st] || null, I[st] ? (F && (H[st] = !0), F = j[st] || null) : !F || U !== 1 && q[st] != null || w == null && (w = {
|
|
5789
5827
|
type: i.ConflictType.RM_UNEXPECTED_CONTENT,
|
|
5790
5828
|
op1: t.removeOp(F.getPath()),
|
|
5791
5829
|
op2: t.moveOp(V.getPath(), k.getPath())
|
|
5792
|
-
}), ot = !0) : nt.i !== void 0 && (
|
|
5830
|
+
}), ot = !0) : nt.i !== void 0 && (y = V = null, ot = !0, F && w == null && (w = {
|
|
5793
5831
|
type: i.ConflictType.RM_UNEXPECTED_CONTENT,
|
|
5794
5832
|
op1: t.removeOp(F.getPath()),
|
|
5795
5833
|
op2: t.insertOp(k.getPath(), nt.i)
|
|
5796
5834
|
})));
|
|
5797
|
-
const Nt = l(
|
|
5798
|
-
Nt && (Nt.r !== void 0 ? F =
|
|
5835
|
+
const Nt = l(y);
|
|
5836
|
+
Nt && (Nt.r !== void 0 ? F = y.clone() : Nt.p != null && (Nt.p, D = Nt.p, F = null));
|
|
5799
5837
|
const Ot = ut(nt);
|
|
5800
5838
|
Ot && F && w == null && (w = {
|
|
5801
5839
|
type: i.ConflictType.RM_UNEXPECTED_CONTENT,
|
|
5802
5840
|
op1: t.removeOp(F.getPath()),
|
|
5803
5841
|
op2: t.editOp(k.getPath(), Ot, E(nt), !0)
|
|
5804
5842
|
});
|
|
5805
|
-
let Et = 0,
|
|
5843
|
+
let Et = 0, Lt = 0;
|
|
5806
5844
|
const J = r.advancer(V, (K, St) => c(St) ? Et - K - 1 : K - Et, (K, St) => {
|
|
5807
5845
|
c(St) && Et++;
|
|
5808
|
-
}),
|
|
5846
|
+
}), x = r.advancer(y);
|
|
5809
5847
|
for (const K of k) if (typeof K == "number") {
|
|
5810
|
-
const St = K -
|
|
5811
|
-
|
|
5848
|
+
const St = K - Lt, xt = J(St);
|
|
5849
|
+
Lt += +rt(x(St + Et), xt, k, D, F);
|
|
5812
5850
|
} else {
|
|
5813
5851
|
const St = J(K);
|
|
5814
|
-
rt(
|
|
5852
|
+
rt(x(K), St, k, D, F);
|
|
5815
5853
|
}
|
|
5816
|
-
return J.end(),
|
|
5854
|
+
return J.end(), x.end(), ot;
|
|
5817
5855
|
}(Dt, vt, vt.clone(), null, null), C.map((rt) => rt && rt.get()), w) return {
|
|
5818
5856
|
ok: !1,
|
|
5819
5857
|
conflict: w
|
|
@@ -5821,38 +5859,38 @@ function Cl() {
|
|
|
5821
5859
|
H.map((rt) => !!rt);
|
|
5822
5860
|
const Gt = [];
|
|
5823
5861
|
let Xt = null;
|
|
5824
|
-
(function rt(
|
|
5862
|
+
(function rt(y, V, k, D, F) {
|
|
5825
5863
|
let nt = !1;
|
|
5826
5864
|
const st = l(V);
|
|
5827
5865
|
if (c(st)) {
|
|
5828
5866
|
const J = st.p;
|
|
5829
|
-
J != null ? (k = C[J],
|
|
5867
|
+
J != null ? (k = C[J], D = ht[J] = r.writeCursor(), nt = !0, F = null) : (k = null, F = V.clone());
|
|
5830
5868
|
} else u(l(k)) && (k = null);
|
|
5831
|
-
const ot =
|
|
5869
|
+
const ot = y.getComponent();
|
|
5832
5870
|
if (ot) {
|
|
5833
5871
|
const J = ot.p;
|
|
5834
|
-
J != null ? (F && (B[J] = F), Gt[J] = F ||
|
|
5872
|
+
J != null ? (F && (B[J] = F), Gt[J] = F || U === 1 && nt ? null : D.getComponent(), T[J] = y.clone(), k && (v[J] = k.clone())) : ot.r !== void 0 && (F || D.write("r", !0), (F || nt) && (Xt == null && (Xt = /* @__PURE__ */ new Set()), Xt.add(ot)));
|
|
5835
5873
|
}
|
|
5836
5874
|
let Nt = 0, Ot = 0;
|
|
5837
|
-
const Et = r.advancer(V, void 0, (J,
|
|
5838
|
-
c(
|
|
5839
|
-
}),
|
|
5840
|
-
u(
|
|
5875
|
+
const Et = r.advancer(V, void 0, (J, x) => {
|
|
5876
|
+
c(x) && Nt++;
|
|
5877
|
+
}), Lt = r.advancer(k, (J, x) => u(x) ? ~(J - Ot) : J - Ot, (J, x) => {
|
|
5878
|
+
u(x) && Ot++;
|
|
5841
5879
|
});
|
|
5842
|
-
if (
|
|
5843
|
-
const
|
|
5844
|
-
|
|
5880
|
+
if (y) for (const J of y) if (typeof J == "string") {
|
|
5881
|
+
const x = Et(J), K = Lt(J);
|
|
5882
|
+
D.descend(J), rt(y, x, K, D, F), D.ascend();
|
|
5845
5883
|
} else {
|
|
5846
|
-
const
|
|
5847
|
-
o(xt >= 0),
|
|
5884
|
+
const x = Et(J), K = J - Nt, St = c(l(x)) ? null : Lt(K), xt = K + Ot;
|
|
5885
|
+
o(xt >= 0), D.descend(xt), rt(y, x, St, D, F), D.ascend();
|
|
5848
5886
|
}
|
|
5849
|
-
Et.end(),
|
|
5887
|
+
Et.end(), Lt.end();
|
|
5850
5888
|
})(Dt, vt, vt.clone(), pt, null), pt.reset();
|
|
5851
5889
|
let me = [];
|
|
5852
|
-
if (function rt(
|
|
5890
|
+
if (function rt(y, V, k, D, F, nt) {
|
|
5853
5891
|
o(V);
|
|
5854
5892
|
const st = V.getComponent();
|
|
5855
|
-
let ot = l(
|
|
5893
|
+
let ot = l(D), Nt = !1;
|
|
5856
5894
|
const Ot = ($, _t, Tt) => $ ? t.moveOp($.getPath(), _t.getPath()) : t.insertOp(_t.getPath(), Tt.i);
|
|
5857
5895
|
if (u(st)) {
|
|
5858
5896
|
const $ = st.d;
|
|
@@ -5861,10 +5899,10 @@ function Cl() {
|
|
|
5861
5899
|
let Tt = !1;
|
|
5862
5900
|
if (st.i !== void 0 || $ != null && _t) {
|
|
5863
5901
|
let Ct;
|
|
5864
|
-
ot && (ot.i !== void 0 || (Ct = ot.d) != null && !I[Ct]) && (Tt = Ct != null ? $ != null && $ === q[Ct] : n.default(ot.i, st.i), Tt || Ct != null &&
|
|
5902
|
+
ot && (ot.i !== void 0 || (Ct = ot.d) != null && !I[Ct]) && (Tt = Ct != null ? $ != null && $ === q[Ct] : n.default(ot.i, st.i), Tt || Ct != null && U !== 1 && q[Ct] != null || w == null && (w = {
|
|
5865
5903
|
type: i.ConflictType.DROP_COLLISION,
|
|
5866
5904
|
op1: Ot($ != null ? T[$] : null, V, st),
|
|
5867
|
-
op2: Ot(Ct != null ? W[Ct] : null,
|
|
5905
|
+
op2: Ot(Ct != null ? W[Ct] : null, D, ot)
|
|
5868
5906
|
})), Tt || (nt ? w == null && (w = {
|
|
5869
5907
|
type: i.ConflictType.RM_UNEXPECTED_CONTENT,
|
|
5870
5908
|
op1: Ot($ != null ? T[$] : null, V, st),
|
|
@@ -5874,14 +5912,14 @@ function Cl() {
|
|
|
5874
5912
|
const Ct = B[$];
|
|
5875
5913
|
Ct && (nt = Ct.clone());
|
|
5876
5914
|
}
|
|
5877
|
-
$ != null ? (
|
|
5878
|
-
} else c(l(
|
|
5879
|
-
const Et = l(
|
|
5880
|
-
if (c(
|
|
5881
|
-
const $ =
|
|
5882
|
-
|
|
5883
|
-
} else !u(st) && u(ot) && (
|
|
5884
|
-
ot =
|
|
5915
|
+
$ != null ? (y = T[$], k = b[$], D = v[$]) : st.i !== void 0 && (y = k = null, Tt || (D = null));
|
|
5916
|
+
} else c(l(y)) && (y = k = D = null);
|
|
5917
|
+
const Et = l(y), Lt = l(k);
|
|
5918
|
+
if (c(Lt)) {
|
|
5919
|
+
const $ = Lt.p;
|
|
5920
|
+
Lt.r !== void 0 && (!Et || Et.r === void 0) || I[$] ? (D = null, nt = k.clone()) : $ != null && (D = C[$], U !== 1 && q[$] != null || ((F = lt[$]) || (F = lt[$] = r.writeCursor()), F.reset(), nt = null));
|
|
5921
|
+
} else !u(st) && u(ot) && (D = null);
|
|
5922
|
+
ot = D != null ? D.getComponent() : null;
|
|
5885
5923
|
const J = ut(st);
|
|
5886
5924
|
if (J) {
|
|
5887
5925
|
const $ = E(st);
|
|
@@ -5901,143 +5939,143 @@ function Cl() {
|
|
|
5901
5939
|
O(F, J, Tt);
|
|
5902
5940
|
}
|
|
5903
5941
|
}
|
|
5904
|
-
let
|
|
5942
|
+
let x = 0, K = 0, St = 0, xt = 0, ae = 0, pe = 0, qt = y != null && y.descendFirst(), Fe = qt;
|
|
5905
5943
|
const ve = r.advancer(k, void 0, ($, _t) => {
|
|
5906
5944
|
c(_t) && St++;
|
|
5907
5945
|
});
|
|
5908
|
-
let ee =
|
|
5946
|
+
let ee = D != null && D.descendFirst(), ne = ee;
|
|
5909
5947
|
for (const $ of V) if (typeof $ == "number") {
|
|
5910
5948
|
let _t;
|
|
5911
5949
|
const Tt = u(V.getComponent()), Ct = $ - K;
|
|
5912
5950
|
{
|
|
5913
5951
|
let de;
|
|
5914
|
-
for (; qt && typeof (de =
|
|
5915
|
-
de +=
|
|
5916
|
-
const Jt =
|
|
5917
|
-
if (de > Ct || de === Ct && (!Te ||
|
|
5952
|
+
for (; qt && typeof (de = y.getKey()) == "number"; ) {
|
|
5953
|
+
de += x;
|
|
5954
|
+
const Jt = y.getComponent(), Te = c(Jt);
|
|
5955
|
+
if (de > Ct || de === Ct && (!Te || U === 0 && Tt)) break;
|
|
5918
5956
|
if (Te) {
|
|
5919
|
-
|
|
5957
|
+
x--;
|
|
5920
5958
|
const Ee = Jt.p;
|
|
5921
|
-
q.includes(Ee), Jt.d, l(lt[Jt.d]), c(l(lt[Jt.d])), (Jt.r === void 0 || Xt && Xt.has(Jt)) && (Ee == null || !Gt[Ee] ||
|
|
5959
|
+
q.includes(Ee), Jt.d, l(lt[Jt.d]), c(l(lt[Jt.d])), (Jt.r === void 0 || Xt && Xt.has(Jt)) && (Ee == null || !Gt[Ee] || U !== 1 && q.includes(Ee)) || ae--;
|
|
5922
5960
|
}
|
|
5923
|
-
qt =
|
|
5961
|
+
qt = y.nextSibling();
|
|
5924
5962
|
}
|
|
5925
|
-
_t = qt && de === Ct ?
|
|
5963
|
+
_t = qt && de === Ct ? y : null;
|
|
5926
5964
|
}
|
|
5927
|
-
const Zt = Ct -
|
|
5965
|
+
const Zt = Ct - x;
|
|
5928
5966
|
let ue = ve(Zt);
|
|
5929
5967
|
const bn = Zt - St;
|
|
5930
5968
|
let qe = null;
|
|
5931
5969
|
{
|
|
5932
5970
|
let de, Jt;
|
|
5933
|
-
for (; ee && typeof (de =
|
|
5971
|
+
for (; ee && typeof (de = D.getKey()) == "number"; ) {
|
|
5934
5972
|
Jt = de - xt;
|
|
5935
|
-
const Te =
|
|
5973
|
+
const Te = D.getComponent(), Ee = u(Te);
|
|
5936
5974
|
if (Jt > bn) break;
|
|
5937
5975
|
if (Jt === bn) {
|
|
5938
5976
|
if (!Ee) {
|
|
5939
|
-
qe =
|
|
5977
|
+
qe = D;
|
|
5940
5978
|
break;
|
|
5941
5979
|
}
|
|
5942
5980
|
{
|
|
5943
|
-
if (
|
|
5944
|
-
qe =
|
|
5981
|
+
if (U === 0 && Tt) {
|
|
5982
|
+
qe = D;
|
|
5945
5983
|
break;
|
|
5946
5984
|
}
|
|
5947
5985
|
const Re = ue && c(ue.getComponent());
|
|
5948
|
-
if (
|
|
5986
|
+
if (U === 0 && Re) break;
|
|
5949
5987
|
}
|
|
5950
5988
|
}
|
|
5951
5989
|
if (Ee) {
|
|
5952
5990
|
const Re = Te.d;
|
|
5953
|
-
q[Re], Te.i === void 0 && (I[Re] || q[Re] != null &&
|
|
5991
|
+
q[Re], Te.i === void 0 && (I[Re] || q[Re] != null && U !== 1) ? (I[Re] || q[Re] != null && U === 0) && (xt++, pe--) : xt++;
|
|
5954
5992
|
}
|
|
5955
|
-
ee =
|
|
5993
|
+
ee = D.nextSibling();
|
|
5956
5994
|
}
|
|
5957
5995
|
}
|
|
5958
5996
|
const Cs = bn + xt + ae + pe;
|
|
5959
5997
|
o(Cs >= 0, "trying to descend to a negative index"), F.descend(Cs), Tt && (_t = ue = qe = null, K++), rt(_t, V, ue, qe, F, nt) && pe++, F.ascend();
|
|
5960
5998
|
} else {
|
|
5961
5999
|
let _t;
|
|
5962
|
-
for (; qt && (_t =
|
|
5963
|
-
const Tt = qt && _t === $ ?
|
|
6000
|
+
for (; qt && (_t = y.getKey(), typeof _t != "string" || !(_t > $ || _t === $)); ) qt = y.nextSibling();
|
|
6001
|
+
const Tt = qt && _t === $ ? y : null, Ct = ve($);
|
|
5964
6002
|
let Zt;
|
|
5965
|
-
for (; ee && (Zt =
|
|
5966
|
-
const ue = ee && Zt === $ ?
|
|
6003
|
+
for (; ee && (Zt = D.getKey(), typeof Zt != "string" || !(Zt > $ || Zt === $)); ) ee = D.nextSibling();
|
|
6004
|
+
const ue = ee && Zt === $ ? D : null;
|
|
5967
6005
|
F.descend($), rt(Tt, V, Ct, ue, F, nt), F.ascend();
|
|
5968
6006
|
}
|
|
5969
|
-
return ve.end(), Fe &&
|
|
6007
|
+
return ve.end(), Fe && y.ascend(), ne && D.ascend(), Nt;
|
|
5970
6008
|
}(Dt, Dt.clone(), vt, vt.clone(), pt, null), w) return {
|
|
5971
6009
|
ok: !1,
|
|
5972
6010
|
conflict: w
|
|
5973
6011
|
};
|
|
5974
6012
|
pt.reset();
|
|
5975
|
-
const jt = (rt,
|
|
5976
|
-
k.d != null && V(k.d, rt,
|
|
6013
|
+
const jt = (rt, y, V) => rt.traverse(y, (k, D) => {
|
|
6014
|
+
k.d != null && V(k.d, rt, D);
|
|
5977
6015
|
});
|
|
5978
|
-
(I.length || ht.length) && (jt(vt, pt, (rt,
|
|
6016
|
+
(I.length || ht.length) && (jt(vt, pt, (rt, y, V) => {
|
|
5979
6017
|
I[rt] && !H[rt] && V.write("r", !0), ht[rt] && V.mergeTree(ht[rt].get());
|
|
5980
6018
|
}), pt.reset());
|
|
5981
6019
|
const $t = [], le = [];
|
|
5982
6020
|
if ((lt.length || I.length) && !w) {
|
|
5983
6021
|
const rt = r.readCursor(Sn(pt.get()));
|
|
5984
|
-
if (jt(rt, null, (
|
|
5985
|
-
$t[
|
|
5986
|
-
}), lt.forEach((
|
|
5987
|
-
|
|
6022
|
+
if (jt(rt, null, (y, V) => {
|
|
6023
|
+
$t[y] = V.clone();
|
|
6024
|
+
}), lt.forEach((y) => {
|
|
6025
|
+
y && jt(r.readCursor(y.get()), null, (V, k) => {
|
|
5988
6026
|
$t[V] = k.clone();
|
|
5989
6027
|
});
|
|
5990
|
-
}), function
|
|
6028
|
+
}), function y(V, k, D, F, nt, st) {
|
|
5991
6029
|
const ot = l(k);
|
|
5992
6030
|
if (ot && c(ot)) if (ot.p != null) {
|
|
5993
|
-
const
|
|
5994
|
-
$t[
|
|
5995
|
-
} else ot.r !== void 0 && (
|
|
5996
|
-
else u(l(
|
|
6031
|
+
const x = ot.p;
|
|
6032
|
+
$t[x].getPath(), D = $t[x], F = le[x] = r.writeCursor();
|
|
6033
|
+
} else ot.r !== void 0 && (D = null);
|
|
6034
|
+
else u(l(D)) && (D = null);
|
|
5997
6035
|
const Nt = V.getComponent();
|
|
5998
6036
|
if (Nt) {
|
|
5999
|
-
let
|
|
6000
|
-
if ((
|
|
6001
|
-
const K = lt[
|
|
6002
|
-
K && (K.get(), F.mergeTree(K.get()),
|
|
6037
|
+
let x;
|
|
6038
|
+
if ((x = Nt.d) != null) {
|
|
6039
|
+
const K = lt[x];
|
|
6040
|
+
K && (K.get(), F.mergeTree(K.get()), D = r.readCursor(K.get()));
|
|
6003
6041
|
}
|
|
6004
6042
|
}
|
|
6005
6043
|
let Ot = 0, Et = 0;
|
|
6006
|
-
const
|
|
6044
|
+
const Lt = r.advancer(k, void 0, (x, K) => {
|
|
6007
6045
|
c(K) && Ot--;
|
|
6008
|
-
}), J = r.advancer(
|
|
6046
|
+
}), J = r.advancer(D, (x, K) => u(K) ? -(x - Et) - 1 : x - Et, (x, K) => {
|
|
6009
6047
|
u(K) && Et++;
|
|
6010
6048
|
});
|
|
6011
|
-
for (const
|
|
6012
|
-
const K =
|
|
6013
|
-
F.descend(ae),
|
|
6014
|
-
} else F.descend(
|
|
6015
|
-
|
|
6049
|
+
for (const x of V) if (typeof x == "number") {
|
|
6050
|
+
const K = Lt(x), St = x + Ot, xt = J(St), ae = St + Et;
|
|
6051
|
+
F.descend(ae), y(V, K, xt, F), F.ascend();
|
|
6052
|
+
} else F.descend(x), y(V, Lt(x), J(x), F), F.ascend();
|
|
6053
|
+
Lt.end(), J.end();
|
|
6016
6054
|
}(vt, rt, rt.clone(), pt), pt.reset(), w) return {
|
|
6017
6055
|
ok: !1,
|
|
6018
6056
|
conflict: w
|
|
6019
6057
|
};
|
|
6020
6058
|
if (pt.get(), le.length) {
|
|
6021
|
-
const
|
|
6022
|
-
if (jt(V, pt, (k,
|
|
6023
|
-
const nt =
|
|
6024
|
-
nt && (F.mergeTree(nt),
|
|
6025
|
-
}),
|
|
6026
|
-
const k = r.writeCursor(),
|
|
6059
|
+
const y = le.map((k) => k ? k.get() : null), V = r.readCursor(Sn(pt.get()));
|
|
6060
|
+
if (jt(V, pt, (k, D, F) => {
|
|
6061
|
+
const nt = y[k];
|
|
6062
|
+
nt && (F.mergeTree(nt), y[k] = null);
|
|
6063
|
+
}), y.find((k) => k)) {
|
|
6064
|
+
const k = r.writeCursor(), D = r.writeCursor();
|
|
6027
6065
|
let F = 0, nt = 0;
|
|
6028
|
-
|
|
6066
|
+
y.forEach((st) => {
|
|
6029
6067
|
st != null && jt(r.readCursor(st), null, (ot) => {
|
|
6030
6068
|
const Nt = me[ot];
|
|
6031
6069
|
k.writeMove(T[Nt].getPath(), G[Nt].getPath(), F++);
|
|
6032
6070
|
const Ot = mt[Nt];
|
|
6033
6071
|
Ot && Ot.forEach((Et) => {
|
|
6034
|
-
I[Et] ||
|
|
6072
|
+
I[Et] || U !== 1 && q[Et] != null || D.writeMove(W[Et].getPath(), C[Et].getPath(), nt++);
|
|
6035
6073
|
});
|
|
6036
6074
|
});
|
|
6037
6075
|
}), w = {
|
|
6038
6076
|
type: i.ConflictType.BLACKHOLE,
|
|
6039
6077
|
op1: k.get(),
|
|
6040
|
-
op2:
|
|
6078
|
+
op2: D.get()
|
|
6041
6079
|
};
|
|
6042
6080
|
}
|
|
6043
6081
|
}
|
|
@@ -6054,46 +6092,46 @@ function Cl() {
|
|
|
6054
6092
|
const R = new Error("Transform detected write conflict");
|
|
6055
6093
|
throw R.conflict = _, R.type = R.name = "writeConflict", R;
|
|
6056
6094
|
};
|
|
6057
|
-
function
|
|
6058
|
-
const
|
|
6059
|
-
if (
|
|
6060
|
-
Es(
|
|
6095
|
+
function $r(_, R, S) {
|
|
6096
|
+
const U = wn(_, R, S);
|
|
6097
|
+
if (U.ok) return U.result;
|
|
6098
|
+
Es(U.conflict);
|
|
6061
6099
|
}
|
|
6062
6100
|
const Ae = (_) => {
|
|
6063
6101
|
const R = r.writeCursor();
|
|
6064
|
-
return r.readCursor(_).traverse(R, (S,
|
|
6065
|
-
(u(S) || ut(S)) &&
|
|
6102
|
+
return r.readCursor(_).traverse(R, (S, U) => {
|
|
6103
|
+
(u(S) || ut(S)) && U.write("r", !0);
|
|
6066
6104
|
}), R.get();
|
|
6067
|
-
},
|
|
6068
|
-
const { type: S, op1:
|
|
6105
|
+
}, Wr = (_, R) => {
|
|
6106
|
+
const { type: S, op1: U, op2: w } = _;
|
|
6069
6107
|
switch (S) {
|
|
6070
6108
|
case i.ConflictType.DROP_COLLISION:
|
|
6071
|
-
return R === "left" ? [null, Ae(w)] : [Ae(
|
|
6109
|
+
return R === "left" ? [null, Ae(w)] : [Ae(U), null];
|
|
6072
6110
|
case i.ConflictType.RM_UNEXPECTED_CONTENT:
|
|
6073
6111
|
let T = !1;
|
|
6074
|
-
return r.readCursor(
|
|
6112
|
+
return r.readCursor(U).traverse(null, (G) => {
|
|
6075
6113
|
G.r !== void 0 && (T = !0);
|
|
6076
|
-
}), T ? [null, Ae(w)] : [Ae(
|
|
6114
|
+
}), T ? [null, Ae(w)] : [Ae(U), null];
|
|
6077
6115
|
case i.ConflictType.BLACKHOLE:
|
|
6078
|
-
return [Ae(
|
|
6116
|
+
return [Ae(U), Ae(w)];
|
|
6079
6117
|
default:
|
|
6080
6118
|
throw Error("Unrecognised conflict: " + S);
|
|
6081
6119
|
}
|
|
6082
6120
|
};
|
|
6083
|
-
function Rs(_, R, S,
|
|
6121
|
+
function Rs(_, R, S, U) {
|
|
6084
6122
|
let w = null;
|
|
6085
6123
|
for (; ; ) {
|
|
6086
|
-
const T = wn(R, S,
|
|
6124
|
+
const T = wn(R, S, U);
|
|
6087
6125
|
if (T.ok) return ct(w, T.result);
|
|
6088
6126
|
{
|
|
6089
6127
|
const { conflict: G } = T;
|
|
6090
6128
|
_(G) || Es(G);
|
|
6091
|
-
const [W, C] =
|
|
6129
|
+
const [W, C] = Wr(G, U);
|
|
6092
6130
|
R = ct(X(R), W), S = ct(X(S), C), w = ct(w, C);
|
|
6093
6131
|
}
|
|
6094
6132
|
}
|
|
6095
6133
|
}
|
|
6096
|
-
})(
|
|
6134
|
+
})(Or);
|
|
6097
6135
|
(function(t) {
|
|
6098
6136
|
var e = Ft && Ft.__createBinding || (Object.create ? function(i, o, l, a) {
|
|
6099
6137
|
a === void 0 && (a = l), Object.defineProperty(i, a, { enumerable: !0, get: function() {
|
|
@@ -6104,7 +6142,7 @@ function Cl() {
|
|
|
6104
6142
|
}), n = Ft && Ft.__exportStar || function(i, o) {
|
|
6105
6143
|
for (var l in i) l !== "default" && !o.hasOwnProperty(l) && e(o, i, l);
|
|
6106
6144
|
};
|
|
6107
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), n(
|
|
6145
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), n(Or, t);
|
|
6108
6146
|
var s = hs;
|
|
6109
6147
|
Object.defineProperty(t, "ReadCursor", { enumerable: !0, get: function() {
|
|
6110
6148
|
return s.ReadCursor;
|
|
@@ -6116,9 +6154,9 @@ function Cl() {
|
|
|
6116
6154
|
return r.ConflictType;
|
|
6117
6155
|
} });
|
|
6118
6156
|
})(Ht);
|
|
6119
|
-
const
|
|
6157
|
+
const wl = /* @__PURE__ */ Cl(Ht), rc = /* @__PURE__ */ Jr({
|
|
6120
6158
|
__proto__: null,
|
|
6121
|
-
default:
|
|
6159
|
+
default: wl
|
|
6122
6160
|
}, [Ht]);
|
|
6123
6161
|
var Q = /* @__PURE__ */ ((t) => (t.RETAIN = "r", t.INSERT = "i", t.DELETE = "d", t))(Q || {});
|
|
6124
6162
|
class Fs {
|
|
@@ -6135,10 +6173,10 @@ class Fs {
|
|
|
6135
6173
|
const n = this._actions[this._index];
|
|
6136
6174
|
if (n) {
|
|
6137
6175
|
const s = this._offset, r = n.len;
|
|
6138
|
-
return e >= r - s ? (e = r - s, this._index += 1, this._offset = 0) : this._offset += e, n.t === Q.DELETE || n.t === Q.RETAIN && n.body == null ?
|
|
6176
|
+
return e >= r - s ? (e = r - s, this._index += 1, this._offset = 0) : this._offset += e, n.t === Q.DELETE || n.t === Q.RETAIN && n.body == null ? P.deepClone({
|
|
6139
6177
|
...n,
|
|
6140
6178
|
len: e
|
|
6141
|
-
}) :
|
|
6179
|
+
}) : P.deepClone({
|
|
6142
6180
|
...n,
|
|
6143
6181
|
len: e,
|
|
6144
6182
|
body: fn(n.body, s, s + e)
|
|
@@ -6170,7 +6208,7 @@ class Fs {
|
|
|
6170
6208
|
} else return [];
|
|
6171
6209
|
}
|
|
6172
6210
|
}
|
|
6173
|
-
class
|
|
6211
|
+
class bl {
|
|
6174
6212
|
constructor() {
|
|
6175
6213
|
g(this, "cursor", 0);
|
|
6176
6214
|
}
|
|
@@ -6184,10 +6222,10 @@ class Ol {
|
|
|
6184
6222
|
this.cursor = e;
|
|
6185
6223
|
}
|
|
6186
6224
|
}
|
|
6187
|
-
function
|
|
6225
|
+
function Al(t, e, n) {
|
|
6188
6226
|
const { dataStream: s } = t, r = n, i = n + e, o = fr(t, e, n), l = gr(t, e, n), a = _r(t, e, n), h = mr(t, e, n), c = pr(t, e, n), u = Er(t, e, n), d = Rr(t, e, n);
|
|
6189
6227
|
let f = "";
|
|
6190
|
-
return s && (t.dataStream =
|
|
6228
|
+
return s && (t.dataStream = vo(s, r, i), f = s.slice(r, i)), {
|
|
6191
6229
|
dataStream: f,
|
|
6192
6230
|
textRuns: o,
|
|
6193
6231
|
paragraphs: l,
|
|
@@ -6198,35 +6236,35 @@ function Nl(t, e, n) {
|
|
|
6198
6236
|
customDecorations: d
|
|
6199
6237
|
};
|
|
6200
6238
|
}
|
|
6201
|
-
function
|
|
6202
|
-
t.dataStream =
|
|
6239
|
+
function vl(t, e, n, s) {
|
|
6240
|
+
t.dataStream = Ao(t.dataStream, s, e.dataStream), ar(t, e, n, s), ls(t, e, n, s), il(t, e, n, s), ur(t, e, n, s), cr(t, e, n, s), hr(t, e, n, s), dr(t, e, n, s);
|
|
6203
6241
|
}
|
|
6204
|
-
function
|
|
6205
|
-
return
|
|
6242
|
+
function Tl(t, e, n, s, r = Pt.COVER) {
|
|
6243
|
+
return al(t, e, n, s, r);
|
|
6206
6244
|
}
|
|
6207
|
-
function
|
|
6208
|
-
return e <= 0 ? { dataStream: "" } :
|
|
6245
|
+
function Ml(t, e, n) {
|
|
6246
|
+
return e <= 0 ? { dataStream: "" } : Al(t, e, n);
|
|
6209
6247
|
}
|
|
6210
|
-
function
|
|
6211
|
-
n !== 0 &&
|
|
6248
|
+
function Ul(t, e, n, s) {
|
|
6249
|
+
n !== 0 && vl(t, e, n, s);
|
|
6212
6250
|
}
|
|
6213
|
-
function
|
|
6214
|
-
const n = new
|
|
6251
|
+
function Ll(t, e) {
|
|
6252
|
+
const n = new bl();
|
|
6215
6253
|
return n.reset(), e.forEach((s) => {
|
|
6216
|
-
switch (s =
|
|
6254
|
+
switch (s = P.deepClone(s), s.t) {
|
|
6217
6255
|
case Q.RETAIN: {
|
|
6218
6256
|
const { coverType: r, body: i, len: o } = s;
|
|
6219
|
-
i != null &&
|
|
6257
|
+
i != null && Tl(t, i, o, n.cursor, r), n.moveCursor(o);
|
|
6220
6258
|
break;
|
|
6221
6259
|
}
|
|
6222
6260
|
case Q.INSERT: {
|
|
6223
6261
|
const { body: r, len: i } = s;
|
|
6224
|
-
|
|
6262
|
+
Ul(t, r, i, n.cursor), n.moveCursor(i);
|
|
6225
6263
|
break;
|
|
6226
6264
|
}
|
|
6227
6265
|
case Q.DELETE: {
|
|
6228
6266
|
const { len: r } = s;
|
|
6229
|
-
|
|
6267
|
+
Ml(t, r, n.cursor);
|
|
6230
6268
|
break;
|
|
6231
6269
|
}
|
|
6232
6270
|
default:
|
|
@@ -6242,7 +6280,7 @@ const Ve = class Ve {
|
|
|
6242
6280
|
g(this, "_actions", []);
|
|
6243
6281
|
}
|
|
6244
6282
|
static apply(e, n) {
|
|
6245
|
-
return
|
|
6283
|
+
return Ll(e, n);
|
|
6246
6284
|
}
|
|
6247
6285
|
static compose(e, n) {
|
|
6248
6286
|
const s = new Fs(e), r = new Fs(n), i = new Ve();
|
|
@@ -6356,6 +6394,9 @@ const Ve = class Ve {
|
|
|
6356
6394
|
};
|
|
6357
6395
|
return this.push(s), this;
|
|
6358
6396
|
}
|
|
6397
|
+
empty() {
|
|
6398
|
+
return this._actions = [], this;
|
|
6399
|
+
}
|
|
6359
6400
|
serialize() {
|
|
6360
6401
|
return this._actions;
|
|
6361
6402
|
}
|
|
@@ -6367,7 +6408,7 @@ const Ve = class Ve {
|
|
|
6367
6408
|
return this;
|
|
6368
6409
|
}
|
|
6369
6410
|
let n = this._actions.length, s = this._actions[n - 1];
|
|
6370
|
-
const r =
|
|
6411
|
+
const r = P.deepClone(e[0]);
|
|
6371
6412
|
if (r.t === Q.RETAIN && r.len === 0 && r.body == null)
|
|
6372
6413
|
return this;
|
|
6373
6414
|
if (typeof s == "object") {
|
|
@@ -6384,7 +6425,7 @@ const Ve = class Ve {
|
|
|
6384
6425
|
}
|
|
6385
6426
|
trimEndUselessRetainAction() {
|
|
6386
6427
|
let e = this._actions[this._actions.length - 1];
|
|
6387
|
-
for (; e && e.t === Q.RETAIN &&
|
|
6428
|
+
for (; e && e.t === Q.RETAIN && El(e); )
|
|
6388
6429
|
this._actions.pop(), e = this._actions[this._actions.length - 1];
|
|
6389
6430
|
return this;
|
|
6390
6431
|
}
|
|
@@ -6443,16 +6484,16 @@ const Ue = class Ue {
|
|
|
6443
6484
|
g(Ue, "uri", "https://github.com/dream-num/univer#json-x"), g(Ue, "_subTypes", /* @__PURE__ */ new Map()), g(Ue, "_instance", null);
|
|
6444
6485
|
let xe = Ue;
|
|
6445
6486
|
xe.registerSubtype(Se);
|
|
6446
|
-
const
|
|
6487
|
+
const Nr = {
|
|
6447
6488
|
id: "default_doc",
|
|
6448
6489
|
documentStyle: {}
|
|
6449
6490
|
};
|
|
6450
|
-
class
|
|
6491
|
+
class Dl extends os {
|
|
6451
6492
|
constructor(n) {
|
|
6452
6493
|
super();
|
|
6453
6494
|
g(this, "type", tt.UNIVER_DOC);
|
|
6454
6495
|
g(this, "snapshot");
|
|
6455
|
-
this.snapshot = { ...
|
|
6496
|
+
this.snapshot = { ...Nr, ...n };
|
|
6456
6497
|
}
|
|
6457
6498
|
getUnitId() {
|
|
6458
6499
|
throw new Error("Method not implemented.");
|
|
@@ -6529,15 +6570,15 @@ class Tl extends os {
|
|
|
6529
6570
|
} : this.snapshot.settings.zoomRatio = 1;
|
|
6530
6571
|
}
|
|
6531
6572
|
}
|
|
6532
|
-
class Pe extends
|
|
6573
|
+
class Pe extends Dl {
|
|
6533
6574
|
constructor(n) {
|
|
6534
6575
|
var r;
|
|
6535
|
-
super(
|
|
6576
|
+
super(P.isEmptyObject(n) ? Rl() : n);
|
|
6536
6577
|
g(this, "_unitId");
|
|
6537
6578
|
g(this, "headerModelMap", /* @__PURE__ */ new Map());
|
|
6538
6579
|
g(this, "footerModelMap", /* @__PURE__ */ new Map());
|
|
6539
6580
|
const s = 6;
|
|
6540
|
-
this._unitId = (r = this.snapshot.id) != null ? r :
|
|
6581
|
+
this._unitId = (r = this.snapshot.id) != null ? r : P.generateRandomId(s), this._initializeHeaderFooterModel();
|
|
6541
6582
|
}
|
|
6542
6583
|
dispose() {
|
|
6543
6584
|
this.headerModelMap.forEach((n) => {
|
|
@@ -6574,7 +6615,7 @@ class Pe extends Tl {
|
|
|
6574
6615
|
reset(n) {
|
|
6575
6616
|
if (n.id && n.id !== this._unitId)
|
|
6576
6617
|
throw new Error("Cannot reset a document model with a different unit id!");
|
|
6577
|
-
this.snapshot = { ...
|
|
6618
|
+
this.snapshot = { ...Nr, ...n }, this._initializeHeaderFooterModel();
|
|
6578
6619
|
}
|
|
6579
6620
|
getSelfOrHeaderFooterModel(n) {
|
|
6580
6621
|
if (n != null) {
|
|
@@ -6592,10 +6633,10 @@ class Pe extends Tl {
|
|
|
6592
6633
|
if (!xe.isNoop(n))
|
|
6593
6634
|
return this.snapshot = xe.apply(this.snapshot, n), n != null && n.some((s) => Array.isArray(s) && ((s == null ? void 0 : s[0]) === "headers" || (s == null ? void 0 : s[0]) === "footers")) && (this.headerModelMap.clear(), this.footerModelMap.clear(), this._initializeHeaderFooterModel()), this.snapshot;
|
|
6594
6635
|
}
|
|
6595
|
-
sliceBody(n, s) {
|
|
6596
|
-
const
|
|
6597
|
-
if (
|
|
6598
|
-
return fn(
|
|
6636
|
+
sliceBody(n, s, r = Ir.copy) {
|
|
6637
|
+
const i = this.getBody();
|
|
6638
|
+
if (i != null)
|
|
6639
|
+
return fn(i, n, s, !1, r);
|
|
6599
6640
|
}
|
|
6600
6641
|
_initializeHeaderFooterModel() {
|
|
6601
6642
|
const { headers: n, footers: s } = this.getSnapshot();
|
|
@@ -6614,8 +6655,8 @@ class Pe extends Tl {
|
|
|
6614
6655
|
super.updateDocumentId(n), this._unitId = n;
|
|
6615
6656
|
}
|
|
6616
6657
|
}
|
|
6617
|
-
const
|
|
6618
|
-
class
|
|
6658
|
+
const xl = zt("univer.config-service");
|
|
6659
|
+
class Pl {
|
|
6619
6660
|
constructor() {
|
|
6620
6661
|
g(this, "_config", /* @__PURE__ */ new Map());
|
|
6621
6662
|
}
|
|
@@ -6629,7 +6670,7 @@ class Ul {
|
|
|
6629
6670
|
this._config.delete(e);
|
|
6630
6671
|
}
|
|
6631
6672
|
}
|
|
6632
|
-
class
|
|
6673
|
+
class yl extends Ut {
|
|
6633
6674
|
constructor() {
|
|
6634
6675
|
super(...arguments);
|
|
6635
6676
|
g(this, "_error$", new Yt());
|
|
@@ -6642,10 +6683,10 @@ class Ll extends Lt {
|
|
|
6642
6683
|
this._error$.next({ errorKey: n });
|
|
6643
6684
|
}
|
|
6644
6685
|
}
|
|
6645
|
-
class
|
|
6686
|
+
class kl {
|
|
6646
6687
|
constructor(e = {}) {
|
|
6647
6688
|
g(this, "_styles");
|
|
6648
|
-
g(this, "_cacheMap", new
|
|
6689
|
+
g(this, "_cacheMap", new Po(1e5));
|
|
6649
6690
|
this._styles = e, this._generateCacheMap();
|
|
6650
6691
|
}
|
|
6651
6692
|
each(e) {
|
|
@@ -6661,7 +6702,7 @@ class Dl {
|
|
|
6661
6702
|
return typeof e != "string" ? e : (e = String(e), this._styles[e]);
|
|
6662
6703
|
}
|
|
6663
6704
|
add(e, n) {
|
|
6664
|
-
const s =
|
|
6705
|
+
const s = P.generateRandomId(6);
|
|
6665
6706
|
return this._styles[s] = e, this._cacheMap.set(n, s), s;
|
|
6666
6707
|
}
|
|
6667
6708
|
setValue(e) {
|
|
@@ -6674,7 +6715,7 @@ class Dl {
|
|
|
6674
6715
|
}
|
|
6675
6716
|
getStyleByCell(e) {
|
|
6676
6717
|
let n;
|
|
6677
|
-
e &&
|
|
6718
|
+
e && P.isObject(e.s) ? n = e.s : n = (e == null ? void 0 : e.s) && this.get(e.s);
|
|
6678
6719
|
const s = e == null ? void 0 : e.interceptorStyle;
|
|
6679
6720
|
return s ? {
|
|
6680
6721
|
...n,
|
|
@@ -6691,12 +6732,12 @@ class Dl {
|
|
|
6691
6732
|
_getExistingStyleId(e) {
|
|
6692
6733
|
const { _styles: n } = this;
|
|
6693
6734
|
for (const s in n)
|
|
6694
|
-
if (
|
|
6735
|
+
if (P.diffValue(n[s], e))
|
|
6695
6736
|
return s;
|
|
6696
6737
|
return null;
|
|
6697
6738
|
}
|
|
6698
6739
|
}
|
|
6699
|
-
class
|
|
6740
|
+
class Hl {
|
|
6700
6741
|
constructor(e, n) {
|
|
6701
6742
|
g(this, "_columnData", {});
|
|
6702
6743
|
this._config = e, this._columnData = n;
|
|
@@ -6821,7 +6862,7 @@ class xl {
|
|
|
6821
6862
|
return this._columnData[e] = i, i;
|
|
6822
6863
|
}
|
|
6823
6864
|
}
|
|
6824
|
-
class
|
|
6865
|
+
class Fl {
|
|
6825
6866
|
constructor(e, n, s) {
|
|
6826
6867
|
g(this, "_rowData");
|
|
6827
6868
|
this._config = e, this._viewModel = n, this._rowData = s;
|
|
@@ -6928,16 +6969,16 @@ class Pl {
|
|
|
6928
6969
|
return Oe(this._rowData);
|
|
6929
6970
|
}
|
|
6930
6971
|
}
|
|
6931
|
-
const
|
|
6932
|
-
function
|
|
6972
|
+
const ic = "DEFAULT_WORKSHEET_ROW_COUNT", $l = 1e3, oc = "DEFAULT_WORKSHEET_COLUMN_COUNT", Wl = 20, lc = "DEFAULT_WORKSHEET_ROW_HEIGHT", Bl = 24, ac = "DEFAULT_WORKSHEET_COLUMN_WIDTH", Gl = 88, uc = "DEFAULT_WORKSHEET_ROW_TITLE_WIDTH", jl = 46, cc = "DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT", Vl = 20;
|
|
6973
|
+
function Kl(t) {
|
|
6933
6974
|
const e = {
|
|
6934
6975
|
name: "Sheet1",
|
|
6935
6976
|
// TODO: name should have i18n
|
|
6936
6977
|
id: "sheet-01",
|
|
6937
6978
|
tabColor: "",
|
|
6938
6979
|
hidden: Y.FALSE,
|
|
6939
|
-
rowCount:
|
|
6940
|
-
columnCount:
|
|
6980
|
+
rowCount: $l,
|
|
6981
|
+
columnCount: Wl,
|
|
6941
6982
|
zoomRatio: 1,
|
|
6942
6983
|
freeze: {
|
|
6943
6984
|
xSplit: 0,
|
|
@@ -6947,19 +6988,19 @@ function Bl(t) {
|
|
|
6947
6988
|
},
|
|
6948
6989
|
scrollTop: 0,
|
|
6949
6990
|
scrollLeft: 0,
|
|
6950
|
-
defaultColumnWidth:
|
|
6951
|
-
defaultRowHeight:
|
|
6991
|
+
defaultColumnWidth: Gl,
|
|
6992
|
+
defaultRowHeight: Bl,
|
|
6952
6993
|
mergeData: [],
|
|
6953
6994
|
cellData: {},
|
|
6954
6995
|
rowData: {},
|
|
6955
6996
|
columnData: {},
|
|
6956
6997
|
showGridlines: Y.TRUE,
|
|
6957
6998
|
rowHeader: {
|
|
6958
|
-
width:
|
|
6999
|
+
width: jl,
|
|
6959
7000
|
hidden: Y.FALSE
|
|
6960
7001
|
},
|
|
6961
7002
|
columnHeader: {
|
|
6962
|
-
height:
|
|
7003
|
+
height: Vl,
|
|
6963
7004
|
hidden: Y.FALSE
|
|
6964
7005
|
},
|
|
6965
7006
|
selections: ["A1"],
|
|
@@ -6970,7 +7011,7 @@ function Bl(t) {
|
|
|
6970
7011
|
typeof t[s] > "u" && (t[s] = e[s]);
|
|
6971
7012
|
}), t;
|
|
6972
7013
|
}
|
|
6973
|
-
class
|
|
7014
|
+
class Yl extends Ut {
|
|
6974
7015
|
constructor(n) {
|
|
6975
7016
|
super();
|
|
6976
7017
|
g(this, "_cellContentInterceptor", null);
|
|
@@ -7007,9 +7048,9 @@ class gn {
|
|
|
7007
7048
|
g(this, "_columnManager");
|
|
7008
7049
|
g(this, "_viewModel");
|
|
7009
7050
|
var l;
|
|
7010
|
-
this.unitId = e, this._styles = s, this._snapshot =
|
|
7051
|
+
this.unitId = e, this._styles = s, this._snapshot = Kl(n);
|
|
7011
7052
|
const { columnData: r, rowData: i, cellData: o } = this._snapshot;
|
|
7012
|
-
this._sheetId = (l = this._snapshot.id) != null ? l :
|
|
7053
|
+
this._sheetId = (l = this._snapshot.id) != null ? l : P.generateRandomId(6), this._cellData = new re(o), this._viewModel = new Yl((a, h) => this.getCellRaw(a, h)), this._rowManager = new Fl(this._snapshot, this._viewModel, i), this._columnManager = new Hl(this._snapshot, r);
|
|
7013
7054
|
}
|
|
7014
7055
|
/**
|
|
7015
7056
|
* @internal
|
|
@@ -7089,7 +7130,7 @@ class gn {
|
|
|
7089
7130
|
* @deprecated
|
|
7090
7131
|
*/
|
|
7091
7132
|
clone() {
|
|
7092
|
-
const { _snapshot: e } = this, n =
|
|
7133
|
+
const { _snapshot: e } = this, n = P.deepClone(e);
|
|
7093
7134
|
return new gn(this.unitId, n, this._styles);
|
|
7094
7135
|
}
|
|
7095
7136
|
getMergeData() {
|
|
@@ -7395,12 +7436,12 @@ class gn {
|
|
|
7395
7436
|
h = u.endRow + 1;
|
|
7396
7437
|
continue;
|
|
7397
7438
|
}
|
|
7398
|
-
const
|
|
7399
|
-
if (!
|
|
7439
|
+
const M = a.getCell(u.startRow, u.startColumn);
|
|
7440
|
+
if (!M && n) {
|
|
7400
7441
|
h = u.endRow + 1;
|
|
7401
7442
|
continue;
|
|
7402
7443
|
}
|
|
7403
|
-
const Z = { row: h, col: u.startColumn, value:
|
|
7444
|
+
const Z = { row: h, col: u.startColumn, value: M };
|
|
7404
7445
|
return Z.colSpan = u.endColumn - u.startColumn + 1, Z.rowSpan = u.endRow - u.startRow + 1, h = u.endRow + 1, { done: !1, value: Z };
|
|
7405
7446
|
}
|
|
7406
7447
|
const d = a.getCell(h, c);
|
|
@@ -7417,7 +7458,7 @@ class gn {
|
|
|
7417
7458
|
};
|
|
7418
7459
|
}
|
|
7419
7460
|
}
|
|
7420
|
-
function
|
|
7461
|
+
function hc(t) {
|
|
7421
7462
|
var s, r;
|
|
7422
7463
|
if (!t)
|
|
7423
7464
|
return "";
|
|
@@ -7427,25 +7468,25 @@ function oc(t) {
|
|
|
7427
7468
|
const n = t.v;
|
|
7428
7469
|
return typeof n == "string" ? t.t === Le.BOOLEAN ? n.toUpperCase() : n.replace(/[\r\n]/g, "") : typeof n == "number" ? t.t === Le.BOOLEAN ? n ? "TRUE" : "FALSE" : n.toString() : typeof n == "boolean" ? n ? "TRUE" : "FALSE" : "";
|
|
7429
7470
|
}
|
|
7430
|
-
const
|
|
7431
|
-
function
|
|
7471
|
+
const zl = "0.2.4";
|
|
7472
|
+
function Xl(t = "", e = ke.ZH_CN, n = "") {
|
|
7432
7473
|
return {
|
|
7433
7474
|
id: t,
|
|
7434
7475
|
sheetOrder: [],
|
|
7435
7476
|
name: n,
|
|
7436
|
-
appVersion:
|
|
7477
|
+
appVersion: zl,
|
|
7437
7478
|
locale: e,
|
|
7438
7479
|
styles: {},
|
|
7439
7480
|
sheets: {},
|
|
7440
7481
|
resources: []
|
|
7441
7482
|
};
|
|
7442
7483
|
}
|
|
7443
|
-
var
|
|
7444
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
7484
|
+
var ql = Object.defineProperty, Zl = Object.getOwnPropertyDescriptor, Jl = (t, e, n, s) => {
|
|
7485
|
+
for (var r = s > 1 ? void 0 : s ? Zl(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
7445
7486
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
7446
|
-
return s && r &&
|
|
7447
|
-
},
|
|
7448
|
-
function
|
|
7487
|
+
return s && r && ql(e, n, r), r;
|
|
7488
|
+
}, Ql = (t, e) => (n, s) => e(n, s, t);
|
|
7489
|
+
function dc(t, e) {
|
|
7449
7490
|
return `${t.getUnitId()}|${e.getSheetId()}`;
|
|
7450
7491
|
}
|
|
7451
7492
|
let _n = class extends os {
|
|
@@ -7479,10 +7520,10 @@ let _n = class extends os {
|
|
|
7479
7520
|
g(this, "_name$");
|
|
7480
7521
|
g(this, "name$");
|
|
7481
7522
|
this._logService = n;
|
|
7482
|
-
const s =
|
|
7483
|
-
|
|
7523
|
+
const s = Xl();
|
|
7524
|
+
P.isEmptyObject(e) ? this._snapshot = s : this._snapshot = P.commonExtend(s, e);
|
|
7484
7525
|
const { styles: r } = this._snapshot;
|
|
7485
|
-
(this._snapshot.id == null || this._snapshot.id.length === 0) && (this._snapshot.id =
|
|
7526
|
+
(this._snapshot.id == null || this._snapshot.id.length === 0) && (this._snapshot.id = P.generateRandomId(6)), this._unitId = this._snapshot.id, this._styles = new kl(r), this._count = 1, this._worksheets = /* @__PURE__ */ new Map(), this._name$ = new te(e.name || ""), this.name$ = this._name$.asObservable(), this._parseWorksheetSnapshots();
|
|
7486
7527
|
}
|
|
7487
7528
|
get _activeSheet() {
|
|
7488
7529
|
return this._activeSheet$.getValue();
|
|
@@ -7494,7 +7535,7 @@ let _n = class extends os {
|
|
|
7494
7535
|
super.dispose(), this._sheetCreated$.complete(), this._sheetDisposed$.complete(), this._activeSheet$.complete(), this._name$.complete();
|
|
7495
7536
|
}
|
|
7496
7537
|
save() {
|
|
7497
|
-
return
|
|
7538
|
+
return P.deepClone(this._snapshot);
|
|
7498
7539
|
}
|
|
7499
7540
|
static isIRangeType(e) {
|
|
7500
7541
|
return typeof e == "string" || "startRow" in e || "row" in e;
|
|
@@ -7667,8 +7708,8 @@ let _n = class extends os {
|
|
|
7667
7708
|
*/
|
|
7668
7709
|
_parseWorksheetSnapshots() {
|
|
7669
7710
|
const { _snapshot: e, _worksheets: n } = this, { sheets: s, sheetOrder: r } = e;
|
|
7670
|
-
if (
|
|
7671
|
-
const i =
|
|
7711
|
+
if (P.isEmptyObject(s)) {
|
|
7712
|
+
const i = P.generateRandomId();
|
|
7672
7713
|
s[i] = { id: i };
|
|
7673
7714
|
}
|
|
7674
7715
|
for (const i in s) {
|
|
@@ -7680,17 +7721,17 @@ let _n = class extends os {
|
|
|
7680
7721
|
this.ensureActiveSheet();
|
|
7681
7722
|
}
|
|
7682
7723
|
};
|
|
7683
|
-
_n =
|
|
7684
|
-
|
|
7724
|
+
_n = Jl([
|
|
7725
|
+
Ql(1, be)
|
|
7685
7726
|
], _n);
|
|
7686
|
-
class
|
|
7727
|
+
class Sr extends os {
|
|
7687
7728
|
constructor(n) {
|
|
7688
7729
|
var s;
|
|
7689
7730
|
super();
|
|
7690
7731
|
g(this, "type", tt.UNIVER_SLIDE);
|
|
7691
7732
|
g(this, "_snapshot");
|
|
7692
7733
|
g(this, "_unitId");
|
|
7693
|
-
this._snapshot = {
|
|
7734
|
+
this._snapshot = { ...$o, ...n }, this._unitId = (s = this._snapshot.id) != null ? s : P.generateRandomId(6);
|
|
7694
7735
|
}
|
|
7695
7736
|
getContainer() {
|
|
7696
7737
|
return this._snapshot.container;
|
|
@@ -7738,14 +7779,14 @@ class Nr extends os {
|
|
|
7738
7779
|
};
|
|
7739
7780
|
}
|
|
7740
7781
|
}
|
|
7741
|
-
const an = "FOCUSING_SHEET", xn = "FOCUSING_DOC", Pn = "FOCUSING_SLIDE",
|
|
7742
|
-
var
|
|
7743
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
7782
|
+
const an = "FOCUSING_SHEET", xn = "FOCUSING_DOC", Pn = "FOCUSING_SLIDE", fc = "FOCUSING_EDITOR_BUT_HIDDEN", ta = "EDITOR_ACTIVATED", gc = "FOCUSING_EDITOR_INPUT_FORMULA", ea = "FOCUSING_FORMULA_EDITOR", _c = "FOCUSING_UNIVER_EDITOR", mc = "FOCUSING_EDITOR_INPUT_FORMULA", pc = "FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE", Ec = "FOCUSING_COMMON_DRAWINGS";
|
|
7783
|
+
var na = Object.defineProperty, sa = Object.getOwnPropertyDescriptor, ra = (t, e, n, s) => {
|
|
7784
|
+
for (var r = s > 1 ? void 0 : s ? sa(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
7744
7785
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
7745
|
-
return s && r &&
|
|
7786
|
+
return s && r && na(e, n, r), r;
|
|
7746
7787
|
}, Ws = (t, e) => (n, s) => e(n, s, t);
|
|
7747
7788
|
const Xe = zt("univer.current");
|
|
7748
|
-
let zn = class extends
|
|
7789
|
+
let zn = class extends Ut {
|
|
7749
7790
|
constructor(e, n) {
|
|
7750
7791
|
super();
|
|
7751
7792
|
g(this, "_unitsByType", /* @__PURE__ */ new Map());
|
|
@@ -7779,10 +7820,10 @@ let zn = class extends Lt {
|
|
|
7779
7820
|
};
|
|
7780
7821
|
}
|
|
7781
7822
|
getCurrentTypeOfUnit$(e) {
|
|
7782
|
-
return this.currentUnits$.pipe(
|
|
7823
|
+
return this.currentUnits$.pipe(Vr((n) => {
|
|
7783
7824
|
var s;
|
|
7784
7825
|
return (s = n.get(e)) != null ? s : null;
|
|
7785
|
-
}),
|
|
7826
|
+
}), Kr());
|
|
7786
7827
|
}
|
|
7787
7828
|
getCurrentUnitForType(e) {
|
|
7788
7829
|
return this._currentUnits.get(e);
|
|
@@ -7844,7 +7885,7 @@ let zn = class extends Lt {
|
|
|
7844
7885
|
return e ? (n = this._getUnitById(e)) == null ? void 0 : n[0] : null;
|
|
7845
7886
|
}
|
|
7846
7887
|
focusUnit(e) {
|
|
7847
|
-
this._focused$.next(e), this.focused instanceof _n ? (this._contextService.setContextValue(xn, !1), this._contextService.setContextValue(an, !0), this._contextService.setContextValue(Pn, !1)) : this.focused instanceof Pe ? (this._contextService.setContextValue(xn, !0), this._contextService.setContextValue(an, !1), this._contextService.setContextValue(Pn, !1)) : this.focused instanceof
|
|
7888
|
+
this._focused$.next(e), this.focused instanceof _n ? (this._contextService.setContextValue(xn, !1), this._contextService.setContextValue(an, !0), this._contextService.setContextValue(Pn, !1)) : this.focused instanceof Pe ? (this._contextService.setContextValue(xn, !0), this._contextService.setContextValue(an, !1), this._contextService.setContextValue(Pn, !1)) : this.focused instanceof Sr && (this._contextService.setContextValue(xn, !1), this._contextService.setContextValue(an, !1), this._contextService.setContextValue(Pn, !0));
|
|
7848
7889
|
}
|
|
7849
7890
|
getFocusedUnit() {
|
|
7850
7891
|
return this.focused;
|
|
@@ -7868,18 +7909,18 @@ let zn = class extends Lt {
|
|
|
7868
7909
|
}
|
|
7869
7910
|
}
|
|
7870
7911
|
};
|
|
7871
|
-
zn =
|
|
7912
|
+
zn = ra([
|
|
7872
7913
|
Ws(0, ie(we)),
|
|
7873
7914
|
Ws(1, Rn)
|
|
7874
7915
|
], zn);
|
|
7875
7916
|
var ft = /* @__PURE__ */ ((t) => (t[t.Starting = 0] = "Starting", t[t.Ready = 1] = "Ready", t[t.Rendered = 2] = "Rendered", t[t.Steady = 3] = "Steady", t))(ft || {});
|
|
7876
|
-
const
|
|
7917
|
+
const ia = {
|
|
7877
7918
|
0: "Starting",
|
|
7878
7919
|
1: "Ready",
|
|
7879
7920
|
2: "Rendered",
|
|
7880
7921
|
3: "Steady"
|
|
7881
7922
|
}, un = /* @__PURE__ */ new Map();
|
|
7882
|
-
function
|
|
7923
|
+
function oa(t, e) {
|
|
7883
7924
|
return function(r) {
|
|
7884
7925
|
gs(t, e);
|
|
7885
7926
|
};
|
|
@@ -7887,12 +7928,12 @@ function na(t, e) {
|
|
|
7887
7928
|
function gs(t, e) {
|
|
7888
7929
|
un.has(t) || un.set(t, []), un.get(t).push(e);
|
|
7889
7930
|
}
|
|
7890
|
-
var
|
|
7891
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
7931
|
+
var la = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, wr = (t, e, n, s) => {
|
|
7932
|
+
for (var r = s > 1 ? void 0 : s ? aa(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
7892
7933
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
7893
|
-
return s && r &&
|
|
7894
|
-
},
|
|
7895
|
-
let ye = class extends
|
|
7934
|
+
return s && r && la(e, n, r), r;
|
|
7935
|
+
}, br = (t, e) => (n, s) => e(n, s, t);
|
|
7936
|
+
let ye = class extends Ut {
|
|
7896
7937
|
constructor(e) {
|
|
7897
7938
|
super();
|
|
7898
7939
|
g(this, "_lifecycle$", new te(ft.Starting));
|
|
@@ -7921,16 +7962,16 @@ let ye = class extends Lt {
|
|
|
7921
7962
|
* @returns
|
|
7922
7963
|
*/
|
|
7923
7964
|
subscribeWithPrevious() {
|
|
7924
|
-
return zs(
|
|
7965
|
+
return zs(Ar(this.stage), this._lifecycle$.pipe(Xs(1))).pipe(sl((e) => e === ft.Steady));
|
|
7925
7966
|
}
|
|
7926
7967
|
_reportProgress(e) {
|
|
7927
|
-
this._logService.debug("[LifecycleService]", `lifecycle progressed to "${
|
|
7968
|
+
this._logService.debug("[LifecycleService]", `lifecycle progressed to "${ia[e]}".`);
|
|
7928
7969
|
}
|
|
7929
7970
|
};
|
|
7930
|
-
ye =
|
|
7931
|
-
|
|
7971
|
+
ye = wr([
|
|
7972
|
+
br(0, be)
|
|
7932
7973
|
], ye);
|
|
7933
|
-
let mn = class extends
|
|
7974
|
+
let mn = class extends Ut {
|
|
7934
7975
|
constructor(e) {
|
|
7935
7976
|
super();
|
|
7936
7977
|
g(this, "_seenTokens", /* @__PURE__ */ new Set());
|
|
@@ -7943,10 +7984,10 @@ let mn = class extends Lt {
|
|
|
7943
7984
|
});
|
|
7944
7985
|
}
|
|
7945
7986
|
};
|
|
7946
|
-
mn =
|
|
7947
|
-
|
|
7987
|
+
mn = wr([
|
|
7988
|
+
br(0, ie(we))
|
|
7948
7989
|
], mn);
|
|
7949
|
-
function
|
|
7990
|
+
function Ar(t) {
|
|
7950
7991
|
switch (t) {
|
|
7951
7992
|
case ft.Starting:
|
|
7952
7993
|
return Ze(ft.Starting);
|
|
@@ -7963,7 +8004,7 @@ function br(t) {
|
|
|
7963
8004
|
);
|
|
7964
8005
|
}
|
|
7965
8006
|
}
|
|
7966
|
-
class cn extends
|
|
8007
|
+
class cn extends Ut {
|
|
7967
8008
|
constructor() {
|
|
7968
8009
|
super();
|
|
7969
8010
|
g(this, "_currentLocale$", new te(ke.ZH_CN));
|
|
@@ -8018,7 +8059,7 @@ class cn extends Lt {
|
|
|
8018
8059
|
*/
|
|
8019
8060
|
load(n) {
|
|
8020
8061
|
var s;
|
|
8021
|
-
this._locales =
|
|
8062
|
+
this._locales = P.deepMerge((s = this._locales) != null ? s : {}, n);
|
|
8022
8063
|
}
|
|
8023
8064
|
setLocale(n) {
|
|
8024
8065
|
this._currentLocale$.next(n), this.localeChanged$.next();
|
|
@@ -8039,10 +8080,10 @@ class cn extends Lt {
|
|
|
8039
8080
|
return null;
|
|
8040
8081
|
}
|
|
8041
8082
|
}
|
|
8042
|
-
var
|
|
8043
|
-
const
|
|
8044
|
-
gs(ft.Starting,
|
|
8045
|
-
class
|
|
8083
|
+
var vr = /* @__PURE__ */ ((t) => (t.INIT = "init", t.FETCHING = "fetching", t.DONE = "done", t))(vr || {});
|
|
8084
|
+
const Tr = zt("univer.permission-service");
|
|
8085
|
+
gs(ft.Starting, Tr);
|
|
8086
|
+
class ua extends Ut {
|
|
8046
8087
|
constructor() {
|
|
8047
8088
|
super(...arguments);
|
|
8048
8089
|
g(this, "_permissionPointMap", /* @__PURE__ */ new Map());
|
|
@@ -8066,7 +8107,7 @@ class ia extends Lt {
|
|
|
8066
8107
|
if (!r)
|
|
8067
8108
|
return;
|
|
8068
8109
|
const i = r.getValue();
|
|
8069
|
-
i.value = s, i.status =
|
|
8110
|
+
i.value = s, i.status = vr.DONE, r.next({ ...i }), this._permissionPointUpdate$.next(i);
|
|
8070
8111
|
}
|
|
8071
8112
|
clearPermissionMap() {
|
|
8072
8113
|
this._permissionPointMap.clear();
|
|
@@ -8089,9 +8130,9 @@ class ia extends Lt {
|
|
|
8089
8130
|
throw new Error(`[PermissionService]: ${r} permissionPoint does not exist!`);
|
|
8090
8131
|
return i.asObservable();
|
|
8091
8132
|
});
|
|
8092
|
-
return
|
|
8133
|
+
return Yr(s).pipe(
|
|
8093
8134
|
// Check that all permissions exist
|
|
8094
|
-
|
|
8135
|
+
Zr((r) => r)
|
|
8095
8136
|
);
|
|
8096
8137
|
}
|
|
8097
8138
|
composePermission(n) {
|
|
@@ -8110,7 +8151,7 @@ class ia extends Lt {
|
|
|
8110
8151
|
}), n;
|
|
8111
8152
|
}
|
|
8112
8153
|
}
|
|
8113
|
-
class
|
|
8154
|
+
class ca extends Ut {
|
|
8114
8155
|
constructor() {
|
|
8115
8156
|
super(...arguments);
|
|
8116
8157
|
g(this, "_resourceMap", /* @__PURE__ */ new Map());
|
|
@@ -8170,12 +8211,12 @@ class oa extends Lt {
|
|
|
8170
8211
|
}
|
|
8171
8212
|
}
|
|
8172
8213
|
const _s = zt("resource-manager-service");
|
|
8173
|
-
var
|
|
8174
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
8214
|
+
var ha = Object.defineProperty, da = Object.getOwnPropertyDescriptor, fa = (t, e, n, s) => {
|
|
8215
|
+
for (var r = s > 1 ? void 0 : s ? da(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
8175
8216
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
8176
|
-
return s && r &&
|
|
8217
|
+
return s && r && ha(e, n, r), r;
|
|
8177
8218
|
}, Bs = (t, e) => (n, s) => e(n, s, t);
|
|
8178
|
-
let Xn = class extends
|
|
8219
|
+
let Xn = class extends Ut {
|
|
8179
8220
|
constructor(e, n) {
|
|
8180
8221
|
super();
|
|
8181
8222
|
g(this, "saveWorkbook", (e) => {
|
|
@@ -8241,13 +8282,13 @@ let Xn = class extends Lt {
|
|
|
8241
8282
|
return r.resources = s, r;
|
|
8242
8283
|
}
|
|
8243
8284
|
};
|
|
8244
|
-
Xn =
|
|
8285
|
+
Xn = fa([
|
|
8245
8286
|
Bs(0, ie(_s)),
|
|
8246
8287
|
Bs(1, ie(Xe))
|
|
8247
8288
|
], Xn);
|
|
8248
|
-
const
|
|
8249
|
-
gs(ft.Ready,
|
|
8250
|
-
class
|
|
8289
|
+
const Mr = zt("resource-loader-service");
|
|
8290
|
+
gs(ft.Ready, Mr);
|
|
8291
|
+
class Ur extends Ut {
|
|
8251
8292
|
constructor() {
|
|
8252
8293
|
super();
|
|
8253
8294
|
g(this, "_currentTheme");
|
|
@@ -8264,32 +8305,32 @@ class Mr extends Lt {
|
|
|
8264
8305
|
this._currentTheme = n, this._currentTheme$.next(n);
|
|
8265
8306
|
}
|
|
8266
8307
|
}
|
|
8267
|
-
const On = "__INTERNAL_EDITOR__",
|
|
8308
|
+
const On = "__INTERNAL_EDITOR__", ga = `${On}DOCS_NORMAL`, _a = `${On}DOCS_FORMULA_BAR`, Rc = `\r
|
|
8268
8309
|
`;
|
|
8269
|
-
function
|
|
8310
|
+
function Cc(t) {
|
|
8270
8311
|
return `${On}${t}`;
|
|
8271
8312
|
}
|
|
8272
|
-
function
|
|
8313
|
+
function Ic(t) {
|
|
8273
8314
|
return t.startsWith(On);
|
|
8274
8315
|
}
|
|
8275
|
-
var
|
|
8276
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
8316
|
+
var ma = Object.defineProperty, pa = Object.getOwnPropertyDescriptor, Ea = (t, e, n, s) => {
|
|
8317
|
+
for (var r = s > 1 ? void 0 : s ? pa(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
8277
8318
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
8278
|
-
return s && r &&
|
|
8319
|
+
return s && r && ma(e, n, r), r;
|
|
8279
8320
|
}, yn = (t, e) => (n, s) => e(n, s, t);
|
|
8280
|
-
const ms = zt("univer.undo-redo.service"),
|
|
8281
|
-
class
|
|
8321
|
+
const ms = zt("univer.undo-redo.service"), Ra = 20;
|
|
8322
|
+
class Lr {
|
|
8282
8323
|
dispose() {
|
|
8283
8324
|
}
|
|
8284
8325
|
async dispatchToHandlers() {
|
|
8285
8326
|
return !1;
|
|
8286
8327
|
}
|
|
8287
8328
|
}
|
|
8288
|
-
const
|
|
8329
|
+
const Ca = "univer.command.redo", Ia = "univer.command.undo", Oa = new class extends Lr {
|
|
8289
8330
|
constructor() {
|
|
8290
8331
|
super(...arguments);
|
|
8291
8332
|
g(this, "type", Cn.COMMAND);
|
|
8292
|
-
g(this, "id",
|
|
8333
|
+
g(this, "id", Ia);
|
|
8293
8334
|
}
|
|
8294
8335
|
async handler(e) {
|
|
8295
8336
|
const n = e.get(ms), s = n.pitchTopUndoElement();
|
|
@@ -8298,11 +8339,11 @@ const ma = "univer.command.redo", pa = "univer.command.undo", Ea = new class ext
|
|
|
8298
8339
|
const r = e.get(In);
|
|
8299
8340
|
return nr(s.undoMutations, r) ? (n.popUndoToRedo(), !0) : !1;
|
|
8300
8341
|
}
|
|
8301
|
-
}(),
|
|
8342
|
+
}(), Na = new class extends Lr {
|
|
8302
8343
|
constructor() {
|
|
8303
8344
|
super(...arguments);
|
|
8304
8345
|
g(this, "type", Cn.COMMAND);
|
|
8305
|
-
g(this, "id",
|
|
8346
|
+
g(this, "id", Ca);
|
|
8306
8347
|
}
|
|
8307
8348
|
async handler(e) {
|
|
8308
8349
|
const n = e.get(ms), s = n.pitchTopRedoElement();
|
|
@@ -8312,7 +8353,7 @@ const ma = "univer.command.redo", pa = "univer.command.undo", Ea = new class ext
|
|
|
8312
8353
|
return nr(s.redoMutations, r) ? (n.popRedoToUndo(), !0) : !1;
|
|
8313
8354
|
}
|
|
8314
8355
|
}();
|
|
8315
|
-
let qn = class extends
|
|
8356
|
+
let qn = class extends Ut {
|
|
8316
8357
|
constructor(e, n, s) {
|
|
8317
8358
|
super();
|
|
8318
8359
|
g(this, "undoRedoStatus$");
|
|
@@ -8321,7 +8362,7 @@ let qn = class extends Lt {
|
|
|
8321
8362
|
g(this, "_undoStacks", /* @__PURE__ */ new Map());
|
|
8322
8363
|
g(this, "_redoStacks", /* @__PURE__ */ new Map());
|
|
8323
8364
|
g(this, "_batchingStatus", /* @__PURE__ */ new Map());
|
|
8324
|
-
this._univerInstanceService = e, this._commandService = n, this._contextService = s, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(
|
|
8365
|
+
this._univerInstanceService = e, this._commandService = n, this._contextService = s, this.undoRedoStatus$ = this._undoRedoStatus$.asObservable(), this.disposeWithMe(this._commandService.registerCommand(Oa)), this.disposeWithMe(this._commandService.registerCommand(Na)), this.disposeWithMe(bt(() => this._undoRedoStatus$.complete())), this.disposeWithMe(bt(this._univerInstanceService.focused$.subscribe(() => this._updateStatus())));
|
|
8325
8366
|
}
|
|
8326
8367
|
pushUndoRedo(e) {
|
|
8327
8368
|
const { unitID: n } = e, s = this._getRedoStack(n, !0), r = this._getUndoStack(n, !0);
|
|
@@ -8335,7 +8376,7 @@ let qn = class extends Lt {
|
|
|
8335
8376
|
} else
|
|
8336
8377
|
i(e);
|
|
8337
8378
|
function i(o) {
|
|
8338
|
-
r.push(o), r.length >
|
|
8379
|
+
r.push(o), r.length > Ra && r.splice(0, 1);
|
|
8339
8380
|
}
|
|
8340
8381
|
this._updateStatus();
|
|
8341
8382
|
}
|
|
@@ -8412,17 +8453,17 @@ let qn = class extends Lt {
|
|
|
8412
8453
|
_getFocusedUnitId() {
|
|
8413
8454
|
var i, o, l, a;
|
|
8414
8455
|
let e = "";
|
|
8415
|
-
const n = this._contextService.getContextValue(an), s = this._contextService.getContextValue(
|
|
8416
|
-
return n ? s ? e =
|
|
8456
|
+
const n = this._contextService.getContextValue(an), s = this._contextService.getContextValue(ea), r = this._contextService.getContextValue(ta);
|
|
8457
|
+
return n ? s ? e = _a : r ? e = ga : e = (o = (i = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : i.getUnitId()) != null ? o : "" : e = (a = (l = this._univerInstanceService.getFocusedUnit()) == null ? void 0 : l.getUnitId()) != null ? a : "", e;
|
|
8417
8458
|
}
|
|
8418
8459
|
};
|
|
8419
|
-
qn =
|
|
8460
|
+
qn = Ea([
|
|
8420
8461
|
yn(0, Xe),
|
|
8421
8462
|
yn(1, In),
|
|
8422
8463
|
yn(2, Rn)
|
|
8423
8464
|
], qn);
|
|
8424
|
-
const
|
|
8425
|
-
class Gs extends
|
|
8465
|
+
const Dr = Symbol("DependentOn");
|
|
8466
|
+
class Gs extends Ut {
|
|
8426
8467
|
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
8427
8468
|
onStarting(e) {
|
|
8428
8469
|
}
|
|
@@ -8440,7 +8481,7 @@ class Gs extends Lt {
|
|
|
8440
8481
|
}
|
|
8441
8482
|
}
|
|
8442
8483
|
g(Gs, "pluginName"), g(Gs, "type", tt.UNIVER_UNKNOWN);
|
|
8443
|
-
class
|
|
8484
|
+
class Sa {
|
|
8444
8485
|
constructor() {
|
|
8445
8486
|
g(this, "_plugins", []);
|
|
8446
8487
|
}
|
|
@@ -8455,7 +8496,7 @@ class Ca {
|
|
|
8455
8496
|
this._plugins.forEach(e);
|
|
8456
8497
|
}
|
|
8457
8498
|
}
|
|
8458
|
-
class
|
|
8499
|
+
class wa {
|
|
8459
8500
|
constructor() {
|
|
8460
8501
|
g(this, "_pluginsRegistered", []);
|
|
8461
8502
|
}
|
|
@@ -8470,15 +8511,15 @@ class Ia {
|
|
|
8470
8511
|
this._pluginsRegistered = [];
|
|
8471
8512
|
}
|
|
8472
8513
|
}
|
|
8473
|
-
var
|
|
8474
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
8514
|
+
var ba = Object.defineProperty, Aa = Object.getOwnPropertyDescriptor, xr = (t, e, n, s) => {
|
|
8515
|
+
for (var r = s > 1 ? void 0 : s ? Aa(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
8475
8516
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
8476
|
-
return s && r &&
|
|
8517
|
+
return s && r && ba(e, n, r), r;
|
|
8477
8518
|
}, $e = (t, e) => (n, s) => e(n, s, t);
|
|
8478
|
-
const
|
|
8479
|
-
function
|
|
8519
|
+
const va = 4;
|
|
8520
|
+
function Oc(...t) {
|
|
8480
8521
|
return function(e) {
|
|
8481
|
-
e[
|
|
8522
|
+
e[Dr] = t;
|
|
8482
8523
|
};
|
|
8483
8524
|
}
|
|
8484
8525
|
let pn = class {
|
|
@@ -8540,7 +8581,7 @@ let pn = class {
|
|
|
8540
8581
|
() => {
|
|
8541
8582
|
this._pluginHolderForUniver.started || this._pluginHolderForUniver.start(), this._flushPlugins(), this._clearFlushTimer();
|
|
8542
8583
|
},
|
|
8543
|
-
|
|
8584
|
+
va
|
|
8544
8585
|
));
|
|
8545
8586
|
}
|
|
8546
8587
|
_clearFlushTimer() {
|
|
@@ -8552,17 +8593,17 @@ let pn = class {
|
|
|
8552
8593
|
e.started && e.flush();
|
|
8553
8594
|
}
|
|
8554
8595
|
};
|
|
8555
|
-
pn =
|
|
8596
|
+
pn = xr([
|
|
8556
8597
|
$e(0, ie(we))
|
|
8557
8598
|
], pn);
|
|
8558
|
-
let En = class extends
|
|
8599
|
+
let En = class extends Ut {
|
|
8559
8600
|
constructor(e, n, s, r, i, o) {
|
|
8560
8601
|
super();
|
|
8561
8602
|
g(this, "_started", !1);
|
|
8562
8603
|
/** Plugin constructors waiting to be initialized. */
|
|
8563
|
-
g(this, "_pluginRegistry", new
|
|
8604
|
+
g(this, "_pluginRegistry", new wa());
|
|
8564
8605
|
/** Stores initialized plugin instances. */
|
|
8565
|
-
g(this, "_pluginStore", new
|
|
8606
|
+
g(this, "_pluginStore", new Sa());
|
|
8566
8607
|
g(this, "_awaitingPlugins", []);
|
|
8567
8608
|
this._checkPluginRegistered = e, this._registerPlugin = n, this._logService = s, this._injector = r, this._lifecycleService = i, this._lifecycleInitializerService = o, this.disposeWithMe(this._lifecycleService.lifecycle$.pipe(Xs(1)).subscribe((l) => {
|
|
8568
8609
|
this._awaitingPlugins.forEach((a) => this._runStage(a, l));
|
|
@@ -8592,7 +8633,7 @@ let En = class extends Lt {
|
|
|
8592
8633
|
}
|
|
8593
8634
|
// eslint-disable-next-line ts/no-explicit-any
|
|
8594
8635
|
_initPlugin(e, n) {
|
|
8595
|
-
const s = e[
|
|
8636
|
+
const s = e[Dr];
|
|
8596
8637
|
if (s) {
|
|
8597
8638
|
const i = () => {
|
|
8598
8639
|
const o = s.find((l) => !this._checkPluginRegistered(l));
|
|
@@ -8610,7 +8651,7 @@ let En = class extends Lt {
|
|
|
8610
8651
|
// Here we should be careful with the sequence of which plugin should run first. We should manually add a queue here.
|
|
8611
8652
|
// Because laterly registered plugins may get executed first.
|
|
8612
8653
|
_pluginsRunLifecycle(e) {
|
|
8613
|
-
|
|
8654
|
+
Ar(this._lifecycleService.stage).subscribe((n) => this._runStage(e, n)), this._awaitingPlugins.push(e);
|
|
8614
8655
|
}
|
|
8615
8656
|
_runStage(e, n) {
|
|
8616
8657
|
e.forEach((s) => {
|
|
@@ -8631,13 +8672,13 @@ let En = class extends Lt {
|
|
|
8631
8672
|
}), this._lifecycleInitializerService.initModulesOnStage(n);
|
|
8632
8673
|
}
|
|
8633
8674
|
};
|
|
8634
|
-
En =
|
|
8675
|
+
En = xr([
|
|
8635
8676
|
$e(2, be),
|
|
8636
8677
|
$e(3, ie(we)),
|
|
8637
8678
|
$e(4, ie(ye)),
|
|
8638
8679
|
$e(5, ie(mn))
|
|
8639
8680
|
], En);
|
|
8640
|
-
function
|
|
8681
|
+
function Ta(t, e) {
|
|
8641
8682
|
if (!e) return t;
|
|
8642
8683
|
const n = [];
|
|
8643
8684
|
for (const s of t) {
|
|
@@ -8656,7 +8697,7 @@ const Zn = {
|
|
|
8656
8697
|
[yt.Reader]: "Reader",
|
|
8657
8698
|
[yt.UNRECOGNIZED]: "UNRECOGNIZED"
|
|
8658
8699
|
}, Jn = (t) => t ? {
|
|
8659
|
-
userID: `${Zn[t]}_${
|
|
8700
|
+
userID: `${Zn[t]}_${P.generateRandomId(8)}`,
|
|
8660
8701
|
name: Zn[t],
|
|
8661
8702
|
avatar: ""
|
|
8662
8703
|
} : {
|
|
@@ -8666,10 +8707,10 @@ const Zn = {
|
|
|
8666
8707
|
anonymous: !0,
|
|
8667
8708
|
canBindAnonymous: !1
|
|
8668
8709
|
}, kn = (t, e) => t.startsWith(Zn[e]);
|
|
8669
|
-
var
|
|
8670
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
8710
|
+
var Ma = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, La = (t, e, n, s) => {
|
|
8711
|
+
for (var r = s > 1 ? void 0 : s ? Ua(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
8671
8712
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
8672
|
-
return s && r &&
|
|
8713
|
+
return s && r && Ma(e, n, r), r;
|
|
8673
8714
|
};
|
|
8674
8715
|
let Ge = class {
|
|
8675
8716
|
constructor() {
|
|
@@ -8705,20 +8746,27 @@ let Ge = class {
|
|
|
8705
8746
|
clear() {
|
|
8706
8747
|
this._model.clear(), this._userChange$.next({ type: "clear" });
|
|
8707
8748
|
}
|
|
8749
|
+
list() {
|
|
8750
|
+
return Array.from(this._model.values());
|
|
8751
|
+
}
|
|
8708
8752
|
};
|
|
8709
|
-
Ge =
|
|
8710
|
-
|
|
8753
|
+
Ge = La([
|
|
8754
|
+
oa(ft.Starting, Ge)
|
|
8711
8755
|
], Ge);
|
|
8712
|
-
var
|
|
8713
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
8756
|
+
var Da = Object.defineProperty, xa = Object.getOwnPropertyDescriptor, Pa = (t, e, n, s) => {
|
|
8757
|
+
for (var r = s > 1 ? void 0 : s ? xa(e, n) : e, i = t.length - 1, o; i >= 0; i--)
|
|
8714
8758
|
(o = t[i]) && (r = (s ? o(e, n, r) : o(r)) || r);
|
|
8715
|
-
return s && r &&
|
|
8759
|
+
return s && r && Da(e, n, r), r;
|
|
8716
8760
|
}, js = (t, e) => (n, s) => e(n, s, t);
|
|
8717
8761
|
let Qn = class {
|
|
8718
8762
|
// private _sheetPermissionPointMap: Map<string, { action: UnitAction; allowed: boolean }[]> = new Map();
|
|
8719
8763
|
constructor(t, e) {
|
|
8720
8764
|
g(this, "_permissionMap", /* @__PURE__ */ new Map([]));
|
|
8721
|
-
this._resourceManagerService = t, this._userManagerService = e, this._initSnapshot(),
|
|
8765
|
+
this._resourceManagerService = t, this._userManagerService = e, this._initSnapshot(), this._initDefaultUser();
|
|
8766
|
+
}
|
|
8767
|
+
_initDefaultUser() {
|
|
8768
|
+
const t = this._userManagerService.getCurrentUser();
|
|
8769
|
+
t && t.userID || this._userManagerService.setCurrentUser(Jn(yt.Owner));
|
|
8722
8770
|
}
|
|
8723
8771
|
_getRole(t) {
|
|
8724
8772
|
const e = this._userManagerService.getCurrentUser();
|
|
@@ -8746,7 +8794,7 @@ let Qn = class {
|
|
|
8746
8794
|
});
|
|
8747
8795
|
}
|
|
8748
8796
|
async create(t) {
|
|
8749
|
-
const e =
|
|
8797
|
+
const e = P.generateRandomId(8);
|
|
8750
8798
|
switch (t.objectType) {
|
|
8751
8799
|
case ln.SelectRange: {
|
|
8752
8800
|
const n = t.selectRangeObject;
|
|
@@ -8835,12 +8883,12 @@ let Qn = class {
|
|
|
8835
8883
|
async putCollaborators(t) {
|
|
8836
8884
|
}
|
|
8837
8885
|
};
|
|
8838
|
-
Qn =
|
|
8886
|
+
Qn = Pa([
|
|
8839
8887
|
js(0, _s),
|
|
8840
8888
|
js(1, ie(Ge))
|
|
8841
8889
|
], Qn);
|
|
8842
|
-
const
|
|
8843
|
-
class
|
|
8890
|
+
const ya = zt("IAuthzIoIoService");
|
|
8891
|
+
class Nc {
|
|
8844
8892
|
/**
|
|
8845
8893
|
* Create a Univer instance.
|
|
8846
8894
|
* @param config Configuration data for Univer
|
|
@@ -8849,8 +8897,8 @@ class Ec {
|
|
|
8849
8897
|
constructor(e = {}, n) {
|
|
8850
8898
|
g(this, "_startedTypes", /* @__PURE__ */ new Set());
|
|
8851
8899
|
g(this, "_injector");
|
|
8852
|
-
const s = this._injector =
|
|
8853
|
-
r && this._injector.get(
|
|
8900
|
+
const s = this._injector = ka(n, e == null ? void 0 : e.override), { theme: r, locale: i, locales: o, logLevel: l } = e;
|
|
8901
|
+
r && this._injector.get(Ur).setTheme(r), o && this._injector.get(cn).load(o), i && this._injector.get(cn).setLocale(i), l && this._injector.get(be).setLogLevel(l), this._init(s);
|
|
8854
8902
|
}
|
|
8855
8903
|
get _univerInstanceService() {
|
|
8856
8904
|
return this._injector.get(Xe);
|
|
@@ -8891,7 +8939,7 @@ class Ec {
|
|
|
8891
8939
|
return this._univerInstanceService.createUnit(tt.UNIVER_SLIDE, e);
|
|
8892
8940
|
}
|
|
8893
8941
|
_init(e) {
|
|
8894
|
-
this._univerInstanceService.registerCtorForType(tt.UNIVER_SHEET, _n), this._univerInstanceService.registerCtorForType(tt.UNIVER_DOC, Pe), this._univerInstanceService.registerCtorForType(tt.UNIVER_SLIDE,
|
|
8942
|
+
this._univerInstanceService.registerCtorForType(tt.UNIVER_SHEET, _n), this._univerInstanceService.registerCtorForType(tt.UNIVER_DOC, Pe), this._univerInstanceService.registerCtorForType(tt.UNIVER_SLIDE, Sr);
|
|
8895
8943
|
const n = e.get(Xe);
|
|
8896
8944
|
n.__setCreateHandler(
|
|
8897
8945
|
(s, r, i) => {
|
|
@@ -8913,34 +8961,34 @@ class Ec {
|
|
|
8913
8961
|
this._pluginService.registerPlugin(e, n);
|
|
8914
8962
|
}
|
|
8915
8963
|
}
|
|
8916
|
-
function
|
|
8917
|
-
const n =
|
|
8918
|
-
[
|
|
8964
|
+
function ka(t, e) {
|
|
8965
|
+
const n = Ta([
|
|
8966
|
+
[yl],
|
|
8919
8967
|
[cn],
|
|
8920
|
-
[
|
|
8968
|
+
[Ur],
|
|
8921
8969
|
[ye],
|
|
8922
8970
|
[mn],
|
|
8923
8971
|
[pn],
|
|
8924
8972
|
[Ge],
|
|
8925
8973
|
// abstract services
|
|
8926
8974
|
[Xe, { useClass: zn }],
|
|
8927
|
-
[
|
|
8928
|
-
[be, { useClass:
|
|
8975
|
+
[Tr, { useClass: ua }],
|
|
8976
|
+
[be, { useClass: Xo, lazy: !0 }],
|
|
8929
8977
|
[In, { useClass: jn }],
|
|
8930
8978
|
[ms, { useClass: qn, lazy: !0 }],
|
|
8931
|
-
[
|
|
8932
|
-
[Rn, { useClass:
|
|
8933
|
-
[_s, { useClass:
|
|
8934
|
-
[
|
|
8935
|
-
[
|
|
8979
|
+
[xl, { useClass: Pl }],
|
|
8980
|
+
[Rn, { useClass: Yo }],
|
|
8981
|
+
[_s, { useClass: ca, lazy: !0 }],
|
|
8982
|
+
[Mr, { useClass: Xn, lazy: !0 }],
|
|
8983
|
+
[ya, { useClass: Qn, lazy: !0 }]
|
|
8936
8984
|
], e);
|
|
8937
8985
|
return t ? t.createChild(n) : new we(n);
|
|
8938
8986
|
}
|
|
8939
|
-
const
|
|
8987
|
+
const Sc = (t, e) => e.length === t.length && !t.some((n) => e.some((s) => !Ne.equals(s, n))), wc = (t, e) => e.length === t.length && t.every((n, s) => {
|
|
8940
8988
|
const r = e[s];
|
|
8941
8989
|
return r.unitId === n.unitId && r.sheetId === n.sheetId && Ne.equals(n.range, r.range);
|
|
8942
8990
|
});
|
|
8943
|
-
function
|
|
8991
|
+
function bc(t, e) {
|
|
8944
8992
|
if (Object.is(t, e))
|
|
8945
8993
|
return !0;
|
|
8946
8994
|
if (typeof t != "object" || !t || typeof e != "object" || !e)
|
|
@@ -8959,19 +9007,19 @@ function Ic(t, e) {
|
|
|
8959
9007
|
}
|
|
8960
9008
|
return !0;
|
|
8961
9009
|
}
|
|
8962
|
-
function
|
|
9010
|
+
function Ha(t) {
|
|
8963
9011
|
return /^-?\d+(\.\d+)?$/.test(t);
|
|
8964
9012
|
}
|
|
8965
|
-
function
|
|
8966
|
-
return
|
|
9013
|
+
function Ac(t) {
|
|
9014
|
+
return Ha(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
|
|
8967
9015
|
}
|
|
8968
|
-
function
|
|
9016
|
+
function vc(t) {
|
|
8969
9017
|
return ["true", "false"].includes(t.toLowerCase());
|
|
8970
9018
|
}
|
|
8971
|
-
function
|
|
9019
|
+
function Tc(t, e) {
|
|
8972
9020
|
return e.forEach((n) => t.add(n)), t;
|
|
8973
9021
|
}
|
|
8974
|
-
function
|
|
9022
|
+
function Mc(t, e = 16) {
|
|
8975
9023
|
let n = 0, s = null;
|
|
8976
9024
|
return function(...i) {
|
|
8977
9025
|
const o = Date.now();
|
|
@@ -8980,7 +9028,7 @@ function wc(t, e = 16) {
|
|
|
8980
9028
|
}, e)) : (n = o, t.apply(this, i));
|
|
8981
9029
|
};
|
|
8982
9030
|
}
|
|
8983
|
-
function
|
|
9031
|
+
function Uc(t) {
|
|
8984
9032
|
const e = new MessageChannel();
|
|
8985
9033
|
let n = !1;
|
|
8986
9034
|
const s = () => {
|
|
@@ -8990,8 +9038,8 @@ function bc(t) {
|
|
|
8990
9038
|
n = !0, e.port1.close(), e.port2.close();
|
|
8991
9039
|
};
|
|
8992
9040
|
}
|
|
8993
|
-
var
|
|
8994
|
-
function
|
|
9041
|
+
var Fa = /* @__PURE__ */ ((t) => (t[t.TEXT = 0] = "TEXT", t[t.ARROW = 1] = "ARROW", t[t.CUSTOM = 2] = "CUSTOM", t))(Fa || {});
|
|
9042
|
+
function Lc(t, e, n) {
|
|
8995
9043
|
if (e === "")
|
|
8996
9044
|
return t;
|
|
8997
9045
|
const s = {
|
|
@@ -9017,7 +9065,7 @@ function Ac(t, e, n) {
|
|
|
9017
9065
|
const l = r.getBody();
|
|
9018
9066
|
return r.dispose(), l;
|
|
9019
9067
|
}
|
|
9020
|
-
class
|
|
9068
|
+
class $a {
|
|
9021
9069
|
constructor() {
|
|
9022
9070
|
/**
|
|
9023
9071
|
* An WorkBookObserver can set this property to true to prevent subsequent observers of being notified
|
|
@@ -9034,7 +9082,7 @@ class ya {
|
|
|
9034
9082
|
this.isStopPropagation = !0;
|
|
9035
9083
|
}
|
|
9036
9084
|
}
|
|
9037
|
-
class
|
|
9085
|
+
class Dc extends Yt {
|
|
9038
9086
|
constructor() {
|
|
9039
9087
|
super(...arguments);
|
|
9040
9088
|
g(this, "_sortedObservers", []);
|
|
@@ -9071,7 +9119,7 @@ class vc extends Yt {
|
|
|
9071
9119
|
emitEvent(n) {
|
|
9072
9120
|
var s;
|
|
9073
9121
|
if (!this.closed) {
|
|
9074
|
-
const r = new
|
|
9122
|
+
const r = new $a();
|
|
9075
9123
|
r.lastReturnValue = n;
|
|
9076
9124
|
for (const i of this._sortedObservers) {
|
|
9077
9125
|
const o = (s = i.next) == null ? void 0 : s.call(i, [n, r]);
|
|
@@ -9091,11 +9139,11 @@ class vc extends Yt {
|
|
|
9091
9139
|
throw new Error("[EventSubject]: cannot emit event on a closed subject.");
|
|
9092
9140
|
}
|
|
9093
9141
|
}
|
|
9094
|
-
const
|
|
9095
|
-
function
|
|
9142
|
+
const xc = zt("ILocalStorageService");
|
|
9143
|
+
function Pc(t) {
|
|
9096
9144
|
return `sheet_interceptor_${t}`;
|
|
9097
9145
|
}
|
|
9098
|
-
const
|
|
9146
|
+
const Wa = (t) => function(e, n) {
|
|
9099
9147
|
let s = -1;
|
|
9100
9148
|
function r(i, o) {
|
|
9101
9149
|
if (i <= s)
|
|
@@ -9104,7 +9152,7 @@ const ka = (t) => function(e, n) {
|
|
|
9104
9152
|
}
|
|
9105
9153
|
return r(0, e);
|
|
9106
9154
|
};
|
|
9107
|
-
class
|
|
9155
|
+
class yc {
|
|
9108
9156
|
constructor(e) {
|
|
9109
9157
|
g(this, "_interceptorsByName", /* @__PURE__ */ new Map());
|
|
9110
9158
|
g(this, "_interceptorPoints");
|
|
@@ -9112,7 +9160,7 @@ class Uc {
|
|
|
9112
9160
|
}
|
|
9113
9161
|
fetchThroughInterceptors(e) {
|
|
9114
9162
|
const n = e, s = this._interceptorsByName.get(n);
|
|
9115
|
-
return
|
|
9163
|
+
return Wa(s || []);
|
|
9116
9164
|
}
|
|
9117
9165
|
intercept(e, n) {
|
|
9118
9166
|
const s = e;
|
|
@@ -9131,10 +9179,10 @@ class Uc {
|
|
|
9131
9179
|
return this._interceptorPoints;
|
|
9132
9180
|
}
|
|
9133
9181
|
}
|
|
9134
|
-
const
|
|
9182
|
+
const kc = zt(
|
|
9135
9183
|
"univer.snapshot-server-service"
|
|
9136
9184
|
);
|
|
9137
|
-
class
|
|
9185
|
+
class Hc {
|
|
9138
9186
|
constructor() {
|
|
9139
9187
|
g(this, "_sheetBlockCache", /* @__PURE__ */ new Map());
|
|
9140
9188
|
}
|
|
@@ -9222,46 +9270,46 @@ class Dc {
|
|
|
9222
9270
|
});
|
|
9223
9271
|
}
|
|
9224
9272
|
}
|
|
9225
|
-
function
|
|
9273
|
+
function Fc(t) {
|
|
9226
9274
|
return btoa(
|
|
9227
9275
|
encodeURIComponent(t).replace(/%([0-9A-F]{2})/g, (e, n) => String.fromCharCode(Number.parseInt(n, 16)))
|
|
9228
9276
|
);
|
|
9229
9277
|
}
|
|
9230
|
-
function
|
|
9278
|
+
function Pr(t) {
|
|
9231
9279
|
return decodeURIComponent(
|
|
9232
9280
|
Array.prototype.map.call(atob(t), (e) => `%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")
|
|
9233
9281
|
);
|
|
9234
9282
|
}
|
|
9235
9283
|
const Nn = new TextEncoder(), ps = new TextDecoder();
|
|
9236
|
-
function
|
|
9237
|
-
const e =
|
|
9284
|
+
function yr(t) {
|
|
9285
|
+
const e = P.deepClone(t);
|
|
9238
9286
|
return delete e.id, delete e.name, delete e.rowCount, delete e.columnCount, delete e.cellData, Nn.encode(JSON.stringify(e));
|
|
9239
9287
|
}
|
|
9240
|
-
function
|
|
9241
|
-
const e =
|
|
9288
|
+
function kr(t) {
|
|
9289
|
+
const e = P.deepClone(t);
|
|
9242
9290
|
return delete e.id, delete e.rev, delete e.name, delete e.sheetOrder, delete e.sheets, Nn.encode(JSON.stringify(e));
|
|
9243
9291
|
}
|
|
9244
|
-
function
|
|
9245
|
-
const e =
|
|
9292
|
+
function Ba(t) {
|
|
9293
|
+
const e = P.deepClone(t);
|
|
9246
9294
|
return delete e.id, delete e.rev, delete e.title, delete e.resources, Nn.encode(JSON.stringify(e));
|
|
9247
9295
|
}
|
|
9248
9296
|
function Vs(t) {
|
|
9249
9297
|
return JSON.parse(ps.decode(t));
|
|
9250
9298
|
}
|
|
9251
|
-
function
|
|
9252
|
-
return JSON.parse(typeof t == "string" ?
|
|
9299
|
+
function Ga(t) {
|
|
9300
|
+
return JSON.parse(typeof t == "string" ? Pr(t) : ps.decode(t));
|
|
9253
9301
|
}
|
|
9254
|
-
function
|
|
9255
|
-
return JSON.parse(typeof t == "string" ?
|
|
9302
|
+
function ja(t) {
|
|
9303
|
+
return JSON.parse(typeof t == "string" ? Pr(t) : ps.decode(t));
|
|
9256
9304
|
}
|
|
9257
9305
|
const Hn = 256 * 20;
|
|
9258
|
-
function
|
|
9306
|
+
function Hr(t, e) {
|
|
9259
9307
|
const n = new re(t), s = n.getLength(), r = [];
|
|
9260
9308
|
let i = 0;
|
|
9261
9309
|
for (; i < s; ) {
|
|
9262
|
-
const o = Math.min(i + Hn, s - 1), l = n.getSlice(i, Math.min(i + Hn, s - 1), 0, e), a =
|
|
9310
|
+
const o = Math.min(i + Hn, s - 1), l = n.getSlice(i, Math.min(i + Hn, s - 1), 0, e), a = Va(l);
|
|
9263
9311
|
r.push({
|
|
9264
|
-
id:
|
|
9312
|
+
id: P.generateRandomId(19, "0123456789"),
|
|
9265
9313
|
// an random ID for client, this would be changed after the block is saved in the server
|
|
9266
9314
|
startRow: i,
|
|
9267
9315
|
endRow: o,
|
|
@@ -9270,11 +9318,11 @@ function kr(t, e) {
|
|
|
9270
9318
|
}
|
|
9271
9319
|
return r;
|
|
9272
9320
|
}
|
|
9273
|
-
function
|
|
9321
|
+
function Va(t) {
|
|
9274
9322
|
const e = t.getData();
|
|
9275
9323
|
return Nn.encode(JSON.stringify(e));
|
|
9276
9324
|
}
|
|
9277
|
-
async function
|
|
9325
|
+
async function $c(t, e, n, s, r) {
|
|
9278
9326
|
const i = {}, o = {};
|
|
9279
9327
|
if (!await Promise.all(
|
|
9280
9328
|
Object.entries(e.sheets).map(async ([u, d]) => {
|
|
@@ -9284,33 +9332,33 @@ async function Pc(t, e, n, s, r) {
|
|
|
9284
9332
|
name: d.name,
|
|
9285
9333
|
rowCount: d.rowCount,
|
|
9286
9334
|
columnCount: d.columnCount,
|
|
9287
|
-
originalMeta:
|
|
9335
|
+
originalMeta: yr(d)
|
|
9288
9336
|
};
|
|
9289
9337
|
if (o[u] = f, d.cellData) {
|
|
9290
|
-
const m =
|
|
9338
|
+
const m = Hr(d.cellData, d.rowCount), p = await Promise.all(
|
|
9291
9339
|
m.map(
|
|
9292
|
-
(
|
|
9340
|
+
(M) => r.saveSheetBlock(t, {
|
|
9293
9341
|
unitID: n,
|
|
9294
9342
|
type: tt.UNIVER_SHEET,
|
|
9295
|
-
block:
|
|
9343
|
+
block: M
|
|
9296
9344
|
})
|
|
9297
9345
|
)
|
|
9298
9346
|
);
|
|
9299
|
-
if (p.some((
|
|
9300
|
-
var
|
|
9301
|
-
return ((
|
|
9347
|
+
if (p.some((M) => {
|
|
9348
|
+
var L;
|
|
9349
|
+
return ((L = M.error) == null ? void 0 : L.code) !== Kt.OK;
|
|
9302
9350
|
}))
|
|
9303
9351
|
return !1;
|
|
9304
9352
|
i[u] = {
|
|
9305
9353
|
sheetID: u,
|
|
9306
|
-
blocks: p.map((
|
|
9354
|
+
blocks: p.map((M) => M.blockID)
|
|
9307
9355
|
};
|
|
9308
9356
|
}
|
|
9309
9357
|
return !0;
|
|
9310
9358
|
})
|
|
9311
9359
|
))
|
|
9312
9360
|
throw new Error("[transformWorkbookDataToSnapshot()]: Failed to save sheet blocks.");
|
|
9313
|
-
const a =
|
|
9361
|
+
const a = kr(e), h = {
|
|
9314
9362
|
unitID: e.id,
|
|
9315
9363
|
rev: s,
|
|
9316
9364
|
creator: "",
|
|
@@ -9332,22 +9380,22 @@ async function Pc(t, e, n, s, r) {
|
|
|
9332
9380
|
}
|
|
9333
9381
|
};
|
|
9334
9382
|
}
|
|
9335
|
-
async function
|
|
9383
|
+
async function Wc(t, e, n, s, r) {
|
|
9336
9384
|
var d, f;
|
|
9337
9385
|
const i = {}, o = {};
|
|
9338
9386
|
if (!await Promise.all(
|
|
9339
9387
|
Object.entries(e.sheets).map(async ([m, p]) => {
|
|
9340
|
-
const
|
|
9388
|
+
const M = {
|
|
9341
9389
|
id: p.id,
|
|
9342
9390
|
type: es.GRID,
|
|
9343
9391
|
name: p.name,
|
|
9344
9392
|
rowCount: p.rowCount,
|
|
9345
9393
|
columnCount: p.columnCount,
|
|
9346
|
-
originalMeta:
|
|
9394
|
+
originalMeta: yr(p)
|
|
9347
9395
|
};
|
|
9348
|
-
if (o[m] =
|
|
9349
|
-
const
|
|
9350
|
-
|
|
9396
|
+
if (o[m] = M, p.cellData) {
|
|
9397
|
+
const L = Hr(p.cellData, p.rowCount), Z = await Promise.all(
|
|
9398
|
+
L.map(
|
|
9351
9399
|
(gt) => r.saveSheetBlock(t, {
|
|
9352
9400
|
unitID: n,
|
|
9353
9401
|
type: tt.UNIVER_SHEET,
|
|
@@ -9369,7 +9417,7 @@ async function yc(t, e, n, s, r) {
|
|
|
9369
9417
|
})
|
|
9370
9418
|
))
|
|
9371
9419
|
throw new Error("[transformWorkbookDataToSnapshot()]: Failed to save sheet blocks.");
|
|
9372
|
-
const a =
|
|
9420
|
+
const a = kr(e), h = {
|
|
9373
9421
|
unitID: e.id,
|
|
9374
9422
|
rev: s,
|
|
9375
9423
|
creator: "",
|
|
@@ -9400,7 +9448,7 @@ ErrorCode: ${(d = u.error) == null ? void 0 : d.code}:${(f = u.error) == null ?
|
|
|
9400
9448
|
snapshot: c
|
|
9401
9449
|
};
|
|
9402
9450
|
}
|
|
9403
|
-
function
|
|
9451
|
+
function Bc(t, e, n) {
|
|
9404
9452
|
const s = t.workbook;
|
|
9405
9453
|
if (!s)
|
|
9406
9454
|
throw new Error("");
|
|
@@ -9430,11 +9478,11 @@ function kc(t, e, n) {
|
|
|
9430
9478
|
else
|
|
9431
9479
|
throw new Error("");
|
|
9432
9480
|
}), u.forEach((f) => {
|
|
9433
|
-
const m =
|
|
9434
|
-
Object.entries(m).forEach(([p,
|
|
9435
|
-
const
|
|
9436
|
-
Object.entries(
|
|
9437
|
-
|
|
9481
|
+
const m = Ga(f.data);
|
|
9482
|
+
Object.entries(m).forEach(([p, M]) => {
|
|
9483
|
+
const L = c.cellData[+p] = {};
|
|
9484
|
+
Object.entries(M).forEach(([Z, gt]) => {
|
|
9485
|
+
L[+Z] = gt;
|
|
9438
9486
|
});
|
|
9439
9487
|
});
|
|
9440
9488
|
});
|
|
@@ -9453,11 +9501,11 @@ function kc(t, e, n) {
|
|
|
9453
9501
|
...o
|
|
9454
9502
|
};
|
|
9455
9503
|
}
|
|
9456
|
-
function
|
|
9504
|
+
function Gc(t) {
|
|
9457
9505
|
const e = t.doc;
|
|
9458
9506
|
if (e == null)
|
|
9459
9507
|
throw new Error("transformSnapshotToDocumentData(): snapshot.doc is undefined.");
|
|
9460
|
-
const { unitID: n, rev: s, name: r, originalMeta: i, resources: o = [] } = e, { body: l, documentStyle: a = {}, settings: h = {}, drawings: c = {}, drawingsOrder: u = [] } =
|
|
9508
|
+
const { unitID: n, rev: s, name: r, originalMeta: i, resources: o = [] } = e, { body: l, documentStyle: a = {}, settings: h = {}, drawings: c = {}, drawingsOrder: u = [] } = ja(i);
|
|
9461
9509
|
return {
|
|
9462
9510
|
id: n,
|
|
9463
9511
|
rev: s,
|
|
@@ -9471,7 +9519,7 @@ function Hc(t) {
|
|
|
9471
9519
|
resources: o
|
|
9472
9520
|
};
|
|
9473
9521
|
}
|
|
9474
|
-
async function
|
|
9522
|
+
async function jc(t, e, n, s, r) {
|
|
9475
9523
|
var a, h, c;
|
|
9476
9524
|
const i = {
|
|
9477
9525
|
unitID: e.id,
|
|
@@ -9479,7 +9527,7 @@ async function Fc(t, e, n, s, r) {
|
|
|
9479
9527
|
creator: "",
|
|
9480
9528
|
name: (a = e.title) != null ? a : "",
|
|
9481
9529
|
resources: e.resources || [],
|
|
9482
|
-
originalMeta:
|
|
9530
|
+
originalMeta: Ba(e)
|
|
9483
9531
|
}, o = {
|
|
9484
9532
|
unitID: n,
|
|
9485
9533
|
rev: i.rev,
|
|
@@ -9500,7 +9548,7 @@ ErrorCode: ${(h = l.error) == null ? void 0 : h.code}:${(c = l.error) == null ?
|
|
|
9500
9548
|
snapshot: o
|
|
9501
9549
|
};
|
|
9502
9550
|
}
|
|
9503
|
-
async function
|
|
9551
|
+
async function Vc(t, e) {
|
|
9504
9552
|
const n = t.workbook;
|
|
9505
9553
|
if (!n)
|
|
9506
9554
|
throw new Error("Workbook metadata is not available");
|
|
@@ -9520,322 +9568,325 @@ async function $c(t, e) {
|
|
|
9520
9568
|
r.push(...l);
|
|
9521
9569
|
}), await Promise.all(r), s;
|
|
9522
9570
|
}
|
|
9523
|
-
var
|
|
9524
|
-
const
|
|
9525
|
-
function
|
|
9571
|
+
var Ka = /* @__PURE__ */ ((t) => (t[t.INFO = 0] = "INFO", t[t.STOP = 1] = "STOP", t[t.WARNING = 2] = "WARNING", t))(Ka || {}), Ya = /* @__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))(Ya || {}), za = /* @__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))(za || {}), Xa = /* @__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))(Xa || {}), qa = /* @__PURE__ */ ((t) => (t.VALID = "valid", t.INVALID = "invalid", t.VALIDATING = "validating", t))(qa || {});
|
|
9572
|
+
const Kc = ["script", "style", "meta", "comment", "link"];
|
|
9573
|
+
function Yc(t) {
|
|
9526
9574
|
return !(t.length === 0 || t.length > 31 || t.startsWith("'") || t.endsWith("'") || /[:\\\/\?\*\[\]]/.test(t));
|
|
9527
9575
|
}
|
|
9528
|
-
|
|
9576
|
+
Qr();
|
|
9529
9577
|
export {
|
|
9530
|
-
|
|
9578
|
+
Wu as ABCToNumber,
|
|
9531
9579
|
wt as AbsoluteRefType,
|
|
9532
9580
|
Fs as ActionIterator,
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9581
|
+
no as AlignTypeH,
|
|
9582
|
+
so as AlignTypeV,
|
|
9583
|
+
oo as ArrangeTypeEnum,
|
|
9584
|
+
pi as ArrowsAndMarkersShapes,
|
|
9537
9585
|
Qn as AuthzIoLocalService,
|
|
9538
|
-
|
|
9586
|
+
ri as AutoFillSeries,
|
|
9539
9587
|
Ye as BaselineOffset,
|
|
9540
|
-
|
|
9541
|
-
|
|
9588
|
+
mi as BasicShapes,
|
|
9589
|
+
ki as BlockType,
|
|
9542
9590
|
Y as BooleanNumber,
|
|
9543
9591
|
dt as BorderStyleTypes,
|
|
9544
|
-
|
|
9592
|
+
ii as BorderType,
|
|
9545
9593
|
Ie as BulletAlignment,
|
|
9546
9594
|
Is as COLORS,
|
|
9547
9595
|
Le as CellValueType,
|
|
9548
|
-
|
|
9596
|
+
Hc as ClientSnapshotServerService,
|
|
9549
9597
|
De as Color,
|
|
9550
9598
|
ss as ColorBuilder,
|
|
9551
9599
|
se as ColorKit,
|
|
9552
9600
|
Qt as ColorType,
|
|
9553
|
-
|
|
9601
|
+
Wi as ColumnSeparatorType,
|
|
9554
9602
|
jn as CommandService,
|
|
9555
9603
|
Cn as CommandType,
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9604
|
+
oi as CommonHideTypes,
|
|
9605
|
+
Pl as ConfigService,
|
|
9606
|
+
Zi as ContentAlignment,
|
|
9607
|
+
Yo as ContextService,
|
|
9608
|
+
li as CopyPasteType,
|
|
9609
|
+
yi as CustomDecorationType,
|
|
9610
|
+
Pi as CustomRangeType,
|
|
9611
|
+
Zu as DEFAULT_CELL,
|
|
9612
|
+
Nr as DEFAULT_DOC,
|
|
9613
|
+
eu as DEFAULT_DOCUMENT_SUB_COMPONENT_ID,
|
|
9614
|
+
Rc as DEFAULT_EMPTY_DOCUMENT_VALUE,
|
|
9615
|
+
Xu as DEFAULT_RANGE,
|
|
9616
|
+
zu as DEFAULT_RANGE_ARRAY,
|
|
9617
|
+
qu as DEFAULT_SELECTION,
|
|
9618
|
+
$o as DEFAULT_SLIDE,
|
|
9571
9619
|
Un as DEFAULT_STYLES,
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9620
|
+
Wl as DEFAULT_WORKSHEET_COLUMN_COUNT,
|
|
9621
|
+
oc as DEFAULT_WORKSHEET_COLUMN_COUNT_KEY,
|
|
9622
|
+
Vl as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT,
|
|
9623
|
+
cc as DEFAULT_WORKSHEET_COLUMN_TITLE_HEIGHT_KEY,
|
|
9624
|
+
Gl as DEFAULT_WORKSHEET_COLUMN_WIDTH,
|
|
9625
|
+
ac as DEFAULT_WORKSHEET_COLUMN_WIDTH_KEY,
|
|
9626
|
+
$l as DEFAULT_WORKSHEET_ROW_COUNT,
|
|
9627
|
+
ic as DEFAULT_WORKSHEET_ROW_COUNT_KEY,
|
|
9628
|
+
Bl as DEFAULT_WORKSHEET_ROW_HEIGHT,
|
|
9629
|
+
lc as DEFAULT_WORKSHEET_ROW_HEIGHT_KEY,
|
|
9630
|
+
jl as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH,
|
|
9631
|
+
uc as DEFAULT_WORKSHEET_ROW_TITLE_WIDTH_KEY,
|
|
9632
|
+
_a as DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY,
|
|
9633
|
+
ga as DOCS_NORMAL_EDITOR_UNIT_ID_KEY,
|
|
9634
|
+
zi as DashStyleType,
|
|
9635
|
+
rl as DataStreamTreeNodeType,
|
|
9588
9636
|
_e as DataStreamTreeTokenType,
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9637
|
+
Ka as DataValidationErrorStyle,
|
|
9638
|
+
Ya as DataValidationImeMode,
|
|
9639
|
+
za as DataValidationOperator,
|
|
9640
|
+
Fa as DataValidationRenderMode,
|
|
9641
|
+
qa as DataValidationStatus,
|
|
9642
|
+
Xa as DataValidationType,
|
|
9643
|
+
Oc as DependentOn,
|
|
9644
|
+
Xo as DesktopLogService,
|
|
9645
|
+
ai as DeveloperMetadataVisibility,
|
|
9646
|
+
ui as Dimension,
|
|
9647
|
+
ci as Direction,
|
|
9648
|
+
Ut as Disposable,
|
|
9601
9649
|
tr as DisposableCollection,
|
|
9602
|
-
|
|
9650
|
+
Di as DocStyleType,
|
|
9603
9651
|
Pe as DocumentDataModel,
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9652
|
+
Hi as DocumentFlavor,
|
|
9653
|
+
lo as DrawingTypeEnum,
|
|
9654
|
+
ta as EDITOR_ACTIVATED,
|
|
9655
|
+
Wo as EXTENSION_NAMES,
|
|
9608
9656
|
As as Entry,
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9657
|
+
xo as EntryIterator,
|
|
9658
|
+
yl as ErrorService,
|
|
9659
|
+
$a as EventState,
|
|
9660
|
+
Dc as EventSubject,
|
|
9661
|
+
Ec as FOCUSING_COMMON_DRAWINGS,
|
|
9614
9662
|
xn as FOCUSING_DOC,
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9663
|
+
fc as FOCUSING_EDITOR_BUT_HIDDEN,
|
|
9664
|
+
gc as FOCUSING_EDITOR_INPUT_FORMULA,
|
|
9665
|
+
mc as FOCUSING_EDITOR_STANDALONE,
|
|
9666
|
+
ea as FOCUSING_FORMULA_EDITOR,
|
|
9619
9667
|
an as FOCUSING_SHEET,
|
|
9620
9668
|
Pn as FOCUSING_SLIDE,
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9669
|
+
_c as FOCUSING_UNIVER_EDITOR,
|
|
9670
|
+
pc as FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE,
|
|
9671
|
+
xi as FollowNumberWithType,
|
|
9624
9672
|
$n as FontItalic,
|
|
9625
|
-
|
|
9673
|
+
Ji as FontStyleType,
|
|
9626
9674
|
Wn as FontWeight,
|
|
9627
|
-
|
|
9675
|
+
hi as FormatType,
|
|
9628
9676
|
on as GlyphType,
|
|
9629
|
-
|
|
9630
|
-
|
|
9677
|
+
Fi as GridType,
|
|
9678
|
+
Ii as HLSColor,
|
|
9631
9679
|
Me as HorizontalAlign,
|
|
9632
|
-
|
|
9680
|
+
ya as IAuthzIoService,
|
|
9633
9681
|
In as ICommandService,
|
|
9634
|
-
|
|
9682
|
+
xl as IConfigService,
|
|
9635
9683
|
Rn as IContextService,
|
|
9636
|
-
|
|
9684
|
+
xc as ILocalStorageService,
|
|
9637
9685
|
be as ILogService,
|
|
9638
|
-
|
|
9639
|
-
|
|
9686
|
+
Tr as IPermissionService,
|
|
9687
|
+
Mr as IResourceLoaderService,
|
|
9640
9688
|
_s as IResourceManagerService,
|
|
9641
|
-
|
|
9689
|
+
kc as ISnapshotServerService,
|
|
9642
9690
|
ms as IUndoRedoService,
|
|
9643
9691
|
Xe as IUniverInstanceService,
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9692
|
+
yc as InterceptorManager,
|
|
9693
|
+
di as InterpolationPointType,
|
|
9694
|
+
rc as JSON1,
|
|
9647
9695
|
xe as JSONX,
|
|
9648
|
-
|
|
9696
|
+
Lo as KeyIterator,
|
|
9649
9697
|
nn as LRUHelper,
|
|
9650
|
-
|
|
9698
|
+
Po as LRUMap,
|
|
9651
9699
|
mn as LifecycleInitializerService,
|
|
9652
9700
|
ye as LifecycleService,
|
|
9653
9701
|
ft as LifecycleStages,
|
|
9654
9702
|
qn as LocalUndoRedoService,
|
|
9655
9703
|
cn as LocaleService,
|
|
9656
9704
|
ke as LocaleType,
|
|
9657
|
-
|
|
9705
|
+
zo as LogLevel,
|
|
9658
9706
|
Qe as MOVE_BUFFER_VALUE,
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9707
|
+
bl as MemoryCursor,
|
|
9708
|
+
Ki as NamedStyleType,
|
|
9709
|
+
tl as NilCommand,
|
|
9710
|
+
eo as NumberUnitType,
|
|
9663
9711
|
re as ObjectMatrix,
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9712
|
+
Qi as ObjectRelativeFromH,
|
|
9713
|
+
to as ObjectRelativeFromV,
|
|
9714
|
+
oa as OnLifecycle,
|
|
9715
|
+
Ei as OtherShapes,
|
|
9716
|
+
nc as PRESET_LIST_TYPE,
|
|
9717
|
+
ao as PageElementType,
|
|
9718
|
+
io as PageOrientType,
|
|
9671
9719
|
Zs as PageType,
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9720
|
+
Gi as ParagraphElementType,
|
|
9721
|
+
ua as PermissionService,
|
|
9722
|
+
vr as PermissionStatus,
|
|
9675
9723
|
Gs as Plugin,
|
|
9676
9724
|
pn as PluginService,
|
|
9677
|
-
|
|
9725
|
+
Vi as PositionedObjectLayoutType,
|
|
9678
9726
|
Vn as PresetListType,
|
|
9679
|
-
|
|
9727
|
+
fi as ProtectionType,
|
|
9680
9728
|
it as RANGE_TYPE,
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9729
|
+
Du as RCDisposable,
|
|
9730
|
+
lu as RGBA_PAREN,
|
|
9731
|
+
ou as RGB_PAREN,
|
|
9732
|
+
ei as ROTATE_BUFFER_VALUE,
|
|
9684
9733
|
ze as Range,
|
|
9685
9734
|
Ne as Rectangle,
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9735
|
+
Na as RedoCommand,
|
|
9736
|
+
Ca as RedoCommandId,
|
|
9737
|
+
$u as RefAlias,
|
|
9689
9738
|
ir as Registry,
|
|
9690
9739
|
or as RegistryAsMap,
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9740
|
+
gi as RelativeDate,
|
|
9741
|
+
uo as RelativeSlideLink,
|
|
9742
|
+
ca as ResourceManagerService,
|
|
9694
9743
|
Bn as RgbColor,
|
|
9695
|
-
|
|
9696
|
-
|
|
9744
|
+
Lu as RxDisposable,
|
|
9745
|
+
$i as SectionType,
|
|
9697
9746
|
es as SheetTypes,
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9747
|
+
Yl as SheetViewModel,
|
|
9748
|
+
Ir as SliceBodyType,
|
|
9749
|
+
Sr as SlideDataModel,
|
|
9750
|
+
Yi as SpacingRule,
|
|
9751
|
+
Ri as SpecialShapes,
|
|
9752
|
+
kl as Styles,
|
|
9753
|
+
Ci as THEME_COLORS,
|
|
9754
|
+
Xi as TabStopAlignment,
|
|
9755
|
+
_i as TextDecoration,
|
|
9706
9756
|
hn as TextDirection,
|
|
9707
|
-
|
|
9757
|
+
Bi as TextDirectionType,
|
|
9708
9758
|
Se as TextX,
|
|
9709
9759
|
Q as TextXActionType,
|
|
9710
9760
|
Gn as ThemeColor,
|
|
9711
9761
|
kt as ThemeColorType,
|
|
9712
9762
|
ns as ThemeColors,
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9763
|
+
Ur as ThemeService,
|
|
9764
|
+
P as Tools,
|
|
9765
|
+
Oa as UndoCommand,
|
|
9766
|
+
Ia as UndoCommandId,
|
|
9717
9767
|
os as UnitModel,
|
|
9718
|
-
|
|
9768
|
+
Nc as Univer,
|
|
9719
9769
|
zn as UniverInstanceService,
|
|
9720
9770
|
tt as UniverInstanceType,
|
|
9721
9771
|
Pt as UpdateDocsAttributeType,
|
|
9722
9772
|
Ge as UserManagerService,
|
|
9723
|
-
|
|
9773
|
+
Do as ValueIterator,
|
|
9724
9774
|
We as VerticalAlign,
|
|
9725
|
-
|
|
9775
|
+
qi as WidthType,
|
|
9726
9776
|
_n as Workbook,
|
|
9727
9777
|
gn as Worksheet,
|
|
9728
9778
|
Ke as WrapStrategy,
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9779
|
+
ji as WrapTextType,
|
|
9780
|
+
ec as afterInitApply,
|
|
9781
|
+
Pr as b64DecodeUnicode,
|
|
9782
|
+
Fc as b64EncodeUnicode,
|
|
9783
|
+
ni as binarySearchArray,
|
|
9784
|
+
wu as cellToRange,
|
|
9785
|
+
ro as characterSpacingControlType,
|
|
9786
|
+
bu as checkForSubstrings,
|
|
9787
|
+
nu as checkIfMove,
|
|
9788
|
+
Au as checkParagraphHasBullet,
|
|
9789
|
+
vu as checkParagraphHasIndent,
|
|
9790
|
+
bo as checkParagraphHasIndentByStyle,
|
|
9791
|
+
ru as codeToBlob,
|
|
9742
9792
|
xs as composeBody,
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9793
|
+
Wa as composeInterceptors,
|
|
9794
|
+
Hu as concatMatrixArray,
|
|
9795
|
+
Yu as convertBodyToHtml,
|
|
9746
9796
|
Ls as covertTextRunToHtml,
|
|
9747
9797
|
Jn as createDefaultUser,
|
|
9748
|
-
|
|
9749
|
-
|
|
9798
|
+
Pc as createInterceptorKey,
|
|
9799
|
+
Cc as createInternalEditorID,
|
|
9750
9800
|
Us as createRowColIter,
|
|
9751
|
-
|
|
9752
|
-
|
|
9801
|
+
Ku as debounce,
|
|
9802
|
+
xu as dedupe,
|
|
9753
9803
|
Js as deepCompare,
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9804
|
+
vo as deleteContent,
|
|
9805
|
+
hc as extractPureTextFromCell,
|
|
9806
|
+
nl as fromCallback,
|
|
9807
|
+
Uu as fromObservable,
|
|
9808
|
+
No as generateRandomId,
|
|
9809
|
+
$c as generateTemporarySnap,
|
|
9759
9810
|
Oe as getArrayLength,
|
|
9760
9811
|
fn as getBodySlice,
|
|
9761
9812
|
Mn as getBodySliceHtml,
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9813
|
+
Ou as getBorderStyleType,
|
|
9814
|
+
_u as getCellInfoInMergeData,
|
|
9815
|
+
hu as getCellValueType,
|
|
9765
9816
|
ce as getColorStyle,
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9817
|
+
pl as getCustomDecorationSlice,
|
|
9818
|
+
ml as getCustomRangeSlice,
|
|
9819
|
+
Nu as getDocsUpdateBody,
|
|
9820
|
+
iu as getReverseDirection,
|
|
9821
|
+
Vc as getSheetBlocksFromSnapshot,
|
|
9822
|
+
dc as getWorksheetUID,
|
|
9823
|
+
yu as groupBy,
|
|
9824
|
+
Iu as handleStyleToString,
|
|
9825
|
+
Mu as hashAlgorithm,
|
|
9775
9826
|
rs as horizontalLineSegmentsSubtraction,
|
|
9776
9827
|
vs as insertMatrixArray,
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9828
|
+
Ao as insertTextToContent,
|
|
9829
|
+
au as isBlackColor,
|
|
9830
|
+
vc as isBooleanString,
|
|
9831
|
+
Eu as isCellCoverable,
|
|
9832
|
+
fu as isCellV,
|
|
9833
|
+
So as isEmptyCell,
|
|
9834
|
+
Cu as isFormulaId,
|
|
9835
|
+
Ru as isFormulaString,
|
|
9836
|
+
cu as isICellData,
|
|
9837
|
+
Ic as isInternalEditorID,
|
|
9838
|
+
du as isNullCell,
|
|
9839
|
+
Ha as isNumeric,
|
|
9840
|
+
Sc as isRangesEqual,
|
|
9841
|
+
Tu as isRealNum,
|
|
9842
|
+
Ac as isSafeNumeric,
|
|
9843
|
+
wo as isSameStyleTextRun,
|
|
9844
|
+
wc as isUnitRangesEqual,
|
|
9845
|
+
Su as isValidRange,
|
|
9846
|
+
uu as isWhiteColor,
|
|
9847
|
+
ku as makeArray,
|
|
9848
|
+
pu as makeCellRangeToRangeData,
|
|
9849
|
+
mu as makeCellToSelection,
|
|
9850
|
+
Ta as mergeOverrideWithDependencies,
|
|
9851
|
+
Tc as mergeSets,
|
|
9852
|
+
Kl as mergeWorksheetSnapshotWithDefault,
|
|
9802
9853
|
Ms as moveMatrixArray,
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9854
|
+
Qu as moveRangeByOffset,
|
|
9855
|
+
Yc as nameCharacterCheck,
|
|
9856
|
+
sc as normalizeBody,
|
|
9806
9857
|
lr as normalizeTextRuns,
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9858
|
+
Bu as numberToABC,
|
|
9859
|
+
Gu as numberToListABC,
|
|
9860
|
+
si as orderSearchArray,
|
|
9861
|
+
Ju as queryObjectMatrix,
|
|
9811
9862
|
is as remove,
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9863
|
+
Fo as repeatStringNumTimes,
|
|
9864
|
+
Lc as replaceInDocumentBody,
|
|
9865
|
+
Uc as requestImmediateMacroTask,
|
|
9866
|
+
Pu as rotate,
|
|
9816
9867
|
gs as runOnLifecycle,
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9868
|
+
su as searchArray,
|
|
9869
|
+
gu as selectionToArray,
|
|
9870
|
+
Ko as sequence,
|
|
9871
|
+
Vo as sequenceAsync,
|
|
9821
9872
|
nr as sequenceExecute,
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9873
|
+
tc as sequenceExecuteAsync,
|
|
9874
|
+
bc as shallowEqual,
|
|
9875
|
+
Kc as skipParseTagNames,
|
|
9876
|
+
Fu as sliceMatrixArray,
|
|
9877
|
+
ju as sortRules,
|
|
9878
|
+
Vu as sortRulesByDesc,
|
|
9828
9879
|
He as sortRulesFactory,
|
|
9829
9880
|
Ts as spliceArray,
|
|
9830
|
-
|
|
9881
|
+
sl as takeAfter,
|
|
9831
9882
|
ps as textDecoder,
|
|
9832
9883
|
Nn as textEncoder,
|
|
9833
|
-
|
|
9884
|
+
Mc as throttle,
|
|
9834
9885
|
bt as toDisposable,
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9886
|
+
jc as transformDocumentDataToSnapshot,
|
|
9887
|
+
Gc as transformSnapshotToDocumentData,
|
|
9888
|
+
Bc as transformSnapshotToWorkbookData,
|
|
9889
|
+
Wc as transformWorkbookDataToSnapshot,
|
|
9890
|
+
Al as updateAttributeByDelete,
|
|
9891
|
+
vl as updateAttributeByInsert
|
|
9841
9892
|
};
|