superrfjs
Version:
12 lines • 260 kB
JavaScript
/*!
*
* SpreadJS Library 17.0.7
*
* Copyright(c) MESCIUS inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* us.sales@mescius.com
* https://developer.mescius.com/spreadjs
*
*/
!function (i) { "object" == typeof module && "object" == typeof module.exports ? module.exports = i(require("@mescius/spread-sheets")) : "function" == typeof define && define.amd ? define(["@mescius/spread-sheets"], i) : "object" == typeof exports ? exports.Spread = i(require("@mescius/spread-sheets")) : i(GC) }(function (t) { !function () { "use strict"; var n, e, i; function o(i) { var t, t, t = e[i]; return void 0 !== t || (t = e[i] = { exports: {} }, n[i].call(t.exports, t, t.exports, o)), t.exports } n = { "./dist/plugins/tableSheet/actionColumn.js": function (i, t, n) { var e, o; function u(i) { this.LEt = { visible: !1, title: "Actions", width: 210, actionButtons: { remove: { visible: !0, title: "Remove", icon: e.ButtonImageType.minus }, save: { visible: !0, title: "Save", icon: e.ButtonImageType.ok }, reset: { visible: !0, title: "Reset", icon: e.ButtonImageType.clear } }, headerStyle: null }, this.hce = i } Object.defineProperty(t, "__esModule", { value: !0 }), t.ActionColumn = void 0, e = n("Core"), u.prototype.options = function (i) { var t; if (!i) return this.LEt; t = this.LEt, this.LEt = i, this.hce(t, i) }, u.prototype.toJSON = function () { return this.LEt }, u.prototype.fromJSON = function (i) { this.LEt = i }, t.ActionColumn = u }, "./dist/plugins/tableSheet/arrayFunction.js": function (i, t, n) { var e, t, n; Object.defineProperty(t, "__esModule", { value: !0 }), (e = n("CalcEngine")).Functions.findGlobalFunction(t = "CONVERTARRAY") || ((n = new e.Functions.Function(t, 1, 255)).evaluate = function () { var i = [].slice.apply(arguments); return new e.CalcArray([i]) }, e.Functions.defineGlobalCustomFunction(t, n)) }, "./dist/plugins/tableSheet/data.dataManager.js": function (i, t, n) { var t, e, o, a, s, u, r; function M(i) { return i instanceof Function } function c() { } Object.defineProperty(t, "__esModule", { value: !0 }), t = n("Bindings"), e = n("Common"), o = n("DataManager"), a = e.Common.lt.ht, s = null, u = void 0, c.prototype.isDataSource = function (i) { return o && o.isView && o.isView(i) }, c.prototype.getDataLength = function (i) { return i.visibleLength() }, c.prototype.getDataItem = function (i, t, n) { var e; return t < 0 ? s : (e = u, n && ((e = {})[n] = 1), i.getRowData(t, u, e)) }, c.prototype.addItems = function (i, t, n, e, o) { }, c.prototype.removeItems = function (i, t, n, e) { var o = this.getDataLength(i); e() }, c.prototype.undoRemoveItems = function (i, t, n) { }, c.prototype.getProperties = function (i) { var i = this.getDataItem(i, 0); return i ? Object.keys(i) : [] }, c.prototype.getValue = function (i, t, n, e, o, u) { var t, o, r, i, c, o = i.getColumn(o); return o ? (r = s, i = i._ve(e, o), c = !1, a(i) || (c = !0, t && M(t) && (i = t(((t = {})[n] = i, t))), r = u ? u(o, e, i) : i), { value: r, hasBinding: c }) : { value: s, hasBinding: !0 } }, c.prototype.setValue = function (i, t, n, e, o, u, r) { }, c.prototype.allowSetCount = function () { return !0 }, c.prototype.canAdd = function () { return !0 }, c.prototype.canInsert = function () { return !1 }, c.prototype.fromJSON = function (i) { return i }, c.prototype.toJSON = function (i) { return i }, t.X$.dataManagerBindingSource = new c }, "./dist/plugins/tableSheet/tableSheet-action.js": function (i, t, n) { var M, e, t, o, u, r, n, t, c, a; function I(i) { return "string" == typeof i } function s(i) { return "ROWACTION_".concat(i) } function g(o) { var i = s(o); return M.Commands[i] = { canUndo: !1, execute: function (i, t) { var n = i.commandManager(), i = i.Ofe(t.sheetName), t = i.Mf, e = t.getActiveRowIndex(), t = t.getDataItem(e); return n.execute({ cmd: o, index: e, item: t, tableSheet: i }), !0 } }, i } function N(i) { return i.reduce(function (i, t) { return i.push(t), o(t.subActionOptions) ? i.concat(t.subActionOptions) : i }, []) } function l(i) { return I(i) ? i.toUpperCase().charCodeAt(0) : i } Object.defineProperty(t, "__esModule", { value: !0 }), M = n("Core"), t = (e = n("Common")).Common.lt, o = t.Nh, r = "StartEdit", n = "PinRow", t = "RemoveRow", c = "SaveRow", M.Commands[u = "SaveAll"] = { canUndo: !(a = "ResetRow"), execute: function (i, t, n) { var e, i, o, u, r, e = i.Ofe(t.sheetName), i = e.id(); for (e.suspendPaint(), o = 0, u = i; o < u.length; o++)r = u[o], e.saveRow(r); return e.resumePaint(), !0 } }, M.Commands[r] = { canUndo: !1, execute: function (i, t) { var i = i.Ofe(t.sheetName); return !i.isEditing() && (i.Mf.startEdit(), !0) } }, M.Commands[n] = { canUndo: !1, execute: function (i, t) { var n = t.tableSheet, t = t.index; return n.togglePinnedRows([t]), !0 } }, M.Commands[t] = { canUndo: !1, execute: function (i, t) { var n = t.tableSheet, t = t.index; return n.Mf.ki(M.Events.RowOperation, { sheet: n, sheetName: n.name(), actionType: 0, row: t }), n.removeRow(t), !0 } }, M.Commands[c] = { canUndo: !1, execute: function (i, t) { var n = t.tableSheet, t = t.index; return n.Mf.ki(M.Events.RowOperation, { sheet: n, sheetName: n.name(), actionType: 1, row: t }), n.saveRow(t), !0 } }, M.Commands[a] = { canUndo: !1, execute: function (i, t) { var n = t.tableSheet, t = t.index; return n.Mf.ki(M.Events.RowOperation, { sheet: n, sheetName: n.name(), actionType: 2, row: t }), n.resetRow(t), !0 } }, M.Commands.uri = function (i) { var t = M.mt.Qf(), n = !t, t = t; i.register(u, M.Commands[u], "S".charCodeAt(0), n, !0, !1, t), i.register(r, M.Commands[r], 113, !1, !1, !1, !1) }, M.Commands.iMi = function (i, t) { var s = i; N(t).forEach(function (i) { var t, i, i, n, e, o, u, i, r, c, a, n, t = i.command, i = i.shortcutKey, i = void 0 === i ? {} : i, n = i.key, e = i.ctrl, o = i.shift, u = i.alt, i = i.meta; I(t) && (r = g(t), c = s.getCommand(r), a = s.getCommand(t), n = l(n), a ? I(a.shortcutKey) && s.setShortcutKey(t, null, !1, !1, !1, !1) : s.register(t, M.Commands[t]), c ? c.shortcutKey !== s.getShortcutKey(n, e, o, u, i) && s.setShortcutKey(r, n, e, o, u, i) : s.register(r, M.Commands[r], n, e, o, u, i)) }) } }, "./dist/plugins/tableSheet/tableSheet-grouping.js": function (i, t, n) { var e, a, l, n, o, w, s, u, r, c, M, y, I, N, g, D, f, d, h, b, A, T, j, v; function z() { } function C() { return null !== T && T.apply(this, arguments) || this } function m(i, t, n) { for (var e, o, u, r, c, e, r = i.getRowCount(a.SheetArea.colHeader) - 1; 0 <= r; r--) { if (c = i.getValue(r, n, a.SheetArea.colHeader), s(o)) o = c; else if (o !== c) break; u = r } return t === u } function L() { var i = j.call(this) || this; return i.typeName = "98", i } function x() { var i = v.call(this) || this; return i.typeName = "99", i } function S() { this.tMi = l.GroupOutlinePosition.groupCell } function Z() { this._data = new u, this._ui = new h } e = this && this.__extends || (A = function (i, t) { return (A = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? function (i, t) { i.__proto__ = t } : function (i, t) { for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]) }))(i, t) }, function (i, t) { if ("function" != typeof t && null !== t) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null"); function n() { this.constructor = i } A(i, t), i.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, new n) }), Object.defineProperty(t, "__esModule", { value: !0 }), t.Grouping = t.nMi = void 0, a = n("Core"), l = n("./dist/plugins/tableSheet/tableSheet.interface.js"), n = n("Common"), o = void 0, w = Math.round, s = n.Common.lt.ht, z.prototype.Hc = function (i, t) { var t, n, e, t = { level: -1, collapsed: !1, children: [], start: 0, end: t }, n = 0, e = 0; this.eMi(i, 0, 0, t), this.oMi = t }, z.prototype.eMi = function (i, t, n, e) { for (var o, u, r, c, a, s, M, s, I, o = e.children, u, r = 0, c = 0, a = i.childrenArray && i.childrenArray[0] || []; c < a.length; c++)M = (s = a[c]).recordRowNumbers, s.childrenArray && s.childrenArray[0] && 0 !== s.childrenArray[0].length ? s.childrenArray && s.childrenArray[0] && s.childrenArray[0].length && (I = this.eMi(s, t, n + 1, s = { level: n, collapsed: !1, children: [], start: t, end: 0 }), s.end = t + I - 1, o.push(s), t += I, r += I) : (o.push({ start: t, end: t + M.length - 1, level: n, collapsed: !1, children: [] }), t += M.length, r += M.length); return r }, z.prototype.uMi = function (i, t, n) { for (var e = 0; e < i.length; e++)if (i[e].field === t) { this.cMi(this.oMi, e, n); break } }, z.prototype.cMi = function (i, t, n) { for (var e, o, u, r, e, o = 0, u = i.children; o < u.length; o++)r = u[o], this.rMi(r, t, n) }, z.prototype.rMi = function (i, t, n) { var e, o, u, r; if (i.level === t) i.collapsed = !n; else for (o = 0, u = e = i.children; o < u.length; o++)r = u[o], this.rMi(r, t, n) }, z.prototype.aMi = function (i, t, n) { var e, o, u, r, c, a, e = this.oMi; if (e && e.start <= t && t <= e.end) for (o = e.children; 0 < o.length;) { for (u = !0, r = 0, c = o; r < c.length; r++)if ((a = c[r]).start <= t && t <= a.end) { if (a.level === i) return void (a.collapsed = !n); o = a.children, u = !1; break } if (u) break } }, z.prototype.sMi = function (i, t, n) { var e, o, u, r, c, a, s, e = -1, o = this.oMi; if (o && o.start + n <= i && i <= o.end) { if (e < t && o.collapsed) return !1; for (u = o.children, e++; 0 < u.length;) { for (r = !0, c = 0, a = u; c < a.length; c++)if ((s = a[c]).start + n <= i && i <= s.end) { if (e < t && s.collapsed) return !1; u = s.children, e++, r = !1; break } if (r) break } } return !0 }, z.prototype.MMi = function (i) { var t, n, e, o, u, r, c, t = [], n = this.oMi; if (n && n.start <= i && i <= n.end) for (e = n.children; 0 < e.length;) { for (o = !0, u = 0, r = e; u < r.length; u++)if ((c = r[u]).start <= i && i <= c.end) { t.push(c), e = c.children, o = !1; break } if (o) break } return t }, z.prototype.IMi = function (i, t) { var n, e, o, u, r, c, n = this.oMi; if (n && n.start <= i && i <= n.end) for (e = n.children; 0 < e.length;) { for (o = !0, u = 0, r = e; u < r.length; u++)if ((c = r[u]).start <= i && i <= c.end) { if (c.level === t) return c; e = c.children, o = !1; break } if (o) break } }, z.prototype.gMi = function (i) { var t, n, e, o, u, r, c, a, s, M, I, g, t = this.oMi; if (!t) return !1; for (n = t.children.slice(0), e = 0; e < i;) { for (o = [], u = 0, r = n; u < r.length; u++)for (a = 0, s = (c = r[u]).children; a < s.length; a++)M = s[a], o.push(M); n = o, e++ } for (I = 0, g = n; I < g.length; I++)if (!(c = g[I]).collapsed) return !1; return !0 }, z.prototype.L0 = function () { this.oMi = o }, z.prototype.toJSON = function () { return this.oMi }, z.prototype.fromJSON = function (i) { var t = this.oMi; t && i && i.start === t.start && i.end === t.end && (this.oMi = i) }, u = z, r = 40, c = 16, M = 4, y = 2.5, T = a.CellTypes.RowHeader, e(C, T), C.prototype.paint = function (i, t, n, e, o, u, r, c) { var a, s, c, M, I, g, N, l, D, f, d, h, b, A, T, j, v, b, z, C, a = c.sheet, s = c.row, c = a.zoom(), M = 16 * c, I = 4 * c, g = y * c, N = a.NMi; if (N) for (f = (40 * (D = (l = N.MMi(s)).length) - 16 * D) / (D + 1) * c, d = 0; d < D; d++)h = l[d], (d !== N.lMi.length - 1 || N.detailColumnsVisible()) && N.DMi(d, s) && (i.save(), i.beginPath(), i.strokeStyle = "#999999", i.lineWidth = 1, A = (b = n + f) + M / 2, T = e + u, j = e + u / 2, h.start === s ? (v = w(b) - .5, b = w(b + M) - .5, z = w(j - M / 2) - .5, C = w(j - M / 2 + M) - .5, i.moveTo(v, z), i.lineTo(b, z), i.lineTo(b, C), i.lineTo(v, C), i.lineTo(v, z), i.moveTo(w(A - I) - .5, w(j) - .5), i.lineTo(w(A + I) - .5, w(j) - .5), h.collapsed ? (i.moveTo(w(A) - .5, w(j - I) - .5), i.lineTo(w(A) - .5, w(j + I) - .5)) : (i.moveTo(w(A) - .5, w(j + M / 2) - .5), i.lineTo(w(A) - .5, w(T) - .5))) : h.start < s && s < h.end ? (i.moveTo(w(A) - .5, w(e) - .5), i.lineTo(w(A) - .5, w(T) - .5)) : h.end === s && (i.moveTo(w(A) - .5, w(e) - .5), i.lineTo(w(A) - .5, w(T - g) - .5), i.lineTo(w(A + I) - .5, w(T - g) - .5)), i.stroke(), i.restore(), n += f + M) }, C.prototype.fMi = function (i, t, n, e, o) { var u, r, c, a, s, M, I, g, N, l, D, f, l, d, D, u = i.x, r = e.zoom(), c = 16 * r, a = e.NMi; if (a) for (I = (40 * (M = (s = a.MMi(o)).length) - 16 * M) / (M + 1) * r, g = 0; g < M; g++)if (N = s[g], (g !== a.lMi.length - 1 || a.detailColumnsVisible()) && a.DMi(g, o)) { if (l = u + I, D = i.y + i.height / 2, N.start === o && (f = w(l) - .5, l = w(l + c) - .5, d = w(D - c / 2) - .5, D = w(D - c / 2 + c) - .5, f <= t) && t <= l && d <= n && n <= D) return { level: g, index: o, collapsed: N.collapsed }; u += I + c } }, C.prototype.getHitInfo = function (i, t, n, e, o) { var u, r; if (o && 2 === (u = o.sheetArea) && (r = this.fMi(e, i, t, o.sheet, o.row))) return { x: i, y: t, row: o.row, col: o.col, cellRect: e, sheetArea: 2, isReservedLocation: !0, sheet: o.sheet, level: r.level, index: r.index, collapsed: r.collapsed } }, C.prototype.processMouseDown = function (i) { if (i) { var t = i.sheet.NMi; if (t) return t.expandGroupItem(i.level, i.index, i.collapsed), !0 } return !1 }, I = C, N = 2.5, t.nMi = m, j = a.CellTypes.ColumnHeader, e(L, j), L.prototype.dMi = function (i, t) { for (var n = 0; n < t; n++)if (i.gMi(n)) return !1; return !0 }, L.prototype.paintContent = function (i, t, n, e, o, u, r, c) { var a, s, M, t, o, M, r, a, a, I, r, c, M, a, s, n, c, e, u, a = c.sheet, s = a.zoom(), M = 21 * s; j.prototype.paintContent.call(this, i, t, n + M, e, o - M, u, r, c), t = 16 * s, o = 4 * s, M = a.NMi, r = a.getDataSource(), M && M.lMi && 0 < M.lMi.length && r && m(c.sheet, c.row, c.col) && ((a = M.groupOutlinePosition()) !== l.GroupOutlinePosition.groupCell && a !== l.GroupOutlinePosition.groupCellAll || !(I = (a = r.getColumn(c.col).OFt) === M.lMi.length - 1 && !M.detailColumnsVisible()) && this.dMi(M, a) && (r = M.gMi(a), c = N * s, i.save(), i.beginPath(), i.strokeStyle = "#999999", i.lineWidth = 1, a = (M = n + c) + t / 2, s = e + u / 2, n = w(M) - .5, c = w(M + t) - .5, e = w(s - t / 2) - .5, u = w(s - t / 2 + t) - .5, i.moveTo(n, e), i.lineTo(c, e), i.lineTo(c, u), i.lineTo(n, u), i.lineTo(n, e), i.moveTo(w(a - o) - .5, w(s) - .5), i.lineTo(w(a + o) - .5, w(s) - .5), r && (i.moveTo(w(a) - .5, w(s - o) - .5), i.lineTo(w(a) - .5, w(s + o) - .5)), i.stroke(), i.restore())) }, L.prototype.fMi = function (i, t, n, e, o, u) { var r, c, a, s, M, e, o, I, e, M, g, s, u, i, r, c, s, r = i.x, c = e.zoom(), a = 16 * c, s = e.NMi, M = e.getDataSource(); if (s && M && m(e, o, u) && ((e = s.groupOutlinePosition()) === l.GroupOutlinePosition.groupCell || e === l.GroupOutlinePosition.groupCellAll) && !(I = (o = M.getColumn(u).OFt) === s.lMi.length - 1 && !s.detailColumnsVisible()) && this.dMi(s, o) && (e = s.lMi[o].field, M = s.gMi(o), u = i.y + i.height / 2, i = w(s = r + (g = N * c)) - .5, r = w(s + a) - .5, c = w(u - a / 2) - .5, s = w(u - a / 2 + a) - .5, i <= t) && t <= r && c <= n && n <= s) return { field: e, level: o, collapsed: M } }, L.prototype.getHitInfo = function (i, t, n, e, o) { var u, n; if (o && 1 === (u = o.sheetArea) && (e = this.An(e, n, o.sheet.zoom()), n = this.fMi(e, i, t, o.sheet, o.row, o.col))) return { x: i, y: t, row: o.row, col: o.col, cellRect: e, sheetArea: 1, isReservedLocation: !0, sheet: o.sheet, field: n.field, level: n.level, collapsed: n.collapsed } }, L.prototype.processMouseDown = function (i) { if (i) { var t = i.sheet.NMi; if (t) return t.expandGroup(i.field, i.collapsed), !0 } return !1 }, g = L, a.CellTypes.ti[98] = g, D = 2.5, f = 5, v = a.CellTypes.Text, e(x, v), x.prototype.paintValue = function (i, t, n, e, o, u, r, c) { var a, s, M, t, M, r, I, a, g, g, N, a, c, s, I, g, t, o, u, n, a, e, a = c.sheet, s = a.zoom(), M = 21 * s; v.prototype.paintValue.call(this, i, t, n + M, e, o - M, u, r, c), t = c.row, M = 16 * s, r = 4 * s, I = a.NMi, a = a.getDataSource(), I && a && I.lMi && 0 < I.lMi.length && ((g = I.groupOutlinePosition()) !== l.GroupOutlinePosition.groupCell && g !== l.GroupOutlinePosition.groupCellAll || !(N = (g = a.getColumn(c.col).OFt) === I.lMi.length - 1 && !I.detailColumnsVisible()) && I.DMi(g, c.row) && (a = D * s, c = 5 * s, s = I.IMi(t, g)) && s.start === t && (i.save(), i.beginPath(), i.rect(n, e, o, u), i.clip(), i.beginPath(), i.strokeStyle = "#999999", i.lineWidth = 1, g = (I = n + a) + M / 2, o = (t = e + c) + M / 2, u = w(I) - .5, n = w(I + M) - .5, a = w(t) - .5, e = w(t + M) - .5, i.moveTo(u, a), i.lineTo(n, a), i.lineTo(n, e), i.lineTo(u, e), i.lineTo(u, a), i.moveTo(w(g - r) - .5, w(o) - .5), i.lineTo(w(g + r) - .5, w(o) - .5), s.collapsed && (i.moveTo(w(g) - .5, w(o - r) - .5), i.lineTo(w(g) - .5, w(o + r) - .5)), i.stroke(), i.restore())) }, x.prototype.fMi = function (i, t, n, e, o, u) { var r, c, a, e, s, s, M, e, u, r, a, s, e, i, u, a, r = e.zoom(), c = 16 * r, a = e.NMi, e = e.getDataSource(); if (a && e && ((s = a.groupOutlinePosition()) === l.GroupOutlinePosition.groupCell || s === l.GroupOutlinePosition.groupCellAll) && !(M = (s = e.getColumn(u).OFt) === a.lMi.length - 1 && !a.detailColumnsVisible()) && a.DMi(s, o) && (e = D * r, u = 5 * r, r = a.IMi(o, s)) && r.start === o && (a = i.x + e, s = i.y + u, e = w(a) - .5, i = w(a + c) - .5, u = w(s) - .5, a = w(s + c) - .5, e <= t) && t <= i && u <= n && n <= a) return { level: r.level, index: o, collapsed: r.collapsed } }, x.prototype.getHitInfo = function (i, t, n, e, o) { var u, u; if (o && (3 === (u = o.sheetArea) || s(u)) && (e = this.An(e, n, o.sheet.zoom()), u = this.fMi(e, i, t, o.sheet, o.row, o.col))) return { x: i, y: t, row: o.row, col: o.col, cellRect: e, sheetArea: 3, isReservedLocation: !0, sheet: o.sheet, level: u.level, index: u.index, collapsed: u.collapsed } }, x.prototype.processMouseDown = function (i) { if (i) { var t = i.sheet.NMi; if (t) return t.expandGroupItem(i.level, i.index, i.collapsed), !0 } return !1 }, x.prototype.Ln = function (i, t, n, e, o) { var u = o.sheet.NMi, r = o.col, i = v.prototype.Ln.call(this, i, t, n, e, o); return u && u.hMi(r) && (i += 21 * e), i }, d = x, a.CellTypes.ti[99] = d, S.prototype.Hc = function (i, t, n) { var e, e, o, u, r, u, c, e = new a.Style; for (e.backColor = "white", e.cellType = new I, i.setStyle(-1, 0, e, a.SheetArea.rowHeader), i.setColumnWidth(0, 40 * t, a.SheetArea.rowHeader), (e = this.tMi) !== l.GroupOutlinePosition.rowHeader && e !== l.GroupOutlinePosition.groupCellAll || i.setColumnVisible(0, !0, a.SheetArea.rowHeader), o = 0; o < n.length; o++)n[o].DFt && (u = new g, i.setCellType(-1, o, u, a.SheetArea.colHeader), (r = (r = n[o].headerStyle) || (n[o].headerStyle = {})).cellType = u, u = new d, i.setCellType(-1, o, u), (c = (c = n[o].style) || (n[o].style = {})).cellType = u) }, S.prototype.TMi = function (i, t) { var n, n; if (0 === arguments.length) return this.tMi; this.tMi = t, (n = i.NMi) && n.lMi && (n = t === l.GroupOutlinePosition.rowHeader || t === l.GroupOutlinePosition.groupCellAll, i.setColumnVisible(0, n, a.SheetArea.rowHeader)) }, S.prototype.L0 = function (i) { i.setColumnVisible(0, !1, a.SheetArea.rowHeader); for (var t = 0, n = i.getColumnCount(); t < n; t++)i.getCellType(-1, t, a.SheetArea.colHeader) instanceof g && i.setCellType(-1, t, o, a.SheetArea.colHeader), i.getCellType(-1, t) instanceof d && i.setCellType(-1, t, o) }, S.prototype.toJSON = function () { return this.tMi }, S.prototype.fromJSON = function (i, t) { this.TMi(i, t) }, h = S, Z.prototype.Hc = function (i, t, n, e) { this._data.Hc(i, t); var i = n.getDataSource(); this._ui.Hc(n, e.length, i && i.getColumnInfos()) }, Z.prototype.TMi = function (i, t) { if (0 === arguments.length) return this._ui.TMi(); this._ui.TMi(i, t) }, Z.prototype.uMi = function (i, t, n) { this._data.uMi(i, t, n) }, Z.prototype.aMi = function (i, t, n) { this._data.aMi(i, t, n) }, Z.prototype.sMi = function (i, t, n) { return this._data.sMi(i, t, n) }, Z.prototype.MMi = function (i) { return this._data.MMi(i) }, Z.prototype.IMi = function (i, t) { return this._data.IMi(i, t) }, Z.prototype.gMi = function (i) { return this._data.gMi(i) }, Z.prototype.L0 = function (i) { this._data.L0(), this._ui.L0(i) }, Z.prototype.toJSON = function () { return { outlinePosition: this._ui.toJSON(), tree: this._data.toJSON() } }, Z.prototype.fromJSON = function (i, t) { this._ui.fromJSON(i, t.outlinePosition), this._data.fromJSON(t.tree) }, t.Grouping = Z }, "./dist/plugins/tableSheet/tableSheet-panel/tableSheetPanel.js": function (e, l, i) { var S, Z, o, s, B, Q, r, n, M, O, b, R, P, Y, H, c, I, g, N, W, D, V, F, f, J, X, K, _, a, d, v, z, h, q, C, A, T, j, $, ii, w, ti, y, ni, m, L, ei, oi, ui, ri, x, E, p, u, ci, ai, i; function si(i, t) { for (var n, e, n = 0; n < i.length; n++)if (t(e = i[n])) return n; return -1 } function k(i) { return i.value || i } function G(i) { return U(i) && i.bMi } function Mi(i) { return i.yBt } function U(i) { return 1 === i.textIndent } function Ii(i) { return 2 <= i.textIndent } function gi(i) { return b(i) || "" === i } function Ni(i) { return i && i.richText && i.richText[0] && i.richText[0].text || i && i.text || i } function t(i, t, n, e) { this.AMi = !0, this.Zc = i, this.vMi = t, this.jMi = 0, this.Ti = n, this.options = Z.util.b0(ci, this.zMi.bind(this)), this.Zp(e || {}), this.CMi = [], this.wMi = -1, n && (0, Z.GC$)(n).data(r, this), this.Ti.innerHTML = this.yMi(), this.mMi = n.querySelector(".".concat(Y)), this.LMi = n.querySelector(".".concat(P)), this.xMi = n.querySelector(".".concat(I)), this.SMi = n.querySelector(".".concat(c)), this.ZMi = n.querySelector(".".concat(y)), this.OMi = this.ZMi.querySelector(".".concat(m)), this.EMi = n.querySelector(".".concat(c, ".").concat(H, ".").concat(ti)), this.GMi = n.querySelector(".".concat(a)), this.pMi = n.querySelector(".".concat(ii)), this.attach(t), this.kMi(), (this.vMi.UMi = this).AMi = !1 } function li(i) { return JSON.parse(JSON.stringify(i)) } Object.defineProperty(l, "__esModule", { value: !0 }), l.TableSheetPanel = l.ShowSourceOptions = l.ARROW_RIGHT = l.ARROW_DOWN = l.GANTT_COLUMN_VALUE = void 0, S = i("./dist/plugins/tableSheet/tableSheet.js"), Z = i("Core"), o = i("Common"), s = i("FormulaTextBox"), B = i("CalcEngine"), Q = i("CellTypes"), n = "." + (r = "table-sheet-panel"), M = null, O = void 0, b = o.Common.lt.ht, R = window, P = "gc-table-sheet-panel", Y = "gc-table-sheet-field-panel", H = "gc-table-sheet-cross-panel", c = "gc-table-sheet-group-panel", I = "gc-table-sheet-group-list", g = "gc-table-sheet-group-input", W = (N = "gc-table-sheet-group-item") + "-remove", D = "group-index", V = "group-name", F = "group-field", f = "summary-index", J = "gc-table-sheet-summary-item", X = "summary-name", K = "summary-formula", _ = N + "-label", a = "gc-table-sheet-summary-container", d = "gc-table-sheet-field-container", v = "gc-table-sheet-summary-item-label", z = "gc-table-sheet-summary-item-input-formula", h = "gc-table-sheet-summary-item-input-slice", q = "gc-table-sheet-summary-function", C = "gc-table-sheet-summary-item-input-caption", A = "gc-table-sheet-summary-list-container", T = "gc-table-sheet-group-item-reorder-top", j = "gc-table-sheet-group-item-reorder-bottom", $ = "gc-table-sheet-add-calculate-column", ii = "fake-ftb-workbook", w = "gc-table-sheet-summary-item-caption", ti = "gc-table-sheet-cross-column", y = "gc-table-sheet-cross-column-detail", ni = "gc-table-sheet-cross-column-detail-value", m = "gc-table-sheet-cross-column-attributes-list", L = "gc-table-sheet-cross-column-item", ei = "gc-table-sheet-cross-column-item-checkbox", oi = "gc-table-sheet-cross-column-item-edit", ui = "gc-table-sheet-cross-column-item-input-filter", ri = "gc-table-sheet-cross-column-item-editing", x = "gc-table-sheet-cross-detail-input", E = "gc-table-sheet-hidden", p = "attribute-index", l.GANTT_COLUMN_VALUE = "_ganttColumn", l.ARROW_DOWN = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAHJJREFUOE+10i0OwkAQBtC394ED4PE4EA0HBIeurEX2QE2TDYKwOyTTrt3Myzc/RfKVZL1dgQPmKGErwRFP3PHuIb0WTnhgwNRCohmca5Ibxl9IBKw1l4pc8fpGdgdSLaSGuMkaU4cUHeDn/58tdLE0sABwBBIR30jsewAAAABJRU5ErkJggg==", l.ARROW_RIGHT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAI1JREFUOE/t0rEJwlAQBuAv09hJagewsBQMFuIqDuEA9tpa2qbMAA7gAG4gB08IjySvSCe+9riPe/9dZearZvb7UWCB50g2O9z6tTyDE7bY4JUh0XxF00eGQgxknZB3QqL5gj3uUxN8a4GsEhITnXHAI//a1BoDWaLGEe1QLqU7CCRG7sYOrgQUD/UP8AFFTRERJMaNUQAAAABJRU5ErkJggg==", (i = u = l.ShowSourceOptions || (l.ShowSourceOptions = {}))[i.none = 0] = "none", i[i.field = 1] = "field", i[i.formula = 2] = "formula", i[i.all = 3] = "all", ci = { showSource: u.none, fieldAreaVisible: !0, crossAreaVisible: !1, groupAreaVisible: !0, showEditButton: !1, showViewName: !0 }, t.prototype.Hc = function (i, t) { var t, n, i, e, t = new Z.Workbook(t); t.xU = !0, t.suspendPaint(), t.suspendEvent(), this.fb(t), n = t.getSheet(0), this.BMi = n, this.QMi(n), this.RMi(), this.PMi(), this.YMi = this.WMi(), i = this.HMi(i.getDataView()), this.CMi = i, this.VMi(t, n.getViewportBottomRow(1) < i.length - 1), this.FMi(n, i), t.resumeEvent(), t.resumePaint(), (e = this).mMi && (e.JMi = R.setTimeout(function () { var i, t, i = (0, Z.GC$)(e.mMi), t = i.data("workbook"); t && Math.abs(i.height() - (0, Z.GC$)(t.Kg).height()) > t.Xm() && t.refresh(), e.JMi && (R.clearTimeout(e.JMi), e.JMi = 0) }, 100)) }, t.prototype.fb = function (i) { i.options.allowContextMenu = !1, i.options.allowUserZoom = !1, i.options.allowUserDragDrop = !1, i.options.allowUserDragFill = !1, i.options.showHorizontalScrollbar = !1, i.options.scrollbarMaxAlign = !0, i.options.tabStripVisible = !1, i.options.tabNavigationVisible = !1, i.options.grayAreaBackColor = "white", i.options.scrollByPixel = !0, this.XMi(i) }, t.prototype.QMi = function (i) { var t = this.options; i.selectionPolicy(Z.SelectionPolicy.single), i.selectionUnit(Z.SelectionUnit.row), i.options.showFormulas = !0, i.options.rowHeaderVisible = !1, (i.options.colHeaderVisible = !1) === t.showViewName ? i.setRowVisible(0, t.showViewName) : i.frozenRowCount(1), i.options.gridline.showHorizontalGridline = !1, i.options.gridline.showVerticalGridline = !1, i.setColumnCount(2), i.setRowCount(30), i.setColumnWidth(0, 20), i.setColumnWidth(1, "*"), i.outlineColumn.options({ columnIndex: 1, showIndicator: !0, collapseIndicator: l.ARROW_RIGHT, expandIndicator: l.ARROW_DOWN }), i.outlineColumn.refresh(), i.showRowOutline(!1), i.rowOutlines.KMi = !0, i.t4(0, 1) }, t.prototype.zMi = function (i, t, n) { var e, o, e = this; if (!e.AMi) switch (i) { case "showSource": e._Mi(); break; case "fieldAreaVisible": case "crossAreaVisible": case "groupAreaVisible": o = e.vMi, e.detach(), e.vMi = o, e.Ti.innerHTML = e.yMi(), e.mMi = e.Ti.querySelector(".".concat(Y)), e.LMi = e.Ti.querySelector(".".concat(P)), e.ZMi = e.Ti.querySelector(".".concat(y)), this.OMi = this.ZMi.querySelector(".".concat(m)), e.xMi = e.Ti.querySelector(".".concat(I)), e.SMi = e.Ti.querySelector(".".concat(c)), e.EMi = e.Ti.querySelector(".".concat(c, ".").concat(H, ".").concat(ti)), this.GMi = e.Ti.querySelector(".".concat(a)), this.pMi = e.Ti.querySelector(".".concat(ii)), e.attach(o), e.kMi(), o.UMi = e } }, t.prototype.Zp = function (i) { var n = this.options || {}; i = Z.GC$.extend(!0, {}, ci, i), Z.GC$.each(i, function (i, t) { n.hasOwnProperty(i) && (n[i] = t) }) }, t.prototype.RMi = function () { var L, I, x, o, c, u, t, r, a, s, M, L = this, I = L.Tp(), x = L.vMi, o = L.LMi.getBoundingClientRect(); I.bind(Z.Events.EditStarting + n, function (i, t) { var n, e, n = t.row, e = L.CMi; e[n] && e[n].isCalculateColumn || (t.cancel = !0) }), I.bind(Z.Events.EditStarted + n, function (i, t) { var n, e; t.row !== I.getRowCount() - 1 || I.il.text() || I.il.text("="), I.il && (I.il.qMi = !0), L.$Mi = !0 }), I.bind(Z.Events.EditEnded + n, function (i, t) { var n, e, o, u, t, r, c, a, s, c, s, a, r, o, M, n = t.row, e = n - 1, o = L.CMi, u = x.getDataView(), t = t.editingText, r = !1; if (L.$Mi = !1, c = I.getText(n, 1), a = t && t.replace(/\s/g, ""), s = c && c.replace(/\s/g, ""), !a) { if (c) return; r = !0 } if (String(s).toUpperCase() === String(a).toUpperCase() || r) { if (o[n] && o[n].isCalculateColumn) { if (s = (c = u && u.getColumnInfos()).filter(function (i) { return i.isGroup }).length, a = 0, o = c[r = e + s - (a = u.getColumn(u.getColumn().length - 1).value === l.GANTT_COLUMN_VALUE ? 1 : a)], t) { if (0 === t.indexOf("=") && t !== (o && o.value)) { try { (M = I.Lp).parse(new B.CalcSource(M), t, 0, 0) } catch (i) { return void L._Mi() } o ? (o.value === o.caption && (o.caption = t), o.value = t) : c.splice(r, 1, { value: t, caption: t, readonly: !0 }) } } else o && c.splice(r, 1); u.setColumnInfos(c), x.setDataView(u), L._Mi(), I.il && (I.il.qMi = !1) } } else L._Mi() }), I.bind(Z.Events.ValueChanged + n, function (i, t) { var n, e, o, u, r, c, a, s, M, I, g, N, o, l, D, f, d, h, b, A, T, j, v, z, C, w, y, m, n = t.newValue, e = t.row, o = t.col, u = t.sheet, r = x.getDataView(); if (0 === o && r) { if (s = r.getColumnInfos(!(a = c = void 0), !0), (M = L.CMi[t.row]) && M.isCalculateColumn) c = M.value; else if (M.bMi) { for (I = 0; I < s.length; I++)if ((g = s[I]) && g.cross && g.cross === M.bMi) { a = I; break } } else c = Ni(N = u.getValue(e, 1, Z.SheetArea.viewport, Z.ValueType.richText)); if (o = r.getColumnInfos(!0), 0 === t.row && c === r.name) { for (l = 0, D = o; l < D.length; l++)(g = D[l]).visible = n; for (f = 0, d = s; f < d.length; f++)(h = d[f]).visible = n } else if (a !== O) { for (b = 0, A = o; b < A.length; b++)(g = A[b]).isCross && g.RBt === a && (g.visible = n); s[a].visible = n } else if (1 === (T = u.getCell(e, 1).textIndent())) { for (j = 0, v = o; j < v.length; j++)if (g = v[j], ((0, S.tIi)(g.caption) === c || g.value === c) && !g.isGroup) { g.visible = n; break } } else for (C = (z = function (i) { return "string" == typeof i ? i.substring(0, i.indexOf(".")) : "" })(o[e - 1].value), w = 0, y = o; w < y.length; w++)if ("string" == typeof (m = (g = y[w]).value) && -1 !== m.indexOf(C) && -1 !== m.indexOf("." + c) && !g.isGroup) { g.visible = n; break } x.setDataView(r), L.CMi = L.HMi(r) } }), c = function (i) { var i = L.CMi[i].nIi; return !b(i) && 0 < i.indexOf(".") }, u = function (i) { var i = L.CMi[i].nIi; return !b(i) && 0 < i.indexOf(".") && L.eIi().isLookupField(i) }, t = function (i) { return !b(i) && !b(L.oIi) && 0 < i.indexOf(".") }, r = function (i) { var i = L.CMi[i].nIi; return t(i) && !L.mLt(i) }, a = function (i) { var i = L.CMi[i].nIi; return t(i) && L.mLt(i) }, s = function (i) { var i, t, n, t, i = L.CMi[i], t = i.yBt, n = i.nIi; L.uIi = n, t ? (L.oIi = n, L.cIi = [], L.rIi && -1 < L.rIi.indexOf(".") && (L.rIi = void 0, L.aIi = -1, L.wMi = -1), L.AMi = !0, L.sIi(!0), L.MIi(!1), L.IIi(), L.AMi = !1) : G(i) && (t = L.gIi(i.bMi), L.NIi = L.CMi.filter(G).indexOf(i), L.cIi = L.lIi(), L.options.groupAreaVisible ? (L.oIi = t.over, L.rIi && -1 < L.rIi.indexOf(".") && (L.rIi = void 0, L.aIi = -1, L.wMi = -1), L.AMi = !0, L.sIi(!0), L.MIi(!1), L.IIi(), L.AMi = !1) : L.options.crossAreaVisible && L.IIi()) }, M = {}, L.DIi = function (i) { var t, i, n, t, n, e; i.target === I.Dg() && (t = L.fIi(I, i)) && !L.$Mi && (M = { x: i.x, y: i.y }, i = t.row, n = t.col, !b(i)) && 0 < i && !b(n) && (u(i) ? s(i) : !r(i) && (t.cellTypeHitInfo && t.cellTypeHitInfo.outlineColumnHitInfo && (L.dIi = !0), n = void 0, "string" != typeof (t = I.getValue(i, 1)) ? n = t = I.getFormula(i, 1) : L.CMi[i].isRelationship ? (n = L.hIi(I, i) + "." + t, L.TIi = !1) : (n = Ni(e = I.getValue(i, 1, Z.SheetArea.viewport, Z.ValueType.richText)), L.TIi = !0), L.CMi[i].isRelationship || !Ii(L.CMi[i]) || L.options.crossAreaVisible) && (L.rIi = n, o = L.LMi.getBoundingClientRect(), L.aIi = i, L.wMi = i, s(i))) }, L.bIi = function (i) { var t, n, n, e, t, i, t = L.rIi, n = i.x !== M.x || i.y !== M.y; if (t && n) { if (L.AIi(i, t, o, L.LMi), (n = L.fIi(I, i)) && (e = n.row, t = n.col, !b(t)) && e && e !== L.wMi) { if (c(e)) return; I.t4(e, 1) } (i = I.Dg()) && (i.style.cursor = "move"), L.xMi && (L.xMi.style.cursor = "move"), L.dIi = !1 } }, L.vIi = function (i) { var t, n, e, n, o, u, r, n, o, i, u, t; L.rIi && ((n = L.fIi(I, i)) && !L.dIi && (e = n.row, n = n.col, o = x.jIi, u = L.aIi, b(e) || b(n) || !(e !== u && o < e && o < u || e === u) ? (I.t4(L.aIi, 0), L.zIi(i.target, L.xMi) && L.kMi(), L.CIi(i)) : (r = x.getDataView()) && !a(u) && (L.CMi[u].isRelationship && 2 === L.CMi[u].textIndent ? L.wIi(u, e) : L.yIi(u, e), o = !((n = L.CMi[e]).yBt || G(n) || c(e)), L.options.crossAreaVisible) && o && (L.rIi = void 0, L.TIi = void 0, L.aIi = -1, L.wMi = -1, L.cIi = O, L.oIi = O, L.NIi = void 0, L.mIi = void 0, L.AMi = !0, L.sIi(!1), L.MIi(!0), L.LIi(), L.xIi(), L.AMi = !1)), L.dIi = !1, L.rIi = void 0, L.TIi = void 0, L.aIi = -1, L.wMi = -1, (i = I.Dg()) && (i.style.cursor = "default"), L.xMi && (L.xMi.style.cursor = "default"), u = L.SIi) && (u.style.display = "none") }, (0, Z.GC$)(".".concat($)).bind("click", function () { var i, t, n, i = I.getRowCount(); L.$Mi || 0 === i || (t = i + 1, I.suspendPaint(), I.addRows(i, 1), L.CMi[i] = { isCalculateColumn: !0, checkStatus: !0, value: "", textIndent: 1 }, I.getCell(t, 1).locked(!1).textIndent(1), I.outlineColumn.getCollapsed(0) && I.outlineColumn.setCollapsed(0, !1), I.outlineColumn.refresh(), I.setActiveCell(t, 1), I.showCell(i, 0, Z.VerticalPosition.center, Z.HorizontalPosition.center), n = setTimeout(function () { I.startEdit(), clearTimeout(n) }, 0), I.resumePaint()) }), L.mMi && L.mMi.addEventListener("mousedown", L.DIi, !0), document.addEventListener("mousemove", L.bIi, !0), document.addEventListener("mouseup", L.vIi, !0) }, t.prototype.hIi = function (i, t) { for (; 0 <= t;) { var n; if (1 === i.getCell(t, 1).textIndent()) return i.getValue(t, 1); t-- } return "" }, t.prototype.ZIi = function (n, e) { var i, t, o, t, u, r, c, a, s, M, I, g, N, i = this, t = i.eIi(); if (i.CMi = i.HMi(t), o = t.getColumnInfos(), t = i.CMi.filter(U), r = (u = i.CMi.filter(function (i, t) { return t < n && G(i) && !i.isRelationship })).reduce(function (i, t) { return i + o.filter(function (i) { return i.RBt === t.RBt }).length - 1 }, 0), c = n < e ? e + 1 : e, s = (a = i.CMi.filter(function (i, t) { return t < c && G(i) && !i.isRelationship })).reduce(function (i, t) { return i + o.filter(function (i) { return i.RBt === t.RBt }).length - 1 }, 0), M = i.CMi.filter(function (i, t) { return t < n && Ii(i) && !i.isRelationship }).length, I = i.CMi.filter(function (i, t) { return t < e && Ii(i) && !i.isRelationship }).length, !i.CMi[n].isRelationship && i.CMi[e].isRelationship) if (M = 0, e < n) { for (g = e; 0 <= g; g--)if (!i.CMi[g].isRelationship || 2 !== i.CMi[g].textIndent) { I = e - g; break } } else { for (N = !1, g = e; g < i.CMi.length; g++)if (!i.CMi[g].isRelationship || 2 !== i.CMi[g].textIndent) { I = e - g, N = !0; break } N || (I = e - i.CMi.length) } return { columnInfos: o, columnFieldInfos: t, crossColumnCountBeforeFromRow: r, crossColumnCountBeforeToRow: s, crossRelationFieldCountBeforeFromRow: M, crossRelationFieldCountBeforeToRow: I } }, t.prototype.OIi = function (n, i) { var t, e, o, e, u, r, c, a, s, M, I, t = this, e = t.eIi(); return t.CMi = t.HMi(e), o = e.getColumnInfos(), e = t.CMi.filter(U), r = (u = t.CMi.filter(function (i, t) { return t < n && G(i) })).reduce(function (i, t) { return i + o.filter(function (i) { return i.RBt === t.RBt }).length - 1 }, 0), c = n < i ? i + 1 : i, s = (a = t.CMi.filter(function (i, t) { return t < c && G(i) })).reduce(function (i, t) { return i + o.filter(function (i) { return i.RBt === t.RBt }).length - 1 }, 0), M = 0, I = t.EIi(n, i), t.CMi[n].textIndent === t.CMi[i].textIndent && t.CMi[n].isRelationship && t.CMi[i].isRelationship && t.GIi(n, i) && (I = 0), { columnInfos: o, columnFieldInfos: e, crossColumnCountBeforeFromRow: r, crossColumnCountBeforeToRow: s, crossRelationFieldCountBeforeFromRow: 0, crossRelationFieldCountBeforeToRow: I } }, t.prototype.GIi = function (i, t) { for (var n, e, o, u, r, c, n = this, e = n.eIi(), o = n.HMi(e), u = "", r = i; 0 <= r; r--)if (!o[r].isRelationship || 2 !== o[r].textIndent) { u = o[r].value; break } for (c = "", r = t; 0 <= r; r--)if (!o[r].isRelationship || 2 !== o[r].textIndent) { c = o[r].value; break } return u === c }, t.prototype.EIi = function (i, t) { for (var n, e, o, n, u, r, n = this, e = n.eIi(), o = n.HMi(e), n = t - i, r = i; 0 <= r; r--)if (!o[r].isRelationship || 2 !== o[r].textIndent) { u = i - r - 1; break } return n + u }, t.prototype.yIi = function (i, t) { var n, e, o, u, r, c, a, s, u, M, I, g, s, c, N, l, D, f, t, n = this, e = n.vMi, o = e.getDataView(); if (!(n.CMi[i].isRelationship && 1 === n.CMi[i].textIndent && n.CMi[t].isRelationship && 2 === n.CMi[t].textIndent || (r = (u = n.ZIi(i, t)).columnInfos, c = u.crossColumnCountBeforeFromRow, a = u.crossColumnCountBeforeToRow, I = i - 1 - (s = u.crossRelationFieldCountBeforeFromRow), g = t - 1 - (u = u.crossRelationFieldCountBeforeToRow), (s = i - 1 + (M = n.pIi(o).length || 0) - s + c) === (c = t - 1 + M - u + a)))) { if (N = 1, G(n.CMi[i]) && (l = n.kIi(o, s), N = r.filter(function (i) { return i.RBt === l }).length), n.CMi[i].isRelationship) for (D = i + (N = 1); D < n.CMi.length && 2 === n.CMi[D].textIndent; D++)N++; (f = e.DPt(I, g)) ? (t = n.vMi.Mf.rowFilter(), n.vMi.suspendPaint(), n.vMi.EPt(), t.UIi(), n.BIi(), t.QIi(), n.vMi.jPt(), n.vMi.resumePaint()) : e.OPt(s, c, N) } }, t.prototype.wIi = function (i, t) { var n, e, o, u, r, c, a, s, u, M, I, g, s, c, t, N, l, M; i !== t && (o = (e = (n = this).vMi).getDataView(), r = (u = n.OIi(i, t)).columnInfos, c = u.crossColumnCountBeforeFromRow, a = u.crossColumnCountBeforeToRow, I = i - 1 - (s = u.crossRelationFieldCountBeforeFromRow), g = t - 1 - (u = u.crossRelationFieldCountBeforeToRow), (s = i - 1 + (M = n.pIi(o).length || 0) - s + c) !== (c = t - 1 + M - u + a)) && (t = 1, n.CMi[i].isRelationship && 1 === n.CMi[i].textIndent && (N = n.kIi(o, s), t = r.filter(function (i) { return i.RBt === N }).length), (l = e.DPt(I, g)) ? (M = n.vMi.Mf.rowFilter(), n.vMi.suspendPaint(), n.vMi.EPt(), M.UIi(), n.BIi(), M.QIi(), n.vMi.jPt(), n.vMi.resumePaint()) : e.OPt(s, c, t)) }, t.prototype.sIi = function (i) { var t = this, n = t.EMi; (t.options.crossAreaVisible = i) ? n.classList.remove(E) : n.classList.add(E) }, t.prototype.setGroupAreaVisible = function (i) { this.MIi(i) }, t.prototype.MIi = function (i) { var t = this, n = t.SMi, e = t.GMi; (t.options.groupAreaVisible = i) ? (n.classList.remove(E), e.classList.remove(E)) : (n.classList.add(E), e.classList.add(E)) }, t.prototype.AIi = function (i, t, n, e) { var o, u, r, c, r, o = this, u = o.SIi, r = document.documentElement, c = r && r.scrollTop || 0, r = r && r.scrollLeft || 0; u && u.parentElement && u.parentElement !== e && (u.parentElement.removeChild(u), u = this.SIi = void 0), u || ((u = o.SIi = document.createElement("span")).className = "gc-table-sheet-move-span", e.appendChild(u)), u.textContent = t, u.style.top = i.pageY + 5 - c - n.top + "px", u.style.left = i.pageX - 50 - r - n.left + "px", u.style.display = "block" }, t.prototype.fIi = function (i, t) { var n = i.uw(); return i.hitTest(t.pageX - n.left, t.pageY - n.top, !1) }, t.prototype.PMi = function () { var o, u, r, o = this, u = o.Tp(), r = o.vMi; r.bind(Z.Events.ColumnChanged + n, function (i, t) { var n, e, n, n, n, n = t.sheetArea, e = r.getDataView(); 1 !== n && 3 !== n || ("isVisible" === t.propertyName ? (n = t.sheet.getValue(0, t.col, Z.SheetArea.colHeader), 0 <= (n = o.nv(e, n)) && (u.suspendPaint(), u.suspendEvent(), u.setValue(n, 0, t.newValue), u.resumeEvent(), u.resumePaint())) : "addColumns" !== t.propertyName && "deleteColumns" !== t.propertyName || (u.suspendPaint(), u.suspendEvent(), n = o.RIi(r), o.FMi(u, n), u.resumeEvent(), u.resumePaint()), o.CMi = o.HMi(e)) }) }, t.prototype.Tp = function () { if (this.mMi) { var i = (0, Z.GC$)(this.mMi).data("workbook"); if (i) return i.getSheet(0) } return null }, t.prototype.RIi = function (i) { var t, n, e, o, u, r, c, c, t = i.getDataView(); if (t) { for (e = [(n = this.HMi(t))[0]], u = 0, r = (o = i.Mf).getColumnCount(); u < r; u++)c = o.getValue(0, u, Z.SheetArea.colHeader), 0 <= (c = this.nv(t, c)) && e.push(n[c]); return e } return [] }, t.prototype.nv = function (i, t) { var n, e; if (i) for (n = i.getColumnInfos(!0), e = 0; e < n.length; e++)if (n[e].caption === t || n[e].value === t) return e + 1; return -1 }, t.prototype.kIi = function (i, t) { var t, i, t = i.BPt(t), i = i.yLt[t]; return i && i.RBt }, t.prototype.HMi = function (i) { var t, n, e, o, u, r, c, a, s, M, a, I, t = this; if (i) { for (n = [], o = i.getColumnInfos(!(e = !1), !0), u = 0; u < o.length; u++) { if ("string" == typeof (r = o[u]).value && 0 === r.value.trim().indexOf("=")) n.push({ value: r.value, textIndent: 1, checkStatus: !1 !== r.visible, isCalculateColumn: !0 }); else if (b(r.cross)) if ("string" == typeof r.value && i.FPt(r.value) && 1 === r.value.split(".").length) if (o[u].isRelationship) { for (c = r.value, a = !this.PIi(o, c) || !1, n.push({ value: c, textIndent: 1, checkStatus: !1 !== r.visible, setCollapsed: a, isRelationship: !0 }), s = u + 1; this.YIi(o, s, c);)"string" == typeof (M = o[s].value) && n.push({ value: M.substring(M.indexOf(".") + 1), textIndent: 2, checkStatus: !1 !== o[s].visible, needCheckBox: !0, isRelationship: !0 }), s++; u = s - 1 } else n.push({ value: t.$t(r), textIndent: 1, checkStatus: !1 !== r.visible }), t.WIi(r.value, t.YMi, i).forEach(function (i) { return n.push(i) }); else { if ("string" == typeof r.value && "_ganttColumn" === r.value) continue; I = a = void 0, "string" == typeof r.value && -1 === r.value.indexOf(".") && (a = i.isLookupField(r.value), r.yBt = a, I = r.value), n.push({ value: t.$t(r), textIndent: 1, checkStatus: !1 !== r.visible, yBt: a, nIi: I }) } else n.push({ value: t.$t(r), bMi: r.cross, RBt: r.RBt, textIndent: 1, checkStatus: !1 !== r.visible }); (b(r.visible) || r.visible) && (e = !0) } return n.unshift({ value: i.name, textIndent: 0, checkStatus: e }), n } return [] }, t.prototype.PIi = function (i, t) { for (var n, e, n = 0; n < i.length; n++)if ("string" == typeof (e = i[n]).value && -1 !== e.value.indexOf(t) && !1 !== e.visible) return !0; return !1 }, t.prototype.YIi = function (i, t, n) { var i; return !(t >= i.length) && -1 !== (i = i[t]).value.indexOf(n) && -1 === i.value.indexOf("=") }, t.prototype.$t = function (i) { var t, n, i, i, e, o, t = [], n = i.value instanceof Function ? i.value.name : i.value, i = (0, S.tIi)(i.caption) || n; return t.push({ text: i }), (i = this.options.showSource) === u.field ? "=" !== n[0] && (e = n) : i === u.formula ? "=" === n[0] && (e = n) : i === u.all && (e = n), e && t.push({ style: { foreColor: "lightgrey" }, text: o = "(" + e + ")" }), { richText: t } }, t.prototype.HIi = function (i) { return "string" == typeof i.value ? i.value : i.value.richText[0].text }, t.prototype.VMi = function (i, t) { i.options.showVerticalScrollbar = t }, t.prototype.FMi = function (g, D) { var f, i, t, n, e, d, N, o, u, r, c, a, s, M, I, f = this, i = D.length, t = g.outlineColumn, n, e = this.options.showEditButton, d = this.vMi, N = d.Mf, o = {}; for (g.suspendEvent(), g.suspendPaint(), u = 0; u < g.getRowCount(); u++)t.getCollapsed(u) && (t.setCollapsed(u, !1), o[(r = g.getCell(u, 1)).value()] = r.textIndent()), D[u] && !b(D[u].setCollapsed) && D[u].setCollapsed && (r = g.getCell(u, 1)).textIndent() <= 1 && (o[r.value()] = r.textIndent()); for (t.reset(), g.setRowCount(i), g.clear(0, 0, i, 2, 3, Z.StorageType.data | Z.StorageType.style), c = 0; c < i; c++)a = D[c], r = g.getCell(c, 1).textIndent(a.textIndent), a.isCalculateColumn ? g.setFormula(c, 1, a.value) : r.value(a.value), (a.textIndent <= 1 || a.needCheckBox) && g.getCell(c, 0).value(a.checkStatus).cellType(new Q.CheckBox), s = [], Mi(a) && s.push({ useButtonStyle: !1, hoverBackColor: "white", imageType: Z.ButtonImageType.custom, imageSrc: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+bG9vayB1cCBjb2x1bW4xPC90aXRsZT4KICAgIDxnIGlkPSJsb29rLXVwLWNvbHVtbjEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxwYXRoIGQ9Ik0zLDMgTDUsMyBMNSw0IEwzLDQgTDMsMyBaIE0zLDYgTDUsNiBMNSw3IEwzLDcgTDMsNiBaIE0zLDkgTDUsOSBMNSwxMCBMMywxMCBMMyw5IFogTTMsMTIgTDUsMTIgTDUsMTMgTDMsMTMgTDMsMTIgWiBNNiwzIEwxNCwzIEwxNCw0IEw2LDQgTDYsMyBaIE02LDYgTDE0LDYgTDE0LDcgTDYsNyBMNiw2IFogTTYsOSBMMTQsOSBMMTQsMTAgTDYsMTAgTDYsOSBaIE02LDEyIEwxNCwxMiBMMTQsMTMgTDYsMTMgTDYsMTIgWiIgaWQ9IuW9oueKtue7k+WQiCIgZmlsbD0iIzY2NjY2NiI+PC9wYXRoPgogICAgPC9nPgo8L3N2Zz4=", visibility: Z.ButtonVisibility.always, i4i: !0, imageSize: { height: 20, width: 20 } }), G(a) && (s.push({ useButtonStyle: !1, hoverBackColor: "white", imageType: Z.ButtonImageType.custom, imageSrc: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMzJweCIgaGVpZ2h0PSIzMnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+Y3Jvc3MgY29sdW1uMTwvdGl0bGU+CiAgICA8ZyBpZD0iY3Jvc3MtY29sdW1uMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Iue8lue7hCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMS4wMDAwMDAsIDIuMDAwMDAwKSIgZmlsbD0iIzY2NjY2NiI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMywwIEwxMywzLjUzMSBMMTIsMi42OTcgTDEyLDEgTDksMSBMOSw1IEw4LDUgTDgsMSBMNSwxIEw1LDEwIEw0LDEwIEw0LDEgTDEsMSBMMSwxMSBMMy42OTcsMTEgTDQuNTMxLDEyIEwwLDEyIEwwLDAgTDEzLDAgWiBNMTMsOS40NjggTDEzLDEyIEwxMC40NjksMTIgTDExLjMwMywxMSBMMTIsMTEgTDEyLDEwLjMwMiBMMTMsOS40NjggWiIgaWQ9IuW9oueKtue7k+WQiCIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgIDxwb2x5Z29uIGlkPSLlvaLnirbnu5PlkIgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwLjAwMDAwMCwgOS4wMDAwMDApIHNjYWxlKC0xLCAtMSkgdHJhbnNsYXRlKC0xMC4wMDAwMDAsIC05LjAwMDAwMCkgIiBwb2ludHM9IjggMTQgNSAxMS41IDggOSA4IDExIDEyIDExIDEyIDcgMTAgNyAxMi41IDQgMTUgNyAxMyA3IDEzIDEyIDggMTIiPjwvcG9seWdvbj4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==", visibility: Z.ButtonVisibility.always, i4i: !0, imageSize: { height: 16, width: 16 } }), s.push({ imageType: Z.ButtonImageType.clear, visibility: Z.ButtonVisibility.always, i4i: !0, imageSize: { height: 18, width: 18 }, command: function (i, t, n, e) { var o, t, u, r, c, a, s, M, I, g, N, l; if (i.suspendPaint(), o = d.getDataView()) { if (t = o.uPt(D.filter(U).indexOf(D[t])), r = ((u = o.ILt.map(function (i, t) { return { index: t, option: i } })).splice(t, 1)[0] || {}).option, o.ILt = u.map(function (i) { return i.option }), c = d.Mf.rowFilter(), (a = d.TLt(o, t, t)) && (d.EPt(), c.UIi()), r && "string" == typeof r.cross) { for (s = !1, M = 0, I = o.ILt; M < I.length; M++)if ((g = I[M]) && g.cross === r.cross) { s = !0; break } !s && o.LEt.cross && delete o.LEt.cross[r.cross] } for (d.Mf.rowFilter().VIi(t), o.xLt(t), N = [], u.forEach(function (i, t) { b(i.option.cross) || N.push({ oldIndex: i.index, newIndex: t }) }), o.wLt(N), f.cIi = O, f.oIi = O, f.NIi = void 0, f.mIi = void 0, l = 0; l < D.length; l++)if (D[l] && U(D[l])) { i.t4(l, 1); break } f.AMi = !0, f.MIi(!0), f.sIi(!1), f.AMi = !1, f.BIi(), a && (c.QIi(), d.jPt()), i.resumePaint() } } })), e && s.push({ imageType: Z.ButtonImageType.custom, imageSrc: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzE5XzE1MTEpIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ0cmFuc3BhcmVudCIvPgo8cGF0aCBkPSJNMC44ODE2OCAxNkMwLjc1OTg0IDE1Ljk5OTggMC42MzkzNzcgMTUuOTc0MiAwLjUyNzk1MSAxNS45MjQ5QzAuNDE2NTI1IDE1Ljg3NTYgMC4zMTY1NzQgMTUuODAzNyAwLjIzNDQ1NCAxNS43MTM3QzAuMTUwODQ5IDE1LjYyNDUgMC4wODcwNTI3IDE1LjUxODYgMC4wNDcyNDg5IDE1LjQwMjlDMC4wMDc0NDUxNSAxNS4yODczIC0wLjAwNzQ2NzAxIDE1LjE2NDYgMC4wMDM0OTAwMiAxNS4wNDI4TDAuMjE4NjQ2IDEyLjY3NjlMMTAuMTU4IDIuNzQxMDhMMTMuMjY0MiA1Ljg0NjM2TDMuMzI3NDQgMTUuNzgxM0wwLjk2MTU5NSAxNS45OTY1QzAuOTM1MDI4IDE1Ljk5ODkgMC45MDgzNTkgMTYuMDAwMSAwLjg4MTY4IDE2VjE2Wk0xMy44ODQyIDUuMjI1NDhMMTAuNzc4OSAyLjEyMDJMMTIuNjQxNSAwLjI1NzU2MUMxMi43MjMxIDAuMTc1OTExIDEyLjgxOTkgMC4xMTExMzYgMTIuOTI2NSAwLjA2Njk0MTdDMTMuMDMzMiAwLjAyMjc0NzUgMTMuMTQ3NCAwIDEzLjI2MjggMEMxMy4zNzgyIDAgMTMuNDkyNSAwLjAyMjc0NzUgMTMuNTk5MSAwLjA2Njk0MTdDMTMuNzA1NyAwLjExMTEzNiAxMy44MDI2IDAuMTc1OTExIDEzLjg4NDIgMC4yNTc1NjFMMTUuNzQ2OCAyLjEyMDJDMTUuODI4NSAyLjIwMTc2IDE1Ljg5MzIgMi4yOTg2MiAxNS45Mzc0IDIuNDA1MjNDMTUuOTgxNiAyLjUxMTg0IDE2LjAwNDQgMi42MjYxMSAxNi4wMDQ0IDIuNzQxNTJDMTYuMDA0NCAyLjg1NjkzIDE1Ljk4MTYgMi45NzEyMSAxNS45Mzc0IDMuMDc3ODJDMTUuODkzMiAzLjE4NDQzIDE1LjgyODUgMy4yODEyOCAxNS43NDY4IDMuMzYyODRMMTMuODg1IDUuMjI0NkwxMy44ODQyIDUuMjI1NDhWNS4yMjU0OFoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xOV8xNTExIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ0cmFuc3BhcmVudCIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=", visibility: Z.ButtonVisibility.onSelected, i4i: !0, command: function (i, t, n, e) { var o, u, r, t, c, a, s, M, s, M, I, o = d.getDataView(); if (o && (u = g.getText(t, n))) for (0 !== u.indexOf("=") ? 0 <= (t = u.indexOf("(")) && (u = u.substring(0, t)) : r = !0, c = o.getColumnInfos(), a = 0; a < c.length; a++)if (s = c[a], M = r ? s.value : (0, S.tIi)(s.caption || s.value), !s.isGroup && M === u) { s = a, M = N.getSelections(), I = [(0, Z.Ec)(-1, s, -1, 1)], N.EA(M, I), N.setSelection(-1, s, -1, 1), N.showCell(N.Tb || 0, s, Z.VerticalPosition.nearest, Z.HorizontalPosition.nearest), N.jA(M); break } } }), 0 < s.length && r.cellButtons(s); for (M in g.outlineColumn.options({ columnIndex: 1, showIndicator: !0 }), g.outlineColumn.options().collapseIndicator = l.ARROW_RIGHT, g.outlineColumn.options().expandIndicator = l.ARROW_DOWN, g.outlineColumn.refre