@syncfusion/ej2-spreadsheet 25.1.42-11444 → 25.2.3
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/README.md +1 -1
- package/dist/ej2-spreadsheet.min.js +9 -0
- package/dist/ej2-spreadsheet.umd.min.js +9 -0
- package/dist/global/ej2-spreadsheet.min.js +9 -0
- package/dist/global/index.d.ts +9 -0
- package/package.json +84 -84
- package/src/workbook/base/workbook.d.ts +1 -1
- package/src/workbook/base/workbook.js +1 -1
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.scss +1 -1
- package/styles/spreadsheet/material3-dark.scss +1 -1
- package/styles/spreadsheet/material3.scss +1 -1
- package/styles/spreadsheet-ribbon/material3-dark.scss +1 -1
- package/styles/spreadsheet-ribbon/material3.scss +1 -1
|
@@ -1 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* filename: ej2-spreadsheet.min.js
|
|
3
|
+
* version : 25.2.3
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
|
+
* Use of this code is subject to the terms of our license.
|
|
6
|
+
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
|
+
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
|
+
* applicable laws.
|
|
9
|
+
*/
|
|
1
10
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionNavigations"),require("SyncfusionData"),require("SyncfusionDropdowns"),require("SyncfusionInputs"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionCharts"),require("SyncfusionGrids"),require("SyncfusionLists"),require("SyncfusionSplitbuttons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionNavigations","SyncfusionData","SyncfusionDropdowns","SyncfusionInputs","SyncfusionPopups","SyncfusionButtons","SyncfusionCharts","SyncfusionGrids","SyncfusionLists","SyncfusionSplitbuttons"],t):"object"==typeof exports?exports.SyncfusionSpreadsheet=t(require("SyncfusionBase"),require("SyncfusionNavigations"),require("SyncfusionData"),require("SyncfusionDropdowns"),require("SyncfusionInputs"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionCharts"),require("SyncfusionGrids"),require("SyncfusionLists"),require("SyncfusionSplitbuttons")):e.SyncfusionSpreadsheet=t(e.SyncfusionBase,e.SyncfusionNavigations,e.SyncfusionData,e.SyncfusionDropdowns,e.SyncfusionInputs,e.SyncfusionPopups,e.SyncfusionButtons,e.SyncfusionCharts,e.SyncfusionGrids,e.SyncfusionLists,e.SyncfusionSplitbuttons)}(this,function(e,t,n,r,i,a,o,s,l,d,c){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=48)}([function(e,t,n){"use strict";var r=n(4);n.d(t,"a",function(){return r.B}),n.d(t,"b",function(){return r.C}),n.d(t,"c",function(){return r.D}),n.d(t,"d",function(){return r.E}),n.d(t,"e",function(){return r.m}),n.d(t,"f",function(){return r.v}),n.d(t,"g",function(){return r.n}),n.d(t,"h",function(){return r.F}),n.d(t,"i",function(){return r.G}),n.d(t,"j",function(){return r.H}),n.d(t,"k",function(){return r.I}),n.d(t,"l",function(){return r.g}),n.d(t,"m",function(){return r.l}),n.d(t,"n",function(){return r.k}),n.d(t,"o",function(){return r.w}),n.d(t,"p",function(){return r.u}),n.d(t,"q",function(){return r.J}),n.d(t,"r",function(){return r.K}),n.d(t,"s",function(){return r.L}),n.d(t,"t",function(){return r.j}),n.d(t,"u",function(){return r.x}),n.d(t,"v",function(){return r.i}),n.d(t,"w",function(){return r.r}),n.d(t,"x",function(){return r.c}),n.d(t,"y",function(){return r.d}),n.d(t,"z",function(){return r.y}),n.d(t,"A",function(){return r.M}),n.d(t,"B",function(){return r.t}),n.d(t,"C",function(){return r.s}),n.d(t,"D",function(){return r.b}),n.d(t,"E",function(){return r.z}),n.d(t,"F",function(){return r.a}),n.d(t,"G",function(){return r.A}),n.d(t,"H",function(){return r.N}),n.d(t,"I",function(){return r.h}),n.d(t,"J",function(){return r.e}),n.d(t,"K",function(){return r.f}),n.d(t,"L",function(){return r.O}),n.d(t,"M",function(){return r.q}),n.d(t,"N",function(){return r.p}),n.d(t,"O",function(){return r.P}),n.d(t,"P",function(){return r.o}),n.d(t,"Q",function(){return r.Q}),n.d(t,"R",function(){return r.R}),n.d(t,"S",function(){return r.S});var i=n(2);n.d(t,"T",function(){return i.l}),n.d(t,"U",function(){return i.w}),n.d(t,"V",function(){return i._52}),n.d(t,"W",function(){return i.i}),n.d(t,"X",function(){return i.g}),n.d(t,"Y",function(){return i.a}),n.d(t,"Z",function(){return i.m}),n.d(t,"_0",function(){return i._40}),n.d(t,"_1",function(){return i._89}),n.d(t,"_2",function(){return i.V}),n.d(t,"_3",function(){return i.L}),n.d(t,"_4",function(){return i._10}),n.d(t,"_5",function(){return i._90}),n.d(t,"_6",function(){return i._61}),n.d(t,"_7",function(){return i._91}),n.d(t,"_8",function(){return i.B}),n.d(t,"_9",function(){return i._92}),n.d(t,"_10",function(){return i._93}),n.d(t,"_11",function(){return i.Y}),n.d(t,"_12",function(){return i.u}),n.d(t,"_13",function(){return i._94}),n.d(t,"_14",function(){return i._95}),n.d(t,"_15",function(){return i.q}),n.d(t,"_16",function(){return i.v}),n.d(t,"_17",function(){return i._96}),n.d(t,"_18",function(){return i._97}),n.d(t,"_19",function(){return i._98}),n.d(t,"_20",function(){return i._99}),n.d(t,"_21",function(){return i._100}),n.d(t,"_22",function(){return i._101}),n.d(t,"_23",function(){return i._102}),n.d(t,"_24",function(){return i.A}),n.d(t,"_25",function(){return i.z}),n.d(t,"_26",function(){return i.X}),n.d(t,"_27",function(){return i._103}),n.d(t,"_28",function(){return i.n}),n.d(t,"_29",function(){return i._67}),n.d(t,"_30",function(){return i.S}),n.d(t,"_31",function(){return i._84}),n.d(t,"_32",function(){return i._66}),n.d(t,"_33",function(){return i._104}),n.d(t,"_34",function(){return i._31}),n.d(t,"_35",function(){return i._105}),n.d(t,"_36",function(){return i._26}),n.d(t,"_37",function(){return i._80}),n.d(t,"_38",function(){return i._106}),n.d(t,"_39",function(){return i._107}),n.d(t,"_40",function(){return i._5}),n.d(t,"_41",function(){return i.d}),n.d(t,"_42",function(){return i._0}),n.d(t,"_43",function(){return i.G}),n.d(t,"_44",function(){return i._25}),n.d(t,"_45",function(){return i._69}),n.d(t,"_46",function(){return i.f}),n.d(t,"_47",function(){return i._108}),n.d(t,"_48",function(){return i.N}),n.d(t,"_49",function(){return i.j}),n.d(t,"_50",function(){return i.t}),n.d(t,"_51",function(){return i._6}),n.d(t,"_52",function(){return i._8}),n.d(t,"_53",function(){return i._9}),n.d(t,"_54",function(){return i._7}),n.d(t,"_55",function(){return i.Q}),n.d(t,"_56",function(){return i._64}),n.d(t,"_57",function(){return i._63}),n.d(t,"_58",function(){return i.I}),n.d(t,"_59",function(){return i._65}),n.d(t,"_60",function(){return i._54}),n.d(t,"_61",function(){return i._55}),n.d(t,"_62",function(){return i._56}),n.d(t,"_63",function(){return i._60}),n.d(t,"_64",function(){return i._109}),n.d(t,"_65",function(){return i.r}),n.d(t,"_66",function(){return i._57}),n.d(t,"_67",function(){return i._110}),n.d(t,"_68",function(){return i._111}),n.d(t,"_69",function(){return i._112}),n.d(t,"_70",function(){return i._113}),n.d(t,"_71",function(){return i._114}),n.d(t,"_72",function(){return i._115}),n.d(t,"_73",function(){return i._116}),n.d(t,"_74",function(){return i._117}),n.d(t,"_75",function(){return i._118}),n.d(t,"_76",function(){return i._119}),n.d(t,"_77",function(){return i._120}),n.d(t,"_78",function(){return i.O}),n.d(t,"_79",function(){return i._121}),n.d(t,"_80",function(){return i._122}),n.d(t,"_81",function(){return i._123}),n.d(t,"_82",function(){return i._124}),n.d(t,"_83",function(){return i._125}),n.d(t,"_84",function(){return i.c}),n.d(t,"_85",function(){return i._126}),n.d(t,"_86",function(){return i._47}),n.d(t,"_87",function(){return i._45}),n.d(t,"_88",function(){return i.J}),n.d(t,"_89",function(){return i.K}),n.d(t,"_90",function(){return i._41}),n.d(t,"_91",function(){return i._33}),n.d(t,"_92",function(){return i._34}),n.d(t,"_93",function(){return i._127}),n.d(t,"_94",function(){return i._21}),n.d(t,"_95",function(){return i._27}),n.d(t,"_96",function(){return i._128}),n.d(t,"_97",function(){return i._22}),n.d(t,"_98",function(){return i._23}),n.d(t,"_99",function(){return i._28}),n.d(t,"_100",function(){return i._129}),n.d(t,"_101",function(){return i._35}),n.d(t,"_102",function(){return i.p}),n.d(t,"_103",function(){return i._24}),n.d(t,"_104",function(){return i._130}),n.d(t,"_105",function(){return i._17}),n.d(t,"_106",function(){return i._18}),n.d(t,"_107",function(){return i._19}),n.d(t,"_108",function(){return i._32}),n.d(t,"_109",function(){return i._20}),n.d(t,"_110",function(){return i._30}),n.d(t,"_111",function(){return i.H}),n.d(t,"_112",function(){return i._131}),n.d(t,"_113",function(){return i.M}),n.d(t,"_114",function(){return i._13}),n.d(t,"_115",function(){return i._14}),n.d(t,"_116",function(){return i._15}),n.d(t,"_117",function(){return i._16}),n.d(t,"_118",function(){return i._86}),n.d(t,"_119",function(){return i._72}),n.d(t,"_120",function(){return i.b}),n.d(t,"_121",function(){return i._73}),n.d(t,"_122",function(){return i._70}),n.d(t,"_123",function(){return i._74}),n.d(t,"_124",function(){return i.T}),n.d(t,"_125",function(){return i.h}),n.d(t,"_126",function(){return i._75}),n.d(t,"_127",function(){return i._81}),n.d(t,"_128",function(){return i.e}),n.d(t,"_129",function(){return i._132}),n.d(t,"_130",function(){return i._77}),n.d(t,"_131",function(){return i._78}),n.d(t,"_132",function(){return i._133}),n.d(t,"_133",function(){return i._134}),n.d(t,"_134",function(){return i._135}),n.d(t,"_135",function(){return i._42}),n.d(t,"_136",function(){return i._36}),n.d(t,"_137",function(){return i._37}),n.d(t,"_138",function(){return i._71}),n.d(t,"_139",function(){return i.x}),n.d(t,"_140",function(){return i.U}),n.d(t,"_141",function(){return i._136}),n.d(t,"_142",function(){return i._12}),n.d(t,"_143",function(){return i._137}),n.d(t,"_144",function(){return i._1}),n.d(t,"_145",function(){return i._138}),n.d(t,"_146",function(){return i._44}),n.d(t,"_147",function(){return i._139}),n.d(t,"_148",function(){return i._58}),n.d(t,"_149",function(){return i._46}),n.d(t,"_150",function(){return i._43}),n.d(t,"_151",function(){return i.s}),n.d(t,"_152",function(){return i.y}),n.d(t,"_153",function(){return i._82}),n.d(t,"_154",function(){return i._79}),n.d(t,"_155",function(){return i._140}),n.d(t,"_156",function(){return i._11}),n.d(t,"_157",function(){return i._87}),n.d(t,"_158",function(){return i._88}),n.d(t,"_159",function(){return i._76}),n.d(t,"_160",function(){return i.k}),n.d(t,"_161",function(){return i._59}),n.d(t,"_162",function(){return i._141}),n.d(t,"_163",function(){return i._85}),n.d(t,"_164",function(){return i._142}),n.d(t,"_165",function(){return i.R}),n.d(t,"_166",function(){return i.D}),n.d(t,"_167",function(){return i._68}),n.d(t,"_168",function(){return i._39}),n.d(t,"_169",function(){return i._29}),n.d(t,"_170",function(){return i._143}),n.d(t,"_171",function(){return i._144}),n.d(t,"_172",function(){return i._50}),n.d(t,"_173",function(){return i._145}),n.d(t,"_174",function(){return i._53}),n.d(t,"_175",function(){return i.C}),n.d(t,"_176",function(){return i._51}),n.d(t,"_177",function(){return i._146}),n.d(t,"_178",function(){return i._147}),n.d(t,"_179",function(){return i._148}),n.d(t,"_180",function(){return i._49}),n.d(t,"_181",function(){return i._149}),n.d(t,"_182",function(){return i._38}),n.d(t,"_183",function(){return i.P}),n.d(t,"_184",function(){return i._62}),n.d(t,"_185",function(){return i._4}),n.d(t,"_186",function(){return i._150}),n.d(t,"_187",function(){return i._3}),n.d(t,"_188",function(){return i.W}),n.d(t,"_189",function(){return i._83}),n.d(t,"_190",function(){return i.o}),n.d(t,"_191",function(){return i._2}),n.d(t,"_192",function(){return i._48});n.d(t,"_193",function(){return i.E}),n.d(t,"_194",function(){return i.F}),n.d(t,"_195",function(){return i.Z});var a=n(19);n.d(t,"_196",function(){return a.j}),n.d(t,"_197",function(){return a.b}),n.d(t,"_198",function(){return a.a}),n.d(t,"_199",function(){return a.c}),n.d(t,"_200",function(){return a.k}),n.d(t,"_201",function(){return a.i}),n.d(t,"_202",function(){return a.h}),n.d(t,"_203",function(){return a.d}),n.d(t,"_204",function(){return a.e}),n.d(t,"_205",function(){return a.f}),n.d(t,"_206",function(){return a.g});var o=n(14);n.d(t,"_207",function(){return o.a}),n.d(t,"_208",function(){return o.b}),n.d(t,"_209",function(){return o.c}),n.d(t,"_210",function(){return o.d}),n.d(t,"_211",function(){return o.k}),n.d(t,"_212",function(){return o.e}),n.d(t,"_213",function(){return o.i}),n.d(t,"_214",function(){return o.f}),n.d(t,"_215",function(){return o.g}),n.d(t,"_216",function(){return o.j}),n.d(t,"_217",function(){return o.h})},function(e,t,n){"use strict";var r=n(74);n.d(t,"a",function(){return r.a});var i=n(7);n.d(t,"b",function(){return i.L}),n.d(t,"c",function(){return i.M}),n.d(t,"d",function(){return i.N}),n.d(t,"e",function(){return i.l}),n.d(t,"f",function(){return i.I}),n.d(t,"g",function(){return i.O}),n.d(t,"h",function(){return i.E}),n.d(t,"i",function(){return i.P}),n.d(t,"j",function(){return i.m}),n.d(t,"k",function(){return i.o}),n.d(t,"l",function(){return i.a}),n.d(t,"m",function(){return i.Q}),n.d(t,"n",function(){return i.s}),n.d(t,"o",function(){return i.q}),n.d(t,"p",function(){return i.R}),n.d(t,"q",function(){return i.S}),n.d(t,"r",function(){return i.T}),n.d(t,"s",function(){return i.U}),n.d(t,"t",function(){return i.V}),n.d(t,"u",function(){return i.W}),n.d(t,"v",function(){return i.X}),n.d(t,"w",function(){return i.Y}),n.d(t,"x",function(){return i.Z}),n.d(t,"y",function(){return i._0}),n.d(t,"z",function(){return i._1}),n.d(t,"A",function(){return i._2}),n.d(t,"B",function(){return i._3}),n.d(t,"C",function(){return i._4}),n.d(t,"D",function(){return i._5}),n.d(t,"E",function(){return i._6}),n.d(t,"F",function(){return i.K}),n.d(t,"G",function(){return i._7}),n.d(t,"H",function(){return i._8}),n.d(t,"I",function(){return i._9}),n.d(t,"J",function(){return i._10}),n.d(t,"K",function(){return i._11}),n.d(t,"L",function(){return i._12}),n.d(t,"M",function(){return i.J}),n.d(t,"N",function(){return i._13}),n.d(t,"O",function(){return i._14}),n.d(t,"P",function(){return i._15}),n.d(t,"Q",function(){return i._16}),n.d(t,"R",function(){return i._17}),n.d(t,"S",function(){return i._18}),n.d(t,"T",function(){return i._19}),n.d(t,"U",function(){return i._20}),n.d(t,"V",function(){return i._21}),n.d(t,"W",function(){return i._22}),n.d(t,"X",function(){return i._23}),n.d(t,"Y",function(){return i._24}),n.d(t,"Z",function(){return i._25}),n.d(t,"_0",function(){return i._26}),n.d(t,"_1",function(){return i._27}),n.d(t,"_2",function(){return i._28}),n.d(t,"_3",function(){return i._29}),n.d(t,"_4",function(){return i._30}),n.d(t,"_5",function(){return i.H}),n.d(t,"_6",function(){return i._31}),n.d(t,"_7",function(){return i._32}),n.d(t,"_8",function(){return i._33}),n.d(t,"_9",function(){return i._34}),n.d(t,"_10",function(){return i._35}),n.d(t,"_11",function(){return i._36}),n.d(t,"_12",function(){return i._37}),n.d(t,"_13",function(){return i._38}),n.d(t,"_14",function(){return i._39}),n.d(t,"_15",function(){return i._40}),n.d(t,"_16",function(){return i._41}),n.d(t,"_17",function(){return i._42}),n.d(t,"_18",function(){return i._43}),n.d(t,"_19",function(){return i._44}),n.d(t,"_20",function(){return i._45}),n.d(t,"_21",function(){return i._46}),n.d(t,"_22",function(){return i._47}),n.d(t,"_23",function(){return i._48}),n.d(t,"_24",function(){return i._49}),n.d(t,"_25",function(){return i._50}),n.d(t,"_26",function(){return i._51}),n.d(t,"_27",function(){return i._52}),n.d(t,"_28",function(){return i._53}),n.d(t,"_29",function(){return i._54}),n.d(t,"_30",function(){return i._55}),n.d(t,"_31",function(){return i.j}),n.d(t,"_32",function(){return i._56}),n.d(t,"_33",function(){return i._57}),n.d(t,"_34",function(){return i._58}),n.d(t,"_35",function(){return i._59}),n.d(t,"_36",function(){return i._60}),n.d(t,"_37",function(){return i._61}),n.d(t,"_38",function(){return i._62}),n.d(t,"_39",function(){return i._63}),n.d(t,"_40",function(){return i._64}),n.d(t,"_41",function(){return i._65}),n.d(t,"_42",function(){return i.u}),n.d(t,"_43",function(){return i.t}),n.d(t,"_44",function(){return i._66}),n.d(t,"_45",function(){return i.C}),n.d(t,"_46",function(){return i._67}),n.d(t,"_47",function(){return i._68}),n.d(t,"_48",function(){return i._69}),n.d(t,"_49",function(){return i._70}),n.d(t,"_50",function(){return i.p}),n.d(t,"_51",function(){return i._71}),n.d(t,"_52",function(){return i.D}),n.d(t,"_53",function(){return i._72}),n.d(t,"_54",function(){return i._73}),n.d(t,"_55",function(){return i._74}),n.d(t,"_56",function(){return i._75}),n.d(t,"_57",function(){return i._76}),n.d(t,"_58",function(){return i._77}),n.d(t,"_59",function(){return i._78}),n.d(t,"_60",function(){return i._79}),n.d(t,"_61",function(){return i._80}),n.d(t,"_62",function(){return i._81}),n.d(t,"_63",function(){return i._82}),n.d(t,"_64",function(){return i._83}),n.d(t,"_65",function(){return i._84}),n.d(t,"_66",function(){return i.n}),n.d(t,"_67",function(){return i._85}),n.d(t,"_68",function(){return i.F}),n.d(t,"_69",function(){return i.G}),n.d(t,"_70",function(){return i.c}),n.d(t,"_71",function(){return i._86}),n.d(t,"_72",function(){return i.d}),n.d(t,"_73",function(){return i.h}),n.d(t,"_74",function(){return i.i}),n.d(t,"_75",function(){return i.e}),n.d(t,"_76",function(){return i.f}),n.d(t,"_77",function(){return i.b}),n.d(t,"_78",function(){return i._87}),n.d(t,"_79",function(){return i._88}),n.d(t,"_80",function(){return i.g}),n.d(t,"_81",function(){return i._89}),n.d(t,"_82",function(){return i._90}),n.d(t,"_83",function(){return i._91}),n.d(t,"_84",function(){return i._92}),n.d(t,"_85",function(){return i._93}),n.d(t,"_86",function(){return i._94}),n.d(t,"_87",function(){return i._95}),n.d(t,"_88",function(){return i._96}),n.d(t,"_89",function(){return i._97}),n.d(t,"_90",function(){return i._98}),n.d(t,"_91",function(){return i.v}),n.d(t,"_92",function(){return i.w}),n.d(t,"_93",function(){return i.x}),n.d(t,"_94",function(){return i.z}),n.d(t,"_95",function(){return i.A}),n.d(t,"_96",function(){return i.y}),n.d(t,"_97",function(){return i._99}),n.d(t,"_98",function(){return i._100}),n.d(t,"_99",function(){return i._101}),n.d(t,"_100",function(){return i._102}),n.d(t,"_101",function(){return i._103}),n.d(t,"_102",function(){return i._104}),n.d(t,"_103",function(){return i._105}),n.d(t,"_104",function(){return i._106}),n.d(t,"_105",function(){return i._107}),n.d(t,"_106",function(){return i.B}),n.d(t,"_107",function(){return i.k}),n.d(t,"_108",function(){return i._108}),n.d(t,"_109",function(){return i._109}),n.d(t,"_110",function(){return i._110}),n.d(t,"_111",function(){return i._111}),n.d(t,"_112",function(){return i._112}),n.d(t,"_113",function(){return i.r}),n.d(t,"_114",function(){return i._113});var a=n(75);n.d(t,"_115",function(){return a.a}),n.d(t,"_116",function(){return a.b}),n.d(t,"_117",function(){return a.c}),n.d(t,"_118",function(){return a.d}),n.d(t,"_119",function(){return a.e}),n.d(t,"_120",function(){return a.f}),n.d(t,"_121",function(){return a.g}),n.d(t,"_122",function(){return a.h}),n.d(t,"_123",function(){return a.i}),n.d(t,"_124",function(){return a.j}),n.d(t,"_125",function(){return a.k}),n.d(t,"_126",function(){return a.l}),n.d(t,"_127",function(){return a.m}),n.d(t,"_128",function(){return a.n}),n.d(t,"_129",function(){return a.o}),n.d(t,"_130",function(){return a.p}),n.d(t,"_131",function(){return a.q}),n.d(t,"_132",function(){return a.r}),n.d(t,"_133",function(){return a.s}),n.d(t,"_134",function(){return a.t}),n.d(t,"_135",function(){return a.u}),n.d(t,"_136",function(){return a.v}),n.d(t,"_137",function(){return a.w}),n.d(t,"_138",function(){return a.x}),n.d(t,"_139",function(){return a.y}),n.d(t,"_140",function(){return a.z}),n.d(t,"_141",function(){return a.A}),n.d(t,"_142",function(){return a.B}),n.d(t,"_143",function(){return a.C}),n.d(t,"_144",function(){return a.D}),n.d(t,"_145",function(){return a.E}),n.d(t,"_146",function(){return a.F}),n.d(t,"_147",function(){return a.G}),n.d(t,"_148",function(){return a.H}),n.d(t,"_149",function(){return a.I}),n.d(t,"_150",function(){return a.J}),n.d(t,"_151",function(){return a.K}),n.d(t,"_152",function(){return a.L}),n.d(t,"_153",function(){return a.M}),n.d(t,"_154",function(){return a.N}),n.d(t,"_155",function(){return a.O}),n.d(t,"_156",function(){return a.P}),n.d(t,"_157",function(){return a.Q}),n.d(t,"_158",function(){return a.R}),n.d(t,"_159",function(){return a.S}),n.d(t,"_160",function(){return a.T}),n.d(t,"_161",function(){return a.U}),n.d(t,"_162",function(){return a.V}),n.d(t,"_163",function(){return a.W}),n.d(t,"_164",function(){return a.X}),n.d(t,"_165",function(){return a.Y}),n.d(t,"_166",function(){return a.Z}),n.d(t,"_167",function(){return a._0}),n.d(t,"_168",function(){return a._1}),n.d(t,"_169",function(){return a._2});var o=n(73);n.d(t,"_170",function(){return o.a}),n.d(t,"_171",function(){return o.b});var s=n(35);n.d(t,"_172",function(){return s.a}),n.d(t,"_173",function(){return s.b}),n.d(t,"_174",function(){return s.c}),n.d(t,"_175",function(){return s.d}),n.d(t,"_176",function(){return s.e}),n.d(t,"_177",function(){return s.f}),n.d(t,"_178",function(){return s.g}),n.d(t,"_179",function(){return s.h}),n.d(t,"_180",function(){return s.i}),n.d(t,"_181",function(){return s.j})},function(e,t,n){"use strict";var r=n(15);n.d(t,"a",function(){return r.a}),n.d(t,"g",function(){return r.b}),n.d(t,"i",function(){return r.c}),n.d(t,"l",function(){return r.d}),n.d(t,"m",function(){return r.e}),n.d(t,"w",function(){return r.f}),n.d(t,"L",function(){return r.g}),n.d(t,"V",function(){return r.h}),n.d(t,"_10",function(){return r.i}),n.d(t,"_40",function(){return r.j}),n.d(t,"_52",function(){return r.k}),n.d(t,"_89",function(){return r.m}),n.d(t,"_90",function(){return r.l});var i=n(111);n.d(t,"_61",function(){return i.a});var a=n(29);n.d(t,"_91",function(){return a.a});var o=n(108);n.d(t,"q",function(){return o.a}),n.d(t,"u",function(){return o.b}),n.d(t,"v",function(){return o.c}),n.d(t,"z",function(){return o.d}),n.d(t,"A",function(){return o.e}),n.d(t,"B",function(){return o.f}),n.d(t,"X",function(){return o.g}),n.d(t,"Y",function(){return o.h}),n.d(t,"_92",function(){return o.i}),n.d(t,"_93",function(){return o.j}),n.d(t,"_94",function(){return o.k}),n.d(t,"_95",function(){return o.l}),n.d(t,"_96",function(){return o.m}),n.d(t,"_97",function(){return o.n}),n.d(t,"_98",function(){return o.o}),n.d(t,"_99",function(){return o.p}),n.d(t,"_100",function(){return o.q}),n.d(t,"_101",function(){return o.r}),n.d(t,"_102",function(){return o.s});var s=n(6);n.d(t,"b",function(){return s.a}),n.d(t,"c",function(){return s.b}),n.d(t,"d",function(){return s.c}),n.d(t,"e",function(){return s.d}),n.d(t,"f",function(){return s.e}),n.d(t,"h",function(){return s.f}),n.d(t,"j",function(){return s.g}),n.d(t,"n",function(){return s.h}),n.d(t,"p",function(){return s.i}),n.d(t,"r",function(){return s.j}),n.d(t,"s",function(){return s.k}),n.d(t,"t",function(){return s.l}),n.d(t,"x",function(){return s.m}),n.d(t,"y",function(){return s.n}),n.d(t,"G",function(){return s.I}),n.d(t,"H",function(){return s.J}),n.d(t,"I",function(){return s.K}),n.d(t,"J",function(){return s.L}),n.d(t,"K",function(){return s.M}),n.d(t,"M",function(){return s.N}),n.d(t,"N",function(){return s.O}),n.d(t,"O",function(){return s.P}),n.d(t,"Q",function(){return s.Q}),n.d(t,"S",function(){return s.R}),n.d(t,"T",function(){return s.S}),n.d(t,"U",function(){return s.T}),n.d(t,"_0",function(){return s.U}),n.d(t,"_1",function(){return s.V}),n.d(t,"_5",function(){return s.o}),n.d(t,"_6",function(){return s.W}),n.d(t,"_7",function(){return s.X}),n.d(t,"_8",function(){return s.Y}),n.d(t,"_9",function(){return s.Z}),n.d(t,"_11",function(){return s._0}),n.d(t,"_12",function(){return s._1}),n.d(t,"_13",function(){return s._2}),n.d(t,"_14",function(){return s._3}),n.d(t,"_15",function(){return s._4}),n.d(t,"_16",function(){return s._5}),n.d(t,"_17",function(){return s._6}),n.d(t,"_18",function(){return s._7}),n.d(t,"_19",function(){return s.z}),n.d(t,"_20",function(){return s.A}),n.d(t,"_21",function(){return s.w}),n.d(t,"_22",function(){return s.x}),n.d(t,"_23",function(){return s.y}),n.d(t,"_24",function(){return s._8}),n.d(t,"_25",function(){return s._9}),n.d(t,"_26",function(){return s._10}),n.d(t,"_27",function(){return s._11}),n.d(t,"_28",function(){return s._12}),n.d(t,"_30",function(){return s._13}),n.d(t,"_31",function(){return s._14}),n.d(t,"_32",function(){return s._15}),n.d(t,"_33",function(){return s.C}),n.d(t,"_34",function(){return s.D}),n.d(t,"_35",function(){return s.E}),n.d(t,"_36",function(){return s._16}),n.d(t,"_37",function(){return s._17}),n.d(t,"_41",function(){return s.F}),n.d(t,"_42",function(){return s._18}),n.d(t,"_43",function(){return s._19}),n.d(t,"_44",function(){return s._20}),n.d(t,"_45",function(){return s._21}),n.d(t,"_46",function(){return s._22}),n.d(t,"_47",function(){return s._23}),n.d(t,"_54",function(){return s._35}),n.d(t,"_55",function(){return s._36}),n.d(t,"_56",function(){return s._37}),n.d(t,"_57",function(){return s._38}),n.d(t,"_58",function(){return s._39}),n.d(t,"_60",function(){return s._24}),n.d(t,"_63",function(){return s._42}),n.d(t,"_64",function(){return s._43}),n.d(t,"_65",function(){return s.r}),n.d(t,"_66",function(){return s.s}),n.d(t,"_67",function(){return s._44}),n.d(t,"_69",function(){return s._45}),n.d(t,"_70",function(){return s.H}),n.d(t,"_71",function(){return s._46}),n.d(t,"_72",function(){return s._47}),n.d(t,"_73",function(){return s._48}),n.d(t,"_74",function(){return s._49}),n.d(t,"_75",function(){return s._28}),n.d(t,"_76",function(){return s._31}),n.d(t,"_77",function(){return s._32}),n.d(t,"_78",function(){return s._25}),n.d(t,"_79",function(){return s.p}),n.d(t,"_80",function(){return s._55}),n.d(t,"_81",function(){return s._56}),n.d(t,"_82",function(){return s._57}),n.d(t,"_84",function(){return s._58}),n.d(t,"_86",function(){return s._33}),n.d(t,"_87",function(){return s._29}),n.d(t,"_88",function(){return s._30}),n.d(t,"_103",function(){return s.q}),n.d(t,"_104",function(){return s.t}),n.d(t,"_105",function(){return s._52}),n.d(t,"_106",function(){return s._41}),n.d(t,"_107",function(){return s.v}),n.d(t,"_108",function(){return s._62}),n.d(t,"_109",function(){return s._61}),n.d(t,"_110",function(){return s._53}),n.d(t,"_111",function(){return s.B}),n.d(t,"_112",function(){return s._34}),n.d(t,"_113",function(){return s._51}),n.d(t,"_114",function(){return s._63}),n.d(t,"_115",function(){return s._64}),n.d(t,"_116",function(){return s._65}),n.d(t,"_117",function(){return s._66}),n.d(t,"_118",function(){return s._59}),n.d(t,"_119",function(){return s._60}),n.d(t,"_120",function(){return s._67}),n.d(t,"_121",function(){return s._68}),n.d(t,"_122",function(){return s.G}),n.d(t,"_123",function(){return s._69}),n.d(t,"_124",function(){return s._50}),n.d(t,"_125",function(){return s._70}),n.d(t,"_126",function(){return s.u}),n.d(t,"_127",function(){return s._71}),n.d(t,"_128",function(){return s._72}),n.d(t,"_129",function(){return s._73}),n.d(t,"_130",function(){return s._74}),n.d(t,"_131",function(){return s._75}),n.d(t,"_132",function(){return s._26}),n.d(t,"_133",function(){return s._76}),n.d(t,"_134",function(){return s._27}),n.d(t,"_135",function(){return s._40}),n.d(t,"_136",function(){return s._77}),n.d(t,"_137",function(){return s._78}),n.d(t,"_138",function(){return s._54}),n.d(t,"_139",function(){return s._79}),n.d(t,"_140",function(){return s._80});var l=n(110);n.d(t,"k",function(){return l.a}),n.d(t,"C",function(){return l.b}),n.d(t,"D",function(){return l.c}),n.d(t,"P",function(){return l.d}),n.d(t,"R",function(){return l.e}),n.d(t,"_29",function(){return l.f}),n.d(t,"_38",function(){return l.g}),n.d(t,"_39",function(){return l.h}),n.d(t,"_49",function(){return l.i}),n.d(t,"_50",function(){return l.j}),n.d(t,"_51",function(){return l.k}),n.d(t,"_53",function(){return l.l}),n.d(t,"_59",function(){return l.m}),n.d(t,"_62",function(){return l.n}),n.d(t,"_68",function(){return l.o}),n.d(t,"_85",function(){return l.p}),n.d(t,"_141",function(){return l.q}),n.d(t,"_142",function(){return l.r}),n.d(t,"_143",function(){return l.s}),n.d(t,"_144",function(){return l.t}),n.d(t,"_145",function(){return l.u}),n.d(t,"_146",function(){return l.v}),n.d(t,"_147",function(){return l.w}),n.d(t,"_148",function(){return l.x}),n.d(t,"_149",function(){return l.y});var d=n(28);n.d(t,"o",function(){return d.a}),n.d(t,"W",function(){return d.b}),n.d(t,"_2",function(){return d.c}),n.d(t,"_3",function(){return d.d}),n.d(t,"_4",function(){return d.e}),n.d(t,"_48",function(){return d.f}),n.d(t,"_83",function(){return d.g}),n.d(t,"_150",function(){return d.h});var c=n(109);n.d(t,"E",function(){return c.a}),n.d(t,"F",function(){return c.b}),n.d(t,"Z",function(){return c.c})},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(40);n.d(t,"B",function(){return r.a});var i=n(26);n.d(t,"g",function(){return i.a}),n.d(t,"k",function(){return i.b}),n.d(t,"l",function(){return i.c}),n.d(t,"m",function(){return i.d}),n.d(t,"n",function(){return i.e}),n.d(t,"u",function(){return i.l}),n.d(t,"v",function(){return i.j}),n.d(t,"w",function(){return i.f}),n.d(t,"C",function(){return i.m}),n.d(t,"D",function(){return i.n}),n.d(t,"E",function(){return i.k}),n.d(t,"F",function(){return i.i}),n.d(t,"G",function(){return i.o}),n.d(t,"H",function(){return i.p}),n.d(t,"I",function(){return i.q}),n.d(t,"J",function(){return i.g}),n.d(t,"K",function(){return i.h});var a=n(107);n.d(t,"c",function(){return a.a}),n.d(t,"d",function(){return a.b}),n.d(t,"i",function(){return a.c}),n.d(t,"j",function(){return a.d}),n.d(t,"r",function(){return a.e}),n.d(t,"x",function(){return a.f}),n.d(t,"y",function(){return a.g}),n.d(t,"L",function(){return a.h});var o=n(106);n.d(t,"a",function(){return o.a}),n.d(t,"b",function(){return o.b}),n.d(t,"s",function(){return o.c}),n.d(t,"t",function(){return o.d}),n.d(t,"z",function(){return o.e}),n.d(t,"A",function(){return o.f}),n.d(t,"M",function(){return o.g});var s=n(25);n.d(t,"e",function(){return s.a}),n.d(t,"f",function(){return s.b}),n.d(t,"h",function(){return s.c}),n.d(t,"p",function(){return s.f}),n.d(t,"q",function(){return s.g}),n.d(t,"N",function(){return s.d}),n.d(t,"O",function(){return s.e}),n.d(t,"P",function(){return s.h});var l=n(39);n.d(t,"o",function(){return l.b}),n.d(t,"Q",function(){return l.c}),n.d(t,"R",function(){return l.d}),n.d(t,"S",function(){return l.a})},function(e,t,n){"use strict";var r=n(1);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b}),n.d(t,"c",function(){return r.c}),n.d(t,"d",function(){return r.d}),n.d(t,"e",function(){return r.e}),n.d(t,"f",function(){return r.f}),n.d(t,"g",function(){return r.g}),n.d(t,"h",function(){return r.h}),n.d(t,"i",function(){return r.i}),n.d(t,"j",function(){return r.j}),n.d(t,"k",function(){return r.k}),n.d(t,"l",function(){return r.l}),n.d(t,"m",function(){return r.m}),n.d(t,"n",function(){return r.n}),n.d(t,"o",function(){return r.o}),n.d(t,"p",function(){return r.p}),n.d(t,"q",function(){return r.q}),n.d(t,"r",function(){return r.r}),n.d(t,"s",function(){return r.s}),n.d(t,"t",function(){return r.t}),n.d(t,"u",function(){return r.u}),n.d(t,"v",function(){return r.v}),n.d(t,"w",function(){return r.w}),n.d(t,"x",function(){return r.x}),n.d(t,"y",function(){return r.y}),n.d(t,"z",function(){return r.z}),n.d(t,"A",function(){return r.A}),n.d(t,"B",function(){return r.B}),n.d(t,"C",function(){return r.C}),n.d(t,"D",function(){return r.D}),n.d(t,"E",function(){return r.E}),n.d(t,"F",function(){return r.F}),n.d(t,"G",function(){return r.G}),n.d(t,"H",function(){return r.H}),n.d(t,"I",function(){return r.I}),n.d(t,"J",function(){return r.J}),n.d(t,"K",function(){return r.K}),n.d(t,"L",function(){return r.L}),n.d(t,"M",function(){return r.M}),n.d(t,"N",function(){return r.N}),n.d(t,"O",function(){return r.O}),n.d(t,"P",function(){return r.P}),n.d(t,"Q",function(){return r.Q}),n.d(t,"R",function(){return r.R}),n.d(t,"S",function(){return r.S}),n.d(t,"T",function(){return r.T}),n.d(t,"U",function(){return r.U}),n.d(t,"V",function(){return r.V}),n.d(t,"W",function(){return r.W}),n.d(t,"X",function(){return r.X}),n.d(t,"Y",function(){return r.Y}),n.d(t,"Z",function(){return r.Z}),n.d(t,"_0",function(){return r._0}),n.d(t,"_1",function(){return r._1}),n.d(t,"_2",function(){return r._2}),n.d(t,"_3",function(){return r._3}),n.d(t,"_4",function(){return r._4}),n.d(t,"_5",function(){return r._5}),n.d(t,"_6",function(){return r._6}),n.d(t,"_7",function(){return r._7}),n.d(t,"_8",function(){return r._8}),n.d(t,"_9",function(){return r._9}),n.d(t,"_10",function(){return r._10}),n.d(t,"_11",function(){return r._11}),n.d(t,"_12",function(){return r._12}),n.d(t,"_13",function(){return r._13}),n.d(t,"_14",function(){return r._14}),n.d(t,"_15",function(){return r._15}),n.d(t,"_16",function(){return r._16}),n.d(t,"_17",function(){return r._17}),n.d(t,"_18",function(){return r._18}),n.d(t,"_19",function(){return r._19}),n.d(t,"_20",function(){return r._20}),n.d(t,"_21",function(){return r._21}),n.d(t,"_22",function(){return r._22}),n.d(t,"_23",function(){return r._23}),n.d(t,"_24",function(){return r._24}),n.d(t,"_25",function(){return r._25}),n.d(t,"_26",function(){return r._26}),n.d(t,"_27",function(){return r._27}),n.d(t,"_28",function(){return r._28}),n.d(t,"_29",function(){return r._29}),n.d(t,"_30",function(){return r._30}),n.d(t,"_31",function(){return r._31}),n.d(t,"_32",function(){return r._32}),n.d(t,"_33",function(){return r._33}),n.d(t,"_34",function(){return r._34}),n.d(t,"_35",function(){return r._35}),n.d(t,"_36",function(){return r._36}),n.d(t,"_37",function(){return r._37}),n.d(t,"_38",function(){return r._38}),n.d(t,"_39",function(){return r._39}),n.d(t,"_40",function(){return r._40}),n.d(t,"_41",function(){return r._41}),n.d(t,"_42",function(){return r._42}),n.d(t,"_43",function(){return r._43}),n.d(t,"_44",function(){return r._44}),n.d(t,"_45",function(){return r._45}),n.d(t,"_46",function(){return r._46}),n.d(t,"_47",function(){return r._47}),n.d(t,"_48",function(){return r._48}),n.d(t,"_49",function(){return r._49}),n.d(t,"_50",function(){return r._50}),n.d(t,"_51",function(){return r._51}),n.d(t,"_52",function(){return r._52}),n.d(t,"_53",function(){return r._53}),n.d(t,"_54",function(){return r._54}),n.d(t,"_55",function(){return r._55}),n.d(t,"_56",function(){return r._56}),n.d(t,"_57",function(){return r._57}),n.d(t,"_58",function(){return r._58}),n.d(t,"_59",function(){return r._59}),n.d(t,"_60",function(){return r._60}),n.d(t,"_61",function(){return r._61}),n.d(t,"_62",function(){return r._62}),n.d(t,"_63",function(){return r._63}),n.d(t,"_64",function(){return r._64}),n.d(t,"_65",function(){return r._65}),n.d(t,"_66",function(){return r._66}),n.d(t,"_67",function(){return r._67}),n.d(t,"_68",function(){return r._68}),n.d(t,"_69",function(){return r._69}),n.d(t,"_70",function(){return r._70}),n.d(t,"_71",function(){return r._71}),n.d(t,"_72",function(){return r._72}),n.d(t,"_73",function(){return r._73}),n.d(t,"_74",function(){return r._74}),n.d(t,"_75",function(){return r._75}),n.d(t,"_76",function(){return r._76}),n.d(t,"_77",function(){return r._77}),n.d(t,"_78",function(){return r._78}),n.d(t,"_79",function(){return r._79}),n.d(t,"_80",function(){return r._80}),n.d(t,"_81",function(){return r._81}),n.d(t,"_82",function(){return r._82}),n.d(t,"_83",function(){return r._83}),n.d(t,"_84",function(){return r._84}),n.d(t,"_85",function(){return r._85}),n.d(t,"_86",function(){return r._86}),n.d(t,"_87",function(){return r._87}),n.d(t,"_88",function(){return r._88}),n.d(t,"_89",function(){return r._89}),n.d(t,"_90",function(){return r._90}),n.d(t,"_91",function(){return r._91}),n.d(t,"_92",function(){return r._92}),n.d(t,"_93",function(){return r._93}),n.d(t,"_94",function(){return r._94}),n.d(t,"_95",function(){return r._95}),n.d(t,"_96",function(){return r._96}),n.d(t,"_97",function(){return r._97}),n.d(t,"_98",function(){return r._98}),n.d(t,"_99",function(){return r._99}),n.d(t,"_100",function(){return r._100}),n.d(t,"_101",function(){return r._101}),n.d(t,"_102",function(){return r._102}),n.d(t,"_103",function(){return r._103}),n.d(t,"_104",function(){return r._104}),n.d(t,"_105",function(){return r._105}),n.d(t,"_106",function(){return r._106}),n.d(t,"_107",function(){return r._107}),n.d(t,"_108",function(){return r._108}),n.d(t,"_109",function(){return r._109}),n.d(t,"_110",function(){return r._110}),n.d(t,"_111",function(){return r._111}),n.d(t,"_112",function(){return r._112}),n.d(t,"_113",function(){return r._113}),n.d(t,"_114",function(){return r._114}),n.d(t,"_115",function(){return r._115}),n.d(t,"_116",function(){return r._116}),n.d(t,"_117",function(){return r._117}),n.d(t,"_118",function(){return r._118}),n.d(t,"_119",function(){return r._119}),n.d(t,"_120",function(){return r._120}),n.d(t,"_121",function(){return r._121}),n.d(t,"_122",function(){return r._122}),n.d(t,"_123",function(){return r._123}),n.d(t,"_124",function(){return r._124}),n.d(t,"_125",function(){return r._125}),n.d(t,"_126",function(){return r._126}),n.d(t,"_127",function(){return r._127}),n.d(t,"_128",function(){return r._128}),n.d(t,"_129",function(){return r._129}),n.d(t,"_130",function(){return r._130}),n.d(t,"_131",function(){return r._131}),n.d(t,"_132",function(){return r._132}),n.d(t,"_133",function(){return r._133}),n.d(t,"_134",function(){return r._134}),n.d(t,"_135",function(){return r._135}),n.d(t,"_136",function(){return r._136}),n.d(t,"_137",function(){return r._137}),n.d(t,"_138",function(){return r._138}),n.d(t,"_139",function(){return r._139}),n.d(t,"_140",function(){return r._140}),n.d(t,"_141",function(){return r._141}),n.d(t,"_142",function(){return r._142}),n.d(t,"_143",function(){return r._143}),n.d(t,"_144",function(){return r._144}),n.d(t,"_145",function(){return r._145}),n.d(t,"_146",function(){return r._146}),n.d(t,"_147",function(){return r._147});n.d(t,"_148",function(){return r._148}),n.d(t,"_149",function(){return r._149}),n.d(t,"_150",function(){return r._150}),n.d(t,"_151",function(){return r._151}),n.d(t,"_152",function(){return r._152}),n.d(t,"_153",function(){return r._153}),n.d(t,"_154",function(){return r._154}),n.d(t,"_155",function(){return r._155}),n.d(t,"_156",function(){return r._156}),n.d(t,"_157",function(){return r._157}),n.d(t,"_158",function(){return r._158}),n.d(t,"_159",function(){return r._159}),n.d(t,"_160",function(){return r._160}),n.d(t,"_161",function(){return r._161}),n.d(t,"_162",function(){return r._162}),n.d(t,"_163",function(){return r._163}),n.d(t,"_164",function(){return r._164}),n.d(t,"_165",function(){return r._165}),n.d(t,"_166",function(){return r._166}),n.d(t,"_167",function(){return r._167}),n.d(t,"_168",function(){return r._168}),n.d(t,"_169",function(){return r._169}),n.d(t,"_170",function(){return r._170}),n.d(t,"_171",function(){return r._171}),n.d(t,"_172",function(){return r._172}),n.d(t,"_173",function(){return r._173}),n.d(t,"_174",function(){return r._174}),n.d(t,"_175",function(){return r._175}),n.d(t,"_176",function(){return r._176}),n.d(t,"_177",function(){return r._177}),n.d(t,"_178",function(){return r._178}),n.d(t,"_179",function(){return r._179}),n.d(t,"_180",function(){return r._180}),n.d(t,"_181",function(){return r._181});var i=n(71);n.d(t,"_182",function(){return i.a});var a=n(13);n.d(t,"_183",function(){return a.a}),n.d(t,"_184",function(){return a.b}),n.d(t,"_185",function(){return a.c}),n.d(t,"_186",function(){return a.d}),n.d(t,"_187",function(){return a.e}),n.d(t,"_188",function(){return a.f}),n.d(t,"_189",function(){return a.g}),n.d(t,"_190",function(){return a.h}),n.d(t,"_191",function(){return a.i}),n.d(t,"_192",function(){return a.j}),n.d(t,"_193",function(){return a.k}),n.d(t,"_194",function(){return a.l}),n.d(t,"_195",function(){return a.m}),n.d(t,"_196",function(){return a.n}),n.d(t,"_197",function(){return a.o}),n.d(t,"_198",function(){return a.p}),n.d(t,"_199",function(){return a.q}),n.d(t,"_200",function(){return a.r}),n.d(t,"_201",function(){return a.s}),n.d(t,"_202",function(){return a.t}),n.d(t,"_203",function(){return a.u});var o=n(24);n.d(t,"_204",function(){return o.a}),n.d(t,"_205",function(){return o.b}),n.d(t,"_206",function(){return o.c}),n.d(t,"_207",function(){return o.d}),n.d(t,"_208",function(){return o.e}),n.d(t,"_209",function(){return o.f}),n.d(t,"_210",function(){return o.g}),n.d(t,"_211",function(){return o.h}),n.d(t,"_212",function(){return o.i}),n.d(t,"_213",function(){return o.j}),n.d(t,"_214",function(){return o.k}),n.d(t,"_215",function(){return o.l});var s=n(36);n.d(t,"_216",function(){return s.a}),n.d(t,"_217",function(){return s.b}),n.d(t,"_218",function(){return s.c}),n.d(t,"_219",function(){return s.d})},function(e,t,n){"use strict";n.d(t,"q",function(){return r}),n.d(t,"h",function(){return i}),n.d(t,"_44",function(){return a}),n.d(t,"R",function(){return o}),n.d(t,"_58",function(){return s}),n.d(t,"s",function(){return l}),n.d(t,"t",function(){return d}),n.d(t,"_14",function(){return c}),n.d(t,"_52",function(){return h}),n.d(t,"_10",function(){return p}),n.d(t,"_55",function(){return u}),n.d(t,"_41",function(){return f}),n.d(t,"v",function(){return g}),n.d(t,"o",function(){return m}),n.d(t,"c",function(){return v}),n.d(t,"U",function(){return y}),n.d(t,"I",function(){return C}),n.d(t,"_9",function(){return b}),n.d(t,"_45",function(){return x}),n.d(t,"e",function(){return S}),n.d(t,"_62",function(){return w}),n.d(t,"O",function(){return _}),n.d(t,"g",function(){return I}),n.d(t,"l",function(){return E}),n.d(t,"W",function(){return R}),n.d(t,"Y",function(){return k}),n.d(t,"Z",function(){return A}),n.d(t,"X",function(){return F}),n.d(t,"Q",function(){return N}),n.d(t,"_43",function(){return T}),n.d(t,"_42",function(){return O}),n.d(t,"K",function(){return D}),n.d(t,"r",function(){return L}),n.d(t,"_35",function(){return P}),n.d(t,"_36",function(){return M}),n.d(t,"_37",function(){return B}),n.d(t,"_24",function(){return H}),n.d(t,"_61",function(){return U}),n.d(t,"j",function(){return V}),n.d(t,"_38",function(){return j}),n.d(t,"_53",function(){return z}),n.d(t,"B",function(){return q}),n.d(t,"_34",function(){return W}),n.d(t,"_51",function(){return G}),n.d(t,"_63",function(){return Y}),n.d(t,"_64",function(){return X}),n.d(t,"_65",function(){return K}),n.d(t,"_66",function(){return $}),n.d(t,"_59",function(){return Z}),n.d(t,"_60",function(){return J}),n.d(t,"_67",function(){return Q}),n.d(t,"P",function(){return ee}),n.d(t,"_68",function(){return te}),n.d(t,"G",function(){return ne}),n.d(t,"_69",function(){return re}),n.d(t,"_50",function(){return ie}),n.d(t,"_70",function(){return ae}),n.d(t,"b",function(){return oe}),n.d(t,"u",function(){return se}),n.d(t,"_23",function(){return le}),n.d(t,"_21",function(){return de}),n.d(t,"L",function(){return ce}),n.d(t,"M",function(){return he}),n.d(t,"F",function(){return pe}),n.d(t,"C",function(){return ue}),n.d(t,"D",function(){return fe}),n.d(t,"_71",function(){return ge}),n.d(t,"w",function(){return me}),n.d(t,"_11",function(){return ve}),n.d(t,"_72",function(){return ye}),n.d(t,"x",function(){return Ce}),n.d(t,"y",function(){return be}),n.d(t,"_12",function(){return xe}),n.d(t,"_73",function(){return Se}),n.d(t,"E",function(){return we}),n.d(t,"i",function(){return _e}),n.d(t,"_8",function(){return Ie}),n.d(t,"_74",function(){return Ee}),n.d(t,"_6",function(){return Re}),n.d(t,"_7",function(){return ke}),n.d(t,"z",function(){return Ae}),n.d(t,"_15",function(){return Fe}),n.d(t,"A",function(){return Ne}),n.d(t,"_13",function(){return Te}),n.d(t,"J",function(){return Oe}),n.d(t,"_75",function(){return De}),n.d(t,"N",function(){return Le}),n.d(t,"_2",function(){return Pe}),n.d(t,"_3",function(){return Me}),n.d(t,"_4",function(){return Be}),n.d(t,"_5",function(){return He}),n.d(t,"_33",function(){return Ue}),n.d(t,"_47",function(){return Ve}),n.d(t,"a",function(){return je}),n.d(t,"_48",function(){return ze}),n.d(t,"H",function(){return qe}),n.d(t,"_49",function(){return We}),n.d(t,"S",function(){return Ge}),n.d(t,"f",function(){return Ye}),n.d(t,"_28",function(){return Xe}),n.d(t,"_56",function(){return Ke}),n.d(t,"d",function(){return $e}),n.d(t,"_26",function(){return Ze}),n.d(t,"_32",function(){return Je}),n.d(t,"_25",function(){return Qe}),n.d(t,"_76",function(){return et}),n.d(t,"_27",function(){return tt}),n.d(t,"_40",function(){return nt}),n.d(t,"_18",function(){return rt}),n.d(t,"_16",function(){return it}),n.d(t,"_17",function(){return at}),n.d(t,"_46",function(){return ot}),n.d(t,"m",function(){return st}),n.d(t,"T",function(){return lt}),n.d(t,"_77",function(){return dt}),n.d(t,"_1",function(){return ct}),n.d(t,"_78",function(){return ht}),n.d(t,"V",function(){return pt}),n.d(t,"_54",function(){return ut}),n.d(t,"_20",function(){return ft}),n.d(t,"_79",function(){return gt}),n.d(t,"_39",function(){return mt}),n.d(t,"_22",function(){return vt}),n.d(t,"_19",function(){return yt}),n.d(t,"k",function(){return Ct}),n.d(t,"n",function(){return bt}),n.d(t,"_57",function(){return xt}),n.d(t,"p",function(){return St}),n.d(t,"_80",function(){return wt}),n.d(t,"_0",function(){return _t}),n.d(t,"_29",function(){return It}),n.d(t,"_30",function(){return Et}),n.d(t,"_31",function(){return Rt});var r="workbookDestroyed",i="updateSheetFromDataSource",a="dataSourceChanged",o="dataChanged",s="triggerDataChange",l="workbookOpen",d="beginSave",c="actionBegin",h="sortImport",p="findToolDlg",u="exportDialog",f="setFilteredCollection",g="saveCompleted",m="applyNumber",v="getFormattedCell",y="refreshCellElem",C="setCellFormat",b="findAllValues",x="textDecorationUpdate",S="applyCellFormat",w="updateUsedRange",_="updateRowColCount",I="workbookFormulaOperation",E="workbookEditOperation",R="checkDateFormat",k="checkNumberFormat",A="parseDecimalNumber",F="getFormattedBarText",N="activeCellChanged",T="openSuccess",O="openFailure",D="sheetCreated",L="sheetsDestroyed",P="aggregateComputation",M="getUniqueRange",B="removeUniquecol",H="checkUniqueRange",U="reApplyFormula",V="clearFormulaDependentCells",j="formulaInValidation",z="beforeSort",q="initiateSort",W="updateSortedDataOnCell",G="sortComplete",Y="sortRangeAlert",X="initiatelink",K="beforeHyperlinkCreate",$="afterHyperlinkCreate",Z="beforeHyperlinkClick",J="afterHyperlinkClick",Q="addHyperlink",ee="setLinkModel",te="beforeFilter",ne="initiateFilter",re="filterComplete",ie="filterRangeAlert",ae="clearAllFilter",oe="wrapText",se="onSave",le="insert",de="delete",ce="insertModel",he="deleteModel",pe="isValidation",ue="cellValidation",fe="addHighlight",ge="dataValidate",me="find",ve="gotoHandler",ye="findHandler",Ce="replace",be="replaceAll",xe="showFindAlert",Se="findKeyUp",we="removeHighlight",_e="queryCellInfo",Ie="count",Ee="findCount",Re="protectSheet",ke="updateToggleItem",Ae="protectsheetHandler",Fe="replaceAllDialog",Ne="unprotectsheetHandler",Te="editAlert",Oe="setLockCells",De="applyLockCells",Le="setMerge",Pe="applyMerge",Me="mergedRange",Be="activeCellMergedRange",He="insertMerge",Ue="hideShow",Ve="setCFRule",je="applyCF",ze="clearCFRule",qe="clear",We="clearCF",Ge="setImage",Ye="setChart",Xe="initiateChart",Ke="refreshRibbonIcons",$e="refreshChart",Ze="refreshChartSize",Je="updateChart",Qe="deleteChartColl",et="initiateChartModel",tt="focusChartBorder",nt="saveError",rt="validationHighlight",it="beforeInsert",at="beforeDelete",ot="deleteHyperlink",st="moveOrDuplicateSheet",lt="setAutoFill",dt="refreshCell",ct="getFillInfo",ht="getautofillDDB",pt="rowFillHandler",ut="getTextSpace",ft="refreshClipboard",gt="updateView",mt="selectionComplete",vt="refreshInsertDelete",yt="getUpdatedFormulaOnInsertDelete",Ct="beforeCellUpdate",bt="duplicateSheetFilterHandler",xt="unMerge",St="addFormatToCustomFormatDlg",wt="checkFormulaRef",_t="parseFormulaArgument",It="getChartRowIdxFromClientY",Et="getChartColIdxFromClientX",Rt="refreshChartCellOnInit"},function(e,t,n){"use strict";n.d(t,"L",function(){return r}),n.d(t,"M",function(){return i}),n.d(t,"N",function(){return a}),n.d(t,"l",function(){return o}),n.d(t,"I",function(){return s}),n.d(t,"O",function(){return l}),n.d(t,"E",function(){return d}),n.d(t,"P",function(){return c}),n.d(t,"m",function(){return h}),n.d(t,"o",function(){return p}),n.d(t,"a",function(){return u}),n.d(t,"Q",function(){return f}),n.d(t,"s",function(){return g}),n.d(t,"q",function(){return m}),n.d(t,"R",function(){return v}),n.d(t,"S",function(){return y}),n.d(t,"T",function(){return C}),n.d(t,"U",function(){return b}),n.d(t,"V",function(){return x}),n.d(t,"W",function(){return S}),n.d(t,"X",function(){return w}),n.d(t,"Y",function(){return _}),n.d(t,"Z",function(){return I}),n.d(t,"_0",function(){return E}),n.d(t,"_1",function(){return R}),n.d(t,"_2",function(){return k}),n.d(t,"_3",function(){return A}),n.d(t,"_4",function(){return F}),n.d(t,"_5",function(){return N}),n.d(t,"_6",function(){return T}),n.d(t,"K",function(){return O}),n.d(t,"_7",function(){return D}),n.d(t,"_8",function(){return L}),n.d(t,"_9",function(){return P}),n.d(t,"_10",function(){return M}),n.d(t,"_11",function(){return B}),n.d(t,"_12",function(){return H}),n.d(t,"J",function(){return U}),n.d(t,"_13",function(){return V}),n.d(t,"_14",function(){return j}),n.d(t,"_15",function(){return z}),n.d(t,"_16",function(){return q}),n.d(t,"_17",function(){return W}),n.d(t,"_18",function(){return G}),n.d(t,"_19",function(){return Y}),n.d(t,"_20",function(){return X}),n.d(t,"_21",function(){return K}),n.d(t,"_22",function(){return $}),n.d(t,"_23",function(){return Z}),n.d(t,"_24",function(){return J}),n.d(t,"_25",function(){return Q}),n.d(t,"_26",function(){return ee}),n.d(t,"_27",function(){return te}),n.d(t,"_28",function(){return ne}),n.d(t,"_29",function(){return re}),n.d(t,"_30",function(){return ie}),n.d(t,"H",function(){return ae}),n.d(t,"_31",function(){return oe}),n.d(t,"_32",function(){return se}),n.d(t,"_33",function(){return le}),n.d(t,"_34",function(){return de}),n.d(t,"_35",function(){return ce}),n.d(t,"_36",function(){return he}),n.d(t,"_37",function(){return pe}),n.d(t,"_38",function(){return ue}),n.d(t,"_39",function(){return fe}),n.d(t,"_40",function(){return ge}),n.d(t,"_41",function(){return me}),n.d(t,"_42",function(){return ve}),n.d(t,"_43",function(){return ye}),n.d(t,"_44",function(){return Ce}),n.d(t,"_45",function(){return be}),n.d(t,"_46",function(){return xe}),n.d(t,"_47",function(){return Se}),n.d(t,"_48",function(){return we}),n.d(t,"_49",function(){return _e}),n.d(t,"_50",function(){return Ie}),n.d(t,"_51",function(){return Ee}),n.d(t,"_52",function(){return Re}),n.d(t,"_53",function(){return ke}),n.d(t,"_54",function(){return Ae}),n.d(t,"_55",function(){return Fe}),n.d(t,"j",function(){return Ne}),n.d(t,"_56",function(){return Te}),n.d(t,"_57",function(){return Oe}),n.d(t,"_58",function(){return De}),n.d(t,"_59",function(){return Le}),n.d(t,"_60",function(){return Pe}),n.d(t,"_61",function(){return Me}),n.d(t,"_62",function(){return Be}),n.d(t,"_63",function(){return He}),n.d(t,"_64",function(){return Ue}),n.d(t,"_65",function(){return Ve}),n.d(t,"u",function(){return je}),n.d(t,"t",function(){return ze}),n.d(t,"_66",function(){return qe}),n.d(t,"C",function(){return We}),n.d(t,"_67",function(){return Ge}),n.d(t,"_68",function(){return Ye}),n.d(t,"_69",function(){return Xe}),n.d(t,"_70",function(){return Ke}),n.d(t,"p",function(){return $e}),n.d(t,"_71",function(){return Ze}),n.d(t,"D",function(){return Je}),n.d(t,"_72",function(){return Qe}),n.d(t,"_73",function(){return et}),n.d(t,"_74",function(){return tt}),n.d(t,"_75",function(){return nt}),n.d(t,"_76",function(){return rt}),n.d(t,"_77",function(){return it}),n.d(t,"_78",function(){return at}),n.d(t,"_79",function(){return ot}),n.d(t,"_80",function(){return st}),n.d(t,"_81",function(){return lt}),n.d(t,"_82",function(){return dt}),n.d(t,"_83",function(){return ct}),n.d(t,"_84",function(){return ht}),n.d(t,"n",function(){return pt}),n.d(t,"_85",function(){return ut}),n.d(t,"F",function(){return ft}),n.d(t,"G",function(){return gt}),n.d(t,"c",function(){return mt}),n.d(t,"_86",function(){return vt}),n.d(t,"d",function(){return yt}),n.d(t,"h",function(){return Ct}),n.d(t,"i",function(){return bt}),n.d(t,"e",function(){return xt}),n.d(t,"f",function(){return St}),n.d(t,"b",function(){return wt}),n.d(t,"_87",function(){return _t}),n.d(t,"_88",function(){return It}),n.d(t,"g",function(){return Et}),n.d(t,"_89",function(){return Rt}),n.d(t,"_90",function(){return kt}),n.d(t,"_91",function(){return At}),n.d(t,"_92",function(){return Ft}),n.d(t,"_93",function(){return Nt}),n.d(t,"_94",function(){return Tt}),n.d(t,"_95",function(){return Ot}),n.d(t,"_96",function(){return Dt}),n.d(t,"_97",function(){return Lt}),n.d(t,"_98",function(){return Pt}),n.d(t,"v",function(){return Mt}),n.d(t,"w",function(){return Bt}),n.d(t,"x",function(){return Ht}),n.d(t,"z",function(){return Ut}),n.d(t,"A",function(){return Vt}),n.d(t,"y",function(){return jt}),n.d(t,"_99",function(){return zt}),n.d(t,"_100",function(){return qt}),n.d(t,"_101",function(){return Wt}),n.d(t,"_102",function(){return Gt}),n.d(t,"_103",function(){return Yt}),n.d(t,"_104",function(){return Xt}),n.d(t,"_105",function(){return Kt}),n.d(t,"_106",function(){return $t}),n.d(t,"_107",function(){return Zt}),n.d(t,"B",function(){return Jt}),n.d(t,"k",function(){return Qt}),n.d(t,"_108",function(){return en}),n.d(t,"_109",function(){return tn}),n.d(t,"_110",function(){return nn}),n.d(t,"_111",function(){return rn}),n.d(t,"_112",function(){return an}),n.d(t,"r",function(){return on}),n.d(t,"_113",function(){return sn});var r="ribbon",i="formulaBar",a="sheetTabs",o="refreshSheetTabs",s="isFormulaBarEdit",l="contentLoaded",d="mouseDown",c="spreadsheetDestroyed",h="editOperation",p="formulaOperation",u="formulaBarOperation",f="click",g="keyUp",m="keyDown",v="formulaKeyUp",y="formulaBarUpdate",C="verticalScroll",b="horizontalScroll",x="beforeContentLoaded",S="beforeVirtualContentLoaded",w="virtualContentLoaded",_="contextMenuOpen",I="cellNavigate",E="mouseUpAfterSelection",R="contextmenuBeforeOpen",k="insertSheetTab",A="removeSheetTab",F="renameSheetTab",N="ribboClick",T="ribbonRefresh",O="enableToolbarItems",D="tabSwitch",L="selectRange",P="rangeSelectionByKeydown",M="cut",B="copy",H="paste",U="clearCopy",V="dataBound",j="beforeDataBound",z="addContextMenuItems",q="removeContextMenuItems",W="enableContextMenuItems",G="enableFileMenuItems",Y="hideFileMenuItems",X="addFileMenuItems",K="hideRibbonTabs",$="enableRibbonTabs",Z="addRibbonTabs",J="addToolbarItems",Q="hideToolbarItems",ee="beforeRibbonCreate",te="rowHeightChanged",ne="colWidthChanged",re="onContentScroll",ie="deInitProperties",ae="activeSheetChanged",oe="initiateCustomSort",se="applySort",le="collaborativeUpdate",de="autoFitRowsColumns",ce="updateToggleItem",he="initiateHyperlink",pe="editHyperlink",ue="openHyperlink",fe="removeHyperlink",ge="createHyperlinkElement",me="sheetNameUpdate",ve="hideSheet",ye="performUndoRedo",Ce="updateUndoRedoCollection",be="setActionData",xe="getBeforeActionData",Se="clearUndoRedoCollection",we="initiateFilterUI",_e="renderFilterCell",Ie="refreshFilterRange",Ee="updateSortCollection",Re="reapplyFilter",ke="filterByCellValue",Ae="clearFilter",Fe="getFilteredColumn",Ne="actionComplete",Te="filterCellKeyDown",Oe="getFilterRange",De="setAutoFit",Le="refreshFormulaDatasource",Pe="setScrollEvent",Me="initiatedatavalidation",Be="validationError",He="startEdit",Ue="invalidData",Ve="clearInvalid",je="protectSheet",ze="applyProtect",qe="unprotectSheet",We="protectCellFormat",Ge="renderGotoDlgt",Ye="renderFindDlg",Xe="findHandler",Ke="created",$e="editAlert",Ze="setUndoRedo",Je="enableFormulaInput",Qe="protectSelection",et="hiddenMerge",tt="checkPrevMerge",nt="checkMerge",rt="removeDataValidation",it="showAggregate",at="goToSheet",ot="showSheet",st="renderCFDlg",lt="clearViewer",dt="initiateFormulaReference",ct="initiateCur",ht="clearCellRef",pt="editValue",ut="addressHandle",ft="initiateEdit",gt="forRefSelRender",mt="insertImage",vt="refreshOverlayElem",yt="refreshImgCellObj",Ct="getRowIdxFromClientY",bt="getColIdxFromClientX",xt="createImageElement",St="deleteImage",wt="deleteChart",_t="refreshChartCellObj",It="refreshChartCellModel",Et="refreshImagePosition",Rt="updateTableWidth",kt="focusBorder",At="clearChartBorder",Ft="insertChart",Nt="chartRangeSelection",Tt="insertDesignChart",Ot="removeDesignChart",Dt="chartDesignTab",Lt="addChartEle",Pt="undoRedoForChartDesign",Mt="protectWorkbook",Bt="unProtectWorkbook",Ht="getPassWord",Ut="setProtectWorkbook",Vt="removeWorkbookProtection",jt="importProtectWorkbook",zt="selectionStatus",qt="freeze",Wt="overlayEleSize",Gt="updateScroll",Yt="positionAutoFillElement",Xt="hideAutoFillOptions",Kt="performAutoFill",$t="selectAutoFillRange",Zt="autoFill",Jt="hideAutoFillElement",Qt="unProtectSheetPassword",en="updateTranslate",tn="getUpdatedScrollPosition",nn="updateScrollValue",rn="beforeCheckboxfilterRenderer",an="refreshCheckbox",on="renderInsertDlg",sn="toggleProtect"},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(53);n.d(t,"a",function(){return r.a});var i=n(56);n.d(t,"b",function(){return i.a});var a=n(66);n.d(t,"c",function(){return a.a});var o=n(65);n.d(t,"d",function(){return o.a});var s=n(69);n.d(t,"e",function(){return s.a});var l=n(60);n.d(t,"f",function(){return l.a});var d=n(61);n.d(t,"g",function(){return d.a});var c=n(52);n.d(t,"h",function(){return c.a});var h=n(64);n.d(t,"i",function(){return h.a});var p=n(67);n.d(t,"j",function(){return p.a});var u=n(58);n.d(t,"k",function(){return u.a});var f=n(68);n.d(t,"l",function(){return f.a});var g=n(70);n.d(t,"m",function(){return g.a});var m=n(59);n.d(t,"n",function(){return m.a});var v=n(55);n.d(t,"o",function(){return v.a});var y=n(54);n.d(t,"p",function(){return y.a});var C=n(63);n.d(t,"q",function(){return C.a});var b=n(57);n.d(t,"r",function(){return b.a});var x=n(62);n.d(t,"s",function(){return x.a});var S=n(34);n.d(t,"t",function(){return S.a});var w=n(51);n.d(t,"u",function(){return w.a})},function(e,t,n){"use strict";var r=n(97);n.d(t,"a",function(){return r.a});var i=n(100);n.d(t,"b",function(){return i.a});var a=n(102);n.d(t,"c",function(){return a.a});var o=n(103);n.d(t,"d",function(){return o.a});var s=n(99);n.d(t,"k",function(){return s.a});var l=n(98);n.d(t,"e",function(){return l.a});var d=n(101);n.d(t,"i",function(){return d.a});var c=n(105);n.d(t,"f",function(){return c.a});var h=n(104);n.d(t,"g",function(){return h.a});var p=n(38);n.d(t,"j",function(){return p.a});var u=n(96);n.d(t,"h",function(){return u.a})},function(e,t,n){"use strict";function r(e){var t,r=[];if(e=e.indexOf("!")>-1?e.split("!")[1]:e,e=-1===e.indexOf(":")?e+":"+e:e,!new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)/g).test(e)){var a=e.split(":");e=n.i(v.isNullOrUndefined)(e.match(/[0-9]/))?a[0]+"1:"+a[1]+"1":"A"+a[0]+":A"+a[1]}return e.split(":").forEach(function(e){t=i(e),r.push(t[0]),r.push(t[1])}),r}function i(e){return[parseInt(e.match(/\d+/)[0],10)-1,a(e.match(/[A-Z]+/i)[0].toUpperCase())]}function a(e){var t=0;e=e.split("").reverse().join("");for(var n=e.length-1;n>=0;n--)t+=(e[n].charCodeAt(0)-64)*Math.pow(26,n);return t-1}function o(e,t){return l(t+1)+(e+1)}function s(e){return o(e[0],e[1])+":"+(n.i(v.isNullOrUndefined)(e[2])?o(e[0],e[1]):o(e[2],e[3]))}function l(e){return e/26>1?l(e%26==0?e/26-1:Math.floor(e/26))+String.fromCharCode(e%26==0?"Z".charCodeAt(0):64+e%26):String.fromCharCode(64+e)}function d(e){return r(c(e))}function c(e){return e.split("!")[1]||e}function h(e){return e.name+"!"+e.selectedRange}function p(e,t){return{sheetIndex:u(e,t),indices:d(t)}}function u(e,t){return t.indexOf("!")>-1?n.i(y.m)(e,n.i(y.n)(t)):e.activeSheetIndex}function f(e){var t=e.slice();return e[0]>e[2]&&g(t,0,2),e[1]>e[3]&&g(t,1,3),t}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e){return e[0]===e[2]&&e[1]===e[3]}t.d=r,t.f=i,t.k=a,t.c=o,t.b=s,t.a=l,t.e=d,t.j=c,t.m=h,t.h=p,t.g=u,t.i=f,t.l=m;var v=n(3),y=(n.n(v),n(4))},function(e,t){e.exports=o},function(e,t){e.exports=s},function(e,t,n){"use strict";var r=n(44);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b}),n.d(t,"c",function(){return r.c}),n.d(t,"d",function(){return r.d});var i=n(46);n.d(t,"e",function(){return i.a});var a=n(45);n.d(t,"f",function(){return a.a}),n.d(t,"g",function(){return a.b}),n.d(t,"h",function(){return a.c});var o=n(23);n.d(t,"i",function(){return o.a}),n.d(t,"j",function(){return o.b}),n.d(t,"k",function(){return o.c})},function(e,t,n){"use strict";var r=n(113);n.d(t,"j",function(){return r.a});var i=n(117);n.d(t,"b",function(){return i.a});var a=n(118);n.d(t,"a",function(){return a.a});var o=n(115);n.d(t,"c",function(){return o.a});var s=n(41);n.d(t,"h",function(){return s.c}),n.d(t,"i",function(){return s.b}),n.d(t,"k",function(){return s.a});var l=n(119);n.d(t,"d",function(){return l.a});var d=n(114);n.d(t,"e",function(){return d.a});var c=n(116);n.d(t,"f",function(){return c.a});var h=n(112);n.d(t,"g",function(){return h.a})},function(e,t){e.exports=l},function(e,t){e.exports=d},function(e,t,n){"use strict";var r=n(43);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b}),n.d(t,"c",function(){return r.c}),n.d(t,"d",function(){return r.d}),n.d(t,"e",function(){return r.e}),n.d(t,"f",function(){return r.f});var i=n(32);n.d(t,"g",function(){return i.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a});var r;!function(e){e[e.na=0]="na",e[e.value=1]="value",e[e.ref=2]="ref",e[e.divzero=3]="divzero",e[e.num=4]="num",e[e.name=5]="name",e[e.null=6]="null"}(r||(r={}));var i;!function(e){e[e.operators_cannot_start_with_expression=0]="operators_cannot_start_with_expression",e[e.reservedWord_And=1]="reservedWord_And",e[e.reservedWord_Xor=2]="reservedWord_Xor",e[e.reservedWord_If=3]="reservedWord_If",e[e.number_contains_2_decimal_points=4]="number_contains_2_decimal_points",e[e.reservedWord_Else=5]="reservedWord_Else",e[e.reservedWord_Not=6]="reservedWord_Not",e[e.invalid_char_in_number=7]="invalid_char_in_number",e[e.invalid_characters_following_with_operator=6]="invalid_characters_following_with_operator",e[e.mismatched_parentheses=8]="mismatched_parentheses",e[e.unknown_formula_name=9]="unknown_formula_name",e[e.requires_a_single_argument=10]="requires_a_single_argument",e[e.requires_3_args=11]="requires_3_args",e[e.invalid_Math_argument=12]="invalid_Math_argument",e[e.requires_2_args=13]="requires_2_args",e[e.bad_index=14]="bad_index",e[e.too_complex=15]="too_complex",e[e.circular_reference=16]="circular_reference",e[e.missing_formula=17]="missing_formula",e[e.improper_formula=18]="improper_formula",e[e.invalid_expression=19]="invalid_expression",e[e.cell_empty=20]="cell_empty",e[e.bad_formula=21]="bad_formula",e[e.empty_expression=22]="empty_expression",e[e.virtual_mode_required=23]="virtual_mode_required",e[e.mismatched_tics=24]="mismatched_tics",e[e.wrong_number_arguments=25]="wrong_number_arguments",e[e.invalid_arguments=26]="invalid_arguments",e[e.iterations_do_not_converge=27]="iterations_do_not_converge",e[e.calculation_overflow=29]="calculation_overflow",e[e.already_registered=28]="already_registered",e[e.missing_sheet=30]="missing_sheet",e[e.cannot_parse=31]="cannot_parse",e[e.expression_cannot_end_with_an_operator=32]="expression_cannot_end_with_an_operator",e[e.spill=33]="spill",e[e.div=34]="div"}(i||(i={}));var a;!function(e){e.xlsx="xlsx",e.xlsm="xlsm",e.xlsb="xlsb",e.xltx="xltx",e.xltm="xltm",e.xls="xls",e.xml="xml",e.xlam="xlam",e.xla="xla",e.xlw="xlw",e.xlr="xlr",e.prn="prn",e.txt="txt",e.csv="csv",e.dif="dif",e.slk="slk"}(a||(a={}))},function(e,t,n){"use strict";var r=n(85);n.d(t,"a",function(){return r.a});var i=n(80);n.d(t,"b",function(){return i.a});var a=n(81);n.d(t,"c",function(){return a.a});var o=n(87);n.d(t,"d",function(){return o.a});var s=n(84);n.d(t,"e",function(){return s.a});var l=n(86);n.d(t,"f",function(){return l.a});var d=n(78);n.d(t,"g",function(){return d.a});var c=n(83);n.d(t,"h",function(){return c.a});var h=n(88);n.d(t,"i",function(){return h.a});var p=n(79);n.d(t,"j",function(){return p.a});var u=n(82);n.d(t,"k",function(){return u.a});var f=n(76);n.d(t,"l",function(){return f.a})},function(e,t,n){"use strict";function r(e,t,r,i,a){var o=n.i(p.j)(r,e);if(!o||!o.cells){if(!i)return a?{}:null;o?r.rows[e].cells=[]:r.rows[e]={cells:[]}}return r.rows[e].cells[t]||(a?{}:null)}function i(e,t,r,i,a){r.rows[e]?r.rows[e].cells||(r.rows[e].cells=[]):r.rows[e]={cells:[]},a&&r.rows[e].cells[t]?n.i(c.extend)(r.rows[e].cells[t],i,null,!0):r.rows[e].cells[t]=i}function a(e,t){var n,r={fontFamily:"Calibri",verticalAlign:"bottom",textIndent:"0pt",backgroundColor:"#ffffff",color:"#000000",textAlign:"left",fontSize:"11pt",fontWeight:"normal",fontStyle:"normal",textDecoration:"none",border:"",borderLeft:"",borderTop:"",borderRight:"",borderBottom:""},i={};return Object.keys(t?r:e).forEach(function(t){(n=e[""+t])!==r[""+t]&&(i[""+t]=n)}),i}function o(e,t,r,i){void 0===t&&(t=!0);for(var a=r.getAddressInfo(e),o=a.indices,s=n.i(u.a)(r,a.sheetIndex),l=a.sheetIndex===r.activeSheetIndex,d=o[0];d<=o[2];d++)for(var c=o[1];c<=o[3];c++)!n.i(h.C)(r,s,{cell:{wrap:t},rowIdx:d,colIdx:c,preventEvt:i})&&l&&r.notify(h.c,{range:[d,c,d,c],wrap:t,sheet:s,initial:!0});r.setProperties({sheets:r.sheets},!0)}function s(e){var t;if(e.indexOf("[")>-1){var n=e.split("[")[1].split("]")[0];l().indexOf(n)>-1&&(t=n)}return t}function l(){return["Black","Blue","Cyan","Green","Magenta","Red","White","Yellow"]}function d(e,t,n,r){var i;return!e.includes("d")&&!e.includes("y")||e.includes("#")||s(e)||(n&&(n.type="date"),r&&e.includes(" ")&&2===e.split(" ").length?e=e.split(" ")[1]:t=!1,i=!0),t&&(e.includes("h")||e.includes("m")||e.includes("s"))&&!e.includes("#")&&!s(e)&&(n&&(n.type=n.type||"",n.type+="time"),i=!0),i}n.d(t,"d",function(){return m}),t.c=r,t.a=i,t.b=a,t.e=o,t.g=s,t.f=l,t.h=d;var c=n(3),h=(n.n(c),n(2)),p=n(4),u=n(26),f=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),g([n.i(c.Collection)([],h.z)],t.prototype,"image",void 0),g([n.i(c.Collection)([],h.A)],t.prototype,"chart",void 0),g([n.i(c.Property)("")],t.prototype,"value",void 0),g([n.i(c.Property)("")],t.prototype,"formula",void 0),g([n.i(c.Property)(0)],t.prototype,"index",void 0),g([n.i(c.Property)("General")],t.prototype,"format",void 0),g([n.i(c.Complex)({},h.B)],t.prototype,"style",void 0),g([n.i(c.Property)("")],t.prototype,"hyperlink",void 0),g([n.i(c.Property)(!1)],t.prototype,"wrap",void 0),g([n.i(c.Property)(!0)],t.prototype,"isLocked",void 0),g([n.i(c.Property)("")],t.prototype,"validation",void 0),g([n.i(c.Property)(1)],t.prototype,"colSpan",void 0),g([n.i(c.Property)(1)],t.prototype,"rowSpan",void 0),t}(c.ChildProperty)},function(e,t,n){"use strict";function r(e,t){for(var n,r=0;r<e.sheets.length;r++)if(e.sheets[r].name.toLowerCase()===t.toLowerCase()){n=r;break}return n}function i(e,t){for(var n,r=0;r<e.sheets.length;r++)if(e.sheets[r].id===t){n=r;break}return n}function a(e){return e.split("!")[0].replace(/\'/gi,"")}function o(e,t,n){for(var r=n.length,i=0;i<r;i++)if(n[i].sheet.toUpperCase()===t.toUpperCase())return n[i].index;return-1}function s(e,t,n,r){void 0===n&&(n={}),e.setSheetPropertyOnMute(n,"selectedRange",r?n.selectedRange+" "+t:t)}function l(e){return e&&e.selectedRange||"A1"}function d(e){return e.selectedRange.split(" ")[0]}function c(e,t){return e.sheets[t]}function h(e){var t=[];e.sheets.forEach(function(e){t.push(e.name.toLowerCase())});for(var n=0;n<t.length;n++){if(!(t.indexOf("sheet"+e.sheetNameCount)>-1))return e.sheetNameCount++;e.sheetNameCount++}return e.sheetNameCount++}function p(e){var t=0;return e.forEach(function(e){t=Math.max(e.id,t)}),t+1}function u(e,t,r){var i=t||e.sheets;i.forEach(function(t){if(t.id=t.id||0,t.name=t.name||"",t.rowCount=n.i(x.isUndefined)(t.rowCount)?100:t.rowCount,t.colCount=n.i(x.isUndefined)(t.colCount)?100:t.colCount,t.topLeftCell=t.topLeftCell||"A1",t.activeCell=t.activeCell||"A1",t.selectedRange=t.selectedRange||t.activeCell+":"+t.activeCell,t.usedRange=t.usedRange||{rowIndex:0,colIndex:0},e.setSheetPropertyOnMute(t,"ranges",t.ranges?t.ranges:[]),e.setSheetPropertyOnMute(t,"rows",t.rows&&n.i(x.extend)([],t.rows,null,!0)||[]),e.setSheetPropertyOnMute(t,"columns",t.columns||[]),t.showHeaders=!!n.i(x.isUndefined)(t.showHeaders)||t.showHeaders,t.showGridLines=!!n.i(x.isUndefined)(t.showGridLines)||t.showGridLines,t.state=t.state||"Visible",t.maxHgts=t.maxHgts||[],t.isImportProtected=t.isProtected&&r,t.protectSettings=t.protectSettings||{selectCells:!1,formatCells:!1,formatRows:!1,formatColumns:!1,insertLink:!1},t.isProtected=t.isProtected||!1,!t.paneTopLeftCell||"A1"===t.paneTopLeftCell){t.frozenRows=t.frozenRows?t.frozenRows:0,t.frozenColumns=t.frozenColumns?t.frozenColumns:0;var i=n.i(b.w)(t.topLeftCell);e.setSheetPropertyOnMute(t,"paneTopLeftCell",n.i(b.i)(t.frozenRows?i[0]+t.frozenRows:i[0],t.frozenColumns?i[1]+t.frozenColumns:i[1]))}n.i(C.a)(t.columns),f(t.rows)}),n.i(C.a)(i,!0,e)}function f(e){e.forEach(function(e){e&&e.cells&&n.i(C.a)(e.cells)}),n.i(C.a)(e)}function g(e,t){return void 0===t&&(t=e.activeSheetIndex),c(e,t).name}function m(e,t,n,i,a){var o=!!n;n=n||[e.activeSheetIndex];var s=g(e);t=y(e.sheets,t,e.activeSheetIndex>t);var l={action:"moveSheet",eventArgs:{position:t,sheetIndexes:n,cancel:!1}};i&&e.trigger("actionBegin",l),l.eventArgs.cancel||(n.forEach(function(n,r){e.sheets.splice(t+r,0,e.sheets.splice(n+(t>n?-1*r:0),1)[0])}),e.setProperties({activeSheetIndex:a?r(e,s):t>n[0]?t-(n.length-1):t},!0),e.notify(b.x,{refresh:o}),i&&(delete l.eventArgs.cancel,e.trigger("actionComplete",l)))}function v(e,t,r,i){t=n.i(x.isUndefined)(t)?e.activeSheetIndex:t;var a={action:"duplicateSheet",eventArgs:{sheetIndex:t,cancel:!1}};if(r&&e.trigger("actionBegin",a),!a.eventArgs.cancel){var o=c(e,t),s=n.i(x.extend)({},o.properties?o.properties:o,{},!0);s.id=p(e.sheets);var l=s.name;/^\(\d+\)$/.test("("+l.split(" (")[1])&&(l=l.split(" (")[0]);var d=[];e.sheets.forEach(function(e){d.push(e.name)});for(var h=2;;h++)if(-1===d.indexOf(l+" ("+h+")")){s.name=l+" ("+h+")";break}e.notify(b.y,{sheetIndex:t,newSheetIndex:t+1}),e.createSheet(t+1,[s]),e.notify(b.j,{action:"addSheet",sheetName:"Sheet"+s.id,visibleName:s.name,sheetId:s.id}),i||e.setProperties({activeSheetIndex:t+1},!0),e.notify(b.x,{refresh:!0,isDuplicate:!0}),r&&(delete a.eventArgs.cancel,e.trigger("actionComplete",a))}}function y(e,t,n){for(var r=t;n?r>=0:r<e.length;n?r--:r++)if("Hidden"!==e[r].state&&"VeryHidden"!==e[r].state){t=r;break}return t}n.d(t,"m",function(){return _}),n.d(t,"n",function(){return I}),n.d(t,"k",function(){return E}),t.d=r,t.j=i,t.e=a,t.i=o,t.o=s,t.p=l,t.q=d,t.a=c,t.c=h,t.b=p,t.f=u,t.l=g,t.g=m,t.h=v;var C=n(39),b=n(2),x=n(3),S=(n.n(x),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),w=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),t.prototype.setProperties=function(t,n){var r=this;if(this.parentObj.isComplexArraySetter&&this.controlParent&&this.controlParent.isAngular)if(Object.keys(t).length){void 0===this.parentObj.currRangeIdx?this.parentObj.currRangeIdx=0:this.parentObj.currRangeIdx+=1;var i=this.parentObj.ranges[this.parentObj.currRangeIdx];i&&i.info&&(this.info=i.info),setTimeout(function(){void 0!==r.parentObj.currRangeIdx&&delete r.parentObj.currRangeIdx})}else if(this.controlParent.tagObjects[0].instance&&this.controlParent.tagObjects[0].instance.hasChanges&&!this.controlParent.tagObjects[0].instance.isInitChanges){var a=this.controlParent.sheets.indexOf(this.parentObj);if(void 0===this.parentObj.changedRangeIdx){for(var o,s=this.controlParent.tagObjects[0].instance.list[a].tagObjects,l=0;l<s.length;l++)if("ranges"===s[l].name){s[l].instance.list.forEach(function(e,t){e.hasChanges&&(o=t)});break}this.parentObj.changedRangeIdx=o}}e.prototype.setProperties.call(this,t,n)},w([n.i(x.Property)(null)],t.prototype,"dataSource",void 0),w([n.i(x.Property)("A1")],t.prototype,"startCell",void 0),w([n.i(x.Property)(null)],t.prototype,"query",void 0),w([n.i(x.Property)(!0)],t.prototype,"showFieldAsHeader",void 0),w([n.i(x.Property)("")],t.prototype,"template",void 0),w([n.i(x.Property)("A1")],t.prototype,"address",void 0),t}(x.ChildProperty),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),w([n.i(x.Property)(0)],t.prototype,"rowIndex",void 0),w([n.i(x.Property)(0)],t.prototype,"colIndex",void 0),t}(x.ChildProperty),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),w([n.i(x.Property)(null)],t.prototype,"rows",void 0),w([n.i(x.Property)(null)],t.prototype,"columns",void 0),w([n.i(x.Complex)({},b.u)],t.prototype,"protectSettings",void 0),w([n.i(x.Collection)([],_)],t.prototype,"ranges",void 0),w([n.i(x.Collection)([],b.v)],t.prototype,"conditionalFormats",void 0),w([n.i(x.Property)(0)],t.prototype,"index",void 0),w([n.i(x.Property)("")],t.prototype,"name",void 0),w([n.i(x.Property)(100)],t.prototype,"rowCount",void 0),w([n.i(x.Property)(100)],t.prototype,"colCount",void 0),w([n.i(x.Property)("A1:A1")],t.prototype,"selectedRange",void 0),w([n.i(x.Property)("A1")],t.prototype,"activeCell",void 0),w([n.i(x.Property)({})],t.prototype,"usedRange",void 0),w([n.i(x.Property)("A1")],t.prototype,"topLeftCell",void 0),w([n.i(x.Property)(!0)],t.prototype,"showHeaders",void 0),w([n.i(x.Property)(!0)],t.prototype,"showGridLines",void 0),w([n.i(x.Property)(!1)],t.prototype,"isProtected",void 0),w([n.i(x.Property)("Visible")],t.prototype,"state",void 0),w([n.i(x.Property)(0)],t.prototype,"frozenRows",void 0),w([n.i(x.Property)(0)],t.prototype,"frozenColumns",void 0),w([n.i(x.Property)("A1")],t.prototype,"paneTopLeftCell",void 0),w([n.i(x.Property)("")],t.prototype,"password",void 0),t}(x.ChildProperty)},function(e,t,n){"use strict";function r(e,t,r,o,s){var l=e.value;return n.i(a.a)(l)?{isNumber:!0,value:l}:(l&&(s&&l.includes(s)&&(e.format.includes(s)||e.format.includes("$"))&&(l=l.replace(s,"")),l.includes(r)&&i(l,t,r,o)&&(l=l.split(r).join("")),"."!==o&&l.includes(o)&&(l=l.replace(o,"."))),{isNumber:n.i(a.a)(l),value:l})}function i(e,t,r,i){for(var a=!1,s=123456,l=s.toLocaleString(t),d=l.split(r).reverse(),c=e.split(i)[0].split(r),h=0;h<c.length&&(a=h===c.length-1?c[h].length===d[0].length:!n.i(o.isUndefined)(d[1])&&(0===h?c[h].length<=d[1].length:c[h].length===d[1].length));h++);return a}t.b=r,t.a=i;var a=n(28),o=n(3);n.n(o)},function(e,t,n){"use strict";function r(e){var t=e.toString();if(e===parseInt(t,10))return parseInt(t,10)+" ";var n=t.indexOf(".")>-1?t.split(".")[1]:0,r=Math.pow(10,n.toString().replace("-","").length),a=Math.abs(i(n,r));return n/a+"/"+r/a}function i(e,t){return e=Number(e),t=Number(t),t?i(t,e%t):e}function a(e){e=Number(e),(e=e>0&&e<1?1+e:0===e?1:e)>60&&(e-=1);var t=new Date("01/01/1900"),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return new Date(new Date(864e5*(e-1)+n).toUTCString().replace(" GMT",""))}function o(e,t,n){var r=new Date("01/01/1900"),i=s(e)?e:new Date(e),a=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),o=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()),l=(o-a)/864e5;return(t?l:parseInt(l.toString(),10))+(n?0:l>60?2:1)}function s(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function l(e){return e-parseFloat(e)>=0}function d(e,t,r,i,a,o){var s,l=h.IntlBase.getDependables(h.cldrData,r,null).dateObject,d=l.dateTimeFormats.availableFormats,c={dateObj:null,isCustom:!1,type:""},p=function(){"time"===c.type&&(c.dateObj=new Date((s?s.toDateString():"01/01/1900")+" "+c.dateObj.toLocaleTimeString()))};if(i&&(c.dateObj=t.parseDate(e,{format:i}),c.dateObj&&(c.type=e.toString().indexOf(":")>-1?"time":"datetime",p(),c.isCustom=!0)),n.i(h.isNullOrUndefined)(c.dateObj)){if((e=e.toString())&&e.indexOf("/")>-1||e.indexOf("-")>0){var u=a&&a.format||i,f=u.includes("dd-MM-yy");if((f||u.includes("dd/MM/yy"))&&(u=f?"d-M-y":"d/M/y",c.dateObj=t.parseDate(e,{format:u,skeleton:"yMd"}),c.dateObj))return c.type="date",c}var g=function(e){if(e.indexOf(":")<0)for(var r=0,i=Object.keys(l.dateFormats);r<i.length;r++){var a=i[r];if(c.dateObj=t.parseDate(e,{format:l.dateFormats[""+a],skeleton:a}),c.dateObj){c.type="date",c.isCustom=!1;break}}if(n.i(h.isNullOrUndefined)(c.dateObj))for(var o=void 0,s=0,u=Object.keys(d);s<u.length;s++){var a=u[s];if(o=d[""+a],c.dateObj=t.parseDate(e,{format:o,skeleton:a}),!c.dateObj&&e.indexOf(":")>-1&&o.indexOf(":")>-1&&(c.dateObj=t.parseDate(e,{format:o.split(" ")[0]})),c.dateObj){c.type=e.toString().indexOf(":")>-1?"time":"datetime",p(),c.isCustom=!0;break}}if(n.i(h.isNullOrUndefined)(c.dateObj))for(var f=0,g=Object.keys(l.timeFormats);f<g.length;f++){var a=g[f];if(c.dateObj=t.parseDate(e,{format:l.timeFormats[""+a],skeleton:a}),c.dateObj){c.type="time",p(),c.isCustom=!1;break}}};if(o){var m=e.split(" ");m.length>=2&&(g(m.shift()),c.dateObj&&(s=c.dateObj,c.dateObj=null,g(m.join(" ")),c.dateObj&&(c.type="datetime")))}else g(e)}return"#DIV/0!"===e||c.dateObj||"Invalid Date"===new Date(e).toString()||(c.dateObj=new Date(e),c.type="date"),c}function c(e){if(e&&"."!==e&&"-"!==e){var t=e.toString();if(t.startsWith("-")&&(t=t.slice(1),t=t.includes("-")?e:t),/^\d*\.?\d*$/.test(t))return parseFloat(e)}return e}t.e=r,t.h=i,t.d=a,t.b=o,t.g=s,t.a=l,t.c=d,t.f=c;var h=n(3);n.n(h)},function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=[]),t.push({member:"dataBind",args:[e]}),t.push({member:"workbookProtectSheet",args:[e]}),e.allowSave&&t.push({member:"workbookSave",args:[e]}),e.allowOpen&&t.push({member:"workbookOpen",args:[e]}),e.allowEditing&&(t.push({member:"workbookEdit",args:[e]}),t.push({member:"workbookFormula",args:[e]})),e.allowNumberFormatting&&t.push({member:"workbookNumberFormat",args:[e]}),e.allowCellFormatting&&t.push({member:"workbookcellformat",args:[e]}),e.allowSorting&&t.push({member:"workbookSort",args:[e]}),e.allowHyperlink&&t.push({member:"workbookHyperlink",args:[e]}),e.allowFiltering&&t.push({member:"workbookFilter",args:[e]}),e.allowFindAndReplace&&t.push({member:"workbookfindAndReplace",args:[e]}),e.allowInsert&&t.push({member:"workbookinsert",args:[e]}),e.allowDelete&&t.push({member:"workbookdelete",args:[e]}),e.allowDataValidation&&t.push({member:"workbookDataValidation",args:[e]}),e.allowMerge&&t.push({member:"workbookmerge",args:[e]}),e.allowCellFormatting&&t.push({member:"workbookConditionalFormatting",args:[e]}),e.allowImage&&t.push({member:"workbookImage",args:[e]}),e.allowChart&&t.push({member:"workbookChart",args:[e]}),e.allowAutoFill&&t.push({member:"workbookautofill",args:[e]}),t}t.a=r},function(e,t){e.exports=c},function(e,t,n){"use strict";var r=n(22);n.d(t,"a",function(){return r.a}),n.d(t,"b",function(){return r.b}),n.d(t,"c",function(){return r.c}),n.d(t,"d",function(){return r.d}),n.d(t,"e",function(){return r.e}),n.d(t,"f",function(){return r.f}),n.d(t,"g",function(){return r.g});var i=n(18);n.d(t,"h",function(){return i.a}),n.d(t,"i",function(){return i.b}),n.d(t,"j",function(){return i.c}),n.d(t,"k",function(){return i.d}),n.d(t,"l",function(){return i.e}),n.d(t,"m",function(){return i.f}),n.d(t,"n",function(){return i.g}),n.d(t,"o",function(){return i.h}),n.d(t,"p",function(){return i.i}),n.d(t,"q",function(){return i.j}),n.d(t,"r",function(){return i.k});var a=n(33);n.d(t,"s",function(){return a.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(22),i=n(18),a=n(3),o=(n.n(a),function(){function e(e){this.emptyStr="",this.storedStringText=this.emptyStr,this.sheetToken="!",this.tokenAdd="a",this.tokenSubtract="s",this.tokenMultiply="m",this.tokenDivide="d",this.tokenLess="l",this.charEm="r",this.charEp="x",this.tokenGreater="g",this.tokenEqual="e",this.tokenLessEq="k",this.tokenGreaterEq="j",this.tokenNotEqual="o",this.tokenAnd="c",this.tokenEm="v",this.tokenEp="t",this.tokenOr=String.fromCharCode(126),this.charAnd="i",this.charLess="<",this.charGreater=">",this.charEqual="=",this.charLessEq="f",this.charGreaterEq="h",this.charNoEqual="z",this.stringGreaterEq=">=",this.stringLessEq="<=",this.stringNoEqual="<>",this.stringAnd="&",this.stringOr="^",this.charOr="w",this.charAdd="+",this.charSubtract="-",this.charMultiply="*",this.charDivide="/",this.fixedReference="$",this.spaceString=" ",this.ignoreBracet=!1,this.isError=!1,this.isFormulaParsed=!1,this.findNamedRange=!1,this.stringsColl=new Map,this.tokens=[this.tokenAdd,this.tokenSubtract,this.tokenMultiply,this.tokenDivide,this.tokenLess,this.tokenGreater,this.tokenEqual,this.tokenLessEq,this.tokenGreaterEq,this.tokenNotEqual,this.tokenAnd,this.tokenOr],this.charNOTop=String.fromCharCode(167),this.specialSym=["~","@","#","?"],this.isFailureTriggered=!1,this.parent=e}return e.prototype.parse=function(e,t){var o=this;if(this.parent.isTextEmpty(e))return e;if(n.i(i.d)(e))return this.parent.getErrorStrings()[i.i.ref];this.parent.getFormulaCharacter()!==String.fromCharCode(0)&&this.parent.getFormulaCharacter()===e[0]&&(e=e.substring(1)),(this.parent.namedRanges.size>0||this.parent.storedData.size>0)&&(e=this.checkForNamedRangeAndKeyValue(e),this.findNamedRange=!1),e=e.replace(/[-+*\/\&\^]+/g,function(e){for(var t="";1<e.length;)switch(e.substring(0,2)){case"++":case"--":e="+"+e.substring(2);break;case"+-":case"-+":e="-"+e.substring(2);break;case"*+":e="*"+e.substring(2);break;case"/+":e="/"+e.substring(2);break;case"^+":e="^"+e.substring(2);break;case"&+":e="&"+e.substring(2);break;case"*-":case"/-":case"^-":case"&-":t=e.substring(0,1),e=e.substring(1);break;default:throw new r.b(o.parent.formulaErrorStrings[i.j.invalid_expression],!0)}return t+e}),e=e.split("-(-").join("(");var s=this.storeStrings(e);e=this.storedStringText;var l=0;if(n.i(a.isNullOrUndefined)(s)&&(e=e.split(" ").join("")),e=e.split("=>").join(">="),e=e.split("=<").join("<="),e[e.length-1]===this.parent.arithMarker&&this.indexOfAny(e,this.tokens)===e.length-2||(e=e.toUpperCase()),e.indexOf(this.sheetToken)>-1){var d=this.parent.getSheetFamilyItem(this.parent.grid);if(null!=d.sheetNameToParentObject&&d.sheetNameToParentObject.size>0){e[0]!==this.sheetToken.toString()&&(e=this.parent.setTokensForSheets(e));var c=this.parent.getSheetToken(e.split(this.parent.tic).join(this.emptyStr)),h=this.checkScopedRange(e.split('"').join(this.emptyStr).split(this.sheetToken).join(""));n.i(a.isNullOrUndefined)(c)&&""!==c&&this.parent.namedRanges.size>0&&""!==h&&(e=h)}}e=this.markLibraryFormulas(e);try{e=this.formulaAutoCorrection(e)}catch(n){var p={message:n.message,exception:n,isForceCalculable:n.formulaCorrection,computeForceCalculate:!1};if(!p.isForceCalculable)throw this.parent.formulaErrorStrings[i.j.invalid_expression];if(this.isFailureTriggered||(this.parent.trigger("onFailure",p),this.isFailureTriggered=!0),!p.isForceCalculable||!p.computeForceCalculate)throw this.parent.formulaErrorStrings[i.j.invalid_expression];e=this.formulaAutoCorrection(e,p),this.parent.storedData.get(t).formulaText="="+e}if(!this.ignoreBracet)for(l=e.indexOf(")");l>-1;){var u=e.substring(0,l).lastIndexOf("(");if(-1===u)throw new r.b(this.parent.formulaErrorStrings[i.j.mismatched_parentheses]);if(u===l-1)throw new r.b(this.parent.formulaErrorStrings[i.j.empty_expression]);var f=this.emptyStr;f=this.ignoreBracet?this.parent.substring(e,u,l-u+1):this.parent.substring(e,u+1,l-u-1);try{e=e.substring(0,u)+this.parseSimple(f)+e.substring(l+1)}catch(e){var p=this.exceptionArgs(e);this.isFailureTriggered||(this.parent.trigger("onFailure",p),this.isFailureTriggered=!0);var g="string"==typeof p.exception?p.exception:p.message;return(this.parent.getErrorLine(e)?"":"#"+this.parent.getErrorLine(e)+": ")+g}l=e.indexOf(")")}if(!this.ignoreBracet&&e.indexOf("(")>-1)throw new r.b(this.parent.formulaErrorStrings[i.j.mismatched_parentheses]);return e=this.parseSimple(e),null!==s&&s.size>0&&(e=this.setStrings(e,s)),e},e.prototype.exceptionArgs=function(e){return{message:e.message,exception:e,isForceCalculable:e.formulaCorrection,computeForceCalculate:!1}},e.prototype.formulaAutoCorrection=function(e,t){var o=["*","+","-","/","^","&"],s=[">","=","<"],l=0,d="",c="",h="",p="",u="",f="",g="",m=0;if(this.parent.formulaErrorStrings.indexOf(e)>-1)return e;if(this.indexOfAny(e,this.specialSym)>-1)throw new r.b(this.parent.formulaErrorStrings[i.j.invalid_expression],!1);for(;l<e.length;)if(e=e.split("-*").join("-").split("/*").join("/").split("*/").join("*").split("-/").join("-").split("*+").join("*").split("+*").join("+"),this.parent.isDigit(e[l])&&e.length>l+1&&this.indexOfAny(e[l+1],o)>-1&&e.length>l+2&&!n.i(a.isNullOrUndefined)(e[l+2])&&this.indexOfAny(e[l+2],o)>-1&&("-"!==e[l+2]||"*"!==e[l+1]&&"/"!==e[l+1]&&"^"!==e[l+1]&&"&"!==e[l+1])){if(!t||!t.computeForceCalculate)throw this.parent.formulaErrorStrings[i.j.improper_formula];this.parent.isDigit(e[l])?(m<1?(f=e[l],h=e[l+1],n.i(a.isNullOrUndefined)(h)&&(h=this.emptyStr),h="&"===h?"":h,m+=1,d=d+f+h):m<2&&(g=e[l],p=e[l-1],u=e[l+1],m=0,"-"===p?(u=n.i(a.isNullOrUndefined)(u)?this.emptyStr:u,u="&"===u?"":u,d=d+p+g+u):(u=n.i(a.isNullOrUndefined)(u)?this.emptyStr:u,d=d+g+u)),l+=2):(d="-"===e[l]?d+e[l]:d,l+=1)}else if((this.parent.isDigit(e[l])||e[l]===this.parent.rightBracket||this.parent.storedData.has(e[l].toUpperCase()))&&(n.i(a.isNullOrUndefined)(e[l+1])||this.indexOfAny(e[l+1],o)>-1))c=n.i(a.isNullOrUndefined)(e[l+1])?this.emptyStr:e[l+1],c="&"===c&&"-"!==e[l+2]?"":c,d="-"===e[l-1]?d+e[l-1]+e[l]+c:d+e[l]+c,l+=2;else if(this.indexOfAny(e[l],s)>-1&&!n.i(a.isNullOrUndefined)(e[l-1])&&!n.i(a.isNullOrUndefined)(e[l+1]))d+=e[l],l+=1;else if("q"===e[l])for(;e[l]!==this.parent.leftBracket;)d+=e[l],l+=1;else e[l]===this.parent.leftBracket||e[l]===this.parent.rightBracket||"{"===e[l]||"}"===e[l]||"("===e[l]||")"===e[l]?(d+=e[l],l+=1):this.parent.isUpperChar(e[l])||e[l].indexOf(":")>-1||e[l]===this.parent.getParseArgumentSeparator()||"%"===e[l]&&this.parent.isDigit(e[l-1])?(d+=e[l],l+=1):e[l]===this.parent.tic||" "===e[l]||e[l]===this.parent.getParseDecimalSeparator()||e[l]===this.sheetToken||"$"===e[l]||"_"===e[l]?(d+=e[l],l+=1):(this.parent.isDigit(e[l])&&(d="-"===e[l-1]?d+e[l-1]+e[l]:d+e[l]),"-"!==e[l]&&"+"!==e[l]||(d+=e[l],d=d.split("++").join("+").split("+-").join("-").split("-+").join("-")),"/"!==e[l]&&"*"!==e[l]&&"^"!==e[l]||(d+=e[l]),l+=1);return d=d===this.emptyStr?e:d,this.indexOfAny(d[d.length-1],o)>-1&&(d=d.substring(0,d.length-1)),d=d.split("--").join("-").split("-+").join("-").split("+-").join("-")},e.prototype.checkScopedRange=function(e){var t=this,r=this.emptyStr,i="NaN",o=this.parent.getSheetID(this.parent.grid),s=this.parent.getSheetFamilyItem(this.parent.grid);if(e[0]===this.sheetToken.toString()){var l=e.indexOf(this.sheetToken,1),d=parseInt(e.substr(1,l-1),10);l>1&&!this.parent.isNaN(d)&&(e=e.substring(l+1),o=d)}var c="!"+o.toString();return null===s||null==s.sheetNameToToken?i:(s.sheetNameToToken.forEach(function(o,l){if(s.sheetNameToToken.get(l).toString()===c+"!"){var d=t.emptyStr;t.parent.namedRanges.forEach(function(o,l){d=n.i(a.isNullOrUndefined)(t.parent.parentObject)?s.sheetNameToToken.get(l).toUpperCase():t.parent.parentObject.getActiveSheet().name+t.sheetToken+e.toUpperCase(),t.parent.getNamedRanges().has(d)&&(r=t.parent.getNamedRanges().get(d).toUpperCase(),i=r)})}}),i)},e.prototype.storeStrings=function(e){var t,n=0,a=0,o=0,s="",l=null;if(e.indexOf(this.parent.tic)>-1)for(n=e.indexOf(this.parent.tic);n>-1&&e.length>0;){if(null===l&&(l=this.stringsColl),-1===(a=n+1<e.length?e.indexOf(this.parent.tic,n+1):-1))throw new r.b(this.parent.formulaErrorStrings[i.j.mismatched_tics]);t=this.parent.substring(e,n,a-n+1),s=this.parent.tic+this.spaceString+o.toString()+this.parent.tic,l=l.set(s,t),e=e.substring(0,n)+s+e.substring(a+1),n+=s.length,n<=e.length&&(n=e.indexOf(this.parent.tic,n)),o++}return this.storedStringText=e,l},e.prototype.setStrings=function(e,t){for(var n=0;n<t.size;n++)t.forEach(function(t,n){e=e.split(n).join(t)});return e},e.prototype.parseSimple=function(e){var t=!0,n=e;if(n.length>0&&"+"===n[0]&&(n=n.substring(1)),"#DIV/0!"===n)return"#DIV/0!";if("#NAME?"===n)return"#NAME?";if(""===n)return n;if(this.parent.formulaErrorStrings.indexOf(n)>-1)return n;n=n.split(this.stringLessEq).join(this.charLessEq),n=n.split(this.stringGreaterEq).join(this.charGreaterEq),n=n.split(this.stringNoEqual).join(this.charNoEqual),n=n.split(this.stringAnd).join(this.charAnd),n=n.split(this.stringOr).join(this.charOr),n=n.split(this.fixedReference).join(this.emptyStr),t=!0;var r=[this.tokenEp,this.tokenEm],i=[this.tokenMultiply,this.tokenDivide],a=[this.tokenAdd,this.tokenSubtract],o=[this.charMultiply,this.charDivide],s=[this.charAdd,this.charSubtract],l=[this.tokenLess,this.tokenGreater,this.tokenEqual,this.tokenLessEq,this.tokenGreaterEq,this.tokenNotEqual],d=[this.charLess,this.charGreater,this.charEqual,this.charLessEq,this.charGreaterEq,this.charNoEqual],c=[this.charEp,this.charEm],h=[this.tokenAnd],p=[this.charAnd],u=[this.charOr],f=[this.tokenOr];return n=this.parseSimpleOperators(n,r,c),n=this.parseSimpleOperators(n,f,u),t&&(n=this.parseSimpleOperators(n,i,o)),t&&(n=this.parseSimpleOperators(n,a,s)),t&&(n=this.parseSimpleOperators(n,l,d)),t&&(n=this.parseSimpleOperators(n,h,p)),n},e.prototype.parseSimpleOperators=function(e,t,o){if(this.parent.getErrorStrings().indexOf(e)>-1)return e;for(var s=e,l=0,d="",c=0;c<o.length;c++)d+=o[c];if(s=s.split("---").join("-").split("--").join("+").split(this.parent.getParseArgumentSeparator()+"-").join(this.parent.getParseArgumentSeparator()+"u").split(this.parent.leftBracket+"-").join(this.parent.leftBracket+"u").split("=-").join("=u"),s=s.split(",+").join(",").split(this.parent.leftBracket+"+").join(this.parent.leftBracket).split("=+").join("=").split(">+").join(">").split("<+").join("<").split("/+").join("/").split("*+").join("*").split("++").join("+").split("*-").join("*u").split("/-").join("/u").split("w-").join("wu").split("i-").join("iu").toString(),s.length>0&&"-"===s[0])s=s.substring(1).split("-").join(this.tokenOr),s="0-"+s,s=this.parseSimpleOperators(s,[this.tokenSubtract],[this.charSubtract]),s=s.split(this.tokenOr).join("-");else if(s.length>0&&s.indexOf("u")>-1){for(var h=s.split(this.parent.getParseArgumentSeparator()),p=0;p<h.length;p++)if(h[p].startsWith("u")){var u=h[p].split("u").join("0-");u=this.parseSimpleOperators(u,[this.tokenSubtract],[this.charSubtract]),h[p]=u}s=h.join(this.parent.getParseArgumentSeparator())}else s.length>0&&"+"===s[0]?s=s.substring(1):s.length>0&&"+"===s[s.length-1]&&(s=s.substring(0,s.length-1));try{if(this.indexOfAny(s,o)>-1){if(s.includes(" ")){for(var f="",g=0;g<s.length;g++){var m=s[g];if(o.indexOf(m)>=0)f=f.trim()+m;else{if(" "===m&&o.indexOf(f[f.length-1])>=0)continue;f+=m}}s=f}l=this.indexOfAny(s,o);for(var v=this.parent.getParseDecimalSeparator();l>-1;){var y="",C="",b=0,x=0,S=!1,w=["*","+","-","/","w","=","<",">"],_=s[l]===this.charNOTop,I=0;if(_)b=l;else if(I=l-1,s[I]===this.parent.arithMarker){var E=this.findLeftMarker(s.substring(0,I-1));if(E<0)throw new r.b(this.parent.formulaErrorStrings[i.j.cannot_parse]);y=this.parent.substring(s,E+1,I-E-1),b=E+1}else if(s[I]===this.parent.rightBracket){for(var R=0,E=I-1;E>0&&("q"!==s[E]||0!==R);)"q"===s[E]?R--:s[E]===this.parent.rightBracket&&R++,E--;if(E<0)throw new r.b(this.parent.formulaErrorStrings[i.j.cannot_parse]);y=this.parent.substring(s,E,I-E+1),b=E}else if(s[I]===this.parent.tic[0]){var k=s.substring(0,I-1).lastIndexOf(this.parent.tic);if(k<0)throw new r.b(this.parent.formulaErrorStrings[i.j.cannot_parse]);y=this.parent.substring(s,k,I-k+1),b=k}else{for(var A=!1;I>-1&&(this.parent.isDigit(s[I])||!A&&(s[I]===v||"%"===s[I]));)this.parent.isDigit(s[I])||"%"===s[I]||(A=!0),I-=1;if(I>-1&&A&&s[I]===v)throw new r.b(this.parent.formulaErrorStrings[i.j.number_contains_2_decimal_points]);if(0===(I+=1)||I>0&&!this.parent.isUpperChar(s[I-1]))y="n"+this.parent.substring(s,I,l-I),b=I;else if(I>0&&"E"===s[I-1]&&("TRUE"===s.substring(I-4,I)&&(n.i(a.isNullOrUndefined)(s[I-5])||w.indexOf(s[I-5])>-1)||"FALSE"===s.substring(I-5,I)&&(n.i(a.isNullOrUndefined)(s[I-6])||w.indexOf(s[I-6])>-1))&&("TRUE"===s.substring(I+1,I+5)||"FALSE"===s.substring(I+1,I+6)))I="TRUE"===s.substring(I-4,I)?I-4:I-5,y="TRUE"===s.substring(I,l)?"n1":"FALSE"===s.substring(I,l)?"n0":y,b=I,S=!0;else{for(I-=1;I>-1&&(this.parent.isUpperChar(s[I])||this.parent.isDigit(s[I]));)I-=1;if(I>-1&&s[I]===this.sheetToken){for(I-=1;I>-1&&s[I]!==this.sheetToken;)I-=1;I>-1&&s[I]===this.sheetToken&&(I-=1)}if(I>-1&&":"===s[I]){for(I-=1;I>-1&&this.parent.isDigit(s[I]);)I-=1;for(;I>-1&&this.parent.isUpperChar(s[I]);)I-=1;if(I>-1&&s[I]===this.sheetToken){for(I--;I>-1&&s[I]!==this.sheetToken;)I--;I>-1&&s[I]===this.sheetToken&&I--}I+=1,y=this.parent.substring(s,I,l-I),y=this.parent.getCellFrom(y)}else{var F=!1;I>0&&!this.parent.isUpperChar(s[I])&&(F="u"===s[I]&&s[I-1]===this.parent.getParseArgumentSeparator()),F||(I+=1),y=this.parent.substring(s,I,l-I)}this.parent.updateDependentCell(y),b=I}(this.parent.namedRanges.size>0&&this.parent.namedRanges.has(y.toUpperCase())||this.parent.storedData.has(y.toUpperCase()))&&(y="n"+this.checkForNamedRangeAndKeyValue(y))}if(l===s.length-1)throw new r.b(this.parent.formulaErrorStrings[i.j.expression_cannot_end_with_an_operator]);I=l+1;var F="u"===s[I];if(F&&(I+=1),s[I]===this.parent.tic[0]){var E=s.substring(I+1).indexOf(this.parent.tic);if(E<0)throw this.parent.formulaErrorStrings[i.j.cannot_parse];C=this.parent.substring(s,I,E+2),x=E+I+2}else if(s[I]===this.parent.arithMarker){var E=this.findRightMarker(s.substring(I+1));if(E<0)throw new r.b(this.parent.formulaErrorStrings[i.j.cannot_parse]);C=this.parent.substring(s,I+1,E),x=E+I+2}else if("q"===s[I]){for(var R=0,E=I+1;E<s.length&&(s[E]!==this.parent.rightBracket||0!==R);)s[E]===this.parent.rightBracket?R++:"q"===s[E]&&R--,E++;if(E===s.length)throw this.parent.formulaErrorStrings[i.j.cannot_parse];C=this.parent.substring(s,I,E-I+1),F&&(C="u"+C),x=E+1}else if(this.parent.isDigit(s[I])||s[I]===v){var A=s[I]===v;for(I+=1;I<s.length&&(this.parent.isDigit(s[I])||!A&&s[I]===v);)s[I]===v&&(A=!0),I+=1;if(I<s.length&&"%"===s[I]&&(I+=1),A&&I<s.length&&s[I]===v)throw this.parent.formulaErrorStrings[i.j.number_contains_2_decimal_points];C="n"+this.parent.substring(s,l+1,I-l-1),x=I}else if(this.parent.isUpperChar(s[I])||s[I]===this.sheetToken||"u"===s[I]){if(s[I]===this.sheetToken)for(I+=1;I<s.length&&s[I]!==this.sheetToken;)I+=1;I+=1;for(var N=0,T=!1;I<s.length&&(this.parent.isUpperChar(s[I])||"_"===s[I]||s[I]===v||"["===s[I]||"]"===s[I]||"#"===s[I]||" "===s[I]||"%"===s[I]||s[I]===v&&T);)I!==s.length-1&&"["===s[I]&&"["===s[I+1]&&(T=!0),I!==s.length-1&&"]"===s[I]&&"]"===s[I+1]&&(T=!1),I++,N++;var O=I===s.length||!this.parent.isDigit(s[I]);if(N>1){for(;I<s.length&&(this.parent.isUpperChar(s[I])||this.parent.isDigit(s[I])||" "===s[I]||"_"===s[I]);)I++;O=!0}for(;I<s.length&&this.parent.isDigit(s[I]);)I+=1;if(I<s.length&&":"===s[I]){if((I+=1)<s.length&&s[I]===this.sheetToken){for(I++;I<s.length&&s[I]!==this.sheetToken;)I+=1;I<s.length&&s[I]===this.sheetToken&&I++}for(;I<s.length&&this.parent.isUpperChar(s[I]);)I+=1;for(;I<s.length&&this.parent.isDigit(s[I]);)I+=1;I-=1,C=this.parent.substring(s,l+1,I-l),C=this.parent.getCellFrom(C)}else I-=1,C=this.parent.substring(s,l+1,I-l),(F="u"===s[I])&&(C="u"+C);O&&C.startsWith(this.sheetToken)&&(O=!this.parent.isCellReference(C)),O||this.parent.updateDependentCell(C),(this.parent.namedRanges.size>0&&this.parent.namedRanges.has(C.toUpperCase())||this.parent.storedData.has(C.toUpperCase()))&&(C="n"+this.checkForNamedRangeAndKeyValue(C));var D=["*","+","-","/","w"].indexOf(s[I-C.length])>-1;C="TRUE"===C&&(S||D)?"n1":"FALSE"===C&&(S||D)?"n0":C,x=I+1}var L=d.indexOf(s[l]),P=this.parent.arithMarker+y+C+t[L]+this.parent.arithMarker;b>0&&(P=s.substring(0,b)+P),x<s.length&&(P+=s.substring(x)),P=P.split(this.parent.arithMarker2).join(this.parent.arithMarker.toString()),s=P,l=this.indexOfAny(s,o)}}else if(s.length>0&&(this.parent.isUpperChar(s[0])||s[0]===this.sheetToken)){for(var M=!0,B=!0,H=!1,U=s.length,E=0;E<U;++E)if(s[E]===this.sheetToken){if(E>0&&!H)throw this.parent.getErrorStrings()[i.i.ref];for(H=!0,E++;E<U&&this.parent.isDigit(s[E]);)E++;if(E===U||s[E]!==this.sheetToken){M=!1;break}}else{if(!B&&this.parent.isChar(s[E])){M=!1;break}if(!this.parent.isChar(s[E])&&!this.parent.isDigit(s[E])&&s[E]!==this.sheetToken){M=!1;break}B=this.parent.isUpperChar(s[E])}M&&this.parent.updateDependentCell(s)}return s}catch(e){return e}},e.prototype.indexOfAny=function(e,t){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return n;return-1},e.prototype.findLeftMarker=function(e){var t=-1;if(e.indexOf(this.parent.arithMarker)>-1)for(var n=0,r=e.length-1;r>=0;--r)if(e[r]===this.parent.rightBracket)n--;else if(e[r]===this.parent.leftBracket)n++;else if(e[r]===this.parent.arithMarker&&0===n){t=r;break}return t},e.prototype.findRightMarker=function(e){var t=-1;if(e.indexOf(this.parent.arithMarker)>-1)for(var n=0,r=0;r<e.length;++r)if(e[r]===this.parent.rightBracket)n--;else if(e[r]===this.parent.leftBracket)n++;else if(e[r]===this.parent.arithMarker&&0===n){t=r;break}return t},e.prototype.parseFormula=function(e,t){if(e.length>0&&e[0]===this.parent.getFormulaCharacter()&&(e=e.substring(1)),e.indexOf("#REF!")>-1)return this.parent.getErrorStrings()[i.i.ref];e.length>0&&"+"===e[0]&&(e=e.substring(1));try{this.isFailureTriggered=!1,this.isError=!1,e=this.parse(e.trim(),t),this.isFormulaParsed=!0}catch(t){var r=this.exceptionArgs(t);this.isFailureTriggered||(this.parent.trigger("onFailure",r),this.isFailureTriggered=!0);var o="string"==typeof r.exception?r.exception:r.message;e=(n.i(a.isNullOrUndefined)(this.parent.getErrorLine(t))?"":"#"+this.parent.getErrorLine(t)+": ")+o,this.isError=!0}return e},e.prototype.markLibraryFormulas=function(e){var t=0,o=e.indexOf(")");if(-1===o)e=this.markNamedRanges(e);else for(;o>-1;){for(var s=0,l=o-1;l>-1&&("("!==e[l]||0!==s);)")"===e[l]&&s++,l--;if(-1===l)throw new r.b(this.parent.formulaErrorStrings[i.j.mismatched_parentheses]);for(var d=l-1;d>-1&&this.parent.isChar(e[d]);)d--;var c=l-d-1,h=this.parent.substring(e,d+1,c);if(c>0&&!n.i(a.isNullOrUndefined)(this.parent.getFunction(h))){var p=this.parent.substring(e,l,o-l+1),u=this.parent.getParseArgumentSeparator();if("AREAS"===h)this.ignoreBracet=!0;else if(this.ignoreBracet=!1,h.includes("IFS")&&"COUNTIFS"!==h&&p.includes("{")){var f=p.indexOf("{"),g=this.parent.substring(p,f,p.indexOf("}")-f+1);p=p.split(g).join(g.split(u).join(this.parent.tic+this.parent.tic))}try{var m=void 0;p=p.split("(").join("").split(")").join(""),p="("+this.formulaAutoCorrection(p,m)+")"}catch(e){var m={message:e.message,exception:e,isForceCalculable:e.formulaCorrection,computeForceCalculate:!1};if(!m.isForceCalculable)throw this.parent.formulaErrorStrings[i.j.improper_formula];if(this.isFailureTriggered||(this.parent.trigger("onFailure",m),this.isFailureTriggered=!0,t+=1),m.computeForceCalculate=t>0||m.computeForceCalculate,!m.isForceCalculable)throw this.parent.formulaErrorStrings[i.j.improper_formula];if(!m.computeForceCalculate)throw this.parent.formulaErrorStrings[i.j.improper_formula];p=p.split("(").join("").split(")").join(""),p="("+this.formulaAutoCorrection(p,m)+")"}p=this.markNamedRanges(p),p=this.swapInnerParens(p),p=this.addParensToArgs(p);var v=p.lastIndexOf(u);-1===v&&p.length>2&&"("===p[0]&&")"===p[p.length-1]&&"{"!==p[1]&&"("!==p[1]&&(p=p.substring(0,p.length-1)+"}"+p.substring(p.length-1),p=p[0]+"{"+p.substring(1)),e=e.substring(0,d+1)+"q"+this.parent.substring(e,d+1,c)+p.split("(").join(this.parent.leftBracket).split(")").join(this.parent.rightBracket)+e.substring(o+1)}else{if(c>0)return this.parent.getErrorStrings()[i.i.name];var y=this.emptyStr;l>0&&(y=e.substring(0,l)),y=y+"{"+this.parent.substring(e,l+1,o-l-1)+"}",o<e.length&&(y+=e.substring(o+1)),y=this.markNamedRanges(y),e=y}o=e.indexOf(")")}return e=e.split("{").join("(").split("}").join(")")},e.prototype.swapInnerParens=function(e){return e.length>2&&(e=e[0]+e.substr(1,e.length-2).split("(").join("{").split(")").join("}")+e[e.length-1]),e},e.prototype.addParensToArgs=function(e){if(0===e.length)return this.emptyStr;var t=[];t.push(this.parent.getParseArgumentSeparator()),t.push(this.parent.rightBracket);var n=e.lastIndexOf(this.parent.getParseArgumentSeparator()),r=0;if(-1===n){if(e.length>2&&"("===e[0]&&")"===e[e.length-1])if("{"!==e[1]&&"("!==e[1])e=e.substring(0,e.length-1)+"}"+e.substring(e.length-1),e=e[0]+"{"+e.substring(1);else{var i=["+","-","*","/"];n=this.lastIndexOfAny(e,i),0===r&&")"===e[e.length-1]&&(r=e.length-1),r>0&&"{"!==e[n+1]&&"}"===e[n-1]&&(e=e.substr(0,r)+"}"+e.substr(r),e=e.substr(0,n+1)+"{"+e.substr(n+1))}}else for(var a=!0;n>-1;){var o=this.indexOfAny(e.substring(n+1,e.length),t);o>=0?o=n+o+1:-1===o&&")"===e[e.length-1]&&(o=e.length-1),o>0&&"{"!==e[n+1]&&"}"!==e[o-1]&&"¢"!==e[o-1]&&(e=e.substr(0,o).trim()+"}"+e.substr(o),e=e.substr(0,n+1)+"{"+e.substr(n+1).trim()),n=e.substr(0,n).lastIndexOf(this.parent.getParseArgumentSeparator()),a&&-1===n&&"("===e[0]&&(n=0,a=!1)}return e=e.split("{}").join(this.emptyStr)},e.prototype.lastIndexOfAny=function(e,t){for(var n=e.length-1;n>-1;n--)if(t.indexOf(e[n])>-1)return n;return-1},e.prototype.markNamedRanges=function(e){var t=[")",this.parent.getParseArgumentSeparator(),"}","+","-","*","/","<",">","=","&",":"],r=e.length>0&&("("===e[0]||"{"===e[0])?1:0;e.indexOf("#N/A")>-1&&(e=e.split("#N/A").join("#N~A")),e.indexOf("#DIV/0!")>-1&&(e=e.split("#DIV/0!").join("#DIV~0!"));for(var i=this.indexOfAny(e.substring(r),t);i>-1&&i+r<e.length;){var o=this.emptyStr,s=null;if(this.parent.substring(e,r,i).indexOf("[")>-1?s=this.getTableRange(this.parent.substring(e,r,i)):this.parent.storedData.has(this.parent.substring(e,r,i))?s=this.checkForNamedRangeAndKeyValue(this.parent.substring(e,r,i)):this.parent.namedRanges.has(this.parent.substring(e,r,i))&&(s=this.checkForNamedRangeAndKeyValue(this.parent.substring(e,r,i))),n.i(a.isNullOrUndefined)(s)&&(o=this.checkScopedRange(this.parent.substring(e,r,i)),"NaN"!==o?(this.findNamedRange=!0,s=o):this.parent.substring(e,r,i).startsWith(this.sheetToken.toString()),!n.i(a.isNullOrUndefined)(s)&&this.findNamedRange&&s.indexOf(this.fixedReference)>-1&&(s=s.split(this.fixedReference).join(this.emptyStr))),n.i(a.isNullOrUndefined)(s)||(s=s.toUpperCase(),s=this.parent.setTokensForSheets(s),s=this.markLibraryFormulas(s)),n.i(a.isNullOrUndefined)(s)||s===this.emptyStr)for(r+=i+1;r<e.length&&!this.parent.isUpperChar(e[r])&&e[r]!==this.sheetToken;)r++;else e=e.substring(0,r)+s+e.substring(r+i),r+=s.length+1;for(i=r,r<e.length-1&&"{"===e[r]&&(r+=1),i=this.indexOfAny(e.substring(r),t);0===i&&r<e.length-1;)r++,i=this.indexOfAny(e.substring(r),t);if((-1===i||e.substring(r).indexOf("[")>-1)&&r<e.length){if(s=e.substring(r).indexOf("[")>-1?this.getTableRange(e.substring(r)):this.parent.storedData.has(e.substring(r))?this.parent.storedData.size>0?this.checkForNamedRangeAndKeyValue(e.substring(r)):s:this.parent.namedRanges.size>0?this.checkForNamedRangeAndKeyValue(e.substring(r)):s,n.i(a.isNullOrUndefined)(s)&&"NaN"!==(o=this.checkScopedRange(e.substring(r)))&&(s=o),!n.i(a.isNullOrUndefined)(s)&&s!==this.emptyStr&&(s=s.toUpperCase(),s=this.parent.setTokensForSheets(s),null!=(s=this.markLibraryFormulas(s)))){var l=e.substring(r);e=")"===l[l.length-1]?e.substring(0,r)+s+")":e.substring(0,r)+s,r+=s.toString().length+1}i=r<e.length?this.indexOfAny(e.substring(r),t):-1}}return e.indexOf("#N~A")>-1&&(e=e.split("#N~A").join("#N/A")),e.indexOf("#DIV~0!")>-1&&(e=e.split("#DIV~0!").join("#DIV/0!")),e},e.prototype.checkForNamedRangeAndKeyValue=function(e){var t=this.emptyStr;if(e.indexOf("[")>-1){var r=this.getTableRange(e);n.i(a.isNullOrUndefined)(r)||(this.findNamedRange=!0,e=r)}if("NaN"!==(t=this.checkScopedRange(e)))this.findNamedRange=!0,e=t;else{if(e.indexOf(this.sheetToken)>-1){var i=this.parent.getSheetFamilyItem(this.parent.grid),o=e.split('"').join(this.emptyStr);if(o=o.substr(0,o.indexOf(this.sheetToken)),i.sheetNameToToken.has(o.toUpperCase())){parseInt(i.sheetNameToToken.get(o.toUpperCase()).split(this.sheetToken).join(this.emptyStr))}}this.parent.storedData.size>0&&this.parent.storedData.has(e)&&(e="A"+this.parent.colIndex(e)),this.parent.namedRanges.size>0&&this.parent.namedRanges.has(e.toUpperCase())&&(n.i(a.isNullOrUndefined)(this.parent.parentObject)?(e=this.parse(this.parent.namedRanges.get(e.toUpperCase())),e=this.parent.setTokensForSheets(e),e.indexOf(this.fixedReference)>-1&&e.split(this.fixedReference).join(this.emptyStr),this.findNamedRange=!0):e=this.parse(this.parent.namedRanges.get(e.toUpperCase()))),this.findNamedRange&&"!"!==e[0]&&"q"!==e[0]&&"bq"!==e[0]&&(e=this.parent.setTokensForSheets(e),e.indexOf(this.fixedReference)>-1&&(e=e.split(this.fixedReference).join(this.emptyStr)))}return e},e.prototype.getTableRange=function(e){e=e.replace(" ",this.emptyStr).toUpperCase();var t=e.replace("]",this.emptyStr).replace("#DATA",this.emptyStr);t.indexOf(this.parent.getParseArgumentSeparator())>-1&&(t.substring(0,t.indexOf(this.parent.getParseArgumentSeparator())).replace("[",this.emptyStr),t=t.replace("[",this.emptyStr).replace(this.parent.getParseArgumentSeparator(),"_"));this.emptyStr;return t.toUpperCase()},e.prototype.findNextEndIndex=function(e,t){for(var n=0,r=t,i=!1;!i&&t<e.length;)"["===e[r]?n++:"]"===e[r]&&0===--n&&(i=!0),t++;return t-=r},e}())},function(e,t,n){"use strict";var r=n(47);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(1),i=n(4),a=n(0),o=n(2),s=n(3),l=(n.n(s),n(10)),d=(n.n(l),n(11)),c=(n.n(d),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(a._120,this.applyCF,this),this.parent.on(r._61,this.renderCFDlg,this),this.parent.on(o._74,this.clearCF,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._120,this.applyCF),this.parent.off(r._61,this.renderCFDlg),this.parent.off(o._74,this.clearCF))},e.prototype.clearCF=function(e){var t=this,r=this.parent.getActiveSheet(),i=function(e,r,i,a){n.i(s.removeClass)([a],["e-redft","e-yellowft","e-greenft","e-redf","e-redt","e-iconset"]);var l,d;["backgroundColor","color"].forEach(function(n){a.style[""+n]&&(a.style[""+n]="",(l=i&&i.style&&i.style[""+n]||t.parent.commonCellStyle[""+n])&&(d={},d[""+n]=l,t.parent.notify(o.f,{style:d,rowIdx:e,colIdx:r,td:a})))});var c;[".e-cf-databar",".e-iconsetspan"].forEach(function(e){(c=a.querySelector(e))&&(a.removeChild(c),a.textContent=t.parent.getDisplayText(i))})};this.updateRange(r,e.indexes,this.parent.frozenRowCount(r),this.parent.frozenColCount(r),n.i(a.U)(r.topLeftCell),i)},e.prototype.renderCFDlg=function(e){var t=this,i=this.parent.serviceLocator.getService(r._174),a=this.parent.serviceLocator.getService(r._175);a.show({width:375,showCloseIcon:!0,isModal:!0,cssClass:"e-conditionalformatting-dlg",header:e.action.replace("...",""),beforeOpen:function(){a.dialogInstance.content=t.cfDlgContent(e.action),a.dialogInstance.dataBind(),n.i(r._159)(t.parent.element)},buttons:[{buttonModel:{content:i.getConstant("Ok"),isPrimary:!0},click:function(){t.dlgClickHandler(e.action),a.hide()}}]})},e.prototype.dlgClickHandler=function(e){var t,i,s=this.parent.serviceLocator.getService(r._174),l=["",""],d=this.parent.element.querySelector(".e-conditionalformatting-dlg").getElementsByClassName("e-dlg-content")[0].querySelector(".e-cf-dlg"),c=d.querySelector(".e-cfmain");c&&(i=c.getElementsByTagName("input")[0],i&&i.parentElement.classList.contains("e-cfmain")&&(l[0]=c.getElementsByTagName("input")[0].value),l[1]=c.getElementsByTagName("input")[1]?d.querySelector(".e-cfmain").getElementsByTagName("input")[1].value:"",n.i(a._181)(l,this.parent.locale)),t=e===s.getConstant("DuplicateValues")+"..."?i.value===s.getConstant("Duplicate")?"Duplicate":"Unique":this.getType(e);var h={type:t,cFColor:this.getCFColor(d.querySelector(".e-cfsub").getElementsByTagName("input")[0].value),range:this.parent.getActiveSheet().selectedRange};h.value=""!==l[0]?l[0]+(""!==l[1]?","+l[1]:""):l[1],this.parent.notify(o._72,{cfModel:h,isAction:!0})},e.prototype.getType=function(e){var t,n=this.parent.serviceLocator.getService(r._174);switch(e){case n.getConstant("GreaterThan")+"...":t="GreaterThan";break;case n.getConstant("LessThan")+"...":t="LessThan";break;case n.getConstant("Between")+"...":t="Between";break;case n.getConstant("CFEqualTo")+"...":t="EqualTo";break;case n.getConstant("TextThatContains")+"...":t="ContainsText";break;case n.getConstant("ADateOccuring")+"...":t="DateOccur";break;case n.getConstant("Top10Items")+"...":t="Top10Items";break;case n.getConstant("Bottom10Items")+"...":t="Bottom10Items";break;case n.getConstant("Top10")+" %...":t="Top10Percentage";break;case n.getConstant("Bottom10")+" %...":t="Bottom10Percentage";break;case n.getConstant("AboveAverage")+"...":t="AboveAverage";break;case n.getConstant("BelowAverage")+"...":t="BelowAverage"}return t},e.prototype.getCFColor=function(e){var t=this.parent.serviceLocator.getService(r._174),n="RedFT";switch(e){case t.getConstant("LightRedFillWithDarkRedText"):n="RedFT";break;case t.getConstant("YellowFillWithDarkYellowText"):n="YellowFT";break;case t.getConstant("GreenFillWithDarkGreenText"):n="GreenFT";break;case t.getConstant("RedFill"):n="RedF";break;case t.getConstant("RedText"):n="RedT"}return n},e.prototype.cfDlgContent=function(e){var t=this.getDlgText(e),n=this.parent.serviceLocator.getService(r._174),i=this.parent.createElement("div",{className:"e-cf-dlg"}),a=this.parent.createElement("div",{className:"e-cfmain"}),o=this.parent.createElement("div",{className:"e-cfsub"}),s=this.parent.createElement("span",{className:"e-header e-top-header"});s.innerText=t;var c=this.parent.createElement("input",{className:"e-input",id:"valueInput",attrs:{type:"text","aria-label":t}}),h=this.parent.createElement("input",{className:"e-select"}),p=this.parent.createElement("span",{className:"e-header"});p.innerText=n.getConstant("With");var u=this.parent.createElement("input",{className:"e-select"});i.appendChild(a),i.appendChild(o),a.appendChild(s);var f;if(e!==n.getConstant("DuplicateValues")+"..."){if(e!==n.getConstant("AboveAverage")+"..."&&e!==n.getConstant("BelowAverage")+"..."){a.appendChild(c),f=!0;var g=e===n.getConstant("Top10")+" %..."||e===n.getConstant("Bottom10")+" %...";if(e===n.getConstant("Top10Items")+"..."||e===n.getConstant("Bottom10Items")+"..."||g){c.maxLength=g?3:4;var m=new d.NumericTextBox({value:10,min:1,max:g?100:1e3,format:"###"});m.appendTo(c)}}}else{a.appendChild(h);var v=[{text:n.getConstant("Duplicate"),id:"duplicate"},{text:n.getConstant("Unique"),id:"unique"}];new l.DropDownList({dataSource:v,index:0,popupHeight:"200px"}).appendTo(h)}if(e===n.getConstant("Between")+"..."){var y=this.parent.createElement("span",{className:"e-header e-header-2"});y.innerText=n.getConstant("And");var C=this.parent.createElement("input",{className:"e-input e-between"});a.appendChild(y),a.appendChild(C),C.addEventListener("input",this.validateCFInput.bind(this))}f&&(this.validateCFInput({target:c}),c.addEventListener("input",this.validateCFInput.bind(this))),o.appendChild(p),o.appendChild(u);var b=[{text:n.getConstant("LightRedFillWithDarkRedText"),value:"redft",id:"redft"},{text:n.getConstant("YellowFillWithDarkYellowText"),id:"yellowft"},{text:n.getConstant("GreenFillWithDarkGreenText"),id:"greenft"},{text:n.getConstant("RedFill"),id:"redf"},{text:n.getConstant("RedText"),id:"redt"}];return new l.DropDownList({dataSource:b,index:0,popupHeight:"200px"}).appendTo(u),i},e.prototype.validateCFInput=function(e){var t=this.parent.serviceLocator.getService(r._175),n=e.target.value,i=t.dialogInstance.element.getElementsByClassName("e-primary")[0];n&&(e.target.classList.contains("e-between")||e.target.parentElement.querySelector(".e-between"))&&(n=e.target.parentElement.querySelector(e.target.classList.contains("e-between")?".e-input":".e-between").value),i.disabled=!n.trim()},e.prototype.checkCellHandler=function(e,t,r){for(var i=r.range.trim().split(","),o=0;o<i.length;o++){var s=n.i(a.T)(i[o].includes(":")?i[o]:i[o]+":"+i[o]);if(e>=s[0]&&e<=s[2]&&t>=s[1]&&t<=s[3])return!0}return!1},e.prototype.getDlgText=function(e){var t=this.parent.serviceLocator.getService(r._174),n="";switch(e){case t.getConstant("GreaterThan")+"...":n=t.getConstant("FormatCellsGreaterThan");break;case t.getConstant("LessThan")+"...":n=t.getConstant("FormatCellsLessThan");break;case t.getConstant("Between")+"...":n=t.getConstant("FormatCellsBetween");break;case t.getConstant("CFEqualTo")+"...":n=t.getConstant("FormatCellsEqualTo");break;case t.getConstant("TextThatContains")+"...":n=t.getConstant("FormatCellsThatContainTheText");break;case t.getConstant("ADateOccuring")+"...":n=t.getConstant("FormatCellsThatContainADateOccurring");break;case t.getConstant("DuplicateValues")+"...":n=t.getConstant("FormatCellsDuplicate");break;case t.getConstant("Top10Items")+"...":case t.getConstant("Top10")+" %...":n=t.getConstant("FormatCellsTop");break;case t.getConstant("Bottom10Items")+"...":case t.getConstant("Bottom10")+" %...":n=t.getConstant("FormatCellsBottom");break;case t.getConstant("AboveAverage")+"...":n=t.getConstant("FormatCellsAbove");break;case t.getConstant("BelowAverage")+"...":n=t.getConstant("FormatCellsBelow")}return n},e.prototype.updateResult=function(e,t,r,o,l,d,c,h){var p,u,f,g,m={},v={},y=e.range.split(","),C=[];r?g=function(){if(n.i(a._190)(u)){var e=parseFloat(u);e>=0?(void 0===C[0]||e>C[0])&&(C[0]=e):(void 0===C[1]||e<C[1])&&(C[1]=e)}}:o?g=function(){if(n.i(a._190)(u)){var e=parseFloat(u);C.push(Number(e))}}:l?(C=[0,0],g=function(){n.i(a._190)(u)&&(C[0]+=parseFloat(u),C[1]++)}):d?(f=0,g=function(){n.i(a._190)(u)&&C.push(parseFloat(u))}):g=c?function(){if(n.i(a._190)(u)){var e=parseInt(u,10);(void 0===C[0]||e<C[0])&&(C[0]=e),(void 0===C[1]||e>C[1])&&(C[1]=e)}}:function(){m[""+u]?""!==u&&(v[""+u]||(v[""+u]=!0,C.push(u))):m[""+u]=!0};for(var b,x=0;x<y.length;x++){p=n.i(a.T)(y[x]);for(var S=p[0];S<=p[2];S++)for(var w=p[1];w<=p[3];w++)b=n.i(i.h)(S,w,t,!1,!0),n.i(s.isNullOrUndefined)(b.value)?b.formula&&(this.parent.notify("calculateFormula",{cell:b,rowIdx:S,colIdx:w,sheetIndex:this.parent.activeSheetIndex}),u=b.value.toString().toLowerCase(),g()):(u=b.value.toString().toLowerCase(),g()),f++}if(o||d){if(C=C.sort(function(e,t){return e-t}),e.type.includes("Bottom")||(C=C.reverse()),d){var _=parseFloat(h);e.type.includes("Percentage")&&(_/=100/C.length,_=_<1?1:_),C=C.slice(0,_)}}else l&&(C=[C[0]/C[1]],C[0]||(C=[]));e.result=C},e.prototype.applyCF=function(e){var t,r=!e.cfModel,i=this.parent.getActiveSheet(),a=e.cfModel||i.conditionalFormats,s=[e.indexes];e.refreshAll&&(s=n.i(o._38)(this.parent,this.parent.viewport));for(var l=a.length-1;l>=0;l--)(!r||(2===s[0].length?this.checkCellHandler(e.indexes[0],e.indexes[1],a[l]):n.i(o._49)(s,a[l].range)))&&(t=this.updateCF(e,i,a[l],t))},e.prototype.updateCF=function(e,t,r,l){var d,c,h=this;if(r.value){var p=r.value.split(",").filter(function(e){return!!e.trim()});if(p.length>1)if(p[0].split("(").length>1){for(var u="",f=0;f<p.length;f++)u+=p[f]+",",u.split("(").length===u.split(")").length&&void 0===d&&(d=u.substring(0,u.length-1),u="");c=u.substring(0,u.length-1)}else{d=p[0];for(var f=1;f<p.length;f++)c+=f+1===p.length?p[f]:p[f]+","}else d=p[0]||r.value}r.type||(r.type="GreaterThan");var g;r.format&&r.format.style?(g=n.i(i.f)(r.format.style,!0),Object.keys(g).length||r.cFColor||(r.cFColor="RedFT")):(g={},r.cFColor||(r.cFColor="RedFT"));var m,v,y,C=r.type.includes("DataBar"),b=r.type.includes("ColorScale");e.isRender&&r.result||!("Duplicate"===r.type||"Unique"===r.type||C||b||(m=r.type.includes("Average"))||(v=r.type.includes("10")&&n.i(a._190)(d))||(y=r.type.includes("Three")||r.type.includes("Four")||r.type.includes("Five")))||this.updateResult(r,t,C,b,m,v,y,d);var x=function(t,i,p,u){var f,m,v=p&&!n.i(s.isNullOrUndefined)(p.value)?p.value.toString():"",y=!0;switch(r.type){case"GreaterThan":case"LessThan":f=h.isGreaterThanLessThan(r,v,d);break;case"Between":f=n.i(a._190)(v)&&h.isBetWeen(r,v,d,c);break;case"EqualTo":f=n.i(a._190)(v)&&h.isEqualTo(r,v,d);break;case"ContainsText":f=v&&h.isContainsText(v,d);break;case"DateOccur":m={value:d,cell:{},updatedVal:""},h.parent.notify(a._51,m),f=v===m.updatedVal;break;case"Unique":f=-1===r.result.indexOf(v.toLowerCase());break;case"Duplicate":f=r.result.indexOf(v.toLowerCase())>-1;break;case"Top10Items":case"Bottom10Items":case"Top10Percentage":case"Bottom10Percentage":if(r.result){var x=parseFloat(v);n.i(o._83)(v)&&(x=n.i(o.W)(v)),f=r.result.indexOf(x)>-1}break;case"AboveAverage":f=r.result.length&&parseFloat(v)>r.result[0];break;case"BelowAverage":f=r.result.length&&parseFloat(v)<r.result[0];break;default:y=!1,C?h.applyDataBars(v,r,u,t):b?h.applyColorScale(v,r,u,p,t,i):h.applyIconSet(v,r,u)}if(e.isAction&&y&&(h.parent.trigger("beforeConditionalFormat",{conditionalFormat:r,cell:p,element:u,apply:f,address:n.i(o.i)(t,i)}),!f&&e.isEdit&&!l)){var S;e.indexes&&e.indexes[0]===t&&e.indexes[1]===i&&(l=!0),r.cFColor?u.className.includes("e-"+r.cFColor.toLowerCase())&&(u.classList.remove("e-"+r.cFColor.toLowerCase()),u.style.backgroundColor="",u.style.color="",S=n.i(s.extend)({},h.parent.commonCellStyle,p&&p.style),(S.backgroundColor||S.color)&&h.parent.notify(o.f,{rowIdx:t,colIdx:i,td:u,style:{backgroundColor:S.backgroundColor,color:S.color}})):(u.removeAttribute("style"),S=n.i(s.extend)({},h.parent.commonCellStyle,p&&p.style),Object.keys(S).length&&h.parent.notify(o.f,{style:S,rowIdx:t,colIdx:i,td:u}))}f&&(e.isEdit&&e.indexes&&e.indexes[0]===t&&e.indexes[1]===i&&(l=!0),n.i(s.removeClass)([u],["e-redft","e-yellowft","e-greenft","e-redf","e-redt"]),r.cFColor&&(u.classList.add("e-"+r.cFColor.toLowerCase()),h.setCFStyle(g,r)),Object.assign(u.style,g))};if(e.ele)x(e.indexes[0],e.indexes[1],e.cell,e.ele);else for(var S=r.range.split(","),w=this.parent.frozenRowCount(t),_=this.parent.frozenColCount(t),I=n.i(a.U)(t.topLeftCell),E=0;E<S.length;E++)this.updateRange(t,n.i(a.T)(S[E]),w,_,I,x);return l},e.prototype.updateRange=function(e,t,r,a,o,s){t[0]=t[0]<r?t[0]<o[0]?o[0]:t[0]:t[0]<this.parent.viewport.topIndex+r?this.parent.viewport.topIndex+r:t[0],t[1]=t[1]<a?t[1]<o[1]?o[1]:t[1]:t[1]<this.parent.viewport.leftIndex+a?this.parent.viewport.leftIndex+a:t[1],t[2]=t[2]<r?t[2]<o[0]?o[0]-1:t[2]:t[2]>this.parent.viewport.bottomIndex?this.parent.viewport.bottomIndex:t[2],t[3]=t[3]<a?t[3]<o[1]?o[1]-1:t[3]:t[3]>this.parent.viewport.rightIndex?this.parent.viewport.rightIndex:t[3];for(var l,d=t[0];d<=t[2];d++)if(r&&d===r&&(d=this.parent.viewport.topIndex+r),!n.i(i.i)(e,d))for(var c=t[1];c<=t[3];c++)a&&c===a&&(c=this.parent.viewport.leftIndex+a),n.i(i.a)(e,c)||(l=this.parent.getCell(d,c))&&s(d,c,n.i(i.h)(d,c,e),l)},e.prototype.applyIconSet=function(e,t,n){if(n.classList.contains("e-iconset")){n.classList.remove("e-iconset");var r=n.querySelector(".e-iconsetspan");r&&n.removeChild(r)}var i=parseInt(e,10),a=t.result;if(!(isNaN(i)||void 0===a[0]&&void 0===a[1])){var o,s=a[0],l=a[1],d=this.getIconList(t.type).split(",");if(3===d.length){var c=s+.67*(l-s),h=s+.33*(l-s);o="e-"+(i>=c?d[0].trim():i>=h?d[1].trim():d[2].trim())}else if(4===d.length){var p=s+.25*(l-s),u=s+.5*(l-s),f=s+.75*(l-s);o="e-"+(i>=f?d[0].trim():i>=u?d[1].trim():i>=p?d[2].trim():d[3].trim())}else if(5===d.length){var p=s+.2*(l-s),u=s+.4*(l-s),f=s+.6*(l-s),g=s+.8*(l-s);o="e-"+(i>=g?d[0].trim():i>=f?d[1].trim():i>=u?d[2].trim():i>=p?d[3].trim():d[4].trim())}var m=this.parent.createElement("span",{className:"e-icon e-iconsetspan "+o});n.insertBefore(m,n.childNodes[0]),n.classList.add("e-iconset")}},e.prototype.getIconList=function(e){switch(e){case"ThreeArrows":return"3arrows-1,3arrows-2,3arrows-3";case"ThreeArrowsGray":return"3arrowsgray-1,3arrowsgray-2,3arrowsgray-3";case"FourArrowsGray":return"4arrowsgray-1,4arrowsgray-2,4arrowsgray-3,4arrowsgray-4";case"FourArrows":return"4arrows-1,4arrows-2,4arrows-3,4arrows-4";case"FiveArrowsGray":return"5arrowsgray-1,5arrowsgray-2,5arrowsgray-3,5arrowsgray-4,5arrowsgray-5";case"FiveArrows":return"5arrows-1,5arrows-2,5arrows-3,5arrows-4,5arrows-5";case"ThreeTrafficLights1":return"3trafficlights-1,3trafficlights-2,3trafficlights-3";case"ThreeTrafficLights2":return"3rafficlights2-1,3rafficlights2-2,3rafficlights2-3";case"ThreeSigns":return"3signs-1,3signs-2,3signs-3";case"FourTrafficLights":return"4trafficlights-1,4trafficlights-2,4trafficlights-3,4trafficlights-4";case"FourRedToBlack":return"4redtoblack-1,4redtoblack-2,4redtoblack-3,4redtoblack-4";case"ThreeSymbols":return"3symbols-1,3symbols-2,3symbols-3";case"ThreeSymbols2":return"3symbols2-1,3symbols2-2,3symbols2-3";case"ThreeFlags":return"3flags-1,3flags-2,3flags-3";case"FourRating":return"4rating-1,4rating-2,4rating-3,4rating-4";case"FiveQuarters":return"5quarters-1,5quarters-2,5quarters-3,5quarters-4,5quarters-5";case"FiveRating":return"5rating-1,5rating-2,5rating-3,5rating-4,5rating-5";case"ThreeTriangles":return"3triangles-1,3triangles-2,3triangles-3";case"ThreeStars":return"3stars-1,3stars-2,3stars-3";case"FiveBoxes":return"5boxes-1,5boxes-2,5boxes-3,5boxes-4,5boxes-5"}return"3arrows-1,3arrows-2,3arrows-3"},e.prototype.applyColorScale=function(e,t,r,i,a,l){var d=parseFloat(e);if(isNaN(d)){if(r.style.backgroundColor){r.style.backgroundColor="";var c=n.i(s.extend)({},this.parent.commonCellStyle,i&&i.style);c.backgroundColor&&this.parent.notify(o.f,{style:{backgroundColor:c.backgroundColor},td:r,rowIdx:a,colIdx:l})}}else{var h=t.result,p=h.indexOf(d),u=this.getColor(t.type);r.style.backgroundColor=0===p?u[0]:p===h.length-1?u[u.length-1]:3===h.length&&1===p?u[1]:this.getGradient(p,u[0],u[1],u[2],h.length)}},e.prototype.applyDataBars=function(e,t,r,o){var s,l,d=this.parent.getActiveSheet(),c=t.result,h=0;if(n.i(a._190)(e)&&(l=parseFloat(e)),void 0===c[0]&&void 0===c[1]||isNaN(l)){var p=r.getElementsByClassName("e-cf-databar")[0];return void(p&&r.removeChild(p))}void 0!==c[0]&&void 0!==c[1]?(s=c[0]+Math.abs(c[1]),h=Math.abs(c[1]/s*100)):s=void 0!==c[0]?c[0]:c[1];var u=this.parent.createElement("div",{id:"spreadsheet-databar",className:"e-cf-databar"}),f=this.parent.createElement("span",{id:"spreadsheet-leftspan",className:"e-databar"}),g=this.parent.createElement("span",{id:"spreadsheet-rightspan",className:"e-databar"}),m=this.parent.createElement("span",{id:"spreadsheet-dataspan",className:"e-databar-value"}),v=r.querySelector(".e-iconsetspan");v&&r.insertBefore(v,r.firstElementChild);var y=n.i(i.c)(d,o,!0);u.style.height=y-1+"px";var C=t.type[0];"L"===C&&(C+="B"),void 0===c[1]?(g.style.width=Math.ceil(Math.abs(l/s*100))+"%",g.style.height=y-3+"px",g.style.backgroundColor=this.getColor(C)[0],g.style.left="0px"):void 0===c[0]?(g.style.width=Math.ceil(Math.abs(l/s*100))+"%",g.style.height=y-3+"px",g.style.backgroundColor=this.getColor("R")[0],g.style.left="0px"):l>=0?(f.style.width=h+"%",f.style.height=y-3+"px",f.style.backgroundColor="transparent",f.style.left="0px",g.style.width=Math.ceil(Math.abs(l/s*100))+"%",g.style.height=y-3+"px",g.style.backgroundColor=this.getColor(C)[0],g.style.left=h+"%"):(f.style.width=Math.ceil(Math.abs(l/s*100))+"%",f.style.height=y-3+"px",f.style.backgroundColor=this.getColor("R")[0],f.style.width===h+"%"?f.style.left="0px":f.style.right=100-h+"%"),m.style.fontSize=r.style.fontSize||"11pt";var b=r.querySelector("#"+this.parent.element.id+"_currency");b&&u.appendChild(b);var x=r.querySelector(".e-hyperlink");x?m.appendChild(x):(m.innerText=r.textContent,""===r.textContent&&m.appendChild(document.createTextNode(r.textContent))),u.appendChild(f),u.appendChild(g),u.appendChild(m),r.textContent="",r.appendChild(u)},e.prototype.getColor=function(e){if("LB"===e)return["#008aef"];for(var t=e.split(""),n=[],r=0;r<t.length;r++)switch(t[r]){case"G":n.push("#63be7b");break;case"Y":n.push("#ffeb84");break;case"R":n.push("#f8696b");break;case"W":n.push("#ffffff");break;case"B":n.push("#5a8ac6");break;case"O":n.push("#ffb628");break;case"LB":n.push("#008aef");break;case"P":n.push("#d6007b")}return n},e.prototype.getGradient=function(e,t,r,i,a){if(n.i(s.isNullOrUndefined)(i))return this.getLinear(t,r,e/a);var o=a/2;return e>=o?this.getLinear(r,i,Math.abs((e-o)/o)):this.getLinear(t,r,e/o)},e.prototype.getLinear=function(e,t,n){return"#"+this.byteLinear(e[1]+e[2],t[1]+t[2],n)+this.byteLinear(e[3]+e[4],t[3]+t[4],n)+this.byteLinear(e[5]+e[6],t[5]+t[6],n)},e.prototype.byteLinear=function(e,t,n){var r=parseInt(e,16)*(1-n)+parseInt(t,16)*n|0;return Math.abs(r).toString(16)},e.prototype.isGreaterThanLessThan=function(e,t,r){if(n.i(a._190)(t)){if(n.i(a._190)(r)){var i=new RegExp(/[^.-a-zA-Z 0-9]+/g);return"GreaterThan"===e.type?parseFloat(t)>parseFloat(r.replace(i,"")):parseFloat(t)<parseFloat(r.replace(i,""))}var o={value:r,rowIndex:0,colIndex:0,sheetIndex:0,isDate:!1,updatedVal:"",isTime:!1};return this.parent.notify(a._51,o),o.isDate||o.isTime?(e.value=o.updatedVal.toString(),"GreaterThan"===e.type?Number(t)>Number(o.updatedVal):Number(t)<Number(o.updatedVal)):"GreaterThan"===e.type?t.toLowerCase()>r.toLowerCase():t.toLowerCase()<r.toLowerCase()}return""===t&&Number(r)>0&&"LessThan"===e.type},e.prototype.isBetWeen=function(e,t,r,i){var o,s,l=new RegExp(/[^.-a-zA-Z 0-9]+/g);if(r=r.replace(l,""),i=i.replace(l,""),n.i(a._190)(r)){var d=parseFloat(r),c=parseFloat(i);return d>c&&(o=[c,d],d=o[0],c=o[1]),parseFloat(t)>=d&&parseFloat(t)<=c}if(r&&i){var h={value:r,cell:{},updatedVal:""},p={value:i,cell:{},updatedVal:""};return this.parent.notify(a._51,h),this.parent.notify(a._51,p),(h.isDate||h.isTime)&&(p.isDate||p.isTime)?(e.value=h.updatedVal+","+p.updatedVal,h.updatedVal>p.updatedVal&&(s=[p.updatedVal,h.updatedVal],h.updatedVal=s[0],p.updatedVal=s[1]),t>=h.updatedVal&&t<=p.updatedVal):t.toLowerCase()>=r.toLowerCase()&&t.toLowerCase()<=i.toLowerCase()}return!1},e.prototype.isEqualTo=function(e,t,r){if(n.i(a._190)(r)){var i=new RegExp(/[^.-a-zA-Z 0-9]+/g);return parseFloat(t)===parseFloat(r.replace(i,""))}var o={value:r,cell:{},updatedVal:""};return this.parent.notify(a._51,o),o.isTime||o.isDate?(e.value=o.updatedVal,t===o.updatedVal):t.toLowerCase()===r.toLowerCase()},e.prototype.isContainsText=function(e,t){var r=new RegExp(/[^.-a-zA-Z 0-9]+/g);return n.i(a._190)(t.replace(r,""))?(t=t.replace(r,""),n.i(o._83)(e)&&(e=n.i(o.W)(e).toString()),e.indexOf(t)>-1):n.i(o._83)(t)?(n.i(o._83)(e)&&(e=n.i(o.W)(e).toString()),e.indexOf(n.i(o.W)(t).toString())>-1):e.toLowerCase().indexOf(t.toLowerCase())>-1},e.prototype.setCFStyle=function(e,t){switch(t.cFColor){case"RedFT":e.backgroundColor="#ffc7ce",e.color="#9c0055";break;case"YellowFT":e.backgroundColor="#ffeb9c",e.color="#9c6500";break;case"GreenFT":e.backgroundColor="#c6efce",e.color="#006100";break;case"RedF":e.backgroundColor="#ffc7ce";break;case"RedT":e.color="#9c0055"}return e},e.prototype.getModuleName=function(){return"conditionalFormatting"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return c}),n.d(t,"i",function(){return h}),n.d(t,"j",function(){return p});var r="e-disabled",i="e-wraptext",a="spreadsheetLocale",o="dialog",s="actionEvents",l="shape",d={Custom:["#ffffff","#000000","#e7e6e6","#44546a","#4472c4","#ed7d31","#a5a5a5","#ffc000","#70ad47","#ff0000","#f2f2f2","#808080","#cfcdcd","#d5dce4","#d9e2f3","#fbe4d5","#ededed","#fff2cc","#e2efd9","#ffcccc","#d9d9d9","#595959","#aeaaaa","#acb9ca","#b4c6e7","#f7caac","#dbdbdb","#ffe599","#c5e0b3","#ff8080","#bfbfbf","#404040","#747070","#8496b0","#8eaadb","#f4b083","#c9c9c9","#ffd966","#a8d08d","#ff3333","#a6a6a6","#262626","#3b3838","#323e4f","#2f5496","#c45911","#7b7b7b","#bf8f00","#538135","#b30000","#7f7f7f","#0d0d0d","#161616","#212934","#1f3763","#823b0b","#525252","#7f5f00","#375623","#660000"]},c={Custom:["#ffffff","#000000","#ffff00","#00ff00","#00ffff","#0000ff","#ff0000","#000080","#800080","#996633","#f2f2f2","#808080","#ffffcc","#b3ffb3","#ccffff","#ccccff","#ffcccc","#ccccff","#ff80ff","#f2e6d9","#d9d9d9","#595959","#ffff80","#80ff80","#b3ffff","#8080ff","#ff8080","#8080ff","#ff00ff","#dfbf9f","#bfbfbf","#404040","#ffff33","#33ff33","#33ffff","#3333ff","#ff3333","#0000b3","#b300b3","#c68c53","#a6a6a6","#262626","#e6e600","#00b300","#009999","#000099","#b30000","#000066","#660066","#86592d","#7f7f7f","#0d0d0d","#999900","#006600","#006666","#000066","#660000","#00004d","#4d004d","#734d26"]},h={UP:38,DOWN:40,LEFT:37,RIGHT:39,FIRSTALPHABET:65,LASTALPHABET:90,SPACE:32,BACKSPACE:8,TAB:9,DELETE:46,ENTER:13,ESC:27},p={FindValue:"Find value",ReplaceValue:"Replace value",FindReplaceTooltip:"Find & Replace",InsertingEmptyValue:"Reference value is not valid.",ReplaceAllEnd:" matches replaced with ",ByRow:"By Rows",ByColumn:"By Columns",MatchCase:"Match case",MatchExactCellElements:"Match entire cell contents",EnterCellAddress:"Enter cell address",FindAndReplace:"Find and Replace",FindNextBtn:"Find Next",FindPreviousBtn:"Find Previous",ReplaceBtn:"Replace",ReplaceAllBtn:"Replace All",GotoHeader:"Go To",Sheet:"Sheet",Workbook:"Workbook",NoElements:"We couldn't find what you were looking for.",FindWhat:"Find what",ReplaceWith:"Replace with",Cut:"Cut",Copy:"Copy",Paste:"Paste",PasteSpecial:"Paste Special",Link:"Link",Spreadsheet:"Spreadsheet",Hyperlink:"Hyperlink",EditHyperlink:"Edit Hyperlink",OpenHyperlink:"Open Hyperlink",RemoveHyperlink:"Remove Hyperlink",InvalidHyperlinkAlert:"The address of this site is not valid. Check the address and try again.",InsertLink:"Insert Link",EditLink:"Edit Link",All:"All",Values:"Values",Formats:"Formats",Bold:"Bold",Font:"Font",FontSize:"Font Size",Italic:"Italic",Underline:"Underline",Strikethrough:"Strikethrough",TextColor:"Text Color",FillColor:"Fill Color",HorizontalAlignment:"Horizontal Alignment",AlignLeft:"Align Left",AlignCenter:"Center",AlignRight:"Align Right",VerticalAlignment:"Vertical Alignment",AlignTop:"Align Top",AlignMiddle:"Align Middle",AlignBottom:"Align Bottom",WrapText:"Wrap Text",MergeCells:"Merge Cells",MergeAll:"Merge All",MergeHorizontally:"Merge Horizontally",MergeVertically:"Merge Vertically",Unmerge:"Unmerge",UnmergeCells:"Unmerge Cells",SelectMergeType:"Select Merge Type",MergeCellsAlert:"Merging cells will only preserve the top-leftmost(Uppermost) value. Merge anyway?",Borders:"Borders",TopBorders:"Top Borders",LeftBorders:"Left Borders",RightBorders:"Right Borders",BottomBorders:"Bottom Borders",AllBorders:"All Borders",HorizontalBorders:"Horizontal Borders",VerticalBorders:"Vertical Borders",OutsideBorders:"Outside Borders",InsideBorders:"Inside Borders",NoBorders:"No Borders",BorderColor:"Border Color",BorderStyle:"Border Style",InsertFunction:"Insert Function",Insert:"Insert",Delete:"Delete",DuplicateSheet:"Duplicate",MoveRight:"Move Right",MoveLeft:"Move Left",Rename:"Rename",Hide:"Hide",FileName:"File Name",PROPER:"Converts a text to proper case; first letter to uppercase and other letters to lowercase.",NameBox:"Name Box",ShowHeaders:"Show Headers",HideHeaders:"Hide Headers",ShowGridLines:"Show Gridlines",ExtendValidation:"The selection contains some cells without data validation. Do you want to extend validation to these cells?",Yes:"Yes",No:"No",HideGridLines:"Hide Gridlines",FreezePanes:"Freeze Panes",FreezeRows:"Freeze Rows",FreezeColumns:"Freeze Columns",UnfreezePanes:"Unfreeze Panes",UnfreezeRows:"Unfreeze Rows",UnfreezeColumns:"Unfreeze Columns",AddSheet:"Add Sheet",ListAllSheets:"List All Sheets",CollapseToolbar:"Collapse Toolbar",ExpandToolbar:"Expand Toolbar",CollapseFormulaBar:"Collapse Formula Bar",ExpandFormulaBar:"Expand Formula Bar",File:"File",Home:"Home",Formulas:"Formulas",View:"View",New:"New",Open:"Open",SaveAs:"Save As",Update:"Update",ExcelXlsx:"Microsoft Excel",ExcelXls:"Microsoft Excel 97-2003",CSV:"Comma-separated values",FormulaBar:"Formula Bar",Sort:"Sort",SortAscending:"Ascending",SortDescending:"Descending",CustomSort:"Custom Sort",AddColumn:"Add Column",ContainsHeader:"Data contains header",CaseSensitive:"Case sensitive",SortBy:"Sort by",ThenBy:"Then by",SelectAColumn:"Select a column",SortEmptyFieldError:"All sort criteria must have a column specified. Check the selected sort criteria and try again.",SortDuplicateFieldError:" is being sorted by values more than once. Delete the duplicate sort criteria and try again.",SortOutOfRangeError:"Select a cell or range inside the used range and try again.",MultiRangeSortError:"This can't be done on a multiple range selection. Select a single range and try again.",SortAndFilter:"Sort & Filter",Filter:"Filter",ClearAllFilter:"Clear",ClearFilterFrom:"Clear Filter From ",ReapplyFilter:"Reapply",FilterCellValue:"Filter by Value of Selected Cell",FilterOutOfRangeError:"Select a cell or range inside the used range and try again.",HideRow:"Hide Row",HideRows:"Hide Rows",UnhideRows:"Unhide Rows",HideColumn:"Hide Column",HideColumns:"Hide Columns",UnhideColumns:"Unhide Columns",InsertRow:"Insert Row",InsertRows:"Insert Rows",Above:"Above",Below:"Below",InsertColumn:"Insert Column",InsertColumns:"Insert Columns",Before:"Before",After:"After",DeleteRow:"Delete Row",DeleteRows:"Delete Rows",DeleteColumn:"Delete Column",DeleteColumns:"Delete Columns",Ok:"OK",Close:"Close",MoreOptions:"More Options",Cancel:"Cancel",Apply:"Apply",MoreColors:"More Colors",StandardColors:"Standard Colors",General:"General",Number:"Number",Currency:"Currency",Accounting:"Accounting",ShortDate:"Short Date",LongDate:"Long Date",Time:"Time",Percentage:"Percentage",Fraction:"Fraction",Scientific:"Scientific",Text:"Text",Custom:"Custom",MobileFormulaBarPlaceHolder:"Enter value or Formula",NumberFormat:"Number Format",PasteAlert:"You can't paste this here, because the copy area and paste area aren't in the same size. Please try pasting in a different range.",DestroyAlert:"Are you sure you want to destroy the current workbook without saving and create a new workbook?",SheetRenameInvalidAlert:"Sheet name contains invalid character.",SheetRenameEmptyAlert:"Sheet name cannot be empty.",SheetRenameAlreadyExistsAlert:"Sheet name already exists. Please enter another name.",DeleteSheetAlert:"You can't undo deleting sheets, and you might be removing some data. If you don't need it, click OK to delete.",DeleteSingleLastSheetAlert:"A Workbook must contain at least one visible worksheet.",PickACategory:"Pick a category",Description:"Description",UnsupportedFile:"Unsupported File",DataLimitExceeded:"File data is too large and it takes more time to process, do you want to continue?",FileSizeLimitExceeded:"File size is too large and it takes more time to process, do you want to continue?",InvalidUrl:"Invalid URL",SUM:"Adds a series of numbers and/or cells.",SUMIF:"Adds the cells based on specified condition.",SUMIFS:"Adds the cells based on specified conditions.",ABS:"Returns the value of a number without its sign.",RAND:"Returns a random number between 0 and 1.",RANDBETWEEN:"Returns a random integer based on specified values.",FLOOR:"Rounds a number down to the nearest multiple of a given factor.",CEILING:"Rounds a number up to the nearest multiple of a given factor.",PRODUCT:"Multiplies a series of numbers and/or cells.",INT:"Returns a number to the nearest integer.",ROUNDUP:"Rounds a number away from zero.",SUMPRODUCT:"Returns sum of the product of given ranges of arrays.",SORT:"Sorts a range of an array",T:"Checks whether a value is text or not and returns the text.",EXACT:"Checks whether a two text strings are exactly same and returns TRUE or FALSE.",LEN:"Returns a number of characters in a given string.",MOD:"Returns a remainder after a number is divided by divisor.",ODD:"Rounds a positive number up and negative number down to the nearest odd integer.",PI:"Returns the value of pi.",COUNTBLANK:"Returns the number of empty cells in a specified range of cells.",EVEN:"Rounds a positive number up and negative number down to the nearest even integer.",DECIMAL:"Converts a text representation of a number in a given base into a decimal number.",DEGREES:"Converts radians to degrees.",ADDRESS:"Returns a cell reference as text, given specified row and column numbers.",TIME:"Converts hours, minutes, seconds to the time formatted text.",CHAR:"Returns the character from the specified number.",CODE:"Returns the numeric code for the first character in a given string.",DOLLAR:"Converts the number to currency formatted text.",SMALL:"Returns the k-th smallest value in a given array.",LARGE:"Returns the k-th largest value in a given array.",FACT:"Returns the factorial of a number.",MEDIAN:"Returns the median of the given set of numbers.",EDATE:"Returns a date with given number of months before or after the specified date.",DATEVALUE:"Converts a date string into date value.",HOUR:"Returns the number of hours in a specified time string.",SECOND:"Returns the number of seconds in a specified time string.",MINUTE:"Returns the number of minutes in a specified time string.",NOW:"Returns the current date and time.",MONTH:"Returns the number of months in a specified date string.",TODAY:"Returns the current date as date value.",WEEKDAY:"Returns the day of the week corresponding to a date.",AVERAGE:"Calculates average for the series of numbers and/or cells excluding text.",AVERAGEIF:"Calculates average for the cells based on specified criterion.",AVERAGEIFS:"Calculates average for the cells based on specified conditions.",AVERAGEA:"Calculates the average for the cells evaluating TRUE as 1, text and FALSE as 0.",COUNT:"Counts the cells that contain numeric values in a range.",COUNTIF:"Counts the cells based on specified condition.",COUNTIFS:"Counts the cells based on specified conditions.",COUNTA:"Counts the cells that contains values in a range.",MIN:"Returns the smallest number of the given arguments.",MAX:"Returns the largest number of the given arguments.",DATE:"Returns the date based on given year, month, and day.",DAY:"Returns the day from the given date.",DAYS:"Returns the number of days between two dates.",IF:"Returns value based on the given expression.",IFS:"Returns value based on the given multiple expressions.",CalculateAND:"Returns TRUE if all the arguments are TRUE, otherwise returns FALSE.",CalculateOR:"Returns TRUE if any of the arguments are TRUE, otherwise returns FALSE.",IFERROR:"Returns value if no error found else it will return specified value.",CHOOSE:"Returns a value from list of values, based on index number.",INDEX:"Returns a value of the cell in a given range based on row and column number.",FIND:"Returns the position of a string within another string, which is case sensitive.",TEXT:"Converts a value to text in specified number format.",CONCATENATE:"Combines two or more strings together.",CONCAT:"Concatenates a list or a range of text strings.",SUBTOTAL:"Returns subtotal for a range using the given function number.",RADIANS:"Converts degrees into radians.",MATCH:"Returns the relative position of a specified value in given range.",LN:"Returns the natural logarithm of a number.",INTERCEPT:"Calculates the point of the Y-intercept line via linear regression.",UNIQUE:"Returns a unique values from a range or array",SLOPE:"Returns the slope of the line from linear regression of the data points.",LOOKUP:"Looks for a value in a one-row or one-column range, then returns a value from the same position in a second one-row or one-column range.",HLOOKUP:"Looks for a value in the top row of the array of values and then returns a value in the same column from a row in the array that you specify.",VLOOKUP:"Looks for a specific value in the first column of a lookup range and returns a corresponding value from a different column within the same row.",NOT:"Returns the inverse of a given logical expression.",EOMONTH:"Returns the last day of the month that is a specified number of months before or after an initially supplied start date.",SQRT:"Returns the square root of a positive number.",ROUNDDOWN:"Rounds a number down, toward zero.",RSQ:"Returns the square of the Pearson product moment correlation coefficient based on data points in known_y's and known_x's.",DefineNameExists:"This name already exists, try different name.",DefineNameInValid:"The name that you entered is not valid.",CircularReference:"When a formula refers to one or more circular references, this may result in an incorrect calculation.",OR:"OR",AND:"AND",CustomFilterDatePlaceHolder:"Choose a date",CustomFilterPlaceHolder:"Enter the value",CustomFilter:"Custom Filter",Between:"Between",DateTimeFilter:"DateTime Filters",Undo:"Undo",Redo:"Redo",DateFilter:"Date Filters",TextFilter:"Text Filters",NumberFilter:"Number Filters",ClearFilter:"Clear Filter",NoResult:"No Matches Found",FilterFalse:"False",FilterTrue:"True",Blanks:"Blanks",SelectAll:"Select All",GreaterThanOrEqual:"Greater Than Or Equal",GreaterThan:"Greater Than",LessThanOrEqual:"Less Than Or Equal",LessThan:"Less Than",NotEqual:"Not Equal",Equal:"Equal",Contains:"Contains",NotContains:"Does Not Contains",EndsWith:"Ends With",NotEndsWith:"Does Not End With",StartsWith:"Starts With",NotStartsWith:"Does Not Start With",IsEmpty:"Empty",IsNotEmpty:"Not Empty",ClearButton:"Clear",FilterButton:"Filter",CancelButton:"Cancel",OKButton:"OK",Search:"Search",ProtectSheet:"Protect Sheet",UnprotectSheet:"Unprotect Sheet",SelectCells:"Select locked cells",SelectUnlockedCells:"Select unlocked cells",FormatCells:"Format cells",FormatRows:"Format rows",FormatColumns:"Format columns",InsertLinks:"Insert links",ProtectContent:"Protect the contents of locked cells",ProtectAllowUser:" Allow all users of this worksheet to:",EditAlert:"The cell you're trying to change is protected. To make change, unprotect the sheet.",SearchWithin:"Search within",SearchBy:"Search by",Reference:"Reference",DataValidation:"Data Validation",CellRange:"Cell Range",Allow:"Allow",Data:"Data",Minimum:"Minimum",Maximum:"Maximum",IgnoreBlank:"Ignore blank",WholeNumber:"Whole Number",Decimal:"Decimal",Date:"Date",TextLength:"Text Length",List:"List",NotBetween:"Not Between",EqualTo:"Equal To",NotEqualTo:"Not Equal To",GreaterThanOrEqualTo:"Greater Than Or Equal To",LessThanOrEqualTo:"Less Than Or Equal To",InCellDropDown:"In-cell-dropdown",Sources:"Sources",Value:"Value",Retry:"Retry",DialogError:"The list source must be a reference to single row or column.",MinMaxError:"The Maximum must be greater than or equal to the Minimum.",MoreValidation:"This selection contains more than one validation. \n Erase current settings and continue?",FileNameError:"A file name can't contain characters like \\ / : * ? \" < > [ ] |",ListLengthError:"The list values allows only upto 256 characters",ValidationError:"This value doesn't match the data validation restrictions defined for the cell.",EmptyError:"You must enter a value",ClearHighlight:"Clear Highlight",HighlightInvalidData:"Highlight Invalid Data",ClearValidation:"Clear Validation",HighlightCellsRules:"Highlight Cells Rules",CFEqualTo:"Equal To",TextThatContains:"Text that Contains",Save:"Save",EmptyFileName:"File name cannot be empty.",LargeName:"The name is too long.",ADateOccuring:"A Date Occuring",DuplicateValues:"Duplicate Values",TopBottomRules:"Top/Bottom Rules",Directional:"Directional",Shapes:"Shapes",Indicators:"Indicators",Ratings:"Ratings",Top10Items:"Top 10 Items",Top10:"Top 10",Bottom10Items:"Bottom 10 Items",Bottom10:"Bottom 10",AboveAverage:"Above Average",BelowAverage:"Below Average",FormatCellsGreaterThan:"Format cells that are GREATER THAN:",FormatCellsLessThan:"Format cells that are LESS THAN:",FormatCellsBetween:"Format cells that are BETWEEN:",FormatCellsEqualTo:"Format cells that are EQUAL TO:",FormatCellsThatContainTheText:"Format cells that contain the text:",FormatCellsThatContainADateOccurring:"Format cells that contain a date occurring:",FormatCellsDuplicate:"Format cells that contain:",FormatCellsTop:"Format cells that rank in the TOP:",FormatCellsBottom:"Format cells that rank in the BOTTOM:",FormatCellsAbove:"Format cells that are ABOVE AVERAGE:",FormatCellsBelow:"Format cells that are BELOW AVERAGE:",With:"with",DataBars:"Data Bars",ColorScales:"Color Scales",IconSets:"Icon Sets",ClearRules:"Clear Rules",SelectedCells:"Clear Rules from Selected Cells",EntireSheet:"Clear Rules from Entire Sheet",ISNUMBER:"Returns true when the value parses as a numeric value.",ROUND:"Rounds a number to a specified number of digits.",GEOMEAN:"Returns the geometric mean of an array or range of positive data.",POWER:"Returns the result of a number raised to power",LOG:"Returns the logarithm of a number to the base that you specify.",TRUNC:"Returns the truncated value of a number to a specified number of decimal places.",EXP:"Returns e raised to the power of the given number.",Clear:"Clear",ClearContents:"Clear Contents",ClearAll:"Clear All",ClearFormats:"Clear Formats",ClearHyperlinks:"Clear Hyperlinks",LightRedFillWithDarkRedText:"Light Red Fill with Dark Red Text",YellowFillWithDarkYellowText:"Yellow Fill with Dark Yellow Text",GreenFillWithDarkGreenText:"Green Fill with Dark Green Text",RedFill:"Red Fill",RedText:"Red Text",Duplicate:"Duplicate",Unique:"Unique",And:"and",WebPage:"Web Page",ThisDocument:"This Document",DisplayText:"Display Text",Url:"URL",CellReference:"Cell Reference",DefinedNames:"Defined Names",EnterTheTextToDisplay:"Enter the text to display",EnterTheUrl:"Enter the URL",Image:"Image",ConditionalFormatting:"Conditional Formatting",BlueDataBar:"Blue Data Bar",GreenDataBar:"Green Data Bar",RedDataBar:"Red Data Bar",OrangeDataBar:"Orange Data Bar",LightBlueDataBar:"Light blue Data Bar",PurpleDataBar:"Purple Data Bar",GYRColorScale:"Green - Yellow - Red Color Scale",RYGColorScale:"Red - Yellow - Green Color Scale",GWRColorScale:"Green - White - Red Color Scale",RWGColorScale:"Red - White - Green Color Scale",BWRColorScale:"Blue - White - Red Color Scale",RWBColorScale:"Red - White - Blue Color Scale",WRColorScale:"White - Red Color Scale",RWColorScale:"Red - White Color Scale",GWColorScale:"Green - White Color Scale",WGColorScale:"White - Green Color Scale",GYColorScale:"Green - Yellow Color Scale",YGColorScale:"Yellow - Green Color Scale",ThreeArrowsColor:"3 Arrows (Colored)",ThreeArrowsGray:"3 Arrows (Gray)",ThreeTriangles:"3 Triangles",FourArrowsColor:"4 Arrows (Gray)",FourArrowsGray:"4 Arrows (Colored)",FiveArrowsColor:"5 Arrows (Gray)",FiveArrowsGray:"5 Arrows (Colored)",ThreeTrafficLights1:"3 Traffic Lights (Unrimmed)",ThreeTrafficLights2:"3 Traffic Lights (Rimmed)",ThreeSigns:"3 Signs",FourTrafficLights:"4 Traffic Lights",RedToBlack:"Red To Black",ThreeSymbols1:"3 Symbols (Circled)",ThreeSymbols2:"3 Symbols (Uncircled)",ThreeFlags:"3 Flags",ThreeStars:"3 Stars",FourRatings:"4 Ratings",FiveQuarters:"5 Quarters",FiveRatings:"5 Ratings",FiveBoxes:"5 Boxes",Chart:"Chart",Column:"Column",Bar:"Bar",Area:"Area",Pie:"Pie",Doughnut:"Doughnut",PieAndDoughnut:"Pie/Doughnut",Line:"Line",LineMarker:"Line with Markers",Radar:"Radar",Scatter:"Scatter",ChartDesign:"Chart Design",ClusteredColumn:"Clustered Column",StackedColumn:"Stacked Column",StackedColumn100:"100% Stacked Column",ClusteredBar:"Clustered Bar",StackedBar:"Stacked Bar",StackedBar100:"100% Stacked Bar",StackedArea:"Stacked Area",StackedArea100:"100% Stacked Area",StackedLine:"Stacked Line",StackedLineMarker:"Stacked Line with Markers",StackedLine100:"100% Stacked Line",StackedLine100Marker:"100% Stacked Line with Markers",AddChartElement:"Add Chart Element",Axes:"Axes",AxisTitle:"Axis Title",ChartTitle:"Chart Title",DataLabels:"Data Labels",Gridlines:"Gridlines",Legends:"Legends",PrimaryHorizontal:"Primary Horizontal",PrimaryVertical:"Primary Vertical",None:"None",AboveChart:"Above Chart",Center:"Center",InsideEnd:"Inside End",InsideBase:"Inside Base",OutsideEnd:"OutSide End",PrimaryMajorHorizontal:"Primary Major Horizontal",PrimaryMajorVertical:"Primary Major Vertical",PrimaryMinorHorizontal:"Primary Minor Horizontal",PrimaryMinorVertical:"Primary Minor Vertical",Right:"Right",Left:"Left",Bottom:"Bottom",Top:"Top",SwitchRowColumn:"Switch Row/Column",ChartTheme:"Chart Theme",ChartType:"Chart Type",Material:"Material",Fabric:"Fabric",Bootstrap:"Bootstrap",HighContrastLight:"HighContrast Light",MaterialDark:"Material Dark",FabricDark:"Fabric Dark",HighContrast:"HighContrast",BootstrapDark:"Bootstrap Dark",Bootstrap4:"Bootstrap4",Bootstrap5Dark:"Bootstrap5 Dark",Bootstrap5:"Bootstrap5",Tailwind:"Tailwind",TailwindDark:"Tailwind Dark",VerticalAxisTitle:"Vertical Axis Title",HorizontalAxisTitle:"Horizontal Axis Title",EnterTitle:"Enter Title",ProtectWorkbook:"Protect Workbook",Password:"Password (optional):",EnterThePassword:"Enter the password",ConfirmPassword:"Confirm Password",EnterTheConfirmPassword:"Re-enter your password",PasswordAlert:"Confirmation password is not identical",UnprotectWorkbook:"Unprotect Workbook",UnprotectPasswordAlert:"The password you supplied is not correct.",IncorrectPassword:"Unable to open the file or worksheet with the given password",PasswordAlertMsg:"Please enter the password",ConfirmPasswordAlertMsg:"Please enter the confirm password",IsProtected:"is protected",PDF:"PDF Document",AutoFillMergeAlertMsg:"To do this, all the merged cells need to be the same size.",FillSeries:"Fill Series",CopyCells:"Copy Cells",FillFormattingOnly:"Fill Formatting Only",FillWithoutFormatting:"Fill Without Formatting",CustomFormat:"Custom Number Formats",CustomFormatPlaceholder:"Type or Select a custom format",CustomFormatTypeList:"Type",UnprotectWorksheet:"Unprotect Sheet",ReEnterPassword:"Re-enter password to proceed",SheetPassword:"Password to unprotect sheet:",Fluent:"Fluent",FluentDark:"Fluent Dark",Material3:"Material 3",Material3Dark:"Material 3 Dark",CellReferenceTypoError:"We found a typo in your cell reference. Do you want to correct this reference as follows?",InvalidFormulaError:"We found that you typed a formula which is invalid.",InvalidArguments:"We found that you typed a formula with an invalid arguments.",EmptyExpression:"We found that you typed a formula with an empty expression.",MismatchedParenthesis:"We found that you typed a formula with one or more missing opening or closing parenthesis.",ImproperFormula:"We found that you typed a formula which is improper.",WrongNumberOfArguments:"We found that you typed a formula with a wrong number of arguments.",Requires3Arguments:"We found that you typed a formula which requires 3 arguments.",MismatchedStringQuotes:"We found that you typed a formula with a mismatched quotes.",FormulaCircularRef:"We found that you typed a formula with a circular reference.",AddCurrentSelection:"Add current selection to filter",ExternalWorkbook:"An imported excel file contains an external workbook reference. Do you want to import that file?"}},function(e,t,n){"use strict";var r=n(37);n.d(t,"a",function(){return r.a});var i=n(91);n.d(t,"b",function(){return i.a});var a=n(90);n.d(t,"c",function(){return a.a});var o=n(89);n.d(t,"d",function(){return o.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1),i=n(36),a=n(3),o=(n.n(a),n(0)),s=function(){function e(e){this.parent=e,this.addEventListener(),this.instantiateRenderer()}return e.prototype.render=function(){this.parent.setProperties({activeSheetIndex:this.parent.skipHiddenSheets(this.parent.activeSheetIndex)},!0),this.parent.isMobileView()||(this.parent.notify(r.b,null),this.parent.notify(r.c,null));var e=this.parent.createElement("div",{id:this.parent.element.id+"_sheet_panel",className:"e-sheet-panel"});this.parent.enableRtl&&e.classList.add("e-rtl"),this.parent.element.appendChild(e),this.parent.showSheetTabs?this.parent.notify(r.d,null):(this.parent.notify(o._49,{action:"initSheetInfo"}),this.parent.notify(o._49,{action:"initiateDefinedNames"})),this.parent.isMobileView()&&(this.parent.notify(r.c,null),this.parent.notify(r.b,null)),(this.parent.password.length>0||this.parent.isProtected)&&(this.parent.isProtected=!0,this.parent.showSheetTabs&&(this.parent.element.querySelector(".e-add-sheet-tab").setAttribute("disabled","true"),this.parent.element.querySelector(".e-add-sheet-tab").classList.add("e-disabled"))),"None"===this.parent.selectionSettings.mode&&(this.parent.allowAutoFill=!1),this.setSheetPanelSize(),this.renderSheet(e),this.checkTopLeftCell(!this.parent.refreshing)},e.prototype.checkTopLeftCell=function(e,t,i,a,s,l){var d=this.parent.getActiveSheet();this.parent.showSpinner();var c,h="A1"===d.topLeftCell,p=n.i(o.U)(d.topLeftCell);if(d.topLeftCell!==d.paneTopLeftCell&&(d.frozenRows||d.frozenColumns)){var u=n.i(o.U)(d.paneTopLeftCell);c=this.parent.scrollSettings.enableVirtualization,h=d.frozenRows&&d.frozenColumns?p[0]+d.frozenRows===u[0]&&p[1]+d.frozenColumns===u[1]:d.frozenRows?p[0]+d.frozenRows===u[0]&&0===p[1]:p[1]+d.frozenColumns===u[1]&&0===p[0],p[0]&&u[0]>p[0]?this.parent.viewport.beforeFreezeHeight=n.i(o.z)(d,0,p[0]-1,!0):this.parent.viewport.beforeFreezeHeight=0,p[1]&&u[1]>p[1]?this.parent.viewport.beforeFreezeWidth=n.i(o.E)(d,0,p[1]-1,!0):this.parent.viewport.beforeFreezeWidth=0}else this.parent.viewport.beforeFreezeHeight=this.parent.viewport.beforeFreezeWidth=0;var f=this.parent.frozenRowCount(d),g=this.parent.frozenColCount(d);if(!this.parent.scrollSettings.enableVirtualization||h)this.refreshUI({rowIndex:p[0],colIndex:p[1],refresh:"All"},null,e,t,s,l),c&&(this.parent.viewport.topIndex=n.i(o._172)(d,f,!0)-f,this.parent.viewport.leftIndex=n.i(o._172)(d,g,!0,"columns")-g);else{var m=d.paneTopLeftCell===d.topLeftCell?p:n.i(o.U)(d.paneTopLeftCell),v={preventScroll:!0};v.scrollTop=i||(m[0]>f?n.i(o.z)(d,f,m[0]-1,!0):0),v.scrollLeft=a||(m[1]>g?n.i(o.E)(d,g,m[1]-1,!0):0),this.parent.notify(r._3,v);var y=this.parent.getThreshold("row"),C=d.frozenRows?p[0]:p[0]>y?n.i(o._172)(d,p[0]-y,!0):0,b=[];d.frozenRows&&b.push(m[0]-y>f?m[0]-y:f),y=this.parent.getThreshold("col");var x=d.frozenColumns?p[1]:p[1]>y?n.i(o._172)(d,p[1]-y,!0,"columns"):0;d.frozenColumns?(b.length||b.push(f),b.push(m[1]-y>g?m[1]-y:g)):b.length&&b.push(g),this.refreshUI({rowIndex:C,colIndex:x,refresh:"All",top:v.scrollTop,left:v.scrollLeft,frozenIndexes:b},null,e,t,s,l),c&&(f&&b[0]>=f&&(this.parent.viewport.topIndex=n.i(o._172)(d,b[0],!0)-f),g&&b[1]>=g&&(this.parent.viewport.leftIndex=n.i(o._172)(d,b[1],!0,"columns")-g))}},e.prototype.renderSheet=function(e){void 0===e&&(e=document.getElementById(this.parent.element.id+"_sheet_panel")),e.appendChild(this.parent.createElement("div",{className:"e-sheet",id:this.parent.element.id+"_sheet",styles:"background-color: #fff"})),this.parent.serviceLocator.getService("sheet").renderPanel()},e.prototype.refreshUI=function(e,t,i,s,l,d){var c=this;"All"!==e.refresh&&this.parent.showSpinner();var h=this.parent.serviceLocator.getService("sheet"),p=this.parent.getActiveSheet(),u=n.i(o.p)(this.parent),f={rowCount:p.rowCount,colCount:p.colCount};if(e.frozenIndexes=e.frozenIndexes?e.frozenIndexes:[],!t)if(this.parent.scrollSettings.enableVirtualization){var g=e.rowIndex+this.parent.viewport.rowCount+2*this.parent.getThreshold("row"),m=e.colIndex+this.parent.viewport.colCount+2*this.parent.getThreshold("col"),v=this.parent.frozenRowCount(p),y=this.parent.frozenColCount(p);e.frozenIndexes.length&&(g+=e.frozenIndexes[0]-v,m+=e.frozenIndexes[1]-y),"Row"===e.refresh?g+=v:g+=p.frozenRows,"Column"===e.refresh?m+=y:m+=p.frozenColumns;var C=e.frozenIndexes[0]>v?e.frozenIndexes[0]:e.rowIndex+("Row"===e.refresh?v:p.frozenRows),b=this.parent.skipHidden(C,g,"rows",!1);if(g=b[1],C!==b[0]){var x=n.i(o.U)(p.paneTopLeftCell);x[0]===C&&this.parent.updateTopLeftCell(b[0]-v,x[1],"col")}b[0]-=v;var S=p.rowCount-1,w=0,_=e.rowIndex;if(this.parent.scrollSettings.isFinite&&g>S&&(w=g-S,g=n.i(o._172)(p,S,!1),b[0]+v>n.i(o._172)(p,v,!0))){var I=e.rowIndex-w;I=I<0?0:I,I=this.decreaseHidden(I,e.rowIndex-1,v),e.top&&I<e.rowIndex&&this.parent.notify(r._108,{height:n.i(o.z)(p,I+v,e.rowIndex-1+v,!0),isRender:!0}),this.parent.viewport.topIndex=b[0]=I,_="Row"===e.refresh?I:_}"Row"===e.refresh?e.rowIndex=n.i(o._172)(p,_+v,!0)-v:_=e.rowIndex=v?n.i(o._172)(p,_,!0):b[0];var E=e.frozenIndexes[1]>y?e.frozenIndexes[1]:e.colIndex+("Column"===e.refresh?y:p.frozenColumns);if(b=this.parent.skipHidden(E,m,"columns",!1),m=b[1],E!==b[0]){var x=n.i(o.U)(p.paneTopLeftCell);x[1]===E&&this.parent.updateTopLeftCell(x[0],b[0]-y,"row")}b[0]-=y,S=p.colCount-1,w=0;var R=e.colIndex;if(this.parent.scrollSettings.isFinite&&m>S&&(w=m-S,m=n.i(o._172)(p,S,!1,"columns"),b[0]+y>n.i(o._172)(p,y,!0,"columns"))){var I=e.colIndex-w;I=I>-1?I:0,I=this.decreaseHidden(I,e.colIndex-1,y,"columns"),e.left&&I<e.colIndex&&this.parent.notify(r._108,{width:n.i(o.E)(p,I+y,e.colIndex-1+y,!0),isRender:!0}),this.parent.viewport.leftIndex=b[0]=I,R="Column"===e.refresh?I:R}"Column"===e.refresh?e.colIndex=n.i(o._172)(p,R+y,!0,"columns")-y:R=e.colIndex=y?n.i(o._172)(p,R,!0,"columns"):b[0],"Row"===e.refresh&&(_+=v,v&&(g+=n.i(o.U)(p.topLeftCell)[0]),m=this.parent.viewport.rightIndex),"Column"===e.refresh&&(R+=y,y&&(m+=n.i(o.U)(p.topLeftCell)[1]),g=this.parent.viewport.bottomIndex),this.parent.viewport.topIndex=e.rowIndex,this.parent.viewport.bottomIndex=g,this.parent.viewport.leftIndex=e.colIndex,this.parent.viewport.rightIndex=m,t=n.i(o.W)(_,R)+":"+n.i(o.W)(g,m)}else"All"===e.refresh&&this.updateTopLeftScrollPosition(n.i(a.extend)(e,{sheet:p})),this.parent.viewport.bottomIndex=p.rowCount-1,this.parent.viewport.rightIndex=p.colCount-1,t=n.i(o.W)(e.rowIndex,e.colIndex)+":"+n.i(o.W)(this.parent.viewport.bottomIndex,this.parent.viewport.rightIndex);"All"===e.refresh&&this.parent.trigger(r.O,{});var k=this.parent.isOpen||this.parent.refreshing;n.i(r._141)(this.parent.getMainContent(),{busy:!0});var A=this.parent.sheets.length;n.i(o.P)(this.parent,u+"!"+t,null,null,e.frozenIndexes).then(function(a){if(c.parent&&!(A<c.parent.sheets.length)){var u=c.parent.sheets.indexOf(p);if(!l&&(-1===u||u!==c.parent.activeSheetIndex))return void(u>-1&&c.checkTopLeftCell());var g,m,v=[e.rowIndex,e.colIndex].concat(n.i(o.U)(t.split(":")[1]));switch(e.refresh){case"All":h.renderTable({cells:a,indexes:v,top:e.top,left:e.left,initLoad:i,isRefreshing:s,isOpen:k,openOptions:d});break;case"Row":h.refreshRowContent({cells:a,indexes:v,skipUpdateOnFirst:e.skipUpdateOnFirst,prevRowColCnt:f}),g=!1,m={isEdit:g},c.parent.notify(r.f,m),m.isEdit&&c.parent.notify(r.j,{action:"startEdit",refreshCurPos:!1});break;case"Column":h.refreshColumnContent({cells:a,indexes:v,skipUpdateOnFirst:e.skipUpdateOnFirst,prevRowColCnt:f,insertDelete:e.insertDelete});break;case"RowPart":h.updateRowContent({cells:a,indexes:v,direction:e.direction,skipUpdateOnFirst:e.skipUpdateOnFirst,prevRowColCnt:f});break;case"ColumnPart":h.updateColContent({cells:a,indexes:v,direction:e.direction,skipUpdateOnFirst:e.skipUpdateOnFirst,prevRowColCnt:f})}c.parent&&c.parent.isReact&&c.parent.renderReactTemplates()}}),this.parent.notify(r.u,{refresh:e.refresh,skipTranslate:e.skipTranslate})},e.prototype.updateTopLeftScrollPosition=function(e){var t=n.i(o.U)(e.sheet.topLeftCell),r=n.i(o.U)(e.sheet.paneTopLeftCell);if(e.sheet.frozenRows){var i=this.parent.frozenRowCount(e.sheet);r[0]>i&&(e.top=n.i(o.z)(e.sheet,i,r[0]-1,!0))}else e.rowIndex&&(e.rowIndex=0),0!==t[0]&&(e.top=n.i(o.z)(e.sheet,0,t[0]-1,!0));if(e.sheet.frozenColumns){var a=this.parent.frozenColCount(e.sheet);r[1]>a&&(e.left=n.i(o.E)(e.sheet,a,r[1]-1,!0))}else e.colIndex&&(e.colIndex=0),0!==t[1]&&(e.left=n.i(o.E)(e.sheet,0,t[1]-1,!0))},e.prototype.removeSheet=function(){n.i(a.remove)(document.getElementById(this.parent.element.id+"_sheet"))},e.prototype.refreshSheet=function(e,t,i,a,o){var s=0,l=0;if(t){var d=this.parent.element.getElementsByClassName("e-main-panel")[0];d&&(s=d.scrollTop);var c=this.parent.getMainContent();c&&(l=c.scrollLeft)}this.removeSheet(),this.renderSheet(),this.parent.notify(r._4,{}),this.checkTopLeftCell(!1,e,s,l,a,o),i&&n.i(r._159)(this.parent.element)},e.prototype.setSheetPanelSize=function(e){var t,i=document.getElementById(this.parent.element.id+"_sheet_panel"),a=this.parent.element.getBoundingClientRect();"auto"===this.parent.height?(i.style.height="260px",t=230):(t=a.height-n.i(r._119)(i),i.style.height=t+"px",t-=32),void 0!==e&&(this.colMinWidth=e),this.parent.viewport.height=t,this.parent.viewport.width=a.width-32,this.parent.viewport.rowCount=this.roundValue(t,20),this.parent.viewport.colCount=this.roundValue(a.width,this.colMinWidth||64)},e.prototype.roundValue=function(e,t){var n=e/t,r=Math.round(n);return Math.abs(n-r)<.5?r:r-1},e.prototype.moveOrDuplicateSheetHandler=function(e){this.parent.notify(r.e,null),e.refresh&&this.refreshSheet(e.isDuplicate)},e.prototype.decreaseHidden=function(e,t,r,i){void 0===i&&(i="rows"),e+=r,t+=r;for(var a=this.parent.getActiveSheet(),s=t;s>=e;s--)if(a[""+i][s]&&a[""+i][s].hidden&&--e<r){e=n.i(o._172)(a,r,!0,i);break}return e-r},e.prototype.instantiateRenderer=function(){this.parent.serviceLocator.register("cell",new i.d(this.parent)),this.parent.serviceLocator.register("row",new i.c(this.parent)),this.parent.serviceLocator.register("sheet",new i.b(this.parent))},e.prototype.destroy=function(){this.removeEventListener(),this.parent.serviceLocator.getService("row").destroy(),this.parent.serviceLocator.getService("cell").destroy(),this.colMinWidth&&(this.colMinWidth=null),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(r.i,this.destroy,this),this.parent.on(o._139,this.moveOrDuplicateSheetHandler,this),this.parent.on(r._109,this.updateTopLeftScrollPosition,this)},e.prototype.removeEventListener=function(){this.parent.off(r.i,this.destroy),this.parent.off(o._139,this.moveOrDuplicateSheetHandler),this.parent.off(r._109,this.updateTopLeftScrollPosition)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(0),i=n(2),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i._72,this.setCFRule,this),this.parent.on(i._73,this.clearCFRule,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._72,this.setCFRule),this.parent.off(i._73,this.clearCFRule))},e.prototype.setCFRule=function(e){var t=e.cfModel,a=void 0===e.sheetIdx?n.i(i.L)(this.parent,t.range):e.sheetIdx,o=n.i(r.l)(this.parent,a);t.range=t.range||o.selectedRange;var s=n.i(i._10)(n.i(i.l)(t.range));if(t.range=n.i(i.g)(s),e.isAction){var l={range:t.range,type:t.type,cancel:!1,cFColor:t.cFColor,value:t.value,sheetIdx:a};if(this.parent.notify(i._31,{eventArgs:l,action:"conditionalFormat"}),l.cancel)return;t.type=l.type,t.cFColor=l.cFColor,t.value=l.value,l.range!==t.range&&(t.range=l.range,s=n.i(i._10)(n.i(i.l)(l.range))),delete l.cancel}o.conditionalFormats||this.parent.setSheetPropertyOnMute(o,"conditionalFormats",[]),o.conditionalFormats.push(t),a!==this.parent.activeSheetIndex?e.isUndoRedo&&!e.isFromUpdateAction&&this.parent.notify(i._27,{address:o.name+"!"+t.range}):this.parent.notify(i.b,{cfModel:[t],isAction:!0}),this.parent.setUsedRange(s[2],s[3]),e.isAction&&this.parent.notify("actionComplete",{eventArgs:{range:t.range,type:t.type,cFColor:t.cFColor,value:t.value,sheetIdx:a},action:"conditionalFormat"})},e.prototype.clearCFRule=function(e){void 0===e.sheetIdx&&(e.sheetIdx=this.parent.activeSheetIndex);var t=n.i(r.l)(this.parent,e.sheetIdx),a=t.conditionalFormats;if(e.isUndo){if(e.updatedCFModel){var o;e.updatedCFModel.forEach(function(e){(o=a.indexOf(e))>-1&&a.splice(o,1)})}return a.splice.apply(a,[a.length,0].concat(e.oldCFModel)),this.parent.notify(i.b,{cfModel:e.oldCFModel,isAction:!0}),void(e.sheetIdx!==this.parent.activeSheetIndex&&this.parent.notify(i._27,{address:t.name+"!"+e.range}))}if(a&&a.length){var s,l,d,c,h,p,u,f,g,m=e.range&&("string"==typeof e.range?n.i(i.l)(e.range):e.range);e.oldCFModel=[],e.updatedCFModel=[];for(var v=[],y=[],C=[],b=0;b<a.length;b++){s=a[b],l=s.range.split(",");for(var x=0;x<l.length;x++){if(d=n.i(i.l)(l[x]),e.range)if(m[0]<=d[0]&&m[1]<=d[1]&&m[2]>=d[2]&&m[3]>=d[3])l.splice(x,1),x--;else{if(u=m[0]>=d[0]&&m[0]<=d[2],f=m[2]>=d[0]&&m[2]<=d[2],h=m[1]>=d[1]&&m[1]<=d[3],p=m[3]>=d[1]&&m[3]<=d[3],c=[],u&&f?((h||p||m[1]<d[1]&&m[3]>d[3])&&(m[0]-d[0]>0&&c.push(n.i(i.g)([d[0],d[1],m[0]-1,d[3]])),d[2]-m[2]>0&&c.push(n.i(i.g)([m[2]+1,d[1],d[2],d[3]]))),h&&m[1]!==d[1]&&c.push(n.i(i.g)([m[0],d[1],m[2],m[1]-1])),p&&m[3]!==d[3]&&c.push(n.i(i.g)([m[0],m[3]+1,m[2],d[3]]))):h&&p?((u||f||m[0]<d[0]&&m[2]>d[2])&&(m[1]-d[1]>0&&c.push(n.i(i.g)([d[0],d[1],d[2],m[1]-1])),d[3]-m[3]>0&&c.push(n.i(i.g)([d[0],m[3]+1,d[2],d[3]]))),u?m[0]!==d[0]&&c.push(n.i(i.g)([d[0],m[1],m[0]-1,m[3]])):f&&m[2]!==d[2]&&c.push(n.i(i.g)([m[2]+1,m[1],d[2],m[3]]))):(u||f)&&(h?(m[1]!==d[1]&&c.push(n.i(i.g)([d[0],d[1],d[2],m[1]-1])),m[0]-d[0]>0?c.push(n.i(i.g)([d[0],m[1],m[0]-1,d[3]])):d[2]-m[2]>0&&c.push(n.i(i.g)([m[2]+1,m[1],d[2],d[3]]))):p&&(m[3]!==d[3]&&c.push(n.i(i.g)([d[0],m[3]+1,d[2],d[3]])),m[0]-d[0]>0?c.push(n.i(i.g)([d[0],d[1],m[0]-1,m[3]])):d[2]-m[2]>0&&c.push(n.i(i.g)([m[2]+1,d[1],d[2],m[3]])))),!c.length)continue;l[x]=c.join(",")}else m=d,l.splice(x,1),x--;e.sheetIdx===this.parent.activeSheetIndex&&this.parent.notify(i._74,{indexes:m})}if((g=l.join(","))!==s.range){if(e.cfModel&&(e.cfModel.cFColor!==s.cFColor||e.cfModel.type!==s.type||e.cfModel.value!==s.value)){C.push(s);continue}y.push(s.range),g?(e.oldCFModel.push({type:s.type,cFColor:s.cFColor,format:s.format,range:s.range,value:s.value}),s.range=g,s.result&&(delete s.result,this.parent.notify(i.b,{cfModel:[s],isAction:!0})),e.updatedCFModel.push(s),v.push(s)):(e.oldCFModel.push(s),v.concat(a.splice(b,1)),b--)}}if(e.sheetIdx!==this.parent.activeSheetIndex?e.isUndoRedo&&!e.isFromUpdateAction&&this.parent.notify(i._27,{address:t.name+"!"+e.range}):C.length&&this.parent.notify(i.b,{cfModel:C,isAction:!0}),(e.isAction||e.isClear)&&e.oldCFModel.length){var S={cFormats:v,oldRange:y,previousConditionalFormats:e.oldCFModel,sheetIdx:e.sheetIdx,selectedRange:e.range};e.updatedCFModel.length&&(S.conditionalFormats=e.updatedCFModel),e.isClear?e.cfClearActionArgs=S:this.parent.notify("actionComplete",{eventArgs:S,action:"clearCF"})}}},e.prototype.getModuleName=function(){return"workbookConditionalFormatting"},e}()},function(e,t,n){"use strict";function r(e,t,r,a,o,p,u,f,g,m,v,y){return void 0===g&&(g=!0),new Promise(function(C,b){C(function(){var C;t.indexOf("!")>-1?(C=n.i(s.e)(e,t.split("!")[0]),t=t.slice(t.indexOf("!")+1,t.length)):C=e.activeSheetIndex;var b=n.i(s.l)(e,C),x=n.i(l.m)(m||t),S={sheet:b,indexes:x,formulaCellRef:u,sheetIndex:f,isFinite:e.scrollSettings&&e.scrollSettings.isFinite,promise:new Promise(function(e,t){e(void 0)})};return e.notify(l.n,S),S.promise.then(function(){var u,f,m,C=x[0],S=e.frozenRowCount(b),w=e.frozenColCount(b),_=!!y;if(r){m=[];var I,E,R,k,A,F,N;a&&(F=n.i(c.getNumericObject)(e.locale),N=new c.Internationalization(e.locale)),t.split(",").forEach(function(t,r){for(x=n.i(s.T)(t),I=0,C=x[0];C<=x[2];){for(E=m[I]||{},f=n.i(d.j)(b,C),u=x[1];u<=x[3];)if(g&&n.i(d.i)(b,C)&&!p)C++;else{R=n.i(l.a)(u+1);var o=f?n.i(d.h)(C,u,b):null;a?(E[R]=i(e,o,C,u,!1,N),k=o&&(o.value||0===o.value)?o.value:null,"string"==typeof k&&("."!==F.decimal&&k.includes(F.decimal)?(A=k.replace(F.decimal,"."),n.i(l.o)(A)&&(k=parseFloat(A))):n.i(l.o)(k)&&(k=parseFloat(k))),E[R+"_value"]=k):(o&&(o.formula||!n.i(c.isNullOrUndefined)(o.value))||Object.keys(E).length)&&(u===v?(k=n.i(c.extend)({},o,{value:i(e,o,C,u,!0)}),"string"!=typeof k.value||!n.i(l.o)(k.value)||o.format&&"@"===o.format||(k.value=parseFloat(k.value)),E[R]=k):E[R]=o),u===x[3]&&Object.keys(E).length&&(E.__rowIndex=(C+1).toString(),m[I]=E,_&&0===r&&!n.i(s.w)(b,C)&&y.push(E),I++),u++}C++}})}else{m=new Map;for(var T=!(a||!o||!o.length);C<=x[2];)if(T&&C>=S&&C<o[0])C=o[0];else if(a||!n.i(d.i)(b,C)){for(f=n.i(d.j)(b,C),u=x[1];u<=x[3];){var O={cell:n.i(d.h)(C,u,b),address:n.i(l.i)(C,u),rowIndex:C,colIndex:u};e.trigger(l.p,O);var D=n.i(d.h)(C,u,b,!1,!0);if(D.formula&&D.formula.toUpperCase().includes("UNIQUE")&&e.notify("calculateFormula",{cell:D,rowIdx:C,colIdx:u,sheetIndex:e.activeSheetIndex,address:O.address}),D.colSpan>1&&D.rowSpan>1)for(var L=void 0,P=C,M=C+D.rowSpan;P<M;P++)for(var B=u,H=u+D.colSpan;B<H;B++)P===C&&B===u||(L=new Object,P!==C&&(L.rowSpan=C-P),B!==u&&(L.colSpan=u-B),b.rows[P]&&b.rows[P].cells&&b.rows[P].cells[B]&&(delete b.rows[P].cells[B].value,delete b.rows[P].cells[B].formula),n.i(h.J)(P,B,b,L,!0));else if(D.colSpan>1)for(var P=u+1,M=u+D.colSpan;P<M;P++)n.i(h.J)(C,P,b,{colSpan:u-P},!0),b.rows[C]&&b.rows[C].cells&&b.rows[C].cells[P]&&(delete b.rows[C].cells[P].value,delete b.rows[C].cells[P].formula);else if(D.rowSpan>1)for(var P=C+1,M=C+D.rowSpan;P<M;P++)n.i(h.J)(P,u,b,{rowSpan:C-P},!0),b.rows[P]&&b.rows[P].cells&&b.rows[P].cells[u]&&(delete b.rows[P].cells[u].value,delete b.rows[P].cells[u].formula);if(a||!n.i(d.a)(b,u))if(T&&u>=w&&u<o[1])u=o[1];else{if(D.style){var U={};Object.assign(U,D.style),D.style=U}m.set(O.address,D),u++}else u++}C++}else C++}return m})}())})}function i(e,t,r,i,a,o){if(t){if(n.i(c.isNullOrUndefined)(t.value))return"";if(t.format){var d={value:t.value,formattedText:t.value,cell:t,format:t.format,checkDate:!a,rowIndex:r,colIndex:i,dataUpdate:!0};return e.notify(l.d,d),d.dateObj&&"Invalid Date"!==d.dateObj.toString()?d.dateObj:a?d.value:d.formattedText.trim()}if(a)return t.value;var h=t.value;if(n.i(l.o)(h)&&(h=Number(t.value).toString(),h.includes(".")||h.length>11)){var p={args:{value:h,updateValue:!0},fResult:h,cellVal:h,intl:o};e.notify(s._53,p),h=p.fResult}return h}return""}function a(e,t){var r,i,a;if(n.i(c.isUndefined)(e[t])||!e[t]||e[t].index!==t)for(var o=0;o<=t;o++)if(e&&e[o]){if((r=e[o].index-o)>0){for(e.forEach(function(e,t){e&&e.index&&(a=e.index,i=1),e&&!e.index&&0!==t&&(e.index=a+i),i++});r--;)e.splice(o,0,null);o+=r}}else e?e[o]=null:e=[];return e[t]}function o(e,t,r){for(var i,a,o,s=0,l=e.length,h=0;h<l;h++)!function(h){if(n.i(c.isNullOrUndefined)(e[h])||n.i(c.isUndefined)(e[h].index)||(a=s=e[h].index-h,delete e[h].index),s>0){for(i=0;s--;)t?(r.createSheet(h+i),i++):e.splice(h,0,null);h+=a,l+=a}if(t){e[h].id<1&&(e[h].id=n.i(d.k)(r.sheets),e[h].properties&&(e[h].properties.id=e[h].id)),e[h].name||r.setSheetPropertyOnMute(e[h],"name","Sheet"+n.i(d.l)(r));var p=0;e[h].rows.forEach(function(e){p=Math.max(p,e&&e.cells&&e.cells.length-1||0)}),r.setSheetPropertyOnMute(e[h],"usedRange",{rowIndex:e[h].rows.length?e[h].rows.length-1:0,colIndex:p})}o=h}(h),h=o}t.b=r,t.c=i,t.d=a,t.a=o;var s=n(0),l=n(2),d=n(4),c=n(3),h=(n.n(c),n(0))},function(e,t,n){"use strict";n.d(t,"a",function(){return b});var r=n(3),i=(n.n(r),n(26)),a=n(29),o=n(4),s=n(2),l=n(6),d=n(25),c=n(0),h=n(19),p=n(41),u=n(14),f=n(42),g=n(7),m=n(38),v=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=this&&this.__assign||function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},y.apply(this,arguments)},C=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},b=function(e){function t(t){var n=e.call(this,t)||this;return n.isEdit=!1,n.sheetNameCount=1,n.dataValidationRange="",n.isOpen=!1,n.chartColl=[],n.customFormulaCollection=new Map,b.Inject(c._196,h.a,h.b,p.a,u.a,u.b,h.c,h.d,u.c,h.e,u.d,c._213,u.e,u.f,u.g,m.a,h.f,h.g,u.h),n.commonCellStyle={},t&&t.cellStyle&&(n.commonCellStyle=t.cellStyle),"workbook"===n.getModuleName()&&(n.serviceLocator=new f.a,n.initWorkbookServices(),n.dataBind(),n.initEmptySheet()),n}v(t,e),b=t,t.prototype.preRender=function(){Object.keys(this.commonCellStyle).length||(this.commonCellStyle=n.i(d.b)(this.cellStyle,!0)),"spreadsheet"!==this.getModuleName()||this.refreshing||this.initEmptySheet()},t.prototype.initWorkbookServices=function(){this.serviceLocator.register(s.E,new r.L10n(this.getModuleName(),s.F,this.locale))},t.prototype.render=function(){},t.prototype.requiredModules=function(){return n.i(a.a)(this)},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.cellFormat=function(e,t){var n=this.getActiveSheet();t=t||n.selectedRange,this.notify(s.G,{style:e,range:t,refreshRibbon:t.indexOf(n.activeCell)>-1})},t.prototype.lockCells=function(e,t){var n=this.getActiveSheet();e=e||n.selectedRange,this.notify(s.H,{range:e,isLocked:t,triggerEvent:!0})},t.prototype.getCellStyleValue=function(e,t){var r=this,i=n.i(d.c)(t[0],t[1],this.getActiveSheet()),a={};return e.forEach(function(e){a[""+e]=r.cellStyle[""+e],i&&i.style&&i.style[""+e]&&(a[""+e]=i.style[""+e])}),a},t.prototype.numberFormat=function(e,t){this.notify(l.o,{format:e,range:t}),this.notify(l.p,{format:e})},t.prototype.createSheet=function(e,t){void 0===e&&(e=this.sheets.length),void 0===t&&(t=[{}]);var r;(r=this.sheets).splice.apply(r,[e,0].concat(t)),n.i(i.f)(this,t),this.notify(s.I,{sheetIndex:e||0,sheets:t}),this.notify(l.g,{action:"registerSheet",sheetIndex:e||0,sheetCount:e+t.length})},t.prototype.removeSheet=function(e){this.sheets.splice(e,1)},t.prototype.destroy=function(){this.notify(l.q,null),e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){for(var a=0,o=Object.keys(e);a<o.length;a++){switch(o[a]){case"cellStyle":n.i(r.merge)(this.commonCellStyle,e.cellStyle);break;case"sheets":e.sheets===this.sheets?(this.notify(l.g,{action:"unRegisterSheet",propertyChange:!0}),this.sheetNameCount=1,this.notify(l.r,{}),n.i(i.f)(this),this.notify(s.I,null),this.notify(l.g,{action:"registerSheet"})):n.i(i.f)(this);break;case"listSeparator":this.notify(l.g,{action:"setArgumentSeparator"})}}},t.prototype.appendTo=function(t){e.prototype.appendTo.call(this,t)},t.prototype.hideRow=function(e,t,r){void 0===t&&(t=e),void 0===r&&(r=!0);for(var i=this.getActiveSheet(),a=e;a<=t;a++)n.i(c.u)(i,a,{hidden:r})},t.prototype.hideColumn=function(e,t,r){void 0===t&&(t=e),void 0===r&&(r=!0);for(var i=this.getActiveSheet(),a=e;a<=t;a++)n.i(c.C)(i,a,{hidden:r})},t.prototype.setBorder=function(e,t,n,r){this.notify(s.G,{style:e,borderType:n,range:t||this.getActiveSheet().selectedRange,isUndoRedo:r})},t.prototype.insertRow=function(e,t,n){this.notify(s.J,{model:this.getSheetModel(n),start:e,end:t,modelType:"Row",insertType:"below"})},t.prototype.insertColumn=function(e,t,n){this.notify(s.J,{model:this.getSheetModel(n),start:e,end:t,modelType:"Column",insertType:"after"})},t.prototype.insertSheet=function(e,t){this.notify(s.J,{model:this,start:e,end:t,modelType:"Sheet"})},t.prototype.delete=function(e,t,i,a){e=e||0;var o;if(i&&"Sheet"!==i){if(!(o=this.getSheetModel(a)))return}else o=this;this.notify(s.K,{model:o,start:e,end:n.i(r.isNullOrUndefined)(t)?e:t,modelType:i||"Sheet"})},t.prototype.moveSheet=function(e,t){n.i(i.g)(this,e,t)},t.prototype.duplicateSheet=function(e){n.i(i.h)(this,e)},t.prototype.getSheetModel=function(e){if(n.i(r.isNullOrUndefined)(e))return this.getActiveSheet();var t="string"==typeof e?n.i(i.d)(this,e):e;return n.i(r.isNullOrUndefined)(t)||t>=this.sheets.length?null:this.sheets[t]},t.prototype.merge=function(e,t){var r,a;e?(r=n.i(s.L)(this,e),a=n.i(i.a)(this,r)):(a=this.getActiveSheet(),e=a.selectedRange),this.notify(s.M,{merge:!0,range:e,type:t||"All",sheetIndex:r,refreshRibbon:e.indexOf(a.activeCell)>-1,preventRefresh:this.activeSheetIndex!==r})},t.prototype.unMerge=function(e){var t,r;e?(t=n.i(s.L)(this,e),r=n.i(i.a)(this,t)):(r=this.getActiveSheet(),e=r.selectedRange),this.notify(s.M,{merge:!1,range:e,sheetIndex:t,type:"All",refreshRibbon:e.indexOf(r.activeCell)>-1,preventRefresh:this.activeSheetIndex!==t})},t.prototype.computeExpression=function(e){var t={action:"computeExpression",formula:e,isFromComputeExpression:!0};return this.notify(l.g,t),t.calcValue},t.prototype.initEmptySheet=function(){this.sheets.length?n.i(i.f)(this):this.createSheet()},t.prototype.getActiveSheet=function(){return this.sheets[this.activeSheetIndex]},t.prototype.skipHiddenSheets=function(e,t,n){return void 0===n&&(n=0),this.sheets[e]&&"Visible"!==this.sheets[e].state&&(void 0===t&&(t=e),e=e&&e+1===this.sheets.length?t-1:e<t?--e:++e,e=this.skipHiddenSheets(e,t,++n)),n===this.sheets.length?(this.setSheetPropertyOnMute(this.sheets[0],"state","Visible"),0):e},t.prototype.setUsedRange=function(e,t,n,r,i){if(void 0===n&&(n=this.getActiveSheet()),i)return n.usedRange.rowIndex=e,void(n.usedRange.colIndex=t);e>n.usedRange.rowIndex&&(n.usedRange.rowIndex=e,n!==this.getActiveSheet()||r||this.notify(s.N,{index:e,update:"row"})),t>n.usedRange.colIndex&&(n.usedRange.colIndex=t,n!==this.getActiveSheet()||r||this.notify(s.N,{index:t,update:"col"}))},t.prototype.getData=function(e){return n.i(o.o)(this,e)},t.prototype.getModuleName=function(){return"workbook"},t.prototype.goTo=function(e){},t.prototype.getValueRowCol=function(e,t,a,c,h,p,u){var f={action:"getSheetInfo",sheetInfo:[]};if(this.notify(l.g,f),-1===n.i(i.i)(this,"Sheet"+e,f.sheetInfo)){var g={action:"getReferenceError",refError:""};return this.notify(l.g,g),g.refError}var m=n.i(i.j)(this,e),v=n.i(i.a)(this,m),y=n.i(d.c)(t-1,a-1,v);if(c&&c.includes("!")&&!y&&v.ranges&&v.ranges.length){var C;if(this.formulaRefCell&&this.formulaRefCell===c)return y&&y.value;if(v.ranges.forEach(function(e){if(!e.info||!e.info.loadedRange||!e.info.loadedRange.length)return void(C=!0)}),C){if(this.formulaRefCell=c,m=n.i(i.j)(this,Number(c.substring(c.lastIndexOf(",")+1,c.length))),n.i(r.isNullOrUndefined)(m))return y&&y.value;c=c.substring(c.lastIndexOf("!")+1,c.lastIndexOf(",")),n.i(o.o)(this,v.name+"!A1:"+n.i(s.i)(t-1,a-1),null,null,null,null,c,m)}}else y&&y.formula&&(h||n.i(r.isNullOrUndefined)(y.value))&&!p&&this.notify("calculateFormula",{cell:y,rowIdx:t-1,colIdx:a-1,sheetIndex:m,formulaRefresh:!0});if(y&&!n.i(s.o)(y.value)&&!this.isEdit){var b={formattedText:y.value,value:y.value,format:y.format,cell:y,skipFormatCheck:!1};this.notify(l.c,b),y=b.cell}return u&&y&&y.formula&&y.formula.includes("SUBTOTAL(")?y.formula:y&&y.value},t.prototype.setValueRowCol=function(e,t,r,a,o,s){this.notify(c._50,{action:"updateCellValue",address:[r-1,a-1],value:t,sheetIndex:n.i(i.j)(this,e),isValueOnly:!0,formula:o,isRandomFormula:s})},t.prototype.open=function(e){this.notify(l.s,e)},t.prototype.openFromJson=function(e){this.isOpen=!0;var t="object"==typeof e.file?JSON.stringify(e.file):e.file;this.notify(l.s,{jsonObject:t,triggerEvent:e.triggerEvent})},t.prototype.save=function(e){if(void 0===e&&(e={}),this.allowSave){var t={url:this.saveUrl,fileName:e.fileName||"Sample",saveType:"Xlsx"},n=y({},t,e,{customParams:{},isFullPost:!0,needBlobData:!1,cancel:!1,autoDetectFormat:!1,pdfLayoutSettings:{fitSheetOnOnePage:!1,orientation:"Portrait"}});this.trigger("beforeSave",n),this.notify(c._34,{eventArgs:n,action:"beforeSave"}),n.cancel||this.notify(l.t,{saveSettings:n,isFullPost:n.isFullPost,needBlobData:n.needBlobData,customParams:n.customParams,pdfLayoutSettings:n.pdfLayoutSettings})}},t.prototype.saveAsJson=function(){var e=this;return new Promise(function(t){e.on(l.u,function(n){n.cancel=!0,e.off(l.u),t({jsonObject:{Workbook:n.jsonObject}}),e.notify(l.v,n)}),e.save()})},t.prototype.addHyperlink=function(e,t){var n={hyperlink:e,cell:t};this.notify(s.O,n)},t.prototype.findHandler=function(e){this.notify(l.w,e)},t.prototype.replaceHandler=function(e){"replace"===e.replaceBy?this.notify(l.x,e):this.notify(l.y,e)},t.prototype.protectSheet=function(e,t,a){n.i(r.isNullOrUndefined)(e)?e=this.activeSheetIndex:"string"==typeof e&&(e=n.i(i.d)(this,e));var o=this.sheets[e];o&&(this.setSheetPropertyOnMute(o,"isProtected",!0),this.setSheetPropertyOnMute(o,"password",a||""),this.setSheetPropertyOnMute(o,"protectSettings",t||{}),this.notify(l.z,{protectSettings:o.protectSettings,password:o.password,sheetIndex:e}))},t.prototype.unprotectSheet=function(e){if(n.i(r.isNullOrUndefined)(e)?e=this.activeSheetIndex:"string"==typeof e&&(e=n.i(i.d)(this,e)),this.sheets[e]){var t={sheet:e};this.notify(l.A,t)}},t.prototype.sort=function(e,t,n){if(!this.allowSorting)return Promise.reject();var r={range:t||this.getActiveSheet().selectedRange,sortOptions:e||{sortDescriptors:{}},cancel:!1},i=new Promise(function(e,t){e(void 0)}),a={args:r,promise:i,previousSort:n};return this.notify(l.B,a),a.promise},t.prototype.addDataValidation=function(e,t){"List"===e.type&&e.value1.length>256&&(e.value1=e.value1.substring(0,255)),this.notify(l.C,{rules:e,range:t||this.getActiveSheet().selectedRange})},t.prototype.removeDataValidation=function(e){this.notify(l.C,{range:e,isRemoveValidation:!0})},t.prototype.addInvalidHighlight=function(e){this.notify(l.D,{range:e})},t.prototype.removeInvalidHighlight=function(e){this.notify(l.E,{range:e})},t.prototype.isValidCell=function(e){var t=n.i(s.w)(e),r=n.i(d.c)(t[0],t[1],this.getActiveSheet());if(r&&r.validation){var i=r.value?r.value:"",a=this.activeSheetIndex,o={value:i,range:t,sheetIdx:a,isCell:!1,td:null,isValid:!0};return this.notify(l.F,o),o.isValid}return!0},t.prototype.conditionalFormat=function(e){e.range?","!==this.listSeparator&&e.range.includes(this.listSeparator)&&(e.range=e.range.split(this.listSeparator).join(",")):e.range=this.getActiveSheet().selectedRange,this.notify(c._119,{cfModel:e})},t.prototype.clearConditionalFormat=function(e){var t={};if(e&&e.includes("!")){var r=e.split("!");t.range=r[1],t.sheetIdx=n.i(i.d)(this,r[0])}else t.range=e||this.getActiveSheet().selectedRange,t.sheetIdx=this.activeSheetIndex;this.notify(c._121,t)},t.prototype.updateCell=function(e,t){var a,o;if(t||(t=this.getActiveSheet().activeCell),t.includes("!")){if(a=n.i(s.m)(t),void 0===(o=n.i(i.d)(this,t.split("!")[0])))return}else a=n.i(c.T)(t),o=this.activeSheetIndex;var l=n.i(i.a)(this,o);n.i(s.C)(this,l,{cell:e,rowIdx:a[0],colIdx:a[1],preventEvt:!0});var h=n.i(r.isNullOrUndefined)(e.value)?e.formula||null:e.value;if(null!==h&&this.notify(c._50,{action:"updateCellValue",address:a,value:h,sheetIndex:o}),o===this.activeSheetIndex){var p=void 0,u=n.i(d.c)(a[0],a[1],l,!1,!0),f={sheet:l,cell:u,rowIdx:a[0],colIdx:a[1]};(u.rowSpan>1||u.colSpan>1)&&(n.i(s.P)(f),p=this.getCell(f.rowIdx,f.colIdx)),this.serviceLocator.getService("cell").refresh(a[0],a[1],!0,p,null!==h),this.notify(s.Q,null),n.i(s.R)(n.i(c.T)(l.activeCell),f.rowIdx,f.colIdx)&&this.notify(g.a,{action:"refreshFormulabar",value:this.getDisplayText(e)||e.formula})}},t.prototype.getRowData=function(e,t){n.i(r.isNullOrUndefined)(e)&&(e=0),n.i(r.isNullOrUndefined)(t)&&(t=this.activeSheetIndex);var i={sheetIdx:t,startIndex:e,modelType:"Row",isDataRequest:!0};return this.notify(s.S,i),i.data},t.prototype.updateRange=function(e,t){t=t?t-1:this.activeSheetIndex;var a=n.i(i.a)(this,t),o=a.ranges;n.i(r.isNullOrUndefined)(a)||(o.push(e),a.ranges=o)},t.prototype.wrap=function(e,t){void 0===t&&(t=!0),n.i(d.e)(e,t,this)},t.prototype.addDefinedName=function(e){var t={action:"addDefinedName",isAdded:!1,definedName:e};return this.notify(l.g,t),t.isAdded},t.prototype.removeDefinedName=function(e,t){void 0===t&&(t="");var n={action:"removeDefinedName",isRemoved:!1,definedName:e,scope:t};return this.notify(l.g,n),n.isRemoved},t.prototype.clearRange=function(e,t,n){},t.prototype.insertImage=function(e,t){this.notify(s.T,{options:e,range:t||this.getActiveSheet().selectedRange})},t.prototype.autoFill=function(e,t,n,r){var i={dataRange:t||this.getActiveSheet().selectedRange,fillRange:e,direction:n||"Down",fillType:r||"FillSeries"};this.notify(s.U,i)},t.prototype.insertChart=function(e){this.notify(s.h,{chart:e})},t.prototype.deleteChart=function(e){this.notify(g.b,{id:e})},t.prototype.filter=function(e,t){if(!this.allowFiltering)return Promise.reject();var n={range:t||this.getActiveSheet().selectedRange,filterOptions:e,cancel:!1},r=new Promise(function(e,t){e(void 0)}),i={args:n,promise:r};return this.notify(l.G,i),i.promise},t.prototype.addCustomFunction=function(e,t,n){t=t||("string"==typeof e?e:e.name.replace("bound ",""));var r={action:"addCustomFunction",functionHandler:e,functionName:t,formulaDescription:n};this.notify(l.g,r)},t.prototype.clear=function(e){this.notify(l.H,e)},t.prototype.getDisplayText=function(e){if(!e)return"";if(e.format&&!n.i(r.isNullOrUndefined)(e.value)){var t={formattedText:e.value,value:e.value,format:e.format,cell:e,skipFormatCheck:!0};return this.notify(l.c,t),t.formattedText}return!e.value&&e.hyperlink?"string"==typeof e.hyperlink?e.hyperlink:e.hyperlink.address:e.value||"number"==typeof e.value?e.value.toString():""},t.prototype.freezePanes=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1);var r=this.getSheetModel(n);!this.allowFreezePane||r.frozenRows===e&&r.frozenColumns===t||(this.setSheetPropertyOnMute(r,"frozenRows",e),this.setSheetPropertyOnMute(r,"frozenColumns",t),this.updateTopLeftCell(),r.id===this.getActiveSheet().id&&"spreadsheet"===this.getModuleName()&&this.renderModule.refreshSheet())},t.prototype.Unfreeze=function(e){this.freezePanes(0,0,e)},t.prototype.unfreezePanes=function(e){this.freezePanes(0,0,e)},t.prototype.updateTopLeftCell=function(e,t,i,a){a||(a=this.getActiveSheet());var o=n.i(s.w)(a.topLeftCell);a.frozenRows||a.frozenColumns?((n.i(r.isNullOrUndefined)(e)||e<0)&&(e=a.frozenRows?0:o[0]),(n.i(r.isNullOrUndefined)(t)||t<0)&&(t=a.frozenColumns?0:o[1]),e+=this.frozenRowCount(a),t+=this.frozenColCount(a),i&&("row"===i?e=n.i(s.w)(a.paneTopLeftCell)[0]:t=n.i(s.w)(a.paneTopLeftCell)[1]),this.setSheetPropertyOnMute(a,"paneTopLeftCell",n.i(s.i)(e,t)),a.frozenRows&&(e=o[0]),a.frozenColumns&&(t=o[1])):(n.i(r.isNullOrUndefined)(e)&&(e=o[0]),n.i(r.isNullOrUndefined)(t)&&(t=o[1]),this.setSheetPropertyOnMute(a,"paneTopLeftCell",n.i(s.i)(e,t))),this.setSheetPropertyOnMute(a,"topLeftCell",n.i(s.i)(e,t))},t.prototype.getAddressInfo=function(e){return n.i(s.V)(this,e)},t.prototype.setSheetPropertyOnMute=function(e,t,n){this.isProtectedOnChange=!0,e[""+t]=n,this.isProtectedOnChange=!1},t.prototype.frozenRowCount=function(e){return e.frozenRows?"A1"===e.topLeftCell?e.frozenRows:n.i(s.w)(e.topLeftCell)[0]+e.frozenRows:0},t.prototype.frozenColCount=function(e){return e.frozenColumns?"A1"===e.topLeftCell?e.frozenColumns:n.i(s.w)(e.topLeftCell)[1]+e.frozenColumns:0},t.prototype.updateRangeOnInsertDelete=function(e,t,n){var r,i=!1;return e.isInsert?(r=e.endIndex-e.startIndex+1,"Row"===e.modelType?(e.startIndex<=t[0]&&(t[0]+=r,i=!0),(e.startIndex<=t[2]||n&&e.startIndex===t[2]+1)&&(t[2]+=r,i=!0)):(e.startIndex<=t[1]&&(t[1]+=r,i=!0),(e.startIndex<=t[3]||n&&e.startIndex===t[3]+1)&&(t[3]+=r,i=!0))):"Row"===e.modelType?(r=t[0]-e.startIndex,r>0&&(t[0]>e.endIndex?(r=e.endIndex-e.startIndex+1)>0&&(t[0]-=r,i=!0):(t[0]-=r,i=!0)),e.startIndex<=t[2]&&(e.endIndex<=t[2]?t[2]-=e.endIndex-e.startIndex+1:t[2]-=t[2]-e.startIndex+1,i=!0)):(r=t[1]-e.startIndex,r>0&&(t[1]>e.endIndex?(r=e.endIndex-e.startIndex+1)>0&&(t[1]-=r,i=!0):(t[1]-=r,i=!0)),e.startIndex<=t[3]&&(e.endIndex<=t[3]?t[3]-=e.endIndex-e.startIndex+1:t[3]-=t[3]-e.startIndex+1,i=!0)),i},t.prototype.getCell=function(e,t,n){return null},t.prototype.dateToInt=function(e,t){return n.i(s.W)(e,t)},t.prototype.setDateFormat=function(e,t,r){var a=n.i(i.a)(this,n.i(i.j)(this,e)),o=n.i(d.c)(t,r,a,null,!0).format;o&&"General"!==o||n.i(d.a)(t,r,a,{format:n.i(p.b)("ShortDate")},!0)};var b;return C([n.i(r.Collection)([],i.k)],t.prototype,"sheets",void 0),C([n.i(r.Property)(0)],t.prototype,"activeSheetIndex",void 0),C([n.i(r.Property)("100%")],t.prototype,"height",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowFindAndReplace",void 0),C([n.i(r.Property)()],t.prototype,"filterCollection",void 0),C([n.i(r.Property)()],t.prototype,"sortCollection",void 0),C([n.i(r.Property)("100%")],t.prototype,"width",void 0),C([n.i(r.Property)(!0)],t.prototype,"showRibbon",void 0),C([n.i(r.Property)(!0)],t.prototype,"showFormulaBar",void 0),C([n.i(r.Property)(!0)],t.prototype,"showSheetTabs",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowEditing",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowOpen",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowSave",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowSorting",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowFiltering",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowNumberFormatting",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowCellFormatting",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowHyperlink",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowInsert",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowDelete",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowMerge",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowDataValidation",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowImage",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowChart",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowAutoFill",void 0),C([n.i(r.Complex)({},s.X)],t.prototype,"autoFillSettings",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowConditionalFormat",void 0),C([n.i(r.Complex)({},s.B)],t.prototype,"cellStyle",void 0),C([n.i(r.Property)("")],t.prototype,"openUrl",void 0),C([n.i(r.Property)("")],t.prototype,"saveUrl",void 0),C([n.i(r.Property)("")],t.prototype,"password",void 0),C([n.i(r.Property)(!1)],t.prototype,"isProtected",void 0),C([n.i(r.Collection)([],s.Y)],t.prototype,"definedNames",void 0),C([n.i(r.Event)()],t.prototype,"beforeOpen",void 0),C([n.i(r.Event)()],t.prototype,"openFailure",void 0),C([n.i(r.Event)()],t.prototype,"beforeSave",void 0),C([n.i(r.Event)()],t.prototype,"saveComplete",void 0),C([n.i(r.Event)()],t.prototype,"beforeCellFormat",void 0),C([n.i(r.Event)()],t.prototype,"queryCellInfo",void 0),C([n.i(r.Event)()],t.prototype,"beforeCellUpdate",void 0),C([n.i(r.Property)(!0)],t.prototype,"allowFreezePane",void 0),C([n.i(r.Property)(",")],t.prototype,"listSeparator",void 0),t=b=C([r.NotifyPropertyChanges],t)}(r.Component)},function(e,t,n){"use strict";function r(e){var t="General";switch(e.split(" ").join("")){case"Number":t="0.00";break;case"Currency":t=a.Z.currency[0];break;case"Accounting":t=a.Z.accounting[0];break;case"ShortDate":t="mm-dd-yyyy";break;case"LongDate":t="dddd, mmmm dd, yyyy";break;case"Time":t="h:mm:ss AM/PM";break;case"Percentage":t="0.00%";break;case"Fraction":t="# ?/?";break;case"Scientific":t="0.00E+00";break;case"Text":t="@"}return t}function i(e,t){var n="General";switch(e){case'_-* #,##0.00_-;-* #,##0.00_-;_-* "-"_-;_-@_-':case'_-* #,##0_-;-* #,##0_-;_-* "-"_-;_-@_-':n="Number";break;case"$#,##0.00":case"$#,##0":case"$#,##0_);[Red]($#,##0)":case"$#,##0.00_);($#,##0.00)":case"$#,##0_);($#,##0)":case"$#,##0.00_);[Red]($#,##0.00)":n="Currency";break;case'_($*#,##0.00_);_($*(#,##0.00);_($*"-"??_);_(@_)':case'_($*#,##0.00_);_($* (#,##0.00);_($*"-"??_);_(@_)':case'_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)':case'_ $ * #,##0.00_ ;_ $ * -#,##0.00_ ;_ $ * "-"??_ ;_ @_ ':case'_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)':n="Accounting";break;case"mm-dd-yyyy":case"dd/MM/yyyy":n="ShortDate";break;case"dddd, mmmm dd, yyyy":n="LongDate";break;case"h:mm:ss AM/PM":n="Time";break;case"0.00%":case"0%":n="Percentage";break;case"0.00E+00":n="Scientific";break;case"@":n="Text";break;default:e&&(a.Z.currency.indexOf(e)>-1?n="Currency":a.Z.accounting.indexOf(e)>-1||'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)'===e||'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)'===e?n="Accounting":e.includes("?/?")?n="Fraction":e.includes("[$")&&(n=e.includes("* ")?"Accounting":"Currency"),t=!1)}return t&&("Currency"===n&&"$#,##0.00"!==a.Z.currency[0]||"Accounting"===n&&'_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)'!==a.Z.accounting[0])&&(n="General"),n}n.d(t,"a",function(){return h}),t.b=r,t.c=i;var a=n(2),o=n(4),s=n(3),l=(n.n(s),n(0)),d=n(27),c=n(2),h=function(){function e(e){this.parent=e,this.localeObj&&(a.Z.currency=["$#,##0.00","$#,##0","$#,##0_);[Red]($#,##0)","$#,##0.00_);($#,##0.00)","$#,##0_);($#,##0)","$#,##0.00_);[Red]($#,##0.00)"],a.Z.accounting=['_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)','_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)']),this.localeObj=n.i(s.getNumericObject)(this.parent.locale),this.decimalSep=this.localeObj.decimal,this.groupSep=this.localeObj.group;var t=s.IntlBase.getDependables(s.cldrData,this.parent.locale,null).dateObject;t.dayPeriods&&t.dayPeriods&&t.dayPeriods.format&&t.dayPeriods.format.wide?(this.localeObj.am=t.dayPeriods.format.wide.am||"AM",this.localeObj.pm=t.dayPeriods.format.wide.pm||"PM"):(this.localeObj.am="AM",this.localeObj.pm="PM");var r={},i=new s.Internationalization;if(i.getNumberFormat(r),"$"!==n.i(s.getNumberDependable)(this.parent.locale,r.currency)){var o=i.getNumberPattern({currency:"$",useGrouping:!0,format:"c0"},!0);if(o&&o.endsWith("$")){var l=o[o.indexOf("$")-1].trim().length?"":" ";a.Z.currency.forEach(function(e,t){if(e.includes("$#,##0")){var n="",r=e.split("$#,##0.")[1];if(r)for(var i=0;"0"==r[i];)n+="0",i++;n&&(n="."+n),a.Z.currency[t]=e.split("$#,##0"+n).join("#,##0"+n+l+"$")}}),a.Z.accounting.forEach(function(e,t){if(e.slice(0,e.indexOf("#")).includes("$")){var n,r=e.split(";");r.forEach(function(e,t){e.includes("$")&&(e=e.replace("$",""),(n=e.includes("0)")?e.indexOf("0)")+2:e.lastIndexOf(e.includes("0")?"0":e.includes("?")?"?":e.includes('"-"')?'"':"#")+1)>0&&(r[t]=e.slice(0,n)+l+"$"+e.slice(n)))}),a.Z.accounting[t]=r.join(";")}})}}this.addEventListener()}return e.prototype.numberFormatting=function(e){var t=this.parent.activeSheetIndex,r=!0;e.range&&e.range.indexOf("!")>-1&&(t=n.i(o.m)(this.parent,e.range.split("!")[0]),r=t===this.parent.activeSheetIndex);for(var i,s,l,d=n.i(o.g)(this.parent,t),c=e.range?e.range.indexOf("!")>-1?e.range.split("!")[1]:e.range:d.selectedRange,h=n.i(a.l)(c),p=h[0];p<=h[2];p++)for(var u=h[1];u<=h[3];u++)l=n.i(o.h)(p,u,d,!1,!0).format,n.i(a.C)(this.parent,d,{cell:{format:e.format},rowIdx:p,colIdx:u})||(s=n.i(o.h)(p,u,d),s.rowSpan<0||s.colSpan<0||(i={value:s.value,format:s.format,rowIndex:p,colIndex:u,sheetIndex:t,cell:s,refresh:r},this.getFormattedCell(i),r&&(this.setCell(i),this.parent.notify(a._0,{isRightAlign:i.isRightAlign,result:i.formattedText,rowIndex:p,colIndex:u,sheetIndex:i.sheetIndex,type:i.type,curSymbol:i.curSymbol,value:i.value||0===i.value?i.value:"",isRowFill:i.isRowFill,cellEle:i.td}),l&&l!==e.format&&l.includes("[")&&-1===n.i(o.p)().indexOf(n.i(o.q)(e.format))&&this.removeFormatColor(i,{format:l,style:s.style}))),this.parent.setUsedRange(p,u))},e.prototype.getFormattedCell=function(e){var t=void 0===e.value||null===e.value?"":e.value;e.sheetIndex=void 0===e.sheetIndex?this.parent.activeSheetIndex:e.sheetIndex;var c=n.i(o.g)(this.parent,e.sheetIndex),h=e.cell||n.i(o.h)(e.rowIndex,e.colIndex,c,!1,!0),p=!1,u={},f=new s.Internationalization;f.getNumberFormat(u);var g=n.i(s.getNumberDependable)(this.parent.locale,u.currency);if(e.format&&"General"!==e.format||e.skipFormatCheck||h.formula&&h.formula.toLowerCase().startsWith("=text("))e.type=i(e.format),e.skipFormatCheck&&!e.format&&"General"===e.type&&(e.format="General");else if(e.type=e.format="General",!h.formula||h.formula&&-1===h.formula.indexOf("&-")){var m={value:t,updatedVal:t,cell:h,isEdit:e.isEdit,intl:f};this.checkDateFormat(m),(m.isDate||m.isTime)&&(p=!0,h.value=e.value=m.updatedVal,h.format&&"General"!==h.format?(e.format=h.format,e.type=i(e.format)):h.format=e.format=r(m.isDate?"ShortDate":"Time"))}if(h.format&&this.isCustomType(h)){e.type="Custom";var v=h.format.indexOf("@")>-1;""!==t&&!v&&this.isPercentageValue(t.toString(),e,h)&&(t=e.value.toString());var y=void 0,C={},b=h.format;if(h.format=h.format.split("\\").join(""),h.format.indexOf(";")>-1)h.format.indexOf("<")>-1||h.format.indexOf(">")>-1?e.result=this.processCustomConditions(h,e):(e.result=this.processCustomAccounting(h,e,g),y=!n.i(a.o)(h.value)||"@"===h.format),h.format=b;else if(n.i(l.O)(h.format,!0,C,!0))""!==t&&(e.result=this.processCustomDateTime(e,h,"time"!==C.type),y=!e.formatApplied),e.result=e.result||h.value;else if(v)y=!0,e.result=this.processCustomText(h.format,t,e);else{var x=n.i(d.b)({value:t},this.parent.locale,this.groupSep,this.decimalSep);if(x.isNumber)if(h.value=e.value=x.value,h.format.includes("E+0")){e.format!==h.format&&(e.format=h.format),this.checkAndSetColor(e);var S=e.format.split("E")[0],w=S.split(".");"."!==this.decimalSep&&1===w.length&&(w=S.split(this.decimalSep)),e.result=w[0].length>1?this.scientificHashFormat(e,w):this.scientificFormat(e)}else e.result=this.processCustomNumberFormat(h,e),y=!n.i(a.o)(h.value);else h.format&&h.format.includes("[")&&this.removeFormatColor(e,{format:h.format,style:h.style}),y=e.dataUpdate=!0}e.dataUpdate?e.formattedText=e.result||(n.i(s.isNullOrUndefined)(e.value)?"":e.value.toString()):(e.value=e.result,e.formattedText=n.i(s.isNullOrUndefined)(e.value)?"":e.value.toString()),e.isRightAlign=!y&&!n.i(s.isNullOrUndefined)(e.value)}else{var _=this.processFormats(e,t,p,h,f,g,u.currency,c);e.formattedText=_.fResult||(void 0===e.value||null===e.value?"":e.value.toString()),e.isRightAlign=_.rightAlign}return e.curSymbol=g,e.formattedText},e.prototype.isCustomType=function(e){var t=i(e.format);return"General"===t&&"General"!==e.format||"Time"===t&&this.parent.isEdit},e.prototype.processCustomFill=function(e,t,n,r){var i=e[e.indexOf("*")+1],o=e.split("*"+i);if(void 0===n.rowIndex||n.dataUpdate)r=r||this.processCustomNumberFormat({format:o.join(""),value:t.value},n);else{var s=void 0;if(o[1]){var l=parseFloat(t.value);l<0?(s=this.processCustomNumberFormat({format:o[1],value:Math.abs(l).toString()},n),r="-"+o[0].split("'").join("")):(s=this.processCustomNumberFormat({format:o[1],value:t.value},n),r=o[0].split("'").join("")),0===l&&(s=s.split("0").join(""))}else r=r||this.processCustomNumberFormat({format:o[0],value:t.value},n);n.isRowFill=!0,this.setCell(n),this.parent.notify(a._1,{cell:t,cellEle:n.td,rowIdx:n.rowIndex,colIdx:n.colIndex,beforeFillText:r,repeatChar:i,afterFillText:s})}return r},e.prototype.processCustomDateTime=function(e,t,r){var i,o=this;if(!n.i(a.o)(t.value)&&!(i=function(){var e=t.value.toString();if(e.includes(o.localeObj.dateSeparator)||e.indexOf("-")>0||e.includes(o.localeObj.timeSeparator))return!0;var n=s.IntlBase.getDependables(s.cldrData,o.parent.locale,null).dateObject,r=n.months["stand-alone"]&&n.months["stand-alone"].abbreviated;return r&&!!Object.keys(r).find(function(t){return e.includes(r[""+t])})}()))return t.value||"";var l,d=t.format,c=new s.Internationalization,h=function(h){var u,f;if(i){if(f=n.i(a._2)(t.value,new s.Internationalization,o.parent.locale,d,t),u=f.dateObj&&"Invalid Date"!==f.dateObj.toString()){if(f.dateObj.getFullYear()<1900)return"";t.value=n.i(a.W)(f.dateObj,t.value.toString().includes(":"),"time"===f.type).toString()}}else{if(o.checkAndProcessNegativeValue(e,t.value))return e.formatApplied=!0,e.formattedText;f={dateObj:n.i(a._3)(parseFloat(t.value))},u=f.dateObj&&"Invalid Date"!==f.dateObj.toString()}if(u){h&&r&&(e.dateObj=f.dateObj),e.formatApplied=!0;var g=void 0;if(d.startsWith("MM-dd-yyyy "))d=d.split(" ").splice(1).join(" "),g=c.formatDate(f.dateObj,{type:"date",skeleton:"yMd"})+(d?" "+c.formatDate(f.dateObj,{type:l,format:d}):"");else if(g=c.formatDate(f.dateObj,{type:l,format:d}),d=d.toLowerCase(),d.startsWith("[h]")){var m=24*Number(t.value.toString().split(".")[0])+f.dateObj.getHours();g=m.toString()+g.slice(g.indexOf("]")+1)}else if(d.startsWith("[m")){var v=1440*Number(t.value.toString().split(".")[0])+60*f.dateObj.getHours()+f.dateObj.getMinutes();g=v.toString()+g.slice(g.indexOf("]")+1)}else d.startsWith("[s")&&(g=(86400*Number(t.value.toString().split(".")[0])+60*(60*f.dateObj.getHours()+f.dateObj.getMinutes())+f.dateObj.getSeconds()).toString());return p?g.replace(o.localeObj.am,"A").replace(o.localeObj.pm,"P"):g}return""};d=d.split("_(").join(" ").split("_)").join(" "),t.format.indexOf("h")>-1&&(d=d.split("h").join("H"),l="time"),t.format.indexOf("s")>-1&&(l="time");var p=t.format.indexOf("A/P")>-1;if((t.format.indexOf("AM/PM")>-1||p)&&(d=d.split("H").join("h"),d=d.split("A/P").join("AM/PM").split("AM/PM").join("a"),l="time"),t.format.indexOf("d")>-1){l="date";for(var u=d.split(" "),f=void 0,g=0;g<u.length;g++)(f=u[g].match(/d/g))&&f.length>2&&(u[g]=u[g].split("d").join("E"));d=u.join(" ")}if(t.format.indexOf("m")>-1)if(t.format.indexOf("s")>-1||t.format.indexOf("h")>-1){if(l="time",t.format.includes(" ")){var u=d.split(" ");(u[0].includes("d")||u[0].includes("y"))&&(u[0]=u[0].split("m").join("M"),d=u.join(" "))}}else if(l="date",d=d.split("m").join("M"),t.format.indexOf("mmmmm")>-1){d="MMMM";var m=h()[0];return d=t.format.split("mmmmm").join("p"),h(e.checkDate).split("p").join(m)}return h(e.checkDate)},e.prototype.processCustomConditions=function(e,t){if(n.i(a.o)(e.value)){for(var r=e.format.split(";"),i=Number(e.value),s=void 0,l=void 0,d=void 0,c=void 0,h=0;h<r.length;h++){if(e.format=r[h],c=n.i(o.q)(e.format),c&&(e.format=e.format.split("["+c+"]").join("")),!e.format.includes("[")){e.format=r[h],d=!1;break}if(s=e.format.split("[")[1].split("]")[0],2===(l=s.split("<=")).length&&i<=Number(l[1])||1===l.length&&2===(l=s.split(">=")).length&&i>=Number(l[1])||1===l.length&&2===(l=s.split("<")).length&&i<Number(l[1])||1===l.length&&2===(l=s.split(">")).length&&i>Number(l[1])){e.format=r[h].split("["+s+"]").join(""),d=!1;break}d=2===l.length}return d?(this.removeFormatColor(t,{format:r.join(""),style:e.style}),this.processCustomFill("*#",e,t,"#####")):this.processCustomNumberFormat(e,t)}return e.value},e.prototype.processCustomAccounting=function(e,t,r){var i,o=e.format.split(";"),s=n.i(d.b)(e,this.parent.locale,this.groupSep,this.decimalSep,r);s.isNumber&&(e.value=s.value,i=parseFloat(s.value));var l;if(i>0)l=o[0];else if(0===i)l=o[2]?o[2].includes(r+"0")?o[2].split("0").join("#"):o[2]:o[0];else{if(!n.i(a.o)(i)){var c=e.value||0===e.value?e.value:"";return e.format="@",o[3]?this.processCustomText(o[3],c,t):c.toString()}l=o[1]}return this.processCustomNumberFormat({format:e.format,value:i<0?Math.abs(i).toString():e.value,style:e.style},t,l)},e.prototype.processCustomText=function(e,t,n){t=t.toString();var r=this.processCustomNumberFormat({format:e.split("@").join("#"),value:t.split(t).join("1")},n);return r&&r.split("1").join(t)},e.prototype.thousandSeparator=function(e,t){for(;e;)t/=1e3,e--;return t},e.prototype.getSeparatorCount=function(e){for(var t=0,n=["#","0"],r=0;r<e.format.length;r++)","!==e.format[r]||n.indexOf(e.format[r+1])>-1||t++;return t},e.prototype.processDigits=function(e,t){t=t.split("?").join("0");var n=e.value.toString();if((n=this.getFormattedNumber(t,parseFloat(n)))&&n.includes(this.decimalSep)){var r=n.split(this.decimalSep);n=r[0]+this.decimalSep+r[1].split("0").join(" ")}return n||e.value},e.prototype.processFormatWithSpace=function(e,t,n){var r=" ",i={cell:t,char:r,width:0};this.parent.notify(l._145,i);for(var a,o=i.width,s={format:e,formattedText:""},d=0;d<e.length;d++)if("_"===e[d]){i.char=e[d+1],this.parent.notify(l._145,i);var c=i.width;a=Math.round(c/o),e=e.replace(e[d]+e[d+1],r.repeat(a))}var h=e.length-e.trim().length;if(h>0){if(s.formattedText=this.getFormattedNumber(e.trim(),n)," "===e[0]){for(var p=1,u=1;" "===e[u];)p++,u++;h-=p,s.formattedText=r.repeat(p)+s.formattedText}s.formattedText+=r.repeat(h)}else s.formattedText=this.getFormattedNumber(e,n);return s.format=e,s},e.prototype.removeFormatColor=function(e,t){n.i(o.p)().indexOf(n.i(o.q)(t.format))>-1&&(e.color=t.style&&t.style.color?t.style.color:"",this.applyColor(e))},e.prototype.processCustomNumberFormat=function(e,t,r){if(!e.format)return"";var i,s,l=e.value,c=e&&n.i(d.b)(e,this.parent.locale,this.groupSep,this.decimalSep).value;if(n.i(a.o)(c)){e.value=c,c=parseFloat(c.toString());var h=r||e.format;if(e.format.indexOf("[")>-1){var p=n.i(o.q)(h);p?(h=h.split("["+p+"]").join(""),t.color=p.toLowerCase(),this.applyColor(t)):this.removeFormatColor(t,e)}(h.indexOf('"')>-1||h.indexOf("\\")>-1)&&(h=this.processText(h),(s=0===c&&!h.includes("#")&&!h.includes("0"))&&(h+="#"));var u=this.getSeparatorCount(e);if(u){i=!0;var f=this.thousandSeparator(u,c);-1===h.indexOf(".")&&(f=Math.round(f)),l=this.getFormattedNumber(h.split(",").join(""),f),0===f&&(l=l.replace("0",""))}if(h.indexOf("?")>-1&&(i=!0,l=this.processDigits(e,h),h=h.split("?").join("")),h.indexOf("_")>-1){i=!0;var f=this.processFormatWithSpace(h,e,c);h=f.format,l=f.formattedText}if(l&&h.indexOf("?")>-1&&(l=l.replace("?"," ")),h.indexOf("*")>-1&&(i=!0,l=this.processCustomFill(h,e,t)),"General"===h&&(i=!0,l=c.toString()),i||(l=this.getFormattedNumber(h,c)),s&&l&&(l=l.replace("0","")),"#"===h[0]&&c>=0&&c<1){var g=h.split("#").join("").split(".");if(!g[0].includes("0")){0!==c||!h.includes(".")||g[1]&&g[1].includes("0")||(l=this.getFormattedNumber(h,.1),l=l.replace("1",""));var m=l.split(this.decimalSep);m[0]=m[0].toString().replace(/^0+/,""),l=m.join(this.decimalSep)}}"-0"===l&&(l="0")}return l},e.prototype.processText=function(e){var t=e;return t.indexOf('"')>-1?t=t.split('"').join("'"):t.indexOf("\\")>-1&&(t=t.split("\\").join("")),t},e.prototype.processFormats=function(e,t,r,i,o,s,l,c){var h;if(""!==t){var p=void 0;switch("General"!==e.type&&"Text"!==e.type&&this.isPercentageValue(t.toString(),e,i)&&(t=e.value.toString()),e.type){case"General":h={args:e,currencySymbol:s,fResult:t,intl:o,isRightAlign:r,curCode:l,cell:i,rowIdx:Number(e.rowIndex),colIdx:Number(e.colIndex),sheet:c},h.fResult.toString().startsWith("\n")||h.fResult.toString().endsWith("\n ")||this.autoDetectGeneralFormat(h),t=h.fResult,r=h.isRightAlign;break;case"Number":p=n.i(d.b)({value:t},this.parent.locale,this.groupSep,this.decimalSep),p.isNumber&&(i.value=e.value=p.value,t=this.applyNumberFormat(e,o),r=!0);break;case"Currency":p=n.i(d.b)({value:t,format:e.format},this.parent.locale,this.groupSep,this.decimalSep,s),p.isNumber&&(i.value=e.value=p.value,t=this.currencyFormat(e,o,l,i),r=!0);break;case"Percentage":p=n.i(d.b)({value:t},this.parent.locale,this.groupSep,this.decimalSep),p.isNumber&&(i.value=e.value=p.value,t=this.percentageFormat(e,o),r=!0);break;case"Accounting":t=this.accountingFormat(e,t,o,s,l,i),r=e.formatApplied;break;case"ShortDate":t=this.checkAndProcessNegativeValue(e,e.value)?e.formattedText:this.shortDateFormat(e,o),r=!!t;break;case"LongDate":t=this.checkAndProcessNegativeValue(e,e.value)?e.formattedText:this.longDateFormat(e,o),r=!!t;break;case"Time":t=this.checkAndProcessNegativeValue(e,e.value)?e.formattedText:this.timeFormat(e,o),r=!!t;break;case"Fraction":p=n.i(d.b)({value:t},this.parent.locale,this.groupSep,this.decimalSep),p.isNumber&&(i.value=e.value=p.value,t=this.fractionFormat(e),r=!0);break;case"Scientific":p=n.i(d.b)({value:t},this.parent.locale,this.groupSep,this.decimalSep),p.isNumber&&(i.value=e.value=p.value,t=this.scientificFormat(e),r=!0);break;case"Text":"."!==this.decimalSep&&n.i(a.o)(t)&&t.toString().includes(".")&&(t=t.toString().replace(".",this.decimalSep)),r=!1}}return{fResult:t,rightAlign:r}},e.prototype.autoDetectGeneralFormat=function(e){var t,i=e.fResult,l=e.args.cell&&e.args.cell.formula&&e.args.cell.formula.indexOf("ADDRESS(")>0,d=e.args.cell&&e.args.cell.formula&&e.args.cell.formula.indexOf("DOLLAR(")>0,c=e.args.cell&&e.args.cell.formula&&e.args.cell.formula.indexOf("TEXT(")>0;if(!(d&&e.fResult&&e.fResult.toString().includes(e.currencySymbol)||c)){if(e.fResult&&"."!==this.decimalSep){var h=e.fResult.toString();t=h,h.includes(this.decimalSep)&&(h=h.replace(this.decimalSep,"."),n.i(a.o)(h)&&(h.includes("E")?e.fResult=h:(e.fResult=e.args.value=h=Number(h).toString(),n.i(o.e)(e.rowIdx,e.colIdx,e.sheet,{value:h},!0)),t=h.replace(".",this.decimalSep)))}if(n.i(a.o)(e.fResult)){var h=Number(e.fResult).toString();if(e.fResult.toString().includes("E")?(e.args.format=r("Scientific"),n.i(o.e)(e.rowIdx,e.colIdx,e.sheet,{value:h,format:e.args.format},!0),e.args.value=h,e.fResult=this.scientificFormat(e.args)):e.args.format&&(e.args.format.indexOf("%")>-1?e.fResult=this.percentageFormat(e.args,e.intl):e.args.format.indexOf(e.currencySymbol)>-1?e.fResult=this.currencyFormat(e.args,e.intl,e.curCode,e.args.cell):e.fResult=this.applyNumberFormat(e.args,e.intl)),"General"===e.args.format){if(e.args.cell&&e.args.cell.formula&&h.includes(".")&&h.length>11){var p=h.indexOf(".")+1;t=null,e.args.cell.formula.includes("RANDBETWEEN")&&(e.fResult=h=p<7?h:parseFloat(h).toFixed(0))}e.cellVal=h,e.prevVal=t,this.parseDecimalNumber(e),n.i(s.isNullOrUndefined)(e.fResult)&&!n.i(s.isNullOrUndefined)(e.cellVal)&&(e.fResult=e.cellVal)}e.isRightAlign=!0}e.fResult&&this.updateAutoDetectNumberFormat(e),l&&(e.isRightAlign=!1,e.fResult=i)}},e.prototype.parseDecimalNumber=function(e){var t=e.cellVal.split(".");if(t[0].length>11){e.cellVal=Math.abs(Number(t[0])).toString().substring(0,6).replace(/0+$/,"");var r=e.cellVal.length-1;r>-1&&(e.fResult=this.scientificFormat(e.args,r>5?5:r))}else if(t[1])if(e.cellVal.length>11){var i=10-(t[0].length-(Math.sign(Number(e.cellVal))<0?1:0));e.fResult=e.intl.formatNumber(Number(e.cellVal),{format:i>0?"0."+"0".repeat(i):"0"}),e.fResult&&("."===this.decimalSep?e.fResult=Number(e.fResult).toString():e.fResult=Number(e.fResult.replace(this.decimalSep,".")).toString().replace(".",this.decimalSep))}else if(e.cellVal.includes("e-")){var a=e.cellVal.split("e-"),r=Number(a[1])+(a[0].includes(".")?a[0].split(".")[1].length:0);a[0]=a[0].replace(".",this.decimalSep),1===a[1].length&&(a[1]="0"+a[1]),e.args.updateValue||n.i(o.e)(e.rowIdx,e.colIdx,e.sheet,{value:Number(e.cellVal).toFixed(r)},!0),e.fResult=a.join("E-")}else e.prevVal?e.fResult=e.prevVal:e.args.updateValue&&"."!==this.decimalSep&&(e.fResult=e.cellVal.replace(".",this.decimalSep))},e.prototype.updateAutoDetectNumberFormat=function(e){var t=e.fResult.toString(),i=e.args.cell||e.cell;if(this.isPercentageValue(t,e.args,i))i.format=t.includes(this.decimalSep)?r("Percentage"):"0%",e.args.updateValue||(e.args.format=i.format,e.fResult=this.percentageFormat(e.args,e.intl),e.isRightAlign=!0);else{var s="";t.includes(e.currencySymbol)&&(s=t.includes(this.decimalSep)?a.Z.currency[0]:a.Z.currency[1],t=t.replace(e.currencySymbol,""));("."===this.decimalSep||e.args.isEdit&&!i.formula)&&t.includes(this.groupSep)&&n.i(d.a)(t,this.parent.locale,this.groupSep,this.decimalSep)&&(t=t.split(this.groupSep).join(""),s||(s=t.includes(this.decimalSep)?"#,##0.00":"#,##0")),s?(t=t.replace(this.decimalSep,"."),n.i(a.o)(t)&&(e.args.value=Number(t).toString(),e.args.updateValue?(e.args.cell.value=e.args.value,e.args.cell.format=s):(n.i(o.e)(e.rowIdx,e.colIdx,e.sheet,{value:e.args.value,format:s},!0),e.fResult=this.getFormattedNumber(s,Number(e.args.value)),e.isRightAlign=!0))):"."!==this.decimalSep&&"General"===e.args.format&&n.i(a.o)(t)&&t.includes(".")&&(e.fResult=Number(t).toString().replace(".",this.decimalSep))}},e.prototype.isPercentageValue=function(e,t,r){if(e.includes("%")){var i=e.split("%");if(""!==i[0]&&""===i[1].trim()){var a=n.i(d.b)({value:i[0]},this.parent.locale,this.groupSep,this.decimalSep);if(a.isNumber)return t.value=Number(a.value)/100,r.value=t.value.toString(),!0}}return!1},e.prototype.findSuffix=function(e,t){var n=e.length,r=n-t.length;return e.substr(0,r<0?0:r)+t},e.prototype.applyNumberFormat=function(e,t){e.format=this.isCustomFormat(e.format);var r=e.format.split(";");if(Number(e.value)>0)e.format=r[0];else if(0===Number(e.value)){if(e.format=r[2]?r[2]:r[0],e.format.indexOf('"')>-1&&-1===e.format.indexOf("#"))return e.format=e.format.split("_").join(" ").split("*").join(" ").split("?").join(" ").split('"').join(""),e.format}else if(Number(e.value)<0)e.format=n.i(s.isNullOrUndefined)(r[1])?r[0]:r[1].split("*").join(" "),e.format.indexOf("-")>-1&&(e.value=e.value.toString().split("-").join(""));else if(e.format=r[3]?r[3]:r[0],e.format=e.format.split("_").join(" ").split("*").join(" ").split("?").join(" "),e.format.indexOf("@")>-1)return e.format.split("@").join(e.value.toString());if(e.format=e.format.split("_").join(" ").split("*").join(" ").split('"').join(""),e.format.indexOf("?")>-1&&e.format.indexOf(this.decimalSep)>-1){var i=e.format.split(this.decimalSep)[1].length,a="";if(Number(e.value)%1){a=i>e.value.toString().split(".")[1].length?" ":"0"}e.format=e.format.split("?").join(a)}else e.format=e.format.split("?").join(" ");return Number(e.value)<0&&e.cell&&e.cell.format&&(e.format=e.cell.format),t.formatNumber(Number(e.value),{format:e.format})},e.prototype.isCustomFormat=function(e){return'_-* #,##0.00_-;-* #,##0.00_-;_-* "-"_-;_-@_-'!==e&&'_-* #,##0_-;-* #,##0_-;_-* "-"_-;_-@_-'!==e||(e=""),e=""===e?r("Number"):e,e=e.toString().split("_)").join(" ").split("_(").join(" ").split("[Red]").join("")},e.prototype.currencyFormat=function(e,t,i,a){e.format=e.format||r("Currency"),e.format=e.format.split("_(").join(" ").split("_)").join(" ");var l=e.format.split(";"),d=n.i(o.q)(e.format),c=Number(e.value);return c>=0||n.i(s.isNullOrUndefined)(l[1])?(d&&(e.color=a.style&&a.style.color?a.style.color:"",this.applyColor(e)),e.format=l[0]):(c=Math.abs(c),e.format=l[1].split("["+d+"]").join("").split("*").join(" "),d&&(e.color=d.toLowerCase(),this.applyColor(e))),e.format=this.getFormatForOtherCurrency(e.format),t.formatNumber(c,{format:e.format,currency:i})},e.prototype.applyColor=function(e){e.refresh&&(this.setCell(e),e.td&&e.td.style.color!==e.color&&this.parent.notify(a.f,{style:{color:e.color},rowIdx:e.rowIndex,colIdx:e.colIndex,td:e.td}))},e.prototype.setCell=function(e){if(!e.td){var t={sheet:n.i(o.g)(this.parent,e.sheetIndex),cell:e.cell,rowIdx:e.rowIndex,colIdx:e.colIndex};(e.cell.rowSpan>1||e.cell.colSpan>1)&&n.i(l._183)(t),e.td=this.parent.getCell(t.rowIdx,t.colIdx)}},e.prototype.percentageFormat=function(e,t){return e.format=""===e.format?r("Percentage"):e.format,t.formatNumber(Number(e.value),{format:e.format})},e.prototype.accountingFormat=function(e,t,i,a,o,s){e.format=e.format||r("Accounting"),e.format=e.format.split("_(").join(" ").split("_)").join(" ").split("[Red]").join("").split("_").join("");var l=e.format.split(";"),c=n.i(d.b)({value:t},this.parent.locale,this.groupSep,this.decimalSep);if(c.isNumber){s.value=e.value=c.value;var h=Number(e.value);if(h>=0?e.format=0===h&&l[2]?l[2]:l[0]:(e.format=l[1].split("*").join(" "),h=Math.abs(h)),e.format.includes(a)||e.format.includes("$")||(o=a=""),e.format=this.getFormatForOtherCurrency(e.format),e.formatApplied=!0,0===h){if(e.format=this.processText(e.format.split("*").join(" ").split("?").join(" ")),!e.format.includes("#")&&!e.format.includes("0")){e.format+="#";var p=i.formatNumber(h,{format:e.format,currency:o});return p.includes("0")&&(p=p.replace("0","")),p}return i.formatNumber(h,{format:e.format,currency:o})}return i.formatNumber(h,{format:e.format,currency:o})}return l[3]?this.processCustomText(l[3],t,e):t},e.prototype.getFormatForOtherCurrency=function(e){if(e.indexOf("[$")>-1){var t=e.split("]")[0].split("[$")[1].split("-")[0];e=e.indexOf("0")>e.indexOf("[$")?t+e.slice(e.indexOf("]")+1,e.length):e.slice(0,e.indexOf("[$"))+t}return e},e.prototype.checkAndProcessNegativeValue=function(e,t){if(t&&n.i(a.o)(t)&&Number(t)<0){if(void 0===e.rowIndex||e.dataUpdate)return e.formattedText="#".repeat(e.dataUpdate?7:10),!0;e.isRowFill=!0,this.setCell(e);var r={cell:e.cell,cellEle:e.td,rowIdx:e.rowIndex,colIdx:e.colIndex,repeatChar:"#"};return this.parent.notify(a._1,r),e.formattedText=r.formattedText,!0}return!1},e.prototype.shortDateFormat=function(e,t){var i,o;if(""===e.format||"General"===e.format||e.format===r("ShortDate")?(o="MM-dd-yyyy",i={type:"date",skeleton:"yMd"}):(o=e.format,i={type:"date",format:o}),e.value&&(e.value=e.value.toString(),!n.i(a.o)(e.value)&&(e.value.includes(this.localeObj.dateSeparator)||e.value.indexOf("-")>0))){"dd-MM-yyyy"!==o&&"dd/MM/yyyy"!==o||(o="");var s=n.i(a._2)(e.value,t,this.parent.locale,o,e.cell).dateObj;if(s&&"Invalid Date"!==s.toString())return s.getFullYear()<1900?n.i(a.o)(e.value)?e.value:"":(e.value=n.i(a.W)(s).toString(),e.cell&&(e.cell.value=e.value),e.checkDate&&(e.dateObj=s),t.formatDate(s,i))}var l=n.i(a._3)(e.value);return l&&"Invalid Date"!==l.toString()&&l.getFullYear()<1900?n.i(a.o)(e.value)?e.value.toString():"":(e.checkDate&&(e.dateObj=l),t.formatDate(l,i))},e.prototype.longDateFormat=function(e,t){e.value=e.value.toString();var i;if((e.value.includes(this.localeObj.dateSeparator)||e.value.indexOf("-")>0)&&!n.i(a.o)(e.value)){if(!((i=n.i(a._2)(e.value,t,this.parent.locale,"",e.cell).dateObj)&&"Invalid Date"!==i.toString()&&i.getFullYear()>=1900))return n.i(a.o)(e.value)?e.value:"";e.value=n.i(a.W)(i).toString(),e.cell&&(e.cell.value=e.value)}else if((i=n.i(a._3)(e.value))&&"Invalid Date"!==i.toString()&&i.getFullYear()<1900)return n.i(a.o)(e.value)?e.value:"";var o=""===e.format||"General"===e.format?r("LongDate"):e.format.toString();return o===r("LongDate")&&(o="EEEE, MMMM d, y"),e.checkDate&&(e.dateObj=i),t.formatDate(i,{type:"date",format:o})},e.prototype.timeFormat=function(e,t){if(n.i(s.isNullOrUndefined)(e.value))return"";var i=""===e.format||"General"===e.format||e.format===r("Time")?"h:mm:ss a":e.format,o=e.value.toString();if(!n.i(a.o)(o)&&o.includes(this.localeObj.timeSeparator)){var l=n.i(a._2)(o,t,this.parent.locale,i,e.cell);if(!l.dateObj||"Invalid Date"===l.dateObj.toString())return"";o=e.value=n.i(a.W)(l.dateObj,!0,l.type&&"time"===l.type).toString(),e.cell&&(e.cell.value=e.value)}var d=o.split(".");return n.i(s.isNullOrUndefined)(d[1])||(e.value=parseFloat(d[0]+1+"."+d[1])||e.value),t.formatDate(n.i(a._3)(e.value),{type:"time",skeleton:"medium",format:i})},e.prototype.scientificHashFormat=function(e,t){var n,r=this.findDecimalPlaces(e.format),i=t[0].split("0").length-1+(t[0].split("#").length-1),a=Number(e.value).toExponential(r+i);if(a.includes("e+"))n="e+";else{if(!a.includes("e-"))return a;n="e-"}var o,s=a.split(n),l=s[0].split("."),d=Number(s[1]);if("e-"===n){var c=d+Math.abs(d-i*(d>i?2:1));o=c-d,s[1]=c.toString()}else o=d%i,s[1]=(d-o).toString();o>0&&(l[0]+=l[1].substring(0,o),l[1]=l[1].slice(o),s[0]=l.join("."));var h=Number("1"+"0".repeat(r));return this.getFormattedNumber(t.join("."),Number((Math.round(Number(s[0])*h)/h).toFixed(r)))+n.toUpperCase()+this.findSuffix(e.format.split("+")[1],s[1])},e.prototype.scientificFormat=function(e,t){e.format||(e.format=r("Scientific"));var n=e.format.split("+")[1]||"00";void 0===t&&(t=this.findDecimalPlaces(e.format));var i=Number(e.value).toExponential(t);return i.indexOf("e+")>-1?i=i.split("e+")[0]+"E+"+this.findSuffix(n,i.split("e+")[1]):i.indexOf("e-")>-1&&(i=i.split("e-")[0]+"E-"+this.findSuffix(n,i.split("e-")[1])),i.replace(".",this.decimalSep)},e.prototype.fractionFormat=function(e){e.format=e.format||r("Fraction"),this.checkAndSetColor(e);var t=e.value.toString().split("."),i=this.getFormattedNumber(e.format.split(" ")[0],Number(t[0])),o=e.format.split("?").length/2;if(2===t.length&&!t[1].startsWith("0".repeat(o))){var s=n.i(a._4)(Number(e.value));if(s)return i+" "+s}return i+" "+" ".repeat(2*o)},e.prototype.checkAndSetColor=function(e){var t=n.i(o.q)(e.format);t&&(e.format=e.format.split("["+t+"]").join(""),e.color=t.toLowerCase(),this.applyColor(e))},e.prototype.findDecimalPlaces=function(e){var t=e.toUpperCase().indexOf("E");if(t>-1){var n=e.indexOf(this.decimalSep);return-1===n&&"."!==this.decimalSep&&(n=e.indexOf(".")),n>0?e.substring(n+1,t).length:0}return 2},e.prototype.checkDateFormat=function(e){if(!n.i(s.isNullOrUndefined)(e.value)){var t=e.cell||n.i(o.h)(e.rowIndex,e.colIndex,n.i(o.g)(this.parent,n.i(s.isNullOrUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex),!1,!0),i=this.checkCustomDateFormat(e.value.toString(),t,e.isEdit);if("Invalid"!==i.val){var l=n.i(a._2)(i.val,e.intl||new s.Internationalization(this.parent.locale),this.parent.locale,i.format,e.skipCellFormat&&t,i.isDateTime);if(!n.i(s.isNullOrUndefined)(l.dateObj)&&"Invalid Date"!==l.dateObj.toString()&&l.dateObj.getFullYear()>=1900){if(i.val=n.i(a.W)(l.dateObj,i.val.indexOf(":")>-1,l.type&&"time"===l.type).toString(),(!t.format||"General"===t.format)&&("time"===l.type?t.format=r("Time"):t.format=r("ShortDate"),e.updateValue))return void(t.value=i.val);e.isDate="date"===l.type||"datetime"===l.type,e.isTime="time"===l.type,e.dateObj=l.dateObj}e.updatedVal=i.val}}},e.prototype.checkCustomTimeFormat=function(e,t){var r=this,i=[],o=" "+this.localeObj.am,s=" "+this.localeObj.pm,l=e.includes(o)||e.includes(s);l||(e.includes(o.toLowerCase())||e.includes(s.toLowerCase()))&&(e=e.replace(o.toLowerCase(),o).replace(s.toLowerCase(),s),l=!0);var d,c=e.split(this.localeObj.timeSeparator),h=3===c.length&&l;if(c.length<=3){var p,u,f=l?12:24;c.forEach(function(t,l){t.includes(o)||t.includes(s)?(d=" AM/PM",t=t.replace(o,"").replace(s,"")):d="",p=Number(t),n.i(a.o)(p)&&p>=0?p<=f&&0===l?(i.push("h"+d),1===c.length&&(d?(u=e.split(" "),u[0]+=r.localeObj.timeSeparator+"00",c[0]=u.join(" ")):(i=[],e="Invalid"))):p<=60&&(1===i.length||2===i.length)?(1===i.length?i.push("mm"+d):i.push("ss"),1===t.length&&(c[l]="0"+c[l])):(i=[],e="Invalid"):(i=[],e="Invalid")})}else e="Invalid";return!i.length||(e=c.join(this.localeObj.timeSeparator),t.format&&"General"!==t.format||h)?{val:e,format:""}:(t.format=i.join(":"),{val:e,format:t.format})},e.prototype.checkCustomDateFormat=function(e,t,i){var a,o,l=this,d=t.format;if(e.includes(this.localeObj.dateSeparator)&&(!e.includes(" "+this.localeObj.am)&&!e.includes(" "+this.localeObj.pm)||e.replace(" "+this.localeObj.am,"").replace(" "+this.localeObj.pm,"").includes(this.localeObj.dateSeparator))){if(a=this.localeObj.dateSeparator,e.includes(this.localeObj.timeSeparator)&&e.includes(" ")){var c=e.split(" ");if(e=c.shift(),o=this.checkCustomTimeFormat(c.join(" "),t),"Invalid"===o.val)return{val:"Invalid",format:""}}}else{if(!(e.indexOf("-")>0))return e.includes(this.localeObj.timeSeparator)||e.includes(" "+this.localeObj.am)||e.includes(" "+this.localeObj.pm)?this.checkCustomTimeFormat(e,t):{val:"Invalid",format:""};a="-"}var h,p=e.split(a),u="",f=[],g=function(){u=f.join(a),d&&"General"!==d||(t.format=u+(t.format&&"General"!==t.format?" "+t.format:""))},m=s.IntlBase.getDependables(s.cldrData,this.parent.locale,null).dateObject,v=m.months["stand-alone"]?m.months["stand-alone"].wide:{},y=m.months["stand-alone"]?m.months["stand-alone"].abbreviated:{1:""},C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],b=function(e,t,n,r){if(y[""+t]&&y[""+t].toLowerCase()===n)return void(h=y[""+t]);e.substring(0,r)===n&&(h=y[""+t]||C[Number(t)-1])};if(2===p.length){var x=function(t){e=h,f[0]="MMM",Number(t)<=31?(e=t+a+e,"/"!==l.localeObj.dateSeparator&&"-"!==a&&(e+=a+(new Date).getFullYear()),f.splice(0,0,"dd"),g()):Number(t)>=1900&&Number(t)<=9999?(e="1"+a+e+a+t,f[1]="yy",g(),f[1]="yyyy",u=f.join(a)):e="Invalid"};p[0]=p[0].toLowerCase().trim(),p[1]=p[1].toLowerCase().trim(),!Number(p[0])&&p[0].length>=y[1].length?(Object.keys(v).find(function(e){return b(v[""+e].toLowerCase(),e,p[0],p[0].length)}),n.i(s.isNullOrUndefined)(h)||p[0].includes(",")||x(p[1])):!Number(p[1])&&p[1].length>=y[1].length?(Object.keys(v).find(function(e){return b(v[""+e].toLowerCase(),e,p[1],p[1].length)}),n.i(s.isNullOrUndefined)(h)||x(p[0])):Number(p[0])&&Number(p[0])<=12&&Number(p[1])&&("/"===this.localeObj.dateSeparator||"-"===a||i&&!t.formula)&&(h=C[Number(p[0])-1],x(p[1])),f.length||(e="Invalid")}else if(p.length>2)for(var S=0;S<p.length;S++)!function(t){Number(p[t])>-1||(p[t]=p[t].trim(),Object.keys(v).find(function(e){return b(v[""+e].toLowerCase(),e,p[t].trim().toLowerCase(),p[t].length)}),n.i(s.isNullOrUndefined)(h)?e="Invalid":1===t&&(f[1]="MMM",p[2]=p[2].trim(),Number(p[0])<31&&Number(p[2])>=1900&&Number(p[2])<=9999&&(e=p[0]+a+h,e+=a+p[2],f[0]="d",f[2]="yy",g(),f[2]="yyyy",u=f.join(a))))}(S);var w;return o&&"Invalid"!==e&&(u||d&&"General"!==d?o.format&&(u+=" "+o.format):t.format=r("ShortDate")+" "+(o.format||r("Time")),e+=" "+o.val,w=!0),{val:e,format:u,isDateTime:w}},e.prototype.formattedBarText=function(e){var t=this;if(""!==e.value&&!n.i(s.isNullOrUndefined)(e.value)){var i={},o=e.cell&&e.cell.format||"",d=e.type||(o&&n.i(l.O)(o,!0,i,!0)?i.type:""),c=new s.Internationalization,h=e.value,p=!e.showFormattedText||"dd-MM-yyyy"!==o&&"dd/MM/yyyy"!==o?r("ShortDate"):o,u=r("Time"),f=o.toLowerCase(),g=function(){"."!==t.decimalSep&&e.value&&(e.value=e.value.toString(),n.i(a.o)(e.value)&&e.value.includes(".")&&(e.value=e.value.replace(".",t.decimalSep)))};if("time"!==d||!f.includes("m")||f.includes(":m")||f.includes("m:")||f.includes("[m")||f.includes("am")||(d="date"),"date"===d){var m=e.value.toString();e.value=this.shortDateFormat({type:d,value:e.value,format:p,cell:e.cell},c),e.value&&m.includes(".")&&(e.value+=" "+this.timeFormat({type:d,value:m,format:u},c))}else d.includes("time")?h&&Number(h)>=1||"datetime"===d?e.value=this.shortDateFormat({type:d,value:e.value,format:p},c)+" "+this.timeFormat({type:d,value:e.value,format:u},c):e.value=this.timeFormat({type:d,value:e.value,format:u},c):e.cell.format&&e.cell.format.includes("%")&&n.i(a.o)(e.cell.value)?(e.value=this.parent.getDisplayText(e.cell),e.value.includes("%")||(e.value=h,g())):g();(!e.value||e.value&&e.value.toString().indexOf("null")>-1)&&(e.value=h)}},e.prototype.getFormattedNumber=function(e,t){return(new s.Internationalization).formatNumber(Number(t),{format:e})||""},e.prototype.addEventListener=function(){this.parent.on(a._5,this.numberFormatting,this),this.parent.on(a.d,this.getFormattedCell,this),this.parent.on(a._6,this.checkDateFormat,this),this.parent.on(a._7,this.formattedBarText,this),this.parent.on(c._8,this.updateAutoDetectNumberFormat,this),this.parent.on(c._9,this.parseDecimalNumber,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._5,this.numberFormatting),this.parent.off(a.d,this.getFormattedCell),this.parent.off(a._6,this.checkDateFormat),this.parent.off(a._7,this.formattedBarText),this.parent.off(c._8,this.updateAutoDetectNumberFormat),this.parent.off(c._9,this.parseDecimalNumber))},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"workbookNumberFormat"},e}()},function(e,t,n){"use strict";var r=n(120);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e){for(var t=[],n=0,r="A";e>0&&n<9;){e--;var i=r.charCodeAt(0);t[n]=String.fromCharCode(e%26+i),e=parseInt((e/26).toString(),10),n++}for(var a=[],o=0;o<n;o++)a[n-o-1]=t[o];return a.join("")}n.d(t,"a",function(){return p}),n.d(t,"b",function(){return u}),n.d(t,"c",function(){return f}),n.d(t,"d",function(){return g}),t.e=r,n.d(t,"f",function(){return m});var i=n(3),a=(n.n(i),n(33)),o=n(18),s=n(23),l=n(32),d=n(0),c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},p=function(e){function t(t){var r=e.call(this,null,null)||this;r.lFormulas=new Map,r.storedData=new Map,r.keyToRowsMap=new Map,r.rowsToKeyMap=new Map,r.rightBracket=String.fromCharCode(161),r.leftBracket=String.fromCharCode(162),r.sheetToken="!",r.emptyString="",r.leftBrace="{",r.rightBrace="}",r.cell=r.emptyString,r.cellPrefix="!0!A",r.treatEmptyStringAsZero=!1,r.tic='"',r.singleTic="'",r.trueValue="TRUE",r.falseValue="FALSE",r.parseDecimalSeparator=".",r.arithMarker=String.fromCharCode(180),r.arithMarker2=r.arithMarker+r.arithMarker,r.dependentCells=null,r.dependentFormulaCells=null,r.minValue=Number.MIN_SAFE_INTEGER,r.maxValue=Number.MAX_SAFE_INTEGER,r.categoryCollection=["All"],r.dependencyLevel=0,r.randomValues=new Map,r.isRandomVal=!1,r.randCollection=[],r.dependencyCollection=[],r.uniqueRange=[],r.formulaErrorStrings=["binary operators cannot start an expression","cannot parse","bad library","invalid char in front of","number contains 2 decimal points","expression cannot end with an operator","invalid characters following an operator","invalid character in number","mismatched parentheses","unknown formula name","requires a single argument","requires 3 arguments","invalid Math argument","requires 2 arguments","#NAME?","too complex","circular reference: ","missing formula","improper formula","invalid expression","cell empty","bad formula","empty expression","","mismatched string quotes","wrong number of arguments","invalid arguments","iterations do not converge","Control is already registered","Calculation overflow","Missing sheet","cannot_parse","expression_cannot_end_with_an_operator","#SPILL!","#DIV/0!"],r.errorStrings=null,r.parseArgumentSeparator=",",r.dateTime1900=new Date(1900,0,1,0,0,0),r.isParseDecimalSeparatorChanged=!1,r.isArgumentSeparatorChanged=!1,r.sheetFamilyID=0,r.defaultFamilyItem=null,r.sheetFamiliesList=null,r.modelToSheetID=null,r.tokenCount=0,r.sortedSheetNames=null,r.tempSheetPlaceHolder=String.fromCharCode(133),r.namedRanges=new Map,r.formulaInfoTable=null,r.oaDate=new Date(1899,11,30),r.millisecondsOfaDay=864e5,r.parseDateTimeSeparator="/";var s=new o.h(r);return r.includeBasicFormulas&&p.Inject(a.a),r.injectedModules&&r.injectedModules.length&&s.inject(r.requiredModules(),r.injectedModules),r.parentObject=n.i(i.isNullOrUndefined)(t)?r:t,r.grid=r.parentObject,r.parser=new l.a(r),r}c(t,e),p=t,Object.defineProperty(t.prototype,"libraryFormulas",{get:function(){return this.lFormulas},set:function(e){this.lFormulas.set(e.fName,{handler:e.handler,category:e.category,description:e.description})},enumerable:!0,configurable:!0}),t.prototype.getParseArgumentSeparator=function(){return this.isArgumentSeparatorChanged||","===this.parseArgumentSeparator||(this.parseArgumentSeparator=","),this.parseArgumentSeparator},t.prototype.setParseArgumentSeparator=function(e){this.parseArgumentSeparator=e,this.isArgumentSeparatorChanged=!0},t.prototype.getParseDateTimeSeparator=function(){return this.parseDateTimeSeparator},t.prototype.setTreatEmptyStringAsZero=function(e){this.treatEmptyStringAsZero=e},t.prototype.getTreatEmptyStringAsZero=function(){return this.treatEmptyStringAsZero},t.prototype.setParseDateTimeSeparator=function(e){this.parseDateTimeSeparator=e},t.prototype.requiredModules=function(){return n.i(o.e)(this)},t.Inject=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.prototype.injectedModules||(this.prototype.injectedModules=[]);for(var n=0;n<e.length;n++)-1===this.prototype.injectedModules.indexOf(e[n])&&this.prototype.injectedModules.push(e[n])},t.prototype.getInjectedModules=function(){return this.injectedModules},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"calculate"},t.prototype.getFormulaCharacter=function(){return"="},t.prototype.isUpperChar=function(e){var t=e.charCodeAt(0);return t>64&&t<91},t.prototype.resetKeys=function(){this.storedData.clear(),this.keyToRowsMap.clear(),this.rowsToKeyMap.clear()},t.prototype.updateDependentCell=function(e){var t=this.getSheetFamilyItem(this.grid),n=this.cell;if(n!==this.emptyString){if(null!==t.sheetNameToParentObject){var r=t.parentObjectToToken.get(this.grid);-1===n.indexOf(this.sheetToken)&&(n=r+n),-1===e.indexOf(this.sheetToken)&&(e=r+e)}if(this.getDependentCells().has(e)){var i=this.getDependentCells().get(e);i.indexOf(n)<0&&n!==e&&i.push(n)}else this.getDependentCells().set(e,[n]);this.addToFormulaDependentCells(e)}},t.prototype.addToFormulaDependentCells=function(e){var t=this.cell,n=this.getSheetFamilyItem(this.grid);if(null!=n.sheetNameToParentObject&&-1===t.indexOf(this.sheetToken)){t=n.parentObjectToToken.get(this.grid)+t}this.getDependentFormulaCells().has(t)?this.getDependentFormulaCells().get(t).has(e)||this.getDependentFormulaCells().get(t).set(e,e):(this.getDependentFormulaCells().set(t,new Map),this.getDependentFormulaCells().get(t).set(e,e))},t.prototype.getDependentCells=function(){return null==this.dependentCells&&(this.dependentCells=new Map),this.dependentCells},t.prototype.getDependentFormulaCells=function(){if(this.isSheetMember()){var e=this.getSheetFamilyItem(this.grid);return null==e.sheetDependentFormulaCells&&(e.sheetDependentFormulaCells=new Map),e.sheetDependentFormulaCells}return null==this.dependentFormulaCells&&(this.dependentFormulaCells=new Map),this.dependentFormulaCells},t.prototype.getLibraryFormulas=function(){return this.lFormulas},t.prototype.getFunction=function(e){return this.getLibraryFormulas().has(e.toUpperCase())?this.getLibraryFormulas().get(e.toUpperCase()).handler:null},t.prototype.intToDate=function(e){var t=Number(e);(t=t>0&&t<1?1+t:0===t?1:t)>60&&(t-=1);var n=new Date("01/01/1900"),r=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds());return new Date(new Date(864e5*(t-1)+r).toUTCString().replace(" GMT",""))},t.prototype.getFormulaInfoTable=function(){if(this.isSheetMember()){var e=this.getSheetFamilyItem(this.grid);return null===e.sheetFormulaInfotable&&(e.sheetFormulaInfotable=new Map),e.sheetFormulaInfotable}return null===this.formulaInfoTable&&(this.formulaInfoTable=new Map),this.formulaInfoTable},t.prototype.getFormula=function(e){return e=e.toUpperCase(),this.storedData.has(e)?this.storedData.get(e).getFormulaText():""},t.prototype.getParseDecimalSeparator=function(){return this.isParseDecimalSeparatorChanged||"."===this.parseDecimalSeparator||(this.parseDecimalSeparator="."),this.parseDecimalSeparator},t.prototype.setParseDecimalSeparator=function(e){this.parseDecimalSeparator=e,this.isParseDecimalSeparatorChanged=!0},t.prototype.getSheetToken=function(e){var t=0,n=this.emptyString;if(t<e.length&&e[t]===this.sheetToken){for(t++;t<e.length&&e[t]!==this.sheetToken;)t++;n=e.substring(0,t+1)}if(t<e.length)return n;throw this.formulaErrorStrings[s.b.bad_index]},t.prototype.getSheetID=function(e){var t=this.getSheetFamilyItem(e);if(null!=t.sheetNameToParentObject&&t.sheetNameToParentObject.size>0){var n=t.parentObjectToToken.get(e);if(n){n=n.split(this.sheetToken).join(this.emptyString);var r=this.parseFloat(n);if(!this.isNaN(r))return r}}return-1},t.prototype.parseFloat=function(e){var t=Number(e);return isNaN(t)&&"string"==typeof e&&e.includes(",")&&(t=Number(e.split(",").join(""))),t},t.prototype.rowIndex=function(e){var t=0,n=!1;if(t<e.length&&e[t]===this.sheetToken){for(t++;t<e.length&&e[t]!==this.sheetToken;)t++;t++}for(;t<e.length&&this.isChar(e[t]);)n=!0,t++;var r=parseInt(e.substring(t),10);if(t<e.length&&!this.isNaN(r))return r;if(n)return-1;throw this.formulaErrorStrings[s.b.bad_index]},t.prototype.colIndex=function(e){var t=0,n=0;if(e=e.toUpperCase(),t<e.length&&e[t]===this.sheetToken){for(t++;t<e.length&&e[t]!==this.sheetToken;)t++;t++}for(;t<e.length&&this.isChar(e[t]);){n=26*n+e[t].charCodeAt(0)-64,t++}return 0===n?-1:n},t.prototype.getErrorStrings=function(){return null===this.errorStrings&&(this.errorStrings=["#N/A","#VALUE!","#REF!","#DIV/0!","#NUM!","#NAME?","#NULL!"]),this.errorStrings},t.prototype.substring=function(e,t,n){return e.substring(t,n+t)},t.prototype.isChar=function(e){return e.charCodeAt(0)>=65&&e.charCodeAt(0)<=90||e.charCodeAt(0)>=97&&e.charCodeAt(0)<=122},t.prototype.getSheetFamilyItem=function(e,t){return 0===this.sheetFamilyID?(null==this.defaultFamilyItem&&(this.defaultFamilyItem=new g),this.defaultFamilyItem):(null==this.sheetFamiliesList&&(this.sheetFamiliesList=new Map),void 0===t&&(t=this.modelToSheetID.get(e)),this.sheetFamiliesList.has(t)||this.sheetFamiliesList.set(t,new g),this.sheetFamiliesList.get(t))},t.prototype.setKeyValue=function(e,t){e=e.toUpperCase();var n=t.toString().trim();this.storedData.get(e)&&0!==n.indexOf(this.leftBrace)||(this.storedData.set(e,new f),this.keyToRowsMap.set(e,this.keyToRowsMap.size+1),this.rowsToKeyMap.set(this.rowsToKeyMap.size+1,e));var r=this.storedData.get(e);if(null!=r.getFormulaText()&&r.getFormulaText().length>0&&r.getFormulaText()!==n){var i=this.cellPrefix+this.keyToRowsMap.get(e).toString();null!=this.getDependentFormulaCells().get(i)&&this.clearFormulaDependentCells(i)}n.length>0&&n[0]===this.getFormulaCharacter()?r.setFormulaText(n):r.getFormulaValue()!==n&&(r.setFormulaText(""),r.setParsedFormula(""),r.setFormulaValue(n))},t.prototype.clearFormulaDependentCells=function(e){var t=this,n=this.getDependentFormulaCells().get(e);n&&(n.forEach(function(n,r){var i=r,a=t.getDependentCells().get(i);t.arrayRemove(a,e),0===a.length&&t.getDependentCells().delete(i)}),this.getDependentFormulaCells().delete(e))},t.prototype.arrayRemove=function(e,t){var n=e.indexOf(t);return-1!==n&&e.splice(n,1),e},t.prototype.getKeyValue=function(e){if(e=e.toUpperCase(),null!==this.storedData.has(e)){var t=this.storedData.get(e),r=t.getFormulaText();if(r.length>0&&r[0]===this.getFormulaCharacter()){this.cell=this.cellPrefix+this.keyToRowsMap.get(e).toString(),r=r.substring(1);try{t.setParsedFormula(this.parser.parseFormula(r,e))}catch(n){var a={message:n.message,exception:n,isForceCalculable:!1,computeForceCalculate:!1};return this.trigger("onFailure",a),t.setFormulaValue(a.message),this.storedData.get(e).getFormulaValue()}try{t.setFormulaValue(this.computeFormula(t.getParsedFormula()))}catch(e){var a={message:e.message,exception:e,isForceCalculable:!1,computeForceCalculate:!1};this.trigger("onFailure",a);var o="string"==typeof a.exception?a.exception:a.message;return(n.i(i.isNullOrUndefined)(this.getErrorLine(e))?"":"#"+this.getErrorLine(e)+": ")+o}}return this.storedData.get(e).getFormulaValue()}return this.emptyString},t.prototype.getNamedRanges=function(){return this.namedRanges},t.prototype.addNamedRange=function(e,t){var n=e.split(this.sheetToken);if(n.length>1){var r=this.getSheetId(this.grid).toString();if(!this.getSheetFamilyItem(r).parentObjectToToken.get(r))return!1;e=n[0]+this.sheetToken+n[1].toUpperCase()}else e=e.toUpperCase();return this.namedRanges.set(e,t),!0},t.prototype.updateNamedRange=function(e,t){var n=new Map;this.namedRanges.forEach(function(r,i){var a=i;if(i.includes(e)){var o=i.split("!");o[0]=t,a=o.join("!")}n.set(a,r)}),this.namedRanges=n},t.prototype.removeNamedRange=function(e){return e=e.toUpperCase(),null!=this.namedRanges.get(e)&&(this.namedRanges.delete(e),!0)},t.prototype.convertAlpha=function(e){for(var t=[],n=0,r="A";e>0;){e--;var i=r.charCodeAt(0);t[n]=String.fromCharCode(e%26+i),e=parseInt((e/26).toString(),10),n++}for(var a=[],o=0;o<n;o++)a[n-o-1]=t[o];return a.join("")},t.prototype.getCellCollection=function(e){if(e.indexOf(":")<0){if(!this.isCellReference(e))return e.split(this.getParseArgumentSeparator());e=e+":"+e}var t=this.emptyString,n=e.indexOf(this.sheetToken);if(n>-1)for(var r=n,i=r+1;i<e.length;){if(e[i]===this.sheetToken){t=e.substr(0,i+1);break}i++}var a,o,s,l,d=e.indexOf(":");if(d>0&&this.isChar(e[d-1]))for(var c=d-2;c>=0&&this.isDigit(e[c]);)c--;a=this.rowIndex(this.substring(e,0,d)),o=this.rowIndex(this.substring(e,d+1,d+e.length-d-1)),s=this.colIndex(this.substring(e,0,d)),l=this.colIndex(this.substring(e,d+1,d+e.length-d-1)),a>o&&(d=o,o=a,a=d),s>l&&(d=l,l=s,s=d);var h,p=[],u=0;for(d=a;d<=o;d++)for(h=s;h<=l;h++)p[u]=t+this.emptyString+this.convertAlpha(h)+d.toString(),u++;return p},t.prototype.computeFormula=function(e,t){return this.calculateFormula(e,!1,t)},t.prototype.calculateFormula=function(e,t,r){var a,o,l,d,c=this,h=!1;if(this.parser.isError)return e;a=this.parser.isFormulaParsed?e:this.parser.parseFormula(e),this.parser.isFormulaParsed=!1;try{if(o=this.findLastIndexOfq(a),o>0&&(h=!0),a!==this.emptyString&&o>-1)for(var p=o+1,u=this;p>-1;){var f=function(){if(a[p]!==u.rightBracket)return p++,"continue";var e=a.substring(o,p+1),f=e.split(u.leftBracket)[0].split("q").join(u.emptyString),g=void 0;if(u.getLibraryFormulas().get(f.toUpperCase()).isCustom){g=e.substring(e.indexOf(u.leftBracket)+1,e.indexOf(u.rightBracket)).split(u.getParseArgumentSeparator());var m=0,v=[],y=void 0;for(m=0;m<g.length;m++)g[m].includes(":")&&u.isCellReference(g[m])?(y=u.getCellCollection(g[m]),y.length>1?(v.push(g[m]),y.forEach(function(e){c.updateDependentCell(e)})):v.push(u.getValueFromArg(g[m]))):v.push(u.getValueFromArg(g[m]));g=v}else{var C=e.substring(e.indexOf(u.leftBracket)+1,e.indexOf(u.rightBracket));g=[];for(var b=u.getParseArgumentSeparator(),x="",S=void 0,w=0,_=C.length-1;w<=_;w++)'"'===C[w]&&(S=!S),C[w]!==b||S?(x+=C[w],w===_&&g.push(x)):(g.push(x),x="",w===_&&g.push(x));if(g.length||(g=[""]),h&&f){["IF","INDEX","SORT","T","EXACT","PROPER","DOLLAR","DATE"].some(function(e){return e===f})&&g.push("nestedFormulaTrue"),"IF"===f&&g.push("nestedFormulaTrue")}r&&"UNIQUE"===f&&g.push("isComputeExp")}if(l=n.i(i.isNullOrUndefined)(u.getFunction(f))?u.getErrorStrings()[s.a.name]:u.getFunction(f).apply(void 0,g),h){d=u.processNestedFormula(a,e,l);var I=u.findLastIndexOfq(d);return 0===I&&(h=!1),-1===I&&(l=u.computeValue(d,t)),o=p=I,a=d,"continue"}return"break"}();if("break"===f)break}else this.formulaErrorStrings.indexOf(a)>-1?l=a:a!==this.emptyString&&-1===o&&(l=this.computeValue(a,t))}catch(e){var g={message:e.message,exception:e,isForceCalculable:!1,computeForceCalculate:!1};this.trigger("onFailure",g);var m="string"==typeof g.exception?g.exception:g.message;l=(n.i(i.isNullOrUndefined)(this.getErrorLine(e))?"":"#"+this.getErrorLine(e)+": ")+m}return l},t.prototype.computeSumIfAndAvgIf=function(e,t){if(n.i(i.isNullOrUndefined)(e)||e[0]===this.emptyString||0===e.length)return this.formulaErrorStrings[s.b.wrong_number_arguments];for(var r=e,a=0;a<r.length;a++)if(this.isCellReference(r[a])&&n.i(i.isNullOrUndefined)(r[a].match(/[0-9]/))&&r[a].indexOf("!")<0){var o=r[a].split(":");r[a]=o[0]+"1:"+o[1]+this.spreadSheetUsedRange[0]}var l=r.length;if(2!==l&&3!==l&&0===l)return this.formulaErrorStrings[s.b.wrong_number_arguments];if(""===r[1])return t?this.getErrorStrings()[s.a.divzero]:"0";var d=r[0],c=r[1].startsWith(this.tic)&&r[1].endsWith(this.tic),h=r[1].split(this.tic).join(this.emptyString);if(h.length>255)return this.getErrorStrings()[s.a.value];var p=h.includes("*"),u=h.includes("?"),f=p?h.replace(/\*/g,"").trim():h,g=!1;if(!c&&this.isCellReference(f)&&(f=this.getValueFromArg(f),g=!0),p){var m=h.indexOf("*");"*"===h[0]&&(f="*"+f),"*"===h[h.length-1]&&(f+="*"),m>0&&m<h.length-1&&(f=h.substring(0,m)+"*"+h.substring(m+1))}h=f;var v=this.parser.tokenEqual;h.startsWith("<=")?(v=this.parser.tokenLessEq,h=h.substring(2)):h.startsWith(">=")?(v=this.parser.tokenGreaterEq,h=h.substring(2)):h.startsWith("<>")?(v=this.parser.tokenNotEqual,h=h.substring(2)):h.startsWith("<")?(v=this.parser.tokenLess,h=h.substring(1)):h.startsWith(">")?(v=this.parser.tokenGreater,h=h.substring(1)):h.startsWith("=")&&(v=this.parser.tokenEqual,h=h.substring(1)),(!c&&this.isCellReference(h)&&!g||h.includes(this.arithMarker)||h.includes(this.getParseDecimalSeparator())&&!p&&!u)&&(h=this.getValueFromArg(h));var y=this.parseFloat(h),C=r[0],b=this.getCellCollection(l>2?r[2]:d),x=this.getCellCollection(C);if(x.length>b.length){var S=this.colIndex(b[b.length-1])+this.colIndex(x[x.length-1])-this.colIndex(x[0]),w=r[2].split(":");w[1]=(this.convertAlpha(S)+this.rowIndex(x[x.length-1])).toString(),b=this.getCellCollection(w.join(":"))}var _=this.getComputeSumIfValue(x,b,h.toLowerCase(),y,v,p,u);return[_[0],_[1]]},t.prototype.computeLookup=function(e){var t,a,o,l,c,h,p=[],u=[],f=[],g=[],m=[],v=e,y=v.length;if(1===y||y>3)return this.formulaErrorStrings[s.b.wrong_number_arguments];if(""===v[1]||""===v[2])return this.getErrorStrings()[s.a.value];if(c=this.getValueFromArg(v[0]),v[0].indexOf(this.tic)>-1&&v[0].toUpperCase().split(this.tic).join("")!==this.trueValue&&v[0].toUpperCase().split(this.tic).join("")!==this.falseValue&&this.isNaN(this.parseFloat(v[0].split(this.tic).join("")))&&(c=c.split(this.tic).join("")),this.getErrorStrings().indexOf(c)>-1)return c;var C=v[1].split(":");if(2===C.length&&this.isCellReference(C[0])&&this.isCellReference(C[1])&&2===y){var b=v[1].indexOf(":"),x=this.rowIndex(this.substring(v[1],0,b)),S=this.colIndex(this.substring(v[1],0,b)),w=this.rowIndex(this.substring(v[1],b+1,b+v[1].length-b-1)),_=this.colIndex(this.substring(v[1],b+1,b+v[1].length-b-1));x>w&&(t=[w,x],x=t[0],w=t[1]),S>_&&(a=[_,S],S=a[0],_=a[1]);var I="";0===v[1].indexOf("!")&&(I=v[1],I=I.replace("!",""),I=I.indexOf("!"),I=v[1].substring(0,I+2));var E=_-S+1,R=w-x+1;R>E||R===E?(o=I+r(S)+x+":"+r(S)+w,l=I+r(_)+x+":"+r(_)+w):R<E&&(o=I+r(S)+x+":"+r(_)+x,l=I+r(S)+w+":"+r(_)+w),x===w&&S===_||(h=!0)}if(h)p=this.getCellCollection(o),u=this.getCellCollection(l);else{p=this.getCellCollection(v[1]);var k=2===y?v[1]:v[2];u=this.getCellCollection(k);var A=n.i(d.T)(v[1]),F=n.i(d.T)(k),N=A[1]===A[3]||A[0]===A[2],T=F[1]===F[3]||F[0]===F[2];if(!N||!T)return this.getErrorStrings()[s.a.na]}for(var O=0;O<p.length;O++)g.push(this.getValueFromArg(p[O]).split(this.tic).join(""));var D=g.map(function(e){return""===e?NaN:Number(e)}).sort(function(e,t){return e-t}),L=D[D.length-1],P=D[0],M=this.parseFloat(c);if(this.isNaN(M)){for(var B=0;B<p.length;B++)if(f[B]=this.getValueFromArg(p[B]).split(this.tic).join(""),!n.i(i.isNullOrUndefined)(u[B])&&""!==c&&""!==f[B])if(c.toUpperCase()===f[B].toUpperCase())m.push(this.getValueFromArg(u[B]).split(this.tic).join("")||"0");else if(c.indexOf("*")>-1||c.indexOf("?")>-1){var H=c;if(c.indexOf("*")>-1){H=H.replace(/\*/g,"").trim(),this.isCellReference(H)&&(H=this.getValueFromArg(H));var U=c.indexOf("*");"*"===c[0]&&(H="*"+H),"*"===c[c.length-1]&&(H+="*"),U>0&&U<c.length-1&&(H=c.substring(0,U)+"*"+c.substring(U+1))}var V=[],j=this.findWildCardValue(H.toLowerCase(),f[B].toLowerCase());V.push(j),V.push(c),this.processLogical(V,"equal")===this.trueValue&&m.push(this.getValueFromArg(u[B]).split(this.tic).join("")||"0")}}else for(var z=0;z<D.length;z++)f[z]=D[z].toString().split(this.tic).join(""),n.i(i.isNullOrUndefined)(u[z])||""===f[z]||M!==this.parseFloat(f[z])||m.push(this.getValueFromArg(u[z]).split(this.tic).join("")||"0");if(m.length>0)return m[m.length-1];if(M>L&&!n.i(i.isNullOrUndefined)(u[p.length-1]))return this.getValueFromArg(u[p.length-1]).split(this.tic).join("")||"0";if(M<P)return this.getErrorStrings()[s.a.na];if(g.indexOf(c.split(this.tic).join(""))<0&&c!==this.trueValue&&c!==this.falseValue)if(this.isNaN(M)||this.isNaN(L)||this.isNaN(P)){if(this.isNaN(M)&&""!==c&&/^[a-zA-Z!@#$%^&*()_+{}\[\]:;<>,.?~\\\/-]/.test(c)){var q=g.sort(),b=this.findClosestMatch(c.split(this.tic).join(""),q);if(!n.i(i.isNullOrUndefined)(u[b])&&b>=0)return this.getValueFromArg(u[b]).split(this.tic).join("")||"0"}}else{for(var W=[],G=0;G<D.length;G++)M>D[G]&&W.push(D[G]);var b=W.length-1;if(!n.i(i.isNullOrUndefined)(u[b])&&b>=0)return this.getValueFromArg(u[b]).split(this.tic).join("")||"0"}return this.getErrorStrings()[s.a.na]},t.prototype.computeVHLookup=function(e,t){var a,o,l,d,c,h,p,u=[],f=[],g=[],m=e,v=t?this.trueValue:this.falseValue;if(""===m[0]||""===m[1])return this.getErrorStrings()[s.a.na];if(l=this.getValueFromArg(m[0]),m[0].indexOf(this.tic)>-1&&m[0].toUpperCase().split(this.tic).join("")!==this.trueValue&&m[0].toUpperCase().split(this.tic).join("")!==this.falseValue&&this.isNaN(this.parseFloat(m[0].split(this.tic).join("")))&&(l=l.split(this.tic).join("")),this.getErrorStrings().indexOf(l)>-1)return l;d=this.isCellReference(m[2])||m[2].includes(this.arithMarker)?this.getValueFromArg(m[2])||"0":this.getValueFromArg(m[2]).split(this.tic).join(""),d=d.toUpperCase()===this.trueValue?"1":d.toUpperCase()===this.falseValue?"0":d;var y=this.parseFloat(d),C=m[1].split(":");if(this.isCellReference(C[0])&&this.isCellReference(C[1])){var b=m[1].indexOf(":"),x=this.rowIndex(this.substring(m[1],0,b)),S=this.colIndex(this.substring(m[1],0,b)),w=this.rowIndex(this.substring(m[1],b+1,b+m[1].length-b-1)),_=this.colIndex(this.substring(m[1],b+1,b+m[1].length-b-1));x>w&&(a=[w,x],x=a[0],w=a[1]),S>_&&(o=[_,S],S=o[0],_=o[1]);var I="";0===m[1].indexOf("!")&&(I=m[1],I=I.replace("!",""),I=I.indexOf("!"),I=m[1].substring(0,I+2)),c=v===this.trueValue?I+r(S)+x+":"+r(S)+w:I+r(S)+x+":"+r(_)+x;var E=void 0;if(v===this.trueValue){if((E=S+y-1)>_)return this.getErrorStrings()[s.a.ref]}else if((E=x+y-1)>w)return this.getErrorStrings()[s.a.ref];if(y<1||this.isNaN(y))return this.getErrorStrings()[s.a.value];h=v===this.trueValue?I+r(E)+x+":"+r(E)+w:I+r(S)+E+":"+r(_)+E}if(m[3]=m[3]?m[3]:this.trueValue,this.isCellReference(m[3])?m[3]=this.getValueFromArg(m[3]):m[3]=this.getValueFromArg(m[3]).split(this.tic).join(""),this.getErrorStrings().indexOf(m[3])>-1)return m[3];if(m[3].toUpperCase()===this.falseValue||"0"===m[3])p=this.falseValue;else{if(m[3].toUpperCase()!==this.trueValue&&"1"!==m[3])return this.getErrorStrings()[s.a.value];p=this.trueValue}for(var R=this.getCellCollection(c),k=this.getCellCollection(h),A=0;A<R.length;A++)f.push(this.getValueFromArg(R[A]).split(this.tic).join(""));var F=this.parseFloat(l);if("FALSE"===p){for(var N=0;N<R.length;N++)if(u[N]=this.getValueFromArg(R[N]).split(this.tic).join(""),!n.i(i.isNullOrUndefined)(k[N]))if(this.isNaN(F)||""===u[N]||F!==this.parseFloat(u[N])){if(""!==u[N]&&l.toUpperCase()===u[N].toUpperCase())g.push(this.getValueFromArg(k[N]).split(this.tic).join("")||"0");else if(l.indexOf("*")>-1||l.indexOf("?")>-1){var T=l;if(l.indexOf("*")>-1){T=T.replace(/\*/g,"").trim(),this.isCellReference(T)&&(T=this.getValueFromArg(T));var O=l.indexOf("*");"*"===l[0]&&(T="*"+T),"*"===l[l.length-1]&&(T+="*"),O>0&&O<l.length-1&&(T=l.substring(0,O)+"*"+l.substring(O+1))}var D=[],L=this.findWildCardValue(T.toLowerCase(),u[N].toLowerCase());D.push(L),D.push(l),this.processLogical(D,"equal")===this.trueValue&&g.push(this.getValueFromArg(k[N]).split(this.tic).join("")||"0")}}else g.push(this.getValueFromArg(k[N]).split(this.tic).join("")||"0");return g.length>0?g[0]:this.getErrorStrings()[s.a.na]}if("TRUE"===p){for(var P=f.map(function(e){return""===e?NaN:Number(e)}).sort(function(e,t){return e-t}),M=P[P.length-1],B=P[0],H=l.toUpperCase(),U=0;U<R.length;U++)u[U]=this.getValueFromArg(R[U]).split(this.tic).join(""),n.i(i.isNullOrUndefined)(k[U])||""===l||""===u[U]||H!==this.trueValue&&H!==this.falseValue||H!==u[U].toUpperCase()?n.i(i.isNullOrUndefined)(k[U])||""===l||""===u[U]||H!==u[U].toUpperCase()||g.push(this.getValueFromArg(k[U]).split(this.tic).join("")||"0"):g.push(this.getValueFromArg(k[U]).split(this.tic).join("")||"0");for(var V=0;V<P.length;V++)u[V]=P[V].toString().split(this.tic).join(""),n.i(i.isNullOrUndefined)(k[V])||""===l||this.isNaN(F)||""===u[V]||F!==this.parseFloat(u[V])||g.push(this.getValueFromArg(k[V]).split(this.tic).join("")||"0");if(g.length>0)return g[g.length-1];if(l.indexOf("*")>-1||l.indexOf("?")>-1||H.split(this.tic).join("")===this.trueValue||H.split(this.tic).join("")===this.falseValue)return this.getErrorStrings()[s.a.na];if(F>M&&!n.i(i.isNullOrUndefined)(k[R.length-1]))return this.getValueFromArg(k[R.length-1]).split(this.tic).join("");if(f.indexOf(l.split(this.tic).join(""))<0&&l!==this.trueValue&&l!==this.falseValue)if(this.isNaN(F)||""===l||this.isNaN(M)||this.isNaN(B)){if(this.isNaN(F)&&""!==l&&this.isNaN(M)&&this.isNaN(B)){var j=f.sort(),b=this.findClosestMatch(l.split(this.tic).join(""),j);if(!n.i(i.isNullOrUndefined)(k[b])&&b>=0)return this.getValueFromArg(k[b]).split(this.tic).join("")||"0"}}else{for(var z=[],q=0;q<P.length;q++)F>P[q]&&z.push(P[q]);var b=z.length-1;if(!n.i(i.isNullOrUndefined)(k[b])&&b>=0)return this.getValueFromArg(k[b]).split(this.tic).join("")||"0"}}return this.getErrorStrings()[s.a.na]},t.prototype.findClosestMatch=function(e,t){for(var n=0,r=t.length-1;n<=r;){var i=Math.floor((n+r)/2),a=t[i],o=this.compareStrings(e.toLowerCase(),a.toLowerCase());if(0===o)return i;1===o?n=i+1:r=i-1}for(var s=n-1;s>=0;s--)if(-1!==this.compareStrings(e.toLowerCase(),t[s].toLowerCase()))return s;return-1},t.prototype.compareStrings=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.charCodeAt(r),a=t.charCodeAt(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0},t.prototype.findWildCardValue=function(e,t){var n="";if(e.indexOf("?")>-1){var r=RegExp(e.replace(/\?/g,"[\\s\\S]"));n=t.length===e.length&&this.isNaN(this.parseFloat(t))&&t.match(r)?e:t}else if(e.indexOf("*")>-1){for(var i=e.indexOf("*"),a="",o="",s=this.falseValue,l=this.falseValue,d=i-1;d>=0;d--)a+=e[d],l=this.trueValue;for(var d=i+1;d<e.length;d++)o+=e[d],s=this.trueValue;var c=""===a?-1:t.indexOf(a.split("").reverse().join("")),h=""===o?-1:t.indexOf(o);if(c>-1||h>-1){var p=a.split("").reverse().join("")===t.substr(0,a.length),u=o===t.substring(t.length-o.length,t.length);l===this.trueValue&&s===this.trueValue&&this.isNaN(this.parseFloat(a))&&this.isNaN(this.parseFloat(o))?n=p&&u?e:t:l===this.trueValue&&this.isNaN(this.parseFloat(a))?n=p?e:t:s===this.trueValue&&this.isNaN(this.parseFloat(o))&&(n=u?e:t)}else n=t}return n},t.prototype.getComputeSumIfValue=function(e,t,n,r,i,a,o){var s=0,l=0;switch(i){case this.parser.tokenEqual:for(var d=a?n.replace(/\*/g,""):n,c=0;c<e.length;c++){var h=this.getValueFromRange(t,c),p=this.getValueFromArg(e[c].split(this.tic).join("")).toLowerCase(),u=this.parseFloat(p);if(p===n&&u===r){var f=this.getValueFromArg(t[c].split(this.tic).join("")),g=this.parseFloat(f);this.isNaN(g)||(s+=g,l+=1)}else if(p===n)this.isNaN(h)||(s+=h,l+=1);else if(a&&d&&p&&this.isNaN(this.parseFloat(p))){var m=n.indexOf("*");"*"===n[0]&&d.length<=p.length&&d===p.slice(p.length-d.length,p.length)?this.isNaN(h)||(s+=h,l+=1):"*"===n[n.length-1]&&d.length<=p.length&&d===p.slice(0,d.length)?this.isNaN(h)||(s+=h,l+=1):m>-1&&p.startsWith(n.substr(0,m))&&p.endsWith(n.substr(m+1))&&(this.isNaN(h)||(s+=h,l+=1))}else if(a&&!d&&p&&this.isNaN(this.parseFloat(p)))this.isNaN(h)||(s+=h,l+=1);else if(o&&d&&p&&this.isNaN(this.parseFloat(p))){var v=RegExp(d.replace(/\?/g,"[\\s\\S]"));p.length===n.length&&p.match(v)&&(this.isNaN(h)||(s+=h,l+=1))}}break;case this.parser.tokenLess:for(var c=0;c<e.length;c++){var p=this.getValueFromArg(e[c].split(this.tic).join("")),u=this.parseFloat(p);if(u<r){var f=this.getValueFromArg(t[c].split(this.tic).join("")),g=this.parseFloat(f);this.isNaN(g)||(s+=g,l+=1)}}break;case this.parser.tokenGreater:for(var c=0;c<e.length;c++){var p=this.getValueFromArg(e[c].split(this.tic).join("")),u=this.parseFloat(p);if(u>r){var f=this.getValueFromArg(t[c].split(this.tic).join("")),g=this.parseFloat(f);this.isNaN(g)||(s+=g,l+=1)}}break;case this.parser.tokenLessEq:for(var c=0;c<e.length;c++){var p=this.getValueFromArg(e[c].split(this.tic).join("")),u=this.parseFloat(p);if(u<=r){var f=this.getValueFromArg(t[c].split(this.tic).join("")),g=this.parseFloat(f);this.isNaN(g)||(s+=g,l+=1)}}break;case this.parser.tokenGreaterEq:for(var c=0;c<e.length;c++){var p=this.getValueFromArg(e[c].split(this.tic).join("")),u=this.parseFloat(p);if(u>=r){var f=this.getValueFromArg(t[c].split(this.tic).join("")),g=this.parseFloat(f);this.isNaN(g)||(s+=g,l+=1)}}break;case this.parser.tokenNotEqual:for(var d=a?n.replace(/\*/g,""):n,c=0;c<e.length;c++){var h=this.getValueFromRange(t,c),p=this.getValueFromArg(e[c].split(this.tic).join("")).toLowerCase(),u=this.parseFloat(p);if(p===n||u===r||a||o)if(a&&d&&p&&this.isNaN(this.parseFloat(p))){var m=n.indexOf("*");"*"===n[0]&&d.length<=p.length&&d!==p.slice(p.length-d.length,p.length)?this.isNaN(h)||(s+=h,l+=1):"*"===n[n.length-1]&&d.length<=p.length&&d!==p.slice(0,d.length)?this.isNaN(h)||(s+=h,l+=1):(m>-1&&!p.startsWith(n.substr(0,m))||!p.endsWith(n.substr(m+1)))&&(this.isNaN(h)||(s+=h,l+=1))}else if(!a||d||this.isNaN(this.parseFloat(p))){if(o&&d&&p&&this.isNaN(this.parseFloat(p))){var v=RegExp(d.replace(/\?/g,"[\\s\\S]"));p.length===n.length&&p.match(v)||this.isNaN(h)||(s+=h,l+=1)}}else this.isNaN(h)||(s+=h,l+=1);else{var f=this.getValueFromArg(t[c].split(this.tic).join("")),g=this.parseFloat(f);this.isNaN(g)||(s+=g,l+=1)}}}return[s,l]},t.prototype.getValueFromRange=function(e,t){var n=e[t];return n=this.getValueFromArg(n),this.parseFloat(n.toString())},t.prototype.computeAndOrNot=function(e,t){for(var n,r,i=this,a="and"===t,o="or"===t,l="not"===t,d=!(!a&&!l),c=[],h=e,p=0;p<h.length;p++){if(h[p]===this.tic)return this.getErrorStrings()[s.a.value];if(this.isCellReference(h[p]))for(var u=this.getCellCollection(h[p]),f=0;f<u.length;f++){if(this.getErrorStrings().indexOf(u[f])>-1)return u[f];if(u[f][0]===this.tic)return this.getErrorStrings()[s.a.name];if(n=this.getValueFromArg(u[f]),this.getErrorStrings().indexOf(n)>-1)return n;r=this.parseFloat(n),n===this.falseValue||""!==n&&0===r||l&&""===n?c.push(this.falseValue):n===this.trueValue||!isNaN(r)&&""!==n?c.push(this.trueValue):(""===n||isNaN(r))&&c.push(this.getErrorStrings()[s.a.value])}else{if(n=this.getValueFromArg(h[p]).split(this.tic).join("").toUpperCase(),this.getErrorStrings().indexOf(n)>-1)return n;r=this.parseFloat(n),n===this.falseValue||""===h[p]||""!==n&&0===r?c.push(this.falseValue):n===this.trueValue||!isNaN(r)&&""!==n?c.push(this.trueValue):(""===n||isNaN(r))&&c.push(this.getErrorStrings()[s.a.value])}}if(c.every(function(e){return e===i.getErrorStrings()[s.a.value]}))return this.getErrorStrings()[s.a.value];for(var f=0;f<c.length;f++){if((a||l)&&c[f]===this.falseValue){d=!1;break}if(o&&c[f]===this.trueValue){d=!0;break}}return d=l?!d:d,d?this.trueValue:this.falseValue},t.prototype.removeTics=function(e){return e.length>1&&e[0]===this.tic[0]&&e[e.length-1]===this.tic[0]&&(e=this.substring(e,1,e.length-2)),e},t.prototype.getCellFrom=function(e){var t,n="",i=e.indexOf(":")>-1?e.split(":"):[e],a=i.length-1,o=this.rowIndex(i[0]);if(o===this.rowIndex(i[a])){var s=this.colIndex(i[0]),l=this.colIndex(i[a]),d=this.colIndex(this.cell);d>=s&&d<=l&&(n=r(d).toString()+o.toString())}else if(this.colIndex(i[0])===this.colIndex(i[a])){t=this.colIndex(i[0]);var c=this.rowIndex(i[a]),h=this.rowIndex(this.cell);h>=o&&h<=c&&(n=r(t).toString()+h.toString())}return n},t.prototype.computeValue=function(e,t,n){try{var r=[],i=0,a="";r.length=0;for(var o=this.getParseDecimalSeparator();i<e.length;){var l="u"===e[i];if(l&&(i+=1),e[i]!==this.arithMarker){if(this.isDigit(e[i])){for(var d=this.emptyString;i<e.length&&(this.isDigit(e[i])||e[i]===o);)d+=e[i]===o?".":e[i],i+=1;if(r.push(d),!e[i])return r.toString()}if(e[i]===this.sheetToken){for(a=e[i],i+=1;i<e.length&&e[i]!==this.sheetToken;)a+=e[i],i+=1;i<e.length&&(a+=e[i],i+=1)}else if(this.isUpperChar(e[i])){for(var d=this.emptyString,c="";i<e.length&&this.isUpperChar(e[i]);){var h=e[i];d+=h,i+=1}for(;i<e.length&&this.isDigit(e[i]);){var p=e[i];d+=p,i+=1}if(i<e.length&&":"===e[i]){if(d+=e[i],(i+=1)<e.length&&e[i]===this.sheetToken)for(d+=e[i],i+=1;i<e.length&&e[i]!==this.sheetToken;)d+=e[i],i+=1;for(;i<e.length&&this.isUpperChar(e[i]);)d+=e[i],i+=1;for(;i<e.length&&this.isDigit(e[i]);)d+=e[i],i+=1;d=a+this.getCellFrom(d)}else d=a+d;if(c=this.getParentObjectCellValue(d,t).toString(),a="","string"==typeof c&&this.getErrorStrings().indexOf(c)>-1)return c;l&&(c=this.isNaN(this.parseFloat(c))?"-"+c:(-this.parseFloat(c)).toString()),r.push(c)}else if("q"===e[i]){var f=e.substring(i+1).indexOf(this.leftBracket),g=e.substring(i+f+1).indexOf(this.rightBracket);e=this.substring(e,i+f+2,g-1)}else if(e[i]===this.tic[0]){var d=e[i].toString();for(i+=1;i<e.length&&e[i]!==this.tic[0];)d+=e[i],i+=1;var c=d.split(this.tic).join(this.emptyString);c===this.trueValue||c===this.falseValue||!this.isNaN(this.parseFloat(c))&&""!==c?r.push(this.tic+c+this.tic):r.push(c),i+=1}else if("%"===e[i]&&r.length>0){var m=r[0],v=this.parseFloat(m);this.isNaN(v)||(r.pop(),r.push((v/100).toString())),i+=1}else if(0===e.substring(i).indexOf(this.trueValue))r.push(this.trueValue),i+=this.trueValue.length;else if(0===e.substring(i).indexOf(this.falseValue))r.push(this.falseValue),i+=this.falseValue.length;else if(e[i]===this.tic[0]||"|"===e[i]){var d=e[i].toString();for(i++;i<e.length&&e[i]!==this.tic[0];)d+=e[i],i+=1;r.push(d+this.tic),i+=1}else{if(" "===e[i]&&i<e.length-1){i+=1;continue}switch(e[i]){case"#":var y=0;this.getErrorStrings().indexOf(e.substring(i))>-1?(y=-1===e.indexOf("!")||-1===e.substring(i).indexOf("!")?e.indexOf("#N/A")>-1?e.indexOf("#N/A")+4+i:e.indexOf("?")+1+i:e.indexOf("!")+1+i,r.push(this.substring(e,i,y-i))):(y=i+1,r.push(this.substring(e,i,y-i))),i=y;break;case"n":i+=1;var d="";if("n"===e[i])continue;if(0===e.substring(i).indexOf("Infinity"))d="Infinity",i+=d.length;else{for(("u"===e[i]||l||"-"===e[i])&&(d="-",l?l=!1:i+=1);i<e.length&&(this.isDigit(e[i])||e[i]===o||"."===e[i]);)d+=e[i]===o?".":e[i],i+=1;if(i<e.length&&"%"===e[i])if(i+=1,""===d){if(r.length>0){var m=r[0],v=this.parseFloat(m);this.isNaN(v)||(r.pop(),r.push((v/100).toString()))}}else d=(this.parseFloat(d)/100).toString()}d&&r.push(d);break;case this.parser.tokenAdd:this.getValArithmetic(r,"add",n),i+=1;break;case this.parser.tokenSubtract:this.getValArithmetic(r,"sub",n),i+=1;break;case this.parser.tokenMultiply:this.getValArithmetic(r,"mul",n),i+=1;break;case this.parser.tokenDivide:this.getValArithmetic(r,"div",n),i+=1;break;case this.parser.tokenLess:this.processLogical(r,"less"),i+=1;break;case this.parser.tokenGreater:this.processLogical(r,"greater"),i+=1;break;case this.parser.tokenGreaterEq:this.processLogical(r,"greaterEq"),i+=1;break;case this.parser.tokenLessEq:this.processLogical(r,"lessEq"),i+=1;break;case this.parser.tokenNotEqual:this.processLogical(r,"notEq"),i+=1;break;case this.parser.tokenOr:this.processLogical(r,"or"),i+=1;break;case this.parser.tokenAnd:this.processLogical(r,"and"),i+=1;break;case this.parser.tokenEqual:this.processLogical(r,"equal"),i+=1;break;default:return this.getErrorStrings()[s.a.value]}}}else i+=1}if(0===r.length)return this.emptyString;for(var d=this.emptyString,C=r.length;C>0;){var b=r.pop();if(this.getErrorStrings().indexOf(b)>-1)return b;if((d=b+d)===this.emptyString&&this.isCellReference(e)&&this.getTreatEmptyStringAsZero())return"0";C--}return d}catch(e){if(this.getErrorStrings().indexOf(e)>-1||this.formulaErrorStrings.indexOf(e)>-1)throw e;throw new u(this.formulaErrorStrings[s.b.invalid_expression])}},t.prototype.getValArithmetic=function(e,t,n){var r=!1,i=e.pop(),a=e.pop();i=i===this.trueValue?"1":i===this.falseValue?"0":i,i=i===this.emptyString?"0":this.getErrorStrings().indexOf(i.toString())<0?this.parseFloat(i+"").toString():i;var o=Number(i);isNaN(o)&&!n&&(r=!0,i===this.getErrorStrings()[s.a.divzero]?e.push(this.getErrorStrings()[s.a.divzero]):e.push(this.getErrorStrings()[s.a.value])),a=a===this.trueValue?"1":a===this.falseValue?"0":a,a=a===this.emptyString?"0":this.getErrorStrings().indexOf(a.toString())<0?this.parseFloat(a+"").toString():a,o=Number(a),isNaN(o)&&!n&&(r=!0,a===this.getErrorStrings()[s.a.divzero]?e.push(this.getErrorStrings()[s.a.divzero]):e.push(this.getErrorStrings()[s.a.value])),"add"!==t||r||e.push((Number(a)+Number(i)).toString()),"sub"!==t||r||e.push((Number(a)-Number(i)).toString()),"mul"!==t||r||e.push((Number(a)*Number(i)).toString()),"div"!==t||r||(this.isNaN(this.parseFloat(i))||this.isNaN(this.parseFloat(a))?e.push(this.getErrorStrings()[s.a.value]):0===this.parseFloat(i)?e.push(this.getErrorStrings()[s.a.divzero]):e.push((Number(a)/Number(i)).toString()))},t.prototype.processLogical=function(e,t){var r,a,o,l,d,c,h=!1;return"and"!==t&&"equal"!==t&&(r=e.pop(),a=e.pop(),this.getErrorStrings().indexOf(r)>-1?(c=r,h=!0):this.getErrorStrings().indexOf(a)>-1&&(c=a,h=!0),this.isNaN(this.parseFloat(r))&&this.isNaN(this.parseFloat(a))&&(r=r.toString().toLowerCase(),a=a.toString().toLowerCase()),n.i(i.isNullOrUndefined)(r)||(o=r.indexOf(this.tic)>-1?r:this.parseFloat(r)),n.i(i.isNullOrUndefined)(a)||(l=a.indexOf(this.tic)>-1?a:this.parseFloat(a)),"*"===r&&this.isNaN(this.parseFloat(a))&&""!==a&&(d=!0)),"less"!==t||h||(c=this.isNaN(o)||this.isNaN(l)?a.toUpperCase().split(this.tic).join("").localeCompare(r.toUpperCase().split(this.tic).join(""))<0?this.trueValue:this.falseValue:l<o?this.trueValue:this.falseValue),"greater"!==t||h||(c=this.isNaN(o)||this.isNaN(l)?a.toUpperCase().split(this.tic).join("").localeCompare(r.toUpperCase().split(this.tic).join(""))>0?this.trueValue:this.falseValue:l>o?this.trueValue:this.falseValue),"lessEq"!==t||h||(c=this.isNaN(o)||this.isNaN(l)?a.toUpperCase().split(this.tic).join("").localeCompare(r.toUpperCase().split(this.tic).join(""))<=0?this.trueValue:this.falseValue:l<=o?this.trueValue:this.falseValue),"greaterEq"!==t||h||(c=this.isNaN(o)||this.isNaN(l)?a.toUpperCase().split(this.tic).join("").localeCompare(r.toUpperCase().split(this.tic).join(""))>=0?this.trueValue:this.falseValue:l>=o?this.trueValue:this.falseValue),"notEq"!==t||h||(c=a!==r?this.trueValue:this.falseValue,d&&(c=this.falseValue)),"and"!==t||h||(r=e.pop().toString(),a="",e.length>0&&(a=e.pop().toString()),this.getErrorStrings().indexOf(r)>-1?c=r:this.getErrorStrings().indexOf(a)>-1?c=a:(c=this.emptyString+a+r+this.emptyString,c=c.split(this.tic).join(""))),"equal"!==t||h||(r=e.pop(),a=e.pop(),this.getErrorStrings().indexOf(r)>-1?c=r:this.getErrorStrings().indexOf(a)>-1?c=a:(this.isNaN(this.parseFloat(r))&&this.isNaN(this.parseFloat(a))&&(r=r.toString().toLowerCase(),a=a.toString().toLowerCase()),"*"===r&&this.isNaN(this.parseFloat(a))&&""!==a&&(d=!0),c=r===a||d?this.trueValue:this.falseValue)),"or"!==t||h||(c=Math.pow(this.parseFloat(l),this.parseFloat(o)).toString(),c=this.isNaN(this.parseFloat(c))?this.getErrorStrings()[s.a.value]:c),e.push(c),c},t.prototype.computeStoreCells=function(e){for(var t,r=e.cellValue,i=e.cellRange,a=e.criteria,o=e.argArray,s=e.isCriteria,l=e.storedCells,c=e.isCountIfS===this.trueValue,h=e.countVal||0,p=s===this.trueValue?l:r,u=[],f=0;f<p.length;f++){var g=[],m=this.getValueFromArg(r[f]),v=o[c?1+2*h:2+h],y=v.startsWith(this.tic)&&v.endsWith(this.tic);t=v.trim().split(this.tic).join(this.emptyString);var C=t.includes("*"),b="*"===t||"<>*"===t,x=C&&!b?t.replace(/\*/g,"").trim():t,S=!1;if(!y&&this.isCellReference(x)&&(x=this.getValueFromArg(x),S=!0),C&&!b){var w=t.indexOf("*");"*"===t[0]&&(x="*"+x),"*"===t[t.length-1]&&(x+="*"),w>0&&w<t.length-1&&(x=t.substring(0,w)+"*"+t.substring(w+1))}t=x;var _="";if((s=c?this.trueValue:s)===this.trueValue){var I="",E=0,R=0,k=void 0,A=void 0,F=void 0,N=void 0;l[f]=c&&!h?r[f]:l[f],I=l[f],h&&(k=i[h-1],A=k.indexOf("!")>-1?n.i(d.T)(k.substring(k.lastIndexOf("!")+1)):n.i(d.T)(k),F=I.indexOf("!")>-1?n.i(d.U)(I.substring(I.lastIndexOf("!")+1)):n.i(d.U)(I),N=i[h].indexOf("!")>-1?n.i(d.T)(i[h].substring(i[h].lastIndexOf("!")+1)):n.i(d.T)(i[h]));var T=I.indexOf("!")>-1,O=void 0,D="",L="";for(T&&(L=I.substring(0,I.lastIndexOf("!")+1),I=I.substring(I.lastIndexOf("!")+1));!this.isDigit(I[E]);)E+=1;if(this.isCellReference(i[h])&&i[h].indexOf(":")>-1)for(_=c&&!h?p[f].indexOf("!")>-1?p[f].substring(p[f].lastIndexOf("!")+1):p[f]:n.i(d.W)(N[0]+(F[0]-A[0]),N[1]+(F[1]-A[1])),O=i[h].indexOf("!")>-1,O&&(D=i[h].substring(0,i[h].lastIndexOf("!")+1));!this.isDigit(_[R]);)R+=1;var P=this.substring(I,E),M=this.substring(_,R),B=this.substring(I,E,I.length-E),H=this.substring(_,R,_.length-E);T&&(P=L+P,M=L+M),B!==H&&(l[f]=this.substring(l[f],T?L.length+E:E)+H),_=l[f].split(P).join(M),O?(_.indexOf("!")>-1&&(_=_.substring(_.lastIndexOf("!")+1)),_=D+_):_=_.substring(_.lastIndexOf("!")+1),m=this.getValueFromArg(_),t=c?t:a[h-1].split(this.tic).join(this.emptyString)}var U="equal";t.startsWith("<=")?(U="lessEq",t=t.substring(2)):t.startsWith(">=")?(U="greaterEq",t=t.substring(2)):t.startsWith("<>")?(U="notEq",t=t.substring(2)):t.startsWith("<")?(U="less",t=t.substring(1)):t.startsWith(">")?(U="greater",t=t.substring(1)):t.startsWith("=")&&(U="equal",t=t.substring(1)),(!y&&this.isCellReference(t)&&(!S||""!==_&&!c)||t.includes(this.arithMarker))&&(t=this.getValueFromArg(t)),(t.indexOf("*")>-1||t.indexOf("?")>-1)&&(m=this.findWildCardValue(t.toLowerCase(),m.toLowerCase())),g.push(m.toLowerCase()),g.push(t.toLowerCase()),this.processLogical(g,U)===this.trueValue&&(s===this.falseValue?u.push(r[f]):u.push(_))}return l=u,u=[],l},t.prototype.computeIfsFormulas=function(e,t,r){if(t===this.trueValue&&(n.i(i.isNullOrUndefined)(e)||""===e[0]||e.length<2||e.length>127||e.length%2!=0))return this.formulaErrorStrings[s.b.wrong_number_arguments];for(var a=e,o=[],l=[],c=[],h=0,p=0;p<a.length;p++)a[p].indexOf(":")>-1&&this.isCellReference(a[p])?o.push(a[p].trim()):l.push(a[p].trim());for(var u=[],p=0;p<o.length;p++)u.push(this.getCellCollection(o[p]).length);for(var f=0;f<u.length;f++)if(u[f]&&u[f+1]&&u[f]!==u[f+1])return this.getErrorStrings()[s.a.value];for(var g=0;g<l.length;g++)if(""===l[g])return r===this.trueValue?this.getErrorStrings()[s.a.divzero]:0;var m,v;if(t===this.falseValue){v=this.falseValue,m=this.getCellCollection(o[1]);var y={cellValue:m,cellRange:o,criteria:l,argArray:a,isCriteria:v,storedCells:c,isCountIfS:t};if(c=this.computeStoreCells(y),0===c.length)return r===this.trueValue?this.getErrorStrings()[s.a.divzero]:0}for(var C=t===this.trueValue?0:2,p=C;p<o.length;p++){v=this.trueValue,v=t===this.trueValue&&0===p?this.falseValue:this.trueValue,m=this.getCellCollection(o[p]);var y={cellValue:m,cellRange:o,criteria:l,argArray:a,isCriteria:v,storedCells:c,isCountIfS:t,countVal:p};if(c=this.computeStoreCells(y),0===c.length)return r===this.trueValue?this.getErrorStrings()[s.a.divzero]:0}for(var b=0,x=o[0].indexOf("!")>-1?n.i(d.T)(o[0].substring(o[0].lastIndexOf("!")+1)):n.i(d.T)(o[0]),S=o[o.length-1],w=S.indexOf("!")>-1?n.i(d.T)(S.substring(S.lastIndexOf("!")+1)):n.i(d.T)(S),f=0;f<c.length;f++){var _="",I="",E=0,R=0;_=c[f];var k=_.indexOf("!")>-1,A=void 0,F="",N="";for(k&&(N=_.substring(0,_.lastIndexOf("!")+1),_=_.substring(_.lastIndexOf("!")+1));!this.isDigit(_[E]);)E+=1;if(this.isCellReference(o[0])&&o[0].indexOf(":")>-1)for(I=n.i(d.W)(x[0]+(n.i(d.U)(_)[0]-w[0]),x[1]+(n.i(d.U)(_)[1]-w[1])),A=o[0].indexOf("!")>-1,A&&(F=o[0].substring(0,o[0].lastIndexOf("!")+1));!this.isDigit(I[R]);)R+=1;var T=this.substring(_,E),O=this.substring(I,R),D=this.substring(_,E,_.length-E),L=this.substring(I,R,I.length-E);if(k&&(T=N+T,O=N+O),D!==L&&(c[f]=this.substring(c[f],k?N.length+E:E)+L),m=c[f].split(T).join(O),A?(m.indexOf("!")>-1&&(m=m.substring(m.lastIndexOf("!")+1)),m=F+m):m=m.substring(m.lastIndexOf("!")+1),t===this.trueValue)h+=1;else{var P=this.getValueFromArg(m),M=parseFloat(""===P&&r!==this.trueValue?"0":P);this.isNumber(M)&&(b++,h+=M)}}return r===this.trueValue&&(h/=b),h},t.prototype.processNestedFormula=function(e,t,n){if(n&&!n.toString().includes('"')){if('"'===e[e.indexOf(t)+t.length]&&this.getErrorStrings().indexOf(n.toString())<0&&!this.isNumber(n)&&n!==this.trueValue&&n!==this.falseValue)return e.split(t).join('"'+n+'"')}return e.split(t).join("n"+n)},t.prototype.isNaN=function(e){return"NaN"===e.toString()||"string"==typeof e},t.prototype.isNumber=function(e){return e-parseFloat(e)>=0},t.prototype.fromOADate=function(e){(e=e>0&&e<1?1+e:0===e?1:e)>60&&(e-=1);var t=new Date("01/01/1900"),n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return new Date(new Date((e-1)*this.millisecondsOfaDay+n).toUTCString().replace(" GMT",""))},t.prototype.getSerialDateFromDate=function(e,t,n){var r=0;e<1900&&(e+=1900);for(var i=!1;!i;){for(;t>12;)e++,t-=12;for(;t<1;)t+=12,e--;i=!0;for(var a=new Date(e,t,1,-1).getDate();n>a;)a=new Date(e,t,1,-1).getDate(),t++,n-=a,i=!1;n<1&&(t--,t<1&&(t=12,e--),a=new Date(e,t,1,-1).getDate(),n=a+n,i=!1)}var o=Date.parse(e+"/"+t+"/"+n);return this.isNaN(o)||(r=this.toOADate(new Date(o))),r},t.prototype.intToTime=function(e){var t=e.toString().split(".");return n.i(i.isNullOrUndefined)(t[1])||(e=parseFloat(t[0]+1+"."+t[1])||e),this.intToDate(e.toString())},t.prototype.toOADate=function(e,t,r){var i=new Date("01/01/1900"),a=n.i(d._189)(e)?e:new Date(e),o=Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()),s=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()),l=(s-o)/864e5;return(t?l:parseInt(l.toString(),10))+(r?0:l>60?2:1)},t.prototype.calculateDate=function(e){return this.parseFloat(e)<10?"0"+e:e},t.prototype.isTextEmpty=function(e){return null===e||""===e},t.prototype.isDigit=function(e){var t=e.charCodeAt(0);return t>47&&t<58},t.prototype.findLastIndexOfq=function(e){for(var t=e.lastIndexOf("q"),n=e.lastIndexOf(this.leftBracket);n<t;)t=e.substring(0,t).lastIndexOf("q");return t},t.prototype.getValueFromArg=function(e,t,r,a){e=e.trim();var o=e,l=this.dateTime1900,d=o;if(n.i(i.isNullOrUndefined)(o)||this.isTextEmpty(o))return o;if(e[0]===this.tic||e[0]===this.singleTic){var c=e.split(this.tic).join("");if(l=this.isDate(c),this.isNaN(this.parseFloat(c))&&!n.i(i.isNullOrUndefined)(l)&&!this.isNaN(l.getDate())&&this.dateTime1900<=l)return this.toOADate(l,!0).toString();if(e[e.length-1]===this.tic){var h=this.getParseDecimalSeparator();"."!==h&&c.includes(h)&&(c=c.replace(h,"."),this.isNumber(c)&&(e=c))}return e}e=e.split("u").join("-");var h=this.getParseDecimalSeparator();if(!this.isUpperChar(o[0])&&(this.isDigit(o[0])||o[0]===h||"-"===o[0]||"n"===o[0])){if("n"===o[0]&&(o=o.substring(1),o.indexOf('"n')>-1&&(o=o.replace('"n','"'))),"."!==h&&o.includes(h)){var c=o.replace(h,".");this.isNumber(c)&&(o=c)}return o}var p=["+","-","/","*",")",")","{"];if(-1===this.parser.indexOfAny(o,p)&&this.isUpperChar(o[0])||o[0]===this.sheetToken){if(o!==this.trueValue&&o!==this.falseValue&&this.isCellReference(o)){var u=this.getSheetFamilyItem(this.grid);if(null!==u.sheetNameToParentObject&&u.sheetNameToParentObject.size>0&&-1===o.indexOf(this.sheetToken)){o=u.parentObjectToToken.get(this.grid)+o}}if(o===this.cell){var f=this.getDependentCells().get(o);if(null!=f&&f.indexOf(o)>-1&&this.arrayRemove(f,o),this.getDependentFormulaCells().has(this.cell)||this.clearFormulaDependentCells(this.cell),!t)throw this.formulaErrorStrings[s.b.circular_reference]+o}return d=this.getParentObjectCellValue(o,!1,t,a),this.updateDependentCell(o),d.toString()}return this.getErrorStrings().indexOf(e)>-1?e:this.computeValue(d.toString(),!1,r)},t.prototype.isDate=function(e){if("object"==typeof e||null!==Date.parse(e)){var t=void 0;return t="string"==typeof e?this.checkDateFormat(e):new Date(Date.parse(e)),t>=this.dateTime1900?t:null}return null},t.prototype.isValidCellReference=function(e){var t=0,r=0,a=[89,71,69],o=this.emptyString;if(this.namedRanges.has(e))return!1;for(var s=0;s<e.length;s++)this.isChar(e[s])&&t++;if(o=e.substring(0,t),o.length<4){for(;r<o.length;){if(n.i(i.isNullOrUndefined)(o[r])||!(o[r].charCodeAt(0)<a[r])){if(n.i(i.isNullOrUndefined)(o[r])&&r>0)break;return!1}r++}if(this.parseFloat(e.substring(t,e.length))<1048576)return!0}return!1},t.prototype.parseDate=function(e){if(!this.isNaN(e)){if(e instanceof Date)return new Date(e);var t=parseInt(e,10);return t<0?this.getErrorStrings()[s.a.num]:t<=60?new Date(this.dateTime1900.getTime()+864e5*(t-1)):new Date(this.dateTime1900.getTime()+864e5*(t-2))}return"string"!=typeof e||(e=this.checkDateFormat(e,!0),this.isNaN(e))?this.getErrorStrings()[s.a.value]:e},t.prototype.checkDateFormat=function(e,t){if("spreadsheet"===this.parentObject.getModuleName()&&"en-US"!==this.parentObject.locale){var n={value:e,cell:{value:e}};if(this.parentObject.notify("checkDateFormat",n),n.isDate)return n.dateObj}return t?new Date(e):new Date(Date.parse(e))},t.prototype.isCellReference=function(e){if((e=e.trim())===this.emptyString)return!1;e=this.setTokensForSheets(e);var t=this.getSheetToken(e),n=!1;""!==t&&(e=e.split(t).join(this.emptyString));var r=!1,i=!1;if(e.indexOf(":")!==e.lastIndexOf(":"))return!1;for(var a=e.split("").join(this.getParseArgumentSeparator()).split(this.getParseArgumentSeparator()),o=0;o<a.length;o++)if(this.isChar(a[o]))r=!0;else if(this.isDigit(a[o]))i=!0;else{if(":"!==a[o])return!1;r&&i&&(n=!0),r=!1,i=!1}return e.indexOf(":")>-1&&-1===e.indexOf(this.tic)?!!(n&&r&&i)||!(!(r&&!i||!r&&i)||n):!!(r&&i&&-1===e.indexOf(this.tic)&&this.isValidCell(e))},t.prototype.setTokensForSheets=function(e){var t=this.getSheetFamilyItem(this.grid),n=this.getSortedSheetNames();if(null!=n)for(var r=0;r<n.length;r++){var i=t.sheetNameToToken.get(n[r]);i=i.split(this.sheetToken).join(this.tempSheetPlaceHolder);var a=this.singleTic+"SHEET"+n[r]+this.singleTic+this.sheetToken;-1===e.indexOf(a)&&(a="SHEET"+n[r]+this.sheetToken),e=e.split(a).join(i),a=n[r]+this.sheetToken,e=e.split(a).join(i)}if(e=e.split(this.tempSheetPlaceHolder).join(this.sheetToken),e.indexOf("!!")>-1){e=e.replace("!!","!");var o=e.split("!");o[1]=(parseInt(o[1],10)+1).toString(),e=o.join("!")}return e},t.prototype.getParentObjectCellValue=function(e,t,n,r){if(e===this.trueValue||e===this.falseValue)return e;var i=e.lastIndexOf(this.sheetToken),a=0,o=0,l=this.grid,d=this.getSheetFamilyItem(l);if(i>-1&&null!==d.tokenToParentObject)this.grid=d.tokenToParentObject.get(e.substring(0,i+1)),a=this.rowIndex(e),o=this.colIndex(e);else if(-1===i){for(var c=0;c<e.length&&this.isChar(e[c]);)c++;if(c===e.length||!this.isValidCell(e))return e=e.toLowerCase(),""===e?this.getErrorStrings()[s.a.value]:this.getErrorStrings()[s.a.name];a=this.rowIndex(e),o=this.colIndex(e),d.isSheetMember&&null!=d.parentObjectToToken&&(e=d.parentObjectToToken.get(this.grid)+e)}var h=""===this.cell||null===this.cell?"":this.cell;if(this.cell=e,h===this.cell&&!n)throw this.formulaErrorStrings[s.b.circular_reference];var p=this.getParentCellValue(a,o,this.grid,h,l,t,n,r);return this.grid=l,this.cell=h,p},t.prototype.getParentCellValue=function(e,t,r,a,o,s,l,d){var c,h=this.getSheetId(r);if(void 0===this.parentObject.getValueRowCol?c=this.getValueRowCol(h,e,t):(a&&(a=o===r?"":a+","+(o&&"string"==typeof o&&Number(o)>-1?o:this.getSheetID(o))),c=this.parentObject.getValueRowCol(h,e,t,a,s,l,d)),n.i(i.isNullOrUndefined)(c))c=this.emptyString;else{c=c.toString();var p=this.getParseDecimalSeparator();if("."!==p&&c.includes(p)){var u=c.replace(p,".");this.isNumber(u)&&(c=u)}}return c},t.prototype.isValidCell=function(e){if(0===e.search(/\d/)){var t=e.search(/[a-zA-Z]/);e=e.substring(t,e.length)+e.substring(0,t)}var n=this.rowIndex(e),r=this.colIndex(e);return n>0&&n<=1048576&&r>0&&r<=16384},t.prototype.getSheetId=function(e){return e&&"string"==typeof e&&Number(e)>-1?Number(e):this.getSheetID(e)+1},t.prototype.getValueRowCol=function(e,t,n){var r=this.rowsToKeyMap.get(t).toString(),i=this.getKeyValue(r).toString();if(null!=i&&"%"===i[i.length-1]&&i.length>1){var a=this.parseFloat(i.substring(0,i.length-1));this.isNaN(a)&&(i=(Number(a)/100).toString())}return i},t.prototype.defineFunction=function(e,t,r){"string"==typeof t&&(t=n.i(i.getValue)(t,window)),e=e.toUpperCase(),this.libraryFormulas.set(e,{handler:t,isCustom:!0,description:r})},t.prototype.valueChanged=function(e,t,a,o,s,l,d,c){var h=e;this.spreadSheetUsedRange=o,this.grid=e;var p=!0,u=!0,g=this.getSheetFamilyItem(h),m=r(t.getColIndex())+t.getRowIndex().toString();if(this.actCell=l+"!"+m,null!==g.sheetNameToParentObject&&g.sheetNameToParentObject.size>0){m=g.parentObjectToToken.get(h)+m}var v=t.getValue().toUpperCase();if(v.indexOf("=RAND()")>-1||v.indexOf("=NOW()")>-1||v.indexOf("NOW()")>-1||v.indexOf("RAND()")>-1||v.indexOf("=RANDBETWEEN(")>-1||v.indexOf("RANDBETWEEN(")>-1||this.randomValues.has(m)){var y=this.randCollection.toString();this.randomValues.has(m)?this.randomValues.has(m)&&(v.indexOf("=RAND()")>-1||v.indexOf("=NOW()")>-1||v.indexOf("NOW()")>-1||v.indexOf("RAND()")>-1||v.indexOf("=RANDBETWEEN(")>-1||v.indexOf("RANDBETWEEN(")>-1?this.randomValues.set(m,t.getValue()):t.getValue().toUpperCase()!==this.randomValues.get(m.toUpperCase())&&(this.randomValues.delete(m),y=y.split(m+this.parseArgumentSeparator).join("").split(this.parseArgumentSeparator+m).join("").split(m).join(""),this.randCollection=y.split(this.parseArgumentSeparator)),0===this.randomValues.size&&this.randCollection.length&&(this.isRandomVal=!1,this.randomValues.clear(),this.randCollection=[])):(this.randomValues.set(m,t.getValue()),this.randCollection.push(m),this.isRandomVal=!0)}if(t.getValue()&&t.getValue()[0]===this.getFormulaCharacter()){this.cell=m;var C=void 0;if(n.i(i.isNullOrUndefined)(u)||(u=a),this.getFormulaInfoTable().has(m)){if(C=this.getFormulaInfoTable().get(m),t.getValue()!==C.getFormulaText()||null==C.getParsedFormula()){C.setFormulaText(t.getValue()),this.getDependentFormulaCells().has(this.cell)&&this.clearFormulaDependentCells(this.cell);try{C.setParsedFormula(this.parser.parseFormula(t.getValue()))}catch(e){C.setFormulaValue(e),u=!1}}if(u){this.parser.isFormulaParsed=!0;var b=this.calculateFormula(C.getParsedFormula(),s);p=b!==C.getFormulaValue(),C.setFormulaValue(b)}}else{C=new f,C.setFormulaText(t.getValue()),this.getDependentFormulaCells().has(m)||this.getDependentFormulaCells().set(m,new Map);try{C.setParsedFormula(this.parser.parseFormula(t.getValue()))}catch(e){C.setFormulaValue(e),u=!1}u&&C.setFormulaValue(this.calculateFormula(C.getParsedFormula(),s)),this.getFormulaInfoTable().has(m),this.getFormulaInfoTable().set(m,C)}u&&(void 0===this.parentObject.setValueRowCol?this.setValueRowCol(this.getSheetID(h)+1,C.getFormulaValue(),t.getRowIndex(),t.getColIndex()):this.parentObject.setValueRowCol(this.getSheetId(h),C.getFormulaValue(),t.getRowIndex(),t.getColIndex(),C.getFormulaText(),d))}else this.getFormulaInfoTable().has(m)&&(this.getFormulaInfoTable().delete(m),this.getDependentFormulaCells().has(m)&&this.clearFormulaDependentCells(m));u&&p&&this.getDependentCells().has(m)&&this.getDependentCells().get(m).toString()!==m&&this.refresh(m,void 0,void 0,c)},t.prototype.setValueRowCol=function(e,t,n,r){},t.prototype.getSortedSheetNames=function(){var e=this.getSheetFamilyItem(this.grid);if(null!=e&&null!=e.sheetNameToToken){var t=[];e.sheetNameToToken.forEach(function(e,n){t.push(n),t.sort()}),this.sortedSheetNames=t,this.sortedSheetNames.sort(),this.sortedSheetNames.length>9&&this.sortedSheetNames[0].includes("1")&&this.sortedSheetNames[1].includes("10")&&(this.sortedSheetNames.splice(this.sortedSheetNames.indexOf("2"),0,this.sortedSheetNames[0]),this.sortedSheetNames.splice(0,1))}return this.sortedSheetNames},t.prototype.getErrorLine=function(e){var t=e.stack?e.stack.split("\n")[1].split(":"):null;return t?t[t.length-2]:null},t.prototype.createSheetFamilyID=function(){return this.sheetFamilyID===Number.MAX_SAFE_INTEGER&&(this.sheetFamilyID=Number.MIN_SAFE_INTEGER),this.sheetFamilyID++},t.prototype.computeMinMax=function(e,t){var r,a,o=!1;if(e.length&&"isSubtotal"===e[e.length-1]&&(o=!0,e.pop()),n.i(i.isNullOrUndefined)(e)||0===e.length)return this.formulaErrorStrings[s.b.wrong_number_arguments];r="max"===t?this.minValue:this.maxValue;for(var l=0,d=e.length;l<d;l++)e[l].split(this.tic).join("").trim()===this.emptyString&&(r=0);var c=e;if(c.length>255)return this.getErrorStrings()[s.a.value];for(var h=0;h<c.length;h++)if(c[h].indexOf(":")>-1&&this.isCellReference(c[h])){for(var p=this.getCellCollection(c[h]),u=0;u<p.length;u++)if(a=o?this.getValueFromArg(p[u],null,null,!0):this.getValueFromArg(p[u]),!o||!a.includes("SUBTOTAL(")){var f=this.parseFloat(a);""===a||this.isNaN(this.parseFloat(f))||this.getErrorStrings().indexOf(a)>-1||(r="max"===t?Math.max(r,f):Math.min(r,f))}}else{var g=o?this.getValueFromArg(c[h],null,null,!0):this.getValueFromArg(c[h]);if(o&&g.includes("SUBTOTAL("))continue;var f=0,m=this.isCellReference(c[h]),v=""===g&&m,y=this.isNaN(this.parseFloat(g))&&m,C=g===(this.trueValue||this.falseValue)&&m;if(c[h]=c[h].startsWith("n")?c[h].slice(1):c[h],this.getErrorStrings().indexOf(g)>-1)return g;if(g===this.trueValue&&c[h]===this.trueValue)g="1";else if(g===this.falseValue&&c[h]===this.falseValue)g="0";else if(v||y||C)continue;if(g.indexOf('"')>-1&&(g=g.split(this.tic).join("")),this.isNaN(this.parseFloat(g)))return this.getErrorStrings()[s.a.value];f=this.parseFloat(g),r="max"===t?Math.max(r,f):Math.min(r,f)}return r!==this.minValue&&r!==this.maxValue||(r=0),r.toString()},t.prototype.calculateAvg=function(e,t){for(var r,a,o=e,l=[],d=0,c=0,h=0;h<o.length;h++)if(this.isCellReference(o[h]))if(o[h].indexOf(":")>-1){l=this.getCellCollection(o[h]);for(var p=0;p<l.length;p++)if(r=t?this.getValueFromArg(l[p],null,null,!0):this.getValueFromArg(l[p]),!t||!r.includes("SUBTOTAL(")){if(this.getErrorStrings().indexOf(r)>-1)return r;n.i(i.isNullOrUndefined)(r)||isNaN(this.parseFloat(r))||""===r||(d+=this.parseFloat(r),c+=1)}}else{if(r=t?this.getValueFromArg(o[h],null,null,!0):this.getValueFromArg(o[h]),t&&r.includes("SUBTOTAL("))continue;if(this.getErrorStrings().indexOf(r)>-1)return r;if(n.i(i.isNullOrUndefined)(r)||isNaN(this.parseFloat(r))||""===r)continue;d+=this.parseFloat(r),c+=1}else{if(o[h].indexOf(this.tic)>-1&&(isNaN(this.parseFloat(o[h].split(this.tic).join("")))||""===o[h].split(this.tic).join("").trim()))return this.getErrorStrings()[s.a.value];if(0!==o[h].length&&e[h]!==this.falseValue||(o[h]="0"),e[h]===this.trueValue&&(o[h]="1"),a=this.getValueFromArg(o[h].split(this.tic).join("")),this.getErrorStrings().indexOf(a)>-1)return a;d+=this.parseFloat(a),c+=1}return 0===c?this.getErrorStrings()[s.a.divzero]:(d/c).toString()},t.prototype.registerGridAsSheet=function(e,t,r){n.i(i.isNullOrUndefined)(this.modelToSheetID)&&(this.modelToSheetID=new Map),n.i(i.isNullOrUndefined)(this.modelToSheetID.get(t))&&this.modelToSheetID.set(t,r);var a=this.getSheetFamilyItem(t);a.isSheetMember=!0;var o=e.toUpperCase();if(0===a.parentObjectToToken.size&&(a.parentObjectToToken=new Map),0===a.sheetNameToParentObject.size&&(a.sheetNameToParentObject=new Map),0===a.sheetNameToToken.size&&(a.sheetNameToToken=new Map),0===a.tokenToParentObject.size&&(a.tokenToParentObject=new Map),n.i(i.isUndefined)(a.sheetNameToParentObject.get(o))){var s=this.sheetToken+this.tokenCount.toString()+this.sheetToken;this.tokenCount++,a.tokenToParentObject.set(s,t),a.parentObjectToToken.set(t,s),a.sheetNameToToken.set(o,s),a.sheetNameToParentObject.set(o,t)}else{var s=a.sheetNameToToken.get(o);a.tokenToParentObject.set(s,t),a.parentObjectToToken.set(t,s)}return e},t.prototype.unregisterGridAsSheet=function(e,t,r){var a=this,o=[t];r&&(o=[],n.i(i.isNullOrUndefined)(this.modelToSheetID)||this.modelToSheetID.forEach(function(e,t){o.push(t)})),o.forEach(function(t){var n=a.getSheetFamilyItem(t),i=(r?t:e).toUpperCase();if(null!=n.sheetNameToParentObject&&n.sheetNameToParentObject.has(i)){n.sheetNameToParentObject.delete(i);var o=n.sheetNameToToken.get(i);n.sheetNameToToken.delete(i),n.tokenToParentObject.delete(o),n.parentObjectToToken.delete(t)}})},t.prototype.computeExpression=function(e,t){var n=this.parser.parseFormula(e);return this.computeFormula(n,t)},t.prototype.isSheetMember=function(){var e=this.getSheetFamilyItem(this.grid);return!n.i(i.isNullOrUndefined)(e)&&e.isSheetMember},t.prototype.dispose=function(){this.resetKeys(),this.namedRanges.clear(),this.lFormulas.clear()},t.prototype.refreshRandValues=function(e){var t,n,r,i,a="";if(this.randomValues.has(e)){this.randomValues.delete(e);var o=this.randCollection.indexOf(e);o>-1&&this.randCollection.splice(o,1),0!==this.randomValues.size||this.randCollection.length||(this.randomValues.clear(),this.randCollection=[])}for(var s=0;s<this.randomValues.size;s++)t=this.rowIndex(this.randCollection[s]),n=this.colIndex(this.randCollection[s]),a=(parseFloat(this.getSheetToken(this.randCollection[s]).split(this.sheetToken).join(""))+1).toString(),i=this.getSheetFamilyItem(a),this.grid=i.sheetNameToParentObject.get(a),r=this.randomValues.get(this.randCollection[s]),r=this.computeFormula(r),void 0===this.parentObject.setValueRowCol?this.setValueRowCol(this.getSheetID(this.grid)+1,r,t,n):this.parentObject.setValueRowCol(this.getSheetId(this.grid),r,t,n)},t.prototype.refresh=function(e,t,n,r){var i,a=this;if(n||(i=!0,n=[]),this.getDependentCells().has(e)){var o=this.getSheetFamilyItem(this.grid);try{var s=this.getDependentCells().get(e),l=void 0;for(l=0;l<s.length;l++){var d=s[l];if(!(t&&d.indexOf(t)>-1||d===e||n.indexOf(d)>-1)){var c=this.getSheetToken(d),h=this.parentObject.sheets,p=this.parentObject.activeSheetIndex;if(c.length){this.grid=o.tokenToParentObject.get(c);var u=Number(this.grid),f="";if(!this.isNaN(u)&&h)for(var g=0;g<h.length;g++)h[g].id===u&&(f=h[g].name,p=g);this.actCell=f+"!"+d.split(c)[1]}else this.actCell=d.split(c)[1];try{var m=function(e,t){t&&(a.cell=e,a.parser.isFormulaParsed=!0,t.setFormulaValue(a.calculateFormula(t.getParsedFormula(),!0)))},v=this.rowIndex(d),y=this.colIndex(d),C=this.getFormulaInfoTable().get(d);if(void 0===this.parentObject.setValueRowCol)m(d,C),this.setValueRowCol(this.getSheetID(this.grid)+1,C.getFormulaValue(),v,y);else{var b=h&&h[p].rows&&h[p].rows[v-1]&&h[p].rows[v-1].cells&&h[p].rows[v-1].cells[y-1],x=void 0;if(b&&b.formula&&b.formula.toLowerCase().includes("unique")){if(this.uniqueCells&&-1!==this.uniqueCells.indexOf(d))continue;this.uniqueCells||(this.uniqueCells=[]),this.uniqueCells.push(d),m(d,C),x=C.getFormulaValue(),this.uniqueCells.splice(this.uniqueCells.indexOf(d),1),this.uniqueCells.length||(this.uniqueCells=null)}else-1===n.indexOf(d)&&n.push(d),x=null;this.parentObject.setValueRowCol(this.getSheetId(this.grid),x,v,y,C.getFormulaText())}this.refresh(d,null,n)}catch(e){continue}}}if(i){var S,w,_,I,E,R=this.parentObject.sheets;R||(n=[]),n.forEach(function(e){S=a.getSheetId(o.tokenToParentObject.get(a.getSheetToken(e)));for(var t=0;t<R.length;t++)if(R[t].id===S){w=t;break}_=a.rowIndex(e)-1,I=a.colIndex(e)-1,(E=R[w].rows[_]&&R[w].rows[_].cells[I])&&a.parentObject.notify("calculateFormula",{cell:E,rowIdx:_,colIdx:I,sheetIndex:w,isDependentRefresh:!0,isRandomFormula:r})})}}finally{this.grid=o.tokenToParentObject.get(this.getSheetToken(e))}}};var p;return h([n.i(i.Property)(!0)],t.prototype,"includeBasicFormulas",void 0),h([n.i(i.Event)()],t.prototype,"onFailure",void 0),t=p=h([i.NotifyPropertyChanges],t)}(i.Base),u=function(){function e(e,t){this.formulaCorrection=!1,this.message=e,this.formulaCorrection=t}return e}(),f=function(){function e(){this.calcID=Number.MIN_VALUE+1,this.calcID1=Number.MIN_VALUE+1}return e.prototype.getFormulaText=function(){return this.formulaText},e.prototype.setFormulaText=function(e){this.formulaText=e},e.prototype.getFormulaValue=function(){return this.formulaValue},e.prototype.setFormulaValue=function(e){this.formulaValue=e},e.prototype.getParsedFormula=function(){return this.parsedFormula},e.prototype.setParsedFormula=function(e){this.parsedFormula=e},e}(),g=function(){function e(){this.isSheetMember=!1,this.parentObjectToToken=new Map,this.sheetDependentFormulaCells=new Map,this.sheetNameToParentObject=new Map,this.sheetNameToToken=new Map,this.tokenToParentObject=new Map,this.sheetFormulaInfotable=new Map}return e}(),m=function(){function e(e,t,n){return this.row=e,this.col=t,this.value=n,this.getRowIndex=function(){return e},this.setRowIndex=function(t){e=t},this.getColIndex=function(){return t},this.setColIndex=function(e){t=e},this.getValue=function(){return n},this}return e}()},function(e,t,n){"use strict";function r(e){return void 0===e}function i(e){switch(e){case"dd-MMM-yyyy":case"dd MMM yyyy":e="medium";break;case"MMM yyyy":e="yMMM";break;case"MM/dd/yyyy":case"dd/MM/yyyy":case"dd/MM/yy":e="short";break;case"dddd MMMM dd yyyy":case"dd MMMM yyyy":e="long";break;case"d MMMM yyyy":e="yMMMd";break;case"yyyy":e="y";break;case"h:mm":e="Hm";break;case"h:mm tt":e="hm";break;case"h":e="H";break;case"h tt":e="h";break;case"dddd":e="E";break;case"h:mm:ss tt":e="hms";break;case"h:mm:ss":e="Hms";break;case"d":e="d";break;case"d dddd":e="Ed";break;case"M":e="M";break;case"Md":e="Md";break;case"MMM":e="MMM";break;case"ddd MMM d":e="MMMEd";break;case"MMM d":e="MMMd";break;case"M/yyyy":e="yM";break;case"ddd":e="E";break;default:e=""}return e}function a(e){var t=!1;for(var n in o.c)if(e.indexOf("."+n+"]")>-1){t=!0;break}return t}n.d(t,"a",function(){return s}),t.b=r,t.c=i,t.d=a;var o=n(23),s=function(){function e(e){this.parent=e}return e.prototype.getModuleName=function(){return"calc-common"},e}()},function(e,t,n){"use strict";function r(e,t){for(var r=t,i=e.replace(/\[/g,".").replace(/\]/g,"").split("."),o=0;o<i.length&&!n.i(a.isUndefined)(r);o++)r=r[i[o]];return r}function i(e,t,r){var i,o,s=e.replace(/\[/g,".").replace(/\]/g,"").split("."),l=r||{},d=l,c=s.length;for(i=0;i<c;i++)o=s[i],i+1===c?d[""+o]=void 0===t?{}:t:n.i(a.isNullOrUndefined)(d[""+o])&&(d[""+o]={}),d=d[""+o];return l}t.a=r,t.b=i,n.d(t,"c",function(){return o});var a=n(3),o=(n.n(a),function(){function e(e){this.loadedModules=[],this.parent=e}return e.prototype.inject=function(e,t){var n=e.length;if(0===n)return void this.clean();this.loadedModules.length&&this.clearUnusedModule(e);for(var r=0;r<n;r++)for(var a=e[r],o=0,s=t;o<s.length;o++){var l=s[o],d=a.member;if(l.prototype.getModuleName()===a.member&&!this.isModuleLoaded(d)){var c=this.createInstance(l,a.args),h=this.getMemberName(d);a.isProperty?i(h,l,this.parent):i(h,c,this.parent);var p=a;p.member=h,this.loadedModules.push(p)}}},e.prototype.createInstance=function(e,t){var n=t;return n.unshift(void 0),new(Function.prototype.bind.apply(e,n))},e.prototype.clean=function(){for(var e=0,t=this.loadedModules;e<t.length;e++){var n=t[e];n.isProperty||r(n.member,this.parent).destroy()}this.loadedModules=[]},e.prototype.clearUnusedModule=function(e){for(var t=this,n=e.map(function(e){return t.getMemberName(e.member)}),i=this.loadedModules.filter(function(e){return-1===n.indexOf(e.member)}),a=0,o=i;a<o.length;a++){var s=o[a];s.isProperty||r(s.member,this.parent).destroy(),this.loadedModules.splice(this.loadedModules.indexOf(s),1),this.deleteObject(this.parent,s.member)}},e.prototype.getMemberName=function(e){return e[0].toLowerCase()+e.substring(1)+"Module"},e.prototype.deleteObject=function(e,t){delete e[""+t]},e.prototype.isModuleLoaded=function(e){for(var t=0,n=this.loadedModules;t<n.length;t++){if(n[t].member===this.getMemberName(e))return!0}return!1},e}())},function(e,t,n){"use strict";function r(e){var t=[];return e.includeBasicFormulas&&t.push({member:"basic-formulas",args:[e]}),t}t.a=r},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(18),i=n(22),a=n(3),o=(n.n(a),n(9)),s=(n.n(o),n(0)),l=function(){function e(e){this.formulas=[{formulaName:"SUM",category:"Math & Trig",description:"Sums individual values, cell references or ranges."},{formulaName:"SUMIFS",category:"Math & Trig",description:"Sums the cells specified by a given set of conditionsor criteria."},{formulaName:"SUMPRODUCT",category:"Math & Trig",description:"Returns sum of the product of given ranges of arrays."},{formulaName:"ABS",category:"Math & Trig",description:"Returns the absolute value of a number."},{formulaName:"RAND",category:"Math & Trig",description:"Return a random number between 0 and 1."},{formulaName:"FLOOR",category:"Math & Trig",description:"Returns the round a number down to the nearest integer."},{formulaName:"CEILING",category:"Math & Trig",description:"Returns a number rounded up to a multiple of another number."},{formulaName:"SUMIF",category:"Math & Trig",description:"It will sum up cells that meet the given criteria."},{formulaName:"PRODUCT",category:"Math & Trig",description:"Multiplies all the numbers given as arguments and returns the product."},{formulaName:"AVERAGE",category:"Statistical",description:"The sum of the numbers divided by how many numbers are being averaged."},{formulaName:"AVERAGEIF",category:"Statistical",description:"Computes the average of the numbers in a range that meet the supplied criteria."},{formulaName:"COUNT",category:"Statistical",description:"Counts the numbers in the list of arguments, exclude text entries."},{formulaName:"COUNTA",category:"Statistical",description:"Counts the non-empty values in the list of arguments."},{formulaName:"COUNTIF",category:"Statistical",description:"Counts the number of cells in a range that meet a specified condition."},{formulaName:"COUNTIFS",category:"Statistical",description:"Counts the number of times each cells in all the ranges that meet the specific conditions."},{formulaName:"AVERAGEA",category:"Statistical",description:"Calculates the average of values in the list of arguments.Arguments can be numbers, names, arrays or references."},{formulaName:"AVERAGEIFS",category:"Statistical",description:"Conditionally returns the average of the contents of cells for the set of ranges."},{formulaName:"MIN",category:"Statistical",description:"Returns the smaller number in set of arguments."},{formulaName:"MAX",category:"Statistical",description:"Returns the largest number in set of arguments."},{formulaName:"DATE",category:"Date",description:"Returns the date, given the year, month and day of the month."},{formulaName:"DAY",category:"Date",description:"Returns the day of a given date."},{formulaName:"TODAY",category:"Date",description:"Returns the current date as date value."},{formulaName:"DAYS",category:"Date",description:"Returns the number of days between two dates."},{formulaName:"WEEKDAY",category:"Date",description:"Returns the day of the week corresponding to a date."},{formulaName:"IF",category:"Logical",description:"Returns one value if a logical expression is TRUE and another if it is FALSE"},{formulaName:"AND",category:"Logical",description:"Returns TRUE if all the arguments are considered TRUE, and FALSE otherwise."},{formulaName:"IFS",category:"Logical",description:"Checks multiple conditions and returns a value corresponding to the first TRUE result."},{formulaName:"IFERROR",category:"Logical",description:"Returns a value you specify if a formula evaluates to an error; otherwise, it returns the result of the formula."},{formulaName:"CHOOSE",category:"Lookup & Reference",description:"Returns a value from a list, given an index number."},{formulaName:"INDEX",category:"Lookup & Reference",description:"Returns a value from a table, given a row and column number."},{formulaName:"FIND",category:"Text",description:"Returns the position of a string of text within another string."},{formulaName:"CONCATENATE",category:"Text",description:" Used to join two or more strings together."},{formulaName:"CONCAT",category:"Text",description:"Concatenates a list or range of text strings."},{formulaName:"SUBTOTAL",category:"Lookup & Reference",description:"Returns a subtotal in a list or database."},{formulaName:"RADIANS",category:"Math & Trig",description:"Converts degrees to radians."},{formulaName:"OR",category:"Logical",description:"Returns TRUE if any arguments considered TRUE, and all the arguments are FALSE it will return FALSE."},{formulaName:"NOT",category:"Logical",description:"Returns the inverse of a given logical expression."},{formulaName:"MATCH",category:"Lookup & Reference",description:"Returns the relative position of an checked item in range that matches a specified value in a specified order"},{formulaName:"RANDBETWEEN",category:"Math & Trig",description:"Returns an integer random number in a specified range."},{formulaName:"SLOPE",category:"Statistical",description:"Returns the slope of the line from linear regression of the data points."},{formulaName:"INTERCEPT",category:"Statistical",description:"Calculates the point of the Y-intercept line via linear regression."},{formulaName:"RSQ",category:"Statistical",description:"Returns the square of the Pearson product moment correlation coefficient based on data points in known_ys and known_xs"},{formulaName:"UNIQUE",category:"Lookup & Reference",description:"Returns a unique values from a range or array."},{formulaName:"ROUNDUP",category:"Math & Trig",description:"Rounds a number away from zero."},{formulaName:"ROUNDDOWN",category:"Math & Trig",description:"Rounds a number down, toward zero."},{formulaName:"INT",category:"Math & Trig",description:"Returns a number to the nearest integer."},{formulaName:"LN",category:"Math & Trig",description:"Returns the natural logarithm of a number."},{formulaName:"ISNUMBER",category:"Information",description:"Returns TRUE, if the argument is number and FALSE otherwise."},{formulaName:"ROUND",category:"Math & Trig",description:"Rounds a number to a specified number of digits."},{formulaName:"LOG",category:"Math & Trig",description:"Returns the logarithm of a number to the base that you specify."},{formulaName:"POWER",category:"Math & Trig",description:"Returns the result of a number raised to power."},{formulaName:"SQRT",category:"Math & Trig",description:"Returns the square root of a positive number."},{formulaName:"TRUNC",category:"Math & Trig",description:"Returns the truncated value of a number to a specified number of decimal places."},{formulaName:"EXP",category:"Math & Trig",description:"Returns e raised to the power of the given number."},{formulaName:"GEOMEAN",category:"Statistical",description:"Returns the geometric mean of an array or range of positive data."},{formulaName:"TEXT",category:"Lookup & Reference",description:"Converts a value to text in specified number format."},{formulaName:"SORT",category:"Lookup & Reference",description:"Sorts a range of an array."},{formulaName:"LOOKUP",category:"Lookup & Reference",description:"Looks for a value in a one-row or one-column range, then returns a value from the same position in a second one-row or one-column range."},{formulaName:"VLOOKUP",category:"Lookup & Reference",description:"Looks for a specific value in the first column of a lookup range and returns a corresponding value from a different column within the same row."},{formulaName:"HLOOKUP",category:"Lookup & Reference",description:"Looks for a value in the top row of the array of values and then returns a value in the same column from a row in the array that you specify."},{formulaName:"T",category:"Text",description:"Checks whether a value is text or not and returns the text."},{formulaName:"EXACT",category:"Text",description:"Checks whether a two text strings are exactly same and returns TRUE or FALSE."},{formulaName:"LEN",category:"Text",description:"Returns a number of characters in a given string."},{formulaName:"MOD",category:"Math & Trig",description:"Returns a remainder after a number is divided by divisor."},{formulaName:"ODD",category:"Math & Trig",description:"Rounds a positive number up and negative number down to the nearest odd integer."},{formulaName:"PI",category:"Math & Trig",description:"Returns the value of pi."},{formulaName:"COUNTBLANK",category:"Statistical",description:"Returns the number of empty cells in a specified range of cells."},{formulaName:"EVEN",category:"Math & Trig",description:"Rounds a positive number up and negative number down to the nearest even integer."},{formulaName:"FACT",category:"Math & Trig",description:"Returns the factorial of a number."},{formulaName:"DECIMAL",category:"Math & Trig",description:"Converts a text representation of a number in a given base into a decimal number."},{formulaName:"DEGREES",category:"Math & Trig",description:"Converts radians to degrees."},{formulaName:"ADDRESS",category:"Lookup & Reference",description:"Returns a cell reference as text, given specified row and column numbers."},{formulaName:"TIME",category:"Date & Time",description:"Converts hours, minutes, seconds to the time formatted text."},{formulaName:"CHAR",category:"Text",description:"Returns the character from the specified number."},{formulaName:"CODE",category:"Text",description:"Returns the numeric code for the first character in a given string."},{formulaName:"DOLLAR",category:"Text",description:"Converts the number to currency formatted text."},{formulaName:"SMALL",category:"Statistical",description:"Returns the k-th smallest value in a given array."},{formulaName:"LARGE",category:"Statistical",description:"Returns the k-th largest value in a given array."},{formulaName:"MEDIAN",category:"Statistical",description:"Returns the median of the given set of numbers."},{formulaName:"EDATE",category:"Date & Time",description:"Returns a date with given number of months before or after the specified date."},{formulaName:"EOMONTH",category:"Date & Time",description:"Returns the last day of the month that is a specified number of months before or after an initially supplied start date."},{formulaName:"DATEVALUE",category:"Date & Time",description:"Converts a date string into date value."},{formulaName:"HOUR",category:"Date & Time",description:"Returns the number of hours in a specified time string."},{formulaName:"MINUTE",category:"Date & Time",description:"Returns the number of minutes in a specified time string."},{formulaName:"SECOND",category:"Date & Time",description:"Returns the number of seconds in a specified time string."},{formulaName:"NOW",category:"Date & Time",description:"Returns the current date and time."},{formulaName:"MONTH",category:"Date & Time",description:"Returns the number of months in a specified date string."},{formulaName:"PROPER",category:"Text",description:"Converts a text to proper case; first letter to uppercase and other letters to lowercase."}],this.isConcat=!1,this.parent=e,this.init()}return e.prototype.init=function(){for(var e,t=0;t<this.formulas.length;t++)e=n.i(a.getValue)("Compute"+this.formulas[t].formulaName,this).bind(this),this.addFormulaCollection(this.formulas[t].formulaName.toUpperCase(),e,this.formulas[t].category,this.formulas[t].description)},e.prototype.addFormulaCollection=function(e,t,n,r){this.parent.libraryFormulas={fName:e,handler:t,category:n,description:r}},e.prototype.ComputeSUM=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=!1;if(e.length&&"isSubtotal"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var o,s,l=0,d=0;if(!n.i(a.isNullOrUndefined)(e))for(var c=e,h=function(e){e.toString().indexOf(".")>-1&&(d=Math.max(d,e.split(".")[1].length))},p=0;p<c.length;p++){var u=c[p].toString();if(u.indexOf(":")>-1&&this.parent.isCellReference(u)){for(var f=this.parent.getCellCollection(u.split(this.parent.tic).join("")),g=0;g<f.length;g++)if(o=i?this.parent.getValueFromArg(f[g],null,null,!0):this.parent.getValueFromArg(f[g]),!i||!o.includes("SUBTOTAL(")){if(this.parent.getErrorStrings().indexOf(o)>-1)return o;n.i(a.isNullOrUndefined)(o[0])||isNaN(this.parent.parseFloat(o))||(h(o),l+=this.parent.parseFloat(o))}}else{if(c[p].indexOf(this.parent.tic)>-1&&(isNaN(this.parent.parseFloat(c[p].split(this.parent.tic).join("")))||""===c[p].split(this.parent.tic).join("").trim()))return this.parent.getErrorStrings()[r.i.value];if(c[p].split(this.parent.tic).join("")===this.parent.trueValue&&(c[p]="1"),c[p].split(this.parent.tic).join("")===this.parent.falseValue&&(c[p]="0"),s=i?this.parent.getValueFromArg(c[p].split(this.parent.tic).join(""),null,null,!0):this.parent.getValueFromArg(c[p].split(this.parent.tic).join("")),i&&s.includes("SUBTOTAL("))continue;if(this.parent.getErrorStrings().indexOf(s)>-1)return s;if(n.i(a.isNullOrUndefined)(s)||isNaN(this.parent.parseFloat(s)))continue;s.length>0&&(h(s),l+=this.parent.parseFloat(s+""))}}return l.toString().indexOf(".")>-1?l.toFixed(d):l},e.prototype.ComputeINT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o,s;if((!n.i(a.isNullOrUndefined)(e)&&1!==e.length||""===e[0])&&(i=this.parent.formulaErrorStrings[r.j.invalid_arguments]),""!==e[0]&&1===e.length){if(i=e[0],s=i.indexOf('"'),i=i.indexOf('"')>-1?i.replace('"',""):i,i=i.indexOf('"')>-1?i.replace('"',""):i,i=this.parent.getValueFromArg(i),this.parent.getErrorStrings().indexOf(i)>-1)return i;var l=i.toUpperCase();i="TRUE"===l?"1":"FALSE"===l?"0":i,o=this.parent.parseFloat(i),o=Math.floor(o)}return isNaN(o)&&(i=s>-1?this.parent.getErrorStrings()[r.i.value]:this.parent.getErrorStrings()[r.i.name]),o||i},e.prototype.ComputeTODAY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n;if(1!==e.length||""!==e[0])n=this.parent.formulaErrorStrings[r.j.invalid_arguments];else{var i=new Date(Date.now());"spreadsheet"===this.parent.parentObject.getModuleName()?(n=this.parent.parentObject.dateToInt(i),0===this.parent.parser.storedStringText.toUpperCase().indexOf("TODAY")&&""!==this.parent.cell&&this.parent.parentObject.setDateFormat(this.parent.getSheetId(this.parent.grid),this.parent.rowIndex(this.parent.cell)-1,this.parent.colIndex(this.parent.cell)-1)):n=i.getFullYear()+"/"+this.parent.calculateDate((i.getMonth()+1).toString())+"/"+this.parent.calculateDate(i.getDate().toString())}return n},e.prototype.ComputeWEEKDAY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(""===e[0]&&n.i(a.isNullOrUndefined)(e[1])||e.length>2)return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0]&&""===e[1]||""===e[1])return this.parent.getErrorStrings()[r.i.num].toString();if(1===e.length&&e.push("1"),e[0].indexOf(this.parent.tic)>-1&&""===e[0].split(this.parent.tic).join("").trim()||""===e[1].split(this.parent.tic).join("").trim()||e[1].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(e[1].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];var i,o,s;if(this.parent.isCellReference(e[0])){if(i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",i.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else i=e[0].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(e[0].split(this.parent.tic).join("")))?this.parent.getValueFromArg(e[0]):this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0";if(o=this.parent.isCellReference(e[1])?this.parent.getValueFromArg(e[1].split(this.parent.tic).join(""))||"0":this.parent.getValueFromArg(e[1].split(this.parent.tic).join("")),this.parent.getErrorStrings().indexOf(i)>-1)return i;if(this.parent.getErrorStrings().indexOf(o)>-1)return o;if(i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,o=o===this.parent.trueValue?"1":o===this.parent.falseValue?"0":o,s=this.parent.parseFloat(i),o=this.parent.parseFloat(o),isNaN(o)||isNaN(s))return this.parent.getErrorStrings()[r.i.value];if(s<0||s>2958465)return this.parent.getErrorStrings()[r.i.num].toString();switch(o=parseInt(o.toString(),10),s=s<1?0:Math.floor(s)%7,o){case 1:case 17:s=s<=0?s+7:s;break;case 2:case 11:s-=1,s=s<=0?s+7:s;break;case 3:s-=2,s=s<0?s+7:s;break;case 12:s+=5,s=s>7?s-7:s;break;case 13:s+=4,s=s>7?s-7:s;break;case 14:s+=3,s=s>7?s-7:s;break;case 15:s+=2,s=s>7?s-7:s;break;case 16:s+=1,s=s>7?s-7:s;break;default:s=this.parent.getErrorStrings()[r.i.num].toString()}return s},e.prototype.ComputePROPER=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i;if(e.length&&"nestedFormulaTrue"===e[e.length-1]&&(i=!0,e.pop()),e&&""===e[0]||1!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];var a=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");if(this.parent.getErrorStrings().indexOf(a)>-1)return a;for(var o=a.toLowerCase().split(" "),s=0;s<o.length;s++)if(o[s][0])for(var l=0;l<o[s].length;l++)if(o[s].charCodeAt(l)>=97&&o[s].charCodeAt(l)<=122){o[s]=o[s].replace(o[s][l],o[s][l].toUpperCase());break}if(n=o.join(" "),n.indexOf("-")>0){for(var d=n.split("-"),s=0;s<d.length;s++)if(d[s][0])for(var l=0;l<d[s].length;l++)if(d[s].charCodeAt(l)>=97&&d[s].charCodeAt(l)<=122){d[s]=d[s].replace(d[s][l],d[s][l].toUpperCase());break}n=d.join("-")}if(n.indexOf(",")>0){for(var c=n.split(","),s=0;s<c.length;s++)if(c[s][0])for(var l=0;l<c[s].length;l++)if(c[s].charCodeAt(l)>=97&&c[s].charCodeAt(l)<=122){c[s]=c[s].replace(c[s][l],c[s][l].toUpperCase());break}n=c.join(",")}return i&&(n=this.parent.tic+n+this.parent.tic),n},e.prototype.ComputeSUMPRODUCT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o;if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var s,l=0,d=0,c=null,h=e,p=[],u=0;u<h.length;u++)p.push(this.parent.getCellCollection(h[u]).length);for(var f=0;f<p.length;f++)if(p[f]&&p[f+1]&&p[f]!==p[f+1])return this.parent.getErrorStrings()[r.i.value];for(var g=0;g<h.length;++g){var m=h[g];if(m.startsWith(this.parent.tic)||!this.parent.isCellReference(m)){var v=this.parent.getValueFromArg(m);return s=v.indexOf('"'),this.parent.getErrorStrings().indexOf(v)>-1?v:s>-1?0:this.parent.getErrorStrings()[r.i.value]}var u=m.indexOf(":"),y=this.parent.rowIndex(m.substr(0,u)),C=this.parent.rowIndex(m.substr(u+1));if(!(-1!==y||-1===C)==(-1===y||-1!==C))return this.parent.getErrorStrings()[r.i.name];y>C&&(i=[C,y],y=i[0],C=i[1]);var b=this.parent.colIndex(m.substr(0,u)),x=this.parent.colIndex(m.substr(u+1));if(b>x&&(o=[x,b],b=o[0],x=o[1]),null===c)for(d=(C-y+1)*(x-b+1),c=[],u=0;u<d;++u)c[u]=1;u=0;for(var S=y;S<=C;++S)for(var w=b;w<=x;++w){var _=this.getSheetReference(m)+this.parent.convertAlpha(w)+S,I=this.parent.getValueFromArg(_);if(this.parent.getErrorStrings().indexOf(I)>-1)return I;if(isNaN(this.parent.parseFloat(I)))c[u]=0;else{if(isNaN(c[u]))return this.parent.getErrorStrings()[r.i.name];c[u]=c[u]*this.parent.parseFloat(I)}u++}}for(var u=0;u<d;++u)l+=c[u];return l},e.prototype.ComputeROUNDUP=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o,s,l,d,c=e.length;if(!n.i(a.isNullOrUndefined)(e)&&c>2&&(i=this.parent.formulaErrorStrings[r.j.invalid_arguments]),1===c&&""!==e[0])l=e[0].indexOf('"'),o=e[0].indexOf('"')>-1?e[0].replace('"',""):e[0],o=o.indexOf('"')>-1?o.replace('"',""):o,o="TRUE"===o.toUpperCase()?"1":"FALSE"===o?"0":o,o=this.parent.getValueFromArg(o),d=this.parent.parseFloat(o),d>0?d+=.4999999999:d<0&&(d-=.4999999999),d=this.parent.parseFloat(d.toFixed(0)),i=d.toString();else if(2===c){if(l=e[0].indexOf('"')>-1?e[0].indexOf('"'):e[1].indexOf('"')>-1?e[1].indexOf('"'):-1,this.parent.isCellReference(e[0]))o=this.parent.getValueFromArg(e[0])||"0";else{if(e[0].indexOf(this.parent.tic)>-1&&(e[0].split(this.parent.tic).join("")===this.parent.trueValue||e[0].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];o=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(o)>-1)return o;if(this.parent.isCellReference(e[1]))s=this.parent.getValueFromArg(e[1])||"0";else{if(e[1].indexOf(this.parent.tic)>-1&&(e[1].split(this.parent.tic).join("")===this.parent.trueValue||e[1].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];s=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(s)>-1)return s;o="TRUE"===o.toUpperCase()?"1":"FALSE"===o?"0":o,s="TRUE"===s.toUpperCase()?"1":"FALSE"===s?"0":s;var h=isNaN(Number(o))||""===o.trim(),p=isNaN(Number(s))||""===s.trim();if((e[0].indexOf('"')>-1||this.parent.isCellReference(e[0]))&&h||(e[1].indexOf('"')>-1||this.parent.isCellReference(e[1]))&&p)return this.parent.getErrorStrings()[r.i.value];var u=Math.ceil(this.parent.parseFloat(s));if(d=this.parent.parseFloat(o),u>0){d>0?d+=.4999999999/Math.pow(10,u):d<0&&(d-=.4999999999/Math.pow(10,u));var f=o.split("."),g=2===f.length?f[1].length>=u?u:f[1].length:0;d=this.parent.parseFloat(d.toFixed(g)),i=d.toString(),isNaN(d)&&(i=u.toString().indexOf('"')>-1?this.parent.getErrorStrings()[r.i.value]:this.parent.getErrorStrings()[r.i.name])}else d>0?d=d/Math.pow(10,-u)+.49999:d<0&&(d=d/Math.pow(10,-u)-.49999),d=d>0&&u<-9?1*Math.pow(10,-u):this.parent.parseFloat(d.toFixed(0))*Math.pow(10,-u),i=d.toString(),isNaN(d)&&(i=u.toString().indexOf('"')>-1?this.parent.getErrorStrings()[r.i.value]:i=this.parent.getErrorStrings()[r.i.name])}else i=l>-1?this.parent.getErrorStrings()[r.i.value]:this.parent.formulaErrorStrings[r.j.invalid_arguments];return i},e.prototype.ComputeROUNDDOWN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o,s,l,d,c=e.length;if(!n.i(a.isNullOrUndefined)(e)&&c>2&&(i=this.parent.formulaErrorStrings[r.j.invalid_arguments]),1===c&&""!==e[0])l=e[0].indexOf('"'),o=e[0].indexOf('"')>-1?e[0].replace('"',""):e[0],o=o.indexOf('"')>-1?o.replace('"',""):o,o="TRUE"===o.toUpperCase()?"1":"FALSE"===o?"0":o,o=this.parent.getValueFromArg(o),d=this.parent.parseFloat(o),d>0?d-=.4999999999:d<0&&(d+=.4999999999),d=this.parent.parseFloat(d.toFixed(0)),i=d.toString();else if(2===c){if(l=e[0].indexOf('"')>-1?e[0].indexOf('"'):e[1].indexOf('"')>-1?e[1].indexOf('"'):-1,this.parent.isCellReference(e[0]))o=this.parent.getValueFromArg(e[0])||"0";else{if(e[0].indexOf(this.parent.tic)>-1&&(e[0].split(this.parent.tic).join("")===this.parent.trueValue||e[0].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];o=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(o)>-1)return o;if(this.parent.isCellReference(e[1]))s=this.parent.getValueFromArg(e[1])||"0";else{if(e[1].indexOf(this.parent.tic)>-1&&(e[1].split(this.parent.tic).join("")===this.parent.trueValue||e[1].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];s=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(s)>-1)return s;o="TRUE"===o.toUpperCase()?"1":"FALSE"===o?"0":o,s="TRUE"===s.toUpperCase()?"1":"FALSE"===s?"0":s;var h=isNaN(Number(o))||""===o.trim(),p=isNaN(Number(s))||""===s.trim();if((e[0].indexOf('"')>-1||this.parent.isCellReference(e[0]))&&h||(e[1].indexOf('"')>-1||this.parent.isCellReference(e[1]))&&p)return this.parent.getErrorStrings()[r.i.value];var u=Math.ceil(this.parent.parseFloat(s));if(d=this.parent.parseFloat(o),u>0){d>0?d-=.4999999999/Math.pow(10,u):d<0&&(d+=.4999999999/Math.pow(10,u));var f=o.indexOf("."),g=0;-1!==f&&(g=o.length-f-1,g=g>=u?u:g),d=this.parent.parseFloat(d.toFixed(g)),i=d.toString(),isNaN(d)&&(i=u.toString().indexOf('"')>-1?this.parent.getErrorStrings()[r.i.value]:this.parent.getErrorStrings()[r.i.name])}else d>0?d=d/Math.pow(10,-u)-.49999:d<0&&(d=d/Math.pow(10,-u)+.49999),d=d>0&&u<-9?1*Math.pow(10,-u):this.parent.parseFloat(d.toFixed(0))*Math.pow(10,-u),i=d.toString(),isNaN(d)&&(i=u.toString().indexOf('"')>-1?this.parent.getErrorStrings()[r.i.value]:i=this.parent.getErrorStrings()[r.i.name])}else i=l>-1?this.parent.getErrorStrings()[r.i.value]:this.parent.formulaErrorStrings[r.j.invalid_arguments];return i},e.prototype.ComputeCOUNT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=!1;if(e.length&&"isSubtotal"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];for(var o,s,l,d,c=e,h=0,p=0;p<c.length;p++)if(o=c[p],this.parent.isCellReference(o))if(o.indexOf(":")>-1){s=this.parent.getCellCollection(o.split(this.parent.tic).join(""));for(var u=0;u<s.length;u++)l=i?this.parent.getValueFromArg(s[u],null,null,!0):this.parent.getValueFromArg(s[u]),i&&l.includes("SUBTOTAL(")||isNaN(this.parent.parseFloat(l))||o.length>0&&""!==l.trim()&&h++}else{if(l=i?this.parent.getValueFromArg(o,null,null,!0):this.parent.getValueFromArg(o),i&&l.includes("SUBTOTAL("))continue;isNaN(this.parent.parseFloat(l))||o.length>0&&""!==l.trim()&&h++}else d=this.parent.getValueFromArg(o).split(this.parent.tic).join(""),0===o.length&&""===d.trim()?h++:isNaN(this.parent.parseFloat(d))&&o!==this.parent.trueValue&&o!==this.parent.falseValue||o.length>0&&""!==o.trim()&&""!==d.trim()&&h++;return h},e.prototype.ComputeDATE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;if(e.length&&"nestedFormulaTrue"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(3!==e.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];for(var o=[],s=0;s<e.length;++s)o[s]=this.parent.getValueFromArg(e[s]);o[0]=o[0]===this.parent.trueValue?"1":o[0]===this.parent.falseValue?"0":o[0],o[1]=o[1]===this.parent.trueValue?"1":o[1]===this.parent.falseValue?"0":o[1],o[2]=o[2]===this.parent.trueValue?"1":o[2]===this.parent.falseValue?"0":o[2];for(var l=0;l<o.length;l++){var d=o[l];if(this.parent.getErrorStrings().indexOf(d)>-1)return d;if('""'===d||'"0"'===d&&'"0"'!==e[l]||'"TRUE"'===d||'"FALSE"'===d)return this.parent.getErrorStrings()[r.i.value].toString()}var c=Math.floor(this.parent.parseFloat(o[0].split(this.parent.tic).join(""))),h=Math.floor(this.parent.parseFloat(o[1].split(this.parent.tic).join(""))),p=Math.floor(this.parent.parseFloat(o[2].split(this.parent.tic).join(""))),u=0;if(isNaN(c)||isNaN(h)||isNaN(p))return this.parent.getErrorStrings()[r.i.value].toString();if(c<0&&h<=12||c>=1e4&&h>0)return this.parent.getErrorStrings()[r.i.num].toString();for(;h>12;)h-=12,c++;if(0===(u=this.parent.getSerialDateFromDate(c,h,p)))return this.parent.getErrorStrings()[r.i.num].toString();var f=this.parent.fromOADate(u);if("Invalid Date"!==f.toString()){if(f.getFullYear()<1900||1e4<=f.getFullYear())return this.parent.getErrorStrings()[r.i.num].toString();if(!i)return new a.Internationalization(this.parent.parentObject.locale||"en-US").formatDate(f,{type:"date",skeleton:"yMd"})}return u.toString()},e.prototype.ComputeFLOOR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i,o=e,l=o.length;if(2!==l)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(""===o[0]&&""===o[1]||""===o[0]&&!o[1].includes('"'))return 0;""!==o[1]||o[0].includes('"')||(o[1]="0");for(var d=0;d<o.length;d++){var c=o[d].split(this.parent.tic).join("").trim();if(""===c||o[d].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(c)))return this.parent.getErrorStrings()[r.i.value];if(n.i(s._161)(o[d])){if(i=this.parent.getValueFromArg(o[d])||"0",i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,i.toUpperCase().match(/[A-Z]/)||i.includes('"')||!this.parent.isNumber(i))return this.parent.getErrorStrings()[r.i.value]}else if(i=this.parent.getValueFromArg(o[d].split(this.parent.tic).join("")),i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,i.toUpperCase().match(/[A-Z]/)||i.includes('"')||!this.parent.isNumber(i))return this.parent.getErrorStrings()[r.i.value];o[d]=i}var h=this.parent.parseFloat(o[0]),p=this.parent.parseFloat(o[1]);return h>0&&p<0?this.parent.getErrorStrings()[r.i.num]:(h>0||h<0)&&0===p?this.parent.getErrorStrings()[r.i.divzero]:isNaN(h)?this.parent.getErrorStrings()[r.i.name]:0===h&&0===p?0:Math.floor(h/p)*p},e.prototype.ComputeCEILING=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i,o=e,l=o.length;if(2!==l)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(""===o[0]&&""===o[1]||""===o[0]&&!o[1].includes('"'))return 0;""!==o[1]||o[0].includes('"')||(o[1]="0");for(var d=0;d<o.length;d++){var c=o[d].split(this.parent.tic).join("").trim();if(""===c||o[d].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(c)))return this.parent.getErrorStrings()[r.i.value];if(n.i(s._161)(o[d])){if(i=this.parent.getValueFromArg(o[d])||"0",i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,i.toUpperCase().match(/[A-Z]/)||i.includes('"')||!this.parent.isNumber(i))return this.parent.getErrorStrings()[r.i.value]}else if(i=this.parent.getValueFromArg(o[d].split(this.parent.tic).join("")),i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,i.toUpperCase().match(/[A-Z]/)||i.includes('"')||!this.parent.isNumber(i))return this.parent.getErrorStrings()[r.i.value];o[d]=i}var h=this.parent.parseFloat(o[0]),p=this.parent.parseFloat(o[1]);return h>0&&p<0?this.parent.getErrorStrings()[r.i.num]:isNaN(h)?this.parent.getErrorStrings()[r.i.name]:(h>0||0===h)&&0===p?0:Math.ceil(h/p)*p},e.prototype.ComputeDAY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o,s=e;if(n.i(a.isNullOrUndefined)(s)||1===s.length&&""===s[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(s.length>1)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var l=s[0].startsWith(this.parent.tic)&&s[0].endsWith(this.parent.tic);if(!l&&this.parent.isCellReference(s[0])){if(o=this.parent.getValueFromArg(s[0].split(this.parent.tic).join("")),o.startsWith(this.parent.tic)&&o.endsWith(this.parent.tic))return this.parent.getErrorStrings()[r.i.value]}else if(l){if(""===(o=s[0].split(this.parent.tic).join(""))||o===this.parent.trueValue||o===this.parent.falseValue)return this.parent.getErrorStrings()[r.i.value]}else o=this.parent.getValueFromArg(s[0].split(this.parent.tic).join(""));return this.parent.getErrorStrings().indexOf(o)>-1?o:Number(o)<0?this.parent.getErrorStrings()[r.i.num]:0===Math.floor(Number(o))||o===this.parent.falseValue?0:o===this.parent.trueValue?1:(i=this.parent.isNaN(Number(o))?this.parent.parseDate(o):this.parent.intToDate(o),"[object Date]"===Object.prototype.toString.call(i)&&(i=new Date(i).getFullYear()<1900||new Date(i).getFullYear()>9999?"NaN":i.getDate()),"NaN"===i.toString()?this.parent.getErrorStrings()[r.i.value]:i)},e.prototype.ComputeIF=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;if(e.length&&"nestedFormulaTrue"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(this.parent.getErrorStrings().indexOf(e[0])>0)return e[0];var o,s=e;4===s.length&&"nestedFormulaTrue"===s[3]&&(o=!0,s.pop());var l,d;if(s.length>3||1===s.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(s.length<=3){var c=void 0,h=void 0,p="";if(l=this.parent.getValueFromArg(s[0]),this.parent.getErrorStrings().indexOf(l)>-1)return l;var u=l.toUpperCase(),f=this.parent.parseFloat(l);if(u===this.parent.trueValue||f<0||f>0){if(i&&s[1].includes(":")){c=this.parent.getCellCollection(s[1]);for(var g=0;g<c.length;g++)h=this.parent.getValueFromArg(c[g]),isNaN(this.parent.parseFloat(h))||(p+=h+",");return p.slice(0,p.length-1)}d=""===s[1]?"0":this.parent.getValueFromArg(s[1])}else{if(u!==this.parent.falseValue&&0!==f)return this.parent.formulaErrorStrings[r.j.requires_3_args];if(n.i(a.isNullOrUndefined)(s[2]))return this.parent.falseValue;if(i&&s[2].includes(":")){c=this.parent.getCellCollection(s[2]);for(var g=0;g<c.length;g++)h=this.parent.getValueFromArg(c[g]),isNaN(this.parent.parseFloat(h))||(p+=h+",");return p.slice(0,p.length-1)}d=""===s[2]?"0":this.parent.getValueFromArg(s[2])}}return!o&&d.indexOf(this.parent.tic)>-1?d.split(this.parent.tic).join(""):""===d?"0":d},e.prototype.ComputeIFERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i,o=e;if(2!==o.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(this.parent.isCellReference(o[0])){if(i=this.parent.getValueFromArg(o[0])||"0",-1===this.parent.getErrorStrings().indexOf(i)&&"NaN"!==i)return i}else if(i=this.parent.getValueFromArg(o[0],null,!0)||"0",-1===this.parent.getErrorStrings().indexOf(i)&&"NaN"!==i)return i=i.split(this.parent.tic).join("").trim();return this.parent.isCellReference(o[1])?i=this.parent.getValueFromArg(o[1])||"0":(i=this.parent.getValueFromArg(o[1])||"0",i=i.split(this.parent.tic).join("").trim()),i},e.prototype.ComputePRODUCT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=!1;if(e.length&&"isSubtotal"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var o,l,d,c=1,h=!0;if(!n.i(a.isNullOrUndefined)(e))for(var p=e,u=0;u<p.length;u++){var f=p[u];if(f.indexOf(":")>-1&&this.parent.isCellReference(f)){for(var g=this.parent.getCellCollection(f),m=0;m<g.length;m++)if(o=i?this.parent.getValueFromArg(g[m],null,null,!0):this.parent.getValueFromArg(g[m]),(!i||!o.includes("SUBTOTAL("))&&n.i(s._190)(o)){if(this.parent.getErrorStrings().indexOf(o)>-1)return o;d=this.parent.parseFloat(o),isNaN(d)||o.length>0&&(c*=d,h=!1)}}else if(-1===f.indexOf(":")&&this.parent.isCellReference(f)){if(l=i?this.parent.getValueFromArg(p[u],null,null,!0):this.parent.getValueFromArg(p[u]),i&&l.includes("SUBTOTAL("))continue;if(!n.i(s._190)(l))continue;if(this.parent.getErrorStrings().indexOf(l)>-1)return l}else{l=p[u];var v=l.indexOf(this.parent.tic)>-1&&""===l.split(this.parent.tic).join("").trim();if(v||p[u].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(l.split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];if(l=this.parent.getValueFromArg(p[u].split(this.parent.tic).join("")),l=l===this.parent.trueValue?"1":l===this.parent.falseValue?"0":l.split(this.parent.tic).join(""),this.parent.getErrorStrings().indexOf(l)>-1)return l}d=this.parent.parseFloat(l),isNaN(d)||l.length>0&&(c*=d,h=!1)}return h?"0":c.toString()},e.prototype.ComputeDAYS=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o;if(n.i(a.isNullOrUndefined)(t)&&1===t.length&&""===t[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(2!==t.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var s=t,l=function(t){return t=t.split(e.parent.tic).join(""),e.parent.isCellReference(t)&&(t=e.parent.getValueFromArg(t)),t===e.parent.trueValue?t="1":t===e.parent.falseValue?t="0":t||(t=new Date(Date.parse("1899-12-31")).toDateString()),t},d=l(s[0]),c=l(s[1]);if("#"===d[0])return d;if("#"===c[0])return c;var h=this.parent.isNaN(Number(d))?this.parent.parseDate(d):this.parent.intToDate(d),p=this.parent.isNaN(Number(c))?this.parent.parseDate(c):this.parent.intToDate(c);return"#"===h.toString()[0]?h.toString():"#"===p.toString()[0]?p.toString():"[object Date]"!==Object.prototype.toString.call(h)||"[object Date]"!==Object.prototype.toString.call(p)?this.parent.getErrorStrings()[r.i.value]:(o=Math.ceil(h.getTime()-p.getTime())/864e5,Math.round(o))},e.prototype.ComputeUNIQUE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o,s,l,d=e;if("isComputeExp"===d[d.length-1]&&(s=!0,d.pop()),n.i(a.isNullOrUndefined)(e)||""===e[0]||d.length>3)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var c=d[1]?d[1].toUpperCase():"FALSE",h=d[2]?d[2].toUpperCase():"FALSE",p=[],u=l=this.parent.actCell;if(d[0].indexOf(":")>-1){if(n.i(a.isNullOrUndefined)(d[0].match(/[0-9]/))){var f=d[0].split(":");d[0]=f[0]+"1:"+f[1]+(this.parent.spreadSheetUsedRange[0]+1)}else if(n.i(a.isNullOrUndefined)(d[0].toUpperCase().match(/[A-Z]/))){var f=d[0].split(":");d[0]="A"+f[0]+":"+n.i(i.e)(this.parent.spreadSheetUsedRange[1]+1)+f[1]}var g=d[0].split(":");if(this.parent.isCellReference(g[0])&&this.parent.isCellReference(g[1])){for(var m=this.parent.dependencyCollection,v=0;v<m.length&&!s;v++)m[v].split(":")[0]===d[0].split(":")[0]&&this.clearDependency(m[v]);-1===this.parent.dependencyCollection.indexOf(d[0])?s||this.parent.dependencyCollection.push(d[0]):this.clearDependency(d[0]);var y=d[0].indexOf(":"),C=void 0,b=this.parent.rowIndex(this.parent.substring(d[0],0,y)),x=this.parent.colIndex(this.parent.substring(d[0],0,y)),S=this.parent.rowIndex(this.parent.substring(d[0],y+1,y+d[0].length-y-1)),w=this.parent.colIndex(this.parent.substring(d[0],y+1,y+d[0].length-y-1));b>S&&(C=S,S=b,b=C),x>w&&(C=w,w=x,x=C);var _="";0===d[0].indexOf("!")&&(_=d[0].substring(0,d[0].replace("!","").indexOf("!")+2)),d[0]=_+n.i(i.e)(x)+b+":"+n.i(i.e)(w)+S;for(var I=this.parent.getCellCollection(d[0]),E=w-x,R=[],v=0;v<I.length;v++)R.push(I[v]);if("FALSE"===c)if(0===E)for(var v=0;v<R.length;v++){var k=this.parent.getValueFromArg(R[v]);k=""===k?"0":k,p.push(k)}else for(var A="",F=E,v=0;v<R.length;v++){if(v===R.length-1){var k=this.parent.getValueFromArg(R[v]);k=""===k?"0":k,A=A+k+"+",p.push(A.substring(0,A.length-1))}if(v<=F){var k=this.parent.getValueFromArg(R[v]);k=""===k?"0":k,A=A+k+"+"}else{p.push(A.substring(0,A.length-1)),F=E+v;var k=this.parent.getValueFromArg(R[v]);k=""===k?"0":k,A=k+"+"}}else for(var A="",F=E+1,N=S-b,v=0;v<F;v++){for(var T=0;T<=N;T++){var k=this.parent.getValueFromArg(R[T*F+v]);k=""===k?"0":k,A=A+k+"+"}p.push(A.substring(0,A.length-1)),A=""}for(var O=[],D=[],v=0;v<p.length;v++)-1===O.indexOf(p[v])?O.push(p[v]):D.push(p[v]);if("TRUE"===h){for(var L=[],v=0;v<O.length;v++)-1===D.indexOf(O[v])&&L.push(O[v]);O=L}if(s){var P;return 0!==E?(P=[],O.forEach(function(e){P=P.concat(e.split("+"))})):P="FALSE"===c?O:O[0].split("+"),P}u=u.indexOf("!")>-1?u.split("!")[1]:u;var M=this.parent.rowIndex(u),B=this.parent.colIndex(u);if(0===this.parent.dependencyLevel){var H=!1;if("FALSE"===c)for(var v=M,F=O.length+M;v<F;v++)for(var U=O[0].split("+"),V=B,j=U.length+B;V<j;V++)v===F-1&&V===j-1&&-1===this.parent.uniqueRange.indexOf(l+":"+n.i(i.e)(V)+v)&&this.parent.uniqueRange.push(l+":"+n.i(i.e)(V)+v),this.checkSpill(V,v)&&(H=!0);else for(var v=B,F=O.length+B;v<F;v++)for(var U=O[0].split("+"),z=M,j=U.length+M;z<j;z++)v===F-1&&z===j-1&&-1===this.parent.uniqueRange.indexOf(this.parent.actCell+":"+n.i(i.e)(v)+z)&&this.parent.uniqueRange.push(this.parent.actCell+":"+n.i(i.e)(v)+z),this.checkSpill(v,z)&&(H=!0);if(H)return this.parent.formulaErrorStrings[r.j.spill]}else if(this.parent.dependencyLevel>0&&this.parent.getValueFromArg(n.i(i.e)(B)+M,!0).indexOf("#SPILL!")>-1)return this.parent.formulaErrorStrings[r.j.spill];if("FALSE"===c){var q=this.parent.getSheetFamilyItem(this.parent.grid),W="",G=void 0;null!==q.sheetNameToParentObject&&q.sheetNameToParentObject.size>0&&(W=q.parentObjectToToken.get(this.parent.grid),G=W+u);for(var v=0;v<O.length;v++){var U=O[v].split("+");v>0&&(M++,B=this.parent.colIndex(u));for(var Y=0;Y<U.length;Y++)this.setValueRefresh(U[Y],M,B,u),(v>0||Y>0)&&this.parent.refresh(W+n.i(i.e)(B)+M.toString(),G),U[Y+1]&&B++}o=O[0].split("+")[0]}else{for(var v=0;v<O.length;v++)for(var U=O[v].split("+"),X=0;X<U.length;X++)this.setValueRefresh(U[X],M,B,u),U[X+1]?M++:(B++,M=this.parent.rowIndex(u));o=O[0].split("+")[0]}}}else{if(!this.parent.isCellReference(d[0]))return d[0].split('"').join("");-1===this.parent.dependencyCollection.indexOf(d[0])?s||this.parent.dependencyCollection.push(d[0]):this.clearDependency(d[0]),o=this.parent.getValueFromArg(d[0])}return o},e.prototype.setValueRefresh=function(e,t,n,r){this.parent.parentObject.setValueRowCol(this.parent.getSheetId(this.parent.grid),e,t,n)},e.prototype.checkSpill=function(e,t){var a,o=!1,s=this.parent.getValueFromArg(n.i(i.e)(e)+t,!0),l="!"+this.parent.getSheetID(this.parent.grid)+"!"+n.i(i.e)(e)+t;return this.parent.getFormulaInfoTable().get(l)&&(a=this.parent.getFormulaInfoTable().get(l).formulaText),s&&(s.toUpperCase().indexOf("UNIQUE")<0||a&&!a.toUpperCase().includes("UNIQUE"))&&s!==this.parent.formulaErrorStrings[r.j.wrong_number_arguments]&&(o=!0),o},e.prototype.clearDependency=function(e){var t=this.parent.actCell,r="";if(t.indexOf("!")>-1){var a=t.split("!");t=a[1],r=a[0]+"!"}for(var o=this.parent.rowIndex(t),s=this.parent.colIndex(t),l=e.indexOf(":"),d=this.parent.rowIndex(this.parent.substring(e,0,l)),c=this.parent.colIndex(this.parent.substring(e,0,l)),h=this.parent.rowIndex(this.parent.substring(e,l+1,l+e.length-l-1)),p=this.parent.colIndex(this.parent.substring(e,l+1,l+e.length-l-1)),u=h-d+o,f=p-c+s,g=this.parent.getFormulaInfoTable().get("!"+this.parent.getSheetID(this.parent.grid)+"!"+t)?this.parent.getFormulaInfoTable().get("!"+this.parent.getSheetID(this.parent.grid)+"!"+t).getFormulaText():"",m=o;m<=u;m++)for(var v=s;v<=f;v++)if(this.parent.dependencyLevel>0||g.indexOf("UNIQUE")>-1){if(this.parent.getValueFromArg("!"+this.parent.getSheetID(this.parent.grid)+"!"+n.i(i.e)(s)+o,!0).indexOf("#SPILL!")>-1)return;this.parent.parentObject.setValueRowCol(this.parent.getSheetID(this.parent.grid)+1,"",m,v),this.parent.refresh("!"+this.parent.getSheetID(this.parent.grid)+"!"+n.i(i.e)(v)+m,t),this.parent.actCell=r+t}},e.prototype.ComputeT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o="";if(e.length&&"nestedFormulaTrue"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var s=e[0];s=s.indexOf(":")>-1?s.split(":")[0]:s,s=this.parent.getValueFromArg(s);var l=/^[0-9.]+$/;return null===s.match(l)&&"TRUE"!==s.toUpperCase()&&"FALSE"!==s.toUpperCase()&&(o=s,i&&(o=this.parent.tic+o+this.parent.tic)),o},e.prototype.ComputeHOUR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1!==e.length||n.i(a.isNullOrUndefined)(e)||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0].split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];var i;if(this.parent.isCellReference(e[0])){if(i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",i.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(e[0].indexOf(this.parent.tic)>-1&&(e[0].split(this.parent.tic).join("")===this.parent.trueValue||e[0].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(i)>-1)return i;i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i;var o;if(this.parent.isNumber(i)){if(this.parent.parseFloat(i)<0||this.parent.parseFloat(i)>2958465)return this.parent.getErrorStrings()[r.i.num];o=this.parent.intToTime(i)}else{var l={value:i.toString()};if(this.parent.parentObject.notify(s._51,l),!l.isDate&&!l.isTime)return this.parent.getErrorStrings()[r.i.value];o=l.dateObj}if("Invalid Date"===o.toString()&&(o=new Date(Date.parse(i))),"Invalid Date"===o.toString()){var d=new Date(Date.now()).toLocaleDateString()+" "+i;o=new Date(Date.parse(d))}return"Invalid Date"===o.toString()&&(o=this.parent.fromOADate(this.parent.parseFloat(i))),"Invalid Date"===o.toString()?this.parent.getErrorStrings()[r.i.value]:o.getFullYear()<1900||o.getFullYear()>9999?this.parent.getErrorStrings()[r.i.value]:o.getHours()},e.prototype.ComputeMINUTE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1!==e.length||n.i(a.isNullOrUndefined)(e)||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0].split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];var i;if(this.parent.isCellReference(e[0])){if(i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",i.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(e[0].indexOf(this.parent.tic)>-1&&(e[0].split(this.parent.tic).join("")===this.parent.trueValue||e[0].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(i)>-1)return i;i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i;var o;if(this.parent.isNumber(i)){if(this.parent.parseFloat(i)<0||this.parent.parseFloat(i)>2958465)return this.parent.getErrorStrings()[r.i.num];o=this.parent.intToTime(i)}else{var l={value:i.toString()};if(this.parent.parentObject.notify(s._51,l),!l.isDate&&!l.isTime)return this.parent.getErrorStrings()[r.i.value];o=l.dateObj}if("Invalid Date"===o.toString()&&(o=new Date(Date.parse(i))),"Invalid Date"===o.toString()){var d=new Date(Date.now()).toLocaleDateString()+" "+i;o=new Date(Date.parse(d))}return"Invalid Date"===o.toString()&&(o=this.parent.fromOADate(this.parent.parseFloat(i))),"Invalid Date"===o.toString()?this.parent.getErrorStrings()[r.i.value]:o.getFullYear()<1900||o.getFullYear()>9999?this.parent.getErrorStrings()[r.i.value]:o.getMinutes()},e.prototype.ComputeSECOND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1!==e.length||n.i(a.isNullOrUndefined)(e)||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0].split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];var i;if(this.parent.isCellReference(e[0])){if(i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",i.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(e[0].indexOf(this.parent.tic)>-1&&(e[0].split(this.parent.tic).join("")===this.parent.trueValue||e[0].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(i)>-1)return i;i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i;var o;if(this.parent.isNumber(i)){if(this.parent.parseFloat(i)<0||this.parent.parseFloat(i)>2958465)return this.parent.getErrorStrings()[r.i.num];o=this.parent.intToTime(i)}else{var l={value:i.toString()};if(this.parent.parentObject.notify(s._51,l),!l.isDate&&!l.isTime)return this.parent.getErrorStrings()[r.i.value];o=l.dateObj}if("Invalid Date"===o.toString()&&(o=new Date(Date.parse(i))),"Invalid Date"===o.toString()){var d=new Date(Date.now()).toLocaleDateString()+" "+i;o=new Date(Date.parse(d))}return"Invalid Date"===o.toString()&&(o=this.parent.fromOADate(this.parent.parseFloat(i))),"Invalid Date"===o.toString()?this.parent.getErrorStrings()[r.i.value]:o.getFullYear()<1900||o.getFullYear()>9999?this.parent.getErrorStrings()[r.i.value]:o.getSeconds()},e.prototype.ComputeMONTH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(""===e[0])return this.parent.getErrorStrings()[r.i.value];if(1!==e.length||n.i(a.isNullOrUndefined)(e))return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(!this.parent.isCellReference(e[0])&&-1===e[0].indexOf(this.parent.tic))return this.parent.getErrorStrings()[r.i.value];var i=this.spreadsheetFormat(e[0]),o=this.spreadsheetDisplayText(e[0]),s=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join(""),l=this.parseDouble(s),d=0,c=new Date(Date.parse(s));!isNaN(l)&&c.getFullYear()>9999&&(c=this.parent.fromOADate(l));var h=parseInt(s,10);return h<0?this.parent.getErrorStrings()[r.i.num]:(0===h&&s!==i&&i.indexOf("h:mm")>-1&&(c=this.parent.fromOADate(parseInt(o,10))),"Invalid Date"===c.toString()&&(this.parent.isNumber(s)?c=this.parent.fromOADate(parseInt(s,10)):this.parent.checkDateFormat(s)),"Invalid Date"===c.toString()?this.parent.getErrorStrings()[r.i.value]:("Invalid Date"!==c.toString()&&(d=c.getMonth()+1),d.toString()))},e.prototype.ComputeNOW=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(1!==e.length||""!==e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var n=new Date(Date.now()),i=new a.Internationalization,o=i.getDateFormat({format:"M/d/yyyy h:mm:ss a"});return this.parent.parentObject.dateToInt(o(n),!0).toString()},e.prototype.ComputeEXACT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o=!1;if(e.length&&"nestedFormulaTrue"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||2!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];var s=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");if(this.parent.getErrorStrings().indexOf(s)>-1)return s;var l=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("");return this.parent.getErrorStrings().indexOf(l)>-1?l:(s===l&&(o=!0),i&&(o=this.parent.tic+o+this.parent.tic),o)},e.prototype.ComputeLEN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0])return this.parent.getErrorStrings()[r.i.value];var i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");return this.parent.getErrorStrings().indexOf(i)>-1?i:i.length},e.prototype.ComputeMOD=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;if(n.i(a.isNullOrUndefined)(e)||2!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[1]&&!e[0].includes('"'))return this.parent.formulaErrorStrings[r.j.div];if(""===e[0]&&!e[1].includes('"'))return 0;for(var o=0;o<e.length;o++){var l=e[o].split(this.parent.tic).join("").trim();if(""===l||e[o].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(l)))return this.parent.getErrorStrings()[r.i.value];if(n.i(s._161)(e[o])){if(i=this.parent.getValueFromArg(e[o])||"0",i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,i.toUpperCase().match(/[A-Z]/)||i.includes('"')||!this.parent.isNumber(i))return this.parent.getErrorStrings()[r.i.value]}else if(i=this.parent.getValueFromArg(e[o].split(this.parent.tic).join("")),i=i===this.parent.trueValue?"1":i===this.parent.falseValue?"0":i,this.parent.getErrorStrings().indexOf(i)>-1)return i;e[o]=i}var d=e[0],c=e[1];if("0"===c||""===c)return this.parent.formulaErrorStrings[r.j.div];if("0"===d||""===d)return 0;d=parseFloat(d),c=parseFloat(c);var h=(d%c+c)%c;return isNaN(h)?this.parent.getErrorStrings()[r.i.name]:h},e.prototype.ComputeODD=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i=e[0].split(this.parent.tic).join("").trim();if(""===i||e[0].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(i)))return this.parent.getErrorStrings()[r.i.value];var o;if(n.i(s._161)(e[0])){if((o=this.parent.getValueFromArg(e[0]))===this.parent.trueValue)o="1";else if(""===o||o===this.parent.falseValue)o="0";else if(o.toUpperCase().match(/[A-Z]/)||o.includes('"')||!this.parent.isNumber(o))return this.parent.getErrorStrings()[r.i.value]}else{if("#NAME?"===(o=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.name];if(o===this.parent.trueValue)o="1";else if(""===o||o===this.parent.falseValue)o="0";else if(o.toUpperCase().match(/[A-Z]/)||!this.parent.isNumber(o))return this.parent.getErrorStrings()[r.i.value]}var l=Math.ceil(parseInt(o,10)),d=0===l;return l=l%2==0?l>0?l+1:l-1:l,Math.ceil(parseInt(o,10))%2!=0&&(parseInt(o,10)>0&&parseFloat(o)>parseInt(o,10)?l+=2:parseInt(o,10)<0&&parseFloat(o)<parseInt(o,10)&&(l-=2)),isNaN(l)?this.parent.getErrorStrings()[r.i.name]:d?1:l},e.prototype.ComputeEVEN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i=e[0].split(this.parent.tic).join("").trim();if(""===i||e[0].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(i)))return this.parent.getErrorStrings()[r.i.value];var o;if(n.i(s._161)(e[0])){if((o=this.parent.getValueFromArg(e[0]))===this.parent.trueValue)o="1";else if(""===o||o===this.parent.falseValue)o="0";else if(o.toUpperCase().match(/[A-Z]/)||o.includes('"')||!this.parent.isNumber(o))return this.parent.getErrorStrings()[r.i.value]}else{if("#NAME?"===(o=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.name];if(o===this.parent.trueValue)o="1";else if(""===o||o===this.parent.falseValue)o="0";else if(o.toUpperCase().match(/[A-Z]/)||!this.parent.isNumber(o))return this.parent.getErrorStrings()[r.i.value]}var l=Math.ceil(parseInt(o,10));return l=l%2==0?l:l>0?l+1:l-1,Math.ceil(parseInt(o,10))%2==0&&(parseInt(o,10)>0&&parseFloat(o)>parseInt(o,10)?l+=2:parseInt(o,10)<0&&parseFloat(o)<parseInt(o,10)&&(l-=2)),isNaN(l)?this.parent.getErrorStrings()[r.i.name]:l},e.prototype.ComputePI=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&""!==e[0]?this.parent.formulaErrorStrings[r.j.invalid_arguments]:Math.PI},e.prototype.ComputeMEDIAN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o=[];if(n.i(a.isNullOrUndefined)(e)||""===e[0]&&1===e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var s=0;s<e.length;s++)if(this.parent.isCellReference(e[s]))if(e[s].indexOf(":")>-1)for(var l=this.parent.getCellCollection(e[s]),d=0;d<l.length;d++){var c=this.parent.getValueFromArg(l[d]);if(this.parent.getErrorStrings().indexOf(c)>-1)return c;""!==c.trim()&&o.push(this.parent.parseFloat(c))}else{var h=this.parent.getValueFromArg(e[s]);if(this.parent.getErrorStrings().indexOf(h)>-1)return h;""!==h.trim()&&o.push(this.parent.parseFloat(h))}else if(""===e[s]||e[s]===this.parent.falseValue&&!this.parent.isCellReference(e[s]))o.push(0);else if(e[s]!==this.parent.trueValue||this.parent.isCellReference(e[s])){if(e[s].indexOf(this.parent.tic)>-1&&isNaN(parseFloat(e[s].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];var p=this.parent.getValueFromArg(e[s]).split(this.parent.tic).join("");if(this.parent.getErrorStrings().indexOf(p)>-1)return p;o.push(this.parent.parseFloat(p))}else o.push(1);o=o.sort(function(e,t){return e-t});for(var u=o.length,f=0;f<u&&(!isNaN(o[f])||(o.splice(f,1),u=o.length,f--,0!==o.length));f++);if(o.length%2==0||isNaN(o[parseInt((o.length/2).toString(),10)])){if(isNaN(o[o.length/2])||isNaN(o[o.length/2-1]))return this.parent.getErrorStrings()[r.i.num];i=(o[o.length/2]+o[o.length/2-1])/2}else i=o[parseInt((o.length/2).toString(),10)];return i},e.prototype.ComputeEDATE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2!==e.length||n.i(a.isNullOrUndefined)(e))return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0]||""===e[1])return this.parent.getErrorStrings()[r.i.na];if(""===e[0].split(this.parent.tic).join("")||""===e[1].split(this.parent.tic).join("")||e[1].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(e[1].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];var i,o;if(this.parent.isCellReference(e[0])){if(e[0].indexOf(":")>-1)return this.parent.getErrorStrings()[r.i.value];if(i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",i.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""));if(this.parent.isCellReference(e[1])){if(e[1].indexOf(":")>-1)return this.parent.getErrorStrings()[r.i.value];o=this.parent.getValueFromArg(e[1].split(this.parent.tic).join(""))||"0"}else o=this.parent.getValueFromArg(e[1].split(this.parent.tic).join(""));if(this.parent.getErrorStrings().indexOf(o)>-1)return o;o=parseInt(o,10);var s;if(this.parent.isNumber(i)){if((i=parseInt(i,10))<0||i>2958465)return this.parent.getErrorStrings()[r.i.num];s=this.parent.fromOADate(i)}else s=this.parent.checkDateFormat(i);if(isNaN(o)||n.i(a.isNullOrUndefined)(this.parent.isDate(s))||s.getFullYear()>9999)return this.parent.getErrorStrings()[r.i.value];var l=s.getDate();s.setMonth(s.getMonth()+o),l!==s.getDate()&&s.setDate(0);var d=this.parent.parentObject.dateToInt(s);return"0"===i.toString()&&(d-=1),d<0||d>2958465?this.parent.getErrorStrings()[r.i.num]:d.toString()},e.prototype.ComputeEOMONTH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(2!==e.length||n.i(a.isNullOrUndefined)(e))return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0]||""===e[1])return this.parent.getErrorStrings()[r.i.na];if(""===e[0].split(this.parent.tic).join("")||""===e[1].split(this.parent.tic).join("")||e[1].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(e[1].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];var i,o;if(this.parent.isCellReference(e[0])){if(e[0].indexOf(":")>-1)return this.parent.getErrorStrings()[r.i.value];if(i=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",i.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");if(this.parent.getErrorStrings().indexOf(i)>-1)return i;if(this.parent.isCellReference(e[1])){if(e[1].indexOf(":")>-1)return this.parent.getErrorStrings()[r.i.value];o=this.parent.getValueFromArg(e[1].split(this.parent.tic).join(""))||"0"}else o=this.parent.getValueFromArg(e[1].split(this.parent.tic).join(""));if(this.parent.getErrorStrings().indexOf(o)>-1)return o;o=parseInt(o,10);var s;if(this.parent.isNumber(i)){if((i=parseInt(i,10))<0||i>2958465)return this.parent.getErrorStrings()[r.i.num];s=this.parent.fromOADate(i)}else s=this.parent.checkDateFormat(i);if(isNaN(o)||n.i(a.isNullOrUndefined)(this.parent.isDate(s))||s.getFullYear()>9999)return this.parent.getErrorStrings()[r.i.value];s=new Date(s.getFullYear(),s.getMonth()+(o+1),0);var l=this.parent.parentObject.dateToInt(s);return l<0||l>2958465||s.getFullYear()<1900?this.parent.getErrorStrings()[r.i.num]:l.toString()},e.prototype.ComputeDATEVALUE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;if(1!==e.length||n.i(a.isNullOrUndefined)(e))return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0]||this.parent.isCellReference(e[0]))return this.parent.getErrorStrings()[r.i.value];if(-1===e[0].indexOf(this.parent.tic))return this.parent.getErrorStrings()[r.i.value];i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");var o=this.parent.isNumber(i)?this.parent.fromOADate(parseInt(i,10)):this.parent.checkDateFormat(i);return!o||n.i(a.isNullOrUndefined)(this.parent.isDate(o))||"Invalid Date"===o.toString()||o.getFullYear()<1900||o.getFullYear()>9999?this.parent.getErrorStrings()[r.i.value]:parseFloat(i).toFixed(0).toString()},e.prototype.ComputeCOUNTBLANK=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=0;if(1!==e.length||n.i(a.isNullOrUndefined)(e)||!this.parent.isCellReference(e[0]))return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0])return this.parent.getErrorStrings()[r.i.value];for(var o=this.parent.getCellCollection(e[0]),s=0;s<o.length;s++)""===this.parent.getValueFromArg(o[s])&&i++;return i},e.prototype.ComputeFACT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=1;if(n.i(a.isNullOrUndefined)(e)||1!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(""===e[0])return this.parent.getErrorStrings()[r.i.value];var o=parseInt(this.parent.getValueFromArg(e[0]).split(this.parent.tic).join(""),10);if(this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("").toUpperCase().match(/[A-Z]/))return this.parent.getErrorStrings()[r.i.value];if(o<0)return this.parent.getErrorStrings()[r.i.num];for(var s=1;s<=o;s++)i*=s;return i},e.prototype.ComputeDECIMAL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o=/[@#$%^&*()?:{}|<>+-]/g;if(n.i(a.isNullOrUndefined)(e)||2!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(e[0].match(o))return this.parent.getErrorStrings()[r.i.num];if(e[1].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(e[1].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];var s=void 0,l=void 0;s=this.parent.isCellReference(e[0].toString())?this.parent.getValueFromArg(e[0]):this.parent.getValueFromArg(e[0]).split(this.parent.tic).join(""),l=this.parent.isCellReference(e[1].toString())?this.parent.getValueFromArg(e[1]):this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("");var d=parseInt(s,10),c=parseInt(l,10);return this.parent.getErrorStrings().indexOf(s)>-1?s:this.parent.getErrorStrings().indexOf(l)>-1?l:""===s&&""!==l?0:""===s||d<0||!isNaN(d)&&!Number.isInteger(parseFloat(s))?this.parent.getErrorStrings()[r.i.num]:""===l||c<2||c>36||isNaN(c)?this.parent.getErrorStrings()[r.i.num]:isNaN(this.parent.parseFloat(s))&&this.parent.parseFloat(l)<=10?this.parent.getErrorStrings()[r.i.num]:(i=parseInt(s,parseInt(l,10)),isNaN(i)?this.parent.getErrorStrings()[r.i.num]:i)},e.prototype.ComputeDEGREES=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;if(n.i(a.isNullOrUndefined)(e)||1!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var o=Math.PI,s=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");return s.toUpperCase().match(/[A-Z]/)?this.parent.getErrorStrings()[r.i.value]:isNaN(parseInt(s,10))?this.parent.getErrorStrings()[r.i.value]:(i=parseFloat(s)*(180/o),parseInt(i.toString(),10))},e.prototype.ComputeADDRESS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o;if(n.i(a.isNullOrUndefined)(e)||e.length>5||""===e[0]||""===e[1]||e.length<2)return this.parent.formulaErrorStrings[r.j.invalid_arguments];e[2]=e[2]?e[2]:"1",e[3]=e[3]?e[3]:"TRUE";var s=this.parent.getValueFromArg(e[0]),l=this.parent.getValueFromArg(e[1]),d=this.parent.getValueFromArg(e[2]),c=this.parent.getValueFromArg(e[3]);if(d=d.split(this.parent.tic).join(""),c=c.split(this.parent.tic).join(""),s=s.split(this.parent.tic).join(""),l=l.split(this.parent.tic).join(""),parseInt(s,10)<=0||parseInt(l,10)<=0)return this.parent.getErrorStrings()[r.i.value];if(s.toUpperCase().match(/[A-Z]/)||l.toUpperCase().match(/[A-Z]/)||d.toUpperCase().match(/[A-Z]/))return this.parent.getErrorStrings()[r.i.value];if("TRUE"===c||"1"===c?"1"===d?o="$"+n.i(i.e)(parseInt(l,10))+"$"+parseInt(s,10):"2"===d?o=n.i(i.e)(parseInt(l,10))+"$"+parseInt(s,10):"3"===d?o="$"+n.i(i.e)(parseInt(l,10))+parseInt(s,10):"4"===d&&(o=n.i(i.e)(parseInt(l,10))+parseInt(s,10)):"FALSE"!==c&&"0"!==c||("1"===d?o="R"+parseInt(s,10)+"C"+parseInt(l,10):"2"===d?o="R"+parseInt(s,10)+"C["+parseInt(l,10)+"]":"3"===d?o="R["+parseInt(s,10)+"]C"+parseInt(l,10):"4"===d&&(o="R["+parseInt(s,10)+"]C["+parseInt(l,10)+"]")),-1===["TRUE","FALSE","1","0"].indexOf(c))return this.parent.getErrorStrings()[r.i.name];if(!n.i(a.isNullOrUndefined)(e[4])&&""!==e[4]){var h=this.parent.getValueFromArg(e[4]).split(this.parent.tic).join("");if("#NAME?"===h)return this.parent.getErrorStrings()[r.i.name];o=h+"!"+o}return o},e.prototype.ComputeTIME=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;if(n.i(a.isNullOrUndefined)(e)||3!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(e[0].indexOf(this.parent.tic)>-1&&""===e[0].split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];if(e[1].indexOf(this.parent.tic)>-1&&""===e[1].split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];if(e[2].indexOf(this.parent.tic)>-1&&""===e[2].split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];var o,l,d;if(this.parent.isCellReference(e[0])){if(o=this.parent.getValueFromArg(e[0].split(this.parent.tic).join(""))||"0",o.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(e[0].indexOf(this.parent.tic)>-1&&(e[0].split(this.parent.tic).join("")===this.parent.trueValue||e[0].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];o=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("")||"0"}if(this.parent.getErrorStrings().indexOf(o)>-1)return o;if(isNaN(this.parent.parseFloat(o))&&o!==this.parent.trueValue&&o!==this.parent.falseValue)return this.parent.getErrorStrings()[r.i.value];if(this.parent.isCellReference(e[1])){if(l=this.parent.getValueFromArg(e[1].split(this.parent.tic).join(""))||"0",l.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(e[1].indexOf(this.parent.tic)>-1&&(e[1].split(this.parent.tic).join("")===this.parent.trueValue||e[1].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];l=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("")||"0"}if(this.parent.getErrorStrings().indexOf(l)>-1)return l;if(isNaN(this.parent.parseFloat(l))&&l!==this.parent.trueValue&&l!==this.parent.falseValue)return this.parent.getErrorStrings()[r.i.value];if(this.parent.isCellReference(e[2])){if(d=this.parent.getValueFromArg(e[2].split(this.parent.tic).join(""))||"0",d.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(e[2].indexOf(this.parent.tic)>-1&&(e[2].split(this.parent.tic).join("")===this.parent.trueValue||e[2].split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];d=this.parent.getValueFromArg(e[2]).split(this.parent.tic).join("")||"0"}if(this.parent.getErrorStrings().indexOf(d)>-1)return d;if(isNaN(this.parent.parseFloat(d))&&d!==this.parent.trueValue&&d!==this.parent.falseValue)return this.parent.getErrorStrings()[r.i.value];if(o=o===this.parent.trueValue?"1":o===this.parent.falseValue?"0":o,l=l===this.parent.trueValue?"1":l===this.parent.falseValue?"0":l,d=d===this.parent.trueValue?"1":d===this.parent.falseValue?"0":d,o=parseInt(this.parent.parseFloat(o).toString(),10),l=parseInt(this.parent.parseFloat(l).toString(),10),d=parseInt(this.parent.parseFloat(d).toString(),10),isNaN(o)||isNaN(l)||isNaN(d))return this.parent.getErrorStrings()[r.i.value];if(o>32767||l>32767||d>32767)return this.parent.getErrorStrings()[r.i.num];var c=new Date(1900,0,1,o,l,d);if(c.getFullYear()<1900)return this.parent.getErrorStrings()[r.i.num];var h=c.getHours(),p=c.getMinutes(),u=c.getSeconds(),f="AM",g=h;g>=12&&(g=h-12,f="PM"),0===g&&(g=12),p=p<10?"0"+p:p,u=u<10?"0"+u:u,g=g<10?"0"+g:g,i=g+":"+p+":"+u+" "+f;var m={value:i.toString()};return this.parent.parentObject.notify(s._51,m),m.isTime&&(i=m.updatedVal),i},e.prototype.ComputeCHAR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");if("#NAME?"===i)return this.parent.getErrorStrings()[r.i.name];if(!i.toUpperCase().match(/^[0-9]+$/))return this.parent.getErrorStrings()[r.i.value];var o=parseInt(i,10);return o>255||o<=0?this.parent.getErrorStrings()[r.i.value]:String.fromCharCode(o)},e.prototype.ComputeCODE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var i=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join("");return this.parent.getErrorStrings().indexOf(i)>-1?i:""===i?this.parent.getErrorStrings()[r.i.value]:i.charCodeAt(0)},e.prototype.ComputeDOLLAR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o,s;if(e.length&&"nestedFormulaTrue"===e[e.length-1]&&(s=!0,e.pop()),1===e.length&&(""===e[0]&&(o=!0),e.push("2")),n.i(a.isNullOrUndefined)(e)||2!==e.length||o)return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var l=0;l<e.length;l++)if(e[l].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(e[l])))return this.parent.getErrorStrings()[r.i.value];var d=this.parent.getValueFromArg(e[0]).split(this.parent.tic).join(""),c=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("");if(d=""===d||d===this.parent.falseValue?"0":d===this.parent.trueValue?"1":d,c=""===c||c===this.parent.falseValue?"0":c===this.parent.trueValue?"1":c,"#NAME?"===d||"#NAME?"===c)return this.parent.getErrorStrings()[r.i.name];if(!d.toUpperCase().match(/^[-]?[0-9.]+$/)||!c.toUpperCase().match(/^[-]?[0-9.]+$/))return this.parent.getErrorStrings()[r.i.value];for(var h=new a.Internationalization,p=parseInt(c,10),u=Math.pow(10,-1*p),f="",g=1;g<=p;g++)f+="0";var m=Math.round(this.parent.parseFloat(d)/u)*u;return i=isNaN(m)?this.parent.getErrorStrings()[r.i.value]:h.formatNumber(m,{format:"$#,##0."+f+";($#,##0."+f+");$0."+f}),s&&(i=this.parent.tic+i+this.parent.tic),i},e.prototype.ComputeSMALL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||""===e[0]||2!==e.length)return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var i=this.parent.getCellCollection(e[0]),o=[],s=0;s<i.length;s++)o.push(parseFloat(this.parent.getValueFromArg(i[s]).split(this.parent.tic).join("")));o=o.sort(function(e,t){return e-t});for(var l=o.length,d=0;d<l&&(!isNaN(o[d])||(o.splice(d,1),l=o.length,d--,0!==o.length));d++);var c=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("");return"#NAME?"===c?this.parent.getErrorStrings()[r.i.name]:(c=parseInt(c,10),c.toString().toUpperCase().match(/^[0-9]+$/)&&o[c-1]&&o[c-1].toString().toUpperCase().match(/^[-.0-9]+$/)&&0!==c?o[c-1]:n.i(a.isNullOrUndefined)(o[c-1])?this.parent.getErrorStrings()[r.i.num]:this.parent.getErrorStrings()[r.i.value])},e.prototype.ComputeLARGE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||2!==e.length||""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var i=this.parent.getCellCollection(e[0]),o=[],s=0;s<i.length;s++)o.push(parseFloat(this.parent.getValueFromArg(i[s]).split(this.parent.tic).join("")));o=o.sort(function(e,t){return t-e});for(var l=0;l<o.length&&(!isNaN(o[l])||(o.splice(l,1),l--,0!==o.length));l++);var d=this.parent.getValueFromArg(e[1]).split(this.parent.tic).join("");return"#NAME?"===d?this.parent.getErrorStrings()[r.i.name]:(d=parseInt(d,10),d.toString().toUpperCase().match(/^[0-9]+$/)&&o[d-1]&&o[d-1].toString().toUpperCase().match(/^[-.0-9]+$/)&&0!==d?o[d-1]:n.i(a.isNullOrUndefined)(o[d-1])?this.parent.getErrorStrings()[r.i.num]:this.parent.getErrorStrings()[r.i.value])},e.prototype.ComputeCHOOSE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];if(e.length<2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var i=e;if(i[0].indexOf(":")>-1&&this.parent.isCellReference(i[0])){var o=this.parent.getCellCollection(i[0]);if(1!==o.length)return this.parent.getErrorStrings()[r.i.value];i[0]=o[0]}var s=this.parent.getValueFromArg(i[0]);if(this.parent.getErrorStrings().indexOf(s)>-1)return s;var l=this.parent.parseFloat(this.parent.getValueFromArg(i[0].split(this.parent.tic).join("")));if(l<1)return this.parent.getErrorStrings()[r.i.value];l=Math.floor(l);var d;if(n.i(a.isNullOrUndefined)(i[l]))return this.parent.getErrorStrings()[r.i.value];if(d=i[l],""===d&&(d="0"),d.indexOf(":")>-1&&this.parent.isCellReference(d)){var o=this.parent.getCellCollection(i[0].split(this.parent.tic).join(""));if(1!==o.length)return this.parent.getErrorStrings()[r.i.value];i[0]=o[0]}return this.parent.getValueFromArg(d).split(this.parent.tic).join("")},e.prototype.ComputeSUMIF=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e;if(n[0].indexOf(":")<0&&!this.parent.isCellReference(n[0])||n[2]&&n[2].indexOf(":")<0&&!this.parent.isCellReference(n[2]))return this.parent.formulaErrorStrings[r.j.improper_formula];if(n.length>3||n.length<2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var i=this.parent.computeSumIfAndAvgIf(e,!1);return"string"==typeof i&&(this.parent.formulaErrorStrings.indexOf(i)||this.parent.getErrorStrings().indexOf(i))?i:i[0]},e.prototype.ComputeABS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i=e,a="";if(0===e.length||e.length>1)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(""===i[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];var o=i[0].split(this.parent.tic).join("").trim();if(""===o||i[0].indexOf(this.parent.tic)>-1&&isNaN(this.parent.parseFloat(o)))return this.parent.getErrorStrings()[r.i.value];if(this.parent.isCellReference(i[0])){if(a=this.parent.getValueFromArg(i[0]),this.parent.getErrorStrings().indexOf(a)>-1)return this.parent.getErrorStrings()[r.i.value];if(a===this.parent.trueValue&&(a="1"),""!==a&&a!==this.parent.falseValue||(a="0"),n=this.parent.parseFloat(a),isNaN(n)&&!this.parent.isNumber(a))return this.parent.getErrorStrings()[r.i.value]}else{if(a=this.parent.getValueFromArg(i[0]).split(this.parent.tic).join(),a===this.parent.trueValue&&(a="1"),a===this.parent.falseValue&&(a="0"),this.parent.getErrorStrings().indexOf(a)>-1)return a;if(n=this.parent.parseFloat(a),isNaN(n)&&!this.parent.isNumber(a))return this.parent.getErrorStrings()[r.i.value]}return Math.abs(n)},e.prototype.ComputeAVERAGE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=!1;if(e.length&&"isSubtotal"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var o=e,s=0;s<o.length;s++)if(o[s].indexOf(":")>-1&&o[s].indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value];return this.parent.calculateAvg(o,i)},e.prototype.ComputeAVERAGEIF=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e;if(n[0].indexOf(":")<0&&!this.parent.isCellReference(n[0]))return this.parent.formulaErrorStrings[r.j.improper_formula];var i=this.parent.computeSumIfAndAvgIf(e,!0);return 0===i[1]||"NaN"===i[0].toString()?this.parent.formulaErrorStrings[r.j.div]:"string"==typeof i&&(this.parent.formulaErrorStrings.indexOf(i)||this.parent.getErrorStrings().indexOf(i))?i:this.parent.parseFloat(i[0])/this.parent.parseFloat(i[1])},e.prototype.ComputeCONCATENATE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.invalid_arguments];for(var i=e,o="",s="",l=0;l<i.length;l++){if(i[l].indexOf(":")>-1&&this.parent.isCellReference(i[l])){if(!this.isConcat)return this.parent.getErrorStrings()[r.i.value];for(var d=this.parent.getCellCollection(i[l]),c=0;c<d.length;c++)s=this.parent.getValueFromArg(d[c]),o+=s}else{if(1===i.length&&i[0].indexOf(this.parent.tic)<0)return this.parent.getErrorStrings()[r.i.name];s=this.parent.getValueFromArg(i[l]),o+=s}if(this.parent.getErrorStrings().indexOf(s)>-1)return s}return o.split(this.parent.tic).join("")},e.prototype.ComputeCONCAT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.isConcat=!0,this.ComputeCONCATENATE.apply(this,e)},e.prototype.ComputeMAX=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.parent.computeMinMax(e,"max")},e.prototype.ComputeMIN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.parent.computeMinMax(e,"min")},e.prototype.ComputeRAND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===e.length&&""===e[0]&&(e.length=0),e.length>0?this.parent.formulaErrorStrings[r.j.wrong_number_arguments]:Math.random().toString()},e.prototype.ComputeAND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;return n.i(a.isNullOrUndefined)(e)||1===i.length&&""===i[0]?this.parent.formulaErrorStrings[r.j.invalid_arguments]:this.parent.computeAndOrNot(i,"and")},e.prototype.ComputeOR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;return n.i(a.isNullOrUndefined)(e)||1===i.length&&""===i[0]?this.parent.formulaErrorStrings[r.j.invalid_arguments]:this.parent.computeAndOrNot(i,"or")},e.prototype.ComputeNOT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;return n.i(a.isNullOrUndefined)(e)||e.length>1||""===e[0]?this.parent.formulaErrorStrings[r.j.wrong_number_arguments]:this.parent.computeAndOrNot(i,"not")},e.prototype.ComputeFIND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var i=e;if(i.length>3)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var o=this.parent.removeTics(this.parent.getValueFromArg(i[0]));if(this.parent.getErrorStrings().indexOf(o)>-1)return o;var s=this.parent.removeTics(this.parent.getValueFromArg(i[1]));if(this.parent.getErrorStrings().indexOf(s)>-1)return s;var l=1;if(3===i.length){if(l=this.parent.removeTics(this.parent.getValueFromArg(i[2])),this.parent.getErrorStrings().indexOf(l)>-1)return l;l=this.parent.parseFloat(l),isNaN(l)&&(l=1)}if(l<=0||l>s.length)return this.parent.getErrorStrings()[r.i.value];var d=s.indexOf(o,l-1);return d<0?this.parent.getErrorStrings()[r.i.value]:(Number(d)+Number(1)).toString()},e.prototype.ComputeINDEX=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i,o=e;o.length&&"nestedFormulaTrue"===o[o.length-1]&&(i=!0,o.pop());var l=o.length;if(n.i(a.isNullOrUndefined)(e)||1===o.length&&""===o[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(l>3)return this.parent.getErrorStrings()[r.i.ref];var d="",c=[];if(l>2)for(var h=0;h<l;h++){if(this.parent.isCellReference(o[h])&&o[h].indexOf(":")<0){var p=this.parent.getValueFromArg(o[h]);if(this.parent.getErrorStrings().indexOf(p)>-1)return this.parent.getErrorStrings()[r.i.ref];c[h]=p}this.parent.isCellReference(o[h])&&(c[h]=o[h])}if(d=o[0],o[1]=""===o[1]?"1":o[1],o[1]=this.parent.getValueFromArg(o[1]),this.parent.getErrorStrings().indexOf(o[1])>-1)return o[1];if(!n.i(a.isNullOrUndefined)(o[2])){if(o[2]=""===o[2]?"1":o[2],o[2]=this.parent.getValueFromArg(o[2]),this.parent.getErrorStrings().indexOf(o[2])>-1)return o[2];if("0"===o[2])return this.parent.getErrorStrings()[r.i.value]}var u=parseFloat(o[1]);u=isNaN(u)?-1:u;var f=parseFloat(o[2]?o[2]:"1");if(f=isNaN(f)?-1:f,-1===u||-1===f)return this.parent.getErrorStrings()[r.i.value];var g=o[0].indexOf(":"),m=this.parent.rowIndex(d.substring(0,g)),v=this.parent.rowIndex(d.substring(g+1)),y=this.parent.colIndex(d.substring(0,g)),C=this.parent.colIndex(d.substring(g+1));if(u>v-m+1||f>C-y+1)return this.parent.getErrorStrings()[r.i.ref];u=m+u-1,f=y+f-1;var b=this.getSheetReference(d)+this.parent.convertAlpha(f)+u,x=this.parent.getValueFromArg(b);return""===x?0:i&&!n.i(s._190)(x)&&x!==this.parent.trueValue&&x!==this.parent.falseValue&&-1===this.parent.getErrorStrings().indexOf(x)?'"'+x+'"':x},e.prototype.getSheetReference=function(e){return 0===e.indexOf(this.parent.sheetToken)&&e.lastIndexOf(this.parent.sheetToken)>e.indexOf(this.parent.sheetToken)?e.substring(0,e.lastIndexOf(this.parent.sheetToken)+1):""},e.prototype.ComputeIFS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;if(n.i(a.isNullOrUndefined)(e)||1===i.length&&""===i[0]||i.length%2!=0)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];for(var o="",s="",l=0;l<i.length;l++){if(o=this.parent.getValueFromArg(i[l]),""===i[l])return this.parent.getErrorStrings()[r.i.na];if(this.parent.getErrorStrings().indexOf(o)>-1)return o;if(o!==this.parent.trueValue&&o!==this.parent.falseValue)return this.parent.getErrorStrings()[r.i.value];if(o===this.parent.trueValue)return this.parent.isCellReference(i[l+1].split(this.parent.tic).join(""))||i[l+1].includes(this.parent.arithMarker)?(s=this.parent.getValueFromArg(i[l+1]),s=""===s?"0":s):(s=""===i[l+1]?"0":this.parent.getValueFromArg(i[l+1]),s.indexOf(this.parent.tic)>-1&&(s=s.split(this.parent.tic).join(""))),l+=1,s;o===this.parent.falseValue&&(l+=1)}return this.parent.getErrorStrings()[r.i.na]},e.prototype.ComputeCOUNTA=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=!1;if(e.length&&"isSubtotal"===e[e.length-1]&&(i=!0,e.pop()),n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];for(var o,s,l,d=e,c=0,h=0;h<d.length;h++)if(this.parent.isCellReference(d[h]))if(d[h].indexOf(":")>-1){o=this.parent.getCellCollection(d[h].split(this.parent.tic).join(""));for(var p=0;p<o.length;p++)s=i?this.parent.getValueFromArg(o[p],null,null,!0):this.parent.getValueFromArg(o[p]),i&&s.includes("SUBTOTAL(")||s.length>0&&c++}else{if(s=i?this.parent.getValueFromArg(d[h],null,null,!0):this.parent.getValueFromArg(d[h]),i&&s.includes("SUBTOTAL("))continue;s.length>0&&c++}else l=this.parent.getValueFromArg(d[h]).split(this.parent.tic).join(""),l.length>0?c++:0===l.length&&""===l.trim()&&c++;return c},e.prototype.ComputeAVERAGEA=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(n.i(a.isNullOrUndefined)(e)||1===e.length&&""===e[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];for(var i,o,s,l,d=e,c=0,h=0,p=0;p<d.length;p++)if(this.parent.isCellReference(d[p]))if(d[p].indexOf(":")>-1){i=this.parent.getCellCollection(d[p].split(this.parent.tic).join(""));for(var u=0;u<i.length;u++){if(o=this.parent.getValueFromArg(i[u]),o=this.processLogicalCellValue(o),this.parent.getErrorStrings().indexOf(o)>-1)return o;n.i(a.isNullOrUndefined)(o)||""===o||(l=this.parent.parseFloat(o),o=isNaN(l)?0:l,c+=o,h+=1)}}else{if(o=this.parent.getValueFromArg(d[p]),o=this.processLogicalCellValue(o),this.parent.getErrorStrings().indexOf(o)>-1)return o;if(n.i(a.isNullOrUndefined)(o)||""===o)continue;l=this.parent.parseFloat(o),o=isNaN(l)?0:l,c+=o,h+=1}else{if(d[p].indexOf(this.parent.tic)>-1&&(isNaN(this.parent.parseFloat(d[p].split(this.parent.tic).join("")))||""===d[p].split(this.parent.tic).join("").trim()))return this.parent.getErrorStrings()[r.i.value];if(d[p]=this.processLogicalCellValue(d[p]),s=this.parent.getValueFromArg(d[p].split(this.parent.tic).join("")),this.parent.getErrorStrings().indexOf(s)>-1)return s;c+=this.parent.parseFloat(s),h+=1}return 0===h?this.parent.getErrorStrings()[r.i.divzero]:c/h},e.prototype.processLogicalCellValue=function(e){var t=e;return t.toUpperCase()===this.parent.trueValue?t="1":t.toUpperCase()===this.parent.falseValue&&(t="0"),t},e.prototype.ComputeSORT=function(){for(var e=this,t=[],l=0;l<arguments.length;l++)t[l]=arguments[l];var d,c;t.length&&"nestedFormulaTrue"===t[t.length-1]&&(d=!0,t.pop());var h,p=t,u=[];if(n.i(a.isNullOrUndefined)(t)||""===t[0]||p.length>4)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];p[1]=p[1]?p[1]:"1",p[2]=p[2]?p[2]:"1",p[3]=p[3]?p[3]:"FALSE",p[0]=p[0].split("$").join("");var f,g=[];if(p[0].indexOf(":")>-1){var m=p[0].split(":");if(this.parent.isCellReference(m[0])&&this.parent.isCellReference(m[1])){var v=p[0].indexOf(":"),y=void 0,C=this.parent.rowIndex(this.parent.substring(p[0],0,v)),b=this.parent.colIndex(this.parent.substring(p[0],0,v)),x=this.parent.rowIndex(this.parent.substring(p[0],v+1,v+p[0].length-v-1)),S=this.parent.colIndex(this.parent.substring(p[0],v+1,v+p[0].length-v-1));if(C>x&&(y=x,x=C,C=y),b>S&&(y=S,S=b,b=y),this.parent.isCellReference(p[3])){if(p[3]=this.parent.getValueFromArg(p[3]).toUpperCase(),p[3]!==this.parent.trueValue&&p[3]!==this.parent.falseValue)if(n.i(s._190)(p[3]))p[3]=0===Number(p[3])?this.parent.falseValue:this.parent.trueValue;else{if(""!==p[3])return this.parent.getErrorStrings()[r.i.value];p[3]=this.parent.falseValue}}else if(c=p[3].startsWith(this.parent.tic)&&p[3].endsWith(this.parent.tic),p[3]=this.parent.getValueFromArg(p[3]),p[3]=n.i(s._190)(p[3])?0===Number(p[3])?this.parent.falseValue:this.parent.trueValue:p[3].split(this.parent.tic).join("").toUpperCase(),p[3]!==this.parent.trueValue&&p[3]!==this.parent.falseValue)return this.parent.getErrorStrings()[c?r.i.value:r.i.name];if(this.parent.isCellReference(p[2])?(p[2]=this.parent.getValueFromArg(p[2]),p[2]=p[2]===this.parent.trueValue?"1":p[2]):(p[2]=this.parent.getValueFromArg(p[2]),p[2]=p[2]===this.parent.trueValue?"1":p[2].split(this.parent.tic).join("")),p[2]=n.i(s._190)(p[2])?Math.floor(Number(p[2])).toString():p[2],"1"!==p[2]&&"-1"!==p[2])return this.parent.getErrorStrings().indexOf(p[2])>-1?this.parent.getErrorStrings()[r.i.name]:this.parent.getErrorStrings()[r.i.value];var w="1"===p[2]?"Ascending":"Descending";if(this.parent.isCellReference(p[1])){if(p[1]=this.parent.getValueFromArg(p[1]),p[1]=n.i(s._190)(p[1])?Math.floor(Number(p[1])).toString():p[1]===this.parent.trueValue?"1":p[1]===this.parent.falseValue?"0":p[1],isNaN(this.parseDouble(p[1]))||(this.parseDouble(p[1])<1||(p[3]===this.parent.trueValue?x-C+1<this.parseDouble(p[1]):S-b+1<this.parseDouble(p[1]))))return this.parent.getErrorStrings()[r.i.value]}else if(c=p[1].startsWith(this.parent.tic)&&p[1].endsWith(this.parent.tic),p[1]=this.parent.getValueFromArg(p[1]),p[1]=n.i(s._190)(p[1])?Math.floor(Number(p[1])).toString():p[1]===this.parent.trueValue?"1":p[1]===this.parent.falseValue?"0":p[1].split(this.parent.tic).join(""),isNaN(this.parseDouble(p[1]))?c:this.parseDouble(p[1])<1||(p[3]===this.parent.trueValue?x-C+1<this.parseDouble(p[1]):S-b+1<this.parseDouble(p[1])))return this.parent.getErrorStrings()[r.i.value];var _="";0===p[0].indexOf("!")&&(_=p[0],_=_.replace("!",""),_=_.indexOf("!"),_=p[0].substring(0,_+2)),p[0]=_+n.i(i.e)(b)+C+":"+n.i(i.e)(S)+x,f=this.parent.getCellCollection(p[0]);for(var I=0;I<f.length;I++)g.push(this.parent.getValueFromArg(f[I]));var E=[],R=[],k=[],A=[],F=[],N=S-b+1,T=function(t){t?"TRUE"===t.toUpperCase()||"FALSE"===t.toUpperCase()?(A.push(t),E.push(t)):isNaN(e.parseDouble(t))?(k.push(t),E.push(t)):(R.push(e.parseDouble(t)),E.push(e.parseDouble(t))):""===t&&(F.push(e.parseDouble(t).toString()),E.push(e.parseDouble(t).toString()))};if("TRUE"===p[3])for(var I=0;I<N;I++)T(g[I+(this.parseDouble(p[1])-1)*N]);if("FALSE"===p[3])for(var I=0;I<g.length;I++)T(g[I*N+this.parseDouble(p[1])-1]);for(var O=R.length>0?o.DataUtil.sort(R,null,o.DataUtil.fnSort(w)):[],D=k.length>0?o.DataUtil.sort(k,null,o.DataUtil.fnSort(w)):[],L=A.length>0?o.DataUtil.sort(A,null,o.DataUtil.fnSort(w)):[],P="Ascending"===w?O.concat(D,L,F):L.concat(D,O,F),M=[],B=0;B<P.length;B++)for(var H=0;H<E.length;H++)JSON.stringify(P[B])===JSON.stringify(E[H])&&-1===M.indexOf(H)&&M.push(H);if("TRUE"===p[3]){for(var U=C,V=0;U<=x;U++,V++)for(var B=0,j=0;B<M.length;B++,j++){var z=this.parent.getValueFromArg(_+n.i(i.e)(M[B]+b)+U);if(d&&""!==z)u.push(z);else{z=""===z?"0":z;var q=this.parent.actCell;q=q.indexOf("!")>-1?q.split("!")[1]:q;var W=this.parent.rowIndex(q),G=this.parent.colIndex(q);this.parent.parentObject.setValueRowCol(this.parent.getSheetID(this.parent.grid)+1,z,W+V,G+j)}}h=this.parent.getValueFromArg(_+n.i(i.e)(M[0]+b)+C)}if("FALSE"===p[3]){for(var B=0,V=0;B<M.length;B++,V++)for(var Y=b,j=0;Y<=S;Y++,j++){var X=this.parent.getValueFromArg(_+n.i(i.e)(Y)+(M[B]+C));if(d&&""!==X)u.push(X);else{X=""===X?"0":X;var q=this.parent.actCell;q=q.indexOf("!")>-1?q.split("!")[1]:q;var G=this.parent.colIndex(q),W=this.parent.rowIndex(q);this.parent.parentObject.setValueRowCol(this.parent.getSheetID(this.parent.grid)+1,X,W+V,G+j)}}h=this.parent.getValueFromArg(_+n.i(i.e)(b)+(M[0]+C))}}}return d?u.join(","):""===h?"0":h},e.prototype.ComputeCOUNTIF=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;if(n.i(a.isNullOrUndefined)(e)||""===e[0]||2!==i.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(i[0].indexOf(":")<0&&!this.parent.isCellReference(i[0]))return this.parent.getErrorStrings()[r.i.name];var o,s,l=0,d=[],c="equal";if(""===i[1])return 0;var h=i[1].startsWith(this.parent.tic)&&i[1].endsWith(this.parent.tic),p=i[1].split(this.parent.tic).join(""),u=p.includes("*"),f="*"===p||"<>*"===p,g=u&&!f?p.replace(/\*/g,"").trim():p,m=!1;if(!h&&this.parent.isCellReference(g)&&(g=this.parent.getValueFromArg(g),m=!0),u&&!f){var v=p.indexOf("*");"*"===p[0]&&(g="*"+g),"*"===p[p.length-1]&&(g+="*"),v>0&&v<p.length-1&&(g=p.substring(0,v)+"*"+p.substring(v+1))}p=g,p.startsWith("<=")?(c="lessEq",p=p.substring(2)):p.startsWith(">=")?(c="greaterEq",p=p.substring(2)):p.startsWith("<>")?(c="notEq",p=p.substring(2)):p.startsWith("<")?(c="less",p=p.substring(1)):p.startsWith(">")?(c="greater",p=p.substring(1)):p.startsWith("=")&&(c="equal",p=p.substring(1));var y=p.indexOf("*")>-1||p.indexOf("?")>-1;if((!h&&this.parent.isCellReference(p)&&!m||p.includes(this.parent.arithMarker)||p.includes(this.parent.getParseDecimalSeparator())&&!y)&&(p=this.parent.getValueFromArg(p)),i[0].indexOf(":")>-1&&this.parent.isCellReference(i[0])){o=this.parent.getCellCollection(i[0].split(this.parent.tic).join(""));for(var C=0;C<o.length;C++)s=this.parent.getValueFromArg(o[C]),y&&(s=this.parent.findWildCardValue(p.toLowerCase(),s.toLowerCase())),d.push(s),d.push(p),this.parent.processLogical(d,c)===this.parent.trueValue&&l++}return l},e.prototype.ComputeSUMIFS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.calculateIFS(e)},e.prototype.calculateIFS=function(e,t){var i=this;if(n.i(a.isNullOrUndefined)(e)||""===e[0]||e.length<2||e.length>127)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(3===e.length&&e[2].includes(this.parent.tic+this.parent.tic)){var o,s="",l=this.parent.getParseArgumentSeparator();return e[2].split(this.parent.tic+this.parent.tic).forEach(function(n){(n=n.trim().split(i.parent.tic).join(""))&&(o=i.parent.computeIfsFormulas([e[0],e[1],n],i.parent.falseValue,t).toString(),s+=(s?l:"")+o)}),s}return this.parent.computeIfsFormulas(e,this.parent.falseValue,t)},e.prototype.ComputeTEXT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e.length,o=e[0],l=e[1];if(2!==i)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var d=o,c=l;if(""===l)return this.parent.getValueFromArg(d);var h=new Date(1900,0,1,0,0,0),p=d+","+c,u=new a.Internationalization;if(this.parent.getErrorStrings().indexOf(p)>-1)return p;if(d=this.parent.getValueFromArg(d),n.i(s._190)(d.split(this.parent.tic).join(""))&&(d=d.split(this.parent.tic).join("")),""===(c=l.startsWith('"')&&l.endsWith('"')?c.split(this.parent.tic).join(""):this.parent.getValueFromArg(c)))return"";""===d&&(c.length>0&&(c.toUpperCase().indexOf("M")>-1||c.toUpperCase().indexOf("D")>-1||c.toUpperCase().indexOf("Y")>-1||c.toUpperCase().indexOf("S")>-1||c.toUpperCase().indexOf("T")>-1)||c.toUpperCase().indexOf("H")>-1)&&(d=h.toString());var f=this.parseDouble(d);if(isNaN(f)&&null!==this.parent.isDate(new Date(d))&&(f=this.parent.toOADate(new Date(d))),h=Date.parse(d.split(this.parent.tic).join("")),!isNaN(f)||!isNaN(h))if(c.length>0&&-1===c.indexOf("#")&&(c.toUpperCase().indexOf("M")>-1||c.toUpperCase().indexOf("D")>-1||c.toUpperCase().indexOf("Y")>-1||c.toUpperCase().indexOf("S")>-1||c.toUpperCase().indexOf("T")>-1)||c.toUpperCase().indexOf("H")>-1){c=c.split("Y").join("y").split("D").join("d").split("H").join("h"),c=c.split("S").join("s").split("m").join("M").split("AM/PM").join("tt");var g=c.split(""),m=!1,v=!1,y=0,C=0,b=0;for(y=0;y<g.length;){var x=g[y];"s"===x&&"M"===g[C]&&(g[C]="m","M"===g[C-1]&&(g[C-1]="m")),this.parent.isChar(x)?(C=y,"M"===x&&b++):b>1&&b++,"M"===x&&m&&(g[y]="m",v=!0),"h"===x?m=!0:this.parent.isChar(x)&&"M"!==x&&"h"!==x&&!v&&(m=!1,v=!1),y++}c=String(g),c=c.split(",").join("").split("\n").join(" ");var S=this.parent.fromOADate(f);0===f&&(S=h);var w=n.i(r.c)(c);if(""===w){var _=n.i(s._188)(S),I=this.parent.parentObject.getDisplayText({format:c,value:_});return I}var E=u.getDateFormat({skeleton:w,type:"date"}),R=E(new Date(S.toString()));d=R}else d=this.parent.parentObject.getDisplayText({format:c,value:f});return d},e.prototype.ComputeCOUNTIFS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.parent.computeIfsFormulas(e,this.parent.trueValue)},e.prototype.ComputeAVERAGEIFS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.calculateIFS(e,this.parent.trueValue)},e.prototype.ComputeMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;if(n.i(a.isNullOrUndefined)(i)||1===i.length&&""===i[0]||i.length<2||i.length>3)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var o,s=[],l=i[0].split(this.parent.tic).join("");if(this.parent.isCellReference(l)&&(l=this.parent.getValueFromArg(l)),!l.toString().length)return this.parent.getErrorStrings()[r.i.na];i[2]=n.i(a.isNullOrUndefined)(i[2])?"1":i[2].split(this.parent.tic).join(""),i[2].split(this.parent.tic).join("")===this.parent.trueValue&&(i[2]="1"),i[2].split(this.parent.tic).join("")===this.parent.falseValue&&(i[2]="0");var d=parseFloat(i[2]);if(-1!==d&&0!==d&&1!==d)return this.parent.getErrorStrings()[r.i.na];var c=0,h="";if(i[1].indexOf(":")>-1||this.parent.isCellReference(i[1])){o=this.parent.getCellCollection(i[1].split(this.parent.tic).join(""));for(var p=0;p<o.length;p++)s[p]=this.parent.getValueFromArg(o[p]).split(this.parent.tic).join("");for(var u=0;u<s.length;u++)if(s[u].toString().length)if(1===d){if(l===s[u])return u+1;l>s[u]&&(h?s[u]>h&&(c=u+1,h=s[u]):(c=u+1,h=s[u]))}else if(0===d){if((l.indexOf("*")>-1||l.indexOf("?")>-1)&&(s[u]=this.parent.findWildCardValue(l,s[u])),l===s[u])return u+1;if(this.parent.parseFloat(l)===this.parent.parseFloat(s[u]))return u+1}else if(-1===d){if(l===s[u])return u+1;l<s[u]&&(h?s[u]<h&&(c=u+1,h=s[u]):(c=u+1,h=s[u]))}}return c||this.parent.getErrorStrings()[r.i.na]},e.prototype.ComputeLOOKUP=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;return n.i(a.isNullOrUndefined)(i)||1===i.length&&""===i[0]?this.parent.formulaErrorStrings[r.j.wrong_number_arguments]:this.parent.computeLookup(i)},e.prototype.ComputeVLOOKUP=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;return n.i(a.isNullOrUndefined)(i)||1===i.length&&""===i[0]||i.length<3||i.length>4?this.parent.formulaErrorStrings[r.j.wrong_number_arguments]:this.parent.computeVHLookup(i,!0)},e.prototype.ComputeHLOOKUP=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=e;return n.i(a.isNullOrUndefined)(i)||1===i.length&&""===i[0]||i.length<3||i.length>4?this.parent.formulaErrorStrings[r.j.wrong_number_arguments]:this.parent.computeVHLookup(i)},e.prototype.ComputeSUBTOTAL=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e,i="";if(n.length<2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var a=this.parent.parseFloat(this.parent.getValueFromArg(n[0].split(this.parent.tic).join(""))),o=n.slice(1,n.length);switch(a){case 1:case 101:i=this.ComputeAVERAGE.apply(this,o.concat(["isSubtotal"]));break;case 2:case 102:i=this.ComputeCOUNT.apply(this,o.concat(["isSubtotal"]));break;case 3:case 103:i=this.ComputeCOUNTA.apply(this,o.concat(["isSubtotal"]));break;case 4:case 104:i=this.ComputeMAX.apply(this,o.concat(["isSubtotal"]));break;case 5:case 105:i=this.ComputeMIN.apply(this,o.concat(["isSubtotal"]));break;case 6:case 106:i=this.ComputePRODUCT.apply(this,o.concat(["isSubtotal"]));break;case 7:case 107:i=this.ComputeDAY.apply(this,o);break;case 8:case 108:i=this.ComputeCONCAT.apply(this,o);break;case 9:case 109:i=this.ComputeSUM.apply(this,o.concat(["isSubtotal"]));break;case 10:case 110:i=this.ComputeAVERAGEA.apply(this,o);break;case 11:case 111:i=this.ComputeABS.apply(this,o);break;default:i=this.parent.getErrorStrings()[r.i.value]}return i},e.prototype.ComputeRADIANS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e;if(""===n[0]||n.length>1)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(n[0].indexOf(":")>-1||""===n[0].split(this.parent.tic).join(""))return this.parent.getErrorStrings()[r.i.value];var i=n[0].split(this.parent.tic).join("");n[0]=isNaN(this.parent.parseFloat(i))?n[0]:i;var a=this.parent.getValueFromArg(n[0]);if(this.parent.getErrorStrings().indexOf(a)>-1)return a;var o=this.parent.parseFloat(a);return isNaN(o)?a.indexOf(this.parent.tic)>-1?this.parent.getErrorStrings()[r.i.value]:this.parent.getErrorStrings()[r.i.name]:Math.PI*o/180},e.prototype.ComputeRANDBETWEEN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i,a,o=e.length;if(2!==o)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];for(var s=0;s<o;s++){if(""===e[s])return this.parent.getErrorStrings()[r.i.na];if(e[s].indexOf(this.parent.tic)>-1){if(isNaN(parseFloat(e[s].split(this.parent.tic).join(""))))return this.parent.getErrorStrings()[r.i.value];e[s]=e[s].split(this.parent.tic).join("")}var l=this.parent.getValueFromArg(e[s]);if(this.parent.getErrorStrings().indexOf(l)>-1)return l;if(a=parseFloat(l),this.parent.isCellReference(e[s])){if(a=""===this.parent.getValueFromArg(e[s])?0:a,0===s?n=a:i=a,0===n&&0===i)return"0";if(isNaN(a))return this.parent.getErrorStrings()[r.i.value]}else{if(isNaN(a))return this.parent.getErrorStrings()[r.i.name];0===s?n=a:i=a}}return i<n?this.parent.getErrorStrings()[r.i.num]:0===n?Math.floor(Math.random()*(i-(n-1)))+n:i-n==1?Math.round(Math.random()*(i-n)+n):Math.floor(Math.random()*(i-(n-1)))+n},e.prototype.ComputeSLOPE=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e;if(2!==n.length||""===n[0])return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var i=this.parent.getCellCollection(n[1].split(this.parent.tic).join("")),a=this.parent.getCellCollection(n[0].split(this.parent.tic).join(""));if(a.length!==i.length)return this.parent.getErrorStrings()[r.i.na];for(var o=this.getDataCollection(a),s=0;s<o.length;s++)if(this.parent.getErrorStrings().indexOf(o[s])>-1)return o[s];for(var l=this.getDataCollection(i),d=0;d<l.length;d++)if(this.parent.getErrorStrings().indexOf(l[d])>-1)return l[d];for(var c=0,h=0,p=0,u=0,f=0,g=l.length;f<g;++f)"NaN"!==Number(l[f]).toString()&&"NaN"!==Number(o[f]).toString()&&(c+=Number(l[f])*Number(o[f]),p+=Number(l[f]),u+=Number(o[f]),h+=Number(l[f])*Number(l[f]));var m=((c-p*u/l.length)/(h-p*p/l.length)).toString();return"NaN"===m?this.parent.getErrorStrings()[r.i.divzero]:m},e.prototype.ComputeINTERCEPT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e;if(""===n[0]||2!==n.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var i=this.parent.getCellCollection(n[0].split(this.parent.tic).join("")),a=this.parent.getCellCollection(n[1].split(this.parent.tic).join(""));if(i.length!==a.length)return this.parent.getErrorStrings()[r.i.na];for(var o=this.getDataCollection(a),s=0;s<o.length;s++)if(this.parent.getErrorStrings().indexOf(o[s])>-1)return o[s];for(var l=this.getDataCollection(i),d=0;d<l.length;d++)if(this.parent.getErrorStrings().indexOf(l[d])>-1)return l[d];for(var c=0,h=0,p=0,u=o.length;p<u;++p)c+=Number(o[p]),h+=Number(l[p]);c/=o.length,h/=o.length;for(var f,g=0,m=0,p=0,u=o.length;p<u;++p)f=Number(o[p])-c,g+=f*(Number(l[p])-h),m+=f*f;var v=(h-g/m*c).toString();return"NaN"===v?this.parent.getErrorStrings()[r.i.divzero]:v},e.prototype.ComputeLN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i,a=e,o="";if(0===e.length||e.length>1)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(this.parent.isCellReference(a[0])){if(o=this.parent.getValueFromArg(a[0]),(n=this.parent.parseFloat(o))<=0||""===o)return this.parent.getErrorStrings()[r.i.num];if(isNaN(n))return this.parent.getErrorStrings()[r.i.value]}else{if(i=this.parent.getValueFromArg(a[0].split(this.parent.tic).join("")),(n=this.parent.parseFloat(i))<=0||""===n.toString())return this.parent.getErrorStrings()[r.i.num];if(isNaN(n))return this.parent.getErrorStrings()[r.i.value]}return Math.log(n)},e.prototype.ComputeISNUMBER=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e;if(0===e.length||e.length>1)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var i=this.parent.isCellReference(n[0])?this.parent.getValueFromArg(n[0]):this.parent.getValueFromArg(n[0].split(this.parent.tic).join(""));if(""===i.toString())return!1;var a=this.parent.parseFloat(i);return!isNaN(a)},e.prototype.ComputeROUND=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!e.length||1===e.length||e.length>2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];var n=e;if(1===e.length){var i="TRUE"===n[0].split(this.parent.tic).join("")?"1":"FALSE"===n[0].split(this.parent.tic).join("")?"0":n[0];return isNaN(this.parent.parseFloat(i))?this.parent.formulaErrorStrings[r.j.invalid_arguments]:Math.round(this.parent.parseFloat(i)).toString()}var a=this.parent.getValueFromArg(n[0]);if(this.parent.getErrorStrings().indexOf(a)>-1)return a;var o=this.parent.getValueFromArg(n[1]);if(this.parent.getErrorStrings().indexOf(o)>-1)return o;a="TRUE"===a?"1":"FALSE"===a?"0":a,o="TRUE"===o?"1":"FALSE"===o?"0":o,a=a.split(this.parent.tic).join(""),o=o.split(this.parent.tic).join("");var s=isNaN(Number(a))||""===a.trim(),l=isNaN(Number(o))||""===o.trim();if((n[0].indexOf('"')>-1||this.parent.isCellReference(n[0]))&&s||(n[1].indexOf('"')>-1||this.parent.isCellReference(n[1]))&&l)return this.parent.getErrorStrings()[r.i.value];if(""===a&&""===o||""===a)return 0;var d,c=this.parent.parseFloat(a),h=this.parent.parseFloat(o);if(!isNaN(h)&&!isNaN(c)&&h>0)d=this.parent.parseFloat(this.preciseRound(c,h));else{var p=Math.pow(10,-h);d=Math.round(c/p)*p}return d.toString()},e.prototype.preciseRound=function(e,t){var n=e>=0?1:-1;return(Math.round(e*Math.pow(10,t)+.001*n)/Math.pow(10,t)).toFixed(t)},e.prototype.ComputePOWER=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i,a,o=e;if(0===e.length||e.length>2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];i=this.parent.getValueFromArg(o[0]),a=this.parent.getValueFromArg(o[1]),i="TRUE"===i?"1":"FALSE"===i?"0":i,a="TRUE"===a?"1":"FALSE"===a?"0":a;var s=this.parent.parseFloat(i),l=this.parent.parseFloat(a);return isNaN(s)||isNaN(l)?this.parent.getErrorStrings()[r.i.value]:0===s&&l<0?this.parent.getErrorStrings()[r.i.divzero]:0===s&&0===l?this.parent.getErrorStrings()[r.i.num]:(n=Math.pow(s,l),n.toString())},e.prototype.ComputeSQRT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i=e[0];if(0===e.length||e.length>1||""===i)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(""===i.split(this.parent.tic).join("").trim())return this.parent.getErrorStrings()[r.i.value];if(this.parent.isCellReference(i)){if(n=this.parent.getValueFromArg(i)||"0",n.indexOf(this.parent.tic)>-1)return this.parent.getErrorStrings()[r.i.value]}else{if(i.indexOf(this.parent.tic)>-1&&(i.split(this.parent.tic).join("")===this.parent.trueValue||i.split(this.parent.tic).join("")===this.parent.falseValue))return this.parent.getErrorStrings()[r.i.value];n=this.parent.getValueFromArg(i).split(this.parent.tic).join("")}if(this.parent.getErrorStrings().indexOf(n)>-1)return n;if(n=n===this.parent.trueValue?"1":n===this.parent.falseValue?"0":n,this.parent.parseFloat(n)<0)return this.parent.getErrorStrings()[r.i.num];if(isNaN(this.parent.parseFloat(n))){var a={value:n};if(this.parent.parentObject.notify(s._51,a),!a.isDate&&!a.isTime)return this.parent.getErrorStrings()[r.i.value];n=a.updatedVal}return Math.sqrt(this.parent.parseFloat(n))},e.prototype.ComputeLOG=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i,a=e;if(0===e.length||e.length>2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(n=this.parent.getValueFromArg(a[0]),i=2===e.length?this.parent.getValueFromArg(a[1]):"10",""===n||null===n||""===i||null===i)return this.parent.getErrorStrings()[r.i.num];n="TRUE"===n.split(this.parent.tic).join("")?"1":"FALSE"===n.split(this.parent.tic).join("")?"0":n,i="TRUE"===i.split(this.parent.tic).join("")?"1":"FALSE"===i.split(this.parent.tic).join("")?"0":i;var o=this.parent.parseFloat(n),s=this.parent.parseFloat(i);return o<=0||s<=0?this.parent.getErrorStrings()[r.i.num]:1===s?this.parent.getErrorStrings()[r.i.divzero]:isNaN(o)||isNaN(s)?this.parent.getErrorStrings()[r.i.value]:(Math.log(o)/Math.LN10/(Math.log(s)/Math.LN10)).toString()},e.prototype.ComputeTRUNC=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i=e,a=0;if(0===e.length||e.length>2)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(2===e.length){if(a=this.parent.getValueFromArg(i[1]),this.parent.getErrorStrings().indexOf(a)>-1)return a;a="TRUE"===a.split(this.parent.tic).join("")?"1":"FALSE"===a.split(this.parent.tic).join("")?"0":a,a=this.parent.parseFloat(a)}if(n=this.parent.getValueFromArg(i[0]),this.parent.getErrorStrings().indexOf(n)>-1)return n;n="TRUE"===n.split(this.parent.tic).join("")?"1":"FALSE"===n.split(this.parent.tic).join("")?"0":n;var o=this.parent.parseFloat(n.split(this.parent.tic).join(""));if(isNaN(o)||isNaN(a))return i[0]===this.parent.tic||this.parent.isCellReference(i[0])||i[1]===this.parent.tic||this.parent.isCellReference(i[1])?this.parent.getErrorStrings()[r.i.value]:this.parent.getErrorStrings()[r.i.name];var s=Math.pow(10,a);return((o<0?-1:1)*Math.floor(s*Math.abs(o))/s).toString()},e.prototype.ComputeEXP=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i=e;if(0===e.length||e.length>1)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(n=this.parent.getValueFromArg(i[0]),this.parent.getErrorStrings().indexOf(n)>-1)return n;""===(n="TRUE"===n.split(this.parent.tic).join("")?"1":"FALSE"===n.split(this.parent.tic).join("")?"0":n)&&(n="0");var a=this.parent.parseFloat(n);return a>709?this.parent.getErrorStrings()[r.i.num]:isNaN(a)?i[0]===this.parent.tic||this.parent.isCellReference(i[0])?this.parent.getErrorStrings()[r.i.value]:this.parent.getErrorStrings()[r.i.name]:Math.exp(a).toString()},e.prototype.ComputeGEOMEAN=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,i,a,o,s=e,l=1,d=0,c=0,h=0;if(0===e.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(1===s.length&&""===s[0])return l.toString();var p;for(i=0;i<s.length;i++)if(s[i].indexOf(":")>-1){if(s[0]===this.parent.tic)return this.parent.getErrorStrings()[r.i.value];for(o=this.parent.getCellCollection(s[i].split(this.parent.tic).join("")),a=0;a<o.length;a++){if(c=this.parent.getValueFromArg(o[a]),h=c.split(this.parent.tic).join(""),p=h===this.parent.trueValue||h===this.parent.falseValue,(n=this.parent.parseFloat(c))<=0)return this.parent.getErrorStrings()[r.i.num];p||this.parent.getErrorStrings().indexOf(c)>-1||(isNaN(n)||(d++,l*=n))}}else{if(c=this.parent.getValueFromArg(s[i]),this.parent.getErrorStrings().indexOf(c)>-1)return c;var u=c.split(this.parent.tic).join("");if(c.indexOf('"')>-1&&isNaN(this.parent.parseFloat(u)))return this.parent.getErrorStrings()[r.i.value];if(s[i]=s[i].startsWith("n")?s[i].slice(1):s[i],""===c&&""===s[i])return this.parent.getErrorStrings()[r.i.num];if(("TRUE"===u||"FALSE"===u)&&this.parent.isCellReference(s[i]))continue;if(c.length>0){if(c=c.indexOf('"')>-1?u:c,c="TRUE"===c.split(this.parent.tic).join("")?"1":"FALSE"===c.split(this.parent.tic).join("")?"0":c,!this.parent.isCellReference(s[i])&&isNaN(this.parent.parseFloat(c)))return this.parent.getErrorStrings()[r.i.value];if((n=this.parent.parseFloat(c))<=0)return this.parent.getErrorStrings()[r.i.num];isNaN(n)||(d++,l*=n)}}return d>0&&(l=Math.pow(l,1/d)),l.toString()},e.prototype.ComputeRSQ=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=0,a=e;if(2!==a.length)return this.parent.formulaErrorStrings[r.j.wrong_number_arguments];if(""===a[0]||""===a[1])return this.parent.getErrorStrings()[r.i.value];if(a[0].includes('"')||a[1].includes('"'))return this.parent.getErrorStrings()[r.i.na];if(-1===a[0].indexOf(":")&&n.i(s._161)(a[0])&&-1===a[1].indexOf(":")&&n.i(s._161)(a[1]))return this.parent.getErrorStrings()[r.i.divzero];var o=this.parent.getCellCollection(a[0]),l=this.parent.getCellCollection(a[1]);if(o.length!==l.length)return this.parent.getErrorStrings()[r.i.na];for(var d=this.getDataCollection(l),c=0;c<d.length;c++)if(this.parent.getErrorStrings().indexOf(d[c])>-1)return d[c];for(var h=this.getDataCollection(o),p=0;p<h.length;p++)if(this.parent.getErrorStrings().indexOf(h[p])>-1)return h[p];for(var u,f,g=0;g<d.length;g++)u=Number(d[g]),f=Number(h[g]),n.i(s._190)(u)&&n.i(s._190)(f)&&i++;if(i<=1)return this.parent.getErrorStrings()[r.i.divzero];if(2===i)return 1;var m=this.getMeanArray(d,h),v=m[0],y=m[1],C=this.getCorrelation(d,h,v,y);return Math.pow(C,2)},e.prototype.getCorrelation=function(e,t,r,i){for(var a,o,l=0,d=0,c=0,h=0;h<e.length;h++)n.i(s._190)(e[h])&&n.i(s._190)(t[h])&&(o=Number(e[h])-r,a=Number(t[h])-i,l+=o*a,d+=Math.pow(o,2),c+=Math.pow(a,2));return l/Math.sqrt(d*c)},e.prototype.getMeanArray=function(e,t){for(var r=0,i=0,a=0,o=0,l=0,d=0;d<e.length;d++)n.i(s._190)(e[d])&&n.i(s._190)(t[d])&&(i+=Number(e[d]),a+=Number(t[d]),r++);return o=i/r,l=a/r,[o,l]},e.prototype.getDataCollection=function(e){for(var t=[],n=0,r=e.length;n<r;n++)t.push(this.parent.getValueFromArg(e[n]));return t},e.prototype.parseDouble=function(e){var t=this.parent.parseFloat(e.toString());return isNaN(t)?NaN:t},e.prototype.spreadsheetDisplayText=function(e){if(this.parent.parentObject&&this.parent.parentObject.element&&this.parent.parentObject.element.classList.contains("e-spreadsheet")&&this.parent.isCellReference(e)){var t=this.parent.parentObject.getIndexes(e);e=this.parent.parentObject.getDisplayText(this.parent.parentObject.getActiveSheet().rows[t.startIdx].cells[t.endIdx])}return e},e.prototype.spreadsheetFormat=function(e){if(this.parent.parentObject&&this.parent.parentObject.element&&this.parent.parentObject.element.classList.contains("e-spreadsheet")&&this.parent.isCellReference(e)){var t=this.parent.parentObject.getIndexes(e);e=this.parent.parentObject.getActiveSheet().rows[t.startIdx].cells[t.endIdx].format}return e},e.prototype.getModuleName=function(){return"basic-formulas"},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n.d(t,"Workbook",function(){return r.a}),n.d(t,"Range",function(){return r.b}),n.d(t,"UsedRange",function(){return r.c}),n.d(t,"Sheet",function(){return r.d}),n.d(t,"getSheetIndex",function(){return r.e}),n.d(t,"getSheetIndexFromId",function(){return r.f}),n.d(t,"getSheetNameFromAddress",function(){return r.g}),n.d(t,"getSheetIndexByName",function(){return r.h}),n.d(t,"updateSelectedRange",function(){return r.i}),n.d(t,"getSelectedRange",function(){return r.j}),n.d(t,"getSingleSelectedRange",function(){return r.k}),n.d(t,"getSheet",function(){return r.l}),n.d(t,"getSheetNameCount",function(){return r.m}),n.d(t,"getMaxSheetId",function(){return r.n}),n.d(t,"initSheet",function(){return r.o}),n.d(t,"getSheetName",function(){return r.p}),n.d(t,"moveSheet",function(){return r.q}),n.d(t,"duplicateSheet",function(){return r.r}),n.d(t,"Row",function(){return r.s}),n.d(t,"getRow",function(){return r.t}),n.d(t,"setRow",function(){return r.u}),n.d(t,"isHiddenRow",function(){return r.v}),n.d(t,"isFilterHidden",function(){return r.w}),n.d(t,"getRowHeight",function(){return r.x}),n.d(t,"setRowHeight",function(){return r.y}),n.d(t,"getRowsHeight",function(){return r.z}),n.d(t,"Column",function(){return r.A}),n.d(t,"getColumn",function(){return r.B}),n.d(t,"setColumn",function(){return r.C}),n.d(t,"getColumnWidth",function(){return r.D}),n.d(t,"getColumnsWidth",function(){return r.E}),n.d(t,"isHiddenCol",function(){return r.F}),n.d(t,"checkColumnValidation",function(){return r.G}),n.d(t,"Cell",function(){return r.H}),n.d(t,"getCell",function(){return r.I}),n.d(t,"setCell",function(){return r.J}),n.d(t,"skipDefaultValue",function(){return r.K}),n.d(t,"wrap",function(){return r.L}),n.d(t,"getColorCode",function(){return r.M}),n.d(t,"getCustomColors",function(){return r.N}),n.d(t,"isCustomDateTime",function(){return r.O}),n.d(t,"getData",function(){return r.P}),n.d(t,"getValueFromFormat",function(){return r.Q}),n.d(t,"getModel",function(){return r.R}),n.d(t,"processIdx",function(){return r.S}),n.d(t,"getRangeIndexes",function(){return r.T}),n.d(t,"getCellIndexes",function(){return r.U}),n.d(t,"getColIndex",function(){return r.V}),n.d(t,"getCellAddress",function(){return r.W}),n.d(t,"getRangeAddress",function(){return r.X}),n.d(t,"getColumnHeaderText",function(){return r.Y}),n.d(t,"getIndexesFromAddress",function(){return r.Z}),n.d(t,"getRangeFromAddress",function(){return r._0}),n.d(t,"getAddressFromSelectedRange",function(){return r._1}),n.d(t,"getAddressInfo",function(){return r._2}),n.d(t,"getSheetIndexFromAddress",function(){return r._3}),n.d(t,"getSwapRange",function(){return r._4}),n.d(t,"isSingleCell",function(){return r._5}),n.d(t,"executeTaskAsync",function(){return r._6}),n.d(t,"getWorkbookRequiredModules",function(){return r._7}),n.d(t,"CellStyle",function(){return r._8}),n.d(t,"FilterCollection",function(){return r._9}),n.d(t,"SortCollection",function(){return r._10}),n.d(t,"DefineName",function(){return r._11}),n.d(t,"ProtectSettings",function(){return r._12}),n.d(t,"Hyperlink",function(){return r._13}),n.d(t,"Validation",function(){return r._14}),n.d(t,"Format",function(){return r._15}),n.d(t,"ConditionalFormat",function(){return r._16}),n.d(t,"LegendSettings",function(){return r._17}),n.d(t,"DataLabelSettings",function(){return r._18}),n.d(t,"Border",function(){return r._19}),n.d(t,"MarkerSettings",function(){return r._20}),n.d(t,"MajorGridLines",function(){return r._21}),n.d(t,"MinorGridLines",function(){return r._22}),n.d(t,"Axis",function(){return r._23}),n.d(t,"Chart",function(){return r._24}),n.d(t,"Image",function(){return r._25}),n.d(t,"AutoFillSettings",function(){return r._26}),n.d(t,"workbookDestroyed",function(){return r._27}),n.d(t,"updateSheetFromDataSource",function(){return r._28}),n.d(t,"dataSourceChanged",function(){return r._29}),n.d(t,"dataChanged",function(){return r._30}),n.d(t,"triggerDataChange",function(){return r._31}),n.d(t,"workbookOpen",function(){return r._32}),n.d(t,"beginSave",function(){return r._33}),n.d(t,"beginAction",function(){return r._34}),n.d(t,"sortImport",function(){return r._35}),n.d(t,"findToolDlg",function(){return r._36}),n.d(t,"exportDialog",function(){return r._37}),n.d(t,"setFilteredCollection",function(){return r._38}),n.d(t,"saveCompleted",function(){return r._39}),n.d(t,"applyNumberFormatting",function(){return r._40}),n.d(t,"getFormattedCellObject",function(){return r._41}),n.d(t,"refreshCellElement",function(){return r._42}),n.d(t,"setCellFormat",function(){return r._43}),n.d(t,"findAllValues",function(){return r._44}),n.d(t,"textDecorationUpdate",function(){return r._45}),n.d(t,"applyCellFormat",function(){return r._46}),n.d(t,"updateUsedRange",function(){return r._47}),n.d(t,"updateRowColCount",function(){return r._48}),n.d(t,"workbookFormulaOperation",function(){return r._49}),n.d(t,"workbookEditOperation",function(){return r._50}),n.d(t,"checkDateFormat",function(){return r._51}),n.d(t,"checkNumberFormat",function(){return r._52}),n.d(t,"parseDecimalNumber",function(){return r._53}),n.d(t,"getFormattedBarText",function(){return r._54}),n.d(t,"activeCellChanged",function(){return r._55}),n.d(t,"openSuccess",function(){return r._56}),n.d(t,"openFailure",function(){return r._57}),n.d(t,"sheetCreated",function(){return r._58}),n.d(t,"sheetsDestroyed",function(){return r._59}),n.d(t,"aggregateComputation",function(){return r._60}),n.d(t,"getUniqueRange",function(){return r._61}),n.d(t,"removeUniquecol",function(){return r._62}),n.d(t,"checkUniqueRange",function(){return r._63}),n.d(t,"reApplyFormula",function(){return r._64}),n.d(t,"clearFormulaDependentCells",function(){return r._65}),n.d(t,"formulaInValidation",function(){return r._66}),n.d(t,"beforeSort",function(){return r._67}),n.d(t,"initiateSort",function(){return r._68}),n.d(t,"updateSortedDataOnCell",function(){return r._69}),n.d(t,"sortComplete",function(){return r._70}),n.d(t,"sortRangeAlert",function(){return r._71}),n.d(t,"initiatelink",function(){return r._72}),n.d(t,"beforeHyperlinkCreate",function(){return r._73}),n.d(t,"afterHyperlinkCreate",function(){return r._74}),n.d(t,"beforeHyperlinkClick",function(){return r._75}),n.d(t,"afterHyperlinkClick",function(){return r._76}),n.d(t,"addHyperlink",function(){return r._77}),n.d(t,"setLinkModel",function(){return r._78}),n.d(t,"beforeFilter",function(){return r._79}),n.d(t,"initiateFilter",function(){return r._80}),n.d(t,"filterComplete",function(){return r._81}),n.d(t,"filterRangeAlert",function(){return r._82}),n.d(t,"clearAllFilter",function(){return r._83}),n.d(t,"wrapEvent",function(){return r._84}),n.d(t,"onSave",function(){return r._85}),n.d(t,"insert",function(){return r._86}),n.d(t,"deleteAction",function(){return r._87}),n.d(t,"insertModel",function(){return r._88}),n.d(t,"deleteModel",function(){return r._89}),n.d(t,"isValidation",function(){return r._90}),n.d(t,"cellValidation",function(){return r._91}),n.d(t,"addHighlight",function(){return r._92}),n.d(t,"dataValidate",function(){return r._93}),n.d(t,"find",function(){return r._94}),n.d(t,"goto",function(){return r._95}),n.d(t,"findWorkbookHandler",function(){return r._96}),n.d(t,"replace",function(){return r._97}),n.d(t,"replaceAll",function(){return r._98}),n.d(t,"showFindAlert",function(){return r._99}),n.d(t,"findKeyUp",function(){return r._100}),n.d(t,"removeHighlight",function(){return r._101}),n.d(t,"queryCellInfo",function(){return r._102}),n.d(t,"count",function(){return r._103}),n.d(t,"findCount",function(){return r._104}),n.d(t,"protectSheetWorkBook",function(){return r._105}),n.d(t,"updateToggle",function(){return r._106}),n.d(t,"protectsheetHandler",function(){return r._107}),n.d(t,"replaceAllDialog",function(){return r._108}),n.d(t,"unprotectsheetHandler",function(){return r._109}),n.d(t,"workBookeditAlert",function(){return r._110}),n.d(t,"setLockCells",function(){return r._111}),n.d(t,"applyLockCells",function(){return r._112}),n.d(t,"setMerge",function(){return r._113}),n.d(t,"applyMerge",function(){return r._114}),n.d(t,"mergedRange",function(){return r._115}),n.d(t,"activeCellMergedRange",function(){return r._116}),n.d(t,"insertMerge",function(){return r._117}),n.d(t,"hideShow",function(){return r._118}),n.d(t,"setCFRule",function(){return r._119}),n.d(t,"applyCF",function(){return r._120}),n.d(t,"clearCFRule",function(){return r._121}),n.d(t,"clear",function(){return r._122}),n.d(t,"clearCF",function(){return r._123}),n.d(t,"setImage",function(){return r._124}),n.d(t,"setChart",function(){return r._125}),n.d(t,"initiateChart",function(){return r._126}),n.d(t,"refreshRibbonIcons",function(){return r._127}),n.d(t,"refreshChart",function(){return r._128}),n.d(t,"refreshChartSize",function(){return r._129}),n.d(t,"updateChart",function(){return r._130}),n.d(t,"deleteChartColl",function(){return r._131}),n.d(t,"initiateChartModel",function(){return r._132}),n.d(t,"focusChartBorder",function(){return r._133}),n.d(t,"saveError",function(){return r._134}),n.d(t,"validationHighlight",function(){return r._135}),n.d(t,"beforeInsert",function(){return r._136}),n.d(t,"beforeDelete",function(){return r._137}),n.d(t,"deleteHyperlink",function(){return r._138}),n.d(t,"moveOrDuplicateSheet",function(){return r._139}),n.d(t,"setAutoFill",function(){return r._140}),n.d(t,"refreshCell",function(){return r._141}),n.d(t,"getFillInfo",function(){return r._142}),n.d(t,"getautofillDDB",function(){return r._143}),n.d(t,"rowFillHandler",function(){return r._144}),n.d(t,"getTextSpace",function(){return r._145}),n.d(t,"refreshClipboard",function(){return r._146}),n.d(t,"updateView",function(){return r._147});n.d(t,"selectionComplete",function(){return r._148}),n.d(t,"refreshInsertDelete",function(){return r._149}),n.d(t,"getUpdatedFormulaOnInsertDelete",function(){return r._150}),n.d(t,"beforeCellUpdate",function(){return r._151}),n.d(t,"duplicateSheetFilterHandler",function(){return r._152}),n.d(t,"unMerge",function(){return r._153}),n.d(t,"addFormatToCustomFormatDlg",function(){return r._154}),n.d(t,"checkFormulaRef",function(){return r._155}),n.d(t,"parseFormulaArgument",function(){return r._156}),n.d(t,"getChartRowIdxFromClientY",function(){return r._157}),n.d(t,"getChartColIdxFromClientX",function(){return r._158}),n.d(t,"refreshChartCellOnInit",function(){return r._159}),n.d(t,"checkIsFormula",function(){return r._160}),n.d(t,"isCellReference",function(){return r._161}),n.d(t,"isChar",function(){return r._162}),n.d(t,"isRowSelected",function(){return r._163}),n.d(t,"isColumnSelected",function(){return r._164}),n.d(t,"inRange",function(){return r._165}),n.d(t,"isInMultipleRange",function(){return r._166}),n.d(t,"isInRange",function(){return r._167}),n.d(t,"getSplittedAddressForColumn",function(){return r._168}),n.d(t,"isLocked",function(){return r._169}),n.d(t,"isValidCellReference",function(){return r._170}),n.d(t,"columnIndex",function(){return r._171}),n.d(t,"skipHiddenIdx",function(){return r._172}),n.d(t,"isHeightCheckNeeded",function(){return r._173}),n.d(t,"getUpdatedFormula",function(){return r._174}),n.d(t,"updateCell",function(){return r._175}),n.d(t,"getDataRange",function(){return r._176}),n.d(t,"insertFormatRange",function(){return r._177}),n.d(t,"deleteFormatRange",function(){return r._178}),n.d(t,"updateCFModel",function(){return r._179}),n.d(t,"checkRange",function(){return r._180}),n.d(t,"parseLocaleNumber",function(){return r._181}),n.d(t,"getViewportIndexes",function(){return r._182}),n.d(t,"setVisibleMergeIndex",function(){return r._183}),n.d(t,"getAutoDetectFormatParser",function(){return r._184}),n.d(t,"toFraction",function(){return r._185}),n.d(t,"getGcd",function(){return r._186}),n.d(t,"intToDate",function(){return r._187}),n.d(t,"dateToInt",function(){return r._188}),n.d(t,"isDateTime",function(){return r._189}),n.d(t,"isNumber",function(){return r._190}),n.d(t,"toDate",function(){return r._191}),n.d(t,"parseIntValue",function(){return r._192}),n.d(t,"workbookLocale",function(){return r._193}),n.d(t,"localeData",function(){return r._194}),n.d(t,"currencyFormat",function(){return r._195}),n.d(t,"DataBind",function(){return r._196}),n.d(t,"WorkbookOpen",function(){return r._197}),n.d(t,"WorkbookSave",function(){return r._198}),n.d(t,"WorkbookFormula",function(){return r._199}),n.d(t,"WorkbookNumberFormat",function(){return r._200}),n.d(t,"getFormatFromType",function(){return r._201}),n.d(t,"getTypeFromFormat",function(){return r._202}),n.d(t,"WorkbookSort",function(){return r._203}),n.d(t,"WorkbookFilter",function(){return r._204}),n.d(t,"WorkbookImage",function(){return r._205}),n.d(t,"WorkbookChart",function(){return r._206}),n.d(t,"WorkbookCellFormat",function(){return r._207}),n.d(t,"WorkbookEdit",function(){return r._208}),n.d(t,"WorkbookHyperlink",function(){return r._209}),n.d(t,"WorkbookInsert",function(){return r._210}),n.d(t,"WorkbookDelete",function(){return r._211}),n.d(t,"WorkbookDataValidation",function(){return r._212}),n.d(t,"WorkbookFindAndReplace",function(){return r._213}),n.d(t,"WorkbookProtectSheet",function(){return r._214}),n.d(t,"WorkbookMerge",function(){return r._215}),n.d(t,"WorkbookConditionalFormat",function(){return r._216}),n.d(t,"WorkbookAutoFill",function(){return r._217});var i=n(5);n.d(t,"getRequiredModules",function(){return i.a}),n.d(t,"ribbon",function(){return i.b}),n.d(t,"formulaBar",function(){return i.c}),n.d(t,"sheetTabs",function(){return i.d}),n.d(t,"refreshSheetTabs",function(){return i.e}),n.d(t,"isFormulaBarEdit",function(){return i.f}),n.d(t,"contentLoaded",function(){return i.g}),n.d(t,"mouseDown",function(){return i.h}),n.d(t,"spreadsheetDestroyed",function(){return i.i}),n.d(t,"editOperation",function(){return i.j}),n.d(t,"formulaOperation",function(){return i.k}),n.d(t,"formulaBarOperation",function(){return i.l}),n.d(t,"click",function(){return i.m}),n.d(t,"keyUp",function(){return i.n}),n.d(t,"keyDown",function(){return i.o}),n.d(t,"formulaKeyUp",function(){return i.p}),n.d(t,"formulaBarUpdate",function(){return i.q}),n.d(t,"onVerticalScroll",function(){return i.r}),n.d(t,"onHorizontalScroll",function(){return i.s}),n.d(t,"beforeContentLoaded",function(){return i.t}),n.d(t,"beforeVirtualContentLoaded",function(){return i.u}),n.d(t,"virtualContentLoaded",function(){return i.v}),n.d(t,"contextMenuOpen",function(){return i.w}),n.d(t,"cellNavigate",function(){return i.x}),n.d(t,"mouseUpAfterSelection",function(){return i.y}),n.d(t,"cMenuBeforeOpen",function(){return i.z}),n.d(t,"insertSheetTab",function(){return i.A}),n.d(t,"removeSheetTab",function(){return i.B}),n.d(t,"renameSheetTab",function(){return i.C}),n.d(t,"ribbonClick",function(){return i.D}),n.d(t,"refreshRibbon",function(){return i.E}),n.d(t,"enableToolbarItems",function(){return i.F}),n.d(t,"tabSwitch",function(){return i.G}),n.d(t,"selectRange",function(){return i.H}),n.d(t,"rangeSelectionByKeydown",function(){return i.I}),n.d(t,"cut",function(){return i.J}),n.d(t,"copy",function(){return i.K}),n.d(t,"paste",function(){return i.L}),n.d(t,"clearCopy",function(){return i.M}),n.d(t,"dataBound",function(){return i.N}),n.d(t,"beforeDataBound",function(){return i.O}),n.d(t,"addContextMenuItems",function(){return i.P}),n.d(t,"removeContextMenuItems",function(){return i.Q}),n.d(t,"enableContextMenuItems",function(){return i.R}),n.d(t,"enableFileMenuItems",function(){return i.S}),n.d(t,"hideFileMenuItems",function(){return i.T}),n.d(t,"addFileMenuItems",function(){return i.U}),n.d(t,"hideRibbonTabs",function(){return i.V}),n.d(t,"enableRibbonTabs",function(){return i.W}),n.d(t,"addRibbonTabs",function(){return i.X}),n.d(t,"addToolbarItems",function(){return i.Y}),n.d(t,"hideToolbarItems",function(){return i.Z}),n.d(t,"beforeRibbonCreate",function(){return i._0}),n.d(t,"rowHeightChanged",function(){return i._1}),n.d(t,"colWidthChanged",function(){return i._2}),n.d(t,"onContentScroll",function(){return i._3}),n.d(t,"deInitProperties",function(){return i._4}),n.d(t,"activeSheetChanged",function(){return i._5}),n.d(t,"initiateCustomSort",function(){return i._6}),n.d(t,"applySort",function(){return i._7}),n.d(t,"collaborativeUpdate",function(){return i._8}),n.d(t,"autoFit",function(){return i._9}),n.d(t,"updateToggleItem",function(){return i._10}),n.d(t,"initiateHyperlink",function(){return i._11}),n.d(t,"editHyperlink",function(){return i._12}),n.d(t,"openHyperlink",function(){return i._13}),n.d(t,"removeHyperlink",function(){return i._14}),n.d(t,"createHyperlinkElement",function(){return i._15}),n.d(t,"sheetNameUpdate",function(){return i._16}),n.d(t,"hideSheet",function(){return i._17}),n.d(t,"performUndoRedo",function(){return i._18}),n.d(t,"updateUndoRedoCollection",function(){return i._19}),n.d(t,"setActionData",function(){return i._20}),n.d(t,"getBeforeActionData",function(){return i._21}),n.d(t,"clearUndoRedoCollection",function(){return i._22}),n.d(t,"initiateFilterUI",function(){return i._23}),n.d(t,"renderFilterCell",function(){return i._24}),n.d(t,"refreshFilterRange",function(){return i._25}),n.d(t,"updateSortCollection",function(){return i._26}),n.d(t,"reapplyFilter",function(){return i._27}),n.d(t,"filterByCellValue",function(){return i._28}),n.d(t,"clearFilter",function(){return i._29}),n.d(t,"getFilteredColumn",function(){return i._30}),n.d(t,"completeAction",function(){return i._31}),n.d(t,"filterCellKeyDown",function(){return i._32}),n.d(t,"getFilterRange",function(){return i._33}),n.d(t,"setAutoFit",function(){return i._34}),n.d(t,"refreshFormulaDatasource",function(){return i._35}),n.d(t,"setScrollEvent",function(){return i._36}),n.d(t,"initiateDataValidation",function(){return i._37}),n.d(t,"validationError",function(){return i._38}),n.d(t,"startEdit",function(){return i._39}),n.d(t,"invalidData",function(){return i._40}),n.d(t,"clearInvalid",function(){return i._41}),n.d(t,"protectSheet",function(){return i._42}),n.d(t,"applyProtect",function(){return i._43}),n.d(t,"unprotectSheet",function(){return i._44}),n.d(t,"protectCellFormat",function(){return i._45}),n.d(t,"gotoDlg",function(){return i._46}),n.d(t,"findDlg",function(){return i._47}),n.d(t,"findHandler",function(){return i._48}),n.d(t,"created",function(){return i._49}),n.d(t,"editAlert",function(){return i._50}),n.d(t,"setUndoRedo",function(){return i._51}),n.d(t,"enableFormulaInput",function(){return i._52}),n.d(t,"protectSelection",function(){return i._53}),n.d(t,"hiddenMerge",function(){return i._54}),n.d(t,"checkPrevMerge",function(){return i._55}),n.d(t,"checkMerge",function(){return i._56}),n.d(t,"removeDataValidation",function(){return i._57}),n.d(t,"showAggregate",function(){return i._58}),n.d(t,"goToSheet",function(){return i._59}),n.d(t,"showSheet",function(){return i._60}),n.d(t,"renderCFDlg",function(){return i._61}),n.d(t,"clearViewer",function(){return i._62}),n.d(t,"initiateFormulaReference",function(){return i._63}),n.d(t,"initiateCur",function(){return i._64}),n.d(t,"clearCellRef",function(){return i._65}),n.d(t,"editValue",function(){return i._66}),n.d(t,"addressHandle",function(){return i._67}),n.d(t,"initiateEdit",function(){return i._68}),n.d(t,"forRefSelRender",function(){return i._69}),n.d(t,"insertImage",function(){return i._70}),n.d(t,"refreshOverlayElem",function(){return i._71}),n.d(t,"refreshImgCellObj",function(){return i._72}),n.d(t,"getRowIdxFromClientY",function(){return i._73}),n.d(t,"getColIdxFromClientX",function(){return i._74}),n.d(t,"createImageElement",function(){return i._75}),n.d(t,"deleteImage",function(){return i._76}),n.d(t,"deleteChart",function(){return i._77}),n.d(t,"refreshChartCellObj",function(){return i._78}),n.d(t,"refreshChartCellModel",function(){return i._79}),n.d(t,"refreshImagePosition",function(){return i._80}),n.d(t,"updateTableWidth",function(){return i._81}),n.d(t,"focusBorder",function(){return i._82}),n.d(t,"clearChartBorder",function(){return i._83}),n.d(t,"insertChart",function(){return i._84}),n.d(t,"chartRangeSelection",function(){return i._85}),n.d(t,"insertDesignChart",function(){return i._86}),n.d(t,"removeDesignChart",function(){return i._87}),n.d(t,"chartDesignTab",function(){return i._88}),n.d(t,"addChartEle",function(){return i._89}),n.d(t,"undoRedoForChartDesign",function(){return i._90}),n.d(t,"protectWorkbook",function(){return i._91}),n.d(t,"unProtectWorkbook",function(){return i._92}),n.d(t,"getPassWord",function(){return i._93}),n.d(t,"setProtectWorkbook",function(){return i._94}),n.d(t,"removeWorkbookProtection",function(){return i._95}),n.d(t,"importProtectWorkbook",function(){return i._96}),n.d(t,"selectionStatus",function(){return i._97}),n.d(t,"freeze",function(){return i._98}),n.d(t,"overlayEleSize",function(){return i._99}),n.d(t,"updateScroll",function(){return i._100}),n.d(t,"positionAutoFillElement",function(){return i._101}),n.d(t,"hideAutoFillOptions",function(){return i._102}),n.d(t,"performAutoFill",function(){return i._103}),n.d(t,"selectAutoFillRange",function(){return i._104}),n.d(t,"autoFill",function(){return i._105}),n.d(t,"hideAutoFillElement",function(){return i._106}),n.d(t,"unProtectSheetPassword",function(){return i._107}),n.d(t,"updateTranslate",function(){return i._108}),n.d(t,"getUpdatedScrollPosition",function(){return i._109}),n.d(t,"updateScrollValue",function(){return i._110}),n.d(t,"beforeCheckboxRender",function(){return i._111}),n.d(t,"refreshCheckbox",function(){return i._112}),n.d(t,"renderInsertDlg",function(){return i._113}),n.d(t,"toggleProtect",function(){return i._114}),n.d(t,"getUpdateUsingRaf",function(){return i._115}),n.d(t,"removeAllChildren",function(){return i._116}),n.d(t,"getColGroupWidth",function(){return i._117}),n.d(t,"getScrollBarWidth",function(){return i._118}),n.d(t,"getSiblingsHeight",function(){return i._119}),n.d(t,"inView",function(){return i._120}),n.d(t,"getCellPosition",function(){return i._121}),n.d(t,"setPosition",function(){return i._122}),n.d(t,"removeRangeEle",function(){return i._123}),n.d(t,"locateElem",function(){return i._124}),n.d(t,"setStyleAttribute",function(){return i._125}),n.d(t,"getStartEvent",function(){return i._126}),n.d(t,"getMoveEvent",function(){return i._127}),n.d(t,"getEndEvent",function(){return i._128}),n.d(t,"isTouchStart",function(){return i._129}),n.d(t,"isTouchMove",function(){return i._130}),n.d(t,"isTouchEnd",function(){return i._131}),n.d(t,"isMouseDown",function(){return i._132}),n.d(t,"isMouseMove",function(){return i._133}),n.d(t,"isMouseUp",function(){return i._134}),n.d(t,"isNavigationKey",function(){return i._135}),n.d(t,"getClientX",function(){return i._136}),n.d(t,"getClientY",function(){return i._137}),n.d(t,"getPageX",function(){return i._138}),n.d(t,"getPageY",function(){return i._139}),n.d(t,"getDPRValue",function(){return i._140}),n.d(t,"setAriaOptions",function(){return i._141}),n.d(t,"destroyComponent",function(){return i._142}),n.d(t,"setResize",function(){return i._143}),n.d(t,"setWidthAndHeight",function(){return i._144}),n.d(t,"setTextLineHeight",function(){return i._145}),n.d(t,"findMaxValue",function(){return i._146}),n.d(t,"updateAction",function(){return i._147});n.d(t,"hasTemplate",function(){return i._148}),n.d(t,"setRowEleHeight",function(){return i._149}),n.d(t,"getTextHeight",function(){return i._150}),n.d(t,"getLineHeight",function(){return i._151}),n.d(t,"getTextWidth",function(){return i._152}),n.d(t,"getLines",function(){return i._153}),n.d(t,"getBorderHeight",function(){return i._154}),n.d(t,"getExcludedColumnWidth",function(){return i._155}),n.d(t,"getTextHeightWithBorder",function(){return i._156}),n.d(t,"setMaxHgt",function(){return i._157}),n.d(t,"getMaxHgt",function(){return i._158}),n.d(t,"focus",function(){return i._159}),n.d(t,"isLockedCells",function(){return i._160}),n.d(t,"isDiscontinuousRange",function(){return i._161}),n.d(t,"clearRange",function(){return i._162}),n.d(t,"isImported",function(){return i._163}),n.d(t,"getBottomOffset",function(){return i._164}),n.d(t,"getRightIdx",function(){return i._165}),n.d(t,"setColMinWidth",function(){return i._166}),n.d(t,"addDPRValue",function(){return i._167}),n.d(t,"getSheetProperties",function(){return i._168}),n.d(t,"getChartsIndexes",function(){return i._169}),n.d(t,"ScrollSettings",function(){return i._170}),n.d(t,"SelectionSettings",function(){return i._171}),n.d(t,"DISABLED",function(){return i._172}),n.d(t,"WRAPTEXT",function(){return i._173}),n.d(t,"locale",function(){return i._174}),n.d(t,"dialog",function(){return i._175}),n.d(t,"actionEvents",function(){return i._176}),n.d(t,"overlay",function(){return i._177}),n.d(t,"fontColor",function(){return i._178}),n.d(t,"fillColor",function(){return i._179}),n.d(t,"keyCodes",function(){return i._180}),n.d(t,"defaultLocale",function(){return i._181}),n.d(t,"Spreadsheet",function(){return i._182}),n.d(t,"Clipboard",function(){return i._183}),n.d(t,"Edit",function(){return i._184}),n.d(t,"Selection",function(){return i._185}),n.d(t,"Scroll",function(){return i._186}),n.d(t,"VirtualScroll",function(){return i._187}),n.d(t,"KeyboardNavigation",function(){return i._188}),n.d(t,"KeyboardShortcut",function(){return i._189}),n.d(t,"CellFormat",function(){return i._190}),n.d(t,"Resize",function(){return i._191}),n.d(t,"ShowHide",function(){return i._192}),n.d(t,"SpreadsheetHyperlink",function(){return i._193}),n.d(t,"UndoRedo",function(){return i._194}),n.d(t,"WrapText",function(){return i._195}),n.d(t,"Insert",function(){return i._196}),n.d(t,"Delete",function(){return i._197}),n.d(t,"DataValidation",function(){return i._198}),n.d(t,"ProtectSheet",function(){return i._199}),n.d(t,"FindAndReplace",function(){return i._200}),n.d(t,"Merge",function(){return i._201}),n.d(t,"ConditionalFormatting",function(){return i._202}),n.d(t,"AutoFill",function(){return i._203}),n.d(t,"Ribbon",function(){return i._204}),n.d(t,"FormulaBar",function(){return i._205}),n.d(t,"Formula",function(){return i._206}),n.d(t,"SheetTabs",function(){return i._207}),n.d(t,"Open",function(){return i._208}),n.d(t,"Save",function(){return i._209}),n.d(t,"ContextMenu",function(){return i._210}),n.d(t,"NumberFormat",function(){return i._211}),n.d(t,"Sort",function(){return i._212}),n.d(t,"Filter",function(){return i._213}),n.d(t,"SpreadsheetImage",function(){return i._214}),n.d(t,"SpreadsheetChart",function(){return i._215}),n.d(t,"Render",function(){return i._216}),n.d(t,"SheetRender",function(){return i._217}),n.d(t,"RowRenderer",function(){return i._218}),n.d(t,"CellRenderer",function(){return i._219});var a=n(31);n.d(t,"Calculate",function(){return a.a}),n.d(t,"FormulaError",function(){return a.b}),n.d(t,"FormulaInfo",function(){return a.c}),n.d(t,"CalcSheetFamilyItem",function(){return a.d}),n.d(t,"getAlphalabel",function(){return a.e}),n.d(t,"ValueChangedArgs",function(){return a.f}),n.d(t,"Parser",function(){return a.g}),n.d(t,"CalculateCommon",function(){return a.h}),n.d(t,"isUndefined",function(){return a.i}),n.d(t,"getSkeletonVal",function(){return a.j}),n.d(t,"isExternalFileLink",function(){return a.k}),n.d(t,"getModules",function(){return a.l}),n.d(t,"getValue",function(){return a.m}),n.d(t,"setValue",function(){return a.n}),n.d(t,"ModuleLoader",function(){return a.o}),n.d(t,"CommonErrors",function(){return a.p}),n.d(t,"FormulasErrorsStrings",function(){return a.q}),n.d(t,"ExcelFileFormats",function(){return a.r}),n.d(t,"BasicFormulas",function(){return a.s})},function(e,t,n){"use strict";var r=n(50);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(3),i=(n.n(r),n(8)),a=(n.n(i),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},o.apply(this,arguments)},s=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),s([n.i(r.Property)("")],t.prototype,"text",void 0),s([n.i(r.Property)("")],t.prototype,"iconCss",void 0),s([n.i(r.Property)("left")],t.prototype,"iconPosition",void 0),t}(r.ChildProperty),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),s([n.i(r.Complex)({},l)],t.prototype,"header",void 0),s([n.i(r.Collection)([],i.Item)],t.prototype,"content",void 0),s([n.i(r.Property)("")],t.prototype,"cssClass",void 0),s([n.i(r.Property)(!1)],t.prototype,"disabled",void 0),t}(r.ChildProperty),c=function(e){function t(t,n){return e.call(this,t)||this}return a(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.element.id||(this.element.id=n.i(r.getUniqueID)("ribbon")),this.renderRibbon()},t.prototype.destroy=function(){var t=this.element.querySelector(".e-drop-icon");if(t&&t.removeEventListener("click",this.ribbonExpandCollapse.bind(this)),this.menuItems.length){var i=document.getElementById(this.element.id+"_menu");i&&n.i(r.getComponent)(i,"menu").destroy()}this.toolbarObj&&this.toolbarObj.destroy(),this.tabObj&&this.tabObj.destroy(),this.element.innerHTML="",this.toolbarObj=null,this.tabObj=null,e.prototype.destroy.call(this)},t.prototype.getTabItems=function(){var e=this,t=[];return this.menuItems.length&&t.push({header:{text:this.initMenu(this.menuItems)},content:this.toolbarObj.element,cssClass:"e-menu-tab"}),this.items.forEach(function(n){t.push({header:n.header,content:e.toolbarObj.element})}),t},t.prototype.initMenu=function(e){var t=this,a=this.createElement("ul",{id:this.element.id+"_menu"});this.element.appendChild(a);var o=new i.Menu({cssClass:"e-file-menu",items:e,showItemOnClick:!0,beforeOpen:function(n){n.parentItem.text===e[0].text&&(o.showItemOnClick=!1),t.trigger("beforeOpen",n)},select:function(e){t.trigger("fileMenuItemSelect",e)},beforeClose:function(i){if("mouseover"===i.event.type&&!n.i(r.closest)(i.event.target,".e-menu-popup"))return void(i.cancel=!0);t.trigger("beforeClose",i),i.parentItem&&i.parentItem.text!==e[0].text||o.setProperties({showItemOnClick:!0},!0)},beforeItemRender:function(e){t.trigger("beforeFileMenuItemRender",e)},created:function(){o.element.removeAttribute("tabindex");var e=o.element.querySelector(".e-menu-item");e&&e.removeAttribute("tabindex")}});return o.createElement=this.createElement,o.appendTo(a),a.parentElement},t.prototype.renderRibbon=function(){var e,t=this,n=this.createElement("div"),a=this.createElement("div");this.toolbarObj=new i.Toolbar({items:this.items[this.selectedTab].content,clicked:function(e){return t.trigger("clicked",e)}}),this.toolbarObj.createElement=this.createElement,this.toolbarObj.appendTo(a),this.tabObj=new i.Tab({selectedItem:this.getIndex(this.selectedTab),animation:{next:{duration:0},previous:{duration:0}},items:this.getTabItems(),selecting:function(n){if(n.isSwiped)return void(n.cancel=!0);if(e=n.event&&n.event.isShortcut,t.menuItems.length&&0===n.selectingIndex){if(n.cancel=!0,(!n.event||e||"keydown"===n.event.type)&&n.selectingItem){var i=n.selectingItem.querySelector(".e-file-menu .e-menu-item");i&&i.click()}}else{if(n.selectingIndex===t.getIndex(t.selectedTab))return;t.updateToolbar(t.getIndex(n.selectingIndex,!0)),t.toolbarObj.dataBind(),t.element.classList.contains("e-collapsed")&&r.EventHandler.remove(n.selectedItem,"click",t.ribbonExpandCollapse);var a=void 0;t.menuItems.length?(a=o({},n),a.selectingIndex-=1,a.selectedIndex-=1):a=n,t.trigger("selecting",a)}},selected:function(n){n.isInteracted||e||(n.preventFocus=!0),n.selectedIndex!==t.getIndex(t.selectedTab)&&(t.setProperties({selectedTab:t.getIndex(n.selectedIndex,!0)},!0),t.element.classList.contains("e-collapsed")&&(t.element.classList.remove("e-collapsed"),t.trigger("expandCollapse",{element:t.toolbarObj.element,expanded:!0})))},created:function(){t.toolbarObj.refreshOverflow()}}),this.element.appendChild(n),this.tabObj.createElement=this.createElement,this.tabObj.appendTo(n);var s=this.createElement("span",{className:"e-drop-icon e-icons"});s.addEventListener("click",this.ribbonExpandCollapse.bind(this)),this.element.appendChild(s)},t.prototype.ribbonExpandCollapse=function(e){var t,n={element:this.toolbarObj.element,expanded:!0};this.element.classList.contains("e-collapsed")?(t=this.tabObj.element.querySelector(".e-tab-header").getElementsByClassName("e-toolbar-item")[this.tabObj.selectedItem],this.element.classList.remove("e-collapsed"),t.classList.add("e-active"),r.EventHandler.remove(t,"click",this.ribbonExpandCollapse),this.trigger("expandCollapse",n)):(t=this.tabObj.element.querySelector(".e-tab-header .e-toolbar-item.e-active"),this.element.classList.add("e-collapsed"),n.expanded=!1,t.classList.remove("e-active"),r.EventHandler.add(t,"click",this.ribbonExpandCollapse,this),this.trigger("expandCollapse",n))},t.prototype.getIndex=function(e,t){return this.menuItems.length?t?e-1:e+1:e},t.prototype.updateToolbar=function(e){this.toolbarObj.items=this.items[e].content,this.toolbarObj.dataBind()},t.prototype.enableMenuItems=function(e,t,i){void 0===t&&(t=!0),this.menuItems.length&&n.i(r.getComponent)(document.getElementById(this.element.id+"_menu"),"menu").enableItems(e,t,i)},t.prototype.hideMenuItems=function(e,t,i){if(void 0===t&&(t=!0),this.menuItems.length){var a=n.i(r.getComponent)(document.getElementById(this.element.id+"_menu"),"menu");t?a.hideItems(e,i):a.showItems(e,i)}},t.prototype.addMenuItems=function(e,t,i,a){if(void 0===i&&(i=!0),this.menuItems.length){var o=n.i(r.getComponent)(document.getElementById(this.element.id+"_menu"),"menu");i?o.insertAfter(e.reverse(),t,a):o.insertBefore(e,t,a)}},t.prototype.hideTabs=function(e,t){var n=this;void 0===t&&(t=!0);var r,i,a,o;if(t||(o=this.isAllHidden()),e.forEach(function(e){(r=n.getTabIndex(e,-1))>-1&&(t?n.items[r].cssClass.includes(" e-hide")||(n.items[r].cssClass=n.items[r].cssClass+" e-hide",n.tabObj.items[n.getIndex(r)].cssClass=n.items[r].cssClass,void 0===i&&r===n.selectedTab&&(i=!0),a=!0):n.items[r].cssClass.includes(" e-hide")&&(n.items[r].cssClass=n.items[r].cssClass.replace(" e-hide",""),n.tabObj.items[n.getIndex(r)].cssClass=n.items[r].cssClass,void 0===i&&r===n.selectedTab&&(i=!0),a=!0))}),this.setProperties({items:this.items},!0),this.tabObj.items=this.tabObj.items,this.tabObj.dataBind(),t&&(o=this.isAllHidden())&&(i=!1),!t&&o&&(i=!i),a&&o&&(this.element.classList.contains("e-collapsed")?(this.element.classList.remove("e-collapsed"),this.element.querySelector(".e-drop-icon").classList.remove("e-hide")):(this.element.classList.add("e-collapsed"),this.element.querySelector(".e-drop-icon").classList.add("e-hide"))),i)for(var s=0;s<this.items.length;s++)if(!this.items[s].cssClass.includes(" e-hide")){this.tabObj.selectedItem=this.getIndex(s),this.tabObj.dataBind();break}},t.prototype.isAllHidden=function(){for(var e=!0,t=0;t<this.items.length;t++)if(!this.items[t].cssClass.includes(" e-hide")){e=!1;break}return e},t.prototype.enableTabs=function(e,t){var n=this;void 0===t&&(t=!0),e.forEach(function(e){var r=n.getTabIndex(e,-1);r>-1&&(n.items[r].disabled=!t,r=n.getIndex(r),n.tabObj.enableTab(r,t))}),this.setProperties({items:this.items},!0)},t.prototype.addTabs=function(e,t){var n=this,r=this.getTabIndex(t);e.forEach(function(e){e=new d(n.items[0],"items",e,!0),n.items.splice(r,0,e),n.tabObj.addTab([{header:e.header,content:n.toolbarObj.element}],n.getIndex(r)),r++}),this.setProperties({items:this.items},!0),this.setProperties({selectedTab:this.getIndex(this.tabObj.selectedItem,!0)},!0)},t.prototype.getTabIndex=function(e,t){if(void 0===t&&(t=this.items.length),e)for(var n=0;n<this.items.length;n++)if(this.items[n].header.text===e){t=n;break}return t},t.prototype.addToolbarItems=function(e,t,a){var o=this,s=this.getTabIndex(e);n.i(r.isNullOrUndefined)(a)&&(a=this.items[s].content.length),t.forEach(function(e){e=new i.Item(o.items[s].content[0],"content",e,!0),o.items[s].content.splice(a,0,e),a++}),this.setProperties({items:this.items},!0),s===this.selectedTab&&t.length&&this.updateToolbar(s)},t.prototype.enableItems=function(e,t,n){if(void 0===n&&(n=!0),t){var r=this.getTabIndex(e,-1);if(r<0)return;for(var i=0;i<t.length;i++){if("string"==typeof t[i])for(var a=0;a<this.items[r].content.length;a++)if(this.items[r].content[a].id===t[i]){t[i]=a;break}if("string"==typeof t[i]){if(t.length-1>i)continue;return}this.items[r].content[t[i]].disabled=!n,this.setProperties({items:this.items},!0),r===this.selectedTab&&this.toolbarObj.enableItems(t[i],n)}}else this.toolbarObj.disable(!n)},t.prototype.hideToolbarItems=function(e,t,n){var r=this;void 0===n&&(n=!0);for(var i,a,o=0;o<this.items.length;o++)if(this.items[o].header.text===e){i=o,t.forEach(function(e){(a=r.items[i].content[e])&&(n?a.cssClass.includes(" e-hide")||(a.cssClass=a.cssClass+" e-hide"):a.cssClass.includes(" e-hide")&&(a.cssClass=a.cssClass.replace(" e-hide","")))});break}this.setProperties({items:this.items},!0),void 0!==i&&i===this.selectedTab&&this.updateToolbar(i)},t.prototype.getModuleName=function(){return"ribbon"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"selectedTab":this.tabObj.selectedItem=this.getIndex(e.selectedTab),this.tabObj.dataBind()}}},s([n.i(r.Property)("")],t.prototype,"cssClass",void 0),s([n.i(r.Property)(!0)],t.prototype,"menuType",void 0),s([n.i(r.Collection)([],i.MenuItem)],t.prototype,"menuItems",void 0),s([n.i(r.Property)(0)],t.prototype,"selectedTab",void 0),s([n.i(r.Collection)([],d)],t.prototype,"items",void 0),s([n.i(r.Event)()],t.prototype,"selecting",void 0),s([n.i(r.Event)()],t.prototype,"fileMenuItemSelect",void 0),s([n.i(r.Event)()],t.prototype,"beforeFileMenuItemRender",void 0),s([n.i(r.Event)()],t.prototype,"beforeOpen",void 0),s([n.i(r.Event)()],t.prototype,"beforeClose",void 0),s([n.i(r.Event)()],t.prototype,"selectFormat",void 0),s([n.i(r.Event)()],t.prototype,"clicked",void 0),s([n.i(r.Event)()],t.prototype,"created",void 0),s([n.i(r.Event)()],t.prototype,"expandCollapse",void 0),t=s([r.NotifyPropertyChanges],t)}(r.Component)},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(5),i=n(1),a=n(0),o=n(3),s=(n.n(o),n(30)),l=(n.n(s),function(){function e(e){this.fillOptionIndex=0,this.parent=e,this.addEventListener()}return e.prototype.getfillItems=function(){var e=this.parent.serviceLocator.getService(r._174);return[{text:e.getConstant("CopyCells")},{text:e.getConstant("FillSeries")},{text:e.getConstant("FillFormattingOnly")},{text:e.getConstant("FillWithoutFormatting")}]},e.prototype.createAutoFillElement=function(){if(this.parent.allowAutoFill){var e=this.parent.getMainContent(),t=this.parent.createElement("div",{className:"e-autofill"});e.lastElementChild&&e.lastElementChild.classList.contains("e-ss-overlay")?e.insertBefore(t,e.getElementsByClassName("e-ss-overlay")[0]):e.appendChild(t),this.autoFillElement=t,this.getautofillDDB({id:this.parent.element.id+"_autofilloptionbtn",appendElem:e})}},e.prototype.getautofillDDB=function(e){var t=this,n=this.parent.createElement("button",{id:e.id,className:"e-filloption",attrs:{type:"button"}});return n.appendChild(this.parent.createElement("span",{className:"e-tbar-btn-text"})),this.autoFillDropDown=new s.DropDownButton({cssClass:"e-dragfill-ddb",iconCss:"e-icons e-dragfill-icon",items:this.getfillItems(),createPopupOnClick:!0,enableRtl:this.parent.enableRtl,select:function(e){t.autoFillOptionClick({type:t.getFillType(e.item.text)})},beforeOpen:function(){return t.autoFillClick()}}),this.autoFillDropDown.createElement=this.parent.createElement,this.autoFillDropDown.appendTo(n),e.appendElem.appendChild(n),this.autoFillDropDown},e.prototype.getFillType=function(e){var t=this.parent.serviceLocator.getService(r._174);return e===t.getConstant("CopyCells")?"CopyCells":e===t.getConstant("FillSeries")?"FillSeries":e===t.getConstant("FillFormattingOnly")?"FillFormattingOnly":"FillWithoutFormatting"},e.prototype.autoFillClick=function(){var e=this.parent.serviceLocator.getService(r._174),t={fillType:"FillSeries",disableItems:[""]};this.parent.notify(a._142,t),this.autoFillDropDown.setProperties({items:this.getfillItems()},!0),this.autoFillDropDown.removeItems(t.disableItems),this.refreshAutoFillOption(e.getConstant(t.fillType))},e.prototype.getFillRange=function(e,t,n,r){switch(r){case"Up":return[n.rowIndex,e.colIndex,e.rowIndex-1,t.colIndex];case"Right":return[e.rowIndex,t.colIndex+1,t.rowIndex,n.colIndex];case"Down":return[t.rowIndex+1,e.colIndex,n.rowIndex,t.colIndex];case"Left":return[e.rowIndex,n.colIndex,t.rowIndex,e.colIndex-1]}},e.prototype.autoFillOptionClick=function(e){var t=this.parent.serviceLocator.getService(r._174),i=this.parent.getActiveSheet(),o=n.i(a._4)(n.i(a.T)(this.parent.selectionModule.dAutoFillCell)),s=n.i(a.T)(i.selectedRange),l=o[0],d=o[1],c=o[2],h=o[3],p=this.getDirection({rowIndex:c,colIndex:h},{rowIndex:s[2],colIndex:s[3]}),u=[l,d,c,h],f=this.getFillRange({rowIndex:l,colIndex:d},{rowIndex:c,colIndex:h},{rowIndex:s[2],colIndex:s[3]},p);this.refreshAutoFillOption(t.getConstant(e.type));var g={isUndo:!0,isPublic:!0,preventReSelect:!0,preventEvt:"FillWithoutFormatting"===e.type,setCollection:"FillFormattingOnly"===e.type||"FillWithoutFormatting"===e.type};this.parent.notify(r._18,g);var m={dataRange:i.name+"!"+n.i(a.X)(u),fillRange:i.name+"!"+n.i(a.X)(f),direction:p,fillType:e.type,isFillOptClick:!0};this.isVerticalFill="Down"===m.direction||"Up"===m.direction,this.parent.notify(a._140,m),this.positionAutoFillElement({isautofill:!0});var v={dataRange:m.dataRange,fillRange:m.fillRange,fillType:m.fillType,direction:m.direction,selectedRange:i.name+"!"+n.i(a.X)(s),undoArgs:g.undoArgs};this.parent.notify(r._31,{eventArgs:v,action:"autofill"}),this.parent.showAggregate&&this.parent.notify(r._58,{}),this.autoFillClick()},e.prototype.refreshAutoFillOption=function(e){for(var t=0;t<this.autoFillDropDown.items.length;t++)this.autoFillDropDown.items[t].iconCss="";for(var t=0;t<this.autoFillDropDown.items.length;t++)this.autoFillDropDown.items[t].text===e&&(this.autoFillDropDown.items[t].iconCss="e-icons e-selected-icon");["Copy Cells","Fill Series","Fill Formatting Only","Fill Without Formatting"].indexOf(e)<0&&(this.autoFillDropDown.items[this.fillOptionIndex].iconCss=""),this.autoFillDropDown.dataBind()},e.prototype.positionAutoFillElement=function(e){var t,i,s,l=0,d=0,c=this.parent.getActiveSheet(),h=n.i(a._4)(n.i(a.T)(c.selectedRange)),p=-5,u=-5,f=6,g=6,m=0===h[1]&&h[3]===c.colCount-1,v=0===h[0]&&h[2]===c.rowCount-1,y=h[2],C=h[3],b=this.parent.enableRtl,x=this.parent.getCell(y,C);if(n.i(a.F)(c,h[3])||n.i(a.v)(c,h[2])||x&&x.classList.contains("e-formularef-selection")||c.isProtected&&c.protectSettings.selectUnLockedCells&&n.i(r._160)(this.parent,h))return void this.hideAutoFillElement();if(c.isProtected&&(c.protectSettings.selectCells||c.protectSettings.selectUnLockedCells)||!c.isProtected)if(m?(p=-5,u=-1,f=6,g=2,y=h[2],C=h[1]):v&&(u=-5,p=0,f=1,g=6,y=h[0],C=h[3]),c.frozenColumns||c.frozenRows){if(v||m?(n.i(r._122)(this.parent,this.autoFillElement,h,"e-autofill",e&&e.preventAnimation),this.parent.autoFillSettings.showFillOptions&&e&&e.isautofill&&n.i(r._122)(this.parent,this.autoFillDropDown.element,h,"e-filloption")):(n.i(r._122)(this.parent,this.autoFillElement,[y,C,y,C],"e-autofill",e&&e.preventAnimation),this.parent.autoFillSettings.showFillOptions&&e&&e.isautofill&&n.i(r._122)(this.parent,this.autoFillDropDown.element,[y,C,y,C],"e-filloption")),this.autoFillElement){this.autoFillCell={rowIndex:y,colIndex:C};var S=this.parent.element.querySelectorAll(".e-autofill")[0];if(S){var w=S.getBoundingClientRect();this.autoFillElementPosition={left:w.left,top:w.top}}}}else if(s=n.i(r._121)(c,[y,C,y,C],this.parent.frozenRowCount(c),this.parent.frozenColCount(c),this.parent.viewport.beforeFreezeHeight,this.parent.viewport.beforeFreezeWidth,this.parent.sheetModule.colGroupWidth),t=n.i(a.z)(c,y,y,!0),i=n.i(a.E)(c,C,C,!0),v||(l+=t),m||(d+=i),l+=Math.round(s.top)+p,d+=Math.round(s.left)+u,this.autoFillElement){n.i(o.removeClass)([this.autoFillElement],"e-hide"),this.autoFillElement.style.top=l+"px",b?this.autoFillElement.style.right=d+"px":this.autoFillElement.style.left=d+"px",this.autoFillCell={rowIndex:y,colIndex:C};var w=this.autoFillElement.getBoundingClientRect();this.autoFillElementPosition={left:w.left,top:w.top},this.parent.autoFillSettings.showFillOptions&&e&&e.isautofill&&(n.i(o.removeClass)([this.autoFillDropDown.element],"e-hide"),this.autoFillDropDown.element.style.top=l+f+"px",b?this.autoFillDropDown.element.style.right=d+g+"px":this.autoFillDropDown.element.style.left=d+g+"px")}},e.prototype.hideAutoFillElement=function(){var e=this.parent.element;[].slice.call(e.querySelectorAll(".e-autofill")).forEach(function(t){e&&n.i(o.addClass)([t],"e-hide")})},e.prototype.hideAutoFillOptions=function(){var e=this.parent.element;[].slice.call(e.querySelectorAll(".e-filloption")).forEach(function(t){e&&n.i(o.addClass)([t],"e-hide")})},e.prototype.selectAutoFillRange=function(e){var t={clientY:n.i(r._137)(e.e),target:e.e.target},i={clientX:n.i(r._136)(e.e),target:e.e.target},o=this.parent.getActiveSheet();this.parent.notify(r._73,t),this.parent.notify(r._74,i);var s,l=this.getAutoFillRange({rowIndex:t.clientY,colIndex:i.clientX});return s=l&&l.fillRange?[l.startCell.rowIndex,l.startCell.colIndex,l.endCell.rowIndex,l.endCell.colIndex]:n.i(a.T)(o.selectedRange),e.indexes=s,s},e.prototype.getAutoFillRange=function(e){var t=this.parent.getActiveSheet(),r=this.autoFillCell,i=n.i(a._4)(n.i(a.T)(t.selectedRange)),o=i[0],s=i[1],l=i[2],d=i[3],c=n.i(a._167)(i,[e.rowIndex,e.colIndex,e.rowIndex,e.colIndex],!0),h={rowIndex:o,colIndex:s},p={rowIndex:i[0],colIndex:i[1]},u={rowIndex:i[2],colIndex:i[3]},f={rowIndex:l,colIndex:d},g=this.modifyRangeForMerge(e.rowIndex,e.colIndex,r.rowIndex,r.colIndex,i);return e.rowIndex<r.rowIndex?o-e.rowIndex>e.colIndex-d&&o-e.rowIndex>s-e.colIndex?c?{startCell:h,endCell:{rowIndex:e.rowIndex,colIndex:d}}:{startCell:f,endCell:{rowIndex:g.rowIndex,colIndex:s},fillRange:[g.rowIndex,s,o-1,d],direction:"Up"}:e.colIndex>r.colIndex?{startCell:h,endCell:{rowIndex:l,colIndex:e.colIndex},fillRange:[o,d+1,l,e.colIndex],direction:"Right"}:e.colIndex<r.colIndex?c?{startCell:h,endCell:f}:{startCell:f,endCell:{rowIndex:o,colIndex:e.colIndex},fillRange:[o,e.colIndex,l,s-1],direction:"Left"}:{startCell:p,endCell:u}:e.colIndex>r.colIndex?e.rowIndex-l>e.colIndex-d?{startCell:h,endCell:{rowIndex:e.rowIndex,colIndex:d},fillRange:[l+1,s,e.rowIndex,d],direction:"Down"}:{startCell:h,endCell:{rowIndex:l,colIndex:g.colIndex},fillRange:[o,d+1,l,g.colIndex],direction:"Right"}:e.colIndex<r.colIndex?e.rowIndex-l>d-e.colIndex||e.rowIndex-o>d-e.colIndex&&e.rowIndex!==l?{startCell:h,endCell:{rowIndex:e.rowIndex,colIndex:d},fillRange:[l+1,s,e.rowIndex,d],direction:"Down"}:c?{startCell:h,endCell:f}:{startCell:f,endCell:{rowIndex:o,colIndex:g.colIndex},fillRange:[o,g.colIndex,l,s-1],direction:"Left"}:e.rowIndex>r.rowIndex?{startCell:h,endCell:{rowIndex:g.rowIndex,colIndex:d},fillRange:[l+1,s,g.rowIndex,d],direction:"Down"}:(e.rowIndex===r.rowIndex&&(e.colIndex,r.colIndex),{startCell:p,endCell:u})},e.prototype.modifyRangeForMerge=function(e,t,n,r,i){var a={rowIndex:e,colIndex:t};if(this.isMergedRange(i)){var o=i[2]-i[0]+1,s=i[3]-i[1]+1,l=void 0;e<n?(l=(i[2]-e+1)%o)&&e-(o-l)>=0&&(a.rowIndex=e-(o-l)):t>r?(l=(t-i[1]+1)%s)&&(a.colIndex=t+(s-l)):t<r?(l=(i[3]-t+1)%s)&&t-(s-l)>=0&&(a.colIndex=t-(s-l)):e>n&&(l=(e-i[0]+1)%o)&&(a.rowIndex=e+(o-l))}return a},e.prototype.performAutoFill=function(e){if(!e.rangeInfo&&(e.event.clientX>this.autoFillElementPosition.left&&e.event.clientX<this.autoFillElementPosition.left+10)&&(e.event.clientY>this.autoFillElementPosition.top&&e.event.clientY<this.autoFillElementPosition.top+10))this.positionAutoFillElement({isautofill:!1});else{var t=void 0;if(e.rangeInfo)t=e.rangeInfo;else{var o={clientY:n.i(r._137)(e.event),target:e.event.target},s={clientX:n.i(r._136)(e.event),target:e.event.target};this.parent.notify(r._73,o),this.parent.notify(r._74,s),t=this.getAutoFillRange({rowIndex:o.clientY,colIndex:s.clientX})}var l=this.parent.getActiveSheet();if(t&&t.fillRange){var d={dataRange:l.name+"!"+e.dAutoFillCell,fillRange:l.name+"!"+n.i(a.X)(t.fillRange),direction:t.direction,fillType:e.fillType||this.parent.autoFillSettings.fillType,cancel:!1};if(this.parent.notify(a._34,{eventArgs:d,action:"autofill"}),d.cancel)return;var c=n.i(r._160)(this.parent,t.fillRange);if(l.isProtected&&c)return void this.parent.notify(i._50,null);e.rangeInfo?this.performAutoFillAction(d,null,c):(this.performAutoFillAction(d,t,c),this.positionAutoFillElement({isautofill:!0}))}}},e.prototype.refreshCell=function(e){this.parent.serviceLocator.getService("cell").refreshRange([e.rowIndex,e.colIndex,e.rowIndex,e.colIndex])},e.prototype.getDirection=function(e,t,r){if(r=n.i(o.isNullOrUndefined)(r)?this.isVerticalFill:r){if(t.rowIndex<e.rowIndex)return"Up";if(t.rowIndex>e.rowIndex)return"Down";if(t.colIndex>e.colIndex)return"Right";if(t.colIndex<e.colIndex)return"Left"}else{if(t.colIndex>e.colIndex)return"Right";if(t.colIndex<e.colIndex)return"Left";if(t.rowIndex<e.rowIndex)return"Up";if(t.rowIndex>e.rowIndex)return"Down"}return null},e.prototype.performAutoFillAction=function(e,t,i){var o=this,s=this.parent.getActiveSheet(),l=this.parent.serviceLocator.getService(r._174);if(this.isMergedRange(n.i(a.T)(e.fillRange))){var d=this.parent.serviceLocator.getService(r._175);return void d.show({isModal:!0,showCloseIcon:!0,height:180,width:400,content:l.getConstant("AutoFillMergeAlertMsg"),buttons:[{buttonModel:{content:this.parent.serviceLocator.getService(r._174).getConstant("Ok"),isPrimary:!0},click:function(){d.hide(),o.parent.selectRange(e.dataRange)}}],close:function(){d.hide(),o.parent.selectRange(e.dataRange)}},!1)}this.isVerticalFill="Down"===e.direction||"Up"===e.direction,this.parent.notify(a._140,{dataRange:e.dataRange,fillRange:e.fillRange,direction:e.direction,fillType:e.fillType,isLockedCell:i});var c=t?n.i(a.X)([t.startCell.rowIndex,t.startCell.colIndex,t.endCell.rowIndex,t.endCell.colIndex]):s.selectedRange;n.i(a.i)(this.parent,c,s);var h={dataRange:e.dataRange,fillRange:e.fillRange,fillType:e.fillType,direction:e.direction,selectedRange:c};this.parent.notify(r._31,{eventArgs:h,action:"autofill"}),this.parent.trigger("select",{range:this.parent.getActiveSheet().selectedRange}),this.parent.showAggregate&&this.parent.notify(r._58,{})},e.prototype.getRangeData=function(e){for(var t,r=[],i=this.parent.getActiveSheet(),o=e.range[0],s=e.range[1],l=e.range[2],d=e.range[3],c=s;o<=l;)if(n.i(a.v)(i,o))o++;else{for(s=c;s<=d;)n.i(a.F)(i,s)?s++:(t=n.i(a.I)(o,s,i),r.push(t),s++);o++}return r},e.prototype.isMergedRange=function(e){var t=0,n=this.getRangeData({range:e,sheetIdx:this.parent.activeSheetIndex});for(t=0;t<n.length;t++)if(n[t]&&(n[t].rowSpan||n[t].colSpan))return!0;return!1},e.prototype.addEventListener=function(){this.parent.on(r.g,this.createAutoFillElement,this),this.parent.on(r._101,this.positionAutoFillElement,this),this.parent.on(r._102,this.hideAutoFillOptions,this),this.parent.on(r._106,this.hideAutoFillElement,this),this.parent.on(r._103,this.performAutoFill,this),this.parent.on(r._104,this.selectAutoFillRange,this),this.parent.on(a._141,this.refreshCell,this),this.parent.on(a._143,this.getautofillDDB,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.createAutoFillElement),this.parent.off(r._101,this.positionAutoFillElement),this.parent.off(r._102,this.hideAutoFillOptions),this.parent.off(r._106,this.hideAutoFillElement),this.parent.off(r._103,this.performAutoFill),this.parent.off(r._104,this.selectAutoFillRange),this.parent.off(a._141,this.refreshCell),this.parent.off(a._143,this.getautofillDDB))},e.prototype.destroy=function(){this.removeEventListener(),this.autoFillElement&&this.autoFillElement.remove(),this.autoFillElement=null,this.autoFillElementPosition=null,this.autoFillCell=null,this.autoFillDropDown&&this.autoFillDropDown.destroy(),this.autoFillDropDown=null,this.isVerticalFill=null,this.fillOptionIndex=null,this.parent=null},e.prototype.getModuleName=function(){return"autofill"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(5),i=n(1),a=n(0),o=n(3),s=(n.n(o),function(){function e(e){this.checkHeight=!1,this.parent=e,this.addEventListener()}return e.prototype.applyCellFormat=function(e){if(e.checkHeight)return this.checkHeight||(this.checkHeight=!0),void this.updateRowHeight(e.rowIdx,e.colIdx,e.lastCell,e.onActionUpdate,e.outsideViewport);var t=Object.keys(e.style),o=this.parent.getActiveSheet();if(!(e.lastCell&&n.i(i._158)(o,e.rowIdx)<=20)||t.length){var s=e.td||this.parent.getCell(e.rowIdx,e.colIdx);if(s){if(this.updateMergeBorder(e,o),e.formatColor&&s.style.color===e.formatColor&&delete e.style.color,void 0!==e.style.border||void 0!==e.style.borderTop||void 0!==e.style.borderLeft){var l={};Object.keys(e.style).forEach(function(t){l[""+t]=e.style[""+t]}),void 0!==l.border&&(Object.assign(s.style,{borderRight:e.style.border,borderBottom:e.style.border}),this.setLeftBorder(e.style.border,s,e.rowIdx,e.colIdx,e.row,e.onActionUpdate,e.first,o),this.setTopBorder(e.style.border,s,e.rowIdx,e.colIdx,e.pRow,e.pHRow,e.onActionUpdate,e.first,e.lastCell,e.manualUpdate,o),delete l.border),void 0!==l.borderTop&&(this.setTopBorder(e.style.borderTop,s,e.rowIdx,e.colIdx,e.pRow,e.pHRow,e.onActionUpdate,e.first,e.lastCell,e.manualUpdate,o),delete l.borderTop),void 0!==l.borderLeft&&(this.setLeftBorder(e.style.borderLeft,s,e.rowIdx,e.colIdx,e.row,e.onActionUpdate,e.first,o),delete l.borderLeft),Object.keys(l).length&&(void 0!==l.borderBottom&&this.setThickBorderHeight(l.borderBottom,e.rowIdx,e.colIdx,s,e.row,e.hRow,e.onActionUpdate,e.lastCell,e.manualUpdate),Object.assign(s.style,l))}else{void 0!==e.style.borderBottom&&this.setThickBorderHeight(e.style.borderBottom,e.rowIdx,e.colIdx,s,e.row,e.hRow,e.onActionUpdate,e.lastCell,e.manualUpdate),Object.assign(s.style,e.style);var d=n.i(a.I)(e.rowIdx,e.colIdx,o);if(d&&(d.rowSpan||d.colSpan)&&s.offsetHeight>0){var c=n.i(i._150)(this.parent,d.style||this.parent.cellStyle);c>s.offsetHeight&&n.i(i._149)(this.parent,o,s.offsetHeight,e.rowIdx)}}var h=n.i(a.I)(e.rowIdx,e.colIdx,o,null,!0);if(o.rows[e.rowIdx]&&o.rows[e.rowIdx].customHeight){if(!h.wrap&&(e.style.fontSize||e.style.fontFamily)){var p=n.i(a.x)(o,e.rowIdx,!0)-n.i(i._154)(e.rowIdx,e.colIdx,o);p<n.i(i._150)(this.parent,h.style)?s.style.lineHeight=p+"px":s.style.lineHeight&&(s.style.lineHeight="")}}else if(e.isHeightCheckNeeded)if(e.manualUpdate)this.checkHeight||(this.checkHeight=n.i(a._173)(e.style,e.onActionUpdate)),s&&s.children[0]&&"e-cf-databar"===s.children[0].className&&e.style.fontSize&&(s.children[0].querySelector(".e-databar-value").style.fontSize=e.style.fontSize),this.updateRowHeight(e.rowIdx,e.colIdx,e.lastCell,e.onActionUpdate),h.wrap&&(e.style.fontSize||e.style.fontFamily)&&(s.style.lineHeight=parseFloat(h.style&&h.style.fontSize||this.parent.cellStyle.fontSize)*n.i(i._151)(h.style&&h.style.fontFamily?h.style:this.parent.cellStyle)+"pt");else if(!h.wrap&&n.i(a._173)(e.style)&&n.i(i._157)(o,e.rowIdx,e.colIdx,n.i(r._156)(this.parent,e.rowIdx,e.colIdx,o,e.style)),e.lastCell){var c=n.i(i._158)(o,e.rowIdx);c>20&&c>n.i(a.x)(o,e.rowIdx)&&n.i(i._149)(this.parent,o,c,e.rowIdx,e.row,e.hRow,this.parent.scrollSettings.isFinite)}}else this.updateRowHeight(e.rowIdx,e.colIdx,!0,e.onActionUpdate)}},e.prototype.updateRowHeight=function(e,t,o,s,l){if(this.checkHeight){var d=this.parent.getActiveSheet(),c=n.i(a.I)(e,t,d,null,!0);if(!c.rowSpan){var h=0;h=n.i(r._156)(this.parent,e,t,d,c.style||this.parent.cellStyle,c.wrap?n.i(i._153)(this.parent.getDisplayText(c),n.i(i._155)(d,e,t),c.style,this.parent.cellStyle):1);var p=c.value&&c.value.toString();if(p&&p.indexOf("\n")>-1){var u=void 0,f=p.split("\n"),g=0,m=f.length;for(u=0;u<m;u++){var v=n.i(i._153)(f[u],n.i(i._155)(d,e,t),c.style,this.parent.cellStyle);0===v&&(v=1),g+=v}h=n.i(r._156)(this.parent,e,t,d,c.style||this.parent.cellStyle,g)}if(h<20&&(h=20),n.i(i._157)(d,e,t,h),!l){var y=this.parent.getCell(e,t);y&&y.children[0]&&"e-cf-databar"===y.children[0].className&&(y.children[0].style.height="100%",y.children[0].firstElementChild.nextElementSibling.style.height="100%")}if(o){this.checkHeight=!1;var C=n.i(i._158)(d,e),b=n.i(a.x)(d,e);(s?C!==b:C>b)&&(l?(b=n.i(i._140)(b),n.i(a.y)(d,e,C),this.parent.setProperties({sheets:this.parent.sheets},!0),this.parent.notify(i._1,{rowIdx:e,threshold:n.i(i._140)(C)-b})):n.i(i._149)(this.parent,d,C,e,null,null,!0))}}}},e.prototype.updateMergeBorder=function(e,t){var r=n.i(a.I)(e.rowIdx,e.colIdx,t,null,!0),i={range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]};if(this.parent.notify(a._116,i),r.rowSpan>1&&!e.style.borderBottom){var o=n.i(a.I)(i.range[2],i.range[1],t,null,!0);o.style&&o.style.borderBottom&&(e.style.borderBottom=o.style.borderBottom)}if(r.colSpan>1&&!e.style.borderRight){var s=n.i(a.I)(i.range[0],i.range[3],t,null,!0);s.style&&s.style.borderRight&&(e.style.borderRight=s.style.borderRight)}},e.prototype.setLeftBorder=function(e,t,r,i,o,s,l,d){if(!l||!l.includes("Column")){var c=this.parent.enableRtl,h=c?this.parent.getCell(r,i+1,o):this.parent.getCell(r,i-1,o);if(h){var p=n.i(a.I)(r,i-1,d,!1,!0);if(p.rowSpan&&1!==p.rowSpan||p.colSpan&&1!==p.colSpan){var u={range:[r,i-1,r,i-1]};if(this.parent.notify(a._116,u),p=n.i(a.I)(u.range[0],u.range[1],d,!1,!0),p.style&&p.style.borderRight&&"none"!==p.style.borderRight)return;if(p=n.i(a.I)(u.range[0],u.range[3],d,null,!0),p.style&&p.style.borderRight&&"none"!==p.style.borderRight)return;t.style.borderLeft=e}else s&&""!==e&&i===this.parent.viewport.leftIndex&&(this.parent.getMainContent().scrollLeft-=this.getBorderSize(e)),h.style.borderRight="none"===e?h.style.borderRight:e}else t.style.borderLeft=e}},e.prototype.setTopBorder=function(e,t,r,i,o,s,l,d,c,h,p){if(!d||!d.includes("Row")){var u=i,f=n.i(a.I)(r,i,p,!1,!0);f.colSpan>1&&n.i(a.F)(p,i)&&(u=n.i(a._172)(p,i,!0,"columns"))>i+f.colSpan-1&&(u=i);var g=this.parent.getCell(r-1,u,o);if(g)if(f=n.i(a.I)(r-1,i,p,!1,!0),f.rowSpan&&1!==f.rowSpan||f.colSpan&&1!==f.colSpan){var m={range:[r-1,i,r-1,i]};if(this.parent.notify(a._116,m),f=n.i(a.I)(m.range[0],m.range[1],p,!1,!0),f.style&&f.style.borderBottom&&"none"!==f.style.borderBottom)return;if(f=n.i(a.I)(m.range[2],m.range[1],p,null,!0),f.style&&f.style.borderBottom&&"none"!==f.style.borderBottom)return;t.style.borderTop=e}else{if(n.i(a.v)(p,r-1)){var v=[Number(g.parentElement.getAttribute("aria-rowindex"))-1,i];if(this.parent.getCellStyleValue(["bottomPriority"],v).bottomPriority)return}l&&""!==e&&p.topLeftCell.includes(""+(r+1))&&(this.parent.getMainContent().parentElement.scrollTop-=this.getBorderSize(e)),this.setThickBorderHeight(e,r-1,i,g,o,s,l,c,h),g.style.borderBottom="none"===e?g.style.borderBottom:e}else t.style.borderTop=e}},e.prototype.setThickBorderHeight=function(e,t,r,o,s,l,d,c,h){var p=e?this.getBorderSize(e):1,u=this.parent.getActiveSheet();if(p>2&&(!u.rows[t]||!u.rows[t].customHeight))if(h)this.checkHeight||(this.checkHeight=!0),this.updateRowHeight(t,r,c,d);else{var f=n.i(a.x)(u,t),g=Math.ceil(this.parent.calculateHeight(this.parent.getCellStyleValue(["fontFamily","fontSize"],[t,r]),1,3));g>f&&(n.i(i._149)(this.parent,u,g,t,s,l,!1),this.parent.notify(i._1,{rowIdx:t,threshold:g-20}))}!d||!c&&this.checkHeight||!(p<3)||u.rows[t]&&u.rows[t].customHeight||(this.checkHeight||(this.checkHeight=!0),this.updateRowHeight(t,r,c,d))},e.prototype.getBorderSize=function(e){var t=e.split(" ")[0];return"thin"===t?1:"medium"===t?2:"thick"===t?3:parseInt(t,10)?parseInt(t,10):1},e.prototype.clearObj=function(e){var t,r,s,l=this,d=e.options,c=d.range?d.range.indexOf("!")>0?d.range.split("!")[1]:d.range.split("!")[0]:this.parent.getActiveSheet().selectedRange,h=d.range&&d.range.indexOf("!")>0?n.i(a.e)(this.parent,d.range.split("!")[0]):this.parent.activeSheetIndex,p=n.i(a._4)(n.i(a.T)(c)),u=this.parent.sheets[h],f=p[0],g=p[2],m=this.parent.element.getElementsByClassName("e-ss-overlay-active"),v=m.length>0,y={range:c,type:d.type,requestType:"clear",sheetIndex:h},C=function(){e.isAction&&l.parent.notify(a._34,{action:"beforeClear",eventArgs:y})},b=function(){e.isAction&&(y={range:u.name+"!"+c,type:d.type,sheetIndex:h},s&&(y.cfClearActionArgs=s.cfClearActionArgs),l.parent.notify(i._31,{eventArgs:y,action:"clear"}))},x="Clear All"===d.type;if(v)m[0].classList.contains("e-datavisualization-chart")?("Clear Contents"===d.type||x)&&(C(),this.parent.notify(i._77,{id:m[0].id,sheetIdx:this.parent.activeSheetIndex+1}),b()):x&&(C(),this.parent.notify(i._76,{id:m[0].id,sheetIdx:this.parent.activeSheetIndex+1}),b());else{if(C(),"Clear Formats"===d.type||x)for(s={range:c,sheetIdx:h,isClear:!0},this.parent.notify(a._121,s),e.cfClearActionArgs=s.cfClearActionArgs,x&&(this.parent.notify(a._91,{range:c,isRemoveValidation:!0,viewport:this.parent.viewport}),0===f&&0===p[1]&&g>=u.usedRange.rowIndex&&p[3]>=u.usedRange.colIndex&&this.parent.setUsedRange(f,p[1],u,!1,!0)),f;f<=g;f++)for(t=p[1],r=p[3],t;t<=r;t++){var S=n.i(a.I)(f,t,u),w=this.parent.getCell(f,t);S&&(x&&S.formula&&this.parent.notify(a._65,{cellRef:n.i(a.X)([f,t,f,t])}),S.wrap&&this.parent.notify(a._84,{range:[f,t,f,t],wrap:!1,sheet:u}),S.hyperlink&&(w&&n.i(o.removeClass)(w.querySelectorAll(".e-hyperlink"),"e-hyperlink-style"),x&&this.parent.removeHyperlink(u.name+"!"+n.i(a.X)([f,t,f,t]))))}"Clear Hyperlinks"===d.type&&this.parent.removeHyperlink(u.name+"!"+c),this.parent.notify(a._122,{range:u.name+"!"+c,type:d.type}),this.parent.serviceLocator.getService("cell").refreshRange(n.i(a._4)(n.i(a.T)(c)),!1,!1,!1,!1,n.i(i._163)(this.parent),!x),this.parent.notify(a._92,{range:c,isclearFormat:!0}),e.isFromUpdateAction||this.parent.notify(i.H,{address:c}),this.parent.notify(a._55,null),b()}},e.prototype.addEventListener=function(){this.parent.on(a._46,this.applyCellFormat,this),this.parent.on(r._62,this.clearObj,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._46,this.applyCellFormat),this.parent.off(r._62,this.clearObj))},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null,this.checkHeight=null},e.prototype.getModuleName=function(){return"cellformat"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(3),i=(n.n(r),n(0)),a=n(1),o=n(9),s=(n.n(o),n(6)),l=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}l((r=r.apply(e,t||[])).next())})},d=this&&this.__generator||function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,a&&(o=2&n[0]?a.return:n[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,n[1])).done)return o;switch(a=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,a=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(o=l.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){l=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){l.label=n[1];break}if(6===n[0]&&l.label<o[1]){l.label=o[1],o=n;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(n);break}o[2]&&l.ops.pop(),l.trys.pop();continue}n=t.call(e,l)}catch(e){n=[6,e],a=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,a,o,s,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=function(){function e(e){this.parent=e,this.init(),this.addEventListener()}return e.prototype.init=function(){this.parent.element.appendChild(this.parent.createElement("input",{className:"e-clipboard",attrs:{contenteditable:"true",tabindex:"-1","aria-hidden":"true"}}))},e.prototype.addEventListener=function(){var e=this.getClipboardEle();this.parent.on(a.J,this.cut,this),this.parent.on(a.K,this.copy,this),this.parent.on(a.L,this.paste,this),this.parent.on(a.M,this.clearCopiedInfo,this),this.parent.on(a.G,this.tabSwitchHandler,this),this.parent.on(a.z,this.cMenuBeforeOpenHandler,this),this.parent.on(a.D,this.ribbonClickHandler,this),this.parent.on(a.g,this.initCopyIndicator,this),this.parent.on(a._1,this.rowHeightChanged,this),this.parent.on(a._2,this.colWidthChanged,this),this.parent.on(i._146,this.refreshOnInsertDelete,this),r.EventHandler.add(e,"cut",this.cut,this),r.EventHandler.add(e,"copy",this.copy,this),r.EventHandler.add(e,"paste",this.paste,this)},e.prototype.removeEventListener=function(){var e=this.getClipboardEle();this.parent.isDestroyed||(this.parent.off(a.J,this.cut),this.parent.off(a.K,this.copy),this.parent.off(a.L,this.paste),this.parent.off(a.M,this.clearCopiedInfo),this.parent.off(a.G,this.tabSwitchHandler),this.parent.off(a.z,this.cMenuBeforeOpenHandler),this.parent.off(a.D,this.ribbonClickHandler),this.parent.off(a.g,this.initCopyIndicator),this.parent.off(a._1,this.rowHeightChanged),this.parent.off(a._2,this.colWidthChanged),this.parent.off(i._146,this.refreshOnInsertDelete)),r.EventHandler.remove(e,"cut",this.cut),r.EventHandler.remove(e,"copy",this.copy),r.EventHandler.remove(e,"paste",this.paste)},e.prototype.ribbonClickHandler=function(e){var t=this.parent.element.id;switch(e.item.id){case t+"_cut":this.cut({invokeCopy:!0});break;case t+"_copy":this.copy({invokeCopy:!0})}},e.prototype.tabSwitchHandler=function(e){0!==e.activeTab||this.copiedInfo||this.copiedShapeInfo||this.hidePaste()},e.prototype.cMenuBeforeOpenHandler=function(e){var t=this.parent.getActiveSheet(),r=this.parent.serviceLocator.getService(a._174),o=[],s=[],l=[],d=[],c=t.activeCell,h=n.i(i.U)(c),p=n.i(i.I)(h[0],h[1],t),u=t.isProtected&&n.i(i._169)(p,n.i(i.B)(t,h[1]));"Content"!==e.target&&"RowHeader"!==e.target&&"ColumnHeader"!==e.target&&"SelectAll"!==e.target||(this.parent.enableContextMenuItems([r.getConstant("Paste"),r.getConstant("PasteSpecial")],!!(this.copiedInfo||this.copiedShapeInfo&&!u)),this.parent.enableContextMenuItems([r.getConstant("Cut")],!u)),"Content"===e.target&&(u?this.parent.enableContextMenuItems([r.getConstant("Cut"),r.getConstant("Filter"),r.getConstant("Sort"),r.getConstant("Hyperlink")],!1):t.isProtected&&!t.protectSettings.insertLink&&this.parent.enableContextMenuItems([r.getConstant("Hyperlink")],!1)),t.isProtected&&("ColumnHeader"===e.target&&(l=[r.getConstant("DeleteColumn"),r.getConstant("DeleteColumns"),r.getConstant("InsertColumn"),r.getConstant("InsertColumns")],d=[r.getConstant("HideColumn"),r.getConstant("HideColumns"),r.getConstant("UnhideColumns")],this.parent.enableContextMenuItems(l,!1),this.parent.enableContextMenuItems(d,t.protectSettings.formatColumns)),"RowHeader"===e.target&&(o=[r.getConstant("DeleteRow"),r.getConstant("DeleteRows"),r.getConstant("InsertRow"),r.getConstant("InsertRows")],s=[r.getConstant("HideRow"),r.getConstant("HideRows"),r.getConstant("UnhideRows")],this.parent.enableContextMenuItems(o,!1),this.parent.enableContextMenuItems(s,t.protectSettings.formatRows)))},e.prototype.rowHeightChanged=function(e){if(this.copiedInfo){var t=this.getCopyIndicator();t&&(this.copiedInfo.range[0]>e.rowIdx?t.style.top=parseFloat(t.style.top)+e.threshold+"px":n.i(i._165)(this.copiedInfo.range,e.rowIdx,this.copiedInfo.range[1])&&(t.style.height=parseFloat(t.style.height)+e.threshold+"px"))}},e.prototype.colWidthChanged=function(e){if(this.copiedInfo){var t=this.getCopyIndicator();t&&(this.copiedInfo.range[1]>e.colIdx?t.style.left=parseFloat(t.style.left)+e.threshold+"px":n.i(i._165)(this.copiedInfo.range,this.copiedInfo.range[0],e.colIdx)&&(t.style.width=parseFloat(t.style.width)+e.threshold+"px"))}},e.prototype.cut=function(e){this.setCopiedInfo(e,!0)},e.prototype.copy=function(e){this.setCopiedInfo(e,!1)},e.prototype.paste=function(e){if(this.parent.isEdit||this.parent.element.getElementsByClassName("e-dlg-overlay").length>0){return void(this.parent.element.getElementsByClassName("e-spreadsheet-edit")[0].style.height="auto")}var t,o=e&&e.clipboardData||window.clipboardData;if(!(o&&e.clipboardData&&e.clipboardData.getData("isInternalCut").length)||this.copiedInfo)if(o||this.copiedShapeInfo||e.isInternal&&this.copiedInfo){e.isInternal=!o;var l=void 0,d=this.getCopiedIdx();e.isAction=!!o||e.isAction;var c=e&&e.sIdx>-1?e.sIdx:this.parent.activeSheetIndex,h=n.i(i.l)(this.parent,c),p=n.i(i._4)(e&&e.range||n.i(i.T)(h.selectedRange)),u=void 0,f=void 0;if(o){if(u=this.getExternalCells(e),f=u.model,!e.isInternal&&u.internal&&(o=!1,!this.copiedInfo))return;if(!f||!f.length){if(u.file)return void this.parent.notify(a._70,{file:u.file});if(!this.copiedInfo)return;o=!1}}u=u;var g=Object.assign({isExternal:o},this.copiedInfo),m=void 0,v=void 0,y=void 0,C=void 0,b=void 0,x=void 0,S=void 0,w=void 0,_=void 0;o?(v=c,S=n.i(i.l)(this.parent,v),y={},x=u.selection,b="Sheet"!==x&&(p[2]-p[0]+1)%u.rowCount==0&&(p[3]-p[1]+1)%u.colCount==0,m=[0,0,u.usedRowIndex,u.usedColIndex]):(m=n.i(i._4)(this.copiedShapeInfo?n.i(i.T)(h.selectedRange):this.copiedInfo.range),v=d,y=n.i(i.B)(h,m[1]),C=n.i(i._5)(m)&&this.isRangeMerged(p,h),S=n.i(i.l)(this.parent,v),b=!C&&(p[2]-p[0]+1)%(m[2]-m[0]+1)==0&&(p[3]-p[1]+1)%(m[3]-m[1]+1)==0,S&&(w=0===m[1]&&m[3]===S.colCount-1,_=0===m[0]&&m[2]===S.rowCount-1,w?_?(x="Sheet",m[2]=S.usedRange.rowIndex,m[3]=S.usedRange.colIndex):(x="Row",m[3]=S.usedRange.colIndex):_&&(x="Column",m[2]=S.usedRange.rowIndex))),t=b?p:[p[0],p[1]].concat([p[0]+m[2]-m[0],p[1]+m[3]-m[1]||p[1]]),x&&(("Sheet"===x||"Column"===x)&&t[2]<h.usedRange.rowIndex&&(t[2]=h.usedRange.rowIndex),("Sheet"===x||"Row"===x)&&t[3]<h.usedRange.colIndex&&(t[3]=h.usedRange.colIndex));var I=e&&e.type||"All";if(e.isAction&&!this.copiedShapeInfo){var E={requestType:"paste",copiedInfo:this.copiedInfo,copiedRange:n.i(i.X)(m),pastedRange:n.i(i.X)(t),type:I,cancel:!1};if(this.parent.notify(i._34,{eventArgs:E,action:"clipboard"}),E.cancel)return;p=n.i(i.T)(E.pastedRange),b=o?"Sheet"!==u.selection&&(p[2]-p[0]+1)%u.rowCount==0&&(p[3]-p[1]+1)%u.colCount==0:!C&&(p[2]-p[0]+1)%(m[2]-m[0]+1)==0&&(p[3]-p[1]+1)%(m[3]-m[1]+1)==0,t=b?p:[p[0],p[1]].concat([p[0]+m[2]-m[0],p[1]+m[3]-m[1]||p[1]]),I=E.type}var R=void 0;x?(R=[].concat(t),"Sheet"!==x&&"Column"!==x||(t[2]<h.usedRange.rowIndex&&(t[2]=h.usedRange.rowIndex),m[2]<h.usedRange.rowIndex&&(m[2]+=h.usedRange.rowIndex-m[2]),R[2]<h.rowCount&&(R[2]=h.rowCount-1)),"Sheet"!==x&&"Row"!==x||(t[3]<h.usedRange.colIndex&&(m[3]+=h.usedRange.colIndex-t[3],t[3]=h.usedRange.colIndex),m[3]<h.usedRange.colIndex&&(m[3]+=h.usedRange.colIndex-m[3]),R[3]<h.colCount&&(R[3]=h.colCount-1))):R=t;var k=void 0,A=void 0,F=void 0,N=p[0],T=[];if(h.isProtected&&n.i(a._160)(this.parent,t))return void this.parent.notify(a._50,null);if(this.copiedShapeInfo&&!this.copiedInfo){var O=this.copiedShapeInfo.pictureElem;O.classList.contains("e-datavisualization-chart")?(this.copiedShapeInfo.chartInfo.top=null,this.copiedShapeInfo.chartInfo.left=null,this.parent.notify(i._125,{chart:[this.copiedShapeInfo.chartInfo],isInitCell:!0,isUndoRedo:!0,isPaste:!0,dataSheetIdx:this.copiedShapeInfo.sheetIdx,isCut:this.copiedShapeInfo.isCut,range:e.range||h.selectedRange,sheetId:h.id})):this.parent.notify(a._75,{options:{src:O.style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2"),height:this.copiedShapeInfo.height,width:this.copiedShapeInfo.width,imageId:this.copiedShapeInfo.isCut?O.id:""},range:n.i(i.X)([N,p[1],N,p[1]]),isPublic:!1,isUndoRedo:!0});var D=n.i(i.I)(N,p[1],h);if(D&&!n.i(r.isNullOrUndefined)(D.image)&&D.image.length>0){var L={requestType:"imagePaste",copiedShapeInfo:this.copiedShapeInfo,pasteSheetIndex:this.parent.activeSheetIndex,pastedRange:n.i(i.p)(this.parent)+"!"+n.i(i.X)([N,p[1],N,p[1]]),pastedPictureElement:document.getElementById(D.image[D.image.length-1].id)};this.parent.notify(a._31,{eventArgs:L,action:"clipboard"})}}else{var P=[],M=this.isInRange(m,p,d),B=!1,H=!1,U=0,V=[];b||"Values"===I||this.setCF(m,t,S,h,V);for(var j=void 0,z=void 0,q=!1,W=[],G={sheet:h,isExternal:!!o},Y=this.setCell(G),X=!o&&this.copiedInfo.isCut&&this.setCell({sheet:S}),K=m[0],$=0;K<=m[2];K++,$++)if(o||g.isCut||!n.i(i.w)(S,K)){M&&(P[p[0]+$]={cells:[]});for(var Z=m[1],J=0;Z<=m[3];Z++,J++){if(M&&(P[p[0]+$].cells[p[1]+J]=n.i(i.I)(p[0]+$,p[1]+J,S,!1,!0)),k=o?f[K]&&f[K].cells[Z]||{}:n.i(r.extend)({},M&&P[K]&&P[K].cells[Z]?P[K].cells[Z]:n.i(i.I)(K,Z,S),null,!0),y=n.i(i.B)(h,Z),!k.validation&&y.validation&&(k.validation=y.validation),w||_){if(k&&k.rowSpan)if(k.rowSpan>0)k.rowSpan+K-1<=m[2]?B=!0:k={};else if(B){if(k.rowSpan<0){var Q=k.rowSpan,ee=k.colSpan?k.colSpan:0,te=n.i(i.I)(N+Q,p[1]+J+ee,h);te&&!te.rowSpan&&(k={})}}else k={};k&&k.colSpan&&(k.colSpan>0?k.colSpan+Z-1<=m[3]?H=!0:k={}:H||(k={}))}if(k&&I){var ne=void 0;switch(I){case"Formats":ne={format:k.format,style:k.style},this.copiedInfo&&!this.copiedInfo.isCut&&(k.rowSpan&&(ne.rowSpan=k.rowSpan),k.colSpan&&(ne.colSpan=k.colSpan)),k=ne;break;case"Values":if(k={value:k.value},k.value&&k.value.toString().indexOf("\n")>-1){var re=this.parent.getCell(p[0],p[1]);re.classList.add("e-alt-unwrap")}}A=["Formats","Values"].indexOf(I)>-1}if(!this.parent.scrollSettings.isFinite&&(m[2]-m[0]>1048575-p[0]||m[3]-m[1]>16383-p[1])||this.parent.scrollSettings.isFinite&&(m[2]-m[0]>h.rowCount-1-p[0]||m[3]-m[1]>h.colCount-1-p[1]))return void this.showDialog();if(b){for(var ie=p[0];ie<=p[2];ie+=m[2]-m[0]+1)if(g.isCut||U||!n.i(i.w)(h,ie+$))for(var ae=p[1];ae<=p[3];ae+=m[3]-m[1]+1){if(K!==m[0]||Z!==m[1]||void 0!==j&&!j.length||"Values"===I||(j=this.setCF(m,[ie,ae,ie+(m[2]-m[0]),ae+(m[3]-m[1])],S,h,V,j)),F=n.i(i.I)(ie+$,ae+J,h,!1,!0),!(o||n.i(r.isNullOrUndefined)(F.colSpan)&&n.i(r.isNullOrUndefined)(F.rowSpan))){if(w||_)continue;var oe={range:[ie+$,ae+J,ie+$,ae+J],merge:!1,isAction:!1,type:"All",sheetIndex:c,preventRefresh:c!==this.parent.activeSheetIndex};T.push(oe),this.parent.notify(i._113,oe)}var se=ae+J;if(k=n.i(r.extend)({},k||{},null,!0),!A&&this.copiedInfo&&!this.copiedInfo.isCut&&k.formula){var le=n.i(i._174)([ie+$,se],[K,Z],S,this.parent,M?k:null);n.i(r.isNullOrUndefined)(le)||(k.formula=le)}h.isProtected&&k&&!1!==k.isLocked&&(k.isLocked=F.isLocked),F&&F.formula&&F.formula.indexOf("=UNIQUE(")>-1&&this.parent.notify(s._37,null);var de={cellIdx:[K,Z],isUnique:!1,uniqueRange:"",sheetName:S.name};this.parent.notify(i._63,de),de.isUnique&&(k.value=null),q=!1,k&&k.formula&&k.formula.indexOf("=UNIQUE(")>-1&&(q=!0,W.push([ie,se]),k.value=null),z=Y(ie+$,se,k,se===p[3],A,q),z||k.formula&&this.copiedInfo&&this.copiedInfo.isCut&&this.parent.notify(i._65,{cellRef:n.i(i.X)([K,Z,K,Z])})}}else!o&&n.i(a._148)(this.parent,K,Z,d)||(C?Y(N,p[1]+J,{value:k.value},Z===m[3],!0):Y(N,p[1]+J,k,Z===m[3],A));if(!o&&this.copiedInfo.isCut&&(!n.i(i._165)(p,K,Z)||d!==this.parent.activeSheetIndex)){var ce=n.i(i.I)(K,Z,S);if(ce)if(ce.isLocked||n.i(r.isNullOrUndefined)(ce.isLocked))if(!w&&!_||void 0===ce.rowSpan&&void 0===ce.colSpan)ce=null;else{if(!(ce.rowSpan>1||ce.colSpan>1))continue;this.parent.notify(i._113,{merge:!1,range:[K,Z,K,Z],type:"All"}),ce=null}else!1===ce.isLocked&&(ce=S.isProtected?{isLocked:!1}:null);X(K,Z,ce,Z===m[3])}}N++}else $--,U++;if(W.length)for(var K=0;K<W.length;K++)this.parent.serviceLocator.getService("cell").refresh(W[K][0],W[K][1]);G.isRandFormula&&this.parent.notify(i._49,{action:"refreshRandomFormula"}),this.parent.notify(i._127,null);var he=t[2]-U,pe=R[2]-U;t[2]=he,R[2]=pe,this.parent.setUsedRange(t[2],t[3]);var ue=n.i(i.X)(R);c!==this.parent.activeSheetIndex||e.isFromUpdateAction||this.parent.notify(a.H,{address:ue}),!o&&this.copiedInfo.isCut&&(l=this.copiedInfo.isCut,d===this.parent.activeSheetIndex&&this.parent.serviceLocator.getService("cell").refreshRange(m),this.clearCopiedInfo()),(o||M)&&this.copiedInfo&&this.clearCopiedInfo();var fe=void 0;if(l){j&&j.length&&"Values"!==I&&(fe={range:m,sheetIdx:v,isClear:!0},this.parent.notify(i._121,fe)),n.i(a._157)(S,m[0],m[1],(this.parent.getRow(m[0],null,this.parent.frozenColCount(S))||{offsetHeight:20}).offsetHeight);var ge=n.i(a._158)(S,m[0]);n.i(a._149)(this.parent,S,ge,m[0])}V.length&&c===this.parent.activeSheetIndex&&this.parent.notify(i._120,{cfModel:V,isAction:!0});var me=n.i(i.l)(this.parent,d);if(!o&&m[0]===m[2]&&"Row"===x){for(var ge=me.rows[m[0]].height,K=p[0];K<=p[2];K++)n.i(a._149)(this.parent,this.parent.getActiveSheet(),ge,K);l&&n.i(a._149)(this.parent,me,20,m[0])}if(e.isAction){var L={requestType:"paste",copiedInfo:g,mergeCollection:T,pasteSheetIndex:this.parent.activeSheetIndex,copiedRange:S.name+"!"+(g.range?n.i(i.X)(g.range):S.selectedRange),pastedRange:h.name+"!"+n.i(i.X)(t),type:I||"All",selectedRange:ue};U&&(L.skipFilterCheck=!0),fe&&fe.cfClearActionArgs&&(L.cfClearActionArgs=fe.cfClearActionArgs),V.length&&(L.cfActionArgs={cfModel:V,sheetIdx:c}),this.parent.notify(a._31,{eventArgs:L,action:"clipboard"})}e.focus&&n.i(a._159)(this.parent.element)}}else this.getClipboardEle().select()},e.prototype.setCF=function(e,t,r,a,o,s){var l,d,c=this,h=function(r){l=[t[0]+(d[0]<=e[0]?0:d[0]-e[0]),t[1]+(d[1]<=e[1]?0:d[1]-e[1]),t[2]-(d[2]>=e[2]?0:e[2]-d[2]),t[3]-(d[3]>=e[3]?0:e[3]-d[3])],a.conditionalFormats||c.parent.setSheetPropertyOnMute(a,"conditionalFormats",[]);var s={range:n.i(i.X)(l),type:r.type,cFColor:r.cFColor,value:r.value,format:r.format};a.conditionalFormats.push(s),o.push(s)};if(s)for(var p=0,u=s.length;p<u;p++)d=n.i(i.T)(s[p].range),h(s[p]);else if(s=[],r.conditionalFormats)for(var p=0,u=r.conditionalFormats.length;p<u;p++)d=n.i(i.T)(r.conditionalFormats[p].range),n.i(i._180)([e],r.conditionalFormats[p].range)&&(s.push(r.conditionalFormats[p]),h(r.conditionalFormats[p]));return s},e.prototype.isRangeMerged=function(e,t){var r=n.i(i.I)(e[0],e[1],t);if(r&&(r.colSpan>1||r.rowSpan>1)){var a={range:e.slice(2,4).concat(e.slice(2,4))};return this.parent.notify(i._116,a),a.range[0]===e[0]&&a.range[1]===e[1]&&a.range[2]===e[2]&&a.range[3]===e[3]}return!1},e.prototype.updateFilter=function(e,t){var r,o;this.parent.notify(i._38,null);for(var s=0;s<this.parent.sheets.length;s++)if(this.parent.filterCollection&&this.parent.filterCollection[s]&&this.parent.filterCollection[s].sheetIndex===n.i(i.f)(this.parent,e.sId)){var l=e.range,d=n.i(i.T)(this.parent.filterCollection[s].filterRange);l=n.i(i._4)(l),d[0]===l[0]&&d[2]===l[2]&&d[1]===l[1]&&d[3]===l[3]&&(r=!0,o=[Math.abs(l[0]-d[0]),Math.abs(l[1]-d[1]),Math.abs(l[2]-d[2]),Math.abs(l[3]-d[3])])}var c=this.parent.getCell(e.range[0],e.range[1]);c=c?c.querySelector(".e-filter-icon")?c:this.parent.getCell(e.range[2],e.range[3]):c;var h=c?c.querySelector(".e-sortasc-filter"):c,p=c?c.querySelector(".e-sortdesc-filter"):c;if(r)for(var u=0;u<this.parent.filterCollection.length;u++){var f=this.parent.filterCollection[u],g=e&&e.sId?n.i(i.f)(this.parent,e.sId):this.parent.activeSheetIndex;if(f.sheetIndex===g&&this.parent.notify(a._23,{predicates:null,range:f.filterRange,sIdx:g,isCut:!0}),f.sheetIndex===g&&g===this.parent.activeSheetIndex&&(o=[t[0]+o[0],t[1]+o[1],Math.abs(t[2]-o[2]),Math.abs(t[3]-o[3])],this.parent.notify(a._23,{predicates:null,range:n.i(i.X)(o),sIdx:null,isCut:!0}),e.range[3]===e.range[1])){var m=this.parent.getCell(t[0],t[1]);h&&m&&m.querySelector(".e-filter-icon").classList.add("e-sortasc-filter"),p&&m&&m.querySelector(".e-filter-icon").classList.add("e-sortdesc-filter")}}},e.prototype.isInRange=function(e,t,r){var a=this.parent.activeSheetIndex;return n.i(i._165)(e,t[0],t[1])&&r===a||n.i(i._165)(e,t[2],t[3])&&r===a},e.prototype.setCell=function(e){var t=this,r=e.sheet,o=r.name===this.parent.getActiveSheet().name;return function(s,l,d,c,h,p){d&&d.formula&&(d.formula.indexOf("RANDBETWEEN(")>-1||d.formula.indexOf("RAND(")>-1||d.formula.indexOf("NOW(")>-1)&&(e.isRandFormula=!0);var u=n.i(i._175)(t.parent,r,{cell:d,rowIdx:s,colIdx:l,pvtExtend:!h,valChange:!p,lastCell:c,uiRefresh:o,requestType:"paste",skipFormatCheck:!e.isExternal,isRandomFormula:e.isRandFormula});if(!u&&d){if(d.validation){var f=n.i(i.W)(s,l);t.parent.dataValidationRange+=f+":"+f+","}if(d.style&&e.isExternal){var g=n.i(a._156)(t.parent,s,l,r,d.style||t.parent.cellStyle,d.wrap?n.i(a._153)(t.parent.getDisplayText(d),n.i(a._155)(r,s,l),d.style,t.parent.cellStyle):1);g=Math.round(g),g<20&&(g=20),n.i(a._157)(r,s,l,g);var m=n.i(i.z)(r,s),v=n.i(a._158)(r,s);v>m&&n.i(a._149)(t.parent,r,v,s)}}return u}},e.prototype.getCopiedIdx=function(){if(this.copiedInfo){for(var e=0;e<this.parent.sheets.length;e++)if(this.parent.sheets[e].id===this.copiedInfo.sId)return e;this.clearCopiedInfo()}return-1},e.prototype.setCopiedInfo=function(e,t){var s=this;if(!this.parent.isEdit){var l=new o.Deferred;e.promise=l.promise;var d,c=this.parent.getActiveSheet();if(e&&e.range){var h=0===e.range[1]&&e.range[3]===c.colCount-1,p=0===e.range[0]&&e.range[2]===c.rowCount-1,u={range:e.range};h||p||this.parent.notify(i._115,u),d=u.range}else d=n.i(i.T)(c.selectedRange);if(e&&!e.isPublic&&!e.clipboardData){var f={copiedRange:c.name+"!"+n.i(i.X)(d),cancel:!1,action:t?"cut":"copy"};if(this.parent.notify(i._34,f),f.cancel)return}var g={sheet:c,indexes:[0,0,c.rowCount-1,c.colCount-1],isFinite:this.parent.scrollSettings.isFinite,promise:new Promise(function(e,t){e(void 0)})},m=document.getElementsByClassName("e-ss-overlay-active"),v=m.length;!c.isLocalData||e&&e.clipboardData||0!==d[0]||d[2]!==c.rowCount-1||v||(this.parent.showSpinner(),this.parent.notify("updateSheetFromDataSource",g)),this.checkForUncalculatedFormula(d,e&&e.sId?e.sId:c.id),g.promise.then(function(){if(v>0){var o={clientY:m[0].offsetTop,isImage:!0};s.parent.notify(a._73,o);var h={clientX:m[0].offsetLeft,isImage:!0};if(s.parent.notify(a._74,h),s.copiedShapeInfo={sId:e&&e.sId?e.sId:c.id,sheetIdx:c.index,isCut:t,pictureElem:m[0],copiedRange:n.i(i.X)([o.clientY,h.clientX,o.clientY,h.clientX]),height:m[0].offsetHeight,width:m[0].offsetWidth,chartInfo:s.getChartElemInfo(m[0])},!m[0].classList.contains("e-datavisualization-chart")){var p=window.getComputedStyle(m[0]).backgroundImage.slice(5,-2);s.addImgToClipboard(p,s.copiedShapeInfo.height,s.copiedShapeInfo.width)}s.hidePaste(!0),t&&(m[0].classList.contains("e-datavisualization-chart")?s.parent.deleteChart(s.copiedShapeInfo.chartInfo.id):s.parent.notify(a._76,{id:s.copiedShapeInfo.pictureElem.id,sheetIdx:s.copiedShapeInfo.sId,range:s.copiedShapeInfo.copiedRange}))}else e&&e.clipboardData||(s.copiedInfo&&s.clearCopiedInfo(),s.copiedInfo={range:d,sId:e&&e.sId?e.sId:c.id,isCut:t},s.hidePaste(!0),e.isFromUpdateAction||s.initCopyIndicator(),r.Browser.isIE||s.getClipboardEle().select(),e&&e.invokeCopy&&document.execCommand(t?"cut":"copy"),s.parent.hideSpinner());r.Browser.isIE&&s.setExternalCells(e,t),l.resolve()}),e&&e.clipboardData&&(this.setExternalCells(e,t),this.getClipboardEle().setAttribute("aria-label",c.selectedRange+" "+this.parent.serviceLocator.getService(a._174).getConstant(t?"Cut":"Copy")))}},e.prototype.imageToCanvas=function(e,t,n){return new Promise(function(r){var i=document.createElement("canvas"),a=i.getContext("2d"),o=new Image;o.src=e,o.crossOrigin="anonymous",o.onload=function(){i.width=n,i.height=t,a.drawImage(o,0,0,n,t),i.toBlob(function(e){r(e)},"image/png")}})},e.prototype.addImgToClipboard=function(e,t,n){return l(this,void 0,void 0,function(){var r,i,a;return d(this,function(o){switch(o.label){case 0:return i=window.navigator,[4,this.imageToCanvas(e,t,n)];case 1:return a=o.sent(),[4,i.clipboard.write([new ClipboardItem((r={},r[a.type]=a,r))])];case 2:return o.sent(),[2]}})})},e.prototype.checkForUncalculatedFormula=function(e,t){for(var a,o=n.i(i.f)(this.parent,t),s=n.i(i.l)(this.parent,o),l=e[0];l<=e[2];l++)for(var d=e[1];d<=e[3];d++)a=n.i(i.I)(l,d,s,null,!0),a.formula&&n.i(r.isUndefined)(a.value)&&this.parent.notify(i._49,{action:"refreshCalculate",value:a.formula,rowIndex:l,colIndex:d,isFormula:n.i(i._160)(a.formula),sheetIndex:o})},e.prototype.getChartElemInfo=function(e){var t=this.parent.chartColl;if(e.classList.contains("e-datavisualization-chart"))for(var n=e.getElementsByClassName("e-control")[0].id,r=0;r<t.length;r++)if(t[r].id===n){var i=t[r];return i}return null},e.prototype.clearCopiedInfo=function(){this.copiedInfo&&(this.parent.getActiveSheet().id===this.copiedInfo.sId&&(this.removeIndicator(this.parent.getSelectAllContent()),this.removeIndicator(this.parent.getColumnHeaderContent()),this.removeIndicator(this.parent.getRowHeaderContent()),this.removeIndicator(this.parent.getMainContent())),this.copiedInfo=null,this.hidePaste()),this.copiedShapeInfo&&(this.copiedShapeInfo=null,this.hidePaste())},e.prototype.removeIndicator=function(e){if(e){var t=e.getElementsByClassName("e-copy-indicator")[0];t&&n.i(r.detach)(t)}},e.prototype.initCopyIndicator=function(){if(this.copiedInfo&&this.parent.getActiveSheet().id===this.copiedInfo.sId){var e=this.parent.createElement("div",{className:"e-copy-indicator"});e.appendChild(this.parent.createElement("div",{className:"e-top"})),e.appendChild(this.parent.createElement("div",{className:"e-bottom"})),e.appendChild(this.parent.createElement("div",{className:"e-left"})),e.appendChild(this.parent.createElement("div",{className:"e-right"})),n.i(a._122)(this.parent,e,this.copiedInfo.range,"e-copy-indicator")}},e.prototype.showDialog=function(){var e=this;this.parent.serviceLocator.getService(a._175).show({header:"Spreadsheet",height:205,width:340,isModal:!0,showCloseIcon:!0,content:this.parent.serviceLocator.getService(a._174).getConstant("PasteAlert"),beforeOpen:function(t){var n={dialogName:"PasteDialog",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",n),n.cancel&&(t.cancel=!0)}})},e.prototype.hidePaste=function(e){this.parent.getActiveSheet().isProtected&&(e=!1),this.parent.notify(a.F,[{items:[this.parent.element.id+"_paste"],enable:e||!1}])},e.prototype.setExternalCells=function(e,t){var a,o,s,l="",d=this.parent.getActiveSheet(),c=n.i(i._4)(this.copiedInfo.range),h=0===c[1]&&c[3]===d.colCount-1,p=0===c[0]&&c[2]===d.rowCount-1,u='<html><body><table class="e-spreadsheet" xmlns="http://www.w3.org/1999/xhtml"';(h||p)&&(u+=' aria-rowcount="'+d.usedRange.rowIndex+'" aria-colcount="'+d.usedRange.colIndex+'"',u+=' aria-label="'+(h&&p?"Sheet":h?"Row":"Column")+'"'),u+="><tbody>";for(var f=c[0];f<=c[2];f++)if(t||!n.i(i.w)(d,f)){u+="<tr>";for(var g=c[1];g<=c[3];g++)if(a=n.i(i.I)(f,g,d,!1,!0),!(a.colSpan<0||a.rowSpan<0)){if(u+="<td",a.colSpan&&(u+=' colspan="'+a.colSpan+'"'),a.rowSpan&&(u+=' rowspan="'+a.rowSpan+'"'),a.style?(s="",a.style.whiteSpace||(s+="white-space:"+(a.wrap?"normal":"nowrap")+";"),a.style.verticalAlign||(s+="vertical-align:bottom;"),Object.keys(a.style).forEach(function(e){var t=e.match(/[A-Z]/);s+=("backgroundColor"===e?"background":t?e.replace(t[0],"-"+t[0].toLowerCase()):e)+":"+("backgroundColor"===e||"color"===e?a.style[""+e].slice(0,7):a.style[""+e])+";"}),u+=s.includes('"')?" style='"+s+"'":' style="'+s+'"'):u+=' style="white-space:'+(a.wrap?"normal":"nowrap")+';vertical-align:bottom;"',n.i(r.isNullOrUndefined)(a.value))u+="></td>";else{if(o=a.value,a.format&&"General"!==a.format){u+=a.value.toString().includes('"')?" cell-value='"+o+"'":' cell-value="'+a.value+'"',u+=a.format.includes('"')?" num-format='"+a.format+"'":' num-format="'+a.format+'"';var m={formattedText:o,value:o,format:a.format,cell:a,rowIndex:f,colIndex:g};this.parent.notify(i._41,m),o=m.formattedText}u+=">",u+=o,l+=o,u+="</td>"}l+=g===c[3]?"":"\t"}u+="</tr>",l+=f===c[2]?"":"\n"}u+="</tbody></table></body></html>",r.Browser.isIE?(window.clipboardData.setData("text",l),t&&window.clipboardData.setData("isInternalCut",l)):(e.clipboardData.setData("text/html",u),e.clipboardData.setData("text/plain",l),t&&e.clipboardData.setData("isInternalCut",l),e.preventDefault())},e.prototype.getExternalCells=function(e){var t,o,s=this,l=[],d={model:l},c=this.parent.createElement("span"),h=function(){return setTimeout(function(){s.getClipboardEle().innerHTML=""},0)};if(r.Browser.isIE)o=window.clipboardData.getData("text");else{if(t=e.clipboardData.getData("text/html"),o=e.clipboardData.getData("text/plain"),this.copiedInfo&&t.includes('<table class="e-spreadsheet"')){var p=!1;if(!this.copiedInfo.isCut){var u={sheetIdx:n.i(i.f)(this.parent,this.copiedInfo.sId)};if(this.parent.notify(a._33,u),u.isFiltered){var f=u.filterRange,g=this.copiedInfo.range;p=f[0]===g[0]&&f[1]===g[1]&&f[2]===g[2]&&f[3]===g[3]}}if(!p)return h(),{internal:!0}}c.innerHTML=t}if(c.querySelector("table"))this.generateCells(c,d);else if(c.querySelector("img")){var m=c.querySelector("img");this.parent.notify(a._75,{options:{src:m.src,height:m.height,width:m.width},isPublic:!0})}else if(o){var v,y,C,b=[];t&&(y=[].slice.call(c.children));var x=this.cellStyle(c);d.colCount=1,o.split("\n").forEach(function(e){v=null,t&&(C=y.filter(function(t){return t.textContent&&t.textContent.replace(/(\r\n|\n|\r|\s)/gm," ").trim()===e.trim()})[0])&&(v=x(C),y.splice(y.indexOf(C),1)),e.split("\t").forEach(function(e,t){(e||v)&&(b[t]={},v&&(v.whiteSpace&&"nowrap"!==v.whiteSpace?(b[t].wrap=!0,delete v.whiteSpace,Object.keys(v).length&&(b[t].style=v)):b[t].style=v),e&&(n.i(i._160)(e)?b[t].formula=e:b[t].value=n.i(i._192)(e.trim())))}),l.push({cells:b}),d.colCount=Math.max(d.colCount,b.length),b=[]}),d.rowCount=l.length,d.usedRowIndex=l.length-1,d.usedColIndex=d.colCount-1}else if(e.clipboardData.files&&e.clipboardData.files[0]&&e.clipboardData.files[0].type.includes("image"))return h(),{file:e.clipboardData.files[0]};return h(),d},e.prototype.generateCells=function(e,t){var a=t.model,o=e.querySelector("table"),s=o.classList.contains("e-spreadsheet"),l={},d={};t.usedRowIndex=o.rows.length-1,t.rowCount=o.rows.length,s&&(t.selection=o.getAttribute("aria-label"),t.selection&&("Sheet"===t.selection?(t.usedRowIndex=Number(o.getAttribute("aria-rowcount")),t.usedColIndex=Number(o.getAttribute("aria-colcount"))):"Row"===t.selection?t.usedColIndex=Number(o.getAttribute("aria-colcount")):t.usedRowIndex=Number(o.getAttribute("aria-rowcount"))));var c=[];n.i(r.isNullOrUndefined)(o)||n.i(r.isNullOrUndefined)(o.getAttribute("style"))||(c.push(o.getAttribute("style")),this.generateStyles(c,l));var h,p,u,f,g,m,v,y=this.cellStyle(e,s),C=1;t.colCount=1;for(var b=[],x=0,S=t.usedRowIndex;x<=S;x++){h=o.rows[x],n.i(r.isNullOrUndefined)(h.getAttribute("style"))||(b.push(h.getAttribute("style")),this.generateStyles(b,d)),a[x]||(a[x]={cells:[]}),p=a[x].cells,t.colCount=Math.max(t.colCount,h.cells.length),g=t.usedColIndex<h.cells.length?t.usedColIndex:h.cells.length-1;for(var w=0;w<=g;w++){if(f=h.cells[w],v=w,p[w]&&(w=this.getNewIndex(p,w)),p[w]={},u=u=y(f,d,l),f.textContent=f.textContent.replace(/(\r\n|\n|\r)/gm,""),f.textContent=f.textContent.replace(/\s+/g," "),u.whiteSpace&&"nowrap"!==u.whiteSpace&&(p[w].wrap=!0,delete u.whiteSpace),Object.keys(u).length&&(u.border&&(["borderBottom","borderTop","borderLeft","borderRight"].forEach(function(e){u[""+e]=u.border}),delete u.border),p[w].style=u),f.textContent&&(p[w].value=n.i(i._192)(f.textContent.trim())),m=s?"num-format":"number-format",f.getAttribute(m)&&(p[w].format=f.getAttribute(m),p[w].value&&f.getAttribute("cell-value")&&(p[w].value=n.i(i._192)(f.getAttribute("cell-value").trim()))),f.getAttribute("colspan")&&parseInt(f.getAttribute("colspan"),10)>1&&(p[w].colSpan=parseInt(f.getAttribute("colspan"),10)),f.getAttribute("rowspan")&&parseInt(f.getAttribute("rowspan"),10)>1&&(p[w].rowSpan=parseInt(f.getAttribute("rowspan"),10)),p[w].colSpan>1&&p[w].rowSpan>1)for(var _=void 0,I=x,E=x+p[w].rowSpan;I<E;I++)for(var R=w,k=w+p[w].colSpan;R<k;R++)I===x&&R===w||(_=p[w].style?{style:n.i(r.extend)({},p[w].style)}:{},I!==x&&(_.rowSpan=x-I),R!==w&&(_.colSpan=w-R),a[I]||(a[I]={cells:[]}),a[I].cells[R]=_);else if(p[w].colSpan>1)for(var I=w+1,E=w+p[w].colSpan;I<E;I++)p[I]={colSpan:w-I,style:n.i(r.extend)({},u)};else if(p[w].rowSpan>1)for(var I=x+1,E=x+p[w].rowSpan;I<E;I++)a[I]||(a[I]={cells:[]}),a[I].cells[w]={rowSpan:x-I,style:n.i(r.extend)({},u)};w=v}C=Math.max(C,p.length)}t.usedColIndex=C-1},e.prototype.getNewIndex=function(e,t){return e[t]&&(t++,t=this.getNewIndex(e,t)),t},e.prototype.cellStyle=function(e,t){var n,r,i=this;if(!t){n=e.querySelector("style")&&e.querySelector("style").innerHTML;var a=Object.keys(this.parent.commonCellStyle);if(a&&a.length&&n){var o=n.includes("td")?n.split("td")[1]:n;o=o.includes("{")?o.split("{")[1].split("}")[0]:o.split("}")[0],r={};for(var s=0;s<a.length;s++){var l=a[s],d=l.match(/[A-Z]/);d&&(l=l.replace(d[0],"-"+d[0].toLowerCase())),o.indexOf(l)>-1&&(r[a[s]]=o.split(l+":")[1].split(";")[0].trim())}}}return function(e,a,o){var s,l={};if(t){if(!e.getAttribute("style"))return l;s=e.getAttribute("style").split(";")}else{if(s=[],n&&e.className&&n.includes(e.classList[0])){var d=n.split(e.classList[0]);s.push(d[d.length-1].split("{")[1].split("}")[0])}var c=[].slice.call(e.querySelectorAll("*"));c.unshift(e),c.forEach(function(e){e.getAttribute("style")&&s.push(e.getAttribute("style")),"B"===e.tagName&&s.push("font-weight:bold"),"I"===e.tagName&&s.push("font-style:italic"),"U"===e.tagName&&s.push("text-decoration:underline")}),Object.assign(l,o,a,r)}return s.length&&i.generateStyles(s,l),e.querySelector("S")&&(l.textDecoration=l.textDecoration?"underline line-through":"line-through"),l.textDecoration&&-1===["underline","line-through","underline line-through","none"].indexOf(l.textDecoration)&&(l.textDecoration="none"),l.textAlign&&-1===["left","center","right"].indexOf(l.textAlign)&&(l.textAlign="left"),l.verticalAlign&&-1===["bottom","middle","top"].indexOf(l.verticalAlign)&&(l.verticalAlign="bottom"),l.fontSize&&(l.fontSize=Math.round(parseFloat(l.fontSize.indexOf("px")>-1?(.75*parseFloat(l.fontSize)).toString():l.fontSize.indexOf("em")>-1?(16*parseFloat(l.fontSize)/1.3333).toString():l.fontSize))+"pt"),l.fontWeight&&-1===["bold","normal"].indexOf(l.fontWeight)&&(l.fontWeight=l.fontWeight>"599"?"bold":"normal"),l}},e.prototype.generateStyles=function(e,t){var n,r,i,a,o,s=["font-family","vertical-align","text-align","text-indent","color","white-space","font-weight","font-style","font-size","text-decoration","background","background-color"],l=["fontFamily","verticalAlign","textAlign","textIndent","color","whiteSpace","fontWeight","fontStyle","fontSize","textDecoration","backgroundColor","backgroundColor"],d=["border-bottom","border-top","border-right","border-left","border"],c=["borderBottom","borderTop","borderRight","borderLeft","border"];e&&e.length&&e.forEach(function(e){e.split(";").forEach(function(e){if(r=e.split(":")[0].trim(),(n=s.indexOf(r))>-1)r=e.split(":")[1].trim(),t[l[n]]=r;else if((n=d.indexOf(r))>-1){if("none"===(r=e.split(":")[1].trim()))r=void 0;else if(r.includes("pt")){i=r.split("pt"),a=i[0].split(" ");for(var h=0;h<a.length;h++)if(o=parseFloat(a[h])){a.splice(h,1),a.unshift((o/.75).toFixed(2)+"px"),i[0]=a.join(" ");break}r=i.join("")}t[c[n]]=r}})})},e.prototype.refreshOnInsertDelete=function(e){if(this.copiedInfo){if(e.model.id!==this.copiedInfo.sId)return;var t=this.copiedInfo.range;if(e.isInsert){if("Column"===e.modelType){if(e.start<=t[3]){if(e.start<=t[1]){var n=e.end-e.start+1;t[1]+=n,t[3]+=n}else t[3]=t[1]+(e.start-t[1]-1);this.performAction()}}else if(e.start<=t[2]){if(e.start<=t[0]){var n=e.end-e.start+1;t[0]+=n,t[2]+=n}else t[2]=t[1]+(e.start-t[1]-1);this.performAction()}}else this.clearCopiedInfo()}},e.prototype.performAction=function(){var e=this.getCopyIndicator();e&&n.i(a._122)(this.parent,e,this.copiedInfo.range,"e-copy-indicator")},e.prototype.getClipboardEle=function(){return this.parent.element.getElementsByClassName("e-clipboard")[0]},e.prototype.getCopyIndicator=function(){return this.parent.element.getElementsByClassName("e-copy-indicator")[0]},e.prototype.getModuleName=function(){return"clipboard"},e.prototype.destroy=function(){this.removeEventListener();var e=this.getClipboardEle();n.i(r.detach)(e),this.parent=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(5),i=n(2),a=n(0),o=n(11),s=(n.n(o),n(3)),l=(n.n(s),n(1)),d=n(16),c=(n.n(d),n(10)),h=(n.n(c),function(){function e(e){this.data=[],this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener();var e=n.i(s.select)("#"+this.parent.element.id+"_datavalidation-popup");e&&e.remove(),this.data=[],this.typeData=[],this.operatorData=[],this.parent=null},e.prototype.addEventListener=function(){s.Browser.isDevice&&"safari"===s.Browser.info.name&&(s.Browser.isIos||s.Browser.isIos7)?s.EventHandler.add(this.parent.element,"touchend",this.listOpen,this):s.EventHandler.add(this.parent.element,"dblclick",this.listOpen,this),this.parent.on(l._37,this.initiateDataValidationHandler,this),this.parent.on(l._40,this.invalidDataHandler,this),this.parent.on(i._41,this.checkDataValidation,this),this.parent.on(i.Q,this.listHandler,this),this.parent.on(l.n,this.keyUpHandler,this),this.parent.on(l._57,this.removeValidationHandler,this),this.parent.on(a._135,this.InvalidElementHandler,this)},e.prototype.removeEventListener=function(){s.Browser.isDevice&&"safari"===s.Browser.info.name&&(s.Browser.isIos||s.Browser.isIos7)?s.EventHandler.remove(this.parent.element,"touchend",this.listOpen):s.EventHandler.remove(this.parent.element,"dblclick",this.listOpen),this.parent.isDestroyed||(this.parent.off(l._37,this.initiateDataValidationHandler),this.parent.off(l._40,this.invalidDataHandler),this.parent.off(i._41,this.checkDataValidation),this.parent.off(i.Q,this.listHandler),this.parent.off(l.n,this.keyUpHandler),this.parent.off(l._57,this.removeValidationHandler),this.parent.off(a._135,this.InvalidElementHandler))},e.prototype.removeValidationHandler=function(e){var t,o,s={cancel:!1,isColSelected:e.isCol},l=e.range;if(e.range&&e.range.includes("!")){if(o=e.range,!(t=n.i(a.l)(this.parent,n.i(a.e)(this.parent,o.split("!")[0]))))return}else if(t=this.parent.getActiveSheet(),o=t.name+"!",e.range)o+=e.range;else{var d=this.getRange(t.selectedRange);o+=d.range,s.isColSelected=d.isColSelected}if(l=t.selectedRange,s.range=o,e.isAction&&this.parent.notify(a._34,{eventArgs:s,action:"removeValidation"}),!s.cancel){var c=void 0,h=void 0,p=void 0;if(t.name===this.parent.getActiveSheet().name){p=n.i(i.w)(t.activeCell);var u=n.i(a._4)(n.i(i.l)(l));p[0]>=u[0]&&p[1]>=u[1]&&p[0]<=u[2]&&p[1]<=u[3]&&(h=s.isColSelected?n.i(a.B)(t,p[1])||{}:n.i(a.I)(p[0],p[1],t,!1,!0),c=h.validation&&"List"===h.validation.type)}if(this.parent.notify(i._33,{range:o,isRemoveValidation:!0,viewport:this.parent.viewport}),c&&!h.validation){var f=this.parent.getCell(p[0],p[1]);f&&f.getElementsByClassName("e-validation-list")[0]&&(this.listObj.destroy(),f.removeChild(f.getElementsByClassName("e-validation-list")[0]))}e.isAction&&(delete s.cancel,this.parent.notify(r._31,{eventArgs:s,action:"removeValidation"}))}},e.prototype.keyUpHandler=function(e){var t=e.target,r=this.parent.element.querySelector(".e-datavalidation-dlg");if(n.i(s.closest)(t,".e-values")&&r&&13!==e.keyCode){var i=r.querySelector(".e-values"),a=i.querySelector(".e-dlg-error"),o=r.querySelector(".e-footer-content"),l=o.querySelector(".e-primary");l.hasAttribute("disabled")&&l.removeAttribute("disabled"),a&&i.removeChild(a)}},e.prototype.listOpen=function(e){var t=e.target;this.listObj&&t.classList.contains("e-cell")&&t.querySelector(".e-validation-list")&&this.parent.isEdit&&this.listObj.showPopup()},e.prototype.invalidDataHandler=function(e){var t={range:e.range||this.parent.dataValidationRange,cancel:!1};if(t.range){var n;!e.isPublic&&(n={eventArgs:t,action:e.isRemoveHighlight?"removeHighlight":"addHighlight"},this.parent.notify(a._34,n),t.cancel)||(e.isRemoveHighlight?this.parent.removeInvalidHighlight(t.range):this.parent.addInvalidHighlight(t.range),e.isPublic||this.parent.notify(r._31,n))}},e.prototype.listHandler=function(){var e=this;if(this.parent.allowDataValidation){var t,r=this.parent.getActiveSheet(),o=n.i(i.w)(r.activeCell),d=n.i(a.I)(o[0],o[1],r),h=this.parent.getCell(o[0],o[1]);if(!h)return;document.getElementsByClassName("e-validation-list")[0]&&(this.listObj&&this.listObj.destroy(),n.i(s.remove)(document.getElementsByClassName("e-validation-list")[0]),this.data=[]);var p=d&&d.validation||r.columns&&r.columns[o[1]]&&r.columns[o[1]].validation;if(p&&"List"===p.type){if(p.address&&!n.i(i.D)(p.address,o[0],o[1]))return;if(p.ignoreBlank=!!n.i(s.isNullOrUndefined)(p.ignoreBlank)||p.ignoreBlank,p.inCellDropDown=!!n.i(s.isNullOrUndefined)(p.inCellDropDown)||p.inCellDropDown,p.inCellDropDown){var u=this.parent.createElement("div",{className:"e-validation-list"}),f=this.parent.createElement("input",{id:this.parent.element.id+"listValid"});u.appendChild(f),p.inCellDropDown||(u.style.display="none");var g=h.getElementsByClassName("e-wrap-content")[0]||h;g.insertBefore(u,g.firstChild);var m=this.updateDataSource(d,p);this.listObj=new c.DropDownList({index:this.setDropDownListIndex(m,d),dataSource:m,fields:{text:"text",value:"id"},width:"0px",popupHeight:"200px",change:function(){return e.listValueChange(e.listObj.text)},beforeOpen:function(e){(t=window.browserDetails.isDevice)&&(window.browserDetails.isDevice=!1)},open:function(e){e.popup.offsetX=4-(h.offsetWidth-20),e.popup.offsetY=-(h.querySelector(".e-control-wrapper.e-ddl").offsetHeight-18),e.popup.element.style.width=h.offsetWidth-1+"px",t&&(window.browserDetails.isDevice=!0)},close:function(t){t.event&&(13===t.event.keyCode||t.event.altKey&&38===t.event.keyCode)&&(t.event.preventDefault(),t.event.stopPropagation()),n.i(l._159)(e.parent.element)}}),this.listObj.appendTo("#"+this.parent.element.id+"listValid")}}d&&d.validation&&(d.validation=p)}},e.prototype.setDropDownListIndex=function(e,t){if(t&&t.value)for(var n=0,r=e.length;n<r;n++)if(e[n].text===t.value.toString())return n;return null},e.prototype.updateDataSource=function(e,t){var r=this;this.data=[];var o=0,s=this.parent.definedNames,l=t.value1,d=-1!==l.indexOf("=");if(s.length>0&&d)for(var c=l.split("=")[1],h=0,p=s.length;h<p;h++)if(s[h].name===c){for(var u=s[h].refersTo;u.includes("'");)u=u.replace("'","");l=u}if(d){var f=l.indexOf("!")>-1?n.i(a.l)(this.parent,n.i(a.e)(this.parent,l.split("=")[1].split("!")[0])):this.parent.getActiveSheet(),g=l.indexOf("!")>-1?l.split("!")[1]:l.split("=")[1],m=this.parent.getActiveSheet();if(f.name!==m.name){var v,y=n.i(i.l)(m.selectedRange);f.ranges.forEach(function(e){if(!e.info||!e.info.loadedRange||!e.info.loadedRange.length)return void(v=!0)}),v&&(this.parent.showSpinner(),n.i(a.P)(this.parent,f.name+"!"+g).then(function(){if(r.parent.hideSpinner(),m.name===r.parent.getActiveSheet().name){var a=n.i(i.l)(r.parent.getActiveSheet().selectedRange);a[0]===y[0]&&a[1]===y[1]&&(r.listObj.dataSource=r.updateDataSource(e,t),r.listObj.dataBind())}}))}var C=void 0,b=g.split(":");if(b[0].match(/[a-z]+$/gi)&&b[1].match(/[a-z]+$/gi)||b[0].match(/^[0-9]/g)&&b[1].match(/^[0-9]/g)){var x=this.parent.getIndexes(g);C=x.isCol?[0,x.startIdx,f.usedRange.rowIndex,x.startIdx]:[x.startIdx,0,x.startIdx,f.usedRange.colIndex]}else C=n.i(i.l)(g);for(var S=C[0];S<=C[2];S++){f.rows[S]||n.i(a.u)(f,S,{});for(var w=C[1];w<=C[3];w++){f.rows[S].cells||n.i(a.J)(S,w,f,{}),o+=1,e=f.rows[S].cells[w];var _=this.parent.getDisplayText(e)||"";this.data.push({text:_,id:"list-"+o})}}}else for(var I=l.split(","),h=0;h<I.length;h++)o+=1,this.data.push({text:I[h],id:"list-"+o});return this.data},e.prototype.listValueChange=function(e){this.parent.notify(l.l,{action:"refreshFormulabar",value:e});var t=this.parent.getActiveSheet(),o=n.i(i.m)(t.activeCell),s=Object.assign({},n.i(a.I)(o[0],o[1],t));if(t.isProtected&&n.i(a._169)(s,n.i(a.B)(t,o[1])))this.parent.notify(r._50,null);else{this.parent.isEdit&&this.parent.closeEdit();var d={value:e,oldValue:s.value,address:t.name+"!"+t.activeCell,cancel:!1};if(this.parent.notify(a._34,{action:"cellSave",eventArgs:d}),d.cancel)return;n.i(i.C)(this.parent,t,{cell:{value:e},rowIdx:o[0],colIdx:o[1],valChange:!0,lastCell:!0,uiRefresh:!0,checkCF:!0}),this.parent.notify(r._31,{action:"cellSave",eventArgs:{value:e,oldValue:s.value,address:t.name+"!"+t.activeCell}})}},e.prototype.getRange=function(e){var t,r=n.i(i.l)(e),a=this.parent.getActiveSheet(),o=a.rowCount,s=a.colCount;return r[2]===o-1&&0===r[0]?(e=e.replace(/[0-9]/g,""),t=!0):r[3]===s-1&&0===r[2]&&(e=e.replace(/\D/g,"")),{range:e,isColSelected:t}},e.prototype.initiateDataValidationHandler=function(e,t){var r,o,d,c,h,p=this,u=this.parent.serviceLocator.getService(l._174),f=!0,g=!0,m=!0,v=this.parent.getActiveSheet(),y=v.selectedRange,C=n.i(a._4)(n.i(i.l)(y));y=this.getRange(y).range;var b=this.validateRange(C,v);if(!b.extendValidation&&!b.moreValidation||e){for(var x=C[0];x<=C[2];x++)if(v.rows[x])for(var S=C[1];S<=C[3];S++)v.rows[x].cells&&v.rows[x].cells[S]&&(h=v.rows[x].cells[S],h.validation&&(m=!1,r=h.validation.type,o=h.validation.operator,d=h.validation.value1,c=h.validation.value2,f=n.i(s.isNullOrUndefined)(h.validation.ignoreBlank)?f:h.validation.ignoreBlank,g=n.i(s.isNullOrUndefined)(h.validation.inCellDropDown)?g:h.validation.inCellDropDown));if(m)for(var w=C[1];w<=C[3];w++){var _=n.i(a.B)(v,w);_&&_.validation&&(m=!1,r=_.validation.type,o=_.validation.operator,d=_.validation.value1,c=_.validation.value2,f=n.i(s.isNullOrUndefined)(_.validation.ignoreBlank)?f:_.validation.ignoreBlank,g=n.i(s.isNullOrUndefined)(_.validation.inCellDropDown)?g:_.validation.inCellDropDown)}if(!this.parent.element.querySelector(".e-datavalidation-dlg")){var I=this.parent.serviceLocator.getService(l._175);I.show({width:375,showCloseIcon:!0,isModal:!0,cssClass:"e-datavalidation-dlg",header:u.getConstant("DataValidation"),beforeOpen:function(e){var i={dialogName:"ValidationDialog",element:e.element,target:e.target,cancel:e.cancel};p.parent.trigger("dialogBeforeOpen",i),i.cancel&&(e.cancel=!0),t&&(m=!0),I.dialogInstance.content=p.dataValidationContent(m,r,o,d,c,f,g,y),I.dialogInstance.dataBind(),n.i(l._159)(p.parent.element)},buttons:[{buttonModel:{content:u.getConstant("ClearAll"),cssClass:"e-btn e-clearall-btn e-flat"},click:function(){I.dialogInstance.content=p.dataValidationContent(!0,r,o,d,c,f,g,y),I.dialogInstance.dataBind()}},{buttonModel:{content:u.getConstant("Apply"),isPrimary:!0},click:function(){p.dlgClickHandler(I)}}]}),I.dialogInstance.refresh()}}else b.moreValidation&&this.moreValidationDlg(),b.extendValidation&&this.extendValidationDlg()},e.prototype.dataValidationContent=function(e,t,r,s,h,p,u,f){var g,m,v=this,y=this.parent.serviceLocator.getService(l._174);if(e)g=m="0";else if("Date"===t){var C=function(e){if(n.i(i.o)(e)){var t={cell:{value:e},type:"date",value:e};return v.parent.notify(a._54,t),t.value}return e};g=C(g),m=C(m)}else g=s,m=h;var b=this.parent.createElement("div",{className:"e-validation-dlg"}),x=this.parent.createElement("div",{className:"e-cellrange"}),S=this.parent.createElement("div",{className:"e-allowdata"}),w=this.parent.createElement("div",{className:"e-values"}),_=this.parent.createElement("div",{className:"e-ignoreblank"});b.appendChild(x),b.appendChild(S),b.appendChild(w),b.appendChild(_);var I=this.parent.createElement("span",{className:"e-header"});I.innerText=y.getConstant("CellRange");var E=this.parent.createElement("input",{className:"e-input",attrs:{value:f,"aria-label":y.getConstant("CellRange")}});x.appendChild(I),x.appendChild(E);var R=this.parent.createElement("div",{className:"e-allow"}),k=this.parent.createElement("div",{className:"e-data"});S.appendChild(R),S.appendChild(k);var A=this.parent.createElement("span",{className:"e-header"});A.innerText=y.getConstant("Allow"),this.typeData=[{text:y.getConstant("WholeNumber"),id:"type-1"},{text:y.getConstant("Decimal"),id:"type-2"},{text:y.getConstant("Date"),id:"type-3"},{text:y.getConstant("Time"),id:"type-4"},{text:y.getConstant("TextLength"),id:"type-5"},{text:y.getConstant("List"),id:"type-6"}],this.operatorData=[{text:y.getConstant("Between"),id:"operator-1"},{text:y.getConstant("NotBetween"),id:"operator-2"},{text:y.getConstant("EqualTo"),id:"operator-3"},{text:y.getConstant("NotEqualTo"),id:"operator-4"},{text:y.getConstant("GreaterThan"),id:"operator-5"},{text:y.getConstant("LessThan"),id:"operator-6"},{text:y.getConstant("GreaterThanOrEqualTo"),id:"operator-7"},{text:y.getConstant("LessThanOrEqualTo"),id:"operator-8"}];var F=this.parent.createElement("input",{className:"e-select"});t&&(t=this.formattedType(t));var N=0;if(!e)for(var T=0;T<this.typeData.length;T++)if(t===this.formattedType(this.typeData[T].text)){N=T;break}if(e||"List"!==t){var O=0,D=this.parent.createElement("span",{className:"e-header"});D.innerText=y.getConstant("Data");var L=this.parent.createElement("input",{className:"e-select"});if(!e)for(var T=0;T<this.operatorData.length;T++)if(r===this.formattedValue(this.operatorData[T].text)){O=T;break}k.appendChild(D),k.appendChild(L),this.dataList=new c.DropDownList({dataSource:this.operatorData,index:O,popupHeight:"200px",change:function(){v.userInput(M,v.dataList)}}),this.dataList.appendTo(L)}else{var P=this.parent.createElement("input",{className:"e-checkbox"});k.appendChild(P);new d.CheckBox({label:y.getConstant("InCellDropDown"),checked:u}).appendTo(P)}R.appendChild(A),R.appendChild(F);var M=new c.DropDownList({dataSource:this.typeData,index:N,popupHeight:"200px",change:function(){v.userInput(M,v.dataList)}});if(M.appendTo(F),e||M.value!==y.getConstant("List")&&(this.dataList.value===y.getConstant("Between")||this.dataList.value===y.getConstant("NotBetween"))){var B=this.parent.createElement("div",{className:"e-minimum"}),H=this.parent.createElement("div",{className:"e-maximum"});w.appendChild(B),w.appendChild(H);var U=this.parent.createElement("span",{className:"e-header"});U.innerText=y.getConstant("Minimum");var V=this.parent.createElement("span",{className:"e-header"});V.innerText=y.getConstant("Maximum");var j=this.parent.createElement("input",{id:"minvalue",className:"e-input",attrs:{value:g,"aria-label":y.getConstant("Minimum")}}),z=this.parent.createElement("input",{id:"maxvalue",className:"e-input",attrs:{value:m,"aria-label":y.getConstant("Maximum")}});B.appendChild(U),B.appendChild(j),H.appendChild(V),H.appendChild(z);new o.NumericTextBox({value:0}).appendTo("#minvalue");new o.NumericTextBox({value:0}).appendTo("#maxvalue")}else if(e||"List"!==t){var q=this.parent.createElement("span",{className:"e-header"});q.innerText=y.getConstant("Value");var W=this.parent.createElement("input",{className:"e-input",attrs:{value:g}});w.appendChild(q),w.appendChild(W)}else{var q=this.parent.createElement("span",{className:"e-header"});q.innerText=y.getConstant("Sources");var W=this.parent.createElement("input",{className:"e-input",attrs:{value:g}});w.appendChild(q),w.appendChild(W)}var G=p,Y=this.parent.createElement("input",{className:"e-checkbox"});return _.appendChild(Y),new d.CheckBox({label:y.getConstant("IgnoreBlank"),checked:G}).appendTo(Y),b},e.prototype.validateRange=function(e,t){for(var r=!1,i=!1,o=[],s=[],l=[],d=[],c=e[0];c<=e[2];c++)if(t.rows[c])for(var h=e[1];h<=e[3];h++)if(t.rows[c].cells&&t.rows[c].cells[h]){var p=t.rows[c].cells[h];p.validation&&(o.push(p.validation.type),s.push(p.validation.operator),l.push(p.validation.value1),d.push(p.validation.value2))}for(var u=e[1];u<=e[3];u++){var f=n.i(a.B)(t,u);f&&f.validation&&(o.push(f.validation.type),s.push(f.validation.operator),l.push(f.validation.value1),d.push(f.validation.value2))}for(var g=[],u=0;u<o.length;u++)-1===g.indexOf(o[u])&&g.push(o[u]);if(g.length>1&&(r=!0),!r){g=[];for(var m=0;m<s.length;m++)-1===g.indexOf(s[m])&&g.push(s[m]);g.length>1&&(r=!0)}if(!r){g=[];for(var m=0;m<l.length;m++)-1===g.indexOf(l[m])&&g.push(l[m]);g.length>1&&(r=!0)}if(!r){g=[];for(var m=0;m<d.length;m++)-1===g.indexOf(d[m])&&g.push(d[m]);g.length>1&&(r=!0)}if(!r){for(var v=0,y=0,C=e[0];C<=e[2];C++)if(t.rows[C])for(var h=e[1];h<=e[3];h++)if(t.rows[C].cells&&t.rows[C].cells[h]){var p=t.rows[C].cells[h];y++,p.validation&&v++}if(0===v)for(var u=e[1];u<=e[3];u++){var f=n.i(a.B)(t,u);f&&f.validation&&v++}v>0&&y>1&&v!==y&&(i=!0)}return{moreValidation:r,extendValidation:i}},e.prototype.moreValidationDlg=function(){var e=this,t=this.parent.serviceLocator.getService(l._174),r=this.parent.serviceLocator.getService(l._175),i=!1,a={width:350,isModal:!0,showCloseIcon:!0,cssClass:"e-goto-dlg",header:t.getConstant("Spreadsheet"),beforeOpen:function(i){var a={dialogName:"MoreValidation",element:i.element,target:i.target,cancel:i.cancel};e.parent.trigger("dialogBeforeOpen",a),a.cancel&&(i.cancel=!0),r.dialogInstance.content=t.getConstant("MoreValidation"),r.dialogInstance.dataBind(),n.i(l._159)(e.parent.element)},buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0,cssClass:"e-btn-goto-ok"},click:function(){r.hide(),i=!0}}],close:function(){i?(e.initiateDataValidationHandler(!0),i=!1):r.hide()}};r.show(a)},e.prototype.extendValidationDlg=function(){var e=this,t=this.parent.serviceLocator.getService(l._174),r=this.parent.serviceLocator.getService(l._175),i=!1,a=!1,o={width:550,isModal:!0,showCloseIcon:!0,cssClass:"e-goto-dlg",header:t.getConstant("Spreadsheet"),beforeOpen:function(i){var a={dialogName:"ExtendValidation",element:i.element,target:i.target,cancel:i.cancel};e.parent.trigger("dialogBeforeOpen",a),a.cancel&&(i.cancel=!0),r.dialogInstance.content=t.getConstant("ExtendValidation"),r.dialogInstance.dataBind(),n.i(l._159)(e.parent.element)},buttons:[{buttonModel:{content:t.getConstant("Yes"),isPrimary:!0,cssClass:"e-btn-goto-ok"},click:function(){r.hide(),i=!0}},{buttonModel:{content:t.getConstant("No"),isPrimary:!0,cssClass:"e-btn-goto-ok"},click:function(){r.hide(),i=!0,a=!0}}],close:function(){i?(e.initiateDataValidationHandler(!0,a),i=!1):r.hide()}};r.show(o)},e.prototype.userInput=function(e,t){for(var n=this.parent.element.querySelector(".e-datavalidation-dlg"),r=n.querySelector(".e-validation-dlg"),i=r.querySelector(".e-allowdata"),a=r.querySelector(".e-values"),s=this.parent.serviceLocator.getService(l._174),c=i.querySelector(".e-data");a.lastChild;)a.removeChild(a.lastChild);if(e.value===s.getConstant("List")){for(;c.lastChild;)c.removeChild(c.lastChild);var h=this.parent.createElement("input",{className:"e-checkbox"});c.appendChild(h);new d.CheckBox({label:s.getConstant("InCellDropDown"),checked:!0}).appendTo(h)}else if(c.getElementsByClassName("e-checkbox-wrapper")[0]){for(;c.lastChild;)c.removeChild(c.lastChild);var p=this.parent.createElement("span",{className:"e-header"});p.innerText=s.getConstant("Data");var u=this.parent.createElement("input",{className:"e-select"});c.appendChild(p),c.appendChild(u),t.appendTo(u)}if(e.value===s.getConstant("List")||t.value!==s.getConstant("Between")&&t.value!==s.getConstant("NotBetween")){var f=this.parent.createElement("span",{className:"e-header"});f.innerText=e.value===s.getConstant("List")?s.getConstant("Sources"):s.getConstant("Value");var g=e.value===s.getConstant("List")?this.parent.createElement("input",{className:"e-input",attrs:{placeholder:"Enter value"}}):this.parent.createElement("input",{className:"e-input",attrs:{value:"0"}});a.appendChild(f),a.appendChild(g)}else{var m=this.parent.createElement("div",{className:"e-minimum"}),v=this.parent.createElement("div",{className:"e-maximum"});a.appendChild(m),a.appendChild(v);var y=this.parent.createElement("span",{className:"e-header"});y.innerText=s.getConstant("Minimum");var C=this.parent.createElement("span",{className:"e-header"});C.innerText=s.getConstant("Maximum");var b=this.parent.createElement("input",{id:"min",className:"e-input",attrs:{value:"0"}}),x=this.parent.createElement("input",{id:"max",className:"e-input",attrs:{value:"0"}});new o.NumericTextBox({value:0}).appendTo("min");new o.NumericTextBox({value:0}).appendTo("max"),m.appendChild(y),m.appendChild(b),v.appendChild(C),v.appendChild(x)}},e.prototype.dlgClickHandler=function(e){var t,o=this.parent.serviceLocator.getService(l._174),s=this.parent.element.querySelector(".e-datavalidation-dlg"),d=s.querySelector(".e-footer-content"),c=s.getElementsByClassName("e-dlg-content")[0].getElementsByClassName("e-validation-dlg")[0],h=c.getElementsByClassName("e-allowdata")[0],p=h.getElementsByClassName("e-allow")[0].getElementsByTagName("input")[0],u=h.getElementsByClassName("e-data")[0].getElementsByTagName("input")[0],f=c.getElementsByClassName("e-values")[0],g=[];g[0]=f.getElementsByTagName("input")[0].value,g[1]=f.getElementsByTagName("input")[1]?f.getElementsByTagName("input")[1].value:"",n.i(a._181)(g,this.parent.locale);var m,v=c.querySelector(".e-ignoreblank .e-checkbox").checked,y=h.querySelector(".e-data").querySelector(".e-checkbox-wrapper")?!!h.querySelector(".e-data").querySelector(".e-checkbox-wrapper").querySelector(".e-check"):null,C=c.querySelector(".e-cellrange").getElementsByTagName("input")[0].value,b=this.formattedType(p.value);u&&(m=u.value,m=this.formattedValue(m));var x=[],S=[];""!==g[0]&&S.push(g[0]),""!==g[1]&&S.push(g[1]);var w=!0;if("List"===b)if(-1!==g[0].indexOf("=")){if(-1!==g[0].indexOf(":")){var _=g[0].indexOf("!")>-1?g[0].split("!")[1]:g[0].split("=")[1],I=!(g[0].indexOf("!")>-1)||n.i(a.e)(this.parent,g[0].split("=")[1].split("!")[0])>-1;x=_.split(":");var E=!!_.match(/[a-z]/gi)&&x[0].replace(/[0-9]/g,"")===x[1].replace(/[0-9]/g,""),R=!!_.match(/\d/g)&&x[0].replace(/\D/g,"")===x[1].replace(/\D/g,"");w=!!I&&(!!E||!!R),w||(t=o.getConstant("DialogError"))}}else g[0].length>256&&(w=!1,t=o.getConstant("ListLengthError"));if(w){var k=this.parent.getActiveSheet(),A=this.isDialogValidator(S,b,m);if("Between"===m&&A.isValidate&&!isNaN(parseFloat(S[0]))&&!isNaN(parseFloat(S[1]))&&parseFloat(S[0])>parseFloat(S[1])&&(A.isValidate=!1,A.errorMsg=o.getConstant("MinMaxError")),t=A.errorMsg,w=A.isValidate){var F=n.i(i.w)(k.activeCell),N=n.i(a.I)(F[0],F[1],k,!1,!0),T=N.validation&&"List"===N.validation.type,O={range:k.name+"!"+C,value1:S[0],value2:S[1]||"",ignoreBlank:v,type:b,operator:m,inCellDropDown:y,cancel:!1};if(this.parent.notify(a._34,{eventArgs:O,action:"validation"}),!O.cancel){if(this.parent.notify(i._33,{rules:{type:O.type,operator:O.operator,value1:O.value1,value2:O.value2,ignoreBlank:O.ignoreBlank,inCellDropDown:O.inCellDropDown},range:O.range}),N=n.i(a.I)(F[0],F[1],k,!1,!0),N.validation){if(T){var D=this.parent.getCell(F[0],F[1]);D&&D.getElementsByClassName("e-validation-list")[0]&&(this.listObj.destroy(),D.removeChild(D.getElementsByClassName("e-validation-list")[0]))}"List"===N.validation.type&&this.listHandler()}delete O.cancel,document.getElementsByClassName("e-validation-error-dlg")[0]||(e.dialogInstance?e.dialogInstance.hide():e.hide()),this.parent.notify(r._31,{eventArgs:O,action:"validation"})}}}if(!w){var L=this.parent.createElement("div",{className:"e-dlg-error",id:"e-invalid"});L.innerText=t,f.appendChild(L),d.querySelector(".e-primary").setAttribute("disabled","true")}},e.prototype.formattedValue=function(e){var t=this.parent.serviceLocator.getService(l._174);switch(e){case t.getConstant("Between"):e="Between";break;case t.getConstant("NotBetween"):e="NotBetween";break;case t.getConstant("EqualTo"):e="EqualTo";break;case t.getConstant("NotEqualTo"):e="NotEqualTo";break;case t.getConstant("GreaterThan"):e="GreaterThan";break;case t.getConstant("LessThan"):e="LessThan";break;case t.getConstant("GreaterThanOrEqualTo"):e="GreaterThanOrEqualTo";break;case t.getConstant("LessThanOrEqualTo"):e="LessThanOrEqualTo";break;default:e="Between"}return e},e.prototype.formattedType=function(e){var t=this.parent.serviceLocator.getService(l._174);switch(e){case t.getConstant("WholeNumber"):e="WholeNumber";break;case t.getConstant("Decimal"):e="Decimal";break;case t.getConstant("Date"):e="Date";break;case t.getConstant("TextLength"):e="TextLength";break;case t.getConstant("List"):e="List";break;case t.getConstant("Time"):e="Time"}return e},e.prototype.isDialogValidator=function(e,t,r){var i,o=this.parent.serviceLocator.getService(l._174),s=0;if("List"===t?!(e.length>0):"Between"===r||"NotBetween"===r?2!==e.length:!(e.length>0))i={isValidate:!1,errorMsg:o.getConstant("EmptyError")};else{for(var d=void 0,c=0;c<e.length&&(n.i(a._160)(e[c])?d=this.parent.computeExpression(e[c]).toString():"Date"===t||"Time"===t?(d=this.getDateAsNumber({range:[],cell:{value:e[c]}},e[c]),"Date"===t&&(e[c]=d)):d=e[c],i=this.formatValidation(d,t,!0),i.isValidate);c++)s+=1;i.isValidate=s===e.length}return{isValidate:i.isValidate,errorMsg:i.errorMsg}},e.prototype.getDateAsNumber=function(e,t){var n={value:t,rowIndex:e.range[0],cell:e.cell,colIndex:e.range[1],sheetIndex:e.sheetIdx,updatedVal:""};return this.parent.notify(i._6,n),n.updatedVal||t},e.prototype.isValidationHandler=function(e){var t=this.parent.serviceLocator.getService(l._174);e.value=e.value?e.value:"";var r,o,d,c=e.value,h=this.parent.sheets[e.sheetIdx],p=n.i(a.I)(e.range[0],e.range[1],h),u=n.i(a.B)(h,e.range[1]);if(p&&p.validation?d=p.validation:n.i(a.G)(u,e.range[0],e.range[1])&&(d=u.validation),d){var f=d.value1,g=d.value2;n.i(a._160)(f)&&"List"!==d.type&&(f=this.parent.computeExpression(f).toString()),n.i(a._160)(g)&&"List"!==d.type&&(g=this.parent.computeExpression(g).toString()),n.i(a._160)(e.value)&&"List"!==d.type&&(e.value=this.parent.computeExpression(e.value).toString());var m=e.value,v=d.operator||"Between",y=d.type||"WholeNumber",C=!!n.i(s.isNullOrUndefined)(d.ignoreBlank)||d.ignoreBlank;if(C&&""===c)r=!0;else{var b="Date"===y||"Time"===y;if(e.value&&!n.i(i.o)(e.value))if(b||"TextLength"===d.type)m=e.value=this.getDateAsNumber(e,e.value);else{var x=p&&p.format,S=void 0;if(x){if("@"!==x)try{for(var w=n.i(a.M)(x);w;)x=x.split("["+w+"]").join(""),w=n.i(a.M)(x);var _=new s.Internationalization(this.parent.locale),I=n.i(s.getNumberDependable)(l._174,s.defaultCurrencyCode);if("$"!==I&&x.includes("$")&&e.value.includes(I)&&(x=x.split("$").join(I)),x.includes("%")&&e.value.indexOf("%")>0){S=_.getNumberParser({format:"n"})(e.value);var E=x.indexOf("%");'"'!==x[E-1]&&(S/=100)}else S=_.getNumberParser({format:x})(e.value)}catch(t){S=e.value}}else{var R={formattedText:e.value,value:e.value,format:"General",cell:{value:e.value,format:"General"}};this.parent.notify(a._41,R),S=R.value}S!==e.value&&n.i(i.o)(S)&&(m=e.value=S.toString())}var k=this.formatValidation(e.value,y);if(r=k.isValidate,o=k.errorMsg,r)if(r=!1,b?(f&&!n.i(i.o)(f)&&(f=this.getDateAsNumber(e,f)),g&&!n.i(i.o)(g)&&(g=this.getDateAsNumber(e,g))):"TextLength"===d.type&&(m=e.value.toString().length.toString()),"List"===y){if(-1!==f.indexOf("=")){this.data=n.i(s.isNullOrUndefined)(this.data)||this.data.length?this.data:this.updateDataSource(p,d);for(var E=0;E<this.data.length;E++)e.value.toString()===this.data[E].text&&(r=!0)}else for(var A=f.split(","),E=0;E<A.length;E++)e.value.toString()===A[E]&&(r=!0);!r&&C&&""===e.value.toString()&&(r=!0)}else switch("Decimal"===y||"Time"===y?(m=parseFloat(m.toString()),f=parseFloat(f.toString()),g=g?parseFloat(g.toString()):null):(m=parseInt(m.toString(),10),f=parseInt(f.toString(),10),g=g?parseInt(g.toString(),10):null),v){case"EqualTo":r=m===f||!(!C||""!==c);break;case"NotEqualTo":r=m!==f||!(!C||""!==c);break;case"Between":r=m>=f&&m<=g||!(!C||""!==c);break;case"NotBetween":r=!(m>=f&&m<=g);break;case"GreaterThan":r=m>f||!(!C||""!==c);break;case"LessThan":r=m<f||!(!C||""!==c);break;case"GreaterThanOrEqualTo":r=m>=f||!(!C||""!==c);break;case"LessThanOrEqualTo":r=m<=f||!(!C||""!==c)}}}if(o=t.getConstant("ValidationError"),r&&(p&&p.validation&&p.validation.isHighlighted||u&&u.validation&&u.validation.isHighlighted)){var F=this.parent.getCellStyleValue(["backgroundColor","color"],[e.range[0],e.range[1]]);n.i(a.v)(h,e.range[0])||this.parent.notify(i.f,{style:F,rowIdx:e.range[0],colIdx:e.range[1],isHeightCheckNeeded:!0,manualUpdate:!0,onActionUpdate:!0,td:e.td})}return{isValidate:r,errorMsg:o}},e.prototype.checkDataValidation=function(e){var t=n.i(a.I)(e.range[0],e.range[1],this.parent.getActiveSheet());e.td=e.td||this.parent.getCell(e.range[0],e.range[1]),e.sheetIdx=e.sheetIdx||this.parent.activeSheetIndex;var r={skip:!1,value:""};if(t&&t.validation){if(n.i(a._160)(t.validation.value1)&&!n.i(a._161)(t.validation.value1.substring(1,t.validation.value1.length))&&t.validation.value1.indexOf("(")>-1){var i=t.validation.value1;i=i.substring(i.indexOf("=")+1,i.indexOf("(")),r.value=i.toUpperCase(),this.parent.notify(a._66,r)}if(!r.skip&&n.i(a._160)(t.validation.value2)&&!n.i(a._161)(t.validation.value2.substring(1,t.validation.value2.length))&&t.validation.value1.indexOf("(")>-1){var o=t.validation.value2;o=o.substring(o.indexOf("=")+1,o.indexOf("(")),r.value=o.toUpperCase(),this.parent.notify(a._66,r)}}if(!r.skip){var s=this.isValidationHandler(e);!s.isValidate&&e.isCell&&this.validationErrorHandler(s.errorMsg),e.isValid=s.isValidate}},e.prototype.formatValidation=function(e,t,r){var a,s=this.parent.element.getElementsByClassName("e-sheet-panel")[0],l=this.parent.createElement("form",{id:"formId",className:"form-horizontal"}),d=this.parent.createElement("input",{id:"e-validation"});if(d.setAttribute("name","validation"),d.setAttribute("type","text"),"Date"===t&&n.i(i.o)(e)){var c=e.toString().split(".");2==c.length&&(e=c[0])}d.setAttribute("value",e),l.appendChild(d),s.appendChild(l);var h;switch(t){case"Date":h={rules:{validation:{date:!0}},customPlacement:function(e,t){a=t.innerText}};break;case"Decimal":h={rules:{validation:{number:!0}},customPlacement:function(e,t){a=t.innerText}};break;case"WholeNumber":h={rules:{validation:{regex:/^-?\d*\.?[0]*$/}},customPlacement:function(e,t){a=t.innerText}};break;case"TextLength":r&&(h={rules:{validation:{regex:/^\d*\.?[0]*$/}},customPlacement:function(e,t){a=t.innerText}})}var p=new o.FormValidator("#formId",h),u=p.validate();return s.removeChild(s.getElementsByClassName("form-horizontal")[0]),{isValidate:u,errorMsg:a}},e.prototype.InvalidElementHandler=function(e){var t=e.rowIdx,n=e.colIdx,r=e.isRemoveHighlightedData;if(r){if(r){var a=this.parent.getCellStyleValue(["backgroundColor","color"],[t,n]);this.parent.notify(i.f,{style:a,rowIdx:t,colIdx:n,td:e.td})}}else this.parent.notify(i.f,{style:{backgroundColor:"#ffff00",color:"#ff0000"},rowIdx:t,colIdx:n,td:e.td})},e.prototype.validationErrorHandler=function(e){var t=this,n=document.getElementsByClassName("e-spreadsheet-edit")[0],r=this.parent.serviceLocator.getService(l._174);if(!this.parent.element.querySelector(".e-validation-error-dlg")){var i=this.parent.serviceLocator.getService(l._175),a={width:400,height:200,isModal:!0,showCloseIcon:!0,cssClass:"e-validation-error-dlg",target:document.querySelector(".e-control.e-spreadsheet"),beforeOpen:function(r){var a={dialogName:"ValidationErrorDialog",element:r.element,target:r.target,cancel:r.cancel,content:e};t.parent.trigger("dialogBeforeOpen",a),a.cancel&&(t.errorDlgHandler(i,"Cancel"),r.cancel=!0),n.focus(),i.dialogInstance.content=a.content,i.dialogInstance.dataBind()},buttons:[{buttonModel:{content:r.getConstant("Retry"),isPrimary:!0},click:function(){t.errorDlgHandler(i,"Retry")}},{buttonModel:{content:r.getConstant("Cancel")},click:function(){t.errorDlgHandler(i,"Cancel")}}]};i.show(a,!1)}},e.prototype.errorDlgHandler=function(e,t){if("Retry"===t){var r=document.getElementsByClassName("e-spreadsheet-edit")[0];e.hide(),r.innerText&&(window.getSelection().selectAllChildren(r),this.listObj&&!this.listObj.isDestroyed&&this.listObj.showPopup())}else{var o=n.i(i.w)(this.parent.getActiveSheet().activeCell),s=n.i(a.I)(o[0],o[1],this.parent.getActiveSheet()),d=s?this.parent.getDisplayText(s):"";this.parent.notify(l.j,{action:"cancelEdit",value:d,refreshFormulaBar:!0,refreshEditorElem:!0,isAppend:!1,trigEvent:!0}),e.hide()}},e.prototype.getModuleName=function(){return"dataValidation"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n(2),a=n(0),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.delete=function(e){var t=e.eventArgs;if("Sheet"===t.modelType){var o=t.activeSheetIndex>=t.startIndex&&t.activeSheetIndex<=t.endIndex;o&&this.parent.setProperties({activeSheetIndex:this.parent.skipHiddenSheets(t.startIndex<this.parent.sheets.length?t.startIndex:t.startIndex?t.startIndex-1:0)},!0),this.parent.notify(r.e,null),o&&this.parent.renderModule.refreshSheet(!1,!1,!0)}else if(t.activeSheetIndex===this.parent.activeSheetIndex){var s=this.parent.getActiveSheet();if("Row"===t.modelType){if(!this.parent.scrollSettings.enableVirtualization||t.startIndex<=this.parent.viewport.bottomIndex)if(this.parent.scrollSettings.enableVirtualization){var l=this.parent.frozenRowCount(s);if(t.startIndex<n.i(a.U)(s.paneTopLeftCell)[0])this.parent.updateTopLeftCell(n.i(i._50)(s,t.startIndex-1<l?l:t.startIndex-1,!0)-l,null,"col"),this.parent.renderModule.refreshSheet(!1,!1,!0);else if(t.freezePane||this.parent.scrollSettings.isFinite&&this.parent.viewport.bottomIndex>=n.i(i._50)(s,s.rowCount-1,!1))this.parent.renderModule.refreshSheet(!1,!1,!0);else{var d=[],c=this.parent.frozenColCount(s),h=void 0,p=this.parent.viewport.leftIndex;c?(d.push(l),d.push(p+c),h=n.i(a.U)(s.topLeftCell)[1]):h=p,this.parent.renderModule.refreshUI({rowIndex:this.parent.viewport.topIndex,refresh:"Row",colIndex:h,skipUpdateOnFirst:this.parent.viewport.topIndex+l===n.i(i._50)(s,l,!0),frozenIndexes:d}),c&&(this.parent.viewport.leftIndex=p),this.parent.selectRange(s.selectedRange)}}else this.parent.renderModule.refreshUI({skipUpdateOnFirst:!0,refresh:"Row",rowIndex:this.parent.viewport.topIndex,colIndex:0}),this.parent.selectRange(s.selectedRange)}else{if(!1!==t.refreshSheet&&(!this.parent.scrollSettings.enableVirtualization||t.startIndex<=this.parent.viewport.rightIndex)){var c=this.parent.frozenColCount(s);if(this.parent.scrollSettings.enableVirtualization)if(t.startIndex<n.i(a.U)(s.paneTopLeftCell)[1])this.parent.updateTopLeftCell(null,n.i(i._50)(s,t.startIndex-1<c?c:t.startIndex-1,!0,"columns")-c,"row"),this.parent.renderModule.refreshSheet(!1,!1,!0);else if(t.freezePane||!0===t.refreshSheet)this.parent.renderModule.refreshSheet(!1,!1,!0);else{var l=this.parent.frozenRowCount(s),d=[],u=this.parent.viewport.topIndex,f=l?n.i(a.U)(s.topLeftCell)[0]:u;l&&(d=[l+u,c]),this.parent.renderModule.refreshUI({rowIndex:f,refresh:"Column",colIndex:this.parent.viewport.leftIndex,insertDelete:!0,skipUpdateOnFirst:this.parent.viewport.leftIndex+c===n.i(i._50)(s,c,!0,"columns"),frozenIndexes:d}),l&&(this.parent.viewport.topIndex=u),this.parent.selectRange(s.selectedRange)}else this.parent.renderModule.refreshUI({skipUpdateOnFirst:!0,refresh:"Column",rowIndex:0,colIndex:this.parent.viewport.leftIndex,insertDelete:!0}),this.parent.selectRange(s.selectedRange)}delete t.refreshSheet}}this.refreshImgElement(t.deletedModel.length,this.parent.activeSheetIndex,t.modelType,t.startIndex),t.isAction?(delete t.isAction,this.parent.notify(r._31,e),n.i(r._159)(this.parent.element)):t.isUndoRedo||(t.isMethod=!0,this.parent.notify(i._84,e))},e.prototype.addEventListener=function(){this.parent.on(i._45,this.delete,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i._45,this.delete)},e.prototype.getModuleName=function(){return"delete"},e.prototype.refreshImgElement=function(e,t,i,o){for(var s,l=this.parent.sheets[t],d=[0,0,l.usedRange.rowIndex,l.usedRange.colIndex],c=0;c<=d[2];c++)for(var h=d[1];h<=d[3];h++)(s=n.i(a.I)(c,h,l))&&s.image&&s.image.length>0&&("Row"===i&&c>=o||"Column"===i&&h>=o)&&this.parent.notify(r._80,{rowIdx:c,colIdx:h,sheetIdx:t,type:i,count:e,status:"delete"})},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(3),i=(n.n(r),n(15)),a=n(7),o=n(1),s=n(6),l=n(4),d=n(0),c=function(){function e(e){this.editorElem=null,this.editCellData={},this.isEdit=!1,this.isCellEdit=!0,this.isNewValueEdit=!0,this.isAltEnter=!1,this.formulaBarCurStartPos=null,this.curEndPos=null,this.curStartPos=null,this.selectionStart=null,this.selectionEnd=null,this.uniqueColl="",this.uniqueActCell="",this.isSpill=!1,this.keyCodes={BACKSPACE:8,SPACE:32,TAB:9,DELETE:46,ESC:27,ENTER:13,FIRSTALPHABET:65,LASTALPHABET:90,FIRSTNUMBER:48,LASTNUMBER:59,FIRSTNUMPAD:96,LASTNUMPAD:111,SYMBOLSETONESTART:186,SYMBOLSETONEEND:192,SYMBOLSETTWOSTART:219,SYMBOLSETTWOEND:222,FIREFOXEQUALPLUS:61,FIREFOXMINUS:173,F2:113},this.formulaErrorStrings=["mismatched parentheses","requires 3 arguments","improper formula","empty expression","mismatched string quotes","wrong number of arguments","invalid arguments"],this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.isEdit&&this.cancelEdit(!0,!1),this.removeEventListener(),this.parent=null,this.editorElem=null},e.prototype.addEventListener=function(){r.Browser.isDevice&&"safari"===r.Browser.info.name&&(r.Browser.isIos||r.Browser.isIos7)?r.EventHandler.add(this.parent.element,"touchend",this.tapHandler,this):r.EventHandler.add(this.parent.element,"dblclick",this.dblClickHandler,this),this.parent.on(a.E,this.mouseDownHandler,this),this.parent.on(o.n,this.keyUpHandler,this),this.parent.on(a.q,this.keyDownHandler,this),this.parent.on(a.m,this.performEditOperation,this),this.parent.on(o._64,this.initiateCurPosition,this),this.parent.on(a.n,this.updateFormulaBarValue,this),this.parent.on(o._67,this.addressHandler,this),this.parent.on(a.F,this.initiateRefSelection,this),this.parent.on(a.G,this.refSelectionRender,this),this.parent.on(s._24,this.checkUniqueRange,this),this.parent.on(s._61,this.reApplyFormula,this),this.parent.on(a.H,this.sheetChangeHandler,this)},e.prototype.removeEventListener=function(){r.Browser.isDevice&&"safari"===r.Browser.info.name&&(r.Browser.isIos||r.Browser.isIos7)?r.EventHandler.remove(this.parent.element,"touchend",this.tapHandler):r.EventHandler.remove(this.parent.element,"dblclick",this.dblClickHandler),this.parent.isDestroyed||(this.parent.off(a.E,this.mouseDownHandler),this.parent.off(o.n,this.keyUpHandler),this.parent.off(a.q,this.keyDownHandler),this.parent.off(a.m,this.performEditOperation),this.parent.off(o._64,this.initiateCurPosition),this.parent.off(a.n,this.updateFormulaBarValue),this.parent.off(o._67,this.addressHandler),this.parent.off(a.F,this.initiateRefSelection),this.parent.off(a.G,this.refSelectionRender),this.parent.off(s._24,this.checkUniqueRange),this.parent.off(s._61,this.reApplyFormula),this.parent.off(a.H,this.sheetChangeHandler))},e.prototype.getModuleName=function(){return"edit"},e.prototype.performEditOperation=function(e){switch(e.action){case"renderEditor":if(this.renderEditor(),e.initLoad&&r.Browser.isDevice&&"safari"===r.Browser.info.name&&(r.Browser.isIos||r.Browser.isIos7)){var t=this.parent.createElement("div",{className:"e-ss-focus-edit",attrs:{contentEditable:"true",inputmode:"none",tabindex:"-1"}}),i=this.parent.element.querySelector(".e-sheet-panel");i&&(i.style.position="relative",i.appendChild(t)),this.parent.element.onfocus=function(){n.i(o._159)(t)}}break;case"refreshEditor":this.refreshEditor(e.value,e.refreshFormulaBar,e.refreshEditorElem,e.isAppend,e.trigEvent),e.refreshCurPos&&this.setCursorPosition();break;case"startEdit":if(this.isEdit){var s={isEdit:!1};this.parent.notify(a.I,s),s.isEdit&&(this.isNewValueEdit=e.isNewValueEdit,this.startEdit(e.address,e.value,e.refreshCurPos))}else this.isNewValueEdit=e.isNewValueEdit,this.startEdit(e.address,e.value,e.refreshCurPos);break;case"endEdit":this.isEdit&&this.endEdit(e.refreshFormulaBar,null,e.isPublic);break;case"cancelEdit":this.isEdit&&this.cancelEdit(e.refreshFormulaBar);break;case"getCurrentEditValue":e.editedValue=this.editCellData.value,void 0!==e.endFormulaRef&&(e.endFormulaRef=this.endFormulaRef);break;case"refreshDependentCellValue":this.refreshDependentCellValue(e.rowIdx,e.colIdx,e.sheetIdx);break;case"getElement":e.element=this.getEditElement(this.parent.getActiveSheet());break;case"focusEditorElem":this.editorElem.focus();break;case"getCurrentEditSheetIdx":e.sheetIndex=this.editCellData.sheetIndex}},e.prototype.keyUpHandler=function(e){if(this.isEdit){var t=this.getEditElement(this.parent.getActiveSheet());e.altKey&&13===e.keyCode?(t.focus(),this.altEnter(),this.isAltEnter=!0):this.isCellEdit&&this.editCellData.value!==t.textContent&&16!==e.keyCode&&(!e.shiftKey||e.shiftKey&&!n.i(o._135)(e.keyCode))&&this.refreshEditor(t.textContent,this.isCellEdit);if(n.i(d._160)(this.editCellData.value,!0)&&(!e||16!==e.keyCode&&(!e.shiftKey||e.shiftKey&&!n.i(o._135)(e.keyCode)))&&(this.updateFormulaReference(t),this.endFormulaRef)){var r=this.getCurPosition(),i=["+","-","*","/",this.parent.listSeparator,"(","=","&",":"];r.end&&i.indexOf(this.editCellData.value[r.end-1])>-1&&(this.endFormulaRef=!1)}}},e.prototype.updateFormulaReference=function(e){var t=this.parent.element.querySelector(".e-formularef-indicator");t&&t.parentElement.removeChild(t),this.editCellData.value!==e.textContent&&this.refreshEditor(e.textContent,!0);var n=this.editCellData.sheetIndex,r=this.editCellData.value;this.parent.notify(o._63,{range:r,formulaSheetIdx:n})},e.prototype.keyDownHandler=function(e){var t=e.target,i=e.keyCode,a=this.parent.getActiveSheet(),c=n.i(d.U)(a.activeCell),h=n.i(l.h)(c[0],c[1],a,!1,!0);if(!n.i(r.closest)(t,".e-spreadsheet .e-dialog"))if(!a.isProtected||t.classList.contains("e-sheet-rename")||!n.i(d._169)(h,n.i(l.t)(a,c[1]))||t.classList.contains("e-formula-bar")&&!t.disabled){if(this.isEdit){var p=this.getEditElement(a),u=n.i(d._160)(this.editCellData.value,!0);if((this.isCellEdit||u&&this.editCellData.value!==p.textContent&&16!==e.keyCode)&&(c[1]<this.parent.frozenColCount(a)&&(!a.frozenRows||c[0]>=this.parent.frozenRowCount(a))&&p&&"auto"!==p.style.height&&n.i(o._152)(p.textContent,h.style,this.parent.cellStyle)>parseInt(p.style.maxWidth,10)&&(p.style.height="auto"),n.i(o._152)(p.textContent,h.style,this.parent.cellStyle)>parseInt(p.style.maxWidth,10)-5&&(p.style.height="auto"),c[0]<this.parent.frozenRowCount(a)&&p&&!p.style.overflow&&n.i(o._152)(p.textContent,h.style,this.parent.cellStyle)>parseInt(p.style.maxWidth,10)&&(p.style.overflow="auto"),(!e.shiftKey||e.shiftKey&&!n.i(o._135)(e.keyCode))&&this.refreshEditor(p.textContent,this.isCellEdit,!1,!1,!1)),!e.altKey)switch(i){case this.keyCodes.ENTER:if(r.Browser.isWindows&&e.preventDefault(),this.isAltEnter){var f=p.textContent;f&&f.indexOf("\n")>-1&&(n.i(d.L)(this.parent.getActiveSheet().selectedRange,!0,this.parent,!0),this.refreshEditor(p.textContent,this.isCellEdit,!1,!1,!1),this.isAltEnter=!1)}if(u){var g=this.parent.element.querySelector(".e-formularef-indicator");g&&g.parentElement.removeChild(g),n.i(d.l)(this.parent,this.editCellData.sheetIndex).id===a.id?this.endEdit(!1,e):(this.parent.goTo(this.editCellData.fullAddr),this.endEdit(!1,e))}else this.endEdit(!1,e);break;case this.keyCodes.TAB:this.hasFormulaSuggSelected()||this.endEdit(!1,e);break;case this.keyCodes.ESC:this.cancelEdit(!0,!0,e)}}else if(t.classList.contains("e-spreadsheet")||n.i(r.closest)(t,".e-sheet-panel")){13===i&&"true"===t.contentEditable&&e.preventDefault();var m=String.fromCharCode(i),v=i>=this.keyCodes.FIRSTALPHABET&&i<=this.keyCodes.LASTALPHABET||m.toLowerCase()!==m.toUpperCase()&&!(i>=112&&i<=123),y=i>=this.keyCodes.FIRSTNUMBER&&i<=this.keyCodes.LASTNUMBER,C=i>=this.keyCodes.FIRSTNUMPAD&&i<=this.keyCodes.LASTNUMPAD,b=i>=this.keyCodes.SYMBOLSETONESTART&&i<=this.keyCodes.SYMBOLSETONEEND;b||(b=i>=this.keyCodes.SYMBOLSETTWOSTART&&i<=this.keyCodes.SYMBOLSETTWOEND);var x=i===this.keyCodes.FIREFOXEQUALPLUS||i===this.keyCodes.FIREFOXMINUS,S=!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&i===this.keyCodes.F2,w=i===this.keyCodes.BACKSPACE,_=/(Macintosh|MacIntel|MacPPC|Mac68K|Mac|Mac OS|iPod|iPad)/i.test(navigator.userAgent)&&w;if(!e.ctrlKey&&!e.metaKey&&!e.altKey&&(!e.shiftKey&&i===this.keyCodes.SPACE||v||y||C||b||"mozilla"===r.Browser.info.name&&x)||S||w){S&&(this.isNewValueEdit=!1);var I=this.parent.element.getElementsByClassName("e-ss-overlay-active");I.length?w&&!_&&this.editingHandler("delete"):(this.startEdit(null,null,!0,!0),n.i(o._159)(this.getEditElement(a)))}if(i===this.keyCodes.DELETE||_){var E=a.isProtected&&n.i(o._160)(this.parent);E?this.parent.notify(o._50,null):(this.editingHandler("delete"),this.parent.notify(s.Q,null))}}}else if((i>=this.keyCodes.FIRSTALPHABET&&i<=this.keyCodes.LASTALPHABET||i>=this.keyCodes.FIRSTNUMBER&&i<=this.keyCodes.LASTNUMBER||i===this.keyCodes.DELETE||i===this.keyCodes.BACKSPACE||i===this.keyCodes.SPACE||i>=this.keyCodes.FIRSTNUMPAD&&i<=this.keyCodes.LASTNUMPAD||i>=this.keyCodes.SYMBOLSETONESTART&&i<=this.keyCodes.SYMBOLSETONEEND||i>=219&&i<=222||!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&i===this.keyCodes.F2)&&67!==i&&89!==i&&90!==i){if(a.protectSettings.insertLink&&75===i)return;e.ctrlKey||70===e.keyCode||this.parent.element.querySelector(".e-editAlert-dlg")||t.parentElement.classList.contains("e-unprotectpwd-content")||t.parentElement.classList.contains("e-password-content")||t.parentElement.classList.contains("e-sheet-password-content")||t.parentElement.classList.contains("e-unprotectsheetpwd-content")||t.parentElement.classList.contains("e-reenterpwd-content")||this.parent.notify(o._50,null)}},e.prototype.renderEditor=function(){if(!this.editorElem||!n.i(r.select)("#"+this.parent.element.id+"_edit",this.parent.element)){var e=this.parent.createElement("div",{id:this.parent.element.id+"_edit",className:"e-spreadsheet-edit",attrs:{contentEditable:"true",role:"textbox",spellcheck:"false","aria-multiline":"true"}});this.parent.element.getElementsByClassName("e-spreadsheet-edit")[0]&&this.parent.element.getElementsByClassName("e-spreadsheet-edit")[0].remove();var t=this.parent.element.querySelector(".e-sheet-content");if(!t)return;t.appendChild(e),this.editorElem=e}this.parent.notify(o.k,{action:"renderAutoComplete"})},e.prototype.refreshEditor=function(e,t,n,r,i,a){void 0===i&&(i=!0),r?e=this.editCellData.value=this.editCellData.value+e:this.editCellData.value=a||e;var s=this.getEditElement(this.parent.getActiveSheet());n&&s&&(s.textContent=e),t&&this.parent.notify(o.l,{action:"refreshFormulabar",value:e}),this.parent.isEdit&&s&&i&&this.editCellData.value===s.textContent&&this.triggerEvent("cellEditing").cancel&&this.cancelEdit(!1,!1,null,!0)},e.prototype.startEdit=function(e,t,r,i){void 0===r&&(r=!0),this.parent.showSheetTabs&&this.parent.element.querySelector(".e-add-sheet-tab").setAttribute("disabled","true");var s=this.parent.getActiveSheet(),c=n.i(d.U)(s.activeCell),h=n.i(l.h)(c[0],c[1],s,!1,!0);if(n.i(o._148)(this.parent,c[0],c[1],this.parent.activeSheetIndex)){var p=this.parent.getCell(c[0],c[1]),u=!1,f=p.innerHTML;if(p&&f.indexOf("<")>-1&&f.indexOf(">")>-1&&f.indexOf("input")>-1&&(u=!0),u)return}var g=this.updateEditCellDetail(e,t);this.initiateEditor(r,g),this.positionEditor(),this.parent.isEdit=this.isEdit=!0,this.parent.notify(a.J,null),this.parent.notify(a.K,[{enable:!1}]),h.formula&&!i&&this.parent.notify(o._63,{range:h.formula,formulaSheetIdx:this.editCellData.sheetIndex})},e.prototype.setCursorPosition=function(){var e=this.getEditElement(this.parent.getActiveSheet()),t=e.textContent.length;if(t){var n=document.getSelection(),r=document.createRange();r.setStart(e.firstChild,t),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}e.focus()},e.prototype.hasFormulaSuggSelected=function(){var e=document.getElementById(this.parent.element.id+"_ac_popup");return e&&"visible"===e.style.visibility&&e.querySelectorAll(".e-item-focus").length>0},e.prototype.editingHandler=function(e){var t,c=document.getElementsByClassName("e-ss-overlay-active"),h=c.length;switch(e){case"delete":if(h>0)c[0].classList.contains("e-datavisualization-chart")?this.parent.notify(a.b,{id:c[0].id,sheetIdx:this.parent.activeSheetIndex+1}):this.parent.notify(o._76,{id:c[0].id,sheetIdx:this.parent.activeSheetIndex+1});else{var p=this.parent.getActiveSheet(),u=p.selectedRange,f=n.i(i.e)(u);f=f[0]>f[2]||f[1]>f[3]?n.i(d._4)(f):f,u=n.i(i.b)(f);var g={address:p.name+"!"+u,cancel:!1};if(this.parent.notify(d._34,{action:"cellDelete",eventArgs:g}),g.cancel)return;u=n.i(i.j)(g.address),f=n.i(i.d)(u),n.i(o._162)(this.parent,f,this.parent.activeSheetIndex),this.parent.notify(d._148,{}),0===f[0]&&0===f[1]&&f[2]>=p.usedRange.rowIndex&&f[3]>=p.usedRange.colIndex&&this.parent.setUsedRange(0,0,p,!1,!0);var m={cellIdx:f,isUnique:!1};if(this.checkUniqueRange(m),m.isUnique){var v=n.i(i.d)(this.uniqueColl),y=n.i(l.h)(v[0],v[1],this.parent.getActiveSheet());y&&y.value&&(t=y.value.toString().indexOf("#SPILL!")>-1)}if(m.isUnique&&this.uniqueColl.split(":")[0]===u.split(":")[0]){for(var C=n.i(i.d)(this.uniqueColl),b=C[0];b<=C[2];b++)for(var x=C[1];x<=C[3];x++)this.parent.updateCell({value:"",formula:""},n.i(i.b)([b,x]));this.parent.notify(s._37,null),this.uniqueColl=""}else if(m.isUnique){var S=n.i(i.d)(this.uniqueColl);if("#SPILL!"===n.i(l.h)(S[0],S[1],p).value){for(var w=!1,x=S[0];x<=S[2];x++)for(var _=S[1];_<=S[3];_++){var y=n.i(l.h)(x,_,p);x===S[0]&&_===S[1]?w=!1:y&&!n.i(r.isNullOrUndefined)(y.value)&&""!==y.value&&(w=!0)}w||this.reApplyFormula()}}m.isUnique?this.parent.notify(a.j,{action:"cellDelete",eventArgs:{address:p.name+"!"+u,isSpill:t}}):this.parent.notify(a.j,{action:"cellDelete",eventArgs:{address:p.name+"!"+u}})}}},e.prototype.getCurPosition=function(){var e={},t=window.getSelection();if(this.editorElem.textContent===this.editCellData.value&&(e.start=t.anchorOffset,e.end=t.focusOffset,e.start>e.end)){var n=e.start;e.start=e.end,e.end=n}if(t&&t.focusNode&&t.focusNode.classList&&t.focusNode.classList.contains("e-formula-bar-panel")&&this.editorElem.textContent===this.editCellData.value){var r=t.focusNode.getElementsByClassName("e-formula-bar e-css")[0];e.start=r.selectionStart,e.end=r.selectionEnd}return e},e.prototype.mouseDownHandler=function(e){if(!n.i(r.closest)(e.target,".e-findtool-dlg")&&!n.i(r.closest)(e.target,".e-validation-error-dlg")&&this.isEdit){var t=this.getCurPosition();t.start&&(this.curStartPos=this.selectionStart=t.start),t.end&&(this.curEndPos=this.selectionEnd=t.end);var i=e.target,a=this.parent.getActiveSheet(),o=this.parent.element.querySelector(".e-formularef-indicator");this.isCellEdit=i.classList.contains("e-spreadsheet-edit");var s=n.i(d._160)(this.editCellData.value,!0),c=this.getEditElement(a),h=["+","-","*","/",this.parent.listSeparator,"(","=","&",":"];if(i.classList.contains("e-cell")||i.classList.contains("e-header-cell")||i.classList.contains("e-selectall")||n.i(r.closest)(i,".e-toolbar-item.e-active")||n.i(r.closest)(i,".e-table")){if(this.isAltEnter){var p=c.textContent;p&&p.indexOf("\n")>-1&&(this.isAltEnter=!1,n.i(d.L)(this.parent.getActiveSheet().selectedRange,!0,this.parent),this.refreshEditor(c.textContent,this.isCellEdit))}if(!s||this.endFormulaRef)this.endFormulaRef=!1,this.endEdit(!1,e);else{var u=this.selectionEnd,f=n.i(d.U)(a.activeCell),g=n.i(l.h)(f[0],f[1],a);if(this.selectionStart!==this.selectionEnd&&this.editCellData.value===c.textContent&&-1!==h.indexOf(c.textContent.substring(this.selectionStart-1,this.selectionStart))&&n.i(d._161)(c.textContent.substring(this.selectionStart,this.selectionEnd))&&c.textContent.indexOf(":")!==this.selectionEnd&&(this.editCellData.value=c.textContent.substring(0,this.selectionStart)+c.textContent.substring(this.selectionEnd,c.textContent.length)),this.editCellData.value===c.textContent&&c.textContent.indexOf("(")!==c.textContent.length-1&&-1!==c.textContent.indexOf("(")&&this.selectionStart===this.selectionEnd)if(this.editCellData.sheetIndex!==n.i(l.m)(this.parent,a.name)){var m=this.parent.element.querySelector(".e-formula-bar");if(c.textContent.substring(m.selectionEnd-1,m.selectionEnd)!==this.parent.listSeparator&&!e.shiftKey)return o&&o.parentElement.removeChild(o),this.parent.goTo(this.editCellData.fullAddr),void this.endEdit(!1,e)}else if(-1===h.indexOf(c.textContent.substring(u-1,u)))return o&&o.parentElement.removeChild(o),void this.endEdit(!1,e);if(!g)return;if((s=!!g.formula&&(n.i(d._160)(n.i(l.h)(f[0],f[1],a).formula)||this.editCellData.value&&0===this.editCellData.value.toString().indexOf("=")))&&this.parent.isEdit){var v=this.selectionEnd;this.editCellData.value.length===v?(")"===this.editCellData.value.substring(this.editCellData.value.length-1)||n.i(d._190)(this.editCellData.value.substring(this.editCellData.value.length-1)))&&(o&&o.parentElement.removeChild(o),this.endEdit(!1,e)):this.editCellData.value===c.textContent&&(-1===h.indexOf((this.editCellData.value+a.selectedRange).substring(v-1,v))?(o&&o.parentElement.removeChild(o),this.endEdit(!1,e)):(-1===h.indexOf(c.textContent.substring(v-1,v))||")"!==c.textContent.substring(v,v+1)&&-1===h.indexOf(c.textContent.substring(v,v+1)))&&(o&&o.parentElement.removeChild(o),this.endEdit(!1,e)))}}}else if(s&&this.editCellData.value===c.textContent&&c.textContent.indexOf("(")!==c.textContent.length-1&&!this.isCellEdit&&-1===h.indexOf(this.editCellData.value.substring(this.selectionStart-1,this.selectionStart))&&n.i(d.l)(this.parent,this.editCellData.sheetIndex).id===a.id){var u=window.getSelection().focusOffset;if(-1===h.indexOf(c.textContent.substring(u-1,u)))return o&&o.parentElement.removeChild(o),this.parent.goTo(this.editCellData.fullAddr),void(this.isEdit&&this.endEdit(!1,e))}}},e.prototype.tapHandler=function(e){var t=this;if(!this.tapedTwice)return this.tapedTwice=!0,void setTimeout(function(){if(t.tapedTwice=!1,!t.parent.isEdit&&e.target.classList.contains("e-cell")){var r=t.parent.element.querySelector(".e-ss-focus-edit");r&&n.i(o._159)(r)}},300);e.preventDefault(),this.dblClickHandler(e)},e.prototype.dblClickHandler=function(e){var t=e.target;if(!n.i(r.closest)(t,".e-datavisualization-chart")&&!t.classList.contains("e-ss-overlay")&&(t.classList.contains("e-active-cell")||t.classList.contains("e-cell")||t.classList.contains("e-wrap-content")||n.i(r.closest)(t,".e-sheet-content")||t.classList.contains("e-table"))){var i=this.parent.getActiveSheet(),a=n.i(d.U)(i.activeCell),s=n.i(l.h)(a[0],a[1],i,!1,!0);if(i.isProtected&&n.i(d._169)(s,n.i(l.t)(i,a[1])))this.parent.notify(o._50,null);else if(this.isEdit){if(!t.classList.contains("e-spreadsheet-edit"))if(n.i(d._160)(this.editCellData.value)){var c=this.editCellData.fullAddr.substring(0,this.editCellData.fullAddr.indexOf("!"));this.parent.getActiveSheet().name===c&&this.endEdit()}else this.endEdit()}else this.isNewValueEdit=!1,this.startEdit(),n.i(o._159)(this.getEditElement(i))}},e.prototype.updateEditCellDetail=function(e,t){var a,s,c;if(a=n.i(r.isNullOrUndefined)(this.editCellData.sheetIndex)?e&&e.split("!").length>1?n.i(l.m)(this.parent,n.i(d.g)(e)):this.parent.activeSheetIndex:this.editCellData.sheetIndex,this.editCellData.addr?n.i(d._160)(this.editCellData.value,!0)&&(s=n.i(d.l)(this.parent,a),this.isNewValueEdit=!1):(s=n.i(d.l)(this.parent,a),e=e?n.i(i.j)(e):s.activeCell),e){var h=n.i(i.d)(e),p=h[0],u=h[1],f=n.i(l.h)(p,u,s,!1,!0);if(f.colSpan>1||f.rowSpan>1){var g={sheet:s,cell:f,rowIdx:p,colIdx:u};n.i(d._183)(g),p=g.rowIdx,u=g.colIdx,c=g.isMergedHiddenCell}var m=this.parent.getCell(p,u),v=n.i(o._121)(s,h,this.parent.frozenRowCount(s),this.parent.frozenColCount(s),this.parent.viewport.beforeFreezeHeight,this.parent.viewport.beforeFreezeWidth,this.parent.sheetModule.colGroupWidth);this.editCellData={addr:e,fullAddr:n.i(l.u)(this.parent,a)+"!"+e,rowIndex:p,colIndex:u,sheetIndex:a,element:m,value:t||"",position:v}}return c},e.prototype.initiateEditor=function(e,t){var i=this;n.i(d.P)(this.parent,this.editCellData.fullAddr,!1,t).then(function(t){i.parent&&t.forEach(function(t){var a,o=function(){var e={cell:t,value:t?t.value:"",showFormattedText:i.editCellData.showFormattedText};i.parent.notify(s.X,e),a=t?t.formula||e.value:"",i.editCellData.oldValue=a};o();var l=i.triggerEvent("cellEdit",null,a);if(l.cancel)return void i.cancelEdit(!0,!1,null,!0);l.showFormattedText&&(i.editCellData.showFormattedText=!0,o()),i.editCellData.value?a=i.editCellData.value:i.editCellData.value=a;var d;i.isNewValueEdit?(d=a,a=""):i.isNewValueEdit=!0,n.i(r.isUndefined)(a)||i.refreshEditor(a,!1,!0,!1,!1,d),e&&i.setCursorPosition()})})},e.prototype.positionEditor=function(e){var t,i=this.editCellData.element,d={isEdit:!1};if(this.parent.notify(a.I,d),d.isEdit&&n.i(r.isNullOrUndefined)(i)&&(t=this.parent.getCell(this.editCellData.rowIndex,this.editCellData.colIndex),i=t,this.editCellData.element=t),i){i.classList.add("e-ss-edited");var c=this.parent.getActiveSheet(),h=n.i(l.h)(this.editCellData.rowIndex,this.editCellData.colIndex,c,!1,!0),p=this.editCellData.position.left+1,u=this.editCellData.position.top+1,f={range:[this.editCellData.rowIndex,this.editCellData.colIndex,this.editCellData.rowIndex,this.editCellData.colIndex]};this.parent.notify(s._4,f);var g=n.i(l.y)(c,f.range[0],f.range[2])-3,m=n.i(l.z)(c,f.range[1],f.range[3])-3,v=this.parent.getMainContent(),y=v.parentElement,C=void 0,b=this.parent.frozenColCount(c),x=void 0,S=void 0,w=this.parent.frozenRowCount(c),_=void 0;if(this.editCellData.colIndex<b)C=Math.abs(this.parent.getRowHeaderContent().getBoundingClientRect()[this.parent.enableRtl?"left":"right"]-i.getBoundingClientRect()[this.parent.enableRtl?"right":"left"])-1,this.editCellData.rowIndex<w?"2"===this.parent.getRowHeaderContent().style.zIndex&&(x="3"):n.i(o._152)(h.value,h.style,this.parent.cellStyle)>C&&(_=!0);else{C=y.offsetWidth-(p-v.scrollLeft)-28-this.parent.sheetModule.getRowHeaderWidth(c);var I=i.getBoundingClientRect(),E=y.getBoundingClientRect(),R=this.parent.enableRtl?I.left:I.right,k=this.parent.enableRtl?E.left:E.right,A=this.parent.getScrollElement(),F=this.parent.sheetModule.getScrollSize();this.parent.enableRtl?k+F>R&&(A.scrollLeft-=I.width):k-F<R&&(A.scrollLeft+=I.width)}this.editCellData.rowIndex<w&&(S=!0);var N=!S&&(h&&h.wrap||i&&e||_)?"auto;":g+"px;",T="display:block;top:"+u+"px;"+(this.parent.enableRtl?"right:":"left:")+p+"px;min-width:"+m+"px;max-width:"+(h&&h.wrap?m:C)+"px;height:"+N+(h&&h.wrap?"width:"+m+"px;":"")+"min-height:"+g+"px;"+(x?"z-index: "+x+";":"")+(S&&(h&&!h.wrap||i&&e)&&(n.i(o._152)(h.value,h.style,this.parent.cellStyle)>C||i&&e)?"overflow: auto;":"");T+=i.style.cssText;var O=this.getEditElement(c,!0);O.setAttribute("style",T),n.i(o._152)(O.textContent,h.style,this.parent.cellStyle)>C&&(O.style.height="auto");var D=this.parent.element.querySelector(".e-active-cell");D&&(D.style.height=g+4+"px"),i.classList.contains("e-right-align")?O.classList.add("e-right-align"):i.classList.contains("e-center-align")&&O.classList.add("e-center-align")}},e.prototype.updateEditedValue=function(e,t,r,a){var c=this,h=this.editCellData.oldValue;t&&(this.editCellData.value=t);var p=this.editCellData.value;this.parent.notify(o._20,{args:{action:"beforeCellSave",eventArgs:{address:this.editCellData.addr}}});var u=!0;if(this.parent.allowDataValidation){var f=this.parent.getActiveSheet(),g=n.i(i.d)(f.activeCell),m=n.i(l.h)(g[0],g[1],f,!1,!0),v=n.i(l.t)(f,g[1]);if(m.validation||n.i(l.A)(v,g[0],g[1])){var y=n.i(d._181)([this.editCellData.value||this.getEditElement(f).innerText],this.parent.locale)[0],C=this.parent.activeSheetIndex,b="string"==typeof this.editCellData.addr?n.i(i.d)(this.editCellData.addr):this.editCellData.addr,x={value:y,range:b,sheetIdx:C,isCell:!0,td:null,isValid:!0};this.parent.notify(s.F,x),u=x.isValid,u?(m.format&&y!==x.value||!this.editCellData.value&&x.value)&&(this.editCellData.value=x.value):this.isCellEdit=!0}}if(!a&&n.i(d._160)(this.editCellData.value)){var S={formula:this.editCellData.value};if(this.parent.notify(d._155,S),S.isInvalid){var w;this.isCellEdit=!0,u=!1;var _=this.parent.serviceLocator.getService(o._174),I=this.parent.serviceLocator.getService(o._175);I.show({width:400,isModal:!0,showCloseIcon:!0,target:this.parent.element,cssClass:"e-validation-error-dlg",content:_.getConstant("CellReferenceTypoError")+"<br>"+S.formula,beforeOpen:function(){return c.editCellData.element.focus()},buttons:[{buttonModel:{content:_.getConstant("Yes"),isPrimary:!0},click:function(){w=!0,I.hide()}},{buttonModel:{content:_.getConstant("No")},click:function(){return I.hide()}}],close:function(){if(w)t=c.editCellData.value=S.formula,c.updateCell(h,e,t,p,r),c.parent.notify(o.l,{action:"refreshFormulabar",value:S.formula});else{var n=c.getEditElement(c.parent.getActiveSheet());n.innerText&&window.getSelection().selectAllChildren(n)}}},!1)}}u?this.updateCell(h,e,t,p,r):r&&r.preventDefault()},e.prototype.updateCell=function(e,t,a,o,c){var h=e?e.toString().toUpperCase():"";if(e!==this.editCellData.value||h.indexOf("=NOW()")>-1||h.indexOf("NOW()")>-1||h.indexOf("=RAND()")>-1||h.indexOf("RAND()")>-1||h.indexOf("=RANDBETWEEN(")>-1||h.indexOf("RANDBETWEEN(")>-1){var p=this.parent.getActiveSheet(),u=n.i(i.d)(p.activeCell);e&&e.toString().indexOf("=UNIQUE(")>-1&&""===this.editCellData.value&&this.parent.notify(s._37,null);var f={cellIdx:u,isUnique:!1};this.checkUniqueRange(f);var g=f.isUnique;if(g&&""!==e&&""===this.editCellData.value){var m=n.i(i.d)(this.uniqueColl);if(-1===n.i(l.h)(m[0],m[1],p).value.toString().indexOf("#SPILL!"))return}e&&e.toString().indexOf("UNIQUE")>-1&&this.editCellData.value&&this.editCellData.value.toString().indexOf("UNIQUE")>-1&&g&&this.updateUniqueRange("");var v={action:"updateCellValue",address:this.editCellData.addr,value:this.editCellData.value,skipCellFormat:this.editCellData.showFormattedText};this.parent.notify(s.l,v);var y=n.i(l.h)(u[0],u[1],p,!0),C=void 0;n.i(r.isNullOrUndefined)(y)||(C=y.value.toString());if(this.formulaErrorStrings.indexOf(C)>-1||C&&C.includes("circular reference:")){if(delete y.value,delete y.formula,c){var b=c.target,x=["e-toolbar-item","e-tab-wrap","e-text-wrap","e-tab-text","e-caret"],S=["e-scroller","e-main-panel","e-autofill"];x.some(function(e){return b.classList.contains(e)})&&n.i(r.closest)(b,".e-ribbon")||S.some(function(e){return b.classList.contains(e)})||this.showFormulaAlertDlg(C),c.preventDefault()}return}var w=void 0;v.isFormulaDependent&&(w=n.i(d._182)(this.parent,this.parent.viewport)),this.parent.notify(s.d,{cell:null,rIdx:this.editCellData.rowIndex,cIdx:this.editCellData.colIndex,viewportIndexes:w}),p.conditionalFormats&&p.conditionalFormats.length&&this.parent.notify(d._120,{indexes:[this.editCellData.rowIndex,this.editCellData.colIndex],isAction:!0,refreshAll:v.isFormulaDependent,isEdit:!0});var _=n.i(l.h)(u[0],u[1],p,!0),I=this.getRefreshNodeArgs(_,this.editCellData.element,this.editCellData.rowIndex,this.editCellData.colIndex);if(this.editCellData.value=I.value,_&&_.formula&&(this.editCellData.formula=_.formula),_&&_.wrap&&this.parent.notify(s.b,{range:u,wrap:!0,sheet:p}),t&&this.parent.refreshNode(this.editCellData.element,I),_&&_.hyperlink&&this.parent.serviceLocator.getService("cell").refreshRange(u),g){var m=n.i(i.d)(this.uniqueColl);if(n.i(l.h)(m[0],m[1],p).value.toString().indexOf("#SPILL!")>-1&&(this.isSpill=!0),""!==e&&""===this.editCellData.value||this.editCellData.formula&&this.editCellData.formula.length>1&&e!==this.editCellData.formula){for(var E=!1,R=m[0];R<=m[2];R++)for(var k=m[1];k<=m[3];k++){var A=n.i(l.h)(R,k,p);R===m[0]&&k===m[1]?E=!1:A&&!n.i(r.isNullOrUndefined)(A.value)&&""!==A.value&&(E=!0)}E||this.reApplyFormula()}else this.updateUniqueRange(o)}}this.triggerEvent("cellSave",c,a),this.resetEditState(),this.focusElement(c)},e.prototype.checkUniqueRange=function(e){var t={range:[]};this.parent.notify(s._36,t);var r=t.range;e.sheetName||(e.sheetName=this.parent.getActiveSheet().name);for(var a=0;a<r.length;a++)if(r[a].split("!")[0]===e.sheetName)for(var o=n.i(i.d)(r[a]),l=o[0];l<=o[2];l++)for(var d=o[1];d<=o[3];d++)if(e.cellIdx[0]===l&&e.cellIdx[1]===d){e.isUnique=!0,this.uniqueCell=!0;var c=""!==this.uniqueColl?n.i(i.d)(this.uniqueColl):[0,0,0,0],h=n.i(i.d)(r[a]);if(c[0]===h[0]&&c[1]===h[1]){var p=[c[0],h[1],c[0],h[1]];p[2]=c[2]>h[2]?c[2]:h[2],p[3]=c[3]>h[3]?c[3]:h[3],this.uniqueColl=n.i(i.b)(p),e.uniqueRange=n.i(i.b)(p)}else this.uniqueColl=r[a],e.uniqueRange=r[a]}},e.prototype.updateUniqueRange=function(e){var t=n.i(i.d)(this.uniqueColl),r=!1;"#SPILL!"!==n.i(l.h)(t[0],t[1],this.parent.getActiveSheet()).value&&(r=!0);for(var a=t[0];a<=t[2];a++)for(var o=t[1];o<=t[3];o++)r&&(a===t[0]&&o===t[1]?this.parent.updateCell({value:"#SPILL!"},n.i(i.b)([a,o])):n.i(i.b)([a,o]).split(":")[0]===this.editCellData.addr?this.parent.updateCell({value:e},n.i(i.b)([a,o])):this.parent.updateCell({value:""},n.i(i.b)([a,o])))},e.prototype.reApplyFormula=function(){var e=n.i(i.d)(this.uniqueColl),t=n.i(l.h)(e[0],e[1],this.parent.getActiveSheet());this.parent.updateCell({value:""},n.i(i.b)([e[0],e[1]]));for(var r=this.parent.sheets,a=t.formula,o=0;o<r.length;o++)a.indexOf(r[o].name)>-1&&(a=a.replace(r[o].name,"!"+o));this.parent.notify(d._49,{action:"computeExpression",formula:a}),this.uniqueCell=!1,""!==this.uniqueActCell&&(this.editCellData.value=this.uniqueActCell,this.uniqueActCell="")},e.prototype.refreshDependentCellValue=function(e,t,r){if(e&&t&&(e--,t--,(this.editCellData.rowIndex!==e||this.editCellData.colIndex!==t)&&this.parent.activeSheetIndex===r||this.uniqueCell&&this.parent.activeSheetIndex===r)){var a=n.i(d.l)(this.parent,r),o=void 0;if(n.i(d.v)(a,e)||n.i(d.F)(a,t)||(o=this.parent.getCell(e,t)),o){if(o.parentElement){var s=o.parentElement.getAttribute("aria-rowindex");if(s&&Number(s)-1!==e)return}var c=n.i(l.h)(e,t,a),h=n.i(i.d)(a.activeCell);h[0]===e&&h[1]===t&&(this.uniqueActCell=c.value);var p=this.getRefreshNodeArgs(c,o,e,t);this.parent.refreshNode(o,p)}}},e.prototype.getRefreshNodeArgs=function(e,t,n,r){e=e||{};var i={value:e.value,format:e.format,formattedText:"",isRightAlign:!1,type:"General",cell:e,rowIndex:n,td:t,colIndex:r,refresh:!0,isEdit:!0};return this.parent.notify(s.c,i),{isRightAlign:i.isRightAlign,type:i.type,value:i.value,result:this.parent.allowNumberFormatting?i.formattedText:i.value,curSymbol:i.curSymbol,isRowFill:i.isRowFill,rowIndex:n,colIndex:r}},e.prototype.endEdit=function(e,t,r){void 0===e&&(e=!1),e&&this.refreshEditor(this.editCellData.oldValue,!1,!0,!1,!1);var i=this.triggerEvent("beforeCellSave");if(i.cancel)return void(this.parent.isEdit&&t&&t.preventDefault());if(i.value&&i.value.toString().indexOf("\n")>-1){var a=n.i(l.h)(this.editCellData.rowIndex,this.editCellData.colIndex,this.parent.getActiveSheet());n.i(d.L)(this.parent.getActiveSheet().selectedRange,!a||!1!==a.wrap,this.parent),this.refreshEditor(i.value,this.isCellEdit,!1,!1,!1)}this.updateEditedValue(!0,i.value,t,r)},e.prototype.cancelEdit=function(e,t,n,r){void 0===e&&(e=!0),void 0===t&&(t=!0),this.refreshEditor(this.editCellData.oldValue,e,!1,!1,!1),r||(t?this.triggerEvent("cellSave",n):this.triggerEvent("cellEdited")),this.resetEditState(),this.focusElement()},e.prototype.focusElement=function(e){if(e&&9===e.keyCode&&document.activeElement.classList.contains("e-formula-bar")){var t=this.parent.element.querySelector(".e-formula-bar-panel "+(e.shiftKey?".e-insert-function":".e-combobox"));t&&n.i(o._159)(t)}else n.i(o._159)(this.parent.element);this.parent.notify(a.K,[{enable:!0}])},e.prototype.triggerEvent=function(e,t,r){var o=this.parent.getActiveSheet(),s=n.i(l.h)(this.editCellData.rowIndex,this.editCellData.colIndex,o),c={element:this.editCellData.element,value:r||this.editCellData.value,oldValue:this.editCellData.oldValue,address:this.editCellData.fullAddr,displayText:this.parent.getDisplayText(s)};if(c.address){var h=n.i(i.d)(c.address),p={cellIdx:h,isUnique:!1};this.checkUniqueRange(p),p.isUnique&&(c.isSpill=this.isSpill)}if(c.value!==c.oldValue){if("cellSave"!==e&&(c.cancel=!1),"beforeCellSave"===e){this.parent.notify(d._34,{eventArgs:c,action:"cellSave",preventAction:!0}),s=n.i(d._160)(c.value)?{formula:c.value}:{value:c.value};if(n.i(d._175)(this.parent,o,{cell:s,rowIdx:this.editCellData.rowIndex,colIdx:this.editCellData.colIndex,eventOnly:!0}))return this.cancelEdit(!1,!1,null,!0),c.cancel=!0,c}this.parent.trigger(e,c),"cellSave"===e&&(this.parent.trigger("cellEdited",c),this.editCellData.formula&&(c.formula=this.editCellData.formula),c.originalEvent=t,this.parent.notify(a.j,{eventArgs:c,action:"cellSave"}))}else"beforeCellSave"!==e&&("cellSave"===e?this.parent.trigger("cellEdited",c):this.parent.trigger(e,c));return c},e.prototype.altEnter=function(){this.positionEditor(!0);var e,t=window.getSelection(),n=t.anchorNode,r=document.createRange();0===(e=3===n.nodeType?t.anchorOffset:n.textContent.length)&&n.textContent.length>0&&(e=n.textContent.length);var i=n.textContent,a=i.slice(0,e),o=i.slice(e)||" ";n.textContent=a+"\n"+o,r=document.createRange(),3===n.nodeType?(r.setStart(n,e+1),r.setEnd(n,e+1)):1===n.nodeType&&(r.setStart(n.firstChild,e+1),r.setEnd(n.firstChild,e+1)),t.removeAllRanges(),t.addRange(r)},e.prototype.resetEditState=function(e){if(void 0===e&&(e=!0),e){var t=this.getEditElement(this.parent.getActiveSheet());(n.i(d._160)(t.textContent)||""===t.textContent)&&this.parent.notify(o._65,null),this.editCellData.element&&(this.editCellData.element.classList.remove("e-ss-edited"),this.editorElem.textContent="",t===this.editorElem?(this.editorElem.removeAttribute("style"),this.editorElem.classList.remove("e-right-align")):n.i(r.detach)(t))}if(this.editCellData={},this.parent.isEdit=this.isEdit=!1,this.isCellEdit=!0,this.parent.notify(o.k,{action:"endEdit"}),this.parent.showSheetTabs&&!this.parent.isProtected){var i=this.parent.element.querySelector(".e-add-sheet-tab");i&&i.removeAttribute("disabled")}},e.prototype.refSelectionRender=function(){var e=this.getEditElement(this.parent.getActiveSheet());e&&n.i(d._160)(e.textContent)&&this.parent.notify(o._63,{range:e.textContent,formulaSheetIdx:this.editCellData.sheetIndex})},e.prototype.initiateRefSelection=function(){var e=this.editCellData.fullAddr.substring(0,this.editCellData.fullAddr.indexOf("!")),t=this.editCellData.value;this.parent.getActiveSheet().name===e&&n.i(d._160)(this.editCellData.value,!0)?(this.startEdit(this.editCellData.addr,t,!1),this.parent.notify(o._63,{range:this.editCellData.value,formulaSheetIdx:this.editCellData.sheetIndex}),this.getEditElement(this.parent.getActiveSheet()).textContent=t,this.initiateCurPosition()):this.initiateCurPosition()},e.prototype.addressHandler=function(e){var t=this.parent.serviceLocator.getService(o._175).dialogInstance;if(t&&t.element&&t.element.classList.contains("e-validation-error-dlg"))return void(e.isAlertDlgOpen=!0);var n=window.getSelection();if(this.selectionStart=n.anchorOffset,this.selectionEnd=n.focusOffset,this.selectionStart>this.selectionEnd){var r=this.selectionStart;this.selectionStart=this.selectionEnd,this.selectionEnd=r}if(n&&n.focusNode&&n.focusNode.classList&&n.focusNode.classList.contains("e-formula-bar-panel")){var i=n.focusNode.getElementsByClassName("e-formula-bar e-css")[0];this.selectionStart=i.selectionStart,this.selectionEnd=i.selectionEnd}var s={action:"getCurrentEditValue",editedValue:""};this.parent.notify(a.m,s);var l=e.range,d=this.editCellData.fullAddr.substring(0,this.editCellData.fullAddr.indexOf("!")),c=this.editCellData.sheetIndex,h=this.getEditElement(this.parent.getActiveSheet());if(this.parent.getActiveSheet().name!==d&&(l="'"+this.parent.getActiveSheet().name+"'!"+l),e.isSelect)this.parent.notify(o._63,{range:s.editedValue+l,formulaSheetIdx:c});else{var p=this.editCellData.fullAddr.substring(0,this.editCellData.fullAddr.indexOf("!")),u=["+","-","*","/",this.parent.listSeparator,"(","=","&",":"];if(this.parent.getActiveSheet().name===p){var f=s.editedValue;this.selectionStart!==this.selectionEnd?(this.formulaBarCurStartPos=this.selectionStart,this.curStartPos=this.selectionStart,this.curEndPos=this.selectionStart+l.length,h.textContent=f.substring(0,this.selectionStart)+l+f.substring(this.selectionStart)):f.indexOf(")")===f.length-1&&this.selectionEnd===f.length?(h.textContent=f.substring(0,f.length-1)+l+f.substring(f.length-1),this.curEndPos=h.textContent.length-1):f.indexOf(")")!==f.length-1?(h.textContent=f+l,this.curEndPos=h.textContent.length):h.textContent!==f?(h.textContent=f.substring(0,this.curStartPos)+l+f.substring(this.curStartPos),this.curEndPos=this.curStartPos+l.length):this.selectionStart!==this.selectionEnd||-1===u.indexOf(f.substring(this.selectionStart-1,this.selectionEnd))||-1===u.indexOf(f.substring(this.selectionStart,this.selectionEnd+1))&&")"!==f.substring(this.selectionStart,this.selectionEnd+1)||(h.textContent=f.substring(0,this.selectionStart)+l+f.substring(this.selectionEnd),this.curStartPos=this.selectionStart,this.curEndPos=this.selectionStart+l.length,this.formulaBarCurStartPos=this.curStartPos)}}},e.prototype.updateFormulaBarValue=function(){var e=window.getSelection(),t=this.editCellData.value,a=this.parent.getActiveSheet().selectedRange;a=n.i(i.l)(n.i(i.e)(a))?a.split(":")[0]:a;var o=this.parent.element.querySelector(".e-formula-bar");if(t&&n.i(d._160)(t,!0)){var s=this.editCellData.fullAddr.substring(0,this.editCellData.fullAddr.indexOf("!"));this.parent.getActiveSheet().name!==s&&(a="'"+this.parent.getActiveSheet().name+"'!"+a),n.i(r.isNullOrUndefined)(this.formulaBarCurStartPos)?t.indexOf(")")===t.length-1&&e.focusOffset===t.length?o.value=t.substring(0,t.length-1)+a+t.substring(t.length-1):t.indexOf(")")!==t.length-1?o.value=t+a:o.value!==t&&(o.value=t.substring(0,this.curStartPos)+a+t.substring(this.curStartPos)):o.value=t.substring(0,this.formulaBarCurStartPos)+a+t.substring(this.formulaBarCurStartPos),this.curEndPos=this.curStartPos+a.length}},e.prototype.setFormulaBarCurPosition=function(e,t,n){e.setSelectionRange&&(e.focus(),e.selectionStart=t,e.selectionEnd=t,e.setSelectionRange(t,n))},e.prototype.initiateCurPosition=function(e){void 0===e&&(e={isCellEdit:!1});var t=this.getEditElement(this.parent.getActiveSheet(),!0);if(e.isCellEdit){var n=this.getCurPosition();if(!this.endFormulaRef&&n.start===n.end){this.updateFormulaReference(t);var r=["+","-","*","/",this.parent.listSeparator,"(","=","&",":"];n.end&&-1===r.indexOf(this.editCellData.value[n.end-1])&&(this.endFormulaRef=!0)}}else{var i=t.innerText,a=window.getSelection();if(a&&a.focusNode&&a.focusNode.classList&&a.focusNode.classList.contains("e-formula-bar-panel")){var o=this.parent.element.querySelector(".e-formula-bar");return void this.setFormulaBarCurPosition(o,this.curEndPos,this.curEndPos)}if(i){var s=document.createRange();i.indexOf(")"),i.length,s.setStart(t.childNodes[0],this.curEndPos),s.setEnd(t.childNodes[0],this.curEndPos),a.removeAllRanges(),a.addRange(s)}if(this.editCellData.sheetIndex!==this.parent.getActiveSheet().id-1){var l=this.parent.element.querySelector(".e-formula-bar");if(l.value){var d=l.value.length;l.value.indexOf(")")===d-1?this.setFormulaBarCurPosition(l,d-1,d-1):this.setFormulaBarCurPosition(l,d,d)}}}},e.prototype.getEditElement=function(e,t){if((this.isEdit||t)&&(e.frozenRows||e.frozenColumns)){var r=this.parent.frozenRowCount(e),i=this.parent.frozenColCount(e),a=n.i(d.U)(e.activeCell),o=void 0;if(a[0]<r&&a[1]<i)o=this.parent.getSelectAllContent();else if(a[0]<r)o=this.parent.getColumnHeaderContent();else{if(!(a[1]<i))return this.editorElem;o=this.parent.getRowHeaderContent()}var s=o.getElementsByClassName("e-spreadsheet-edit")[0];return!s&&t&&(s=o.appendChild(this.editorElem.cloneNode())),s}return this.editorElem},e.prototype.sheetChangeHandler=function(){this.isEdit||(this.editCellData.value=null)},e.prototype.showFormulaAlertDlg=function(e){var t,n=this,r=this.parent.serviceLocator.getService(o._174),i=this.parent.serviceLocator.getService("dialog"),a=this.getFormulaErrorKey(e);i.show({width:400,isModal:!0,showCloseIcon:!0,target:this.parent.element,cssClass:"e-validation-error-dlg",content:r.getConstant(a),beforeOpen:function(){if(window.getSelection().rangeCount>0){var e=window.getSelection().getRangeAt(0);t=e.endOffset}},buttons:[{buttonModel:{content:r.getConstant("Ok"),isPrimary:!0},click:function(){i.hide()}}],close:function(){var e=n.getEditElement(n.parent.getActiveSheet()),r=document.getSelection(),i=document.createRange();i.setStart(e.firstChild,t),i.collapse(!0),r.removeAllRanges(),r.addRange(i),e.focus()}},!1)},e.prototype.getFormulaErrorKey=function(e){var t;switch(e){case"invalid arguments":t="InvalidArguments";break;case"improper formula":t="ImproperFormula";break;case"empty expression":t="EmptyExpression";break;case"mismatched parentheses":t="MismatchedParenthesis";break;case"mismatched string quotes":t="MismatchedStringQuotes";break;case"wrong number of arguments":t="WrongNumberOfArguments";break;case"requires 3 arguments":t="Requires3Arguments";break;default:t=e.includes("circular reference")?"FormulaCircularRef":"InvalidFormulaError"}return t},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(1),i=n(3),a=(n.n(i),n(0)),o=n(2),s=n(16),l=(n.n(s),n(10)),d=(n.n(l),n(11)),c=(n.n(d),n(8)),h=(n.n(c),n(12)),p=(n.n(h),function(){function e(e){this.shortValue="",this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r._47,this.renderFindDlg,this),this.parent.on(r._46,this.renderGotoDlg,this),this.parent.on(a._95,this.gotoHandler,this),this.parent.on(r._48,this.findHandler,this),this.parent.on(a._99,this.showFindAlert,this),this.parent.on(a._108,this.replaceAllDialog,this),this.parent.on(a._100,this.findKeyUp,this),this.parent.on(o._26,this.findToolDlg,this),this.parent.on(r._5,this.refreshFindDlg,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r._47,this.renderFindDlg),this.parent.off(r._46,this.renderGotoDlg),this.parent.off(a._95,this.gotoHandler),this.parent.off(r._48,this.findHandler),this.parent.off(a._99,this.showFindAlert),this.parent.off(a._108,this.replaceAllDialog),this.parent.off(a._100,this.findKeyUp),this.parent.off(o._26,this.findToolDlg),this.parent.off(r._5,this.refreshFindDlg))},e.prototype.findToolDlg=function(e){var t=this,a=function(r){var a=t.parent.showRibbon&&t.parent.element.querySelector(".e-ribbon");if(a){var o=e.event&&e.event.target?n.i(i.closest)(e.event.target,"#"+t.parent.element.id+"_findbtn"):n.i(i.select)("#"+t.parent.element.id+"_findbtn",a);o&&(r?o.classList.add("e-disabled"):o.classList.remove("e-disabled"),o.disabled=r)}},s=e.dialogEle||this.parent.element.getElementsByClassName("e-findtool-dlg")[0];e.isPublic&&(this.findValue=e.findValue);var l,d,p,u=this.parent.getActiveSheet(),f=function(e){if(d&&(!u.isProtected||u.protectSettings.selectCells||u.protectSettings.selectUnLockedCells)){var n=d.value;if(e&&13===e.keyCode)d.value&&"0 of 0"!==p.textContent&&(t.parent.notify(r._48,{findOption:e.shiftKey?"prev":"next"}),t.updateCount(p,e.shiftKey));else{var i=void 0;if(""===n)p.textContent="0 of 0",i=!1;else{var a={value:n,mode:"Sheet",isCSen:!1,sheetIndex:t.parent.activeSheetIndex,isEMatch:!1,searchBy:"By Row"};t.parent.notify(o._24,a),p.textContent=a.findCount,i="0 of 0"!==a.findCount}l.enableItems(1,i),l.enableItems(2,i)}}};if(s)if(e.isPublic||e.refreshPosition){if(e.isPublic&&(d=s.querySelector(".e-text-findNext-short"),d.value=this.findValue,p=s.querySelector(".e-input-group-icon"),l=n.i(i.getComponent)(s.querySelector(".e-find-toolbar"),"toolbar"),f()),e.refreshPosition){var g=void 0;if(this.parent.getActiveSheet().showHeaders){var m=this.parent.getColumnHeaderContent().parentElement;g=(m&&m.offsetHeight||30)+1}else g=1;s.style.top=g+"px"}}else a(!0),this.findDialog.hide();else{var v=this.parent.createElement("div",{className:"e-input-group"});d=this.parent.createElement("input",{className:"e-input e-text-findNext-short",attrs:{type:"Text"}}),this.findValue&&(d.value=this.findValue);var y=this.parent.serviceLocator.getService(r._174);d.setAttribute("placeholder",y.getConstant("FindValue")),p=this.parent.createElement("span",{className:"e-input-group-icon"});var C,b=u.usedRange.rowIndex*u.usedRange.colIndex>100;d.onkeyup=function(e){b?(C&&clearTimeout(C),C=setTimeout(f.bind(t,e),500)):f(e)},v.appendChild(d),v.appendChild(p);var x=[{type:"Input",template:v},{prefixIcon:"e-icons e-prev-icon",tooltipText:y.getConstant("FindPreviousBtn"),type:"Button",cssClass:"e-findRib-prev",disabled:!0},{prefixIcon:"e-icons e-next-icon",tooltipText:y.getConstant("FindNextBtn"),type:"Button",cssClass:"e-findRib-next",disabled:!0},{type:"Separator"},{prefixIcon:"e-icons e-option-icon",tooltipText:y.getConstant("MoreOptions"),type:"Button",cssClass:"e-findRib-more"},{prefixIcon:"e-icons e-close",tooltipText:y.getConstant("Close"),type:"Button",cssClass:"e-findRib-close"}];l=new c.Toolbar({clicked:function(e){"e-findRib-next"===e.item.cssClass?(t.parent.notify(r._48,{findOption:"next"}),t.updateCount(p)):"e-findRib-prev"===e.item.cssClass?(t.parent.notify(r._48,{findOption:"prev"}),t.updateCount(p,!0)):"e-findRib-more"===e.item.cssClass&&(t.findDialog.animationSettings.effect="None",t.findDialog.setProperties({animationSettings:t.findDialog.animationSettings},!0),t.renderFindDlg(),t.findDialog.hide())},width:"auto",height:"auto",items:x,cssClass:"e-find-toolObj",created:function(){l.element.querySelectorAll(".e-toolbar-item .e-tbar-btn").forEach(function(e){return e.removeAttribute("tabindex")})}});var S=this.parent.createElement("div",{className:"e-find-toolbar",attrs:{tabindex:"-1"}});l.createElement=this.parent.createElement,l.appendTo(S),s=this.parent.createElement("div",{className:"e-dlg-div",attrs:{"aria-label":y.getConstant("FindValue")}});var w=this.parent.element.getElementsByClassName("e-sheet-panel")[0],_={cssClass:"e-findtool-dlg",visible:!1,enableRtl:this.parent.enableRtl,target:w,open:function(){if(i.EventHandler.add(document,"click",t.closeDialog,t),t.findValue&&(!u.isProtected||u.protectSettings.selectCells||u.protectSettings.selectUnLockedCells)){var e={value:t.findValue,mode:"Sheet",isCSen:!1,sheetIndex:t.parent.activeSheetIndex,isEMatch:!1,searchBy:"By Row"};t.parent.notify(o._24,e),p.textContent=e.findCount;var s="0 of 0"!==e.findCount;l.enableItems(1,s),l.enableItems(2,s)}else p.textContent="0 of 0";a(!1);var d=l.element.querySelector(".e-input-group");d&&d.addEventListener("focus",function(){var e=l.element.querySelector(".e-text-findNext-short");n.i(r._159)(e),e.classList.add("e-input-focus"),e.setSelectionRange(0,e.value.length)}),I&&t.findDialog.setProperties({animationSettings:I},!0)},beforeOpen:function(){return n.i(r._159)(t.parent.element)},beforeClose:function(){t.findValue=d.value||null,l.destroy(),i.EventHandler.remove(document,"click",t.closeDialog)},close:function(){t.findDialog.destroy(),t.findDialog=null,n.i(i.detach)(s),w.style.position="",n.i(r._159)(t.parent.element),a(!1)},created:function(){w.style.position="relative",s.style.width=t.parent.getMainContent().offsetWidth+"px",s.style.visibility="hidden",s.style.display="block",t.findDialog.width=2*parseInt(getComputedStyle(s).borderLeftWidth,10)+s.querySelector(".e-toolbar-items").getBoundingClientRect().width+"px",s.style.display="",s.style.width="",s.style.visibility="",s.style.top=(e&&e.headerHgt||t.parent.getColumnHeaderContent().parentElement.offsetHeight+1)+"px",s.style.left="",s.style[t.parent.enableRtl?"left":"right"]=t.parent.sheetModule.getScrollSize()+"px",t.findDialog.show()}};i.Browser.isDevice?(_.header=S,_.allowDragging=!0):_.content=S,this.findDialog=new h.Dialog(_),this.findDialog.createElement=this.parent.createElement;var I;e&&e.isPublic&&(I={effect:this.findDialog.animationSettings.effect},this.findDialog.setProperties({animationSettings:{effect:"None"}},!0)),this.findDialog.appendTo(s)}},e.prototype.refreshFindDlg=function(e){var t=this.findDialog&&this.parent.element.getElementsByClassName("e-findtool-dlg")[0];if(t){var n=t.querySelector(".e-text-findNext-short");this.findToolDlg({findValue:n.value,isPublic:!0,refreshPosition:!0,dialogEle:t})}},e.prototype.updateCount=function(e,t){var n,r=e.textContent.split(" ");t?(n=Number(r[0])-1)<1&&(n=Number(r[2])):(n=Number(r[0])+1)>Number(r[2])&&(n=1),r[0]=n.toString(),e.textContent=r.join(" ")},e.prototype.closeDialog=function(e){!n.i(i.closest)(e.target,".e-findRib-close")&&n.i(i.closest)(e.target,".e-spreadsheet")||!this.findDialog||this.findToolDlg({})},e.prototype.renderFindDlg=function(){var e=this,t=this.parent.serviceLocator.getService(r._175);if(this.parent.element.querySelector(".e-find-dlg"))t.hide();else{var o=this.parent.serviceLocator.getService(r._174),s={isModal:!1,showCloseIcon:!0,cssClass:"e-find-dlg",header:o.getConstant("FindAndReplace"),beforeOpen:function(i){var a={dialogName:"FindAndReplaceDialog",element:i.element,target:i.target,cancel:i.cancel};e.parent.trigger("dialogBeforeOpen",a),a.cancel?i.cancel=!0:(t.dialogInstance.content=e.findandreplaceContent(),t.dialogInstance.dataBind()),n.i(r._159)(e.parent.element)},buttons:[{buttonModel:{content:o.getConstant("FindPreviousBtn"),isPrimary:!0,cssClass:"e-btn-findPrevious",disabled:!0},click:function(t){e.dialogMessage(),e.findHandler({findOption:t&&13===t.keyCode?"next":"prev"})}},{buttonModel:{content:o.getConstant("FindNextBtn"),isPrimary:!0,cssClass:"e-btn-findNext",disabled:!0},click:function(){e.dialogMessage(),e.findHandler({findOption:"next"})}},{buttonModel:{content:o.getConstant("ReplaceBtn"),isPrimary:!0,cssClass:"e-btn-replace",disabled:!0},click:function(){e.dialogMessage(),e.replaceHandler(a._97)}},{buttonModel:{content:o.getConstant("ReplaceAllBtn"),isPrimary:!0,cssClass:"e-btn-replaceAll",disabled:!0},click:function(){e.dialogMessage(),e.replaceHandler(a._98)}}],open:function(){var t=e.parent.element.querySelector(".e-text-findNext");if(t.value){var a=e.parent.element.querySelector(".e-btn-findPrevious");n.i(i.getComponent)(a,"btn").disabled=!1,n.i(i.getComponent)(e.parent.element.querySelector(".e-btn-findNext"),"btn").disabled=!1}n.i(r._115)(function(){n.i(r._159)(t)})},close:function(){return t.hide()}};t.show(s)}},e.prototype.dialogMessage=function(){this.parent.element.querySelector(".e-replace-alert-span")?this.parent.element.querySelector(".e-replace-alert-span").remove():this.parent.element.querySelector(".e-find-alert-span")&&this.parent.element.querySelector(".e-find-alert-span").remove()},e.prototype.renderGotoDlg=function(){var e=this,t=this.parent.serviceLocator.getService(r._174),a=this.parent.serviceLocator.getService(r._175);if(n.i(i.isNullOrUndefined)(this.parent.element.querySelector(".e-find-dlg"))){var o={width:300,isModal:!1,showCloseIcon:!0,cssClass:"e-goto-dlg",header:t.getConstant("GotoHeader"),beforeOpen:function(t){var i={dialogName:"GoToDialog",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",i),i.cancel?t.cancel=!0:(a.dialogInstance.content=e.GotoContent(),a.dialogInstance.dataBind()),n.i(r._159)(e.parent.element)},buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0,cssClass:"e-btn-goto-ok"},click:function(){e.gotoHandler()&&a.hide()}}],open:function(){e.textFocus()}};a.show(o,!1)}else a.hide()},e.prototype.textFocus=function(){var e=this;this.parent.element.querySelector(".e-text-goto").addEventListener("focus",function(){e.parent.element.querySelector(".e-goto-alert-span")&&e.parent.element.querySelector(".e-goto-alert-span").remove()})},e.prototype.findHandler=function(e){var t=this.parent.element.querySelector(".e-text-findNext");t||(t=this.parent.element.querySelector(".e-text-findNext-short"))||this.gotoAlert();var r=t.value;if(""!==t.value){var a=this.parent.getActiveSheet();if(a.isProtected&&!a.protectSettings.selectCells&&!a.protectSettings.selectUnLockedCells)return;var o=this.parent.activeSheetIndex,s=this.parent.element.querySelector(".e-findnreplace-checkcase"),l=void 0;if(s){l=n.i(i.getComponent)(s,"checkbox").checked}else l=!1;var d=this.parent.element.querySelector(".e-findnreplace-checkmatch"),c=void 0;if(d){c=n.i(i.getComponent)(d,"checkbox").checked}else c=!1;var h=this.parent.element.querySelector(".e-findnreplace-searchby"),p=void 0;if(h){p=n.i(i.getComponent)(h,"dropdownlist").value.toString()}else p="By Row";var u=this.parent.element.querySelector(".e-findnreplace-searchwithin"),f=void 0;if(u){f=n.i(i.getComponent)(u,"dropdownlist").value.toString()}else f="Sheet";var g={value:r,sheetIndex:o,findOpt:e.findOption,mode:f,isCSen:l,isEMatch:c,searchBy:p,isAction:!0};this.parent.find(g)}},e.prototype.replaceHandler=function(e){var t=this.parent.element.querySelector(".e-find-dlg"),n=t.querySelector(".e-text-findNext").value,r=this.parent.element.querySelector(".e-text-replaceInp").value,i=this.parent.element.querySelector(".e-findnreplace-checkcase").checked,a=this.parent.element.querySelector(".e-findnreplace-checkmatch").checked,o=this.parent.element.querySelector(".e-search-within .e-ddl-hidden").value,s=this.parent.element.querySelector(".e-searchby .e-ddl-hidden").value;this.parent.notify(e,{value:n,mode:o,isCSen:i,isEMatch:a,searchBy:s,findOpt:"next",replaceValue:r,replaceBy:e,sheetIndex:this.parent.activeSheetIndex,isAction:!0})},e.prototype.gotoHandler=function(e){var t=!0;if(e)this.parent.goTo(e.address);else{for(var r=this.parent.element.querySelector(".e-text-goto").value,i=0;i<this.parent.definedNames.length;i++)if(this.parent.definedNames[i].name===r){r=this.parent.definedNames[i].refersTo.slice(1);break}var a=r;r.includes("!")&&(a=r.split("!")[1]),a=a.split("$").join(""),a.includes(":")&&(a=a.split(":")[0]);var s=a.match(/\d+/),l=a.match(/[A-Z]+/i);if(s&&l&&0===l.index){var d=n.i(o._10)(n.i(o.l)(a));d[2]>=1048576||d[3]>=16384?(this.gotoAlert(),t=!1):this.parent.goTo(r)}else this.gotoAlert(),t=!1}return t},e.prototype.gotoAlert=function(){var e=this.parent.serviceLocator.getService(r._174),t=this.parent.createElement("span",{className:"e-goto-alert-span"});t.innerText=e.getConstant("InsertingEmptyValue"),this.parent.element.querySelector(".e-goto-alert-span")&&this.parent.element.querySelector(".e-goto-alert-span").remove(),this.parent.element.querySelector(".e-goto-dlg").querySelector(".e-dlg-content").appendChild(t)},e.prototype.showFindAlert=function(){this.parent.element.querySelector(".e-replace-alert-span")&&this.parent.element.querySelector(".e-replace-alert-span").remove();var e=this.parent.element.querySelector(".e-find-dlg .e-dlg-content");if(e){var t=this.parent.createElement("span",{className:"e-find-alert-span"});t.innerText=this.parent.serviceLocator.getService(r._174).getConstant("NoElements"),e.appendChild(t)}},e.prototype.replaceAllDialog=function(e){this.parent.element.querySelector(".e-find-alert-span")&&this.parent.element.querySelector(".e-find-alert-span").remove();var t=this.parent.serviceLocator.getService(r._174),n=this.parent.createElement("span",{className:"e-replace-alert-span"});n.innerText=e.count+t.getConstant("ReplaceAllEnd")+e.replaceValue,this.parent.element.querySelector(".e-find-dlg")&&this.parent.element.querySelector(".e-find-dlg").querySelector(".e-dlg-content").appendChild(n)},e.prototype.findKeyUp=function(e){if(e.target.classList.contains("e-text-findNext")){var t=this.parent.element.querySelector(".e-text-findNext").value;if(n.i(i.isNullOrUndefined)(t)||""===t)n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-findPrevious"),"btn").disabled=!0,n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-findNext"),"btn").disabled=!0,this.dialogMessage();else{var r=this.parent.element.querySelector(".e-btn-findPrevious");n.i(i.getComponent)(r,"btn").disabled=!1,n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-findNext"),"btn").disabled=!1}}var a=this.parent.element.querySelector(".e-text-findNext").value,o=this.parent.element.querySelector(".e-text-replaceInp").value;n.i(i.isNullOrUndefined)(a)||n.i(i.isNullOrUndefined)(o)||""===a||""===o?(n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-replace"),"btn").disabled=!0,n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-replaceAll"),"btn").disabled=!0):this.parent.getActiveSheet().isProtected||(n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-replace"),"btn").disabled=!1,n.i(i.getComponent)(this.parent.element.querySelector(".e-btn-replaceAll"),"btn").disabled=!1)},e.prototype.findandreplaceContent=function(){this.parent.element.querySelector(".e-text-findNext-short")&&(this.shortValue=this.parent.element.querySelector(".e-text-findNext-short").value);var e=this.parent.createElement("div",{className:"e-link-dialog"}),t=this.parent.createElement("div",{className:"e-find"}),n=this.parent.createElement("div",{className:"e-findCheck"}),i=this.parent.serviceLocator.getService(r._174);e.appendChild(t);var a=this.parent.createElement("div",{className:"e-cont"}),o=this.parent.createElement("p",{className:"e-header"});o.innerText=i.getConstant("FindWhat");var c=this.parent.createElement("input",{className:"e-input e-text-findNext",attrs:{type:"Text",placeholder:i.getConstant("FindValue"),value:this.shortValue}});a.appendChild(c),a.insertBefore(o,c),t.appendChild(a);var h=new d.TextBox({width:"70%"});h.createElement=this.parent.createElement,h.appendTo(c);var p=this.parent.createElement("div",{className:"e-cont"}),u=this.parent.createElement("p",{className:"e-header"});u.innerText=i.getConstant("ReplaceWith");var f=this.parent.createElement("input",{className:"e-input e-text-replaceInp",attrs:{type:"Text",placeholder:i.getConstant("ReplaceValue")}});p.appendChild(f),p.insertBefore(u,f),t.appendChild(p);var g=new d.TextBox({width:"70%"});g.createElement=this.parent.createElement,g.appendTo(f);var m=[{Id:"Sheet",Within:i.getConstant("Sheet")},{Id:"Workbook",Within:i.getConstant("Workbook")}],v=new l.DropDownList({dataSource:m,cssClass:"e-search-within",fields:{value:"Id",text:"Within"},width:"50%",index:0}),y=i.getConstant("SearchWithin"),C=this.parent.createElement("input",{className:"e-findnreplace-searchwithin",attrs:{type:"select",label:y}}),b=this.parent.createElement("p",{className:"e-header"});b.innerText=y,t.appendChild(b),t.appendChild(C),v.createElement=this.parent.createElement,v.appendTo(C);var x=[{Id:"By Row",Search:i.getConstant("ByRow")},{Id:"By Column",Search:i.getConstant("ByColumn")}],S=new l.DropDownList({dataSource:x,cssClass:"e-searchby",fields:{value:"Id",text:"Search"},width:"50%",index:0});y=i.getConstant("SearchBy");var w=this.parent.createElement("input",{className:"e-findnreplace-searchby",attrs:{type:"select",label:y}}),_=this.parent.createElement("p",{className:"e-header"});_.innerText=y,t.appendChild(_),t.appendChild(w),S.createElement=this.parent.createElement,S.appendTo(w);var I=new s.CheckBox({label:i.getConstant("MatchCase"),checked:!1,cssClass:"e-findnreplace-casecheckbox"}),E=this.parent.createElement("input",{className:"e-findnreplace-checkcase",attrs:{type:"checkbox"}});n.appendChild(E),I.createElement=this.parent.createElement,I.appendTo(E);var R=new s.CheckBox({label:i.getConstant("MatchExactCellElements"),checked:!1,cssClass:"e-findnreplace-exactmatchcheckbox"}),k=this.parent.createElement("input",{className:"e-findnreplace-checkmatch",attrs:{type:"checkbox"}});return n.appendChild(k),R.createElement=this.parent.createElement,R.appendTo(k),t.appendChild(n),e},e.prototype.GotoContent=function(){var e=this.parent.serviceLocator.getService(r._174),t=this.parent.createElement("div",{className:"e-link-dialog"}),n=this.parent.createElement("div",{className:"e-goto"});t.appendChild(n);var i=this.parent.createElement("div",{className:"e-cont"}),a=this.parent.createElement("p",{className:"e-header"});a.innerText=e.getConstant("Reference");var o=new d.TextBox({placeholder:e.getConstant("EnterCellAddress")}),s=this.parent.createElement("input",{className:"e-text-goto",attrs:{type:"Text"}});return i.appendChild(s),i.insertBefore(a,s),n.appendChild(i),o.createElement=this.parent.createElement,o.appendTo(s),t},e.prototype.destroy=function(){this.removeEventListener(),this.findDialog&&this.findDialog.hide(),this.parent=null},e.prototype.getModuleName=function(){return"findAndReplace"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(5),i=n(1),a=n(3),o=(n.n(a),n(15)),s=n(0),l=n(6),d=n(8),c=(n.n(d),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i._11,this.initiateHyperlinkHandler,this),this.parent.on(i._12,this.editHyperlinkHandler,this),this.parent.on(i._13,this.openHyperlinkHandler,this),this.parent.on(i.m,this.hyperlinkClickHandler,this),this.parent.on(i._15,this.createHyperlinkEle,this),this.parent.on(i.n,this.keyUpHandler,this),this.parent.on(l._46,this.removeHyperlink,this),this.parent.on(i._14,this.removeHyperlinkHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._11,this.initiateHyperlinkHandler),this.parent.off(i._12,this.editHyperlinkHandler),this.parent.off(i._13,this.openHyperlinkHandler),this.parent.off(i.m,this.hyperlinkClickHandler),this.parent.off(i._15,this.createHyperlinkEle),this.parent.off(i.n,this.keyUpHandler),this.parent.off(l._46,this.removeHyperlink),this.parent.off(i._14,this.removeHyperlinkHandler))},e.prototype.getModuleName=function(){return"spreadsheetHyperlink"},e.prototype.keyUpHandler=function(e){var t=e.target;if(n.i(a.closest)(t,".e-document")){var r=document.querySelector(".e-hyp-text"),i=this.parent.element.querySelector(".e-hyperlink-alert-span"),o=n.i(a.closest)(t,".e-hyperlink-dlg")||n.i(a.closest)(t,".e-edithyperlink-dlg"),l=o.getElementsByClassName("e-footer-content")[0],d=l.firstChild;r&&!n.i(a.isNullOrUndefined)(r.value)&&(n.i(s._161)(r.value.toUpperCase())?i&&(i.remove(),d.removeAttribute("disabled")):(this.showDialog(),d.setAttribute("disabled","true")))}if(t.classList.contains("e-text")&&n.i(a.closest)(t,".e-cont")&&n.i(a.closest)(t,".e-webpage")&&n.i(a.closest)(t,".e-webpage").getElementsByClassName("e-cont")[1]===t.parentElement){var c=n.i(a.closest)(t,".e-hyperlink-dlg")||n.i(a.closest)(t,".e-edithyperlink-dlg"),h=c.getElementsByClassName("e-footer-content")[0],d=h.firstChild;if(""!==t.value)d.removeAttribute("disabled");else{!!n.i(a.closest)(t,".e-link-dialog").querySelector(".e-webpage").querySelectorAll(".e-cont")[1].querySelector(".e-text").value||d.setAttribute("disabled","true")}}},e.prototype.initiateHyperlinkHandler=function(){var e=this,t=this.parent.getActiveSheet();if(t.isProtected&&(!t.protectSettings.insertLink||n.i(r._160)(this.parent)))return void this.parent.notify(i._50,null);var a=this.parent.serviceLocator.getService(i._174);if(!this.parent.element.querySelector(".e-hyperlink-dlg")){var o,s=this.parent.serviceLocator.getService(i._175);s.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-hyperlink-dlg",header:a.getConstant("InsertLink"),beforeOpen:function(t){var r={dialogName:"InsertLinkDialog",element:t.element,target:t.target,cancel:t.cancel};if(e.parent.trigger("dialogBeforeOpen",r),r.cancel)return void(t.cancel=!0);s.dialogInstance.content=e.hyperlinkContent(),o=s.dialogInstance.content.querySelector(".e-text").value,s.dialogInstance.dataBind(),n.i(i._159)(e.parent.element)},open:function(){setTimeout(function(){n.i(i._159)(s.dialogInstance.element.querySelectorAll(".e-webpage input")[1])})},buttons:[{buttonModel:{content:a.getConstant("Insert"),isPrimary:!0,disabled:!0},click:function(){e.dlgClickHandler(o),s.hide()}}]})}},e.prototype.dlgClickHandler=function(e){var t,n,r=this.parent.getActiveSheet(),i=r.name+"!"+r.selectedRange,a=this.parent.element.querySelector(".e-link-dialog").getElementsByClassName("e-content")[0].querySelector(".e-item.e-active");if(a)if(t=a.getElementsByClassName("e-cont")[0].querySelector(".e-text").value,t===e&&(t=null),a.querySelector(".e-webpage")){n=a.getElementsByClassName("e-cont")[1].querySelector(".e-text").value;var o={address:n};this.parent.insertHyperlink(o,i,t,!1)}else{n=a.getElementsByClassName("e-cont")[1].querySelector(".e-text").value;var s=a.getElementsByClassName("e-cont")[2];if(s.getElementsByClassName("e-list-item")[0].querySelector(".e-active")){var l=a.getElementsByClassName("e-cont")[2].querySelector(".e-active").textContent;n=l+"!"+n.toUpperCase();var o={address:n};this.parent.insertHyperlink(o,i,t,!1)}else if(s.querySelector(".e-active"))for(var d=a.getElementsByClassName("e-cont")[2].querySelector(".e-active").textContent,c=0;c<this.parent.definedNames.length;c++)if(this.parent.definedNames[c].name===d){var o={address:this.parent.definedNames[c].name};this.parent.insertHyperlink(o,i,t,!1)}}},e.prototype.showDialog=function(){this.parent.element.querySelector(".e-hyperlink-alert-span")&&this.parent.element.querySelector(".e-hyperlink-alert-span").remove();var e=this.parent.serviceLocator.getService(i._174),t=this.parent.createElement("span",{className:"e-hyperlink-alert-span"});t.innerText=e.getConstant("HyperlinkAlert"),(this.parent.element.querySelector(".e-hyperlink-dlg")||this.parent.element.querySelector(".e-edithyperlink-dlg")).querySelector(".e-dlg-content").appendChild(t)},e.prototype.editHyperlinkHandler=function(){var e,t=this,r=this.parent.serviceLocator.getService(i._174),a=this.parent.serviceLocator.getService(i._175);a.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-edithyperlink-dlg",header:r.getConstant("EditLink"),beforeOpen:function(r){var o={dialogName:"EditLinkDialog",element:r.element,target:r.target,cancel:r.cancel};t.parent.trigger("dialogBeforeOpen",o),o.cancel&&(r.cancel=!0),a.dialogInstance.content=t.hyperEditContent(),e=a.dialogInstance.content.querySelector(".e-text").value,a.dialogInstance.dataBind(),n.i(i._159)(t.parent.element)},open:function(){setTimeout(function(){a.dialogInstance.element.querySelector(".e-webpage")?n.i(i._159)(a.dialogInstance.element.querySelectorAll(".e-webpage input")[1]):n.i(i._159)(a.dialogInstance.element.querySelectorAll(".e-document input")[1])})},buttons:[{buttonModel:{content:r.getConstant("Update"),isPrimary:!0},click:function(){t.dlgClickHandler(e),a.hide()}}]})},e.prototype.openHyperlinkHandler=function(){var e=n.i(o.f)(this.parent.getActiveSheet().activeCell),t=this.parent.getCell(e[0],e[1]);t.getElementsByClassName("e-hyperlink")[0]&&(t=t.querySelector(".e-hyperlink")),this.hlOpenHandler(t)},e.prototype.hlOpenHandler=function(e,t){var r=this;if(e.classList.contains("e-hyperlink")){var d=n.i(a.closest)(e,".e-cell");if(!d)return;var c=["",""],h=void 0,p=!0,u=this.parent.getActiveSheet(),f=parseInt(d.getAttribute("aria-colindex"),10)-1,g=parseInt(d.parentElement.getAttribute("aria-rowindex"),10)-1,m=n.i(s.I)(g,f,u,!1,!0);m.style&&"#00e"===m.style.color&&(n.i(s._175)(this.parent,u,{rowIdx:g,colIdx:f,preventEvt:!0,cell:{style:{color:"#551a8b"}}}),d.style.color="#551a8b");var v=m.hyperlink,y=void 0,C={hyperlink:v,address:u.activeCell,target:"_blank",cancel:!1};if(this.parent.trigger(l._59,C),C.cancel)return;v=C.hyperlink;var b={hyperlink:v,address:u.activeCell};"string"==typeof v&&(y=v),"object"==typeof v&&(y=v.address);var x=y;if(-1===y.indexOf("http://")&&-1===y.indexOf("https://")&&-1===y.indexOf("ftp://")){if(!n.i(a.isNullOrUndefined)(y)){if(this.parent.definedNames)for(var S=0;S<this.parent.definedNames.length;S++)if(this.parent.definedNames[S].name===y){y=this.parent.definedNames[S].refersTo,y=y.slice(1);break}-1!==y.indexOf("!")?(c=y.split("!"),-1!==c[0].indexOf(" ")&&(c[0]=c[0].slice(1,c[0].length-1))):(c[0]=this.parent.getActiveSheet().name,c[1]=y);for(var w,S=0;S<this.parent.sheets.length;S++)this.parent.sheets[S].name===c[0]&&(w=S);if(u=this.parent.sheets[w],-1!==c[1].indexOf(":")){var _=c[1].indexOf(":"),I=c[1].substr(0,_),E=c[1].substr(_+1,c[1].length);I=I.replace("$",""),E=E.replace("$",""),E.match(/\D/g)&&!E.match(/[0-9]/g)&&I.match(/\D/g)&&!I.match(/[0-9]/g)?(I+="1",E+=u.rowCount,c[1]=I+":"+E):!E.match(/\D/g)&&E.match(/[0-9]/g)&&!I.match(/\D/g)&&I.match(/[0-9]/g)&&(h=[parseInt(I,10)-1,0,parseInt(E,10)-1,u.colCount-1],p=!1)}var R=void 0,k=this.parent.definedNames;if(!n.i(a.isNullOrUndefined)(k))for(var S=0;S<k.length;S++)if(k[S].name===x){R=!0;break}if(n.i(s._161)(c[1])||R){if(h=p?n.i(o.d)(c[1]):h,this.parent.scrollSettings.enableVirtualization&&(h[0]=h[0]>=this.parent.viewport.topIndex?h[0]-this.parent.viewport.topIndex:h[0],h[1]=h[1]>=this.parent.viewport.leftIndex?h[1]-this.parent.viewport.leftIndex:h[1]),!n.i(a.isNullOrUndefined)(u)){var A=n.i(o.b)(h);if(u===this.parent.getActiveSheet())n.i(i._115)(function(){r.parent.goTo(A)});else{if(A.indexOf(":")>=0){var F=A.split(":");A=F[0]===F[1]?F[0]:A}n.i(i._115)(function(){r.parent.goTo(r.parent.sheets[w].name+"!"+A)})}}}else this.showInvalidHyperlinkDialog()}}else t||(this.isValidUrl(y)?window.open(y,C.target):this.showInvalidHyperlinkDialog());this.parent.trigger(l._60,b)}},e.prototype.isValidUrl=function(e){return/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(e)},e.prototype.showInvalidHyperlinkDialog=function(){var e=this.parent.serviceLocator.getService(i._175),t=this.parent.serviceLocator.getService(i._174);e.show({width:323,isModal:!0,showCloseIcon:!0,header:t.getConstant("Hyperlink"),content:t.getConstant("InvalidHyperlinkAlert"),buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0},click:function(){e.hide()}}]},!1)},e.prototype.hyperlinkClickHandler=function(e){var t=e.target;if(n.i(a.closest)(t,".e-link-dialog")&&n.i(a.closest)(t,".e-toolbar-item")){var r=n.i(a.closest)(t,".e-hyperlink-dlg")||n.i(a.closest)(t,".e-edithyperlink-dlg"),i=r.getElementsByClassName("e-footer-content")[0],o=i.firstChild,l=r.querySelector(".e-document"),d=r.querySelector(".e-webpage"),c=d?d.querySelectorAll(".e-cont")[0].querySelector(".e-text").value:l.querySelectorAll(".e-cont")[0].querySelector(".e-text").value,h=l?l.querySelectorAll(".e-cont")[0].querySelector(".e-text").value:c;if(n.i(a.closest)(t,".e-toolbar-items").getElementsByClassName("e-toolbar-item")[1].classList.contains("e-active")){var p=l.querySelectorAll(".e-cont")[2].querySelector(".e-active");l.querySelectorAll(".e-cont")[0].querySelector(".e-text").value=c,n.i(a.closest)(p,".e-list-item").classList.contains("e-level-2")&&o.hasAttribute("disabled")?o.removeAttribute("disabled"):n.i(a.closest)(p,".e-list-item").classList.contains("e-level-1")&&!o.hasAttribute("disabled")&&o.setAttribute("disabled","true")}else{var u=!d.querySelectorAll(".e-cont")[1].querySelector(".e-text").value;d.querySelectorAll(".e-cont")[0].querySelector(".e-text").value=h,u&&!o.hasAttribute("disabled")?o.setAttribute("disabled","true"):!u&&o.hasAttribute("disabled")&&o.removeAttribute("disabled")}}if(n.i(a.closest)(t,".e-list-item")&&t.classList.contains("e-fullrow")){var f=this.parent.element.getElementsByClassName("e-link-dialog")[0];if(!f)return;f=f.getElementsByClassName("e-content")[0].getElementsByClassName("e-active")[0];var g=f.getElementsByClassName("e-cont")[1].getElementsByClassName("e-text")[0],r=n.i(a.closest)(t,".e-hyperlink-dlg")||n.i(a.closest)(t,".e-edithyperlink-dlg"),i=r.getElementsByClassName("e-footer-content")[0],o=i.firstChild;n.i(a.closest)(t,".e-list-item").classList.contains("e-level-2")?"defName"===n.i(a.closest)(t,".e-list-item").getAttribute("data-uid")?(g.classList.contains("e-disabled")||g.hasAttribute("readonly")||(g.setAttribute("readonly","true"),g.classList.add("e-disabled"),g.setAttribute("disabled","true")),o.hasAttribute("disabled")&&o.removeAttribute("disabled")):"sheet"===n.i(a.closest)(t,".e-list-item").getAttribute("data-uid")&&(g.classList.contains("e-disabled")&&g.hasAttribute("readonly")&&(g.removeAttribute("readonly"),g.classList.remove("e-disabled"),g.removeAttribute("disabled")),n.i(s._161)(g.value.toUpperCase())&&o.hasAttribute("disabled")&&o.removeAttribute("disabled")):n.i(a.closest)(t,".e-list-item").classList.contains("e-level-1")&&o.setAttribute("disabled","true")}else this.hlOpenHandler(t,!0)},e.prototype.createHyperlinkEle=function(e){var t=e.cell;if(!n.i(a.isNullOrUndefined)(t.hyperlink)){var r=e.td,i=this.parent.createElement("a",{className:"e-hyperlink e-hyperlink-style"}),o=void 0;if("string"==typeof t.hyperlink?(0===t.hyperlink.toLowerCase().indexOf("www.")&&(t.hyperlink="http://"+t.hyperlink),o=t.hyperlink):(o=t.hyperlink.address,0===o.toLowerCase().indexOf("www.")&&(t.hyperlink.address=o="http://"+o)),0===o.indexOf("http://")||0===o.indexOf("https://")||0===o.indexOf("ftp://")?(i.setAttribute("href",o),i.setAttribute("target","_blank")):(o.includes("=")||o.includes("!"))&&i.setAttribute("ref",o),"Accounting"===n.i(s._202)(t.format)?i.innerHTML=r.innerHTML:i.innerText=""!==r.innerText?r.innerText:o,r.textContent="",r.innerText="",r.appendChild(i),!e.style.color||!e.style.textDecoration){var l={};e.style.color||(e.style.color=l.color="#00e"),e.style.textDecoration||(e.style.textDecoration=l.textDecoration="underline"),n.i(s._175)(this.parent,this.parent.getActiveSheet(),{rowIdx:e.rowIdx,colIdx:e.colIdx,preventEvt:!0,cell:{style:l}})}}},e.prototype.hyperEditContent=function(){var e=!0,t=this.hyperlinkContent(),r=n.i(o.d)(this.parent.getActiveSheet().activeCell),i=this.parent.sheets[this.parent.getActiveSheet().id-1].rows[r[0]].cells[r[1]];this.parent.scrollSettings.enableVirtualization&&(r[0]=r[0]-this.parent.viewport.topIndex,r[1]=r[1]-this.parent.viewport.leftIndex);var a,s=this.parent.getDisplayText(i),l=i.hyperlink;"string"==typeof l?(a=l,s=s||a,-1===a.indexOf("http://")&&-1===a.indexOf("https://")&&-1===a.indexOf("ftp://")&&(e=!1)):"object"==typeof l&&(a=l.address,s=s||a,-1===a.indexOf("http://")&&-1===a.indexOf("https://")&&-1===a.indexOf("ftp://")&&(e=!1));for(var d=0,c=0,h=this.parent.definedNames,p=this.parent.sheets,u=0,f=h.length;u<f;u++)h[u].name===a&&d++;for(var u=0,f=p.length;u<f;u++)a.includes(p[u].name)&&c++;0===d&&0===c&&(e=!0);var g=t.querySelector(".e-content");if(e){var m=g.querySelector(".e-webpage");if(m.getElementsByClassName("e-cont")[0].getElementsByClassName("e-text")[0].setAttribute("value",s),"string"==typeof l)m.getElementsByClassName("e-cont")[1].querySelector(".e-text").setAttribute("value",l);else{m.getElementsByClassName("e-cont")[1].querySelector(".e-text").setAttribute("value",l.address)}}else{var v=void 0,y=g.querySelector(".e-document");y.getElementsByClassName("e-cont")[0].getElementsByClassName("e-text")[0].setAttribute("value",s);var C=void 0;if(this.parent.definedNames)for(var u=0;u<this.parent.definedNames.length;u++)if(this.parent.definedNames[u].name===a){v=!0;break}if(v){var b=y.getElementsByClassName("e-cont")[1].getElementsByClassName("e-text")[0];b.setAttribute("readonly","true"),b.classList.add("e-disabled"),b.setAttribute("disabled","true");for(var x=y.getElementsByClassName("e-cont")[2],S=x.querySelectorAll(".e-list-item.e-level-1")[1],u=0;u<S.getElementsByTagName("li").length;u++)S.getElementsByTagName("li")[u].innerText===a&&S.getElementsByTagName("li")[u].classList.add("e-active")}else{a&&-1!==a.indexOf("!")&&(C=a.split("!"));var w=C[0];y.getElementsByClassName("e-cont")[1].querySelector(".e-text").setAttribute("value",C[1]);for(var x=y.getElementsByClassName("e-cont")[2],S=x.querySelectorAll(".e-list-item.e-level-1")[0],u=0;u<S.getElementsByTagName("li").length;u++)if(S.getElementsByTagName("li")[u].innerText===w){if(S.getElementsByTagName("li")[u].classList.contains("e-active"))break;S.getElementsByTagName("li")[u].classList.add("e-active")}else S.getElementsByTagName("li")[u].classList.contains("e-active")&&S.getElementsByTagName("li")[u].classList.remove("e-active")}}return t},e.prototype.hyperlinkContent=function(){var e,t,r=this.parent.serviceLocator.getService(i._174),l=0,c=0,h=!0,p=!0,u=n.i(o.d)(this.parent.getActiveSheet().activeCell),f=this.parent.getActiveSheet(),g=n.i(s.I)(u[0],u[1],f),m=!0;if(g){m=!!(g.value&&"string"==typeof g.value&&null!==g.value.match("[A-Za-z]+")||""===g.value||n.i(a.isNullOrUndefined)(g.value));var v=g.hyperlink;if("string"==typeof v){var y=v;-1===y.indexOf("http://")&&-1===y.indexOf("https://")&&-1===y.indexOf("ftp://")&&(t=v,h=!1)}else if("object"==typeof v){var y=v.address;-1===y.indexOf("http://")&&-1===y.indexOf("https://")&&-1===y.indexOf("ftp://")&&(t=v.address,h=!1)}if(t){for(var C=0,b=0,x=this.parent.definedNames,S=this.parent.sheets,w=0,_=S.length;w<_;w++)t.includes(S[w].name)&&b++;for(var I=0,_=x.length;I<_;I++)x[I].name===t&&C++;0===C&&0===b&&(h=!0)}if(c=h?0:1,this.parent.definedNames)for(var E=0;E<this.parent.definedNames.length;E++)if(this.parent.definedNames[E].name===t){e=!0,p=!1;break}}var R=this.parent.createElement("div",{className:"e-link-dialog"}),k=this.parent.createElement("div",{className:"e-webpage"}),A=this.parent.createElement("div",{className:"e-document"});new d.Tab({selectedItem:c,items:[{header:{text:r.getConstant("WebPage")},content:k},{header:{text:r.getConstant("ThisDocument")},content:A}]}).appendTo(R),h?R.querySelector(".e-toolbar-items").querySelector(".e-indicator").setAttribute("style","left: 0; right: 136px"):R.querySelector(".e-toolbar-items").querySelector(".e-indicator").setAttribute("style","left: 136px; right: 0");var F=this.parent.createElement("div",{className:"e-cont"}),N=this.parent.createElement("div",{className:"e-cont"}),T=this.parent.createElement("div",{className:"e-header"});T.innerText=r.getConstant("DisplayText");var O=this.parent.createElement("div",{className:"e-header"});O.innerText=r.getConstant("Url");var D=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"Text"}});m||(D.classList.add("e-disabled"),D.setAttribute("readonly","true"),D.setAttribute("disabled","true")),g&&n.i(a.isNullOrUndefined)(g.hyperlink)&&D.setAttribute("value",this.parent.getDisplayText(g));var L=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"Text"}});D.setAttribute("placeholder",r.getConstant("EnterTheTextToDisplay")),L.setAttribute("placeholder",r.getConstant("EnterTheUrl")),F.appendChild(D),F.insertBefore(T,D),N.appendChild(L),N.insertBefore(O,L),k.appendChild(N),k.insertBefore(F,N);var P=[],M=[],B=this.parent.sheets;for(l;l<this.parent.sheets.length;l++){var H=this.parent.sheets[l].name;"Visible"===this.parent.sheets[l].state&&(B[l]===this.parent.getActiveSheet()?P.push({nodeId:"sheet",nodeText:-1!==H.indexOf(" ")?"'"+H+"'":H,selected:!0}):P.push({nodeId:"sheet",nodeText:-1!==H.indexOf(" ")?"'"+H+"'":H}))}for(l=0;l<this.parent.definedNames.length;l++)M.push({nodeId:"defName",nodeText:this.parent.definedNames[l].name});var U=[{nodeId:"01",nodeText:r.getConstant("CellReference"),expanded:p,nodeChild:P},{nodeId:"02",nodeText:r.getConstant("DefinedNames"),expanded:e,nodeChild:M}],V=new d.TreeView({fields:{dataSource:U,id:"nodeId",text:"nodeText",child:"nodeChild"}}),j=this.parent.createElement("div",{className:"e-cont"}),z=this.parent.createElement("div",{className:"e-header"});z.innerText=r.getConstant("CellReference");var q=this.parent.createElement("input",{className:"e-input e-text e-hyp-text",attrs:{type:"Text"}});q.setAttribute("value","A1"),j.appendChild(q),j.insertBefore(z,q);var W=this.parent.createElement("div",{className:"e-cont"}),G=this.parent.createElement("div",{className:"e-header"});G.innerText=r.getConstant("DisplayText");var Y=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"Text"}});m||(Y.classList.add("e-disabled"),Y.setAttribute("readonly","true"),Y.setAttribute("disabled","true")),g&&n.i(a.isNullOrUndefined)(g.hyperlink)&&Y.setAttribute("value",this.parent.getDisplayText(g)),Y.setAttribute("placeholder",r.getConstant("EnterTheTextToDisplay")),W.appendChild(Y),W.insertBefore(G,Y);var X=this.parent.createElement("div",{className:"e-cont"}),K=this.parent.createElement("div",{className:"e-header"});K.innerText=r.getConstant("Sheet");var $=this.parent.createElement("div",{className:"e-refcont"});return X.appendChild($),X.insertBefore(K,$),A.appendChild(j),A.insertBefore(W,j),V.appendTo($),A.appendChild(X),R},e.prototype.removeHyperlink=function(e){var t=n.i(s.I)(e.rowIdx,e.colIdx,e.sheet);t&&t.hyperlink&&("string"==typeof t.hyperlink?t.value=t.value?t.value:t.hyperlink:t.value=t.value?t.value:t.hyperlink.address,delete t.hyperlink,t.style&&(delete t.style.textDecoration,delete t.style.color),t.validation&&t.validation.isHighlighted&&t.style.backgroundColor&&(t.style.color="#ff0000"),e.sheet===this.parent.getActiveSheet()&&(t.style&&this.parent.notify(l._56,null),e.preventRefresh||this.parent.serviceLocator.getService("cell").refresh(e.rowIdx,e.colIdx,!1,null,!0,!1,n.i(i._163)(this.parent))))},e.prototype.removeHyperlinkHandler=function(e){var t,i,a=e.range,s=this.parent.getActiveSheet();if(!e.preventEventTrigger){var d={address:-1===a.indexOf("!")?s.name+"!"+a:a,cancel:!1};if(this.parent.notify(l._14,{action:"removeHyperlink",eventArgs:d}),d.cancel)return}if(a&&-1!==a.indexOf("!")){t=a.split("!");for(var c=this.parent.sheets,h=0;h<c.length;h++)c[h].name===t[0]&&(i=h);s=this.parent.sheets[i],a=t[1]}for(var p,u,f=a?n.i(o.d)(a):n.i(o.d)(s.activeCell),g=f[0];g<=f[2];g++)for(var m=f[1];m<=f[3];m++)if(s&&s.rows[g]&&s.rows[g].cells[m]){if(u=[],p=this.parent.getCell(g,m))for(var v=0;v<p.classList.length;v++)u.push(p.classList[v]);this.parent.notify(l._46,{sheet:s,rowIdx:g,colIdx:m});for(var v=0;v<u.length;v++)p.classList.contains(u[v])||p.classList.add(u[v])}e.preventEventTrigger||this.parent.notify(r._31,{action:"removeHyperlink",eventArgs:{address:-1===a.indexOf("!")?s.name+"!"+a:a}})},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),i=n(0),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.insert=function(e){var t=e.eventArgs;this.parent.notify(i._136,t);var a=n.i(i.l)(this.parent,t.activeSheetIndex);switch(t.modelType){case"Sheet":this.parent.notify(r.A,{startIdx:t.index,endIdx:t.index+(t.model.length-1),preventUpdate:!t.isAction}),this.parent.renderModule.refreshSheet();break;case"Row":if(t.activeSheetIndex===this.parent.activeSheetIndex){var o=this.parent.frozenRowCount(a);if(!this.parent.scrollSettings.enableVirtualization||t.index<=this.parent.viewport.bottomIndex)if(t.freezePane)this.parent.renderModule.refreshSheet(!1,!1,!0);else if(this.parent.scrollSettings.enableVirtualization){var s=this.parent.frozenColCount(a);if(t.index>=this.parent.viewport.topIndex+o){var l=[],d=void 0;s?(d=n.i(i.U)(a.topLeftCell)[1],l.push(o),l.push(this.parent.viewport.leftIndex+s)):d=this.parent.viewport.leftIndex;var c=this.parent.viewport.leftIndex;this.parent.renderModule.refreshUI({rowIndex:this.parent.viewport.topIndex,colIndex:d,refresh:"Row",frozenIndexes:l,skipUpdateOnFirst:this.parent.viewport.topIndex+o===n.i(i._172)(a,o,!0)}),s&&(this.parent.viewport.leftIndex=c)}var h=n.i(i.U)(a.paneTopLeftCell)[0];t.index<h&&(this.parent.notify(r._110,{scrollTop:n.i(i.z)(a,o,h-1,!0)}),this.parent.goTo(n.i(i.W)(t.index,n.i(i._172)(a,s,!0,"columns")))),this.parent.selectRange(a.selectedRange)}else this.parent.renderModule.refreshUI({skipUpdateOnFirst:!0,rowIndex:this.parent.viewport.topIndex,colIndex:0,refresh:"Row"}),this.parent.selectRange(a.selectedRange);else!this.parent.scrollSettings.isFinite||this.parent.viewport.topIndex+o!==n.i(i._172)(a,0,!0)&&this.parent.viewport.bottomIndex!==n.i(i._172)(a,a.rowCount-t.model.length-1,!1)||this.parent.renderModule.refreshSheet(!1,!1,!0)}break;case"Column":if(t.activeSheetIndex===this.parent.activeSheetIndex){var s=this.parent.frozenColCount(a);if(!this.parent.scrollSettings.enableVirtualization||t.index<=this.parent.viewport.rightIndex)if(t.freezePane)this.parent.renderModule.refreshSheet(!1,!1,!0);else if(this.parent.scrollSettings.enableVirtualization){var o=this.parent.frozenRowCount(a);if(t.index>=this.parent.viewport.leftIndex+s){var l=[];o&&(l=[o+this.parent.viewport.topIndex,s]);var p=o?n.i(i.U)(a.topLeftCell)[0]:this.parent.viewport.topIndex,u=this.parent.viewport.topIndex;this.parent.renderModule.refreshUI({skipUpdateOnFirst:this.parent.viewport.leftIndex+s===n.i(i._172)(a,s,!0,"columns"),rowIndex:p,colIndex:this.parent.viewport.leftIndex,refresh:"Column",frozenIndexes:l}),o&&(this.parent.viewport.topIndex=u)}var f=n.i(i.U)(a.paneTopLeftCell)[1];t.index<f&&(this.parent.notify(r._110,{scrollLeft:n.i(i.E)(a,0,f-1,!0)}),this.parent.goTo(n.i(i.W)(n.i(i._172)(a,o,!0),t.index))),this.parent.selectRange(a.selectedRange)}else this.parent.renderModule.refreshUI({skipUpdateOnFirst:!0,rowIndex:0,colIndex:this.parent.viewport.leftIndex,refresh:"Column"}),this.parent.selectRange(a.selectedRange);else!this.parent.scrollSettings.isFinite||this.parent.viewport.leftIndex+s!==n.i(i._172)(a,0,!0,"columns")&&this.parent.viewport.rightIndex!==n.i(i._172)(a,a.colCount-t.model.length-1,!1,"columns")||this.parent.renderModule.refreshSheet(!1,!1,!0)}}this.refreshImgElement(t.model.length,this.parent.activeSheetIndex,t.modelType,t.index),t.isAction?(delete t.isAction,this.parent.notify(r._31,e),n.i(r._159)(this.parent.element)):t.isUndoRedo||(t.isMethod=!0,this.parent.notify(i._31,e))},e.prototype.refreshImgElement=function(e,t,a,o){for(var s,l=this.parent.sheets[t],d=[0,0,l.usedRange.rowIndex,l.usedRange.colIndex],c=0;c<=d[2];c++)for(var h=d[1];h<=d[3];h++)(s=n.i(i.I)(c,h,l))&&s.image&&s.image.length>0&&("Row"===a&&c>=o||"Column"===a&&h>=o)&&this.parent.notify(r._80,{rowIdx:c,colIdx:h,sheetIdx:t,type:a,count:e,status:"insert"})},e.prototype.addEventListener=function(){this.parent.on(i._86,this.insert,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i._86,this.insert)},e.prototype.getModuleName=function(){return"insert"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n(0),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r.o,this.keyDownHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(r.o,this.keyDownHandler)},e.prototype.keyDownHandler=function(e){var t=this,o=e.target;if(e.altKey&&38===e.keyCode&&this.parent.element.lastElementChild.classList.contains("e-filter-popup"))return void this.parent.notify(r._32,{closePopup:!0});var s=this.parent.serviceLocator.getService(r._175).dialogInstance,l=o.id===this.parent.element.id+"_name_box";if("None"===this.parent.selectionSettings.mode||s||this.parent.isEdit||o.classList.contains("e-ss-ddb")&&117!==e.keyCode&&9!==e.keyCode||l&&117!==e.keyCode||o.classList.contains("e-sheet-rename")||o.id===this.parent.element.id+"_SearchBox"||o.classList.contains("e-chk-hidden")||o.classList.contains("e-ddl")&&o.classList.contains("e-input-focus")){if(s){if(13===e.keyCode)s.element.classList.contains("e-spreadsheet-function-dlg")&&(o.classList.contains("e-formula-list")||o.classList.contains("e-list-item"))&&n.i(r._159)(s.element.querySelector(".e-footer-content .e-primary"));else if(9===e.keyCode)if(s.element.classList.contains("e-find-dlg")){var d=s.element.querySelectorAll(".e-footer-content .e-btn:not(:disabled)"),c=d.length?d[d.length-1].className:"e-findnreplace-checkmatch";if(e.shiftKey){if(document.activeElement.classList.contains("e-dlg-closeicon-btn"))if(e.preventDefault(),d.length)n.i(r._159)(d[d.length-1]);else{var h=s.element.querySelector(".e-findnreplace-exactmatchcheckbox");h&&(n.i(r._159)(h.querySelector(".e-findnreplace-checkmatch")),h.classList.add("e-focus"))}}else document.activeElement.className.includes(c)&&n.i(r._159)(s.element)}else if(s.element.classList.contains("e-protect-dlg")){if(e.shiftKey?document.activeElement.classList.contains("e-primary"):document.activeElement.id===this.parent.element.id+"_protect_check"){var p=s.element.querySelector(".e-protect-option-list");if(p&&!p.querySelector(".e-list-item.e-focused")){var u=p.querySelector(".e-list-item");u&&u.classList.add("e-focused")}}}else if(s.element.classList.contains("e-custom-format-dlg"))if(e.shiftKey){if(document.activeElement.className.includes("e-list-item e-active")){var p=n.i(a.closest)(document.activeElement,".e-custom-listview");p&&n.i(r._159)(p)}}else if(document.activeElement.classList.contains("e-btn")&&document.activeElement.parentElement.classList.contains("e-custom-dialog")){var p=s.element.querySelector(".e-custom-listview"),f=n.i(a.getComponent)(p,"listview");if(p){var u=p.querySelector(".e-list-item.e-active");if(!u){if(!(u=p.querySelector(".e-list-item")))return;f.selectItem(u)}e.preventDefault(),u.focus()}}else document.activeElement.classList.contains("e-list-item")&&n.i(r._159)(s.element);else if(s.element.classList.contains("e-spreadsheet-function-dlg")){if(e.shiftKey&&document.activeElement.className.includes("e-list-item e-active")){var p=n.i(a.closest)(document.activeElement,".e-formula-list");p&&n.i(r._159)(p)}}else if(s.element.classList.contains("e-goto-dlg")&&!s.element.classList.contains("e-dlg-modal"))if(e.shiftKey){if(document.activeElement.className.includes("e-dlg-closeicon-btn")){var g=s.element.querySelector(".e-footer-content .e-btn");g&&(e.preventDefault(),n.i(r._159)(g))}}else document.activeElement.className.includes("e-btn-goto-ok")&&n.i(r._159)(s.element)}else l&&9===e.keyCode&&e.shiftKey&&this.focusEle(e,".e-formula-bar",!1,!0);var m={action:"getCurrentEditValue",editedValue:""};this.parent.notify(r.j,m);var v=n.i(i._160)(m.editedValue,!0);return void(this.parent.isEdit&&v&&e.shiftKey&&!e.ctrlKey&&n.i(r._135)(e.keyCode)&&this.shiftSelection(e))}var y=this.parent.getActiveSheet(),C=n.i(i.U)(y.activeCell);if(e.altKey){if(40===e.keyCode){if(o.classList.contains("e-dropdown-btn")||o.classList.contains("e-split-btn"))return;var b={e:e,isFilterCell:!1};if(this.parent.notify(r._32,b),b.isFilterCell)return}if(40===e.keyCode&&!document.getElementById(this.parent.element.id+"listValid_popup")){var x=this.parent.getCell(C[0],C[1]);if(x){var S=x.querySelector(".e-validation-list .e-ddl");if(S){n.i(r._159)(S);var w=S.querySelector(".e-dropdownlist")||S,f=n.i(a.getComponent)(w,"dropdownlist");return void(f&&f.showPopup())}}}}o.id===this.parent.element.id+"_File"&&n.i(r._159)(this.parent.element);var _=o.classList.contains("e-add-sheet-tab")||o.classList.contains("e-sheets-list")||o.classList.contains("e-tab-wrap")&&!!n.i(a.closest)(o,".e-sheet-tabs-items")||o.classList.contains("e-aggregate-list")||o.classList.contains("e-scroll-nav");[9,37,38,39,40,33,34,35,36].indexOf(e.keyCode)>-1&&!_&&e.preventDefault();var I,E=n.i(i.T)(y.selectedRange);if(36===e.keyCode){var R=this.parent.frozenColCount(y),k=void 0;if(e.ctrlKey||e.metaKey){var A=n.i(i._172)(y,this.parent.frozenRowCount(y),!0);e.shiftKey?k=[C[0],C[1],A,n.i(i._172)(y,R,!0,"columns")]:(k=[A,n.i(i._172)(y,R,!0,"columns"),A],k[3]=k[1]);var F=this.parent.element.querySelector(".e-main-panel");F.scrollTop&&(F.scrollTop=0);var N=this.parent.getScrollElement();N.scrollLeft&&(N.scrollLeft=0)}else if(e.shiftKey){var T=n.i(i._172)(y,R,!0,"columns");k=y.frozenColumns&&n.i(i._172)(y,C[1],!0,"columns")===T?[E[0],C[1],E[2],n.i(i._172)(y,0,!0,"columns")]:[E[0],C[1],E[2],T],this.scrollNavigation([k[2],k[3]],!0)}else{var T=n.i(i._172)(y,R,!0,"columns");!y.frozenColumns||T!==C[1]&&R!==C[1]||(T=n.i(i._172)(y,0,!0,"columns")),k=[C[0],T,C[0],T],this.scrollNavigation([k[0],k[1]],!0)}this.updateSelection(y,k)}else if(e.ctrlKey||e.metaKey){if(35===e.keyCode){e.preventDefault();var O=n.i(i._172)(y,y.usedRange.rowIndex,!1);O=O>-1?O:y.usedRange.rowIndex;var D=n.i(i._172)(y,y.usedRange.colIndex,!1,"columns");D=D>-1?D:y.usedRange.colIndex,e.shiftKey||(C[0]=O,C[1]=D),C[2]=O,C[3]=D,this.updateSelection(y,C),this.scrollNavigation([O,D],!0)}else 32!==e.keyCode||e.shiftKey||(E[0]=0,E[2]=y.rowCount-1,this.updateSelection(y,E));if(40===e.keyCode||39===e.keyCode||38===e.keyCode||37===e.keyCode)e.shiftKey?(40===e.keyCode?E[2]=this.getNextNonEmptyCell(E[2],C[1],"down"):39===e.keyCode?E[3]=this.getNextNonEmptyCell(C[0],E[3],"right"):38===e.keyCode?E[2]=this.getNextNonEmptyCell(E[2],C[1],"top"):E[3]=this.getNextNonEmptyCell(C[0],E[3],"left"),this.updateSelection(y,E),this.scrollNavigation([E[2],E[3]],!0)):(37===e.keyCode?C[1]=this.getNextNonEmptyCell(C[0],C[1],"left"):38===e.keyCode?C[0]=this.getNextNonEmptyCell(C[0],C[1],"top"):39===e.keyCode?C[1]=this.getNextNonEmptyCell(C[0],C[1],"right"):C[0]=this.getNextNonEmptyCell(C[0],C[1],"down"),this.parent.selectRange(n.i(i.X)(C)),this.scrollNavigation([C[0],C[1]],!0));else if(117===e.keyCode){var L=document.activeElement;L.classList.contains("e-spreadsheet")||n.i(a.closest)(L,".e-sheet")?this.setFocus("Sheet",e,!0):_?this.setFocus("SheetTabs",e):n.i(a.closest)(L,".e-ribbon")?this.setFocus("Ribbon",e):(l||L.classList.contains("e-insert-function"))&&this.setFocus("FormulaBar",e)}}else{if(e.shiftKey){if(32===e.keyCode&&(e.preventDefault(),E[1]=0,E[3]=y.colCount-1,this.updateSelection(y,E)),this.shiftSelection(e),(34===e.keyCode||33===e.keyCode)&&this.parent.scrollModule&&this.parent.scrollModule.isKeyScroll){var P=0,F=this.parent.element.querySelector(".e-main-panel"),M=n.i(i._172)(y,n.i(i.U)(y.paneTopLeftCell)[0],!0),B=n.i(r._164)(this.parent,M).height;if(34===e.keyCode){if(P=B+this.parent.scrollModule.offset.top.size,!this.parent.scrollSettings.isFinite){var H=this.parent.getMainContent().querySelector(".e-virtualtrack");H&&parseFloat(H.style.height)<P+B&&(H.style.height=P+B+"px")}}else if(P=this.parent.scrollModule.offset.top.size-B,Math.round(P)<0){if(!F.scrollTop)return void this.parent.selectRange(n.i(i.X)([E[0],E[1],M,E[3]]));P=0}var U=n.i(i._172)(y,n.i(i.T)(y.selectedRange)[2],!0),V=M>U?0:U-M;this.parent.scrollModule&&F.scrollTop&&(this.parent.scrollModule.isKeyScroll=!1),F.scrollTop=P,n.i(r._115)(function(){34===e.keyCode?(E[2]=n.i(i._172)(y,n.i(i.U)(y.paneTopLeftCell)[0]+V,!0),t.parent.scrollSettings.isFinite&&E[2]>y.rowCount-1&&(E[2]=n.i(i._172)(y,y.rowCount-1,!1),E[2]=E[2]<0?0:E[2])):(E[2]=n.i(i._172)(y,n.i(i.U)(y.paneTopLeftCell)[0]+V,!1),E[2]=E[2]<0?0:E[2]),t.updateSelection(y,E)})}}else if(9===e.keyCode||(this.parent.enableRtl?37===e.keyCode:39===e.keyCode)){var x=n.i(i.I)(C[0],C[1],y);if(x&&x.colSpan>1&&(C[1]+=x.colSpan-1),C[1]<y.colCount-1&&(!y.isProtected||y.protectSettings.selectCells))C[1]+=1,I=!0;else if(y.protectSettings.selectUnLockedCells){var j=this.getNextUnlockedCell("right",C);I=C[1]!==j[1]||C[0]!==j[0],C[1]=j[1],C[0]=j[0]}}else if(13===e.keyCode||40===e.keyCode){var x=n.i(i.I)(C[0],C[1],y);if(x&&x.rowSpan>1&&(C[0]+=x.rowSpan-1),C[0]<y.rowCount-1&&(!y.isProtected||y.protectSettings.selectCells))I=!0,C[0]+=1;else if(y.protectSettings.selectUnLockedCells){var j=this.getNextUnlockedCell("down",C);I=C[0]!==j[0]||C[1]!==j[1],C[1]=j[1],C[0]=j[0]}}else if((34===e.keyCode||33===e.keyCode)&&this.parent.scrollModule&&this.parent.scrollModule.isKeyScroll){var F=this.parent.element.querySelector(".e-main-panel"),P=0,z=n.i(i._172)(y,n.i(i.U)(y.paneTopLeftCell)[0],!0),q=n.i(i._172)(y,n.i(i.U)(y.activeCell)[0],!0),B=n.i(r._164)(this.parent,z).height;if(34===e.keyCode){if(P=this.parent.scrollModule.offset.top.size+B,!this.parent.scrollSettings.isFinite){var H=this.parent.getMainContent().querySelector(".e-virtualtrack");H&&parseFloat(H.style.height)<P+B&&(H.style.height=P+B+"px")}}else{if(P=this.parent.scrollModule.offset.top.size-B,y.frozenRows&&C[0]<this.parent.frozenRowCount(y))return void this.parent.selectRange(n.i(i.X)([z,E[1],z,E[1]]));if(Math.round(P)<0){if(!F.scrollTop)return;P=0}}var W=z>q?0:q-z;this.parent.scrollModule&&F.scrollTop&&(this.parent.scrollModule.isKeyScroll=!1),F.scrollTop=P,n.i(r._115)(function(){var a;34===e.keyCode?(a=n.i(i._172)(y,n.i(i.U)(y.paneTopLeftCell)[0]+W,!0),t.parent.scrollSettings.isFinite&&a>y.rowCount-1&&(a=n.i(i._172)(y,y.rowCount-1,!1),a=a<0?0:a)):(a=n.i(i.U)(y.paneTopLeftCell)[0]+W,a-=t.parent.hiddenCount(z,q),a=n.i(i._172)(y,a,!1),a=a<0?0:a),t.parent.notify(r.x,{range:[a,C[1]],preventAnimation:!0})})}if(e.shiftKey?9===e.keyCode:this.parent.enableRtl?39===e.keyCode:37===e.keyCode){if(C[1]>0&&(!y.isProtected||y.protectSettings.selectCells))C[1]-=1,I=!0;else if(y.protectSettings.selectUnLockedCells){var j=this.getNextUnlockedCell("left",C);I=C[1]!==j[1]||C[0]!==j[0],C[1]=j[1],C[0]=j[0]}if(C[1]<=0){var G=this.parent.getMainContent();0===C[1]&&G.scrollLeft&&!this.parent.enableRtl&&(G.scrollLeft=0)}}else if((e.shiftKey?13===e.keyCode:38===e.keyCode)&&!this.parent.element.querySelector(".e-find-toolbar")){if(C[0]>0&&(!y.isProtected||y.protectSettings.selectCells))C[0]-=1,I=!0;else if(y.protectSettings.selectUnLockedCells){var Y=this.getNextUnlockedCell("up",C);I=C[0]!==Y[0]||C[1]!==Y[1],C[1]=Y[1],C[0]=Y[0]}if(C[0]<=0){var X=this.parent.getMainContent().parentElement;0===C[0]&&X.scrollTop&&(X.scrollTop=0)}}}if(!I||this.parent.scrollModule&&!this.parent.scrollModule.isKeyScroll||_||n.i(a.closest)(document.activeElement,".e-ribbon")||o.classList.contains("e-insert-function")||o.classList.contains("e-formula-bar")&&(!o.classList.contains("e-formula-bar")||"TEXTAREA"!==o.nodeName||13!==e.keyCode)){if(9===e.keyCode){var K=this.parent.showRibbon&&n.i(a.closest)(document.activeElement,".e-ribbon");if(K)n.i(a.closest)(document.activeElement,".e-tab-header")?e.shiftKey||K.classList.contains("e-collapsed")?this.focusEle(e,".e-ribbon .e-drop-icon"):this.focusEle(e,".e-ribbon .e-content .e-toolbar-item:not(.e-separator):not(.e-overlay) .e-btn"):n.i(a.closest)(document.activeElement,".e-content")?e.shiftKey?this.focusEle(e,".e-ribbon .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap",!0):this.focusEle(e,".e-ribbon .e-drop-icon"):document.activeElement.classList.contains("e-drop-icon")&&(e.shiftKey&&!K.classList.contains("e-collapsed")?this.focusEle(e,".e-ribbon .e-content .e-toolbar-item:not(.e-separator):not(.e-overlay) .e-btn"):this.focusEle(e,".e-ribbon .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap",!0));else if(o.classList.contains("e-insert-function"))e.shiftKey?this.focusEle(e,".e-formula-bar-panel .e-combobox"):this.focusEle(e,".e-formula-bar",!1,!0);else if(_)if(e.shiftKey){var $=o.classList.contains("e-aggregate-list")||o.classList.contains("e-scroll-left-nav");if(o.classList.contains("e-add-sheet-tab")||$||o.classList.contains("e-sheets-list")&&o.previousElementSibling&&o.previousElementSibling.disabled){var Z=!$&&this.parent.element.querySelector(".e-aggregate-list");if(Z)this.focusEle(e,null,!1,!1,Z);else if(!o.classList.contains("e-scroll-left-nav")&&this.parent.element.querySelector(".e-sheet-tab-panel .e-scroll-nav"))this.focusEle(e,".e-sheet-tab-panel .e-scroll-right-nav",!0);else{var J=[].slice.call(this.parent.element.querySelectorAll(".e-sheet-tab-panel .e-toolbar-item"));J[J.length-1]&&this.focusEle(e,null,!0,!1,J[J.length-1].querySelector(".e-tab-wrap"))}}else if(o.classList.contains("e-scroll-right-nav"))this.focusEle(e,".e-sheet-tab-panel .e-scroll-left-nav",!0);else if(o.classList.contains("e-tab-wrap")){var J=[].slice.call(this.parent.element.querySelectorAll(".e-sheet-tab-panel .e-toolbar-item")),j=J.indexOf(o.parentElement);0===j?this.focusEle(e,".e-sheet-tab-panel .e-sheets-list"):this.focusEle(e,null,!0,!1,J[j-1].querySelector(".e-tab-wrap"))}}else{var Q=!!this.parent.element.querySelector(".e-aggregate-list");if(o.classList.contains("e-aggregate-list")||!Q&&o.classList.contains("e-scroll-right-nav"))this.focusEle(e,".e-sheet-tab-panel .e-icon-btn:not(:disabled)");else if(o.classList.contains("e-sheets-list"))this.focusEle(e,".e-sheet-tab-panel .e-toolbar-item .e-tab-wrap",!0);else if(o.classList.contains("e-scroll-left-nav"))this.focusEle(e,".e-sheet-tab-panel .e-scroll-right-nav",!0);else if(o.classList.contains("e-tab-wrap")){var J=[].slice.call(this.parent.element.querySelectorAll(".e-sheet-tab-panel .e-toolbar-item")),ee=J.indexOf(o.parentElement);if(ee===J.length-1){var te=!!this.parent.element.querySelector(".e-sheet-tab-panel .e-scroll-nav");!te&&Q||this.focusEle(e,".e-sheet-tab-panel ."+(te?"e-scroll-nav":"e-icon-btn:not(:disabled)"),te)}else this.focusEle(e,null,!0,!1,J[ee+1].querySelector(".e-tab-wrap"))}}}}else{if(40===e.keyCode||38===e.keyCode||13===e.keyCode)for(;n.i(i.v)(y,C[0]);)if((40===e.keyCode||!e.shiftKey&&13===e.keyCode)&&(C[0]=C[0]+1),(38===e.keyCode||e.shiftKey&&13===e.keyCode)&&(C[0]=C[0]-1,C[0]<0))return;if(37===e.keyCode||39===e.keyCode||9===e.keyCode)for(;n.i(i.F)(y,C[1]);)if((39===e.keyCode||!e.shiftKey&&9===e.keyCode)&&(C[1]=C[1]+1),(37===e.keyCode||e.shiftKey&&9===e.keyCode)&&(C[1]=C[1]-1,C[1]<0))return;this.scrollNavigation(C);var ne=n.i(i.X)(C),re=function(e){if(ne!==y.selectedRange){t.parent.setSheetPropertyOnMute(y,"activeCell",ne),t.parent.notify(r.x,{range:C,preventAnimation:e});var i;a.Browser.isDevice&&"safari"===a.Browser.info.name&&(a.Browser.isIos||a.Browser.isIos7)&&(i=t.parent.element.querySelector(".e-ss-focus-edit")),i=i||t.parent.getCell(C[0],C[1]),i&&n.i(r._159)(i)}};if(this.parent.scrollModule&&this.parent.scrollModule.isKeyScroll){if(ne===y.selectedRange)return;n.i(r._115)(re.bind(this,!0))}else re()}},e.prototype.setFocus=function(e,t,n){"Sheet"===e?t.shiftKey?this.parent.showFormulaBar?this.focusEle(t,".e-formula-bar-panel .e-combobox"):this.setFocus("FormulaBar",t,n):this.parent.showSheetTabs?this.focusEle(t,".e-sheet-tab-panel .e-icon-btn:not(:disabled)"):this.setFocus("SheetTabs",t,n):"SheetTabs"===e?t.shiftKey?n||this.focusEle(t,".e-selectall"):this.parent.showRibbon?this.focusEle(t,".e-ribbon .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap",!0):this.setFocus("Ribbon",t,n):"Ribbon"===e?t.shiftKey?this.parent.showSheetTabs?this.focusEle(t,".e-sheet-tab-panel .e-icon-btn:not(:disabled)"):n||this.focusEle(t,".e-selectall"):this.parent.showFormulaBar?this.focusEle(t,".e-formula-bar-panel .e-combobox"):this.setFocus("FormulaBar",t,n):"FormulaBar"===e&&(t.shiftKey?this.parent.showRibbon?this.focusEle(t,".e-ribbon .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap",!0):this.setFocus("Ribbon",t,n):n||this.focusEle(t,".e-selectall"))},e.prototype.focusEle=function(e,t,i,o,s){if(s=s||this.parent.element.querySelector(t),i&&!s){var l=this.parent.element.querySelector(".e-ribbon .e-tab"),d=l&&n.i(a.getComponent)(l,"tab").selectedItem||0;s=this.parent.element.querySelector(".e-tab-header").getElementsByClassName("e-toolbar-item")[d],s=s&&s.querySelector(".e-tab-wrap")}if(s)if(e.preventDefault(),o)s.click(),n.i(r._159)(s),s.setSelectionRange(s.value.length,s.value.length);else if(i){if(s.setAttribute("tabindex","0"),s.parentElement.classList.contains("e-active")&&s.parentElement.classList.contains("e-toolbar-item")){var l=this.parent.element.querySelector(".e-sheet-tab-panel .e-sheet-tab");!l&&l.classList.contains("e-focused")&&l.classList.add("e-focused")}s.focus()}else n.i(r._159)(s)},e.prototype.updateSelection=function(e,t){e.isProtected&&!e.protectSettings.selectCells&&e.protectSettings.selectUnLockedCells?n.i(r._160)(this.parent,n.i(i._4)(t))||this.parent.selectRange(n.i(i.X)(t)):this.parent.selectRange(n.i(i.X)(t))},e.prototype.getNextNonEmptyCell=function(e,t,r){var o,s,l=this.parent.getActiveSheet(),d=function(e,t){var r=n.i(i.I)(e,t,l,null,!0).value;return!n.i(a.isNullOrUndefined)(r)&&""!==r};if("down"===r){var c=n.i(i._172)(l,e+1,!0);o=d(c,t);for(var h=n.i(i._172)(l,l.rowCount-1,!1),p=c;p<l.rowCount;p++){if(p===h)return p;if(o){if(!d(n.i(i._172)(l,p,!0),t))return n.i(i._172)(l,p-1,!1)}else if(s=n.i(i._172)(l,p+1,!0),d(s,t))return s}return e}if("top"===r){var c=n.i(i._172)(l,e-1,!1);o=d(c,t);for(var u=n.i(i._172)(l,0,!0),f=c;f>=0;f--){if(f===u)return f;if(o){if(!d(n.i(i._172)(l,f,!1),t))return n.i(i._172)(l,f+1,!0)}else if(s=n.i(i._172)(l,f-1,!1),d(s,t))return s}return e}if("right"===r){var g=n.i(i._172)(l,t+1,!0,"columns");o=d(e,g);for(var m=n.i(i._172)(l,l.colCount-1,!1,"columns"),v=g;v<l.colCount;v++){if(v===m)return v;if(o){if(!d(e,n.i(i._172)(l,v,!0,"columns")))return n.i(i._172)(l,v-1,!1,"columns")}else if(s=n.i(i._172)(l,v+1,!0,"columns"),d(e,s))return s}return t}var g=n.i(i._172)(l,t-1,!1,"columns");o=d(e,g);for(var u=n.i(i._172)(l,0,!0,"columns"),y=g;y>=0;y--){if(y===u)return y;if(o){if(!d(e,n.i(i._172)(l,y,!1,"columns")))return n.i(i._172)(l,y+1,!0,"columns")}else if(s=n.i(i._172)(l,y-1,!1,"columns"),d(e,s))return s}return t},e.prototype.getNextUnlockedCell=function(e,t){var r,a,o=this.parent.getActiveSheet();if("right"===e)for(var s=t[0],l=void 0,d=void 0,c=o.usedRange.rowIndex,h=o.usedRange.colIndex;s<=c;){for(l=void 0===l?t[1]+1:0,d&&s===t[0]&&(h=t[1]-1),l;l<=h;l++)if(r=n.i(i.I)(s,l,o),a=n.i(i.B)(o,l)||{},!n.i(i._169)(r,a)&&!a.hidden&&!n.i(i.v)(o,s))return[s,l];s!==o.usedRange.rowIndex||d?s++:(s=0,c=t[0],d=!0)}else if("left"===e)for(var s=t[0],l=void 0,d=void 0,c=0,h=0;s>=c;){for(l=void 0===l?t[1]-1:o.usedRange.colIndex,d&&s===t[0]&&(h=t[1]+1),l;l>=h;l--)if(r=n.i(i.I)(s,l,o),a=n.i(i.B)(o,l)||{},!n.i(i._169)(r,a)&&!a.hidden&&!n.i(i.v)(o,s))return[s,l];0!==s||d?s--:(s=o.usedRange.rowIndex,c=t[0],d=!0)}else if("down"===e)for(var l=t[1],s=void 0,d=void 0,h=o.usedRange.colIndex,c=o.usedRange.rowIndex;l<=h;){for(s=void 0===s?t[0]+1:0,d&&l===t[1]&&(c=t[0]-1),s;s<=c;s++)if(r=n.i(i.I)(s,l,o),a=n.i(i.B)(o,l)||{},!n.i(i._169)(r,a)&&!a.hidden&&!n.i(i.v)(o,s))return[s,l];l!==o.usedRange.colIndex||d?l++:(l=0,h=t[1],d=!0)}else for(var l=t[1],s=void 0,d=void 0,h=0,c=0;l>=h;){for(s=void 0===s?t[0]-1:o.usedRange.rowIndex,d&&l===t[1]&&(c=t[0]+1),s;s>=c;s--)if(r=n.i(i.I)(s,l,o),a=n.i(i.B)(o,l)||{},!n.i(i._169)(r,a)&&!a.hidden&&!n.i(i.v)(o,s))return[s,l];0!==l||d?l--:(l=o.usedRange.colIndex,h=t[1],d=!0)}return t},e.prototype.shiftSelection=function(e){var t=this.parent.getActiveSheet(),o=n.i(i.T)(t.selectedRange),s=n.i(i._4)(o),l=!0;if(38===e.keyCode){for(var d=s[1];d<=s[3];d++){var c=n.i(i.I)(o[2],d,t);if(!n.i(a.isNullOrUndefined)(c)&&c.rowSpan&&c.rowSpan<0){o[2]=n.i(i._172)(t,o[2]-(Math.abs(c.rowSpan)+1),!1),l=!1;break}}if(l&&(o[2]=n.i(i._172)(t,o[2]-1,!1)),o[2]<0)return}if(40===e.keyCode){for(var d=s[1];d<=s[3];d++){var c=n.i(i.I)(o[2],d,t);if(!n.i(a.isNullOrUndefined)(c)&&c.rowSpan&&c.rowSpan>0){o[2]=n.i(i._172)(t,o[2]+Math.abs(c.rowSpan),!0),l=!1;break}}if(l&&(o[2]=n.i(i._172)(t,o[2]+1,!0)),o[2]>=t.rowCount&&(o[2]=n.i(i._172)(t,t.rowCount-1,!1),o[2]<0))return}if(39===e.keyCode){for(var d=s[0];d<=s[2];d++){var c=n.i(i.I)(d,o[3],t);if(!n.i(a.isNullOrUndefined)(c)&&c.colSpan&&c.colSpan>0){o[3]=n.i(i._172)(t,o[3]+Math.abs(c.colSpan),!0,"columns"),l=!1;break}}if(l&&(o[3]=n.i(i._172)(t,o[3]+1,!0,"columns")),o[3]>=t.colCount&&(o[3]=n.i(i._172)(t,t.colCount-1,!1,"columns"),o[3]<0))return}if(37===e.keyCode){for(var d=s[0];d<=s[2];d++){var c=n.i(i.I)(d,o[3],t);if(!n.i(a.isNullOrUndefined)(c)&&c.colSpan&&c.colSpan<0){o[3]=n.i(i._172)(t,o[3]-(Math.abs(c.colSpan)+1),!1,"columns"),l=!1;break}}if(l&&(o[3]=n.i(i._172)(t,o[3]-1,!1,"columns")),o[3]<0)return}if(e.shiftKey&&e.ctrlKey&&!this.parent.scrollSettings.enableVirtualization){var h=[t.usedRange.rowIndex,t.usedRange.colIndex];if(37===e.keyCode&&(o[3]<=h[1]?o[3]=n.i(i._172)(t,0,!0,"columns"):o[3]=n.i(i._172)(t,h[1],!0,"columns")),38===e.keyCode&&(o[2]<=h[0]?o[2]=n.i(i._172)(t,0,!0):o[2]=n.i(i._172)(t,h[0],!0)),39===e.keyCode&&(o[3]<=h[1]?o[3]=n.i(i._172)(t,h[1],!1,"columns"):o[3]=n.i(i._172)(t,t.colCount,!1,"columns"),o[3]<0))return;if(40===e.keyCode&&(o[2]<=h[0]?o[2]=n.i(i._172)(t,h[0],!1):o[2]=n.i(i._172)(t,t.rowCount,!1),o[2]<0))return}if(37===e.keyCode||39===e.keyCode||38===e.keyCode||40===e.keyCode){var p=n.i(i.U)(t.activeCell);this.parent.isEdit&&e.shiftKey?(e.preventDefault(),this.parent.notify(r.I,{range:o,e:e}),this.parent.notify(r._67,{range:n.i(i.X)(n.i(i._4)(o)),isSelect:!1}),this.parent.notify(r._64,{})):this.parent.selectRange(n.i(i.X)(o)),this.scrollNavigation([n.i(i._164)(t,o)?p[0]:o[2],n.i(i._163)(t,o)?p[1]:o[3]])}},e.prototype.scrollNavigation=function(e,t){if(this.parent.allowScrolling){var a=this.parent.enableRtl?-1:1,o=this.parent.getMainContent().parentElement,s=this.parent.getScrollElement(),l=this.parent.getActiveSheet(),d=n.i(i._4)(n.i(i.T)(l.selectedRange)),c=n.i(i.U)(l.topLeftCell),h=this.parent.frozenRowCount(l),p=this.parent.frozenColCount(l),u=n.i(i.U)(l.paneTopLeftCell),f=n.i(i._172)(l,e[0]<h?c[0]:u[0],!0),g=this.parent.scrollModule.offset.top.size;if(o.scrollTop)if(h&&e[0]!==d[2]){if(e[0]===h)return void(o.scrollTop=0);e[0]===h-1&&(o.scrollTop=0)}else if(e[0]===n.i(i._172)(l,0,!0))return void(o.scrollTop=0);if(s&&s.scrollLeft)if(p&&e[1]!==d[3]){if(e[1]===p)return void(s.scrollLeft=0);e[1]===p-1&&(s.scrollLeft=0)}else if(e[1]===n.i(i._172)(l,0,!0,"columns"))return void(s.scrollLeft=0);var m=n.i(r._164)(this.parent,f).index;if(m<=e[0]){if(e[0]>=h)if(t){var v=o.getBoundingClientRect().height,y=n.i(i.z)(l,u[0],e[0],!0);o.scrollTop=y>2*v?g+y-v:g+y-n.i(i.x)(l,e[0],!0),n.i(r._159)(this.parent.element)}else o.scrollTop=g+n.i(i.z)(l,m,e[0],!0)}else f>e[0]&&(o.scrollTop&&(this.parent.scrollModule.isKeyScroll=!1),o.scrollTop=g-Math.ceil(n.i(i.z)(l,e[0],f-1,!0)),t&&n.i(r._159)(this.parent.element));var C=n.i(r._165)(this.parent,u[1]);if(C<=e[1]&&s){if(e[1]>=p)if(t){var b=s.getBoundingClientRect().width,x=n.i(i.E)(l,u[1],e[1],!0);s.scrollLeft=x>2*b?(this.parent.scrollModule.offset.left.size+x-b)*a:(this.parent.scrollModule.offset.left.size+(x-n.i(i.D)(l,e[0],null,!0)))*a,n.i(r._159)(this.parent.element)}else s.scrollLeft=(this.parent.scrollModule.offset.left.size+n.i(i.E)(l,C,e[1],!0))*a}else u[1]>e[1]&&s&&(s.scrollLeft&&(this.parent.scrollModule.isKeyScroll=!1),s.scrollLeft=(this.parent.scrollModule.offset.left.size-n.i(i.E)(l,e[1],u[1]-1,!0))*a,t&&n.i(r._159)(this.parent.element))}},e.prototype.getModuleName=function(){return"keyboardNavigation"},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1),i=n(2),a=n(0),o=n(3),s=(n.n(o),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(r.o,this.keyDownHandler,this),this.parent.on(r.n,this.keyUpHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.o,this.keyDownHandler),this.parent.off(r.n,this.keyUpHandler))},e.prototype.isTrgtNotInput=function(e){var t=e.target;return!(n.i(o.closest)(t,".e-filter-popup")||n.i(o.closest)(t,".e-find-dlg")||n.i(o.closest)(t,".e-hyperlink-dlg")||n.i(o.closest)(t,".e-sheet-tab")||n.i(o.closest)(t,".e-name-box")||n.i(o.closest)(t,".e-link-dialog"))},e.prototype.ribbonShortCuts=function(e){if(this.parent.showRibbon&&e.altKey&&!e.ctrlKey&&!e.shiftKey){var t=n.i(o.getComponent)(this.parent.element.querySelector(".e-ribbon .e-tab"),"tab"),a=void 0;if(72===e.keyCode)a=1;else if(78===e.keyCode)a=2;else if(65===e.keyCode)a=4;else if(87===e.keyCode)a=5;else if(77===e.keyCode)a=3;else if(70===e.keyCode)e.preventDefault(),n.i(o.select)("#"+this.parent.element.id+"_File",this.parent.element).click();else if(18===e.keyCode){e.preventDefault();var s=n.i(i.w)(this.parent.getActiveSheet().activeCell),l={sheetIdx:this.parent.activeSheetIndex};if(this.parent.notify(r._33,l),!(l.hasFilter&&l.filterRange&&l.filterRange[0]===s[0]&&l.filterRange[1]<=s[1]&&l.filterRange[3]>=s[1])){var d=document.activeElement;if(!(d.classList.contains("e-spreadsheet-edit")||d.classList.contains("e-sheet-rename")||d.id===this.parent.element.id+"_name_box"||n.i(o.closest)(d,".e-dropdown-btn")||n.i(o.closest)(d,".e-split-btn")||n.i(o.closest)(d,".e-popup-open"))){var c=this.parent.getCell(s[0],s[1]);if(c&&c.querySelector(".e-validation-list"))return;if(n.i(o.closest)(d,".e-ribbon"))return void n.i(r._159)(this.parent.element);for(var h=0;h<=this.parent.ribbonModule.ribbon.items.length;h++)if(h===this.parent.ribbonModule.ribbon.selectedTab){var p=this.parent.element.querySelector(".e-toolbar-items").children[h+2].children[0];return p.setAttribute("tabindex","0"),void n.i(r._159)(p)}}}}a&&(t.items[a].disabled||t.items[a].cssClass.includes("e-hide")?n.i(r._159)(this.parent.element):(e.preventDefault(),t.select(a,Object.assign(e,{isShortcut:!0}))))}},e.prototype.keyUpHandler=function(e){if(37===e.keyCode||39===e.keyCode){var t=document.activeElement;if(t.classList.contains("e-colorpicker-wrapper")||t.classList.contains("e-split-btn-wrapper")){var i=t.querySelector(".e-split-btn");i&&n.i(r._159)(i)}}else if(13===e.keyCode){var a=e.target;if(a.classList.contains("e-scroll-nav")){var s=function(){a.getAttribute("tabindex")||(a.setAttribute("tabindex","0"),n.i(r._159)(a)),o.EventHandler.remove(a,"blur",s)};o.EventHandler.add(a,"blur",s,this)}}},e.prototype.keyDownHandler=function(e){var t="None"===this.parent.selectionSettings.mode;this.ribbonShortCuts(e);var s=this.parent.getActiveSheet(),l=e.target;if((e.ctrlKey||e.metaKey)&&this.isTrgtNotInput(e)){n.i(o.closest)(l,".e-find-dlg")||t||([79,83].indexOf(e.keyCode)>-1?e.preventDefault():65!==e.keyCode||this.parent.isEdit||e.preventDefault());var d=n.i(i.w)(s.activeCell);if(79===e.keyCode)this.parent.allowOpen&&this.parent.openUrl&&n.i(o.select)("#"+this.parent.element.id+"_fileUpload",this.parent.element).click();else if(83===e.keyCode)this.parent.saveUrl&&this.parent.allowSave&&this.parent.notify(a._37,null);else if(67!==e.keyCode||t)if(75!==e.keyCode||t)if(90!==e.keyCode||t)if(89!==e.keyCode||t){if((82===e.keyCode||68===e.keyCode)&&!t){e.preventDefault();var c=n.i(i._10)(n.i(i.l)(s.selectedRange)),h={colIndex:c[1],rowIndex:c[0]},p=void 0,u=void 0;if(68===e.keyCode?(c[0]===c[2]?h.rowIndex=c[0]-1:c[0]+=1,u=n.i(i.g)([h.rowIndex,h.colIndex,h.rowIndex,c[3]]),p="Down"):(c[1]===c[3]?h.colIndex=c[1]-1:c[1]+=1,p="Right",u=n.i(i.g)([h.rowIndex,h.colIndex,c[2],h.colIndex])),h.rowIndex<0||h.colIndex<0)return;this.parent.notify(r._103,{fillType:n.i(a.I)(h.rowIndex,h.colIndex,s,!1,!0).formula?"FillSeries":"CopyCells",dAutoFillCell:u,rangeInfo:{direction:p,startCell:h,endCell:{rowIndex:c[2],colIndex:c[3]},fillRange:c}}),this.parent.notify(a._148,{type:"mousedown"}),this.parent.notify(a._127,null)}}else this.parent.isEdit||(e.preventDefault(),this.parent.notify(r._18,{isUndo:!1}));else this.parent.isEdit||(e.preventDefault(),this.parent.notify(r._18,{isUndo:!0}));else{var f=s.rows[d[0]],g=void 0;e.preventDefault(),n.i(o.isNullOrUndefined)(f)||(g=f.cells[d[1]]),n.i(o.isNullOrUndefined)(g)&&n.i(a.J)(d[0],d[1],s,g,!1),g&&g.hyperlink?this.parent.notify(r._12,null):this.parent.notify(r._11,null)}else this.parent.notify(r.K,{promise:Promise});var m=s.isProtected&&n.i(a._169)(n.i(a.I)(d[0],d[1],s),n.i(a.B)(s,d[1]));if(70===e.keyCode&&!t&&this.parent.allowFindAndReplace&&(e.preventDefault(),this.parent.notify(i._26,{})),m&&s.isProtected&&86!==e.keyCode||70===e.keyCode||t||(71===e.keyCode?(e.preventDefault(),this.parent.notify(r._46,null)):72===e.keyCode?(e.preventDefault(),this.parent.notify(r._47,null)):88===e.keyCode?this.parent.notify(r.J,{promise:Promise}):86===e.keyCode&&this.parent.notify(r.L,{isAction:!0}),!e.shiftKey||76!==e.keyCode||this.parent.isEdit||s.isProtected||(e.preventDefault(),this.parent.notify(r._23,{}))),!t&&(!s.isProtected||s.protectSettings.formatCells))if(66===e.keyCode){e.preventDefault();var v=this.parent.getCellStyleValue(["fontWeight"],d).fontWeight;v="bold"===v?"normal":"bold",this.parent.notify(i.G,{style:{fontWeight:v},onActionUpdate:!0,refreshRibbon:!0})}else if(73===e.keyCode){e.preventDefault();var v=this.parent.getCellStyleValue(["fontStyle"],d).fontStyle;v="italic"===v?"normal":"italic",this.parent.notify(i.G,{style:{fontStyle:v},onActionUpdate:!0,refreshRibbon:!0})}else e.ctrlKey&&85===e.keyCode&&!e.shiftKey?(e.preventDefault(),this.parent.notify(i._69,{style:{textDecoration:"underline"},refreshRibbon:!0})):e.ctrlKey&&53===e.keyCode&&!e.shiftKey&&(e.preventDefault(),this.parent.notify(i._69,{style:{textDecoration:"line-through"},refreshRibbon:!0}))}if(27===e.keyCode&&this.parent.notify(r.M,null),((e.ctrlKey||e.metaKey)&&119===e.keyCode||13===e.keyCode&&l.classList.contains("e-drop-icon"))&&this.parent.showRibbon){e.preventDefault();var y=this.parent.element.querySelector(".e-drop-icon");y&&y.click()}if((e.ctrlKey||e.metaKey)&&!t)if(57===e.keyCode){if(!s.isProtected||s.protectSettings.formatColumns){e.preventDefault();var d=n.i(i.l)(s.selectedRange);this.parent.notify(i._86,{startIndex:d[0],endIndex:d[2],hide:!e.shiftKey,isCol:!1,actionUpdate:!0})}}else if(48===e.keyCode&&(!s.isProtected||s.protectSettings.formatRows)){var d=n.i(i.l)(s.selectedRange);this.parent.notify(i._86,{startIndex:d[1],endIndex:d[3],hide:!e.shiftKey,isCol:!0,actionUpdate:!0})}if(e.shiftKey&&!t)if(114===e.keyCode)e.preventDefault(),this.parent.notify(r._113,null);else if(116===e.keyCode&&this.parent.allowFindAndReplace)e.preventDefault(),this.parent.notify(i._26,{});else if(121===e.keyCode){var C=document.activeElement.className;["e-spreadsheet","e-cell","e-header-cell","e-clipboard"].some(function(e){return C.includes(e)})&&this.focusTarget(s)}if(e.altKey&&!t&&((e.ctrlKey||e.metaKey)&&78===e.keyCode?(e.preventDefault(),this.parent.refresh(!0)):113===e.keyCode&&this.parent.saveUrl&&(e.preventDefault(),this.parent.notify(a._37,null))),(e.ctrlKey||e.metaKey)&&e.shiftKey&&!t){if(!s.isProtected||s.protectSettings.formatCells){var b=s.selectedRange,x=void 0;if(192===e.keyCode)x=n.i(a._201)("General");else if(52===e.keyCode)x="$#,##0.00;[Red]($#,##0.00)";else if(53===e.keyCode)x="0%";else if(54===e.keyCode)x=n.i(a._201)("Scientific");else if(51===e.keyCode)x="dd-mmm-yy";else if(50===e.keyCode)x="h:mm AM/PM";else if(49===e.keyCode)x=n.i(a._201)("Number");else if(55===e.keyCode){e.preventDefault();this.parent.notify(i.G,{style:{border:"1px solid #000000"},onActionUpdate:!0,borderType:"Outer"})}x&&(this.parent.notify(i._5,{format:x,range:b}),this.parent.notify(a._148,{type:"mousedown"}),this.parent.notify(a._127,null))}if(85===e.keyCode){e.preventDefault();var S=this.parent.element.querySelector(".e-formula-bar-panel .e-drop-icon");S&&S.click()}}122!==e.keyCode||!e.shiftKey||e.ctrlKey||this.parent.isProtected||this.parent.notify(i.J,{model:this.parent,start:this.parent.activeSheetIndex+1,end:this.parent.activeSheetIndex+1,modelType:"Sheet",isAction:!0,activeSheetIndex:this.parent.activeSheetIndex+1}),e.shiftKey&&e.altKey&&75===e.keyCode&&this.parent.showSheetTabs&&this.parent.element.querySelector(".e-sheets-list").click()},e.prototype.focusTarget=function(e){var t,o=n.i(i._10)(n.i(i.l)(e.selectedRange)),s=0===o[1]&&o[3]===e.colCount-1,l=0===o[0]&&o[2]===e.rowCount-1;if(s&&l)t=this.parent.element.querySelector(".e-selectall");else if(s){var d=this.parent.frozenRowCount(e);if(o[0]<d){var c=this.parent.getRow(o[0],this.parent.sheetModule.getSelectAllTable());t=c&&c.cells[0]}else{o[0]=n.i(a._172)(e,o[0],!0);var h=n.i(a._172)(e,n.i(i.l)(e.paneTopLeftCell)[0],!0),p=n.i(r._164)(this.parent,h).index,u=void 0;u=o[0]>h&&o[0]<p?this.parent.getRow(o[0],this.parent.getRowHeaderTable()):o[0]>=p?this.parent.getRow(p-1,this.parent.getRowHeaderTable()):this.parent.getRow(h+1,this.parent.getRowHeaderTable()),t=u&&u.cells[0]}}else if(l){var f=this.parent.frozenColCount(e);if(o[1]<f){var c=this.parent.element.querySelector(".e-selectall-container .e-header-row");t=c&&this.parent.getCell(0,o[1],c)}else{o[1]=n.i(a._172)(e,o[1],!0,"columns");var g=n.i(a._172)(e,n.i(i.l)(e.paneTopLeftCell)[1],!0,"columns"),m=n.i(r._165)(this.parent,g),u=this.parent.element.querySelector(".e-column-header .e-header-row");t=o[1]>g&&o[1]<m?u&&this.parent.getCell(0,o[1],u):o[1]>=m?u&&this.parent.getCell(0,m-1,u):u&&this.parent.getCell(0,g+1,u)}}else{var v=n.i(i.l)(e.paneTopLeftCell);t=this.parent.getCell(o[0],o[1]);var d=this.parent.frozenRowCount(e),f=this.parent.frozenColCount(e);if(o[0]<d&&o[1]<f)t=this.parent.getCell(o[0],o[1]);else if(o[0]<d){var g=n.i(i.l)(e.paneTopLeftCell)[1],m=n.i(r._165)(this.parent,g);t=o[1]>g&&o[1]<m?this.parent.getCell(o[0],o[1]):o[1]>=m?this.parent.getCell(o[0],m-1):this.parent.getCell(o[0],g+1)}else if(o[1]<f){var h=n.i(i.l)(e.paneTopLeftCell)[0],p=n.i(r._164)(this.parent,h).index;t=o[0]>h&&o[0]<p?this.parent.getCell(o[0],o[1]):o[0]>=p?this.parent.getCell(p-1,o[1]):this.parent.getCell(h+1,o[1])}else{var h=n.i(i.l)(e.paneTopLeftCell)[0],p=n.i(r._164)(this.parent,h).index,g=n.i(i.l)(e.paneTopLeftCell)[1],m=n.i(r._165)(this.parent,g);t=o[0]>h&&o[0]<p?o[1]>g&&o[1]<m?this.parent.getCell(o[0],o[1]):o[1]>=m?this.parent.getCell(o[0],m-1):this.parent.getCell(o[0],g+1):o[0]>=p?o[1]>g&&o[1]<m?this.parent.getCell(p-1,o[1]):o[1]>=m?this.parent.getCell(p-1,m-1):this.parent.getCell(p-1,g+1):o[1]>g&&o[1]<m?this.parent.getCell(h+1,o[1]):o[1]>=m?this.parent.getCell(h+1,m-1):this.parent.getCell(h+1,g+1)}t||(t=this.parent.getCell(v[0]+1,v[1]+1))}t&&n.i(r._159)(t)},e.prototype.getModuleName=function(){return"keyboardShortcut"},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(2),i=n(1),a=n(0),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.merge=function(e){this.parent.serviceLocator.getService("cell").refresh(e.rowIdx,e.colIdx,e.lastCell,e.element,!1,!1,n.i(i._163)(this.parent))},e.prototype.hideHandler=function(e){var t=this.parent.getActiveSheet(),i={range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]};this.parent.notify(r._15,i),i.range=i.range;var o=n.i(a.I)(i.range[0],i.range[1],t)||{},s="row"===e.model?i.range[0]:i.range[1],l=s+((o[e.model+"Span"]||1)-1);if(!(!e.isEnd&&(e.start===s||n.i(a.F)(t,s))||e.isEnd&&e.start>s&&!n.i(a.F)(t,s))&&o[e.model+"Span"]>1&&l>=e.start)if("row"===e.model?n.i(a.v)(t,s):n.i(a.F)(t,s)){if(e.colIdx<=l){var d=n.i(r._50)(t,i.range[1],!0,"columns");if(d<=l){var c=i.range[0];o.rowSpan>1&&(c=n.i(r._50)(t,i.range[0],!0),c=c<=i.range[2]?c:i.range[0]);var h=this.parent.getCell(c,d);h&&(h.style.display="",this.parent.serviceLocator.getService("cell").refresh(i.range[0],i.range[1],!0,h,!0,!0))}}}else{var c=o.rowSpan>1?n.i(r._50)(t,i.range[0],!0):i.range[0];this.merge({rowIdx:i.range[0],colIdx:i.range[1],element:this.parent.getCell(c,i.range[1])})}},e.prototype.checkPrevMerge=function(e){var t,i,o,s,l,d=this,c=this.parent.getActiveSheet(),h=function(){var t=d.parent.getContentTable(),n=t&&t.rows[0];if(n){var r=parseInt(n.getAttribute("aria-rowindex"),10)-1;if(i.range=i.range,r>d.parent.viewport.topIndex+d.parent.frozenRowCount(c)&&r>i.range[0]&&r<=i.range[2]){var a=void 0,o=d.parent.getRowHeaderTable(),s=o&&o.rows[0],l=d.parent.frozenColCount(c);if(l&&!s)return;for(var h=e.colIdx;h<=i.range[3];h++)(a=d.parent.getCell(r,h,h<l?s:n))&&(a.colSpan>1||a.rowSpan>1)&&(a.style.display="none",a.removeAttribute("colSpan"),a.removeAttribute("rowSpan"))}}},p=function(r){if(i.range=i.range,n.i(a.v)(c,i.range[0])&&e.rowIdx>=i.range[0]&&e.rowIdx<=i.range[2]){s=!1;for(var p=i.range[0];p<e.rowIdx;p++)if(!n.i(a.v)(c,p)){s=!0;break}if(t.rowSpan>1&&!s){var u=t.rowSpan-d.parent.hiddenCount(i.range[0],i.range[2]);u>0&&(h(),e.td.style.display="",e.colSpan=o,e.rowSpan=u,e.cell=t,e.isMerged=!1)}}else if(r){for(var p=i.range[0];l&&p<e.rowIdx;p++)if(!n.i(a.v)(c,p)){s=!0;break}s||(h(),e.td.style.display="",e.colSpan=o,e.cell=t,e.isMerged=!1)}};if(e.cell.colSpan<0){if(e.colIdx-1>-1&&n.i(a.F)(c,e.colIdx-1)&&(t=n.i(a.I)(e.rowIdx,e.colIdx-1,c,!1,!0),(void 0!==t.colSpan||void 0!==t.rowSpan)&&(void 0===t.rowSpan||t.rowSpan>1||(l=e.rowIdx-1>-1&&n.i(a.v)(c,e.rowIdx-1)))&&(i={range:[e.rowIdx,e.colIdx-1,e.rowIdx,e.colIdx-1]},this.parent.notify(r._15,i),i.range=i.range,t=n.i(a.I)(i.range[0],i.range[1],c,!1,!0),n.i(a.F)(c,i.range[1])&&e.colIdx>=i.range[1]&&e.colIdx<=i.range[3]))){for(var u=i.range[1];u<e.colIdx;u++)if(!n.i(a.F)(c,u)){s=!0;break}t.colSpan>1&&!s&&(o=t.colSpan-this.parent.hiddenCount(i.range[1],i.range[3],"columns"))>0&&p(!0)}}else e.rowIdx-1>-1&&n.i(a.v)(c,e.rowIdx-1)&&(t=n.i(a.I)(e.rowIdx-1,e.colIdx,c,!1,!0),void 0!==t.rowSpan&&(i={range:[e.rowIdx-1,e.colIdx,e.rowIdx-1,e.colIdx]},this.parent.notify(r._15,i),i.range=i.range,t=n.i(a.I)(i.range[0],i.range[1],c,!1,!0),p()))},e.prototype.checkMerge=function(e){var t,i=this.parent.getActiveSheet(),o=n.i(a.I)(e.rowIdx,e.colIdx,i)||{};if(e.isRow){if(void 0===o.colSpan||n.i(a.F)(i,e.colIdx-1)){if(t={range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]},t.range=t.range,this.parent.notify(r._15,t),n.i(a.F)(i,e.colIdx-1)&&!n.i(a.F)(i,t.range[1])||e.isFreezePane&&t.range[0]<this.parent.frozenRowCount(i))return void(e.insideFreezePane=t.range[0]<this.parent.frozenRowCount(i));if(e.colIdx!==this.parent.viewport.leftIndex+this.parent.frozenColCount(i)&&n.i(a.F)(i,e.colIdx-1))for(var s=t.range[1];void 0!==o.colSpan&&s<e.colIdx;s++)if(!n.i(a.F)(i,s))return;o=n.i(a.I)(t.range[0],t.range[1],i);var l=t.range[2]-e.rowIdx+1-this.parent.hiddenCount(e.rowIdx,t.range[2]);l>=1&&(this.merge({rowIdx:t.range[0],colIdx:t.range[1],element:e.td}),1===l?e.td.removeAttribute("rowspan"):e.td.rowSpan=l,e.td.style.display="")}}else if(void 0===o.rowSpan||n.i(a.v)(i,e.rowIdx-1)){if(t={range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]},t.range=t.range,this.parent.notify(r._15,t),n.i(a.v)(i,e.rowIdx-1)&&!n.i(a.v)(i,t.range[0])||e.isFreezePane&&t.range[1]<this.parent.frozenColCount(i))return void(e.insideFreezePane=t.range[1]<this.parent.frozenColCount(i));if(e.rowIdx!==this.parent.viewport.topIndex+this.parent.frozenRowCount(i)&&n.i(a.v)(i,e.rowIdx-1))for(var d=t.range[0];void 0!==o.rowSpan&&d<e.rowIdx;d++)if(!n.i(a.v)(i,d))return;o=n.i(a.I)(t.range[0],t.range[1],i);var l=t.range[3]-e.colIdx+1-this.parent.hiddenCount(e.colIdx,t.range[3],"columns");l>=1&&(this.merge({rowIdx:t.range[0],colIdx:t.range[1],element:e.td}),1===l?e.td.removeAttribute("colspan"):e.td.colSpan=l,e.td.style.display="")}},e.prototype.addEventListener=function(){this.parent.on(r._13,this.merge,this),this.parent.on(i._54,this.hideHandler,this),this.parent.on(i._55,this.checkPrevMerge,this),this.parent.on(i._56,this.checkMerge,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r._13,this.merge),this.parent.off(i._54,this.hideHandler),this.parent.off(i._55,this.checkPrevMerge),this.parent.off(i._56,this.checkMerge))},e.prototype.getModuleName=function(){return"merge"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(5),i=n(7),a=n(1),o=n(21),s=(n.n(o),n(3)),l=(n.n(s),n(16)),d=(n.n(l),n(0)),c=function(){function e(e){this.password="",this.parent=e,this.init()}return e.prototype.init=function(){this.addEventListener()},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i.t,this.protect,this),this.parent.on(i.u,this.protectSheetHandler,this),this.parent.on(i.p,this.editProtectedAlert,this),this.parent.on(i.v,this.protectWorkbook,this),this.parent.on(i.s,this.KeyUpHandler,this),this.parent.on(i.w,this.unProtectWorkbook,this),this.parent.on(i.k,this.unProtectSheetPassword,this),this.parent.on(i.x,this.getPassWord,this),this.parent.on(i.y,this.importProtectWorkbook,this),this.parent.on(i.z,this.protectWorkbookHandler,this),this.parent.on(i.A,this.removeWorkbookProtection,this),this.parent.on(a._114,this.toggleProtect,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.t,this.protect),this.parent.off(i.u,this.protectSheetHandler),this.parent.off(i.p,this.editProtectedAlert),this.parent.off(i.v,this.protectWorkbook),this.parent.off(i.s,this.KeyUpHandler),this.parent.off(i.w,this.unProtectWorkbook),this.parent.off(i.k,this.unProtectSheetPassword),this.parent.off(i.x,this.getPassWord),this.parent.off(i.y,this.importProtectWorkbook),this.parent.off(i.z,this.protectWorkbookHandler),this.parent.off(i.A,this.removeWorkbookProtection),this.parent.off(a._114,this.toggleProtect))},e.prototype.protect=function(e){if(e.isActive){var t=this.parent.getActiveSheet();t.isImportProtected&&(t.isImportProtected=!1)}this.parent.notify(a.M,null),e.isActive?(this.parent.setSheetPropertyOnMute(n.i(d.l)(this.parent,e.sheetIndex),"isProtected",!1),this.parent.notify(a._10,{props:"Protect"}),this.parent.notify(i.u,e),this.parent.notify(a._53,null)):this.createDialogue()},e.prototype.createDialogue=function(){var e=this,t=this.parent.serviceLocator.getService(a._174),r=[{text:t.getConstant("SelectCells"),id:"1"},{text:t.getConstant("SelectUnlockedCells"),id:"6"},{text:t.getConstant("FormatCells"),id:"2"},{text:t.getConstant("FormatRows"),id:"3"},{text:t.getConstant("FormatColumns"),id:"4"},{text:t.getConstant("InsertLinks"),id:"5"}];this.optionList=new o.ListView({width:"250px",dataSource:r,showCheckBox:!0,select:this.dialogOpen.bind(this)});var i=this.parent.createElement("div",{className:"e-sheet-password-dialog"}),d=this.parent.createElement("div",{className:"e-sheet-password-content"}),c=this.parent.createElement("div",{className:"e-header"});c.innerText=t.getConstant("SheetPassword");var h=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}});h.setAttribute("placeholder",t.getConstant("EnterThePassword")),d.appendChild(h),d.insertBefore(c,h),i.appendChild(d);var p=this.parent.createElement("div",{className:"e-protect-content"});p.innerText=t.getConstant("ProtectAllowUser"),this.parent.setSheetPropertyOnMute(this.parent.getActiveSheet(),"isProtected",!1);var u=new l.CheckBox({checked:!0,label:t.getConstant("ProtectContent"),cssClass:"e-protect-checkbox"}),f=this.parent.createElement("div",{className:"e-protect-option-list",id:this.parent.element.id+"_option_list"}),g=this.parent.createElement("div",{className:"e-header-content"});g.innerText=t.getConstant("ProtectSheet");var m=this.parent.createElement("input",{id:this.parent.element.id+"_protect_check",attrs:{type:"checkbox"}});this.dialog=this.parent.serviceLocator.getService("dialog"),this.dialog.show({header:g.outerHTML,content:i.outerHTML+m.outerHTML+p.outerHTML+f.outerHTML,showCloseIcon:!0,isModal:!0,cssClass:"e-protect-dlg",beforeOpen:function(t){var r={dialogName:"ProtectSheetDialog",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",r),r.cancel&&(t.cancel=!0),n.i(a._159)(e.parent.element)},beforeClose:function(){s.EventHandler.remove(u.element,"click",e.checkBoxClickHandler)},buttons:[{click:this.selectOption.bind(this,this.dialog,this),buttonModel:{content:t.getConstant("Ok"),isPrimary:!0}},{click:function(){return e.dialog.hide()},buttonModel:{content:t.getConstant("Cancel")}}]},!1),this.protectSheetDialog=this.dialog.dialogInstance,u.appendTo("#"+this.parent.element.id+"_protect_check"),this.optionList.appendTo("#"+this.parent.element.id+"_option_list"),this.optionList.selectMultipleItems([{id:"1"},{id:"6"}]),s.EventHandler.add(u.element,"click",this.checkBoxClickHandler,this)},e.prototype.checkBoxClickHandler=function(){!1===document.getElementById(this.parent.element.id+"_protect_check").checked?this.dialog.dialogInstance.element.getElementsByClassName("e-footer-content")[0].querySelector("button").disabled=!0:this.dialog.dialogInstance.element.getElementsByClassName("e-footer-content")[0].querySelector("button").disabled=!1},e.prototype.dialogOpen=function(e){var t=this.parent.serviceLocator.getService(a._174);e.text===t.getConstant("SelectCells")&&e.isChecked&&e.isInteracted&&this.optionList.checkItem({id:"6"}),e.text===t.getConstant("SelectUnlockedCells")&&!e.isChecked&&e.isInteracted&&this.optionList.uncheckItem({id:"1"})},e.prototype.selectOption=function(){var e=this.parent.getActiveSheet(),t=this.parent.element.querySelector(".e-sheet-password-dialog").getElementsByClassName("e-sheet-password-content")[0].querySelector(".e-input");0===t.value.length?(this.parent.setSheetPropertyOnMute(e,"isProtected",!0),this.parent.setSheetPropertyOnMute(e,"password",t.value),this.updateProtectSheet(t.value),this.dialog.hide(),e.protectSettings.selectCells||e.protectSettings.selectUnLockedCells?e.protectSettings.selectUnLockedCells&&n.i(a._160)(this.parent,n.i(d.T)(e.selectedRange))&&this.parent.notify(i.B,null):this.parent.notify(i.B,null)):this.reEnterSheetPassword()},e.prototype.selectSheetPassword=function(){var e=this.parent.serviceLocator.getService(a._174),t=this.parent.getActiveSheet(),r=this.parent.element.querySelector(".e-sheet-password-dialog").getElementsByClassName("e-sheet-password-content")[0].querySelector(".e-input"),o=this.parent.element.querySelector(".e-reenterpwd-dialog").getElementsByClassName("e-reenterpwd-content")[0].querySelector(".e-input"),l=this.parent.createElement("span",{className:"e-reenterpwd-alert-span"});if(r.value===o.value){this.parent.setSheetPropertyOnMute(t,"isProtected",!0),this.parent.setSheetPropertyOnMute(t,"password",r.value),this.updateProtectSheet(r.value),this.dialog.hide(),this.protectSheetDialog&&(this.protectSheetDialog=null);var d=document.querySelector(".e-protect-dlg.e-dialog");n.i(s.getComponent)(d,"dialog").destroy(),t.protectSettings.selectCells||t.protectSettings.selectUnLockedCells||this.parent.notify(i.B,null)}else""===r.value?l.textContent=e.getConstant("PasswordAlertMsg"):""===o.value?l.textContent=e.getConstant("ConfirmPasswordAlertMsg"):r.value!==o.value&&(l.textContent=e.getConstant("PasswordAlert")),this.parent.element.querySelector(".e-reenterpwd-dlg").querySelector(".e-reenterpwd-dialog").appendChild(l)},e.prototype.updateProtectSheet=function(e){var t=this.parent.serviceLocator.getService(a._174),n=this.optionList.getSelectedItems(),r={selectCells:n.text.indexOf(t.getConstant("SelectCells"))>-1,formatCells:n.text.indexOf(t.getConstant("FormatCells"))>-1,formatRows:n.text.indexOf(t.getConstant("FormatRows"))>-1,formatColumns:n.text.indexOf(t.getConstant("FormatColumns"))>-1,insertLink:n.text.indexOf(t.getConstant("InsertLinks"))>-1,selectUnLockedCells:n.text.indexOf(t.getConstant("SelectUnlockedCells"))>-1};this.parent.notify(d._107,{protectSettings:r,password:e,triggerEvent:!0}),this.parent.notify(a._53,null),this.parent.notify(a._22,null)},e.prototype.protectSheetHandler=function(e){var t=n.i(s.isNullOrUndefined)(e&&e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,r=n.i(d.l)(this.parent,t),o=this.parent.element.id,l=[o+"_undo",o+"_redo",o+"_cut",o+"_copy",o+"_paste",o+"_number_format",o+"_font_name",o+"_font_size",o+"_bold",o+"_italic",o+"_line-through",o+"_underline",o+"_font_color_picker",o+"_fill_color_picker",o+"_borders",o+"_merge_cells",o+"_text_align",o+"_vertical_align",o+"_wrap",o+"_sorting",o+"_clear",o+"_conditionalformatting"],c=[o+"_cut",o+"_copy",o+"_number_format",o+"_font_name",o+"_font_size",o+"_bold",o+"_italic",o+"_line-through",o+"_underline",o+"_font_color_picker",o+"_fill_color_picker",o+"_borders",o+"_text_align",o+"_vertical_align",o+"_wrap",o+"_sorting",o+"_clear",o+"_conditionalformatting"],h=[o+"_insert_function"],p=[o+"_hyperlink",o+"_",o+"_chart"],u=[o+"_image"],f=[o+"_find"],g=[o+"_datavalidation"],m=[o+"_chart"],v=document.getElementById(this.parent.element.id+"_sheet_panel");v&&(r.isProtected?r.protectSettings.selectCells?v.classList.remove("e-protected"):r.protectSettings.selectUnLockedCells&&!n.i(a._160)(this.parent,n.i(d.T)(r.selectedRange))?v.classList.remove("e-protected"):v.classList.add("e-protected"):v.classList.add("e-protected"),r.isProtected||v.classList.remove("e-protected")),this.parent.dataBind(),this.parent.notify(i.C,{disableHomeBtnId:l,enableHomeBtnId:c,enableFrmlaBtnId:h,enableInsertBtnId:p,findBtnId:f,dataValidationBtnId:g,imageBtnId:u,chartBtnId:m}),this.parent.notify(i.D,null),r.isProtected&&this.parent.notify(a._10,{props:"Protect"}),e&&e.triggerEvent&&this.parent.notify(i.j,{action:"protectSheet",eventArgs:{sheetIndex:t,isProtected:r.isProtected,password:r.password,protectSettings:r.protectSettings.properties||r.protectSettings}})},e.prototype.editProtectedAlert=function(){var e=this,t=this.parent.serviceLocator.getService(a._174);this.dialog=this.parent.serviceLocator.getService("dialog"),this.dialog.show({content:t.getConstant("EditAlert"),isModal:!0,closeOnEscape:!0,showCloseIcon:!0,width:"400px",cssClass:"e-editAlert-dlg",beforeOpen:function(i){var o={dialogName:"EditAlertDialog",content:t.getConstant("EditAlert"),element:i.element,target:i.target,cancel:i.cancel};e.parent.trigger("dialogBeforeOpen",o),o.cancel&&(i.cancel=!0,n.i(r._115)(function(){return e.dialog.destroyDialog()})),e.dialog.dialogInstance.content=o.content,n.i(a._159)(e.parent.element)},close:function(){return n.i(a._159)(e.parent.element)}})},e.prototype.protectWorkbook=function(){var e=this,t=this.parent.serviceLocator.getService(a._174),n=this.parent.serviceLocator.getService(a._175);n.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-protectworkbook-dlg",header:t.getConstant("ProtectWorkbook"),beforeOpen:function(t){var r={dialogName:"ProtectWorkbook",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",r),r.cancel&&(t.cancel=!0),n.dialogInstance.content=e.passwordProtectContent(),n.dialogInstance.dataBind(),e.parent.element.focus()},buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0},click:function(){e.alertMessage(),e.dlgClickHandler(n)}}]})},e.prototype.passwordProtectContent=function(){var e=this.parent.serviceLocator.getService(a._174),t=this.parent.createElement("div",{className:"e-password-dialog"}),n=this.parent.createElement("div",{className:"e-password-content"}),r=this.parent.createElement("div",{className:"e-password-content"}),i=this.parent.createElement("div",{className:"e-header"});i.innerText=e.getConstant("Password");var o=this.parent.createElement("div",{className:"e-header"});o.innerText=e.getConstant("ConfirmPassword");var s=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}}),l=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}});return s.setAttribute("placeholder",e.getConstant("EnterThePassword")),l.setAttribute("placeholder",e.getConstant("EnterTheConfirmPassword")),n.appendChild(s),n.insertBefore(i,s),r.appendChild(l),r.insertBefore(o,l),t.appendChild(r),t.insertBefore(n,r),t},e.prototype.KeyUpHandler=function(e){var t=e.target;if(t.classList.contains("e-text")&&n.i(s.closest)(t,".e-password-content")&&n.i(s.closest)(t,".e-password-dialog")&&n.i(s.closest)(t,".e-password-dialog").getElementsByClassName("e-password-content")[1]===t.parentElement){var r=n.i(s.closest)(t,".e-protectworkbook-dlg"),i=r.getElementsByClassName("e-footer-content")[0],a=i.firstChild;""!==t.value?a.removeAttribute("disabled"):a.setAttribute("disabled","true")}if(t.classList.contains("e-text")&&n.i(s.closest)(t,".e-unprotectpwd-content")&&n.i(s.closest)(t,".e-unprotectpwd-dialog")&&n.i(s.closest)(t,".e-unprotectpwd-dialog").getElementsByClassName("e-unprotectpwd-content")[0]===t.parentElement){var o=n.i(s.closest)(t,".e-unprotectworkbook-dlg"),l=o.getElementsByClassName("e-footer-content")[0],d=l.firstChild;""!==t.value?d.removeAttribute("disabled"):d.setAttribute("disabled","true")}if(t.classList.contains("e-text")&&n.i(s.closest)(t,".e-reenterpwd-content")&&n.i(s.closest)(t,".e-reenterpwd-dialog")&&n.i(s.closest)(t,".e-reenterpwd-dialog").getElementsByClassName("e-reenterpwd-content")[0]===t.parentElement){var c=n.i(s.closest)(t,".e-reenterpwd-dlg"),h=c.getElementsByClassName("e-footer-content")[0],p=h.firstChild;""!==t.value?p.removeAttribute("disabled"):p.setAttribute("disabled","true")}if(t.classList.contains("e-text")&&n.i(s.closest)(t,".e-unprotectsheetpwd-content")&&n.i(s.closest)(t,".e-unprotectsheetpwd-dialog")&&n.i(s.closest)(t,".e-unprotectsheetpwd-dialog").getElementsByClassName("e-unprotectsheetpwd-content")[0]===t.parentElement){var u=n.i(s.closest)(t,".e-unprotectworksheet-dlg"),f=u.getElementsByClassName("e-footer-content")[0],g=f.firstChild;""!==t.value?g.removeAttribute("disabled"):g.setAttribute("disabled","true")}if(t.classList.contains("e-text")&&n.i(s.closest)(t,".e-importprotectpwd-content")&&n.i(s.closest)(t,".e-importprotectpwd-dialog")&&n.i(s.closest)(t,".e-importprotectpwd-dialog").getElementsByClassName("e-importprotectpwd-content")[0]===t.parentElement){var m=n.i(s.closest)(t,".e-importprotectworkbook-dlg"),v=m.getElementsByClassName("e-footer-content")[0],g=v.firstChild;""!==t.value?g.removeAttribute("disabled"):g.setAttribute("disabled","true")}},e.prototype.alertMessage=function(){var e=this.parent.element.querySelector(".e-pwd-alert-span"),t=this.parent.element.querySelector(".e-unprotectpwd-alert-span"),n=this.parent.element.querySelector(".e-importprotectpwd-alert-span"),r=this.parent.element.querySelector(".e-reenterpwd-alert-span"),i=this.parent.element.querySelector(".e-unprotectsheetpwd-alert-span");e&&e.remove(),t&&t.remove(),n&&n.remove(),r&&r.remove(),i&&i.remove()},e.prototype.dlgClickHandler=function(e){var t=this.parent.serviceLocator.getService(a._174),n=this.parent.element.querySelector(".e-password-dialog").getElementsByClassName("e-password-content")[0].querySelector(".e-input"),r=this.parent.element.querySelector(".e-password-dialog").getElementsByClassName("e-password-content")[1].querySelector(".e-input"),o=this.parent.createElement("span",{className:"e-pwd-alert-span"});n.value===r.value?(e.hide(),this.parent.notify(a._10,{props:"Protectworkbook"}),this.protectWorkbookHandler({password:n.value}),this.parent.notify(i.j,{action:"protectWorkbook",eventArgs:{isProtected:!0,password:n.value}})):""===n.value?o.textContent=t.getConstant("PasswordAlertMsg"):""===r.value?o.textContent=t.getConstant("ConfirmPasswordAlertMsg"):n.value!==r.value&&(o.textContent=t.getConstant("PasswordAlert")),e.dialogInstance&&this.parent.element.querySelector(".e-protectworkbook-dlg").querySelector(".e-dlg-content").appendChild(o)},e.prototype.protectWorkbookHandler=function(e){this.parent.password=e.password,this.parent.isProtected=!0,this.parent.showSheetTabs&&(this.parent.element.querySelector(".e-add-sheet-tab").setAttribute("disabled","true"),this.parent.element.querySelector(".e-add-sheet-tab").classList.add("e-disabled")),this.parent.notify(a._10,{props:"Protectworkbook"})},e.prototype.unProtectWorkbook=function(){var e=this,t=this.parent.serviceLocator.getService(a._174),n=this.parent.serviceLocator.getService(a._175);n.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-unprotectworkbook-dlg",header:t.getConstant("UnprotectWorkbook"),beforeOpen:function(t){var r={dialogName:"UnprotectWorkbook",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",r),r.cancel&&(t.cancel=!0),n.dialogInstance.content=e.unProtectPasswordContent(),n.dialogInstance.dataBind(),e.parent.element.focus()},buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0,disabled:!0},click:function(){e.alertMessage(),e.unprotectdlgOkClick(n)}}]})},e.prototype.unProtectsheet=function(e){var t=this,n=this.parent.serviceLocator.getService(a._174),r=this.parent.serviceLocator.getService(a._175);r.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-unprotectworksheet-dlg",header:n.getConstant("UnprotectWorksheet"),beforeOpen:function(e){var n={dialogName:"UnProtectSheet",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",n),n.cancel&&(e.cancel=!0),r.dialogInstance.content=t.unProtectSheetPasswordContent(),r.dialogInstance.dataBind(),t.parent.element.focus()},buttons:[{buttonModel:{content:n.getConstant("Ok"),isPrimary:!0,disabled:!this.parent.allowOpen||!this.parent.openModule.isImportedFile||-1!==this.parent.openModule.unProtectSheetIdx.indexOf(this.parent.activeSheetIndex)},click:function(){t.alertMessage(),t.unprotectSheetdlgOkClick(r,e)}}]})},e.prototype.reEnterSheetPassword=function(){var e=this,t=this.parent.serviceLocator.getService(a._174),r=this.parent.serviceLocator.getService(a._175);r.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-reenterpwd-dlg",header:t.getConstant("ConfirmPassword"),beforeOpen:function(t){var i={dialogName:"Re-enterPassword",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",i),i.cancel&&(t.cancel=!0),r.dialogInstance.content=e.reEnterSheetPasswordContent(),r.dialogInstance.dataBind();var o=e.parent.element.querySelector(".e-protect-dlg.e-dialog .e-footer-content .e-btn")||e.parent.element;n.i(a._159)(o)},close:function(){e.dialog.dialogInstance=e.protectSheetDialog},buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0,disabled:!0},click:function(){e.alertMessage(),e.selectSheetPassword()}}]})},e.prototype.unProtectPasswordContent=function(){var e=this.parent.serviceLocator.getService(a._174),t=this.parent.createElement("div",{className:"e-unprotectpwd-dialog"}),n=this.parent.createElement("div",{className:"e-unprotectpwd-content"}),r=this.parent.createElement("div",{className:"e-header"});r.innerText=e.getConstant("EnterThePassword");var i=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}});return n.appendChild(i),n.insertBefore(r,i),t.appendChild(n),t},e.prototype.reEnterSheetPasswordContent=function(){var e=this.parent.serviceLocator.getService(a._174),t=this.parent.createElement("div",{className:"e-reenterpwd-dialog"}),n=this.parent.createElement("div",{className:"e-reenterpwd-content"}),r=this.parent.createElement("div",{className:"e-header"});r.innerText=e.getConstant("ReEnterPassword");var i=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}});return n.appendChild(i),n.insertBefore(r,i),t.appendChild(n),t},e.prototype.unProtectSheetPasswordContent=function(){var e=this.parent.serviceLocator.getService(a._174),t=this.parent.createElement("div",{className:"e-unprotectsheetpwd-dialog"}),n=this.parent.createElement("div",{className:"e-unprotectsheetpwd-content"}),r=this.parent.createElement("div",{className:"e-header"});r.innerText=e.getConstant("EnterThePassword");var i=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}});return n.appendChild(i),n.insertBefore(r,i),t.appendChild(n),t},e.prototype.unprotectdlgOkClick=function(e){var t=this.parent.serviceLocator.getService(a._174),n=this.parent.element.querySelector(".e-unprotectpwd-dialog").getElementsByClassName("e-unprotectpwd-content")[0].querySelector(".e-input");if(this.parent.password===n.value)e.hide(),this.removeWorkbookProtection(),this.parent.notify(i.j,{action:"protectWorkbook",eventArgs:{isProtected:!1}});else{var r=this.parent.createElement("span",{className:"e-unprotectpwd-alert-span"});r.innerText=t.getConstant("UnprotectPasswordAlert"),this.parent.element.querySelector(".e-unprotectworkbook-dlg").querySelector(".e-dlg-content").appendChild(r)}},e.prototype.removeWorkbookProtection=function(){this.parent.password="",this.parent.isProtected=!1,this.parent.showSheetTabs&&(this.parent.element.querySelector(".e-add-sheet-tab").removeAttribute("disabled"),this.parent.element.querySelector(".e-add-sheet-tab").classList.remove("e-disabled"));var e=document.getElementById(this.parent.element.id+"_protectworkbook");e&&e.classList.remove("e-active"),this.parent.notify(a._10,{props:"Protectworkbook"})},e.prototype.unprotectSheetdlgOkClick=function(e,t){var n=this.parent.serviceLocator.getService(a._174),r=this.parent.getActiveSheet(),i=this.parent.element.querySelector(".e-unprotectsheetpwd-dialog").getElementsByClassName("e-unprotectsheetpwd-content")[0].querySelector(".e-input");if(t&&0===r.password.length){var o={sheetPassword:i.value,sheetIndex:this.parent.activeSheetIndex};this.parent.open(o)}else if(r.password===i.value)e.hide(),this.unProtectSheetPassword();else{var s=this.parent.createElement("span",{className:"e-unprotectsheetpwd-alert-span"});s.innerText=n.getConstant("UnprotectPasswordAlert"),this.parent.element.querySelector(".e-unprotectworksheet-dlg").querySelector(".e-dlg-content").appendChild(s)}},e.prototype.unProtectSheetPassword=function(){var e=this.parent.getActiveSheet(),t=this.parent.activeSheetIndex;this.parent.setSheetPropertyOnMute(e,"isProtected",!e.isProtected),this.parent.setSheetPropertyOnMute(e,"password","");var n=!e.isProtected;this.parent.notify(i.t,{isActive:n,id:this.parent.element.id+"_protect",sheetIndex:t,triggerEvent:!0}),this.parent.allowOpen&&this.parent.openModule.isImportedFile&&-1===this.parent.openModule.unProtectSheetIdx.indexOf(t)&&this.parent.openModule.unProtectSheetIdx.push(t)},e.prototype.getPassWord=function(e){e.passWord=this.password},e.prototype.importProtectWorkbook=function(e){var t=this,n=this.parent.serviceLocator.getService(a._174),r=this.parent.serviceLocator.getService(a._175);r.show({width:323,isModal:!0,showCloseIcon:!0,cssClass:"e-importprotectworkbook-dlg",header:n.getConstant("UnprotectWorkbook"),beforeOpen:function(n){var i={dialogName:"ImportProtectWorkbook",element:n.element,target:n.target,cancel:n.cancel};t.parent.trigger("dialogBeforeOpen",i),i.cancel&&(n.cancel=!0),r.dialogInstance.content=t.importProtectPasswordContent(e),r.dialogInstance.dataBind(),t.parent.element.focus()},buttons:[{buttonModel:{content:n.getConstant("Ok"),isPrimary:!0,disabled:!0},click:function(){t.alertMessage(),t.importOkClick(e)}}]})},e.prototype.importProtectPasswordContent=function(e){var t=this.parent.serviceLocator.getService(a._174),n=this.parent.createElement("div",{className:"e-importprotectpwd-dialog"}),r=this.parent.createElement("div",{className:"e-importprotectpwd-content"}),i=this.parent.createElement("span",{className:"e-header"});i.innerText='"'+e.file.name+'" '+t.getConstant("IsProtected");var o=this.parent.createElement("input",{className:"e-input e-text",attrs:{type:"password"}});return o.setAttribute("placeholder",t.getConstant("EnterThePassword")),r.appendChild(i),r.appendChild(o),n.appendChild(r),n},e.prototype.importOkClick=function(e){var t=this.parent.element.querySelector(".e-importprotectpwd-dialog").getElementsByClassName("e-importprotectpwd-content")[0].querySelector(".e-input");this.parent.password=t.value;var n={file:e.file,password:t.value};this.parent.open(n)},e.prototype.toggleProtect=function(e){var t,n=this.parent.element.id,r=this.parent.getActiveSheet();r.isProtected&&this.parent.allowOpen&&r.isImportProtected&&this.parent.openModule.isImportedFile&&-1===this.parent.openModule.unProtectSheetIdx.indexOf(this.parent.activeSheetIndex)?this.unProtectsheet(!0):r.password&&r.password.length>0?this.unProtectsheet():(this.parent.setSheetPropertyOnMute(r,"isProtected",!r.isProtected),t=!r.isProtected,this.parent.notify(i.t,{isActive:t,id:n+"_protect",sheetIndex:this.parent.activeSheetIndex,triggerEvent:!0}))},e.prototype.getModuleName=function(){return"protectSheet"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(5),i=n(3),a=(n.n(i),n(12)),o=(n.n(a),n(1)),s=n(4),l=n(2),d=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(o.g,this.wireEvents,this),this.parent.on(o._9,this.autoFit,this),this.parent.on(o._34,this.setAutoFitHandler,this)},e.prototype.autoFit=function(e){for(var t=e.isRow?this.parent.getRowHeaderTable():this.parent.getColHeaderTable().rows[0],n=e.startIndex;n<=e.endIndex;n++)this.trgtEle=e.isRow?this.parent.getRow(n,t):this.parent.getCell(null,n,t),this.setAutofit(n,!e.isRow)},e.prototype.wireEvents=function(){var e=this.parent.getRowHeaderContent(),t=this.parent.element.getElementsByClassName("e-header-panel")[0];t&&(i.EventHandler.add(t,"dblclick",this.dblClickHandler,this),i.EventHandler.add(e,"dblclick",this.dblClickHandler,this),i.EventHandler.add(t,"mousedown",this.mouseDownHandler,this),i.EventHandler.add(e,"mousedown",this.mouseDownHandler,this),this.wireResizeCursorEvent(e,t))},e.prototype.wireResizeCursorEvent=function(e,t){i.EventHandler.add(e,"mousemove",this.setTarget,this),i.EventHandler.add(t,"mousemove",this.setTarget,this)},e.prototype.unWireResizeCursorEvent=function(){i.EventHandler.remove(this.parent.getRowHeaderContent(),"mousemove",this.setTarget);var e=this.parent.element.getElementsByClassName("e-header-panel")[0];e&&i.EventHandler.remove(e,"mousemove",this.setTarget)},e.prototype.unwireEvents=function(){i.EventHandler.remove(this.parent.getColumnHeaderContent(),"dblclick",this.dblClickHandler),i.EventHandler.remove(this.parent.getRowHeaderContent(),"dblclick",this.dblClickHandler),i.EventHandler.remove(this.parent.getColumnHeaderContent(),"mousedown",this.mouseDownHandler),i.EventHandler.remove(this.parent.getRowHeaderContent(),"mousedown",this.mouseDownHandler),this.unWireResizeCursorEvent()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.g,this.wireEvents),this.parent.off(o._9,this.autoFit),this.parent.off(o._34,this.setAutoFitHandler))},e.prototype.mouseMoveHandler=function(e){var t=this.parent.element.getElementsByClassName("e-colresize-handler")[0],n=this.parent.element.getElementsByClassName("e-rowresize-handler")[0];if(this.resizeTooltip(null,!0,e),t||n){this.isMouseMoved=!0;var r=this.parent.enableRtl;t?(r?e.x<this.trgtEle.parentElement.firstChild.getBoundingClientRect().right:e.x>this.trgtEle.parentElement.firstChild.getBoundingClientRect().left)&&(t.style.left=e.clientX-document.getElementById(this.parent.element.id+"_sheet").getBoundingClientRect().left+"px"):n&&e.y>=this.trgtEle.parentElement.parentElement.firstChild.getBoundingClientRect().top&&(n.style.top=e.clientY-document.getElementById(this.parent.element.id+"_sheet").getBoundingClientRect().top+"px")}},e.prototype.mouseDownHandler=function(e){if(n.i(i.closest)(e.target,".e-header-cell")&&!e.target.className.includes("e-filter-icon")){if(this.event=e,this.trgtEle=e.target,this.trgtEle.parentElement.classList.contains("e-hide-end")||this.trgtEle.classList.contains("e-hide-end")){var t=this.trgtEle.offsetHeight,r=e.offsetY;(t>=10&&r<5||t-2<8&&r<Math.ceil((r-2)/2))&&this.trgtEle.classList.add("e-skip-resize")}this.updateTarget(e,this.trgtEle);var a=this.trgtEle,o=a.classList.contains("e-colresize")?"e-colresize-handler":a.classList.contains("e-rowresize")?"e-rowresize-handler":"";this.createResizeHandler(a,o),this.unWireResizeCursorEvent(),i.EventHandler.add(this.parent.element,"mousemove",this.mouseMoveHandler,this),i.EventHandler.add(document,"mouseup",this.mouseUpHandler,this)}},e.prototype.mouseUpHandler=function(e){var t=this.parent.element.getElementsByClassName("e-resize-handle")[0];this.resizeOn(e),this.isMouseMoved=null;var a=document.querySelector(".e-header-tooltip");t&&(n.i(i.detach)(t),this.updateCursor()),a&&a.remove(),i.EventHandler.remove(document,"mouseup",this.mouseUpHandler),i.EventHandler.remove(this.parent.element,"mousemove",this.mouseMoveHandler);var o=this.parent.element.getElementsByClassName("e-header-panel")[0];o&&this.wireResizeCursorEvent(this.parent.getRowHeaderContent(),o),this.parent.notify(r._101,null),this.parent.notify(r._102,null)},e.prototype.dblClickHandler=function(e){if(n.i(i.closest)(e.target,".e-header-cell")&&!e.target.className.includes("e-filter-icon")){if(this.trgtEle=e.target,this.updateTarget(e,this.trgtEle),this.trgtEle.classList.contains("e-colresize")){var t=parseInt(this.trgtEle.getAttribute("aria-colindex"),10)-1,a=n.i(s.b)(this.parent.getActiveSheet(),t)+"px";this.trgtEle.classList.contains("e-unhide-column")?this.showHiddenColumns(t-1):this.setAutofit(t,!0,a,this.trgtEle)}else if(this.trgtEle.classList.contains("e-rowresize")){var o=parseInt(this.trgtEle.parentElement.getAttribute("aria-rowindex"),10)-1,l=n.i(s.c)(this.parent.getActiveSheet(),o)+"px";this.setAutofit(o,!1,l)}this.parent.notify(r._101,null)}},e.prototype.setTarget=function(e){if(n.i(i.closest)(e.target,".e-header-cell")&&!e.target.className.includes("e-filter-icon")){var t=e.target,r=this.parent.getActiveSheet();if(r.isProtected&&(!r.protectSettings.formatColumns||!r.protectSettings.formatRows)){if(!r.protectSettings.formatRows&&!r.protectSettings.formatColumns)return;if(r.protectSettings.formatRows&&n.i(i.closest)(t,".e-colhdr-table"))return;if(r.protectSettings.formatColumns&&n.i(i.closest)(t,".e-rowhdr-table"))return}var a,o,s,l;if(n.i(i.closest)(t,".e-header-row")){o=t.offsetWidth,l="e-colresize",s=this.parent.enableRtl?o-e.offsetX:e.offsetX;var d=this.getColPrevSibling(t);d&&!d.classList.contains("e-select-all-cell")?a=d:Number(t.getAttribute("aria-colindex"))>1&&(a=t)}else if(n.i(i.closest)(t,".e-row")){s=e.offsetY,o=t.offsetHeight,l="e-rowresize";var d=this.getRowPrevSibling(t);d?a=d.firstElementChild:Number(t.parentElement.getAttribute("aria-rowindex"))>1&&(a=t)}if(o-2<8&&s!==Math.ceil((o-2)/2))s<Math.ceil((o-2)/2)?(t.classList.add(l),a.classList.add(l)):s>Math.ceil((o-2)/2)&&t.classList.add(l);else if(o-5<s&&s<=o&&o>=10)t.classList.add(l);else if(s<5&&a&&o>=10)t.classList.add(l),a.classList.add(l);else for(var c=this.parent.element.getElementsByClassName(l),h=0;h<c.length;h++)c[h].classList.remove(l)}},e.prototype.getColPrevSibling=function(e){var t=this.parent.frozenColCount(this.parent.getActiveSheet());return e.previousElementSibling||(t&&n.i(i.closest)(e,".e-column-header")?this.parent.getSelectAllContent().querySelector(".e-header-row").lastElementChild:null)},e.prototype.getRowPrevSibling=function(e){var t=this.parent.frozenRowCount(this.parent.getActiveSheet());return e.parentElement.previousElementSibling||(t&&n.i(i.closest)(e,".e-row-header")?this.parent.getSelectAllContent().querySelector("tbody").lastElementChild:null)},e.prototype.updateTarget=function(e,t){if(n.i(i.closest)(t,".e-header-row")){var r=this.parent.enableRtl?t.offsetWidth-e.offsetX:e.offsetX;if(t.offsetWidth<10&&r<Math.ceil((t.offsetWidth-2)/2)||r<5&&t.offsetWidth>=10&&t.classList.contains("e-colresize")){var a=this.parent.getActiveSheet(),o=Number(this.trgtEle.getAttribute("aria-colindex"))-2,d=this.getColPrevSibling(t);d&&!n.i(s.a)(a,o)?this.trgtEle=d:o>-1&&this.trgtEle.classList.add("e-unhide-column")}}else if(t.offsetHeight<10&&e.offsetY<Math.ceil((t.offsetHeight-2)/2)||e.offsetY<5&&t.offsetHeight>=10&&t.classList.contains("e-rowresize")){var a=this.parent.getActiveSheet(),o=Number(t.parentElement.getAttribute("aria-rowindex"))-2,d=this.getRowPrevSibling(t);if(d||n.i(s.i)(a,o))if("dblclick"===e.type&&n.i(s.i)(a,o)){var c=n.i(l._10)(n.i(l.l)(a.selectedRange)),h=void 0;h=o<=c[2]&&o>c[0]&&n.i(l._85)(a,c)?{startIndex:c[0],endIndex:c[2],hide:!1,autoFit:!0}:{startIndex:o,endIndex:o,hide:!1,autoFit:!0},this.parent.notify(l._86,h)}else n.i(s.i)(a,o)||(this.trgtEle=d.getElementsByClassName("e-header-cell")[0])}},e.prototype.setAutoFitHandler=function(e){e.isCol&&n.i(s.a)(this.parent.getActiveSheet(),e.idx)?this.showHiddenColumns(e.idx):this.setAutofit(e.idx,e.isCol)},e.prototype.getWrapText=function(e,t,r){var i,a=this,s=e.toString().split(" "),l=n.i(o._152)(" ",r,this.parent.cellStyle),d=0,c=0,h=e,p="",u=function(){var e=parseInt(c.toString(),10);(e>d||e===d&&n.i(o._152)(p.trim(),r,a.parent.cellStyle)>n.i(o._152)(h,r,a.parent.cellStyle))&&(h=p.trim(),d=e)};return s.forEach(function(e,d){i=n.i(o._152)(e,r,a.parent.cellStyle),(c+i)/t>1?(u(),p="",c=i):(i+=(c+i+l)/t>=1?0:l,c+=i),p+=e+" ",d===s.length-1&&u()}),h},e.prototype.setAutofit=function(e,t,r,i){var a,d=this,c=this.parent.getActiveSheet();if(i){var h={cancel:!1,index:e,isCol:t,sheetIndex:this.parent.activeSheetIndex};if(t?(h.oldWidth=r,h.autoFitWithHeader=!1):h.oldHeight=r,this.parent.notify(l._31,{eventArgs:h,action:"resizeToFit"}),h.cancel)return;a=h.autoFitWithHeader}var p,u,f,g,m={},v=this.parent.createElement("table",{className:this.parent.getContentTable().className+" e-resizetable",styles:"height: auto"}),y=this.parent.createElement("tbody"),C=this.parent.createElement("tr",{className:"e-row"}),b=this.parent.createElement("td",{className:"e-cell"});if(t){var x;v.style.width="auto";var S=function(e){u=b.cloneNode(),u.textContent=e,u.style.fontFamily=m.style&&m.style.fontFamily||d.parent.cellStyle.fontFamily,u.style.fontSize=m.style&&m.style.fontSize||d.parent.cellStyle.fontSize,u.style.fontWeight=m.style&&m.style.fontWeight||d.parent.cellStyle.fontWeight,x=C.cloneNode(),x.appendChild(u),y.appendChild(x)};a&&S(i.textContent);for(var w=0,_=c.rows.length;w<_;w++)(m=n.i(s.h)(w,e,c))&&(m.wrap?(g=!0,S(this.getWrapText(this.parent.getDisplayText(m),n.i(o._155)(c,e,e,m.colSpan>1?e+m.colSpan-1:e),m.style))):S(this.parent.getDisplayText(m)));p=n.i(s.b)(c,e)}else{var I=c.rows[e]&&c.rows[e].cells?c.rows[e].cells.length:0;f=this.parent.createElement("colgroup");for(var E=0;E<I;E++)(m=n.i(s.h)(e,E,c))&&(u=b.cloneNode(),m.wrap&&u.classList.add("e-wraptext"),u.textContent=this.parent.getDisplayText(m),u.style.fontFamily=m.style&&m.style.fontFamily||this.parent.cellStyle.fontFamily,u.style.fontSize=m.style&&m.style.fontSize||this.parent.cellStyle.fontSize,C.appendChild(u),f.appendChild(this.parent.createElement("col",{styles:"width:"+n.i(s.b)(c,E,!1,!0)+"px"})));v.appendChild(f),y.appendChild(C),p=n.i(s.c)(c,e)}v.appendChild(y);var R=this.parent.createElement("div",{className:this.parent.element.className,styles:"display: block"});R.appendChild(v),document.body.appendChild(R);var k=v.getBoundingClientRect();document.body.removeChild(R);var A,F=Math.ceil(t?k.width:k.height),N=(t?this.getFloatingElementWidth(F+(g?1:0),e):F)||p;if(t){A=N>0?-(p-N):-p;var T=this.parent.frozenColCount(c);T&&e>=n.i(l.l)(c.topLeftCell)[1]&&e<T||e>=this.parent.viewport.leftIndex+T&&e<=this.parent.viewport.rightIndex?(n.i(s.t)(c,e).width=N>0?N:0,this.resizeStart(e,this.parent.getViewportIndex(e,!0),N+"px",t,!0,r),this.parent.notify(o._2,{threshold:A,colIdx:e})):(this.parent.notify(o._2,{threshold:A,colIdx:e}),n.i(s.t)(c,e).width=N>0?N:0)}else{var O=this.parent.frozenRowCount(c);N=N>20?N:20,A=-(p-N),O&&e>=n.i(l.l)(c.topLeftCell)[0]&&e<O||e>=this.parent.viewport.topIndex+O&&e<=this.parent.viewport.bottomIndex?(n.i(s.d)(c,e,N),n.i(s.x)(c,e,{customHeight:!1}),this.resizeStart(e,this.parent.getViewportIndex(e),N+"px",t,!0,r),this.parent.notify(o._1,{threshold:A,rowIdx:e})):(this.parent.notify(o._1,{threshold:A,rowIdx:e}),n.i(s.d)(c,e,N))}this.parent.selectRange(c.selectedRange)},e.prototype.createResizeHandler=function(e,t){var n=this.parent.createElement("div",{className:t});n.classList.add("e-resize-handle");var r=document.getElementById(this.parent.element.id+"_sheet");e.classList.contains("e-colresize")?(n.style.height=this.parent.getMainContent().parentElement.clientHeight+this.parent.getColumnHeaderContent().offsetHeight+"px",n.style.left=this.event.clientX-r.getBoundingClientRect().left+"px",n.style.top="0px"):e.classList.contains("e-rowresize")&&(n.style.width=this.parent.getMainContent().parentElement.clientWidth+"px",n.style.left="0px",n.style.top=this.event.clientY-r.getBoundingClientRect().top+"px"),r.appendChild(n),this.resizeTooltip(e,!1),this.updateCursor()},e.prototype.resizeTooltip=function(e,t,n){if(t){var r=this.parent.enableRtl,i=document.querySelector(".e-header-tooltip"),o=this.parent.element.getElementsByClassName("e-colresize-handler")[0],s=this.parent.element.getElementsByClassName("e-rowresize-handler")[0];if(o){var l=r?Math.round(this.trgtEle.getBoundingClientRect().right)-n.clientX:n.clientX-Math.round(this.trgtEle.getBoundingClientRect().left);i&&(i.firstChild.textContent=l>0?"Width:("+l.toString()+" pixels)":"Width: 0.00")}else if(s){var d=n.clientY-Math.round(this.trgtEle.getBoundingClientRect().top);i&&(i.firstChild.textContent=d>0?"Height:("+d.toString()+" pixels)":"Height: 0.00")}}else{var c=e.classList.contains("e-colresize"),h=e.classList.contains("e-rowresize");if(c||h){var p=c?"e-colresize-handler":"e-rowresize-handler",u=new a.Tooltip({cssClass:"e-header-tooltip",showTipPointer:!1});c?u.content="Width:("+Math.round(e.getBoundingClientRect().width).toString()+" pixels)":h&&(u.content="Height:("+Math.round(e.getBoundingClientRect().height).toString()+" pixels)",u.offsetX=-(this.parent.getMainContent().parentElement.clientWidth/2-Math.round(e.getBoundingClientRect().width))),u.appendTo("."+p),u.open(),u.refresh()}}},e.prototype.setColWidth=function(e,t,i,a){var l=this.parent.getActiveSheet(),d=n.i(r._140)(i)-a;if(d<0&&a<-d&&(d=-a),i>0){if(this.isMouseMoved&&this.trgtEle.classList.contains("e-unhide-column"))return this.showHiddenColumns(e,i),void this.parent.notify(o._31,{eventArgs:{index:e,width:"0px",isCol:!0,sheetIndex:this.parent.activeSheetIndex,oldWidth:a+"px",hide:!1},action:"resize"});this.resizeStart(e,t,i+"px",!0,!1,a+"px"),n.i(s.s)(l,e,{width:i,customWidth:!0}),this.parent.notify(o._2,{threshold:d,colIdx:e,checkWrapCell:!0})}else this.isMouseMoved&&(this.parent.hideColumn(e),this.showHideCopyIndicator(),this.parent.notify(o._31,{eventArgs:{index:e,width:"0px",isCol:!0,sheetIndex:this.parent.activeSheetIndex,oldWidth:a+"px",hide:!0},action:"resize"}))},e.prototype.showHideCopyIndicator=function(){var e=this.parent.element.getElementsByClassName("e-copy-indicator")[0],t=!1;e&&(n.i(i.detach)(e),this.parent.notify(r._106,null),t=!0),t&&this.parent.notify(o.g,{})},e.prototype.showHiddenColumns=function(e,t){var r,i,a,d=this,c=this.parent.getActiveSheet(),h=n.i(l.l)(c.selectedRange);if(e>=h[1]&&e<=h[3]&&h[2]===c.rowCount-1&&n.i(l.w)(c.activeCell)[0]===n.i(l.w)(c.topLeftCell)[0]?(r=h[1],i=h[3],a=this.parent.getMainContent().querySelector("colgroup")):r=i=e,void 0!==t)for(var p=r;p<=i;p++)n.i(s.s)(c,p,{width:t,customWidth:!0}),p>=this.parent.viewport.leftIndex&&p<=this.parent.viewport.rightIndex&&!n.i(s.a)(c,p)&&(a.children[this.parent.getViewportIndex(p,!0)].style.width=t+"px");this.trgtEle&&this.trgtEle.classList.remove("e-unhide-column");var u={startIndex:r,endIndex:i,hide:!1,isCol:!0,autoFit:!0};if(this.parent.notify(l._86,u),this.showHideCopyIndicator(),void 0===t)if(u.autoFit)this.autoFit({isRow:!1,startIndex:r,endIndex:i});else{var f=function(){d.parent.off(o.g,f),d.autoFit({isRow:!1,startIndex:r,endIndex:i})};this.parent.on(o.g,f,this)}},e.prototype.setRowHeight=function(e,t,i,a){var l=this.parent.getActiveSheet(),d=this.parent.frozenColCount(l),c=parseInt(this.parent.getRow(e,null,d).style.height,10),h=i,p=n.i(r._140)(parseInt(h,10))-c;p<0&&c<-p&&(p=-c),this.resizeStart(e,t,h,!1,!1,a),n.i(s.x)(l,e,{height:parseInt(h,10)>0?parseInt(h,10):0,customHeight:!0}),this.parent.notify(o._1,{threshold:p,rowIdx:e,isCustomHgt:!0})},e.prototype.resizeOn=function(e){var t,r,i=this,a=this.parent.getActiveSheet(),d=n.i(l.l)(a.activeCell),c=n.i(s.h)(d[0],d[1],a);if(this.trgtEle.classList.contains("e-rowresize")){var h=Number(this.trgtEle.parentElement.getAttribute("aria-rowindex"))-2;if(this.isMouseMoved&&n.i(s.i)(a,h)&&this.trgtEle.classList.contains("e-skip-resize")&&e.clientY>this.trgtEle.getBoundingClientRect().top){this.trgtEle.classList.remove("e-skip-resize");var p={startIndex:h,endIndex:h,hide:!1,skipAppend:!0};this.parent.notify(l._86,p);var u=this.parent.getRowHeaderTable().tBodies[0],f=this.parent.getContentTable().tBodies[0];p.hdrRow.style.display="none",p.row.style.display="none",u.insertBefore(p.hdrRow,u.children[p.insertIdx]),f.insertBefore(p.row,f.children[p.insertIdx]),this.trgtEle=p.hdrRow.firstElementChild,p.hdrRow.nextElementSibling.classList.remove("e-hide-end"),p.mergeCollection.forEach(function(e){i.parent.notify(l.M,e)})}else if(this.trgtEle.classList.contains("e-skip-resize")){if(this.trgtEle.classList.remove("e-skip-resize"),!this.isMouseMoved&&n.i(s.i)(a,h)||!this.trgtEle.parentElement.previousElementSibling)return;this.trgtEle=this.trgtEle.parentElement.previousElementSibling.getElementsByClassName("e-header-cell")[0]}r=t=parseInt(this.trgtEle.parentElement.getAttribute("aria-rowindex"),10)-1,t=this.parent.getViewportIndex(r);var g=this.parent.frozenColCount(a),m=this.parent.getRow(r,null,g).style.height,v=e.clientY-this.event.clientY+parseInt(m,10);if(v<=0)return this.parent.hideRow(r),this.showHideCopyIndicator(),n.i(s.x)(a,r,{height:0,customHeight:!0}),void this.parent.notify(o._31,{eventArgs:{index:r,height:"0px",isCol:!1,sheetIndex:this.parent.activeSheetIndex,oldHeight:m},action:"resize"});if(this.setRowHeight(r,t,v+"px",m),"none"===this.trgtEle.parentElement.style.display){var y=this.parent.getActiveSheet(),C=n.i(l._10)(n.i(l.l)(y.selectedRange));if(r<=C[2]&&r>C[0]){v=n.i(s.c)(y,r);for(var b=void 0,x=C[0];x<=C[2];x++)x!==r&&(m=n.i(s.c)(y,x)+"px",n.i(s.x)(y,x,{customHeight:!0,height:v}),n.i(s.i)(y,x)?b||(b=x):(this.parent.getRow(x).style.height=v+"px",y.showHeaders&&(this.parent.getRow(x,this.parent.getRowHeaderTable()).style.height=v+"px")),this.parent.notify(o._31,{eventArgs:{index:x,height:v+"px",isCol:!1,sheetIndex:this.parent.activeSheetIndex,oldHeight:m},action:"resize"}));this.parent.hideRow(C[0],r-1,!1),this.showHideCopyIndicator(),t+=Math.abs(r-b)}else 0===t||n.i(s.i)(y,r-1)?0!==t&&this.trgtEle.parentElement.classList.add("e-hide-end"):this.trgtEle.parentElement.previousElementSibling.classList.remove("e-hide-start"),this.parent.selectRange(y.selectedRange);this.trgtEle.parentElement.style.display="",this.parent.getContentTable().rows[t].style.display=""}}else if(this.trgtEle.classList.contains("e-colresize")){this.isMouseMoved&&this.trgtEle.classList.contains("e-unhide-column")&&e.clientX<this.trgtEle.getBoundingClientRect().left&&(this.trgtEle.classList.remove("e-unhide-column"),this.trgtEle.previousElementSibling&&(this.trgtEle=this.trgtEle.previousElementSibling)),t=parseInt(this.trgtEle.getAttribute("aria-colindex"),10)-1;var S=void 0;this.trgtEle.classList.contains("e-unhide-column")?(t-=1,S=0):S=n.i(s.b)(this.parent.getActiveSheet(),t),this.setColWidth(t,this.parent.getViewportIndex(t,!0),(this.parent.enableRtl?this.event.clientX-e.clientX:e.clientX-this.event.clientX)+S,S)}c&&c.format&&c.format.includes("*")&&this.parent.notify(l.d,{value:c.value,format:c.format,cell:c,formattedText:c.value,rowIndex:d[0],colIndex:d[1]})},e.prototype.resizeStart=function(e,t,r,i,a,s){n.i(o._143)(e,t,r,i,this.parent);var l,d,c=a?"resizeToFit":"resize";i?(l={index:e,width:r,isCol:i,sheetIndex:this.parent.activeSheetIndex,oldWidth:s},d=s!==r):(l={index:e,height:r,isCol:i,sheetIndex:this.parent.activeSheetIndex,oldHeight:s},d=s!==r),d&&this.parent.notify(o._31,{eventArgs:l,action:c})},e.prototype.updateCursor=function(){this.parent.element.getElementsByClassName("e-colresize-handler")[0]?this.parent.element.classList.add("e-col-resizing"):this.parent.element.classList.contains("e-col-resizing")&&this.parent.element.classList.remove("e-col-resizing"),this.parent.element.getElementsByClassName("e-rowresize-handler")[0]?this.parent.element.classList.add("e-row-resizing"):this.parent.element.classList.contains("e-row-resizing")&&this.parent.element.classList.remove("e-row-resizing")},e.prototype.getFloatingElementWidth=function(e,t){var n=e,r={filterRange:[],hasFilter:!1};return this.parent.notify(o._33,r),r.hasFilter&&r.filterRange&&r.filterRange[1]<=t&&r.filterRange[3]>=t&&(n=e+22),n},e.prototype.destroy=function(){this.unwireEvents(),this.removeEventListener(),this.trgtEle&&this.trgtEle.remove(),this.trgtEle=null,this.parent=null},e.prototype.getModuleName=function(){return"resize"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(3),i=(n.n(r),n(5)),a=n(1),o=n(0),s=function(){function e(e){this.clientX=0,this.isKeyScroll=!0,this.parent=e,this.addEventListener(),this.initProps()}return e.prototype.onContentScroll=function(e){if(this.parent){var t,o,s=this.parent.getMainContent().parentElement,l=e.scrollLeft,d=e.scrollTop||s.scrollTop,c=l&&this.parent.enableRtl?this.initScrollValue-l:l;if(this.parent.allowAutoFill){var h=document.querySelector("#"+this.parent.element.id+"_autofilloptionbtn-popup"),p=document.querySelector("#"+this.parent.element.id+"_autofilloptionbtn");if(h){n.i(r.getComponent)(p,"dropdown-btn").toggle()}}if(!n.i(r.isNullOrUndefined)(l)&&this.prevScroll.scrollLeft!==c){var u=c>this.prevScroll.scrollLeft;o=this.offset.left.size,this.offset.left=this.getColOffset(c,u,e.skipHidden),e.preventScroll||(this.parent.getColumnHeaderContent().scrollLeft=l,this.parent.getMainContent().scrollLeft=l,e.scrollLeft=l),t={cur:this.offset.left,prev:{idx:this.leftIndex,size:o},increase:u,preventScroll:e.preventScroll},this.updateTopLeftCell(u,!0),this.parent.notify(a.s,t),this.parent.scrollSettings.enableVirtualization||!u||this.parent.scrollSettings.isFinite||this.updateNonVirtualCols(),this.leftIndex=t.prev.idx,this.prevScroll.scrollLeft=c}if(Math.round(this.prevScroll.scrollTop)!==Math.round(d)){e.skipRowVirualScroll&&(this.prevScroll.scrollTop=0,this.offset.top={idx:0,size:0});var f=d>this.prevScroll.scrollTop;o=this.offset.top.size,this.offset.top=this.getRowOffset(d,f),t={cur:this.offset.top,prev:{idx:this.topIndex,size:o},increase:f,preventScroll:e.preventScroll},this.updateTopLeftCell(f),e.preventScroll&&this.offset.top.idx<=this.parent.getThreshold("row")?this.offset.top={idx:0,size:0}:e.skipRowVirualScroll?t.prev.idx=t.cur.idx:this.parent.notify(a.r,t),this.parent.scrollSettings.enableVirtualization||!f||this.parent.scrollSettings.isFinite||this.updateNonVirtualRows(),this.topIndex=t.prev.idx,this.prevScroll.scrollTop=d}var g={isEdit:!1};if(this.parent.notify(i.f,g),g.isEdit){this.parent.element.querySelector(".e-formula-bar").focus()}this.isKeyScroll=!0}},e.prototype.updateScrollValue=function(e){void 0!==e.scrollLeft&&(this.prevScroll.scrollLeft=e.scrollLeft+(this.prevScroll.scrollLeft-this.offset.left.size),this.offset.left.size=e.scrollLeft),void 0!==e.scrollTop&&(this.prevScroll.scrollTop=e.scrollTop+(this.prevScroll.scrollTop-this.offset.top.size),this.offset.top.size=e.scrollTop)},e.prototype.updateNonVirtualRows=function(){var e=this.parent.getActiveSheet(),t=this.parent.getThreshold("row");this.offset.top.idx>e.rowCount-(this.parent.viewport.rowCount+t)&&(this.parent.renderModule.refreshUI({rowIndex:e.rowCount,colIndex:0,direction:"first",refresh:"RowPart"},n.i(o.W)(e.rowCount,0)+":"+n.i(o.W)(e.rowCount+t-1,e.colCount-1)),this.parent.setSheetPropertyOnMute(e,"rowCount",e.rowCount+t),this.parent.viewport.bottomIndex=e.rowCount-1)},e.prototype.updateNonVirtualCols=function(){var e=this.parent.getActiveSheet(),t=this.parent.getThreshold("col");this.offset.left.idx>e.colCount-(this.parent.viewport.colCount+t)&&(this.parent.renderModule.refreshUI({rowIndex:0,colIndex:e.colCount,direction:"first",refresh:"ColumnPart"},n.i(o.W)(0,e.colCount)+":"+n.i(o.W)(e.rowCount-1,e.colCount+t-1)),this.parent.setSheetPropertyOnMute(e,"colCount",e.colCount+t),this.parent.viewport.rightIndex=e.colCount-1)},e.prototype.updateTopLeftCell=function(e,t){var r=this.parent.getActiveSheet(),i=this.offset.top.idx,a=this.offset.left.idx;if(!e){var s=this.parent.frozenRowCount(r);i=n.i(o._172)(r,i+s,!0)-s;var l=this.parent.frozenColCount(r);a=n.i(o._172)(r,a+l,!0,"columns")-l}t?this.parent.updateTopLeftCell(null,a,"row"):this.parent.updateTopLeftCell(i,null,"col")},e.prototype.getRowOffset=function(e,t){var r=this.offset.top.size,i=this.parent.getActiveSheet(),a=t?this.offset.top.idx+1:this.offset.top.idx?this.offset.top.idx-1:0,s=this.parent.frozenRowCount(i),l=this.parent.scrollSettings.isFinite?i.rowCount:1/0;for(e=Math.round(e);a<l;)if(t){if(r+=n.i(o.x)(i,a-1+s,!0),Math.abs(Math.round(r)-e)<=1)return{idx:n.i(o._172)(i,a+s,!0)-s,size:r};if(Math.round(r)>e)return{idx:a-1,size:r-n.i(o.x)(i,a-1+s,!0)};a++}else{if((r-=n.i(o.x)(i,a+s,!0))<=0)return{idx:0,size:0};if(Math.abs(Math.round(r)-e)<=1)return{idx:a,size:r};if(Math.round(r)<e)return r+=n.i(o.x)(i,a+s,!0),Math.round(r)>e?{idx:a,size:r-n.i(o.x)(i,a+s,!0)<0?0:r-n.i(o.x)(i,a+s,!0)}:{idx:n.i(o._172)(i,a+1+s,!0)-s,size:r};a--}return{idx:this.offset.top.idx,size:this.offset.top.size}},e.prototype.getColOffset=function(e,t,r){for(var i=this.offset.left.size,a=this.parent.getActiveSheet(),s=t?this.offset.left.idx+1:this.offset.left.idx?this.offset.left.idx-1:0,l=this.parent.frozenColCount(a),d=this.parent.scrollSettings.isFinite?a.colCount:1/0;s<d;)if(t){if(i+=n.i(o.D)(a,s-1+l,r,!0),Math.abs(Math.round(i)-e)<=1)return{idx:n.i(o._172)(a,s+l,!0,"columns")-l,size:i};if(Math.round(i)>e)return{idx:s-1,size:i-n.i(o.D)(a,s-1+l,r,!0)};s++}else{if((i-=n.i(o.D)(a,s+l,r,!0))<=0)return{idx:0,size:0};if(Math.abs(Math.round(i)-e)<=1)return{idx:s,size:i};if(Math.round(i)<e)return i+=n.i(o.D)(a,s+l,r,!0),Math.round(i)>e?(i-=n.i(o.D)(a,s+l,r,!0),{idx:s,size:i<0?0:i}):{idx:n.i(o._172)(a,s+1+l,!0,"columns")-l,size:i};s--}return{idx:this.offset.left.idx,size:this.offset.left.size}},e.prototype.contentLoaded=function(e){if(!this.parent.scrollSettings.enableVirtualization){var t=this.parent.createElement("div",{className:"e-virtualtrack"});this.updateNonVirualScrollWidth({scrollTrack:t}),this.parent.getScrollElement().appendChild(t)}e.left&&(this.parent.getScrollElement().scrollLeft=e.left),this.setScrollEvent(),this.parent.enableRtl&&(this.initScrollValue=this.parent.getScrollElement().scrollLeft)},e.prototype.updateNonVirualScrollWidth=function(e){e.scrollTrack||(e.scrollTrack=this.parent.getScrollElement().getElementsByClassName("e-virtualtrack")[0]),e.scrollTrack.style.width=Math.abs(this.parent.getContentTable().getBoundingClientRect().width+(this.parent.scrollSettings.isFinite?this.parent.sheetModule.getScrollSize():0))+"px"},e.prototype.onHeaderWheel=function(e){e.preventDefault(),this.parent.getMainContent().parentElement.scrollTop+=e.deltaY,this.parent.getScrollElement().scrollLeft+=e.deltaX},e.prototype.onContentWheel=function(e){0!==e.deltaX&&(e.preventDefault(),this.parent.getScrollElement().scrollLeft+=e.deltaX)},e.prototype.scrollHandler=function(e){this.onContentScroll({scrollLeft:e.target.scrollLeft})},e.prototype.updateScroll=function(e){n.i(r.isNullOrUndefined)(e.left)?this.parent.sheetModule.contentPanel.scrollTop=e.top:this.parent.getScrollElement().scrollLeft=e.left},e.prototype.setScrollEvent=function(e){void 0===e&&(e={set:!0}),e.set?(r.EventHandler.add(this.parent.sheetModule.contentPanel,"scroll",this.onContentScroll,this),r.EventHandler.add(this.parent.getColumnHeaderContent(),"wheel",this.onHeaderWheel,this),r.EventHandler.add(this.parent.getSelectAllContent(),"wheel",this.onHeaderWheel,this),r.EventHandler.add(this.parent.getMainContent(),"wheel",this.onContentWheel,this),r.EventHandler.add(this.parent.getRowHeaderContent(),"wheel",this.onContentWheel,this),r.EventHandler.add(this.parent.getScrollElement(),"scroll",this.scrollHandler,this)):(r.EventHandler.remove(this.parent.sheetModule.contentPanel,"scroll",this.onContentScroll),r.EventHandler.remove(this.parent.getColumnHeaderContent(),"wheel",this.onHeaderWheel),r.EventHandler.remove(this.parent.getSelectAllContent(),"wheel",this.onHeaderWheel),r.EventHandler.remove(this.parent.getMainContent(),"wheel",this.onContentWheel),r.EventHandler.remove(this.parent.getRowHeaderContent(),"wheel",this.onContentWheel),r.EventHandler.remove(this.parent.getScrollElement(),"scroll",this.scrollHandler))},e.prototype.initProps=function(){this.topIndex=0,this.leftIndex=0,this.prevScroll={scrollLeft:0,scrollTop:0},this.offset={left:{idx:0,size:0},top:{idx:0,size:0}}},e.prototype.setPadding=function(e){this.parent.sheetModule.contentPanel.style.overflowY="scroll";var t=n.i(a._118)();if(t>0){var r=this.parent.getColumnHeaderContent(),i=this.parent.enableRtl?{margin:"marginLeft",border:"borderLeftWidth"}:{margin:"marginRight",border:"borderRightWidth"};r.parentElement.style[i.margin]=t+"px",r.style[i.border]="1px"}e&&(this.initScrollValue=0)},e.prototype.setClientX=function(e){if("mousedown"!==e.type&&"mouse"!==e.pointerType){var t={touchSelectionStarted:!1};if(this.parent.notify(a._97,t),!t.touchSelectionStarted&&!t.isOverlayClicked){this.clientX=this.getPointX(e);var n=document.getElementById(this.parent.element.id+"_sheet");r.EventHandler.add(n,r.Browser.isPointer?"pointermove":"touchmove",this.onTouchScroll,this),r.EventHandler.add(n,r.Browser.isPointer?"pointerup":"touchend",this.pointerUpHandler,this)}}},e.prototype.getPointX=function(e){return e.touches&&e.touches.length?e.touches[0].clientX:e.clientX},e.prototype.onTouchScroll=function(e){if("mouse"!==e.pointerType){var t=this.getPointX(e),r=this.clientX-t,a=this.parent.element.getElementsByClassName("e-scroller")[0];(r>10||r<-10)&&a.scrollLeft+r>=0&&(e.preventDefault(),this.clientX=t,n.i(i._115)(function(){a.scrollLeft+=r}))}},e.prototype.pointerUpHandler=function(){var e=document.getElementById(this.parent.element.id+"_sheet");r.EventHandler.remove(e,r.Browser.isPointer?"pointermove":"touchmove",this.onTouchScroll),r.EventHandler.remove(e,r.Browser.isPointer?"pointerup":"touchend",this.pointerUpHandler)},e.prototype.addEventListener=function(){this.parent.on(a.g,this.contentLoaded,this),this.parent.on(a._3,this.onContentScroll,this),this.parent.on(a._100,this.updateScroll,this),this.parent.on(a._4,this.initProps,this),this.parent.on(a.i,this.destroy,this),this.parent.on(a._36,this.setScrollEvent,this),this.parent.on(i.h,this.setClientX,this),this.parent.on(a._110,this.updateScrollValue,this),this.parent.scrollSettings.enableVirtualization||(this.parent.on(a.v,this.updateNonVirualScrollWidth,this),this.parent.on(i._2,this.updateNonVirualScrollWidth,this))},e.prototype.destroy=function(){this.removeEventListener();var e=document.querySelector("#"+this.parent.element.id+"_autofilloptionbtn");if(e){var t=n.i(r.getComponent)(e,"dropdown-btn");t&&t.destroy()}this.parent=null},e.prototype.removeEventListener=function(){this.parent.off(a.g,this.contentLoaded),this.parent.off(a._3,this.onContentScroll),this.parent.off(a._100,this.updateScroll),this.parent.off(a._4,this.initProps),this.parent.off(a.i,this.destroy),this.parent.off(a._36,this.setScrollEvent),this.parent.off(i.h,this.setClientX),this.parent.off(a._110,this.updateScrollValue),this.parent.scrollSettings.enableVirtualization||(this.parent.off(a.v,this.updateNonVirualScrollWidth),this.parent.off(i._2,this.updateNonVirualScrollWidth))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(1),i=n(0),a=n(3),o=(n.n(a),n(15)),s=n(2),l=function(){function e(e){this.invalidOperators=["%"],this.formulaRange=[],this.parent=e,this.addEventListener(),this.mouseMoveEvt=this.mouseMoveHandler.bind(this)}return e.prototype.addEventListener=function(){this.parent.on(r.g,this.init,this),this.parent.on(r.h,this.mouseDownHandler,this),this.parent.on(r.v,this.virtualContentLoadedHandler,this),this.parent.on(r.x,this.cellNavigateHandler,this),this.parent.on(r.H,this.selectRange,this),this.parent.on(r._1,this.rowHeightChanged,this),this.parent.on(r._2,this.colWidthChanged,this),this.parent.on(r._53,this.protectHandler,this),this.parent.on(r._63,this.initiateFormulaSelection,this),this.parent.on(r._65,this.clearBorder,this),this.parent.on(r._73,this.getRowIdxFromClientY,this),this.parent.on(r._74,this.getColIdxFromClientX,this),this.parent.on(s._87,this.getRowIdxFromClientY,this),this.parent.on(s._88,this.getColIdxFromClientX,this),this.parent.on(r._82,this.chartBorderHandler,this),this.parent.on(r._97,this.isTouchSelectionStarted,this),this.parent.on(r.I,this.selectionByKeydown,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.g,this.init),this.parent.off(r.h,this.mouseDownHandler),this.parent.off(r.v,this.virtualContentLoadedHandler),this.parent.off(r.x,this.cellNavigateHandler),this.parent.off(r.H,this.selectRange),this.parent.off(r._1,this.rowHeightChanged),this.parent.off(r._2,this.colWidthChanged),this.parent.off(r._53,this.protectHandler),this.parent.off(r._63,this.initiateFormulaSelection),this.parent.off(r._65,this.clearBorder),this.parent.off(r._73,this.getRowIdxFromClientY),this.parent.off(r._74,this.getColIdxFromClientX),this.parent.off(s._87,this.getRowIdxFromClientY),this.parent.off(s._88,this.getColIdxFromClientX),this.parent.off(r._82,this.chartBorderHandler),this.parent.off(r._97,this.isTouchSelectionStarted),this.parent.off(r.I,this.selectionByKeydown))},e.prototype.isTouchSelectionStarted=function(e){e.touchSelectionStarted=this.touchSelectionStarted},e.prototype.selectionByKeydown=function(e){this.selectRangeByIdx(e.range,e.e,!1,!1,!1,!1,void 0,!1)},e.prototype.rowHeightChanged=function(e){var t=this;e.threshold&&n.i(r._115)(function(){if(t.parent){var r=t.parent.getActiveSheet(),a=t.getActiveCell();if(a&&(r.frozenRows||r.frozenColumns||r.selectedRange.includes(" ")))return void t.selectRange({address:r.selectedRange});var s,l=n.i(o.i)(n.i(o.d)(r.selectedRange)),d={range:l,isActiveCell:!1,skipChecking:!0};if(a){var c=n.i(o.f)(r.activeCell)[0];if(t.parent.notify(i._115,d),d.isActiveCell){s=n.i(i.I)(l[0],l[1],r,!1,!0).rowSpan>1&&l[0]<=e.rowIdx&&l[2]>=e.rowIdx}c===e.rowIdx||s?a.style.height=parseFloat(a.style.height)+e.threshold+"px":c>e.rowIdx&&(a.style.top=parseFloat(a.style.top)+e.threshold+"px")}if(a=t.getSelectionElement()){if(s||l[0]===l[2]&&l[1]===l[3])return;var h=l[0],p=l[2];h<=e.rowIdx&&p>=e.rowIdx&&a?a.style.height=parseFloat(a.style.height)+e.threshold+"px":h>e.rowIdx&&a&&(a.style.top=parseFloat(a.style.top)+e.threshold+"px")}}})},e.prototype.colWidthChanged=function(e){var t=this;e.threshold&&n.i(r._115)(function(){if(t.parent){var r=t.parent.getActiveSheet(),a=t.getActiveCell(),s=t.parent.enableRtl;if(a&&(r.frozenRows||r.frozenColumns||r.selectedRange.includes(" ")))return void t.selectRange({address:r.selectedRange});var l,d=n.i(o.i)(n.i(o.d)(r.selectedRange)),c={range:d,isActiveCell:!1,skipChecking:!0};if(a){t.parent.notify(i._115,c);var h=n.i(o.f)(r.activeCell)[1];if(c.isActiveCell){var p=n.i(i.I)(d[0],d[1],r,!1,!0);l=p.rowSpan>1||p.colSpan>1}h===e.colIdx||l?a.style.width=parseFloat(a.style.width)+e.threshold+"px":h>e.colIdx&&(s?a.style.right=parseFloat(a.style.right)+e.threshold+"px":a.style.left=parseFloat(a.style.left)+e.threshold+"px")}if((a=t.getSelectionElement())&&!l&&(d[0]!==d[2]||d[1]!==d[3])){var u=d[1],f=d[3];u<=e.colIdx&&f>=e.colIdx&&a?a.style.width=parseFloat(a.style.width)+e.threshold+"px":u>e.colIdx&&a&&(s?a.style.right=parseFloat(a.style.right)+e.threshold+"px":a.style.left=parseFloat(a.style.left)+e.threshold+"px")}}})},e.prototype.selectRange=function(e){e.address="Single"===this.parent.selectionSettings.mode?n.i(o.b)(n.i(o.f)(e.address)):e.address,this.selectMultiRange(e.address,null,null,e.skipChecking)},e.prototype.init=function(){this.createSelectionElement();var e=this.parent.getActiveSheet(),t=n.i(o.i)(n.i(o.d)(e.selectedRange)),r=n.i(o.f)(e.activeCell),i=t[0]<=r[0]&&t[2]>=r[0]&&t[1]<=r[1]&&t[3]>=r[1];this.selectMultiRange(e.selectedRange,!0,i)},e.prototype.selectMultiRange=function(e,t,r,a){var s=this,l=this.parent.activeSheetIndex;e.indexOf("!")>-1&&(l=n.i(i.e)(this.parent,n.i(i.g)(e)),e=e.split("!")[1]),this.parent.activeSheetIndex===l?e.split(" ").forEach(function(e,i){s.selectRangeByIdx(n.i(o.d)(e),{type:"mousedown",ctrlKey:0!==i},null,r,t,a)}):n.i(i.i)(this.parent,e,this.parent.sheets[l])},e.prototype.createSelectionElement=function(){var e=this.parent.getMainContent(),t=this.parent.createElement("div",{className:"e-selection"});e.appendChild(t),t=this.parent.createElement("div",{className:"e-active-cell"}),e.appendChild(t)},e.prototype.mouseDownHandler=function(e){if(!(n.i(a.closest)(e.target,".e-scrollbar")||e.target.classList.contains("e-main-panel")||e.target.classList.contains("e-sheet"))){var t={action:"getCurrentEditValue",editedValue:""},l=this.parent.getActiveSheet();this.parent.notify(r.j,t);var d=n.i(i._160)(t.editedValue,!0);if(!this.parent.isEdit||d){var c=document.getElementById(this.parent.element.id+"_overlay");if("string"==typeof e.target.className){if(e.target.className.indexOf("e-ss-overlay")>-1)return}else c&&c.classList.remove("e-ss-overlay-active");if(n.i(a.closest)(e.target,".e-datavisualization-chart"))return;if(l.isProtected&&!l.protectSettings.selectCells&&!l.protectSettings.selectUnLockedCells)return;if(!n.i(a.closest)(e.target,".e-findtool-dlg")&&this.getSheetElement().contains(e.target)&&!e.target.classList.contains("e-colresize")&&!e.target.classList.contains("e-rowresize")){var h=this.parent.getActiveSheet(),p=this.parent.selectionSettings.mode,u=this.getRowIdxFromClientY({clientY:n.i(r._137)(e),target:e.target}),f=this.getColIdxFromClientX({clientX:n.i(r._136)(e),target:e.target}),g=n.i(o.f)(h.activeCell),m=(n.i(i.I)(u,f,h),void 0),v=void 0;if(h.showHeaders){var y=e.target;if(h.frozenColumns||h.frozenRows){var C=this.parent.getSelectAllContent().querySelector("thead");v=C?(this.parent.getColumnHeaderContent().contains(y)||C.contains(y))&&y.classList.contains("e-header-cell"):this.parent.getColumnHeaderContent().contains(y)&&y.classList.contains("e-header-cell"),C=this.parent.getSelectAllContent().querySelector("tbody"),m=C?(this.parent.getRowHeaderContent().contains(y)||C.contains(y))&&y.classList.contains("e-header-cell"):this.parent.getRowHeaderContent().contains(y)&&y.classList.contains("e-header-cell")}else m=this.parent.getRowHeaderContent().contains(e.target),v=this.parent.getColumnHeaderContent().contains(e.target)}if(3===e.which&&this.isSelected(u,f))return;if(e.target.classList.contains("e-autofill")){this.isautoFillClicked=!0;var b=e.target.parentElement.querySelector(".e-dragfill-ddb");b&&!b.classList.contains("e-hide")||(this.dAutoFillCell=h.selectedRange)}var x=n.i(o.d)(h.topLeftCell),S=void 0;if(m?(this.isRowSelected=!0,e.shiftKey&&"Single"!==p||(this.startCell=[u,0]),S=[this.startCell[0],h.frozenColumns?x[1]:0,u,h.colCount-1]):v?(this.isColSelected=!0,e.shiftKey&&"Single"!==p||(this.startCell=[0,f]),S=[h.frozenRows?x[0]:0,this.startCell[1],h.rowCount-1,f]):n.i(a.closest)(e.target,".e-select-all-cell")?(this.startCell=[h.frozenRows?x[0]:0,h.frozenColumns?x[1]:0],S=[].concat(this.startCell,[h.rowCount-1,h.colCount-1])):e.target.classList.contains("e-sheet-content")||(e.shiftKey&&"Single"!==p||(this.startCell=[u,f]),this.isautoFillClicked||n.i(a.closest)(e.target,".e-filloption")||(S=[].concat(this.startCell?this.startCell:n.i(o.f)(h.activeCell),[u,f]))),n.i(r._129)(e)&&!m&&!v&&S){var w=this.isRowColSelected(S);this.isRowSelected=w.isRowSelected,this.isColSelected=w.isColSelected}var _=e.ctrlKey&&S&&h.selectedRange.includes(n.i(o.b)(S));if(!_&&"Multiple"===p&&(!n.i(r._131)(e)&&(!n.i(r._129)(e)||n.i(r._129)(e)&&g[0]===u&&g[1]===f)||v||m)?(document.addEventListener(n.i(r._127)().split(" ")[0],this.mouseMoveEvt),a.Browser.isPointer||(a.Browser.isIos&&n.i(r._129)(e)&&e.target&&e.target.classList.contains("e-cell")&&e.preventDefault(),document.addEventListener(n.i(r._127)().split(" ")[1],this.mouseMoveEvt,{passive:!1})),this.touchSelectionStarted=!0):this.touchSelectionStarted=!1,_||n.i(r._131)(e)||a.EventHandler.add(document,n.i(r._128)(),this.mouseUpHandler,this),n.i(r._129)(e)&&!v&&!m)return void(this.touchEvt=e);S&&this.selectRangeByIdx(S,e),this.parent.isMobileView()&&(this.parent.element.classList.add("e-mobile-focused"),this.parent.renderModule.setSheetPanelSize())}}if(d&&(e.target.classList.contains("e-cell")||e.target.classList.contains("e-wrap-content")||e.target.classList.contains("e-header-cell"))&&this.parent.isEdit){var S=this.parent.getActiveSheet().selectedRange;S=n.i(i._5)(n.i(s.m)(S))?S.split(":")[0]:S,this.parent.notify(r._67,{range:S,isSelect:!1})}}},e.prototype.mouseMoveHandler=function(e){var t=this,s=this.parent.getActiveSheet();n.i(r._130)(e)&&e.preventDefault();var l={action:"getCurrentEditValue",editedValue:""};this.parent.notify(r.j,l);var d,c,h=n.i(i._160)(l.editedValue,!0),p=this.parent.getMainContent().parentElement,u=this.parent.element.getElementsByClassName("e-scroller")[0],f=p.getBoundingClientRect(),g=this.parent.frozenColCount(s),m=f.left+this.parent.sheetModule.getRowHeaderWidth(s),v=f.top,y=f.right-n.i(r._118)(),C=f.bottom,b=n.i(r._136)(e),x=n.i(r._137)(e),S=this.isRowSelected?s.colCount-1:this.getColIdxFromClientX({clientX:b,target:e.target}),w=this.isColSelected?s.rowCount-1:this.getRowIdxFromClientY({clientY:x,target:e.target});if(e.ctrlKey){var _=s.selectedRange.split(" ");d=n.i(o.d)(_[_.length-1])}else d=n.i(o.d)(s.selectedRange);if(a.Browser.isDevice){var I=screen.availWidth;y>=I-40&&(y-=40-(I-y)),!s.showHeaders&&m<40&&(m+=40-m)}var E={range:[w,S,w,S]};if(this.parent.notify(i._116,E),!(E.range[2]===d[2]&&E.range[3]===d[3]&&x<=C&&x>=v&&b<=y&&b>=m)){var R=this.parent.frozenRowCount(s),k=x>C&&w<s.rowCount,A=x<v&&w>=0&&!this.isColSelected&&!!p.scrollTop;R>w&&(k=!1,A=!1);var F=b>y&&S<s.colCount,N=b<m&&S>=0&&!this.isRowSelected&&!!u.scrollLeft;g>S&&(F=!1,N=!1),this.clearInterval();var T,O;if(h||this.isColSelected||this.isRowSelected||(d=n.i(o.f)(s.activeCell)),k||A||F||N){(A||N)&&(T=w,O=S);var D=function(){if((k||A)&&!t.isColSelected){if((w=t.getRowIdxFromClientY({clientY:k?C:v}))>=s.rowCount)return void t.clearInterval();p.scrollTop+=(k?1:-1)*n.i(i.x)(s,w)}if((F||N)&&!t.isRowSelected){if((S=t.getColIdxFromClientX({clientX:F?y:m}))>=s.colCount)return void t.clearInterval();u.scrollLeft+=(F?1:-1)*n.i(i.D)(s,S)}if(A&&s.frozenRows&&!p.scrollTop||N&&s.frozenColumns&&!u.scrollLeft)return t.selectRangeByIdx([].concat(d[0],d[1],[T,O]),e),void t.clearInterval();t.selectRangeByIdx([].concat(d[0],d[1],[w,S]),e)};D(),this.scrollInterval=setInterval(function(){D(),t.clearInterval(),t.scrollInterval=setInterval(D,100)})}else{var L=[].concat(d[0],d[1],[w,S]);if(R&&L[0]<R&&L[2]>=R&&p.scrollTop&&(p.scrollTop=0,L[2]=R),g&&L[1]<g&&L[3]>=g&&u.scrollLeft&&(u.scrollLeft=0,L[3]=g),this.isautoFillClicked){e.target.classList.contains("e-autofill")&&(this.dAutoFillCell=s.selectedRange);var P={e:e,indexes:null};this.parent.notify(r._104,P),L=P.indexes,c=L}this.selectRangeByIdx(L,e)}if(h&&this.parent.isEdit&&!n.i(a.closest)(e.target,"#"+this.parent.element.id+"_edit")){var M=void 0;M=this.isautoFillClicked?n.i(o.b)(c):this.parent.getActiveSheet().selectedRange,this.parent.notify(r._67,{range:M,isSelect:!1})}}},e.prototype.mouseUpHandler=function(e){var t=this.getRowIdxFromClientY({clientY:n.i(r._137)(e),target:e.target}),s=this.getColIdxFromClientX({clientX:n.i(r._136)(e),target:e.target});this.clearInterval(),!n.i(r._131)(e)||this.isColSelected||this.isRowSelected||this.getRowIdxFromClientY({clientY:n.i(r._137)(this.touchEvt),target:e.target})!==t||this.getColIdxFromClientX({clientX:n.i(r._136)(this.touchEvt),target:e.target})!==s||this.mouseDownHandler(e),document.removeEventListener(n.i(r._127)().split(" ")[0],this.mouseMoveEvt),a.Browser.isPointer||document.removeEventListener(n.i(r._127)().split(" ")[1],this.mouseMoveEvt),a.EventHandler.remove(document,n.i(r._128)(),this.mouseUpHandler);var l=this.parent.getActiveSheet();if((l.frozenRows||l.frozenColumns)&&n.i(r._123)(this.parent.element,null,"e-cur-selection",!0,!0),this.parent.notify(r.y,e),this.isautoFillClicked){var d=this.parent.getActiveSheet(),c=n.i(o.d)(d.selectedRange);this.isColSelected&&c[1]===s||this.isRowSelected&&c[0]===t||this.parent.notify(r._103,{event:e,dAutoFillCell:this.dAutoFillCell}),this.isautoFillClicked=!1}else e.ctrlKey||n.i(r._161)(n.i(i.j)(this.parent.getActiveSheet()))?this.parent.notify(r._106,null):this.parent.notify(r._101,null);var h={action:"getCurrentEditValue",editedValue:""};this.parent.notify(r.j,h);var p=n.i(i._160)(h.editedValue)||h.editedValue&&0===h.editedValue.toString().indexOf("=");this.parent.isEdit&&p&&this.parent.notify(r._64,{isCellEdit:e.target.classList.contains("e-spreadsheet-edit")})},e.prototype.isSelected=function(e,t){for(var r,i=!1,a=this.parent.getActiveSheet().selectedRange.split(" "),s=0;s<a.length;s++)if(r=n.i(o.i)(n.i(o.d)(a[s])),r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]){i=!0;break}return i},e.prototype.virtualContentLoadedHandler=function(e){var t,r,i,a=this,s=this.parent.getActiveSheet();s.selectedRange.split(" ").forEach(function(l,d){if(t=n.i(o.d)(l),i=0===t[1]&&t[3]===e.prevRowColCnt.colCount-1,r=0===t[0]&&t[2]===e.prevRowColCnt.rowCount-1,i||r)t=r&&i?[0,0,s.rowCount-1,s.colCount-1]:r?[0,t[1],s.rowCount-1,t[3]]:[t[0],0,t[2],s.colCount-1],s.frozenRows||s.frozenColumns?a.selectRangeByIdx(t,{type:"mousedown",ctrlKey:0!==d},!1,!1,!1,!1,void 0,!0):a.selectRangeByIdx(t,null,!0,null,null,null,d);else{t=n.i(o.d)(l);var c=a.parent.viewport.topIndex+a.parent.frozenRowCount(s),h=a.parent.viewport.leftIndex+a.parent.frozenColCount(s);a.highlightHdr(t,0!==d,t[0]>=c||t[2]>=c,t[1]>=h||t[3]>=h)}})},e.prototype.clearInterval=function(){this.scrollInterval&&(clearInterval(this.scrollInterval),this.scrollInterval=null)},e.prototype.getScrollLeft=function(){return this.parent.scrollModule?this.parent.scrollModule.prevScroll.scrollLeft:0},e.prototype.cellNavigateHandler=function(e){var t=this.parent.getActiveSheet();(!t.isProtected||t.protectSettings.selectCells||t.protectSettings.selectUnLockedCells)&&this.selectRangeByIdx(e.range.concat(e.range),void 0,!1,!1,!1,!1,void 0,e.preventAnimation)},e.prototype.getColIdxFromClientX=function(e){var t=0,o=this.parent.getActiveSheet(),s=0;if(e.isImage)s=e.clientX;else{var l=document.getElementById(this.parent.element.id+"_sheet").getBoundingClientRect();if(s=this.parent.enableRtl?l.right-this.parent.sheetModule.getRowHeaderWidth(o,!0)-1-e.clientX:e.clientX-(l.left+this.parent.sheetModule.getRowHeaderWidth(o,!0)+1),s+=this.parent.viewport.beforeFreezeWidth,!e.target||!n.i(a.closest)(e.target,".e-row-header")&&!n.i(a.closest)(e.target,".e-selectall-container")||this.isScrollableArea(e.clientX,e.target,!0))if(this.parent.frozenColCount(o)){var d=this.parent.element.querySelector(".e-frozen-column");s=parseInt(d.style.left,10)>s?s:s+this.getScrollLeft()}else s+=this.getScrollLeft()}for(var c,h=0;;h++)if(c=t+=n.i(i.D)(o,h,null,!e.isImage),s<(e.isImage?Number(n.i(r._167)(c).toFixed(2)):c)||this.parent.scrollSettings.isFinite&&h===o.colCount-1)return e.isImage||(e.size=s),e.clientX=h,h},e.prototype.isScrollableArea=function(e,t,n){return!!t.classList.contains("e-table")&&(n?e>this.parent.getMainContent().getBoundingClientRect().left:e>this.parent.getMainContent().parentElement.getBoundingClientRect().top)},e.prototype.getRowIdxFromClientY=function(e){var t=0,o=this.parent.getActiveSheet(),s=0;if(e.isImage)s=e.clientY;else{var l=document.getElementById(this.parent.element.id+"_sheet");s=e.clientY+this.parent.viewport.beforeFreezeHeight-(l.getBoundingClientRect().top+(o.showHeaders?31:0)),e.target&&n.i(a.closest)(e.target,".e-header-panel")&&!this.isScrollableArea(e.clientY,e.target)||(s+=this.parent.getMainContent().parentElement.scrollTop)}for(var d,c=0;;c++)if(d=t+=n.i(i.x)(o,c,!e.isImage),s<(e.isImage?Number(n.i(r._167)(d).toFixed(2)):d)||this.parent.scrollSettings.isFinite&&c===o.rowCount-1)return e.isImage||(e.size=s),e.clientY=c,c},e.prototype.initFormulaReferenceIndicator=function(e){if(this.parent.isEdit){var t=this.parent.createElement("div",{className:"e-formularef-indicator"});t.appendChild(this.parent.createElement("div",{className:"e-top"})),t.appendChild(this.parent.createElement("div",{className:"e-bottom"})),t.appendChild(this.parent.createElement("div",{className:"e-left"})),t.appendChild(this.parent.createElement("div",{className:"e-right"})),this.parent.getMainContent().appendChild(t),n.i(r._122)(this.parent,t,e,"e-formularef-indicator")}},e.prototype.isMouseEvent=function(e){return n.i(r._132)(e)||n.i(r._134)(e)||n.i(r._133)(e)},e.prototype.selectRangeByIdx=function(e,t,l,d,c,h,p,u){var f=this,g=t&&this.isMouseEvent(t);if(!(t&&t.target&&g&&n.i(a.closest)(t.target,"#"+this.parent.element.id+"_edit"))){var m={action:"getCurrentEditValue",editedValue:"",endFormulaRef:!1};this.parent.notify(r.j,m);var v,y=!!this.parent.isEdit&&n.i(i._160)(m.editedValue,!0)&&!m.endFormulaRef,C=t&&t.ctrlKey&&n.i(r._132)(t);C||(v=this.getSelectionElement(t,p));var b,x=this.parent.getActiveSheet(),S=n.i(o.d)(x.topLeftCell),w=this.parent.element.querySelector(".e-formularef-indicator"),_={range:[].slice.call(e),isActiveCell:!1,skipChecking:h},I=this.isRowColSelected(e);I.isColSelected||I.isRowSelected||this.parent.notify(i._115,_),e!==_.range&&(b=!0),e=_.range;var E=new Promise(function(e){e(void 0)}),R={range:n.i(o.b)(e),cancel:!1};if(x.isProtected){var k=n.i(i.I)(e[2],e[3],x);if(x.protectSettings.selectUnLockedCells&&!x.protectSettings.selectCells)if(n.i(a.isNullOrUndefined)(k)){if(!x.protectSettings.selectCells)return}else{if(!0===k.isLocked||n.i(a.isNullOrUndefined)(k.isLocked))return;var A=this.parent.element.getElementsByClassName("e-sheet-panel")[0];A&&A.classList.contains("e-protected")&&A.classList.remove("e-protected")}}if(this.parent.trigger("beforeSelect",R),!R.cancel){if(y&&w&&w.parentElement.removeChild(w),this.parent.notify(r._102,null),!n.i(i._5)(e)&&!_.isActiveCell||C){if(C)if(void 0===p){var F=n.i(o.b)(e);if(x.selectedRange.includes(F)){var N=x.selectedRange.split(" ");return N.length>1?(N.splice(N.indexOf(F),1),F=N.join(" ")):F=x.activeCell+":"+x.activeCell,void this.selectRange({address:F})}v=this.getSelectionElement(t,p)}else v=this.getSelectionElement(t,p);if(y&&this.parent.isEdit){if(t&&t.target&&(!g||!t.target.classList.contains("e-spreadsheet-edit"))&&this.parent.isEdit){var T={range:n.i(o.b)(e),isSelect:!0};if(this.parent.notify(r._67,T),T.isAlertDlgOpen)return;this.initFormulaReferenceIndicator(e)}}else{var O=void 0;v&&(v.classList.remove("e-hide"),(x.frozenRows||x.frozenColumns)&&((t&&t.target||C)&&(O="e-cur-selection",n.i(r._133)(t)&&v.classList.contains("e-cur-selection")?v.classList.add("e-hide"):v.classList.add(O)),!C&&(this.isColSelected||this.isRowSelected)&&n.i(r._132)(t)&&(n.i(r._123)(this.parent.getSelectAllContent(),null,"e-selection"),n.i(r._123)(this.parent.getColumnHeaderContent(),null,"e-selection"),n.i(r._123)(this.parent.getRowHeaderContent(),null,"e-selection"))));var D=this.isColSelected&&this.isRowSelected?void 0:this.getOffset(e[2],e[3]);b&&D&&(D.left={idx:0,size:0}),E=n.i(r._122)(this.parent,v,e,O,u,C,C&&!t.target)||E}}else{if(v&&(v.classList.contains("e-multi-range")||v.classList.add("e-hide"),x.frozenRows||x.frozenColumns)){var O=n.i(r._133)(t)?"e-cur-selection":"e-selection";n.i(r._123)(this.parent.getSelectAllContent(),null,O,!0),n.i(r._123)(this.parent.getColumnHeaderContent(),null,O,!0),n.i(r._123)(this.parent.getRowHeaderContent(),null,O,!0)}if(x.frozenColumns||x.frozenRows||!v||n.i(r._122)(this.parent,v,e),y&&t&&t.target&&(!g||!t.target.classList.contains("e-spreadsheet-edit"))&&this.parent.isEdit){var T={range:n.i(o.b)(e).split(":")[0],isSelect:!0};if(this.parent.notify(r._67,T),T.isAlertDlgOpen)return;this.initFormulaReferenceIndicator(e)}}var L={action:"getCurrentEditSheetIdx",sheetIndex:null};this.parent.notify(r.j,L),x.frozenColumns&&e[1]>0&&e[1]===S[1]&&e[3]===x.colCount-1&&(e[1]=0),x.frozenRows&&e[0]>0&&e[0]===S[0]&&e[2]===x.rowCount-1&&(e[0]=0);var P=n.i(o.b)(e);if(t&&t.ctrlKey&&(n.i(r._133)(t)||n.i(r._134)(t)))P=x.selectedRange.slice(0,x.selectedRange.lastIndexOf(" "))+" "+P;else if(p>-1){var N=x.selectedRange.split(" ");N[p]=P,P=N.join(" ")}if(y||this.isautoFillClicked)c||this.isautoFillClicked||n.i(i.i)(this.parent,P,x,C);else{var M=!1;x.selectedRange!==P&&(M=!0),n.i(i.i)(this.parent,P,x,C),M&&E.then(function(){f.parent.trigger("select",{range:f.parent.getActiveSheet().selectedRange})})}I=this.isRowColSelected(e),this.isRowSelected=I.isRowSelected,this.isColSelected=I.isColSelected,this.highlightHdr(e,t&&t.ctrlKey),l||t&&("mousemove"===t.type||n.i(r._130)(t))||(y?L.sheetIndex===this.parent.getActiveSheet().id-1&&c?(d=!0,this.updateActiveCell(d?n.i(o.d)(x.activeCell):e,c,u)):this.parent.isEdit||this.updateActiveCell(d?n.i(o.d)(x.activeCell):e,c,u):this.updateActiveCell(d?n.i(o.d)(x.activeCell):e,c,u)),n.i(a.isNullOrUndefined)(t)&&(t={type:"mousedown"}),y?c||this.parent.notify(s._58,t):this.parent.notify(s._58,t),C||n.i(r._161)(n.i(i.j)(this.parent.getActiveSheet()))?this.parent.notify(r._106,null):this.parent.notify(r._101,{preventAnimation:u}),this.parent.showAggregate&&this.parent.notify(r._58,{}),this.parent.notify(r._71,null)}}},e.prototype.isRowColSelected=function(e){var t=this.parent.getActiveSheet();return{isRowSelected:0===e[1]&&e[3]===t.colCount-1,isColSelected:0===e[0]&&e[2]===t.rowCount-1}},e.prototype.updateActiveCell=function(e,t,a){var s,l,d,c=this.parent.getActiveSheet(),h=n.i(o.d)(c.topLeftCell);this.isColSelected?(s=h[0],l=e[1],this.isRowSelected&&(l=h[1])):(s=e[0],l=e[1],this.isRowSelected&&(l=h[1]));var p={range:[s,l].concat([s,l])};if(this.parent.notify(i._116,p),e!==p.range&&(d=!0),e=p.range,c.activeCell!==n.i(o.c)(e[0],e[1])||t){if(this.parent.setSheetPropertyOnMute(c,"activeCell",n.i(o.c)(e[0],e[1])),c.isProtected){var u=this.parent.element.querySelector(".e-formula-bar"),f=n.i(i.I)(e[0],e[1],c),g=n.i(i._169)(f,n.i(i.B)(c,e[1]));g&&u&&!u.disabled?u.disabled=!0:!g&&u&&u.disabled&&(u.disabled=!1)}if(this.getActiveCell()){var m=this.getOffset(e[2],e[3]);d&&(m.left={idx:0,size:0}),n.i(r._122)(this.parent,this.getActiveCell(),e,"e-active-cell",a)}this.parent.notify(i._55,null)}else n.i(r._122)(this.parent,this.getActiveCell(),e,"e-active-cell",a)},e.prototype.getOffset=function(e,t){var n={left:{idx:0,size:0},top:{idx:0,size:0}};return this.parent.scrollModule&&(t>=this.parent.scrollModule.offset.left.idx&&(n.left=this.parent.scrollModule.offset.left),e>=this.parent.scrollModule.offset.top.idx&&(n.top=this.parent.scrollModule.offset.top)),n},e.prototype.getSelectionElement=function(e,t){var i=this.parent.getActiveSheet();if(e&&e.ctrlKey){if(n.i(r._134)(e)||n.i(r._133)(e)){if(i.frozenColumns||i.frozenRows){var s=this.parent.getMainContent().querySelector(".e-cur-selection");return s||(s=this.parent.element.querySelector(".e-multi-range"))&&s.cloneNode()}return this.parent.getMainContent().querySelector(".e-selection:last-child")}var l=this.parent.getMainContent().getElementsByClassName("e-selection")[0],s=l.cloneNode();return s.classList.add("e-multi-range"),i.frozenColumns||i.frozenRows?(i.selectedRange.includes(" ")||(l.classList.remove("e-hide"),n.i(r._122)(this.parent,l,n.i(o.i)(n.i(o.d)(i.selectedRange)),void 0,!1,!0)),!this.parent.getMainContent().querySelector(".e-multi-range")&&l.classList.contains("e-hide")?l:s):(l.classList.remove("e-hide"),this.parent.getMainContent().appendChild(s))}return t>-1?i.frozenRows||i.frozenColumns?this.parent.element.querySelector(".e-sheet").getElementsByClassName("e-selection")[t]:this.parent.getMainContent().getElementsByClassName("e-selection")[t]:([].slice.call(this.parent.element.getElementsByClassName("e-multi-range")).forEach(function(e){n.i(a.remove)(e)}),this.parent.getMainContent().getElementsByClassName("e-selection")[0])},e.prototype.getActiveCell=function(){return this.parent.getMainContent().getElementsByClassName("e-active-cell")[0]},e.prototype.getSheetElement=function(){return document.getElementById(this.parent.element.id+"_sheet")},e.prototype.highlightHdr=function(e,t,r,i){var l=this;void 0===r&&(r=!0),void 0===i&&(i=!0);var d=this.parent.getActiveSheet();if(d.showHeaders){t||(n.i(a.removeClass)(this.getSheetElement().querySelectorAll(".e-highlight"),"e-highlight"),n.i(a.removeClass)(this.getSheetElement().querySelectorAll(".e-prev-highlight"),"e-prev-highlight"));var c=this.parent.element.getElementsByClassName("e-select-all-cell")[0];c&&n.i(a.removeClass)([c],["e-prev-highlight-right","e-prev-highlight-bottom"]);var h=[],p=[],u=n.i(o.i)(e);this.isRowSelected&&(u[1]=n.i(s._50)(d,u[1],!0,"columns")),this.isColSelected&&(u[0]=n.i(s._50)(d,u[0],!0));var f,g,m=[0,0,0,0],v=[0,0,0,0],y=n.i(o.f)(d.topLeftCell),C=function(e,t,r){var i,a;if(e&&u[f]<e){y[f]=n.i(s._50)(d,y[f],!0,t);var o=n.i(s._50)(d,u[f],!0,t);o===y[f]&&(u[f]=o),a=l.parent.hiddenCount(y[f],u[f]-1,t,d),m[f]=u[f]-a-y[f],i=u[g]<e?u[g]:e-1,m[g]=i-l.parent.hiddenCount(u[f],i,t,d)-a-y[f]+1,i=l.parent.viewport[""+r]+e,u[g]>=i&&(v[f]=0,v[f]-=l.parent.hiddenCount(i,i,t,d),v[g]=u[g]-l.parent.hiddenCount(i,u[g],t,d)-i+1)}else{i=n.i(s._50)(d,l.parent.viewport[""+r]+e,!0,t);var o=n.i(s._50)(d,u[f],!0,t);i===o&&(u[f]=i),a=l.parent.hiddenCount(i,u[f]-1,t,d),v[f]=u[f]-a-i,v[g]=u[g]-l.parent.hiddenCount(u[f],u[g],t,d)-a-i+1}},b=function(e,t,n){for(var r=[].slice.call(t.getElementsByClassName("e-header-cell")),i=e[f];i<e[g];i++)r[i]&&n.push(r[i])};if(r){if(f=0,g=2,C(this.parent.frozenRowCount(d),"rows","topIndex"),d.frozenRows){var x=this.parent.getSelectAllContent().querySelector("tbody");x&&b(m,x,h)}b(v,this.parent.getRowHeaderContent(),h)}if(i){if(f=1,g=3,C(this.parent.frozenColCount(d),"columns","leftIndex"),d.frozenColumns){var S=this.parent.getSelectAllContent().querySelector("thead");S&&b(m,S,p)}b(v,this.parent.getColumnHeaderContent(),p)}d.isProtected&&!d.protectSettings.selectCells?n.i(a.removeClass)([].concat(h,p),"e-highlight"):n.i(a.addClass)([].concat(h,p),"e-highlight"),h.length&&h[0].parentElement.previousElementSibling&&h[0].parentElement.previousElementSibling.classList.add("e-prev-highlight"),p.length&&p[0].previousElementSibling&&p[0].previousElementSibling.classList.add("e-prev-highlight"),this.isRowSelected&&this.isColSelected&&(d.isProtected&&!d.protectSettings.selectCells?document.getElementById(this.parent.element.id+"_select_all").classList.remove("e-highlight"):document.getElementById(this.parent.element.id+"_select_all").classList.add("e-highlight")),c&&(n.i(s._50)(d,u[0],!0)===n.i(s._50)(d,0,!0)&&c.classList.add("e-prev-highlight-bottom"),n.i(s._50)(d,u[1],!0,"columns")===n.i(s._50)(d,0,!0,"columns")&&c.classList.add("e-prev-highlight-right"))}},e.prototype.protectHandler=function(){var e=n.i(o.d)(this.parent.getActiveSheet().selectedRange),t=n.i(o.i)(e),r=n.i(o.f)(this.parent.getActiveSheet().activeCell),i=t[0]<=r[0]&&t[2]>=r[0]&&t[1]<=r[1]&&t[3]>=r[1];this.selectRangeByIdx(e,null,null,i)},e.prototype.initiateFormulaSelection=function(e){this.processFormulaEditRange(e.range,e.formulaSheetIdx)},e.prototype.processFormulaEditRange=function(e,t){var r,a=t,o=0,l={formula:e};this.parent.notify(s._11,l);var d=l.formulaArr,c=d.length,h=0,p=[["e-vborderright","e-vborderbottom"],["e-pborderright","e-pborderbottom"],["e-cborderright","e-cborderbottom"],["e-gborderright","e-gborderbottom"],["e-oborderright","e-oborderbottom"],["e-bborderright","e-bborderbottom"]];this.clearBorder();for(var u=this.parent.getActiveSheet().id-1;o<c&&(r=d[o],!(this.invalidOperators.indexOf(r)>-1));){if(n.i(i._161)(r.toUpperCase())){if(r=r.replace(/\$/g,""),o>0&&d[o-1].indexOf("!")===d[o-1].length-1){var f=d[o-1].split("!");a=n.i(i.e)(this.parent,f[0].substring(1,f[0].length-1))}":"===d[o+1]&&(o++,d[o+1]&&n.i(i._161)(d[o+1].toUpperCase())&&(r=r+":"+d[o+1],o++)),u===a&&this.updateFormulaEditRange(r,h,p),a=t,h++}o++}},e.prototype.updateFormulaEditRange=function(e,t,r){var i=n.i(o.d)(e);this.formulaRange[t]=e,this.dStartCell={rowIndex:i[0],colIndex:i[1]},this.dEndCell={rowIndex:i[2],colIndex:i[3]},this.focusBorder(this.dStartCell,this.dEndCell,r[t%6])},e.prototype.chartBorderHandler=function(e){this.focusBorder(e.startcell,e.endcell,e.classes,!0)},e.prototype.focusBorder=function(e,t,i,s){s=!n.i(a.isNullOrUndefined)(s)&&s;var l=this.parent.getActiveSheet(),d=n.i(o.i)([e.rowIndex,e.colIndex,t.rowIndex,t.colIndex]),c=n.i(o.d)(l.topLeftCell),h=this.parent.hiddenCount(c[1],d[3]-1,"columns",l);if(s&&h>0&&(d[1]-=h,d[3]-=h),l.frozenRows||l.frozenColumns){var p=this.parent.createElement("div",{className:s?"e-range-indicator e-chart-range":"e-range-indicator e-formuala-range"});return p.appendChild(this.parent.createElement("div",{className:"e-top"})),p.appendChild(this.parent.createElement("div",{className:"e-bottom"})),p.appendChild(this.parent.createElement("div",{className:"e-left"})),p.appendChild(this.parent.createElement("div",{className:"e-right"})),void n.i(r._122)(this.parent,p,d,"e-range-indicator")}var u=d[0],f=d[1],g=d[2],m=d[3];u&&this.getEleFromRange([u-1,f,u-1,m]).forEach(function(e){e&&(e.classList.add(i[1]),s||e.classList.add("e-formularef-selection"))}),this.getEleFromRange([u,m,g,m]).forEach(function(e){e&&(e.classList.add(i[0]),s||e.classList.add("e-formularef-selection"))}),this.getEleFromRange([g,f,g,m]).forEach(function(e){e&&(e.classList.add(i[1]),s||e.classList.add("e-formularef-selection"))}),f&&this.getEleFromRange([u,f-1,g,f-1]).forEach(function(e){e&&(e.classList.add(i[0]),s||e.classList.add("e-formularef-selection"))})},e.prototype.getEleFromRange=function(e){var t,n,r,i,a=e[0],o=e[1],s=e[2],l=e[3],d=[],c=[];if(a>s&&(r=a,a=s,s=r),o>l&&(r=o,o=l,l=r),this.parent.scrollSettings.enableVirtualization)for(t=a;t<=s;t++)if((n=t)>-1){var h=this.parent.getRow(n,null);h&&(i=h.getElementsByClassName("e-cell"),d=l===o?[i[l]]:this.getRowCells(i,o,l+1),this.merge(c,d))}return c},e.prototype.getRowCells=function(e,t,n){var r=[];for(t;t<n;t++)e[t]&&r.push(e[t]);return r},e.prototype.merge=function(e,t){e&&t&&Array.prototype.push.apply(e,t)},e.prototype.clearBorder=function(){var e=this.parent.getActiveSheet();if(e.frozenColumns||e.frozenRows){return void[].slice.call(this.parent.element.getElementsByClassName("e-formuala-range")).forEach(function(e){n.i(a.detach)(e)})}for(var t=this.parent.element.getElementsByClassName("e-formularef-selection"),r=t.length-1;r>=0;r--)for(var i=t[r],o=["e-vborderright","e-vborderbottom","e-pborderright","e-pborderbottom","e-cborderright","e-cborderbottom","e-gborderright","e-gborderbottom","e-oborderright","e-oborderbottom","e-bborderright","e-bborderbottom","e-formularef-selection"],s=0;s<o.length;s++)i.classList.remove(o[s])},e.prototype.getModuleName=function(){return"selection"},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(1),i=n(0),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.hideShow=function(e){var t=this,o=n.i(a.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,s=n.i(i.l)(this.parent,o);if(e.startIndex>e.endIndex){var l=e.startIndex;e.startIndex=e.endIndex,e.endIndex=l}var d;if(e.actionUpdate){if(e.sheetIndex=o,d={eventArgs:e,action:"hideShow"},this.parent.notify(i._34,d),e.cancel)return;delete e.cancel}var c=function(n){e.isCol?(t.hideCol(e),n&&t.parent.sheetModule.colWidthChanged({colIdx:e.startIndex,isHideShow:!0})):(t.hideRow(e),n&&t.parent.sheetModule.rowHeightChanged({rowIdx:e.startIndex,isHideShow:!0}))},h=e.isCol?this.parent.frozenColCount(s):this.parent.frozenRowCount(s);if(h&&e.startIndex<h){var p=void 0;if(e.freezePane=!0,e.endIndex>=h&&(p=e.endIndex,e.endIndex=h-1),c(!0),delete e.freezePane,void 0!==p){var u=e.startIndex;e.endIndex=p,e.startIndex=h,c(),e.startIndex=u}}else c();e.actionUpdate&&(this.updateIndexOnlyForHiddenColumnsAndRows(e,s),this.parent.notify(r._31,d),n.i(r._159)(this.parent.element))},e.prototype.updateIndexOnlyForHiddenColumnsAndRows=function(e,t){for(var r,a=e.startIndex,o=e.endIndex,s=e.startIndex;s<=o;s++)if(r=e.isCol?n.i(i.B)(t,s):n.i(i.t)(t,s)||{},!1===r.hidden){e.startIndex=s;break}for(var l=e.endIndex;l>=a;l--)if(r=e.isCol?n.i(i.B)(t,l):n.i(i.t)(t,l)||{},!1===r.hidden){e.endIndex=l;break}},e.prototype.hideRow=function(e){var t,o,s,l,d,c,h=this,p=n.i(a.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,u=n.i(i.l)(this.parent,p),f=0,g=Object.assign({},e),m=this.parent.scrollSettings.isFinite&&!g.freezePane;if(m){if(g.startIndex>=u.rowCount)return;g.endIndex>=u.rowCount&&(g.endIndex=u.rowCount-1),c=0}var v=this.parent.frozenRowCount(u);if(g.hide){for(var y,C=void 0,b=void 0,x=[],S=[],w=m&&g.endIndex===n.i(i._172)(u,u.rowCount-1,!1),_=g.startIndex;_<=g.endIndex;_++)if(n.i(i.v)(u,_))g.isFiltering&&!n.i(i.w)(u,_)&&n.i(i.u)(u,_,{isFiltered:!0});else if(void 0===o&&(g.freezePane?(y=this.parent.sheetModule.getSelectAllTable(),C=this.parent.getColHeaderTable()):(y=this.parent.getRowHeaderTable(),C=this.parent.getContentTable()),o=this.parent.getViewportIndex(_),f=0),d={hidden:!0},g.isFiltering&&(d.isFiltered=!0),g.isFiltering||(x=n.i(r._169)(this.parent)),n.i(i.u)(u,_,d),g.isFiltering||(S=n.i(r._169)(this.parent)),p===this.parent.activeSheetIndex)if(m&&(c+=n.i(i.x)(u,_,!0,!0)),this.refreshChart(_,"rows"),g.isFiltering||this.refreshChartCellModel(x,S),b=C&&C.rows[o]){if(!l)for(var I=0;I<=u.usedRange.colIndex;I++)if(t=n.i(i.I)(_,I,u)||{},(t.colSpan||t.rowSpan)&&(g.startIndex>=this.parent.viewport.topIndex||this.parent.scrollSettings.enableVirtualization)){l=!0;break}if(l)continue;if(y.rows[o]&&n.i(a.detach)(y.rows[o]),n.i(a.detach)(b),f++,(b=C.rows[o])&&_===g.endIndex){var E=void 0;s=n.i(i._172)(u,_+1,!0);for(var R=s!==n.i(i._172)(u,0,!0)&&s===(this.parent.viewport.topIndex>=g.startIndex?g.endIndex+1:this.parent.viewport.topIndex)?"Row":"",I=this.parent.viewport.leftIndex;I<=this.parent.viewport.rightIndex;I++){var k=this.parent.getCellStyleValue(["borderTop"],[s,I]).borderTop;""!==k&&(E=b.cells[I],this.parent.notify(i._46,{onActionUpdate:!1,rowIdx:s,colIdx:I,style:{borderTop:k},row:b,pRow:b.previousElementSibling,first:R,td:E}))}}}else _<=this.parent.viewport.bottomIndex?f++:f--;if(g.refreshUI)return;if(l&&(g.startIndex>=this.parent.viewport.topIndex||!this.parent.scrollSettings.enableVirtualization))return void(g.isFiltering?e.refreshUI=!0:(this.parent.selectRange(u.selectedRange),u.frozenRows||u.frozenColumns?(this.parent.renderModule.refreshSheet(!1,!1,!0),e.refreshUI=!0):this.parent.renderModule.refreshUI({rowIndex:this.parent.viewport.topIndex,colIndex:this.parent.viewport.leftIndex,refresh:"Row"})));if(!f)return;this.parent.selectRange(u.selectedRange);var A=function(){if(u.showHeaders){var e=g.freezePane?1:0;o===e?y.rows[e]&&y.rows[e].classList.add("e-hide-end"):(y&&y.rows[o-1]&&y.rows[o-1].classList.add("e-hide-start"),y&&y.rows[o]&&y.rows[o].classList.add("e-hide-end"))}};if(!g.freezePane&&this.parent.scrollSettings.enableVirtualization){var F=g.startIndex,N=g.startIndex;if(g.startIndex<n.i(i.U)(u.paneTopLeftCell)[0]||f>this.parent.viewport.rowCount){if(g.isFiltering)return void(e.refreshUI=!0);this.parent.updateTopLeftCell(n.i(i._172)(u,g.startIndex-1<v?v:g.startIndex-1,!0)-v,null,"col"),this.parent.renderModule.refreshSheet(!1,!1,!0)}else{F=this.parent.viewport.bottomIndex+1,N=F+f-1;var T=this.parent.skipHidden(F,N,"rows",!1);if(F=T[0],N=T[1],m){if(F>=u.rowCount)return void(this.parent.viewport.topIndex+v===n.i(i._172)(u,v,!0)?(A(),this.parent.notify(r._108,{isHide:!0,height:c}),w&&(this.parent.viewport.bottomIndex=n.i(i._172)(u,u.rowCount-1,!1))):this.parent.renderModule.refreshSheet(!1,!1,!0));if(N>=u.rowCount)return void this.parent.renderModule.refreshSheet(!1,!1,!0);this.parent.notify(r._108,{isHide:!0,height:c})}this.parent.viewport.bottomIndex=N;var O=void 0,D=this.parent.frozenColCount(u),L=[];D?(L.push(v),L.push(this.parent.viewport.leftIndex+D),O=n.i(i.U)(u.topLeftCell)[1]):O=this.parent.viewport.leftIndex,this.parent.renderModule.refreshUI({colIndex:O,rowIndex:F,direction:"",refresh:"RowPart",frozenIndexes:L},n.i(i.W)(F,O)+":"+n.i(i.W)(N,this.parent.viewport.rightIndex))}}A()}else{var P=void 0,M=void 0,B=void 0,b=void 0,H=void 0,U=void 0,C=void 0,V=void 0,j=void 0,z=g.startIndex-1,q=[],W=g.freezePane,G="lastElementChild",Y=0;if(m){var X=n.i(i._172)(u,u.rowCount-1,!1);if(this.parent.viewport.bottomIndex===X)if(this.parent.viewport.topIndex+v===n.i(i._172)(u,v,!0))W=!0;else{var K=n.i(i.T)(u.paneTopLeftCell)[0],$=u.rowCount-1-K+1-this.parent.hiddenCount(K,u.rowCount-1);$<this.parent.viewport.rowCount+Math.round(this.parent.getThreshold("row")/2)&&(G="firstElementChild")}}for(var x=n.i(r._169)(this.parent),_=g.startIndex,Z=g.endIndex;_<=Z;_++)if(n.i(i.v)(u,_))if(void 0===H){if(d={hidden:!1},g.isFiltering&&(d.isFiltered=!1),!W&&_>this.parent.viewport.bottomIndex){if(n.i(i.u)(u,_,d),void 0===j)return}else if(void 0===j&&(j=_),n.i(i.u)(u,_,d),p===this.parent.activeSheetIndex){m&&(c+=n.i(i.x)(u,_,!0,!0)),this.refreshChart(_,"rows"),void 0===o&&(P=document.createDocumentFragment(),M=document.createDocumentFragment(),U=this.parent.serviceLocator.getService("row"),g.freezePane?(V=this.parent.sheetModule.getSelectAllTable(),C=this.parent.getColHeaderTable()):(V=this.parent.getRowHeaderTable(),C=this.parent.getContentTable(),_<this.parent.viewport.topIndex+v&&(this.parent.viewport.topIndex=_-v)),o=this.parent.getViewportIndex(_)),z++,B=U.refresh(_,null,null,!0,!0),P.appendChild(B),V&&V.rows.length&&!W&&n.i(a.detach)(V.tBodies[0][""+G]),b=M.appendChild(U.refresh(_,b,B)),C&&C.rows.length&&!W&&(n.i(a.detach)(C.tBodies[0][""+G]),"firstElementChild"===G&&(void 0!==o&&o-1>-1&&(o-=1),Y+=n.i(i.x)(u,this.parent.viewport.topIndex,!0),this.parent.viewport.topIndex=n.i(i._172)(u,this.parent.viewport.topIndex+1,!0)));for(var I=this.parent.viewport.leftIndex;I<=this.parent.viewport.rightIndex;I++)if(t=n.i(i.I)(_,I,u)||{},void 0!==t.rowSpan||void 0!==t.colSpan){var J={range:[_,I,_,I],isAction:!1,merge:!0,type:"All",skipChecking:!0};this.parent.notify(i._116,J),q.length&&J.range[1]===q[q.length-1].range[1]&&J.range[0]===q[q.length-1].range[0]||q.push(J)}}}else Z=_;else{if(g.startIndex===g.endIndex)return;void 0===o?z++:H=_}var S=n.i(r._169)(this.parent);if(this.refreshChartCellModel(x,S),void 0===o)return;if(!g.freezePane){if(g.isFiltering&&g.startIndex<n.i(i.U)(u.paneTopLeftCell)[0]&&(e.refreshUI=!0,void 0===H||H===g.endIndex))return;this.parent.viewport.bottomIndex=this.parent.viewport.topIndex+v+this.parent.viewport.rowCount+2*this.parent.getThreshold("row"),f=this.parent.hiddenCount(this.parent.viewport.topIndex+v,g.startIndex)+this.parent.hiddenCount(g.endIndex+1,this.parent.viewport.bottomIndex),this.parent.viewport.bottomIndex+=f,m&&this.parent.viewport.bottomIndex>=u.rowCount&&(this.parent.viewport.bottomIndex=n.i(i._172)(u,u.rowCount-1,!1))}if(g.insertIdx=e.insertIdx=o,g.row=e.row=M.querySelector(".e-row"),g.mergeCollection=e.mergeCollection=q,u.showHeaders&&(e.hdrRow=g.hdrRow=P.querySelector(".e-row"),0!==o&&!n.i(i.v)(u,z-1)&&V.rows[o-1]&&V.rows[o-1].classList.remove("e-hide-start"),0!==g.startIndex&&n.i(i.v)(u,g.startIndex-1)&&g.hdrRow.classList.add("e-hide-end"),n.i(i.v)(u,z+1)?P.lastElementChild.classList.add("e-hide-start"):V.rows[o]&&V.rows[o].classList.remove("e-hide-end")),b&&C&&C.rows[o]){s=n.i(i._172)(u,z+1,!0);for(var _=this.parent.viewport.leftIndex;_<=this.parent.viewport.rightIndex;_++){var k=this.parent.getCellStyleValue(["borderTop"],[s,_]).borderTop;if(""!==k){this.parent.notify(i._46,{onActionUpdate:!1,rowIdx:s,colIdx:_,style:{borderTop:k},pRow:b,td:C.rows[o].cells[_],first:""});var Q=n.i(i._172)(u,j-1,!1);Q>-1?!C.rows[o-1]||this.parent.getCellStyleValue(["borderBottom"],[Q,_]).borderBottom||this.parent.getCellStyleValue(["borderTop"],[j,_]).borderTop||(C.rows[o-1].cells[_].style.borderBottom=""):C.rows[o].cells[_].style.borderTop=""}}}if(g.skipAppend)return;m&&this.parent.notify(r._108,{height:c,size:Y}),Math.abs(z-j)>this.parent.viewport.rowCount+2*this.parent.getThreshold("row")?this.parent.renderModule.refreshSheet(!1,!1,!0):(V&&(V.tBodies[0].rows.length?V.tBodies[0].insertBefore(P,V.rows[o]):V.tBodies[0].appendChild(P)),C&&C.tBodies[0]&&(C.tBodies[0].rows.length?C.tBodies[0].insertBefore(M,C.rows[o]):C.tBodies[0].appendChild(M)),this.parent.selectRange(u.selectedRange),g.autoFit&&u.showHeaders&&this.parent.notify(r._9,{startIndex:g.startIndex,endIndex:g.endIndex,isRow:!0}),q.forEach(function(e){h.parent.notify(i._113,e)}),void 0!==H&&H!==g.endIndex&&(g.startIndex=H,this.hideRow(g)))}},e.prototype.hideCol=function(e){for(var t,o=this,s=n.i(a.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,l=n.i(i.l)(this.parent,s),d=[],c=[],h=n.i(i.U)(l.paneTopLeftCell),p=this.parent.frozenColCount(l),u=this.parent.frozenRowCount(l),f=this.parent.viewport.leftIndex+p,g=e.startIndex;g<=e.endIndex;g++)if(e.hide?!n.i(i.F)(l,g):n.i(i.F)(l,g)){var m=n.i(r._169)(this.parent);n.i(i.C)(l,g,{hidden:e.hide});var v=n.i(r._169)(this.parent);this.refreshChart(g,"columns"),this.refreshChartCellModel(m,v),this.parent.scrollSettings.enableVirtualization&&!e.freezePane&&(g<f||g>this.parent.viewport.rightIndex)?g<f&&c.push(g):(d.push(g),e.hide&&g<=h[1]&&(t=!0))}if((c.length||d.length)&&s===this.parent.activeSheetIndex){var y,C,b=n.i(i.U)(l.topLeftCell),x=function(){var t;return t=o.parent.scrollSettings.enableVirtualization?[u?b[0]:o.parent.viewport.topIndex,o.parent.viewport.bottomIndex]:[0,l.rowCount-1],e.freezePane?(y=o.parent.getRowHeaderTable(),C=o.parent.sheetModule.getSelectAllTable()):(y=o.parent.getContentTable(),C=o.parent.getColHeaderTable()),t};if(e.hide){if(!d.length)return;if((d.length<=this.parent.getThreshold("col")||!this.parent.scrollSettings.enableVirtualization||e.freezePane)&&this.removeCell(l,d,x(),y,C),!e.freezePane&&this.parent.scrollSettings.enableVirtualization){if(t)return this.parent.updateTopLeftCell(null,n.i(i._172)(l,d[0]-1<p?p:d[0]-1,!0,"columns")-p,"row"),void this.parent.renderModule.refreshSheet(!1,!1,!0);var S=[],w=this.parent.viewport.topIndex,_=u?b[0]:w;if(u&&(S=[u+w,p]),this.parent.scrollSettings.isFinite){var I=n.i(i._172)(l,l.colCount-1,!1,"columns"),E=this.parent.viewport.leftIndex+p,R=this.parent.viewport.rightIndex;if(R+d.length>=I){var k=n.i(i._172)(l,E-(R+d.length-I),!1,"columns");return k>=p&&(this.parent.viewport.leftIndex=k,this.parent.viewport.leftIndex-=this.parent.hiddenCount(R,I)),this.parent.viewport.rightIndex=I,E!==this.parent.viewport.leftIndex+p||R!==this.parent.viewport.rightIndex?(this.parent.renderModule.refreshUI({colIndex:this.parent.viewport.leftIndex,refresh:"Column",frozenIndexes:S,rowIndex:_,skipUpdateOnFirst:this.parent.viewport.leftIndex+p===n.i(i._172)(l,p,!0,"columns")}),u&&(this.parent.viewport.topIndex=w)):this.parent.notify(r._81,{refresh:"Column",isUpdate:!0}),void this.parent.selectRange(l.selectedRange)}}if(d.length<=this.parent.getThreshold("col")){var A=this.parent.skipHidden(this.parent.viewport.rightIndex+1,this.parent.viewport.rightIndex+d.length,"columns");this.parent.viewport.rightIndex=A[1],this.parent.renderModule.refreshUI({rowIndex:_,colIndex:A[0],direction:"",refresh:"ColumnPart",frozenIndexes:S},""+n.i(i.X)([_,A[0],this.parent.viewport.bottomIndex,A[1]]))}else this.parent.renderModule.refreshUI({skipUpdateOnFirst:this.parent.viewport.leftIndex+p===n.i(i._172)(l,p,!0,"columns"),rowIndex:_,colIndex:this.parent.viewport.leftIndex,refresh:"Column",frozenIndexes:S}),u&&(this.parent.viewport.topIndex=w)}this.parent.selectRange(l.selectedRange)}else{if(c.length&&this.parent.scrollSettings.enableVirtualization){c.sort(function(e,t){return e-t});var F=c[0]-1<p?p:c[0]-1;return this.parent.updateTopLeftCell(null,n.i(i._172)(l,F,!0,"columns")-p,"row"),this.parent.renderModule.refreshSheet(!1,!1,!0),void(e.autoFit&&(e.autoFit=!1))}if(d.length<=this.parent.getThreshold("col")||!this.parent.scrollSettings.enableVirtualization||e.freezePane)this.appendCell(l,d,x(),y,C,e.freezePane),this.parent.scrollSettings.enableVirtualization&&!e.freezePane&&this.parent.notify(r.v,{refresh:"Column",prevRowColCnt:{rowCount:l.rowCount,colCount:l.colCount}});else{var w=this.parent.viewport.topIndex,_=u?b[0]:w;this.parent.renderModule.refreshUI({skipUpdateOnFirst:this.parent.viewport.leftIndex+p===n.i(i._172)(l,p,!0,"columns"),rowIndex:_,colIndex:this.parent.viewport.leftIndex,refresh:"Column",frozenIndexes:u?[u+w,p]:[]}),u&&(this.parent.viewport.topIndex=w),e.autoFit&&(e.autoFit=!1)}this.parent.selectRange(l.selectedRange)}}},e.prototype.removeCell=function(e,t,o,s,l){var d,c,h,p,u,f=this,g=o[0],m=o[1],v=0,y=t.length-1,C=this.parent.frozenRowCount(e),b=s.getElementsByTagName("colgroup")[0],x=this.parent.getViewportIndex(t[0],!0)+1,S=n.i(i._172)(e,C-1,!1);for(e.showHeaders&&(h=l.getElementsByTagName("colgroup")[0],d=l.rows[0]);g<=m;)n.i(i.v)(e,g)?g++:(c=C&&g<C?l.rows[v+1]:s.rows[v],t.forEach(function(o,s){if(0===v&&g>=C&&(e.showHeaders&&(n.i(a.detach)(h.children[x]),n.i(a.detach)(d.cells[x])),n.i(a.detach)(b.children[x])),n.i(a.detach)(c.cells[x]),0===s&&(p=n.i(i.I)(g,o,e,!1,!0),(void 0!==p.colSpan&&(void 0===p.rowSpan||p.colSpan>1)||p.rowSpan<0&&g-1>-1&&n.i(i.v)(e,g-1)&&Math.abs(p.rowSpan)===f.parent.hiddenCount(g+p.rowSpan,g,"rows",e))&&f.parent.notify(r._54,{rowIdx:g,colIdx:o,model:"col",start:t[0],end:t[y]})),s===y){u=n.i(i._172)(e,o+1,!0,"columns");var l=f.parent.getCellStyleValue(["borderLeft"],[v,u]).borderLeft;""!==l&&f.parent.notify(i._46,{onActionUpdate:!1,rowIdx:v,colIdx:u,style:{borderLeft:l},row:c,first:""}),p=n.i(i.I)(g,o,e)||{},(void 0!==p.colSpan&&(void 0===p.rowSpan||p.colSpan>1)||p.rowSpan<0&&g-1>-1&&n.i(i.v)(e,g-1)&&Math.abs(p.rowSpan)===f.parent.hiddenCount(g+p.rowSpan,g,"rows",e))&&f.parent.notify(r._54,{rowIdx:g,colIdx:o,model:"col",start:t[0],end:t[y],isEnd:!0})}}),C&&g===S?(v=0,g=this.parent.viewport.topIndex+C):(v++,g++));x-1>-1&&e.showHeaders&&d.cells[x-1]&&d.cells[x-1].classList.add("e-hide-start"),e.showHeaders&&d.cells[x]&&d.cells[x].classList.add("e-hide-end")},e.prototype.appendCell=function(e,t,r,o,s,l){var d,c,h,p,u=this,f=r[0],g=r[1],m=0,v=t.length-1,y=this.parent.frozenRowCount(e),C=o.getElementsByTagName("colgroup")[0];e.showHeaders&&(h=s.getElementsByTagName("colgroup")[0],d=s.rows[0]);var b=this.parent.serviceLocator.getService("cell");t.sort(function(e,t){return e-t});for(var x,S,w,_,I=[],E=[],R=n.i(i._172)(e,y-1,!1);f<=g;)n.i(i.v)(e,f)?f++:(c=y&&f<y?s.rows[m+1]:o.rows[m],t.forEach(function(r,o){if(0===m&&(E[o]=u.parent.getViewportIndex(r,!0),e.showHeaders&&(S=d.cells[E[o]])&&(0===o&&t[o]&&!n.i(i.F)(e,t[o]-1)&&S.previousSibling&&S.previousElementSibling.classList.remove("e-hide-start"),o===v&&S.classList.remove("e-hide-end")),f>=y&&(C.children[E[o]]?(C.insertBefore(u.parent.sheetModule.updateCol(e,r),C.children[E[o]]),e.showHeaders&&b.renderColHeader(r,d,S)):(C.appendChild(u.parent.sheetModule.updateCol(e,r)),e.showHeaders&&b.renderColHeader(r,d)),l||(n.i(a.detach)(C.lastChild),e.showHeaders&&n.i(a.detach)(d.lastChild)),e.showHeaders&&o===v&&(n.i(a.detach)(h),s.insertBefore(C.cloneNode(!0),s.tHead)))),l||n.i(a.detach)(c.lastChild),S=c.cells[E[o]],_={rowIdx:f,colIdx:r,cell:n.i(i.I)(f,r,e),row:c,address:n.i(i.W)(f,r),lastCell:r===v,isHeightCheckNeeded:!0,first:r!==n.i(i._172)(e,0,!0,"columns")&&r===u.parent.viewport.leftIndex?"Column":"",checkNextBorder:o===v?"Column":"",checkCF:!0},S&&(_.refChild=S),x=b.render(_),0===o&&x.previousSibling){""!==u.parent.getCellStyleValue(["borderLeft"],[m,n.i(i._172)(e,t[t.length-1]+1,!0,"columns")]).borderLeft&&(p=n.i(i._172)(e,t[0]-1,!1,"columns"))>-1&&!u.parent.getCellStyleValue(["borderRight"],[m,p]).borderRight&&!u.parent.getCellStyleValue(["borderLeft"],[m,t[0]]).borderLeft&&(x.previousSibling.style.borderRight="")}if(w=n.i(i.I)(f,r,e)||{},void 0!==w.colSpan&&(void 0===w.rowSpan||w.colSpan>1)||w.rowSpan<0&&f-1>-1&&n.i(i.v)(e,f-1)&&Math.abs(w.rowSpan)===u.parent.hiddenCount(f+w.rowSpan,f,"rows",e)){var g={range:[f,r,f,r],isAction:!1,merge:!0,type:"All",skipChecking:!0};u.parent.notify(i._116,g),I.length&&g.range[1]===I[I.length-1].range[1]&&g.range[0]===I[I.length-1].range[0]||I.push(g)}}),y&&f===R?(f=this.parent.viewport.topIndex+y,m=0):(f++,m++));I.forEach(function(e){u.parent.notify(i._113,e)}),this.parent.viewport.rightIndex=n.i(i._172)(e,this.parent.viewport.rightIndex-t.length,!1,"columns")},e.prototype.refreshChart=function(e,t){this.parent.notify(i._128,{rIdx:e,showHide:t})},e.prototype.refreshChartCellModel=function(e,t){this.parent.notify(r._79,{prevChartIndexes:e,currentChartIndexes:t})},e.prototype.addEventListener=function(){this.parent.on(i._118,this.hideShow,this),this.parent.on(r.i,this.destroy,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.off(i._118,this.hideShow),this.parent.off(r.i,this.destroy)},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(5),i=n(1),a=n(0),o=n(3),s=(n.n(o),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},s.apply(this,arguments)}),l=function(){function e(e){this.undoCollection=[],this.redoCollection=[],this.isUndo=!1,this.undoRedoStep=100,this.parent=e,this.addEventListener()}return e.prototype.setActionData=function(e){var t,r=this.parent.getActiveSheet(),i=[],o=[],s=e.args,l=s.eventArgs,d={};switch(s.action){case"format":t=n.i(a.T)(s.eventArgs.range);break;case"clipboard":d=l.copiedInfo,t=n.i(a.T)(n.i(a._0)(l.pastedRange)),d&&d.isCut&&(o=this.getCellDetails(d.range,n.i(a.l)(this.parent,n.i(a.f)(this.parent,d.sId)),"clipboard"));break;case"beforeSort":t=n.i(a.T)(s.eventArgs.range),t[0]===t[2]&&t[2]-t[0]==0&&(t[0]=0,t[1]=0,t[2]=r.usedRange.rowIndex,t[3]=r.usedRange.colIndex);break;case"beforeCellSave":case"cellDelete":case"cellSave":t=n.i(a.T)(l.address);break;case"beforeWrap":case"beforeReplace":case"chartDesign":t=this.parent.getAddressInfo(l.address).indices;break;case"beforeClear":case"beforeInsertImage":t=n.i(a.T)(l.range);break;case"deleteImage":t=n.i(a.T)(l.address);break;case"beforeInsertChart":case"filter":t=n.i(a.T)(l.range);break;case"autofill":t=n.i(a.T)(l.fillRange);break;case"removeValidation":if(l.isColSelected){this.beforeActionData={cellDetails:[]};for(var c=l.range.split("!")[1].split(":"),h=n.i(a.V)(c[0]),p=n.i(a.V)(c[1]);h<=p;h++)r.columns[h]&&r.columns[h].validation&&this.beforeActionData.cellDetails.push({colIndex:h,validation:r.columns[h].validation})}else t=n.i(a.T)(l.range);break;case"hyperlink":case"removeHyperlink":t=n.i(a.T)(l.address)}"beforeSort"===s.action?(this.beforeActionData={cellDetails:l.cellDetails},this.beforeActionData.sortedCellDetails=l.sortedCellDetails):t&&(i=this.getCellDetails(t,r,s.action),this.beforeActionData={cellDetails:i,cutCellDetails:o})},e.prototype.getBeforeActionData=function(e){e.beforeDetails=this.beforeActionData},e.prototype.performUndoRedo=function(e){var t;e.isFromUpdateAction?t=e:(t=e.isUndo?this.undoCollection.pop():this.redoCollection.pop(),e.setCollection&&(e.undoArgs=t)),this.isUndo=e.isUndo;var l;if(t){var d=void 0,c={};if(!e.isPublic){var h=t.eventArgs.beforeActionData;if(delete t.eventArgs.beforeActionData,d={action:t.action,eventArgs:{}},n.i(o.extend)(d.eventArgs,t.eventArgs,null,!0),t.eventArgs.beforeActionData=h,d.eventArgs.cancel=!1,t.preventAction=d.preventAction=!0,e.isUndo?d.isUndo=!0:d.isRedo=!0,e.isFromUpdateAction||this.parent.notify(a._34,d),d.eventArgs.cancel)return void this.updateUndoRedoIcons();delete d.eventArgs.cancel}switch(t.action){case"cellSave":case"format":case"wrap":case"cellDelete":case"autofill":case"removeValidation":case"hyperlink":case"removeHyperlink":t=this.performOperation(t,e.preventEvt,e.preventReSelect,e.isPublic);break;case"sorting":this.undoForSorting(t,e.isUndo);break;case"clipboard":t=this.undoForClipboard(t,e.isUndo,d),l=!0;break;case"resize":case"resizeToFit":t=this.undoForResize(t);break;case"hideShow":n.i(i._147)(t,this.parent,!e.isUndo);break;case"replace":t=this.performOperation(t);break;case"replaceAll":t.eventArgs.isAction=!1,e.isUndo&&(c.value=t.eventArgs.replaceValue,c.replaceValue=t.eventArgs.value,c.skipFormatCheck=n.i(i._163)(this.parent)),this.parent.notify(a._98,s({},t.eventArgs,c));break;case"insert":case"filter":n.i(i._147)(t,this.parent,!e.isUndo,null,d),l="filter"===t.action;break;case"delete":n.i(i._147)(t,this.parent,!e.isUndo);break;case"validation":case"addHighlight":case"removeHighlight":n.i(i._147)(t,this.parent,!e.isUndo);break;case"merge":t.eventArgs.merge=t.isFromUpdateAction?t.eventArgs.merge:!t.eventArgs.merge,n.i(i._147)(t,this.parent,!1);break;case"clear":t=this.performOperation(t),e.isUndo&&t.eventArgs.cfClearActionArgs&&n.i(i._147)({action:"clearCF",eventArgs:t.eventArgs.cfClearActionArgs},this.parent,!e.isUndo);break;case"conditionalFormat":n.i(i._147)(t,this.parent,!e.isUndo,this.undoCollection);break;case"clearCF":n.i(i._147)(t,this.parent,!e.isUndo);break;case"insertImage":case"deleteImage":case"imageRefresh":n.i(i._147)(t,this.parent,!e.isUndo);break;case"insertChart":case"deleteChart":case"chartRefresh":n.i(i._147)(t,this.parent,!e.isUndo);break;case"chartDesign":t.eventArgs.isUndo=e.isUndo,this.parent.notify(r._90,t.eventArgs);break;case"addDefinedName":n.i(i._147)(t,this.parent,!e.isUndo)}e.isFromUpdateAction||(e.isUndo?this.redoCollection.push(t):this.undoCollection.push(t),this.undoCollection.length>this.undoRedoStep&&this.undoCollection.splice(0,1),this.redoCollection.length>this.undoRedoStep&&this.redoCollection.splice(0,1),this.updateUndoRedoIcons(),e.isPublic||l||this.parent.notify(i._31,n.i(o.extend)({isUndoRedo:!0,isUndo:e.isUndo},t))),this.parent.notify(a._127,null)}},e.prototype.undoForSorting=function(e,t){var r=this,s=n.i(a._3)(this.parent,e.eventArgs.range),l=n.i(a.T)(e.eventArgs.range),d=function(e,t){if(s===r.parent.activeSheetIndex){var i=r.parent.getCell(l[0]-1,r.parent.sortCollection[e].columnIndex);i&&(i=n.i(o.select)(".e-filter-icon",i))&&(t?i.classList.add("e-sort"+("Ascending"===r.parent.sortCollection[e].order?"asc":"desc")+"-filter"):i.classList.remove("e-sort"+("Ascending"===r.parent.sortCollection[e].order?"asc":"desc")+"-filter"))}};if(t){if(this.parent.notify(a._69,{result:e.eventArgs.beforeActionData.cellDetails,range:l,sheet:n.i(a.l)(this.parent,s),jsonData:e.eventArgs.beforeActionData.sortedCellDetails,isUndo:!0}),this.parent.notify(a._70,{range:e.eventArgs.range}),this.parent.sortCollection&&e.eventArgs.previousSort)for(var c=this.parent.sortCollection.length-1;c>=0;c--)if(this.parent.sortCollection[c].sheetIndex===s){d(c,!1),this.parent.sortCollection.splice(c,1);var h=e.eventArgs.previousSort;if(Array.isArray(h))for(var p=0;p<h.length;p++)this.parent.sortCollection.splice(p,0,h[p]),d(p,!0);this.parent.sortCollection.length||(this.parent.sortCollection=void 0);break}}else if(n.i(i._147)(e,this.parent,!0),e.eventArgs.previousSort){var u=0;if(this.parent.sortCollection)for(var c=this.parent.sortCollection.length-1;c>=0;c--)this.parent.sortCollection[c].sheetIndex===s&&(d(c,!1),u=c,this.parent.sortCollection.splice(c,1));else this.parent.sortCollection=[];this.parent.sortCollection.splice(u,0,{sortRange:e.eventArgs.range.split("!")[1],sheetIndex:s,columnIndex:n.i(a.V)(e.eventArgs.sortOptions.sortDescriptors.field),order:e.eventArgs.sortOptions.sortDescriptors.order}),d(u,!0)}},e.prototype.updateUndoRedoCollection=function(e){var t=["clipboard","format","sorting","cellSave","resize","resizeToFit","wrap","hideShow","replace","validation","merge","clear","conditionalFormat","clearCF","insertImage","imageRefresh","insertChart","deleteChart","chartRefresh","filter","cellDelete","autofill","addDefinedName","removeValidation","removeHighlight","addHighlight","hyperlink","removeHyperlink","deleteImage","chartDesign","replaceAll"];"insert"!==e.args.action&&"delete"!==e.args.action||"Sheet"===e.args.eventArgs.modelType||t.push(e.args.action);var r=e.args.action;if(-1!==t.indexOf(r)||e.isPublic){var o=e.args.eventArgs;if("clipboard"===r||"sorting"===r||"format"===r||"cellSave"===r||"wrap"===r||"replace"===r||"validation"===r||"clear"===r||"conditionalFormat"===r||"clearCF"===r||"insertImage"===r||"imageRefresh"===r||"insertChart"===r||"chartRefresh"===r||"filter"===r||"cellDelete"===r||"autofill"===r||"removeValidation"===r||"addDefinedName"===r||"hyperlink"===r||"removeHyperlink"===r||"deleteImage"===r||"chartDesign"===r){var s={beforeDetails:{cellDetails:[]}};this.parent.notify(i._21,s),o.beforeActionData=s.beforeDetails}if("clipboard"===r&&o.copiedInfo&&o.copiedInfo.isExternal){var l=this.parent.getAddressInfo(o.pastedRange);o.copiedInfo.cellDetails=this.getCellDetails(l.indices,n.i(a.l)(this.parent,l.sheetIndex),r)}this.undoCollection.push(e.args),this.redoCollection=[],this.undoCollection.length>this.undoRedoStep&&this.undoCollection.splice(0,1),this.updateUndoRedoIcons()}},e.prototype.clearUndoRedoCollection=function(){this.undoCollection=[],this.redoCollection=[],this.updateUndoRedoIcons()},e.prototype.updateUndoRedoIcons=function(){var e=this.parent.serviceLocator.getService(r._174);this.parent.notify(i.F,[{tab:e.getConstant("Home"),items:[this.parent.element.id+"_undo"],enable:this.undoCollection.length>0}]),this.parent.notify(i.F,[{tab:e.getConstant("Home"),items:[this.parent.element.id+"_redo"],enable:this.redoCollection.length>0}])},e.prototype.undoForClipboard=function(e,t,o){var s,l=this,d=e.eventArgs,c=d.pastedRange.split("!"),h=n.i(a.T)(c[1]),p=n.i(a.e)(this.parent,c[0]),u=n.i(a.l)(this.parent,p),f=d.copiedInfo,g=d.beforeActionData,m=e.isFromUpdateAction,v=p===this.parent.activeSheetIndex;if(o&&(o.isUndoRedo=!0,o.eventArgs.beforeActionData=g),"imagePaste"===e.eventArgs.requestType){var y=d.copiedShapeInfo;t?(s=y.pictureElem,y.isCut?(this.parent.notify(r._76,{id:s.id,sheetIdx:d.pasteSheetIndex+1}),this.parent.notify(r._75,{options:{src:s.style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2"),height:y.height,width:y.width,imageId:s.id},range:y.copiedRange,isPublic:!1,isUndoRedo:!0})):this.parent.notify(r._76,{id:d.pastedPictureElement.id,sheetIdx:d.pasteSheetIndex+1})):y.isCut?(s=y.pictureElem,this.parent.notify(r._76,{id:s.id,sheetIdx:y.sId}),this.parent.notify(r._75,{options:{src:s.style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2"),height:y.height,width:y.width,imageId:s.id},range:y.pastedRange,isPublic:!1,isUndoRedo:!0})):(s=d.pastedPictureElement,this.parent.notify(r._75,{options:{src:s.style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/gi,"$2"),height:s.offsetHeight,width:s.offsetWidth,imageId:s.id},range:y.pastedRange,isPublic:!1,isUndoRedo:!0}))}else{if(t){if(f.isCut){var C=g.cutCellDetails;this.updateCellDetails(C,n.i(a.l)(this.parent,n.i(a.f)(this.parent,f.sId)),n.i(a._4)(f.range),v,e),d.cfClearActionArgs&&n.i(i._147)({action:"clearCF",eventArgs:d.cfClearActionArgs},this.parent,!1)}g&&this.updateCellDetails(g.cellDetails,u,h,v,e,null,null,o?o.isUndoRedo:null),d.cfActionArgs&&d.cfActionArgs.cfModel.forEach(function(e){n.i(i._147)({eventArgs:{range:e.range,type:e.type,cFColor:e.cFColor,value:e.value,sheetIdx:d.cfActionArgs.sheetIdx,cancel:!0},action:"conditionalFormat"},l.parent,!1)}),n.i(i._157)(u,h[0],h[1],n.i(a.x)(u,h[0]));var b=n.i(i._158)(u,h[0]);n.i(i._149)(this.parent,u,b,h[0]),d.mergeCollection.forEach(function(e){e.merge=!e.merge,l.parent.notify(a._113,e),e.merge=!e.merge}),o&&!m&&this.parent.notify(i._31,o)}else if(f.isExternal){var x=this.parent.getAddressInfo(d.pastedRange);this.updateCellDetails(f.cellDetails,n.i(a.l)(this.parent,x.sheetIndex),x.indices,!0,e,null,null,o?o.isUndoRedo:null),o&&!m&&this.parent.notify(i._31,o)}else{var S=new Promise(function(e){e(void 0)}),x=this.parent.getAddressInfo(d.copiedRange);this.parent.notify(d.copiedInfo.isCut?r.J:r.K,{range:x.indices,sId:n.i(a.l)(this.parent,x.sheetIndex).id,promise:S,invokeCopy:!0,isPublic:!0,isFromUpdateAction:m}),S.then(function(){l.parent.notify(r.L,{range:c?n.i(a.Z)(d.pastedRange):c,sIdx:c?n.i(a.e)(l.parent,n.i(a.g)(d.pastedRange)):c,type:d.type,isAction:!1,isInternal:!0,isFromUpdateAction:m}),o&&!m&&l.parent.notify(i._31,o)})}v&&!m?(this.parent.notify(i.H,{address:d.selectedRange}),this.parent.notify(r._101,{})):this.checkRefreshNeeded(p,m)}return e},e.prototype.undoForResize=function(e){var t=e.eventArgs;if(void 0===t.hide)if(t.isCol){var r=t.oldWidth;t.oldWidth=t.width,t.width=r}else{var r=t.oldHeight;t.oldHeight=t.height,t.height=r}else t.hide=!t.hide;n.i(i._147)(e,this.parent,!1);var o=this.parent.getActiveSheet(),s=n.i(a.T)(o.activeCell),l=n.i(a.I)(s[0],s[1],o);if(l&&l.rowSpan){var d=this.parent.getCell(s[0],s[1]);this.parent.element.querySelector(".e-active-cell").style.height=d.offsetHeight+"px"}else if(l&&l.colSpan){var d=this.parent.getCell(s[0],s[1]);this.parent.element.querySelector(".e-active-cell").style.width=d.offsetWidth+"px"}return e},e.prototype.performOperation=function(e,t,s,l){var d=e.eventArgs,c=[];c="autofill"===e.action?d.fillRange.split("!"):"cellSave"===e.action||"wrap"===e.action||"replace"===e.action||"cellDelete"===e.action||"hyperlink"===e.action||"removeHyperlink"===e.action?d.address.split("!"):d.range.split("!");var h,p=n.i(a.e)(this.parent,c[0]),u=n.i(a.l)(this.parent,p);if(d.isColSelected){var f=c[1].split(":");h=[0,n.i(a.V)(f[0]),u.rowCount-1,n.i(a.V)(f[1])]}else h=n.i(a._4)(n.i(a.T)(c[1]));var g=h,m=d.beforeActionData,v=e.isFromUpdateAction,y=this.checkRefreshNeeded(p,v),C={cellIdx:[h[0],h[1]],isUnique:!1,uniqueRange:""};if(d.isColSelected||this.parent.notify(a._63,C),this.isUndo){if(C.isUnique&&d.formula&&d.formula.indexOf("UNIQUE")>-1){var b=n.i(a.T)(C.uniqueRange);if("#SPILL!"!==n.i(a.I)(b[0],b[1],this.parent.getActiveSheet()).value)for(var x=b[0];x<=b[2];x++)for(var S=b[1];S<=b[3];S++)x===b[0]&&S===b[1]&&(S+=1),this.parent.updateCell({value:""},n.i(a.X)([x,S]))}if(this.updateCellDetails(m.cellDetails,u,h,y,e,t,d.isColSelected),C.isUnique&&"cellDelete"===e.action&&d.isSpill){for(var b=n.i(a.T)(C.uniqueRange),w=n.i(a.I)(b[0],b[1],this.parent.getActiveSheet()),_=b[0];_<=b[2];_++)for(var x=b[1];x<=b[3];x++)for(var S=h[0];S<=h[2];S++)for(var I=h[1];I<=h[3];I++)_===S&&x===I||this.parent.updateCell({value:""},n.i(a.W)(_,x));w.value="#SPILL!",this.parent.updateCell(w,n.i(a.W)(b[0],b[1]))}if(!d.isSpill&&""!==C.uniqueRange){for(var E=n.i(a.T)(C.uniqueRange),x=E[0];x<=E[2];x++)for(var S=E[1];S<=E[3];S++)x===E[0]&&S===E[1]&&(S+=1),this.parent.updateCell({value:""},n.i(a.X)([x,S]));this.parent.notify(a._64,null)}}else{var R=e.eventArgs,k=n.i(a.T)(u.activeCell),A=this.parent.getCellStyleValue(["textDecoration"],k).textDecoration;if(R&&R.style&&R.style.textDecoration){var F=R.style.textDecoration,N=F,T=void 0,O=!1;"underline"===A?N="underline"===F?"none":"underline line-through":"line-through"===A?N="line-through"===F?"none":"underline line-through":"underline line-through"===A&&(N="underline"===F?"line-through":"underline",O=!0),"none"===N&&(O=!0),R.style.textDecoration=N,e.eventArgs=R;for(var _=g[0];_<=g[2];_++)for(var x=g[1];x<=g[3];x++){if(T={},"none"===(A=this.parent.getCellStyleValue(["textDecoration"],[_,x]).textDecoration)){if(O)continue;T.textDecoration=F}else if("underline"===A||"line-through"===A)if(O){if(F!==A)continue;T.textDecoration="none"}else T.textDecoration=F!==A?"underline line-through":F;else if("underline line-through"===A){if(!O)continue;T.textDecoration="underline"===F?"line-through":"underline"}this.parent.notify(a._43,{style:{textDecoration:T.textDecoration},range:[_,x,_,x],refreshRibbon:!0,onActionUpdate:!0})}R.style.textDecoration=F,e.eventArgs=R}else{if(!n.i(o.isNullOrUndefined)(d.oldValue)&&d.oldValue!==d.value&&C.isUnique){var D=n.i(a.T)(C.uniqueRange);if("#SPILL!"!==n.i(a.I)(D[0],D[1],this.parent.getActiveSheet()).value)for(var x=D[0];x<=D[2];x++)for(var S=D[1];S<=D[3];S++)x===D[0]&&S===D[1]&&(this.parent.updateCell({value:"#SPILL!"},n.i(a.X)([D[0],D[1]])),S+=1),this.parent.updateCell({value:""},n.i(a.X)([x,S]))}if(n.i(i._147)(e,this.parent,!0),C.isUnique&&"cellDelete"===e.action&&d.isSpill){for(var L=n.i(a.T)(C.uniqueRange),P=!1,_=L[0];_<=L[1];_++)for(var x=L[1];x<=L[3];x++)_===L[0]&&x===L[1]&&x++,n.i(a.I)(_,x,u)&&!n.i(o.isNullOrUndefined)(n.i(a.I)(_,x,u).value)&&""!==n.i(a.I)(_,x,u).value&&(P=!0);if(!P){var w=n.i(a.I)(L[0],L[1],this.parent.getActiveSheet());w.value="",this.parent.updateCell(w,n.i(a.W)(L[0],L[1])),this.parent.notify(a._64,null)}}}}return"autofill"===e.action&&(c[1]=this.isUndo?e.eventArgs.dataRange:e.eventArgs.selectedRange),!y||s||v||(d.isColSelected&&(c[1]=u.selectedRange),this.parent.notify(i.H,{address:c[1]})),this.parent.showAggregate&&this.parent.notify(r._58,{}),e},e.prototype.getCellDetails=function(e,t,r){var i,s=[],l="cellDelete"===r;e=n.i(a._4)(e);for(var d=e[0];d<=e[2];d++)if(!l||!n.i(a.w)(t,d))for(var c=e[1];c<=e[3];c++)i=n.i(a.I)(d,c,t),s.push({rowIndex:d,colIndex:c,format:i?i.format:null,isLocked:i?i.isLocked:null,style:i&&i.style?Object.assign({},i.style):null,value:i?i.value:"",formula:i?i.formula:"",wrap:i&&i.wrap,rowSpan:i&&i.rowSpan,colSpan:i&&i.colSpan,hyperlink:i&&(n.i(o.isObject)(i.hyperlink)?n.i(o.extend)({},i.hyperlink):i.hyperlink),image:i&&i.image,chart:i&&i.chart&&JSON.parse(JSON.stringify(i.chart)),validation:i&&i.validation});return s},e.prototype.updateCellDetails=function(e,t,s,l,d,c,h,p){for(var u,f,g,m,v,y=this,C=e.length,b=d&&!c&&("cellSave"===d.action||"cellDelete"===d.action||"autofill"===d.action||"clipboard"===d.action),x=d&&!d.eventArgs.cfClearActionArgs&&t.conditionalFormats&&t.conditionalFormats.length&&[].slice.call(t.conditionalFormats),S=[],w=this,_=0;_<C;_++)!function(s){if(h)return n.i(a.C)(t,e[s].colIndex,{validation:e[s].validation}),"continue";f=n.i(a.I)(e[s].rowIndex,e[s].colIndex,t,!1,!0),f.style&&d&&("format"===d.action||"clipboard"===d.action)&&(!f.style.borderTop||e[s].style&&e[s].style.borderTop||w.parent.setBorder({borderTop:""},t.name+"!"+n.i(a.W)(e[s].rowIndex,e[s].colIndex),null,p),!f.style.borderLeft||e[s].style&&e[s].style.borderLeft||w.parent.setBorder({borderLeft:""},t.name+"!"+n.i(a.W)(e[s].rowIndex,e[s].colIndex),null,p),!f.style.borderRight||e[s].style&&e[s].style.borderRight||w.parent.setBorder({borderRight:""},t.name+"!"+n.i(a.W)(e[s].rowIndex,e[s].colIndex),null,p),!f.style.fontSize||e[s].style&&e[s].style.fontSize||(f.style.fontSize="11pt",g=!0,w.parent.notify(a._46,{style:{fontSize:"11pt"},rowIdx:e[s].rowIndex,colIdx:e[s].colIndex,lastCell:!0,isHeightCheckNeeded:!0,manualUpdate:!0,onActionUpdate:!0})),!f.style.fontFamily||e[s].style&&e[s].style.fontFamily||(g=!0,f.style.fontFamily="Calibri",w.parent.notify(a._46,{style:{fontFamily:"Calibri"},rowIdx:e[s].rowIndex,colIdx:e[s].colIndex,lastCell:!0,isHeightCheckNeeded:!0,manualUpdate:!0,onActionUpdate:!0}))),f.image&&d&&"clipboard"===d.action&&f.image.forEach(function(n){y.parent.notify(r._76,{id:n.id,sheet:t,preventEventTrigger:!0,rowIdx:e[s].rowIndex,colIdx:e[s].colIndex})}),n.i(a.J)(e[s].rowIndex,e[s].colIndex,t,{value:e[s].formula&&e[s].formula.toUpperCase().includes("UNIQUE")?null:e[s].value,format:e[s].format,isLocked:e[s].isLocked,style:e[s].style&&Object.assign({},e[s].style),formula:e[s].formula,wrap:e[s].wrap,rowSpan:e[s].rowSpan,colSpan:e[s].colSpan,hyperlink:e[s].hyperlink,validation:e[s]&&e[s].validation,image:e[s].image}),v={action:"updateCellValue",address:[e[s].rowIndex,e[s].colIndex,e[s].rowIndex,e[s].colIndex],value:e[s].formula?e[s].formula:e[s].value,sheetIndex:n.i(a.e)(w.parent,t.name),skipFormatCheck:n.i(i._163)(w.parent)},w.parent.notify(a._50,v),x&&!m&&(m=v.isFormulaDependent),(d&&"wrap"===d.action&&d.eventArgs.wrap||f.wrap&&!e[s].wrap)&&w.parent.notify(a._84,{range:[e[s].rowIndex,e[s].colIndex,e[s].rowIndex,e[s].colIndex],wrap:!1,sheet:t}),d&&e[s].hyperlink&&"clear"===d.action&&(d.eventArgs.range=t.name+"!"+n.i(a.X)([e[s].rowIndex,e[s].colIndex,e[s].rowIndex,e[s].colIndex]),u=w.parent.getCell(e[s].rowIndex,e[s].colIndex),"Clear All"===d.eventArgs.type||"Clear Hyperlinks"===d.eventArgs.type?w.parent.addHyperlink(e[s].hyperlink,d.eventArgs.range,e[s].value):"Clear Formats"===d.eventArgs.type&&u&&n.i(o.addClass)(u.querySelectorAll(".e-hyperlink"),"e-hyperlink-style")),b&&e[s].value!==f.value&&w.parent.trigger("cellSave",{element:null,value:e[s].value,oldValue:f.value,formula:e[s].formula,cancel:!1,address:t.name+"!"+n.i(a.W)(e[s].rowIndex,e[s].colIndex),displayText:w.parent.getDisplayText(e[s])}),x&&!m&&n.i(a._179)(x,S,e[s].rowIndex,e[s].colIndex)}(_);if(l){if(s[0]===s[2]&&s[1]===s[3]){var I=n.i(a.I)(s[0],s[1],t);I.rowSpan>1&&(s[2]=s[0]+I.rowSpan-1),I.colSpan>1&&(s[3]=s[1]+I.colSpan-1)}this.parent.serviceLocator.getService("cell").refreshRange(s,!1,!1,!0,!1,n.i(i._163)(this.parent)),(S.length||m)&&this.parent.notify(a._120,{cfModel:!m&&S,refreshAll:m,isAction:!0}),g&&n.i(i._115)(function(){return y.parent.selectRange(t.selectedRange)})}},e.prototype.checkRefreshNeeded=function(e,t){var n=!0;return e!==this.parent.activeSheetIndex&&(t||(this.parent.activeSheetIndex=e,this.parent.dataBind()),n=!1),n},e.prototype.addEventListener=function(){this.parent.on(i._18,this.performUndoRedo,this),this.parent.on(i._19,this.updateUndoRedoCollection,this),this.parent.on(i._20,this.setActionData,this),this.parent.on(i._21,this.getBeforeActionData,this),this.parent.on(i._22,this.clearUndoRedoCollection,this),this.parent.on(i._51,this.updateUndoRedoIcons,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._18,this.performUndoRedo),this.parent.off(i._19,this.updateUndoRedoCollection),this.parent.off(i._20,this.setActionData),this.parent.off(i._21,this.getBeforeActionData),this.parent.off(i._22,this.clearUndoRedoCollection),this.parent.off(i._51,this.updateUndoRedoIcons))},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"undoredo"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(3),i=(n.n(r),n(1)),a=n(0),o=n(2),s=function(){function e(e){this.scroll=[],this.parent=e,this.addEventListener()}return e.prototype.createVirtualElement=function(e){var t=this.parent.getActiveSheet(),i=this.parent.getMainContent();this.content=this.parent.createElement("div",{className:"e-virtualable"}),this.content.appendChild(i.querySelector(".e-table")),i.appendChild(this.content);var s,l=i.appendChild(this.parent.createElement("div",{className:"e-virtualtrack"})),d=0;this.parent.sheets.length>this.scroll.length&&this.initScroll();var c=this.parent.viewport.bottomIndex;t.rowCount>c+1||t.usedRange.rowIndex>c?(!this.parent.scrollSettings.isFinite&&t.rowCount<=t.usedRange.rowIndex&&this.parent.setSheetPropertyOnMute(t,"rowCount",t.usedRange.rowIndex+1),this.setScrollCount(t.rowCount,"row")):(this.parent.scrollSettings.isFinite||this.parent.setSheetPropertyOnMute(t,"rowCount",c+1),this.scroll[this.parent.activeSheetIndex].rowCount=t.rowCount);var h=this.parent.frozenRowCount(t),p=n.i(o.w)(t.topLeftCell);e.top&&(d=e.top,t.frozenRows&&(d+=n.i(a.z)(t,p[0],h-1,!0)),h=n.i(o.w)(t.paneTopLeftCell)[0]),d+=n.i(a.z)(t,h,this.scroll[this.parent.activeSheetIndex].rowCount-1,!0),c=this.parent.viewport.rightIndex;var u=0,f=this.parent.frozenColCount(t);e.left?(u=e.left,f&&(u+=n.i(a.E)(t,p[1],f-1,!0)),h=n.i(o.w)(t.paneTopLeftCell)[1]):h=f,t.colCount>c+1||t.usedRange.colIndex>c?(!this.parent.scrollSettings.isFinite&&t.colCount<=t.usedRange.colIndex&&this.parent.setSheetPropertyOnMute(t,"colCount",t.usedRange.colIndex+1),u+=n.i(a.E)(t,h,c,!0),this.setScrollCount(t.colCount,"col"),s=u+n.i(a.E)(t,c+1,this.scroll[this.parent.activeSheetIndex].colCount-1,!0)):(this.parent.scrollSettings.isFinite||this.parent.setSheetPropertyOnMute(t,"colCount",c+1),u+=n.i(a.E)(t,h,t.colCount-1,!0),this.scroll[this.parent.activeSheetIndex].colCount=t.colCount,s=u),n.i(r.isNullOrUndefined)(this.parent.viewport.leftIndex)&&(this.parent.viewport.leftIndex=0),n.i(r.isNullOrUndefined)(this.parent.viewport.topIndex)&&(this.parent.viewport.topIndex=0),e.left&&(u=n.i(a.E)(t,this.parent.viewport.leftIndex+f,c,!0)),n.i(r.isNullOrUndefined)(this.translateX)&&(this.translateX=0),n.i(r.isNullOrUndefined)(this.translateY)&&(this.translateY=0),i=this.parent.getRowHeaderContent(),this.rowHeader=this.content.cloneNode(),this.rowHeader.appendChild(i.querySelector(".e-table")),i.appendChild(this.rowHeader);var g=i.appendChild(l.cloneNode());this.rowHeader.style.transform="translate(0px, "+this.translateY+"px)",i=this.parent.getColumnHeaderContent(),this.colHeader=this.content.cloneNode(),this.colHeader.appendChild(i.querySelector(".e-table")),i.appendChild(this.colHeader);var m=i.appendChild(l.cloneNode());if(this.colHeader.style.width=u+"px",g.style.height=d+"px",m.style.width=s+"px",this.colHeader.style.transform="translate("+this.translateX+"px, 0px)",this.content.style.transform="translate("+this.translateX+"px, "+this.translateY+"px)",this.content.style.width=u+"px",l.style.height=d+"px",l.style.width=s+"px",this.parent.allowScrolling){var v=m.cloneNode(!0);v.style.width=s+(this.parent.scrollSettings.isFinite?this.parent.sheetModule.getScrollSize():0)+"px",this.parent.getScrollElement().appendChild(v)}},e.prototype.initScroll=function(){for(var e=0;e<this.parent.sheets.length;)this.scroll[e]||this.scroll.push({rowCount:0,colCount:0}),e++},e.prototype.setScrollCount=function(e,t){var n=this.parent.activeSheetIndex;this.scroll[n][t+"Count"]&&this.scroll[n][t+"Count"]===e||(this.scroll[n][t+"Count"]=e)},e.prototype.getRowAddress=function(e){var t=this.parent.getActiveSheet();return n.i(o.g)([e[0],t.frozenColumns?n.i(o.w)(t.topLeftCell)[1]:this.parent.viewport.leftIndex,e[1],this.parent.viewport.rightIndex])},e.prototype.getColAddress=function(e){var t=this.parent.getActiveSheet();return n.i(o.g)([t.frozenRows?n.i(o.w)(t.topLeftCell)[0]:this.parent.viewport.topIndex,e[0],this.parent.viewport.bottomIndex,e[1]])},e.prototype.updateScrollCount=function(e,t,n){void 0===n&&(n=e);var r=this.parent.getActiveSheet(),i=e+this.parent.viewport[t+"Count"]+1+n,a=this.scroll[this.parent.activeSheetIndex][t+"Count"];if(i<a){if(r[t+"Count"]===a)return;i=a}this.parent.scrollSettings.isFinite||this.parent.setSheetPropertyOnMute(r,t+"Count",i)},e.prototype.onVerticalScroll=function(e){var t=e.cur.idx,r=e.cur.size,s=e.prev.idx,l=Math.abs(t-s),d=this.parent.getThreshold("row");if(l>Math.round(d/2)){var c=void 0,h=void 0,p=void 0,u=this.parent.getActiveSheet();if(t<=d&&!e.increase){if(this.translateY&&s>d){this.translateY=0;var f=this.parent.frozenColCount(u),g=this.parent.frozenRowCount(u);if(e.preventScroll)this.parent.viewport.topIndex=s-(d-g);else{var m=f?n.i(o.w)(u.topLeftCell)[1]:this.parent.viewport.leftIndex,v=f?[g,this.parent.viewport.leftIndex+f]:[];if(l<this.parent.viewport.rowCount+d){c=n.i(a._172)(u,g,!0),h=n.i(a._172)(u,this.parent.viewport.topIndex+g-1,!1),this.parent.viewport.topIndex=c-g;var y=this.skipHiddenLastIdx(this.parent.viewport.bottomIndex-(h-c+1-this.hiddenCount(c,h)),this.parent.viewport.bottomIndex);this.parent.viewport.bottomIndex=n.i(a._172)(u,y,!1),this.parent.renderModule.refreshUI({colIndex:m,rowIndex:c,direction:"last",refresh:"RowPart",skipUpdateOnFirst:!0,frozenIndexes:v},this.getRowAddress([c,n.i(a._172)(u,h,!1)]))}else{var C=this.parent.viewport.leftIndex;this.parent.renderModule.refreshUI({rowIndex:0,colIndex:m,refresh:"Row",skipUpdateOnFirst:!0,frozenIndexes:v,skipTranslate:!0}),f&&(this.parent.viewport.leftIndex=C),this.translate({refresh:"Row"})}n.i(i._159)(this.parent.element),t=0}}this.updateScrollCount(d,"row")}if(s<d&&(l=Math.abs(t-d)),!e.increase&&this.parent.scrollSettings.isFinite&&this.parent.viewport.bottomIndex===n.i(a._172)(u,u.rowCount-1,!1)){var g=this.parent.frozenRowCount(u),b=this.parent.viewport.topIndex+g+n.i(a.T)(u.paneTopLeftCell)[0]-1;if(t+g>b)return void(e.prev.idx=t);l=b-(t+g)}if(t>d){if(p=this.parent.viewport.topIndex,this.parent.viewport.topIndex=t-d,e.increase&&p>this.parent.viewport.topIndex)return void(this.parent.viewport.topIndex=p);var g=this.parent.frozenRowCount(u);if(e.preventScroll)this.setThresholdHeight(r,d,g),this.translate({refresh:"Row"});else{var f=this.parent.frozenColCount(u),m=void 0,x=[];if(f?(m=n.i(o.w)(u.topLeftCell)[1],x.push(g),x.push(this.parent.viewport.leftIndex+f)):m=this.parent.viewport.leftIndex,l<this.parent.viewport.rowCount+d)if(e.increase){if(c=this.parent.viewport.bottomIndex+1,h=this.parent.viewport.bottomIndex+(this.parent.viewport.topIndex-p),(h-=this.hiddenCount(p+g,this.parent.viewport.topIndex-1+g))<=this.parent.viewport.bottomIndex||this.parent.scrollSettings.isFinite&&c>n.i(a._172)(u,u.rowCount-1,!1,"rows"))return void(this.parent.viewport.topIndex=p);var S=this.parent.skipHidden(c,h,"rows",!1),w=this.checkLastIdx(S[1],"row");c=S[0],h=w.index;var _=this.parent.viewport.topIndex+g;if(w.diff){var I=h-c+1-this.hiddenCount(c,h);_=n.i(a._172)(u,p,!0,"rows",I)+g}this.parent.viewport.topIndex=n.i(a._172)(u,_,!w.diff)-g,this.setThresholdHeight(r,t-this.parent.viewport.topIndex,g,!!w.diff,p===n.i(a._172)(u,g,!0)),this.parent.viewport.bottomIndex=h,this.parent.renderModule.refreshUI({colIndex:m,rowIndex:c,direction:"first",refresh:"RowPart",frozenIndexes:x},this.getRowAddress([c,h]))}else{if(c=n.i(a._172)(u,this.parent.viewport.topIndex+g,!1),c<g&&(c=g,c=n.i(a._172)(u,c,!0)),this.parent.viewport.topIndex=c-g,(h=n.i(a._172)(u,p+g-1,!1))<g||h<c)return void(this.parent.viewport.topIndex=p);var y=this.skipHiddenLastIdx(this.parent.viewport.bottomIndex-(h-c+1-this.hiddenCount(c,h)),this.parent.viewport.bottomIndex);this.parent.viewport.bottomIndex=n.i(a._172)(u,y,!1),this.setThresholdHeight(r,t-this.parent.viewport.topIndex,g),this.parent.renderModule.refreshUI({colIndex:m,rowIndex:c,direction:"last",refresh:"RowPart",frozenIndexes:x},this.getRowAddress([c,h]))}else p=this.parent.viewport.leftIndex,this.parent.viewport.topIndex=n.i(a._172)(u,this.parent.viewport.topIndex+g,!1)-g,this.parent.viewport.topIndex<0&&(this.parent.viewport.topIndex=n.i(a._172)(u,g,!0)-g),this.parent.renderModule.refreshUI({rowIndex:this.parent.viewport.topIndex,colIndex:m,refresh:"Row",frozenIndexes:x,skipTranslate:!0}),f&&(this.parent.viewport.leftIndex=p),this.setThresholdHeight(r,t-this.parent.viewport.topIndex,g,this.parent.scrollSettings.isFinite&&this.parent.viewport.bottomIndex===n.i(a._172)(u,u.rowCount-1,!1)),this.translate({refresh:"Row"});this.updateScrollCount(t,"row",d),this.focusSheet()}}e.prev.idx=t}},e.prototype.skipHiddenLastIdx=function(e,t,n){void 0===n&&(n="rows");for(var r=this.parent.getActiveSheet(),i=0,a=e;a<=t;a++)r[""+n][a]&&r[""+n][a].hidden&&i++;return i&&(e=this.skipHiddenLastIdx(e-i,e-1,n)),e},e.prototype.hiddenCount=function(e,t,n){void 0===n&&(n="rows");for(var r=0,i=this.parent.getActiveSheet(),a=e;a<=t;a++)i[""+n][a]&&i[""+n][a].hidden&&r++;return r},e.prototype.checkLastIdx=function(e,t){var r=0;if(this.parent.scrollSettings.isFinite){var i=this.parent.getActiveSheet(),o=n.i(a._172)(i,i[t+"Count"]-1,!1);e>o&&(r=e-o,e=o)}return{index:e,diff:r}},e.prototype.onHorizontalScroll=function(e){var t=e.cur.idx,r=e.cur.size,s=e.prev.idx,l=Math.abs(t-s),d=this.parent.getThreshold("col");if(l>Math.round(d/2)){var c=void 0,h=void 0,p=void 0,u=this.parent.getActiveSheet();if(t<=d&&!e.increase){if(this.translateX&&s>d){this.translateX=0;var f=this.parent.frozenColCount(u),g=this.parent.frozenRowCount(u);if(e.preventScroll)this.parent.viewport.leftIndex=s-(d-f);else{var m=g?n.i(o.w)(u.topLeftCell)[0]:this.parent.viewport.topIndex,v=g?[this.parent.viewport.topIndex+g,f]:[];if(l<this.parent.viewport.colCount+d){c=n.i(a._172)(u,f,!0,"columns"),h=n.i(a._172)(u,this.parent.viewport.leftIndex+f-1,!1,"columns"),this.parent.viewport.leftIndex=c-f;var y=this.skipHiddenLastIdx(this.parent.viewport.rightIndex-(h-c+1-this.hiddenCount(c,h,"columns")),this.parent.viewport.rightIndex,"columns");this.parent.viewport.rightIndex=n.i(a._172)(u,y,!1,"columns"),this.parent.renderModule.refreshUI({rowIndex:m,colIndex:c,direction:"last",refresh:"ColumnPart",skipUpdateOnFirst:!0,frozenIndexes:v},this.getColAddress([c,n.i(a._172)(u,h,!1,"columns")]))}else{var C=this.parent.viewport.topIndex;this.parent.renderModule.refreshUI({rowIndex:m,colIndex:0,refresh:"Column",skipUpdateOnFirst:!0,frozenIndexes:v,skipTranslate:!0}),g&&(this.parent.viewport.topIndex=C),this.translate({refresh:"Column"})}n.i(i._159)(this.parent.element),t=0}}this.updateScrollCount(d,"col")}if(s<d&&(l=Math.abs(t-d)),!e.increase&&this.parent.scrollSettings.isFinite&&this.parent.viewport.rightIndex===n.i(a._172)(u,u.colCount-1,!1,"columns")){var f=this.parent.frozenColCount(u),b=this.parent.viewport.leftIndex+f+n.i(a.T)(u.paneTopLeftCell)[1]-1;if(b+=this.hiddenCount(this.parent.viewport.leftIndex+f,b),t+f>b)return void(e.prev.idx=t);l=b-(t+f)}if(t>d){if(p=this.parent.viewport.leftIndex,this.parent.viewport.leftIndex=t-d,e.increase&&p>this.parent.viewport.leftIndex)return void(this.parent.viewport.leftIndex=p);var f=this.parent.frozenColCount(u);if(e.preventScroll)this.setThresholdWidth(r,d,f),this.translate({refresh:"Column"});else{var g=this.parent.frozenRowCount(u),m=g?n.i(o.w)(u.topLeftCell)[0]:this.parent.viewport.topIndex,x=[];if(g&&(x=[g+this.parent.viewport.topIndex,f]),l<this.parent.viewport.colCount+d)if(e.increase){if(c=this.parent.viewport.rightIndex+1,h=this.parent.viewport.rightIndex+(this.parent.viewport.leftIndex-p),(h-=this.hiddenCount(p+f,this.parent.viewport.leftIndex-1+f,"columns"))<=this.parent.viewport.rightIndex||this.parent.scrollSettings.isFinite&&c>n.i(a._172)(u,u.colCount-1,!1,"columns"))return void(this.parent.viewport.leftIndex=p);var S=this.parent.skipHidden(c,h,"columns",!1),w=this.checkLastIdx(S[1],"col");c=S[0],h=w.index,this.parent.viewport.leftIndex=n.i(a._172)(u,this.parent.viewport.leftIndex-w.diff+f,!w.diff,"columns")-f,this.setThresholdWidth(r,t-this.parent.viewport.leftIndex,f,!!w.diff,p===n.i(a._172)(u,f,!0,"columns")),this.parent.viewport.rightIndex=h,this.parent.renderModule.refreshUI({rowIndex:m,colIndex:c,direction:"first",refresh:"ColumnPart",frozenIndexes:x},this.getColAddress([c,h]))}else{if(c=n.i(a._172)(u,this.parent.viewport.leftIndex+f,!1,"columns"),c<f&&(c=f,c=n.i(a._172)(u,c,!0,"columns")),this.parent.viewport.leftIndex=c-f,(h=n.i(a._172)(u,p+f-1,!1,"columns"))<f||h<c)return void(this.parent.viewport.leftIndex=p);var y=this.skipHiddenLastIdx(this.parent.viewport.rightIndex-(h-c+1-this.hiddenCount(c,h,"columns")),this.parent.viewport.rightIndex,"columns");this.parent.viewport.rightIndex=n.i(a._172)(u,y,!1,"columns"),this.setThresholdWidth(r,t-this.parent.viewport.leftIndex,f),this.parent.renderModule.refreshUI({rowIndex:m,colIndex:c,direction:"last",refresh:"ColumnPart",frozenIndexes:x},this.getColAddress([c,h]))}else p=this.parent.viewport.topIndex,this.parent.viewport.leftIndex=n.i(a._172)(u,this.parent.viewport.leftIndex+f,!1,"columns")-f,this.parent.viewport.leftIndex<0&&(this.parent.viewport.leftIndex=n.i(a._172)(u,f,!0,"columns")-f),this.parent.renderModule.refreshUI({rowIndex:m,colIndex:this.parent.viewport.leftIndex,refresh:"Column",frozenIndexes:x,skipTranslate:!0}),g&&(this.parent.viewport.topIndex=p),this.setThresholdWidth(r,t-this.parent.viewport.leftIndex,f,this.parent.scrollSettings.isFinite&&this.parent.viewport.rightIndex===n.i(a._172)(u,u.colCount-1,!1,"columns")),this.translate({refresh:"Column"});this.updateScrollCount(t,"col",d),this.focusSheet()}}e.prev.idx=t}},e.prototype.focusSheet=function(){document.activeElement.classList.contains("e-text-findNext-short")&&n.i(r.closest)(document.activeElement,"#"+this.parent.element.id)||n.i(i._159)(this.parent.element)},e.prototype.setThresholdHeight=function(e,t,r,i,o){var s=this.parent.getActiveSheet(),l=this.parent.viewport.topIndex+r,d=l+t-1;this.translateY=i||o||d<l?l<=r?0:n.i(a.z)(s,r,l-1,!0):e-n.i(a.z)(s,l,d,!0)},e.prototype.setThresholdWidth=function(e,t,r,i,o){var s=this.parent.getActiveSheet(),l=this.parent.viewport.leftIndex+r,d=l+t-1;this.translateX=i||o||d<l?l<=r?0:n.i(a.E)(s,r,l-1,!0):e-n.i(a.E)(s,l,d,!0)},e.prototype.translate=function(e){if(!e.skipTranslate&&this.content){var t=this.translateX||0;t=this.parent.enableRtl?-t:t,"Row"!==e.refresh&&"RowPart"!==e.refresh||(this.content.style.transform="translate("+t+"px, "+this.translateY+"px)",this.rowHeader.style.transform="translate(0px, "+this.translateY+"px)"),"Column"!==e.refresh&&"ColumnPart"!==e.refresh||(this.content.style.transform="translate("+t+"px, "+this.translateY+"px)",this.colHeader.style.transform="translate("+t+"px, 0px)")}},e.prototype.updateColumnWidth=function(e){if("Column"===e.refresh){this.content.style.width="";var t=this.parent.getActiveSheet(),r=n.i(a.E)(t,this.parent.viewport.leftIndex+this.parent.frozenColCount(t),this.parent.viewport.rightIndex,!0);if(this.colHeader.style.width=r+"px",this.content.style.width=r+"px",!this.parent.scrollSettings.isFinite||e.isUpdate){var i=this.parent.element.querySelector(".e-scroller .e-virtualtrack");if(!i)return;var o=parseInt(i.style.width,10),s=r+this.translateX+this.parent.viewport.beforeFreezeWidth;if(s>o){var l=s-o;i.style.width=o+l+"px"}else{var l=o-s,d=this.parent.getMainContent().getElementsByClassName("e-virtualtrack")[0];o-l<parseInt(d.style.width,10)&&(i.style.width=d.style.width)}}}else if(!this.parent.scrollSettings.isFinite){var d=this.parent.getMainContent().getElementsByClassName("e-virtualtrack")[0],c=parseInt(d.style.height,10),h=this.content.getBoundingClientRect().height,p=h+this.translateY+this.parent.viewport.beforeFreezeHeight;if(p>c){var l=p-c;d.style.height=c+l+"px"}else{var l=c-p,u=this.parent.getRowHeaderContent().getElementsByClassName("e-virtualtrack")[0];c-l<parseInt(u.style.height,10)&&(d.style.height=u.style.height)}}},e.prototype.updateRowColCount=function(e){if(this.scroll.length){var t=this.parent.getActiveSheet();if("row"===e.update){if(e.index!==this.scroll[this.parent.activeSheetIndex].rowCount-1){var r=this.getVTrackHeight("height"),i=r;if(e.index>=this.scroll[this.parent.activeSheetIndex].rowCount?void 0===e.start?i+=n.i(a.z)(t,this.scroll[this.parent.activeSheetIndex].rowCount,e.index,!0):i+=n.i(a.z)(t,e.start,e.end,!0):void 0===e.start?i-=n.i(a.z)(t,e.index+1,this.scroll[this.parent.activeSheetIndex].rowCount-1,!0):i-=n.i(a.z)(t,e.start,e.end,!0),!e.isDelete&&i<r)return;this.scroll[this.parent.activeSheetIndex].rowCount=e.index+1,this.updateVTrack(this.rowHeader,i,"height"),this.scroll[this.parent.activeSheetIndex].rowCount>t.rowCount&&this.parent.setSheetPropertyOnMute(t,"rowCount",this.scroll[this.parent.activeSheetIndex].rowCount)}}else if(e.index!==this.scroll[this.parent.activeSheetIndex].colCount-1){var o=this.getVTrackHeight("width"),s=o;if(e.index>=this.scroll[this.parent.activeSheetIndex].colCount?void 0===e.start?s+=n.i(a.E)(t,this.scroll[this.parent.activeSheetIndex].colCount,e.index,!0):s+=n.i(a.E)(t,e.start,e.end,!0):void 0===e.start?s-=n.i(a.E)(t,e.index+1,this.scroll[this.parent.activeSheetIndex].colCount-1,!0):s-=n.i(a.E)(t,e.start,e.end,!0),!e.isDelete&&s<o)return;this.scroll[this.parent.activeSheetIndex].colCount=e.index+1,this.updateVTrack(this.colHeader,s,"width"),this.scroll[this.parent.activeSheetIndex].colCount>t.colCount&&this.parent.setSheetPropertyOnMute(t,"colCount",this.scroll[this.parent.activeSheetIndex].colCount)}}},e.prototype.getVTrackHeight=function(e){var t=this.content.nextElementSibling.style[""+e];if(t.includes("e+")){t=t.split("px")[0];var n=t.split("e+");return Number(n[0])*Math.pow(10,Number(n[1]))}return parseFloat(t)},e.prototype.updateVTrackHeight=function(e){var t=this.parent.frozenRowCount(this.parent.getActiveSheet());if(e.rowIdx<this.scroll[this.parent.activeSheetIndex].rowCount&&this.updateVTrack(this.rowHeader,this.getVTrackHeight("height")+e.threshold,"height"),e.rowIdx>=t&&e.rowIdx<this.parent.viewport.topIndex+t){var n=this.parent.element.getElementsByClassName("e-main-panel")[0];this.parent.scrollModule.prevScroll.scrollTop=n.scrollTop+e.threshold,this.parent.scrollModule.offset.top.size+=e.threshold,n.scrollTop+=e.threshold,this.translateY+=e.threshold,this.translate({refresh:"Row"})}},e.prototype.updateVTrackWidth=function(e){if(!n.i(a.F)(this.parent.getActiveSheet(),e.colIdx)){var t=this.parent.frozenColCount(this.parent.getActiveSheet());if(e.colIdx>=this.parent.viewport.leftIndex+t&&e.colIdx<=this.parent.viewport.rightIndex){var r=this.parent.getColumnHeaderContent().getElementsByClassName("e-virtualtrack")[0];r.style.width=parseFloat(r.style.width)+e.threshold+"px";var i=this.parent.getMainContent().getElementsByClassName("e-virtualtrack")[0];i.style.width=parseFloat(i.style.width)+e.threshold+"px";var o=this.parent.getScrollElement().getElementsByClassName("e-virtualtrack")[0];o.style.width=parseFloat(o.style.width)+e.threshold+"px";var s=this.parent.getColumnHeaderContent().getElementsByClassName("e-virtualable")[0];s.style.width=parseFloat(s.style.width)+e.threshold+"px";var l=this.parent.getMainContent().getElementsByClassName("e-virtualable")[0];l.style.width=parseFloat(l.style.width)+e.threshold+"px"}else e.colIdx>=t&&e.colIdx<this.parent.viewport.leftIndex+t&&(this.parent.scrollModule.offset.left.size+=e.threshold,this.translateX+=e.threshold,this.translate({refresh:"Column"}))}},e.prototype.updateVTrack=function(e,t,n){e.nextElementSibling.style[""+n]=t+"px",this.content.nextElementSibling.style[""+n]=t+"px","width"===n&&this.parent.allowScrolling&&(this.parent.getScrollElement().firstElementChild.style.width=t+"px")},e.prototype.deInitProps=function(){this.parent.viewport.leftIndex=null,this.parent.viewport.topIndex=null,this.parent.viewport.bottomIndex=null,this.translateX=null,this.translateY=null},e.prototype.updateScrollProps=function(e){var t=this;void 0===e&&(e={sheetIndex:0,sheets:this.parent.sheets}),0===this.scroll.length?this.initScroll():e.sheets.forEach(function(){t.scroll.splice(e.sheetIndex,0,{rowCount:0,colCount:0})})},e.prototype.sliceScrollProps=function(e){n.i(r.isNullOrUndefined)(e.sheetIndex)?this.scroll.length=0:this.scroll.splice(e.sheetIndex,1)},e.prototype.updateTranslate=function(e){if(e.height){if(e.isRender)this.translateY-=e.height;else{var t=parseInt(this.parent.getMainContent().getElementsByClassName("e-virtualtrack")[0].style.height,10);e.isHide?(this.updateVTrack(this.rowHeader,t-e.height,"height"),this.setThresholdHeight(this.translateY,e.prevSize-1-this.parent.viewport.topIndex+1,this.parent.frozenRowCount(this.parent.getActiveSheet()))):(this.updateVTrack(this.rowHeader,t+e.height,"height"),this.translateY=this.translateY+e.size)}this.translate({refresh:"Row"})}e.width&&(this.translateX-=e.width,this.translate({refresh:"Column"}))},e.prototype.addEventListener=function(){this.parent.on(i.t,this.createVirtualElement,this),this.parent.on(i.u,this.translate,this),this.parent.on(i.v,this.updateColumnWidth,this),this.parent.on(i._81,this.updateColumnWidth,this),this.parent.on(i.r,this.onVerticalScroll,this),this.parent.on(i.s,this.onHorizontalScroll,this),this.parent.on(o.N,this.updateRowColCount,this),this.parent.on(i._1,this.updateVTrackHeight,this),this.parent.on(i._2,this.updateVTrackWidth,this),this.parent.on(i._4,this.deInitProps,this),this.parent.on(o._65,this.sliceScrollProps,this),this.parent.on(o.I,this.updateScrollProps,this),this.parent.on(i._108,this.updateTranslate,this),this.parent.on(i.i,this.destroy,this)},e.prototype.destroy=function(){this.removeEventListener(),this.rowHeader&&this.rowHeader.remove(),this.colHeader&&this.colHeader.remove(),this.content&&this.content.remove(),this.rowHeader=null,this.colHeader=null,this.content=null,this.parent=null,this.scroll.length=0,this.translateX=null,this.translateY=null},e.prototype.removeEventListener=function(){this.parent.off(i.t,this.createVirtualElement),this.parent.off(i.u,this.translate),this.parent.off(i.v,this.updateColumnWidth),this.parent.off(i._81,this.updateColumnWidth),this.parent.off(i.r,this.onVerticalScroll),this.parent.off(i.s,this.onHorizontalScroll),this.parent.off(o.N,this.updateRowColCount),this.parent.off(i._1,this.updateVTrackHeight),this.parent.off(i._2,this.updateVTrackWidth),this.parent.off(o._65,this.sliceScrollProps),this.parent.off(o.I,this.updateScrollProps),this.parent.off(i._108,this.updateTranslate),this.parent.off(i.i,this.destroy)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(3),i=(n.n(r),n(1)),a=n(0),o=function(){function e(e){this.parent=e,this.wrapCell=this.parent.createElement("span",{className:"e-wrap-content"}),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i.D,this.ribbonClickHandler,this),this.parent.on(a._84,this.wrapTextHandler,this),this.parent.on(i._1,this.rowHeightChangedHandler,this),this.parent.on(i._2,this.colWidthChanged,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.D,this.ribbonClickHandler),this.parent.off(a._84,this.wrapTextHandler),this.parent.off(i._1,this.rowHeightChangedHandler),this.parent.off(i._2,this.colWidthChanged))},e.prototype.wrapTextHandler=function(e){if(e.initial||n.i(i._120)(this.parent,e.range,!0)){e.initial&&!e.td&&n.i(i._120)(this.parent,e.range,!0)&&(e.initial=!1);for(var t=void 0,o=void 0,s=void 0,l=void 0,d=void 0,c=void 0,h=void 0,p=void 0,u=e.range[0];u<=e.range[2];u++){l=0,h=n.i(a.t)(e.sheet,u).customHeight,c=h||e.isCustomHgt;for(var f=e.range[1];f<=e.range[3];f++)if(o=n.i(a.I)(u,f,e.sheet,null,!0),!(o.rowSpan<0||o.colSpan<0)){var g=o.rowSpan>1||o.colSpan>1;if(t=e.initial?e.td:this.parent.getCell(u,f),t?(e.wrap?(p=n.i(i._151)(o.style&&o.style.fontFamily?o.style:this.parent.cellStyle),t.classList.add(i._173)):(t.classList.remove(i._173),p=null),(c||g)&&this.updateWrapCell(u,f,e.sheet,t),r.Browser.isIE&&t.classList.add("e-ie-wrap")):p=null,!c&&!g){s=n.i(i._155)(e.sheet,u,f,o.colSpan>1?f+o.colSpan-1:f);var m=this.parent.getDisplayText(o).toString();if(t&&m.indexOf("\n")<0){var v=this.parent.element.querySelector(".e-spreadsheet-edit");v&&v.textContent.indexOf("\n")>-1&&(m=v.textContent)}if(m)if(e.wrap){t&&t.classList.contains("e-alt-unwrap")&&t.classList.remove("e-alt-unwrap");var y=void 0,C=0,b=void 0;if(m.indexOf("\n")>-1){var x=m.split("\n"),S=x.length;for(b=0;b<S;b++)y=n.i(i._153)(x[b],s,o.style,this.parent.cellStyle),0===y&&(y=1),C+=y;y=C}else y=n.i(i._153)(m,s,o.style,this.parent.cellStyle);if(d=n.i(i._156)(this.parent,u,f,e.sheet,o.style||this.parent.cellStyle,y,p),l=Math.max(l,d),o.rowSpan>1){var w=n.i(a.z)(e.sheet,u,u+(o.rowSpan-1));if(w>=l)return;d=l=n.i(a.x)(e.sheet,u)+(l-w)}n.i(i._157)(e.sheet,u,f,d)}else t&&m.indexOf("\n")>-1&&t.classList.add("e-alt-unwrap"),d=n.i(i._156)(this.parent,u,f,e.sheet,o.style||this.parent.cellStyle,1,p),n.i(i._157)(e.sheet,u,f,d),l=Math.max(n.i(i._158)(e.sheet,u),20);else e.wrap&&m||(n.i(i._157)(e.sheet,u,f,20),l=Math.max(n.i(i._158)(e.sheet,u),20));f===e.range[3]&&(e.wrap&&l>20&&n.i(i._158)(e.sheet,u)<=l||(!e.wrap||!m)&&n.i(i._158)(e.sheet,u)<n.i(a.x)(e.sheet,u)&&n.i(a.x)(e.sheet,u)>20)&&(t?(n.i(i._149)(this.parent,e.sheet,l,u,e.row,e.hRow),e.sheet.conditionalFormats&&e.sheet.conditionalFormats.length&&this.parent.notify(a._120,{indexes:[u,f],isAction:!0})):(n.i(a.y)(e.sheet,u,l),this.parent.setProperties({sheets:this.parent.sheets},!0)))}if(t){if(c&&!g){var m=this.parent.getDisplayText(o);e.wrap?t.classList.contains("e-alt-unwrap")&&t.classList.remove("e-alt-unwrap"):m.indexOf("\n")>-1&&t.classList.add("e-alt-unwrap")}e.wrap?h?t.style.lineHeight&&(t.style.lineHeight=""):t.style.lineHeight=parseFloat(o.style&&o.style.fontSize||this.parent.cellStyle.fontSize)*p+"pt":t.style.lineHeight=""}}}e.initial||this.parent.notify(i._101,null)}},e.prototype.ribbonClickHandler=function(e){var t=n.i(r.closest)(e.originalEvent.target,".e-btn");if(t&&t.id===this.parent.element.id+"_wrap"){var o=t.classList.contains("e-active"),s=n.i(a._1)(this.parent.getActiveSheet()),l={address:s,wrap:o,cancel:!1};this.parent.notify(a._34,{action:"beforeWrap",eventArgs:l}),l.cancel||(n.i(a.L)(this.parent.getActiveSheet().selectedRange,o,this.parent),this.parent.notify(i._31,{action:"wrap",eventArgs:{address:s,wrap:o}}))}},e.prototype.rowHeightChangedHandler=function(e){if(e.isCustomHgt)for(var t=this.parent.getActiveSheet(),r=void 0,i=this.parent.viewport.leftIndex,o=this.parent.viewport.rightIndex;i<=o;i++)n.i(a.I)(e.rowIdx,i,t,!1,!0).wrap&&(r=this.parent.getCell(e.rowIdx,i),this.updateWrapCell(e.rowIdx,i,t,r),r.style.lineHeight&&(r.style.lineHeight=""))},e.prototype.colWidthChanged=function(e){if(e.checkWrapCell)for(var t=this.parent.getActiveSheet(),r=this.parent.viewport.topIndex,i=this.parent.viewport.bottomIndex;r<=i;r++)n.i(a.I)(r,e.colIdx,t,!1,!0).wrap&&this.updateWrapCell(r,e.colIdx,t,this.parent.getCell(r,e.colIdx))},e.prototype.updateWrapCell=function(e,t,r,i){if(i&&!i.querySelector(".e-wrap-content")){for(var o=this.wrapCell.cloneNode(),s=i.querySelector(".e-filter-btn");i.childElementCount;)o.appendChild(i.firstElementChild);if(s&&(i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s)),!n.i(a.I)(e,t,r,!1,!0).hyperlink){var l=i.lastChild;l&&3===l.nodeType?(o.appendChild(document.createTextNode(l.textContent)),l.textContent=""):(o.appendChild(document.createTextNode(i.textContent)),i.textContent="")}i.appendChild(o)}},e.prototype.getModuleName=function(){return"wrapText"},e.prototype.destroy=function(){this.removeEventListener(),this.wrapCell&&(this.wrapCell.remove(),this.wrapCell=null),this.parent=null},e}()},function(e,t,n){"use strict";var r=n(72);n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return x});var r=n(3),i=(n.n(r),n(1)),a=n(37),o=n(13),s=n(94),l=n(42),d=n(0),c=n(2),h=n(40),p=n(12),u=(n.n(p),n(4)),f=n(0),g=n(24),m=n(20),v=(n.n(m),n(14)),y=n(34),C=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},x=function(e){function t(t,n){var r=e.call(this,t)||this;return r.viewport={rowCount:0,colCount:0,height:0,topIndex:0,leftIndex:0,width:0,bottomIndex:0,rightIndex:0,beforeFreezeHeight:0,beforeFreezeWidth:0},r.needsID=!0,h.Inject(g.a,g.b,g.d,o.c,o.b,o.f,o.g,o.a,d._196,g.e,g.g,g.f,g.h,o.h,g.c,o.m,d._208,d._197,d._198,d._207,f._200,f._199,g.i,d._203,o.i,o.l,f._204,g.j,o.k,d._209,o.n,o.o,d._210,d._211,o.p,v.e,o.q,v.f,o.r,v.i,o.s,d._215,g.k,y.a,f._205,v.j,g.l,f._206,o.u,v.h),n&&r.appendTo(n),r}C(t,e),h=t,t.prototype.getCell=function(e,t,n){var r;return this.insideViewport(e,t)&&(n||(n=this.getRow(e,null,t)),t=this.getViewportIndex(t,!0),r=n?n.cells[t]:n),r},t.prototype.getRow=function(e,t,i){if(!t){var a=this.getActiveSheet(),o=this.frozenRowCount(a),s=this.frozenColCount(a);t=n.i(r.isNullOrUndefined)(i)||e>o-1&&i>s-1?this.getContentTable():e<o&&i<s?this.sheetModule.getSelectAllTable():e<o?this.getColHeaderTable():this.getRowHeaderTable()}return e=this.getViewportIndex(e),t?t.rows[e]:null},t.prototype.hiddenCount=function(e,t,n,r){void 0===n&&(n="rows"),void 0===r&&(r=this.getActiveSheet());for(var i,a=0,o=e;o<=t;o++)(i=r[""+n][o])&&i.hidden&&a++;return a},t.prototype.getViewportIndex=function(e,t){var r=this.getActiveSheet(),i=this.frozenColCount(r),a=this.frozenRowCount(r);if(t){if(i){var o=n.i(f.U)(r.topLeftCell)[1];return e<i?(e-=this.hiddenCount(o,e,"columns"),(e-=o)+1):(e-=this.hiddenCount(this.viewport.leftIndex+i,e,"columns"),e-=this.viewport.leftIndex+i)}e-=this.hiddenCount(this.viewport.leftIndex,e,"columns"),e-=this.viewport.leftIndex}else{if(a){var s=n.i(f.U)(r.topLeftCell)[0];return e<a?(e-=this.hiddenCount(s,e),(e-=s)+1):(e-=this.hiddenCount(this.viewport.topIndex+a,e),e-=this.viewport.topIndex+a)}e-=this.hiddenCount(this.viewport.topIndex,e),e-=this.viewport.topIndex}return e},t.prototype.preRender=function(){e.prototype.preRender.call(this),this.serviceLocator=new l.a,this.initServices()},t.prototype.initServices=function(){this.serviceLocator.register(i._174,new r.L10n(this.getModuleName(),i._181,this.locale)),this.serviceLocator.register(i._175,new s.a(this)),this.serviceLocator.register(i._176,new s.b(this)),this.serviceLocator.register(i._177,new s.c(this))},t.prototype.render=function(){if(e.prototype.render.call(this),this.element.setAttribute("tabindex","0"),this.renderModule=new a.a(this),this.renderSpreadsheet(),this.wireEvents(),this.created)if(this.created.observers){if(this.created.observers.length>0){var t={observers:this.created.observers};this.isAngular&&(t={observers:this.created.observers,currentObservers:this.created.observers},this.created.currentObservers=[]),this.createdHandler=t,this.created.observers=[]}}else this.createdHandler=this.created,this.setProperties({created:void 0},!0)},t.prototype.renderSpreadsheet=function(){this.cssClass&&n.i(r.addClass)([this.element],this.cssClass.split(" ")),this.setHeight(),this.setWidth(),n.i(p.createSpinner)({target:this.element},this.createElement),this.isMobileView()&&-1===this.cssClass.indexOf("e-mobile-view")&&this.element.classList.add("e-mobile-view"),r.Browser.isDevice&&this.element.classList.add("e-device"),this.sheetModule=this.serviceLocator.getService("sheet"),this.allowScrolling&&(this.scrollModule=new o.d(this)),this.scrollSettings.enableVirtualization&&new o.e(this),this.renderModule.render(),new o.j(this)},t.prototype.showSpinner=function(){n.i(p.showSpinner)(this.element)},t.prototype.hideSpinner=function(){n.i(p.hideSpinner)(this.element)},t.prototype.protectSheet=function(t,n,r){e.prototype.protectSheet.call(this,t,n,r)},t.prototype.unprotectSheet=function(t){e.prototype.unprotectSheet.call(this,t)},t.prototype.find=function(t){var n=this.getActiveSheet().activeCell;if(e.prototype.findHandler.call(this,t),!t.isAction)return n!==this.getActiveSheet().activeCell?this.getActiveSheet().name+"!"+this.getActiveSheet().activeCell:null},t.prototype.replace=function(t){t={value:t.value,mode:t.mode?t.mode:"Sheet",isCSen:!!t.isCSen&&t.isCSen,isEMatch:!!t.isEMatch&&t.isEMatch,searchBy:t.searchBy?t.searchBy:"By Row",replaceValue:t.replaceValue,replaceBy:t.replaceBy,sheetIndex:n.i(r.isUndefined)(t.sheetIndex)?this.activeSheetIndex:t.sheetIndex,findOpt:t.findOpt?t.findOpt:""},e.prototype.replaceHandler.call(this,t)},t.prototype.findAll=function(e,t,n,r,i){t=t||"Sheet",i=i<this.sheets.length?i:this.activeSheetIndex,n=n||!1,r=r||!1;var a=[],o={value:e,mode:t,sheetIndex:i,isCSen:n,isEMatch:r,findCollection:a};return this.notify(c._25,o),a},t.prototype.goTo=function(e){if(e.includes("!")){var t=n.i(d.e)(this,n.i(d.g)(e));if(void 0===t)return;if(t!==this.activeSheetIndex){var r=e.split("!")[1],a=r.split(":")[0],o=this.sheets[t];this.setSheetPropertyOnMute(o,"activeCell",a),this.setSheetPropertyOnMute(o,"selectedRange",r);var s=n.i(f.U)(a);if(o.frozenColumns||o.frozenRows){var l=n.i(f.U)(o.topLeftCell);if(!(o.frozenRows&&s[0]<l[0]||o.frozenColumns&&s[1]<l[1])){var h=this.frozenRowCount(o),p=this.frozenColCount(o),g=[],m=[],v=n.i(f.U)(o.paneTopLeftCell);h?(g.push(l[0]),s[0]>=h?m.push(s[0]):m.push(v[0])):(g.push(s[0]),m.push(s[0])),p?(g.push(l[1]),s[1]>=p?m.push(s[1]):m.push(v[1])):(g.push(s[1]),m.push(s[1])),this.setSheetPropertyOnMute(o,"topLeftCell",n.i(c.i)(g[0],g[1])),this.setSheetPropertyOnMute(o,"paneTopLeftCell",n.i(c.i)(m[0],m[1]))}}else s[0]<this.viewport.rowCount&&(s[0]=0),s[1]<this.viewport.colCount&&(s[1]=0),this.updateTopLeftCell(s[0],s[1],null,o);return this.activeSheetIndex=t,void this.dataBind()}}var y=n.i(f.T)(e),C=this.getActiveSheet(),b=this.frozenRowCount(C),x=this.frozenColCount(C),S=this.insideViewport(y[0],y[1]);if(S){this.selectRange(e);var w=n.i(f.U)(C.paneTopLeftCell),_=this.viewport.height-this.getScrollElement().parentElement.getBoundingClientRect().height,I=0,E=0;if(b)for(var R=n.i(f.U)(C.topLeftCell),k=R[0];k<b;k++)if((I+=n.i(u.c)(C,k))>_){E=k;break}if(0===E)for(var k=w[0];k<=this.viewport.bottomIndex;k++){if((I+=n.i(u.c)(C,k))>_){E=k;break}k===this.viewport.bottomIndex&&(E=this.viewport.bottomIndex)}w[2]=E;var A=0;if(I=0,_=this.viewport.width-this.sheetModule.getScrollSize(),x)for(var R=n.i(f.U)(C.topLeftCell),k=R[1];k<x;k++)if((I+=n.i(u.b)(C,k))>_){A=k;break}if(0===A)for(var k=w[1];k<=this.viewport.rightIndex;k++){if((I+=n.i(u.b)(C,k))>_){A=k;break}k===this.viewport.rightIndex&&(A=this.viewport.rightIndex)}if(w[3]=A,y[0]>=w[0]&&y[0]<w[2]&&y[1]>=w[1]&&y[1]<w[3])return;if(b||x){if(w=[].concat(n.i(f.U)(C.topLeftCell),[b,w[3]]),y[0]>=w[0]&&y[0]<w[2]&&y[1]>=w[1]&&y[1]<w[3])return;if(w[2]=E,w[3]=x,y[0]>=w[0]&&y[0]<w[2]&&y[1]>=w[1]&&y[1]<w[3])return}}var F,N,T,O,D,L,P=this.getMainContent().parentElement;y[0]===b?T=0:(T=n.i(u.y)(C,b,y[0]-1,!0),this.scrollSettings.enableVirtualization&&(L=T+this.getContentTable().getBoundingClientRect().height,D=parseFloat(P.querySelector(".e-virtualtrack").style.height),L>D&&(L+=10,F=P.querySelector(".e-virtualtrack"),F.style.height=L+"px",n.i(i._115)(function(){F.style.height=D+"px"})))),P.scrollTop=T,P=this.element.getElementsByClassName("e-scroller")[0],y[1]===x?T=0:(T=n.i(d.E)(C,x,y[1]-1,!0),this.scrollSettings.enableVirtualization&&(L=T+this.getContentTable().getBoundingClientRect().width,O=parseFloat(P.querySelector(".e-virtualtrack").style.width),L>O&&(L+=10,F=P.querySelector(".e-virtualtrack"),F.style.width=L+"px",N=this.getColumnHeaderContent().querySelector(".e-virtualtrack"),N.style.width=L+"px",F=this.getMainContent().querySelector(".e-virtualtrack"),F.style.width=L+"px",n.i(i._115)(function(){F.style.width=O+"px",N.style.width=O+"px"})))),P.scrollLeft=T,S||this.selectRange(e)},t.prototype.insideViewport=function(e,t){var r=this.getActiveSheet();if(r.frozenRows||r.frozenColumns){var i=this.frozenRowCount(r),a=this.frozenColCount(r),o=n.i(f.U)(r.topLeftCell);return(e>=o[0]&&e<i||e>=this.viewport.topIndex+i&&e<=this.viewport.bottomIndex)&&(t>=o[1]&&t<a||t>=this.viewport.leftIndex+a&&t<=this.viewport.rightIndex)}return e>=this.viewport.topIndex&&e<=this.viewport.bottomIndex&&t>=this.viewport.leftIndex&&t<=this.viewport.rightIndex},t.prototype.resize=function(){this.renderModule.setSheetPanelSize(),this.scrollSettings.enableVirtualization&&this.renderModule.refreshSheet(!1,!0)},t.prototype.cut=function(e){var t=new Promise(function(e,t){e(void 0)});return this.notify(i.J,e?{range:n.i(f.Z)(e),sId:this.sheets[n.i(d.e)(this,n.i(d.g)(e))]?this.sheets[n.i(d.e)(this,n.i(d.g)(e))].id:this.getActiveSheet().id,promise:t,invokeCopy:!0,isPublic:!0}:{promise:t,invokeCopy:!0,isPublic:!0}),t},t.prototype.copy=function(e){var t=new Promise(function(e,t){e(void 0)});return this.notify(i.K,e?{range:n.i(f.Z)(e),sId:this.sheets[n.i(d.e)(this,n.i(d.g)(e))]?this.sheets[n.i(d.e)(this,n.i(d.g)(e))].id:this.getActiveSheet().id,promise:t,invokeCopy:!0,isPublic:!0}:{promise:t,invokeCopy:!0,isPublic:!0}),t},t.prototype.paste=function(e,t){this.notify(i.L,{range:e?n.i(f.Z)(e):e,sIdx:e?n.i(d.e)(this,n.i(d.g)(e)):e,type:t,isAction:!0,isInternal:!0})},t.prototype.updateAction=function(e){n.i(i._147)(e,this)},t.prototype.setHeight=function(){this.height.toString().indexOf("%")>-1&&(this.element.style.minHeight="400px"),this.element.style.height=n.i(r.formatUnit)(this.height)},t.prototype.setWidth=function(){(this.width.toString().indexOf("%")>-1||"auto"===this.width)&&(this.element.style.minWidth="300px"),this.element.style.width=n.i(r.formatUnit)(this.width)},t.prototype.setColWidth=function(e,t,a){void 0===e&&(e=64),void 0===t&&(t=0);var o=n.i(r.isNullOrUndefined)(a)?this.getActiveSheet():this.sheets[a];if(o){var s=t,l="number"==typeof e?e+"px":e;t=n.i(r.isNullOrUndefined)(t)?n.i(f.U)(o.activeCell)[1]:t;var d=function(){n.i(f.B)(o,s).width=parseInt(l,10)>0?parseInt(l,10):0,o.columns[s].customWidth=!0},c=this.frozenColCount(o);if(o.id===this.getActiveSheet().id){if(t>=this.viewport.leftIndex+c&&t<=this.viewport.rightIndex||c&&t<c){t=this.getViewportIndex(t,!0);var h=n.i(u.b)(o,s,null,!0),p=n.i(i._140)(parseInt(l,10))-h;p<0&&h<-p&&(p=-h),d(),this.notify(i._2,{threshold:p,colIdx:s,checkWrapCell:!0}),n.i(i._143)(s,t,l,!0,this)}else{var g=n.i(u.b)(o,t),p=void 0;p=parseInt(l,10)>0?-(g-parseInt(l,10)):-g,d(),this.notify(i._2,{threshold:p,colIdx:t})}this.notify(i._101,null)}else d()}},t.prototype.setRowHeight=function(e,t,a,o,s){void 0===e&&(e=20),void 0===t&&(t=0);var l=n.i(r.isNullOrUndefined)(a)?this.getActiveSheet():this.sheets[a];if(l){var d=t;if(t=n.i(r.isNullOrUndefined)(t)?n.i(f.U)(l.activeCell)[0]:t,s&&l.rows[t]&&l.rows[t].customHeight)return;var c="number"==typeof e?e+"px":e,h=function(){n.i(u.d)(l,d,parseInt(c,10)>0?parseInt(c,10):0),l.rows[d].customHeight=!0};if(l.id===this.getActiveSheet().id){var p=this.frozenRowCount(l);if(t>=this.viewport.topIndex+p&&t<=this.viewport.bottomIndex||p&&t<p){t=this.getViewportIndex(d);var g=n.i(u.c)(l,d,!0),m=n.i(i._140)(parseInt(c,10))-g;m<0&&g<-m&&(m=-g),h(),this.notify(i._1,{threshold:m,rowIdx:d,isCustomHgt:!0}),n.i(r.isNullOrUndefined)(o)&&(o=!1),o||(n.i(i._143)(d,t,c,!1,this),o=!1)}else{var v=n.i(u.c)(l,t),m=void 0;m=parseInt(c,10)>0?-(v-parseInt(c,10)):-v,h(),this.notify(i._1,{threshold:m,rowIdx:d})}this.notify(i._101,null)}else h()}},t.prototype.setRowsHeight=function(e,t,n){void 0===e&&(e=20),t||(t=["1:"+(this.getActiveSheet().usedRange.rowIndex+1)]),this.setSize(e,t,function(e){return Number(e)-1},this.setRowHeight.bind(this),n)},t.prototype.setColumnsWidth=function(e,t){void 0===e&&(e=64),t||(t=["A:"+n.i(c.a)(this.getActiveSheet().usedRange.colIndex+1)]),this.setSize(e,t,function(e){return n.i(d.V)(e)},this.setColWidth.bind(this))},t.prototype.setSize=function(e,t,r,i,a){var o,s,l,c,h=this;t.forEach(function(t){t.includes("!")?(s=t.split("!"),o=n.i(d.e)(h,s[0]),t=s[1]):o=h.activeSheetIndex,t.includes(":")?(s=t.split(":"),l=r(s[0]),c=r(s[1])):l=c=r(t);for(var p=l;p<=c;p++)i(e,p,o,!1,a)})},t.prototype.autoFit=function(e){var t=this.getIndexes(e),r=t.startIdx,a=t.endIdx,o=t.isCol,s=o?n.i(d.V)("XFD"):1048576;if(r<=s)for(a>s&&(a=s),r;r<=a;r++)this.notify(i._34,{idx:r,isCol:o})},t.prototype.getIndexes=function(e){var t,i,a,o;if(-1!==e.indexOf(":")){var s=e.split(":");a=s[0],o=s[1]}else a=e,o=e;if(!n.i(r.isNullOrUndefined)(a)){var l=this.getAddress(a);a=l.address,t=l.isCol}if(!n.i(r.isNullOrUndefined)(o)){var c=this.getAddress(o);o=c.address,i=c.isCol}var h=!0===t&&!0===i;return{startIdx:h?n.i(d.V)(a.toUpperCase()):parseInt(a,10),endIdx:h?n.i(d.V)(o.toUpperCase()):parseInt(o,10),isCol:h}},t.prototype.getAddress=function(e){var t;return e.substring(0,1).match(/\D/g)?(t=!0,e=e.replace(/[0-9]/g,""),{address:e,isCol:t}):e.substring(0,1).match(/[0-9]/g)&&e.match(/\D/g)?{address:"",isCol:!1}:(e=(parseInt(e,10)-1).toString(),{address:e,isCol:t})},t.prototype.addHyperlink=function(e,t,n){this.insertHyperlink(e,t,n,!0)},t.prototype.removeHyperlink=function(e){this.notify(i._14,{range:e,preventEventTrigger:!0})},t.prototype.insertHyperlink=function(e,t,r,a){if(this.allowHyperlink){var o=void 0,s=void 0,l=void 0,h=this.getActiveSheet();t=t||h.name+"!"+h.activeCell,l=n.i(f.T)(t);for(var p=this.getCell(l[0],l[1]),u=[],g=0;p&&g<p.classList.length;g++)u.push(p.classList[g]);var m={hyperlink:e,address:t,displayText:r,cancel:!1},v={hyperlink:e,address:t,displayText:r};if(a||(this.trigger(d._73,m),this.notify(c._31,{action:"hyperlink",eventArgs:m})),!m.cancel){e=m.hyperlink,t=m.address;var y={hyperlink:e,cell:t,displayText:r,triggerEvt:!a};if(this.notify(d._78,y),t&&-1!==t.indexOf("!")){o=t.split("!");for(var C=this.sheets,b=0;b<C.length;b++)C[b].name===o[0]&&(s=b);h=this.sheets[s],t=o[1]}if(!h)return;if(t=t||this.getActiveSheet().activeCell,l=n.i(f.T)(t),a||(this.trigger(d._74,v),this.notify(i._31,{action:"hyperlink",eventArgs:m})),h===this.getActiveSheet()){this.serviceLocator.getService("cell").refreshRange(l,!1,!1,!1,!0,n.i(i._163)(this));for(var g=0;g<u.length;g++)this.getCell(l[0],l[1]).classList.contains(u[g])||this.getCell(l[0],l[1]).classList.add(u[g]);this.notify(d._127,null)}}}},t.prototype.addDataValidation=function(t,n){e.prototype.addDataValidation.call(this,t,n)},t.prototype.removeDataValidation=function(e){this.notify(c._33,{range:e,isRemoveValidation:!0,viewport:this.viewport})},t.prototype.addInvalidHighlight=function(t){var n=t||this.dataValidationRange;if(n.indexOf(",")>-1){var r="";n.includes("!")&&(r=n.split("!")[0]+"!",n=n.split("!")[1]);for(var i=n.split(","),a=0;a<i.length-1;a++)e.prototype.addInvalidHighlight.call(this,r+i[a])}else e.prototype.addInvalidHighlight.call(this,n)},t.prototype.removeInvalidHighlight=function(t){var n=t||this.dataValidationRange;if(n.indexOf(",")>-1){var r="";n.includes("!")&&(r=n.split("!")[0]+"!",n=n.split("!")[1]);for(var i=n.split(","),a=0;a<i.length-1;a++)e.prototype.removeInvalidHighlight.call(this,r+i[a])}else e.prototype.removeInvalidHighlight.call(this,n)},t.prototype.conditionalFormat=function(t){e.prototype.conditionalFormat.call(this,t)},t.prototype.clearConditionalFormat=function(t){t=t||this.getActiveSheet().selectedRange,e.prototype.clearConditionalFormat.call(this,t)},t.prototype.setPanelSize=function(){if("auto"!==this.height){var e=document.getElementById(this.element.id+"_sheet_panel");e.style.height=this.element.getBoundingClientRect().height-n.i(i._119)(e)+"px"}},t.prototype.open=function(t){this.isOpen=!0,e.prototype.open.call(this,t),this.isOpen&&this.showSpinner()},t.prototype.hideRow=function(t,n,r){void 0===n&&(n=t),void 0===r&&(r=!0),this.renderModule?this.notify(d._118,{startIndex:t,endIndex:n,hide:r}):e.prototype.hideRow.call(this,t,n,r)},t.prototype.hideColumn=function(t,n,r){void 0===n&&(n=t),void 0===r&&(r=!0),this.renderModule?this.notify(d._118,{startIndex:t,endIndex:n,hide:r,isCol:!0}):e.prototype.hideColumn.call(this,t,n,r)},t.prototype.clear=function(e){this.notify(i._62,{options:e})},t.prototype.refresh=function(t){this.isReact&&this.clearTemplate(),t?(this.notify(i.M,null),this.sheets.length=0,this.sheetNameCount=1,this.notify(c._65,{}),this.notify(i._22,null),this.createSheet(),this.activeSheetIndex=this.sheets.length-1,this.notify(i.e,null),this.notify(c.j,{action:"initSheetInfo"}),this.renderModule.refreshSheet(),this.openModule.isImportedFile=this.openModule.preventFormatCheck=!1,this.openModule.unProtectSheetIdx=[]):e.prototype.refresh.call(this)},t.prototype.insertImage=function(e,t){var n;for(n=0;n<e.length;n++)this.notify(i._75,{options:e[n],range:t||this.getActiveSheet().selectedRange,isPublic:!0})},t.prototype.deleteImage=function(e,t){this.notify(i._76,{id:e,range:t||this.getActiveSheet().selectedRange})},t.prototype.getRowHeaderContent=function(){return this.sheetModule.getRowHeaderPanel()},t.prototype.getColumnHeaderContent=function(){return this.sheetModule.getColHeaderPanel()},t.prototype.getMainContent=function(){return this.sheetModule.getContentPanel()},t.prototype.getSelectAllContent=function(){return this.sheetModule.getSelectAllContent()},t.prototype.getScrollElement=function(){return this.sheetModule.getScrollElement()},t.prototype.getContentTable=function(){return this.sheetModule.getContentTable()},t.prototype.getRowHeaderTable=function(){return this.sheetModule.getRowHeaderTable()},t.prototype.getColHeaderTable=function(){return this.sheetModule.getColHeaderTable()},t.prototype.getThreshold=function(e){var t=Math.round((this.viewport[e+"Count"]+1)/2);return t<15?15:t},t.prototype.isMobileView=function(){return(this.cssClass.indexOf("e-mobile-view")>-1||r.Browser.isDevice)&&-1===this.cssClass.indexOf("e-desktop-view")&&!1},t.prototype.getValueRowCol=function(t,n,r,i,a,o,s){return e.prototype.getValueRowCol.call(this,t,n,r,i,a,o,s)},t.prototype.updateCell=function(t,n){n=n||this.getActiveSheet().activeCell,e.prototype.updateCell.call(this,t,n)},t.prototype.getRowData=function(t,n){return e.prototype.getRowData.call(this,t,n)},t.prototype.sort=function(t,n){var r=this;if(!this.allowSorting)return Promise.reject();var a=[];if(this.sortCollection)for(var o=this.sortCollection.length-1;o>=0;o--)this.sortCollection[o]&&this.sortCollection[o].sheetIndex===this.activeSheetIndex&&(a.push(this.sortCollection[o]),this.sortCollection.splice(o,1));return this.notify(i._26,{sortOptions:t}),e.prototype.sort.call(this,t,n,a).then(function(e){return r.notify(d._70,e),Promise.resolve(e)})},t.prototype.setValueRowCol=function(t,r,a,o,s,l){if("circular reference: "===r){var h={action:"isCircularReference",argValue:r};this.notify(i.k,h),r=h.argValue}if(e.prototype.setValueRowCol.call(this,t,r,a,o,s,l),this.allowEditing)this.notify(i.j,{action:"refreshDependentCellValue",rowIdx:a,colIdx:o,sheetIdx:n.i(d.f)(this,t)});else{var p=n.i(d.f)(this,t);if(a--,o--,this.activeSheetIndex===p){var f=n.i(d.l)(this,p),g=void 0;if(n.i(d.v)(f,a)||n.i(d.F)(f,o)||(g=this.getCell(a,o)),g){if(g.parentElement){var m=g.parentElement.getAttribute("aria-rowindex");if(m&&Number(m)-1!==a)return}var v=n.i(u.h)(a,o,f),y={value:v.value,format:v.format,onLoad:!0,formattedText:"",isRightAlign:!1,type:"General",cell:v,rowIndex:a,colIndex:o,isRowFill:!1};this.notify(c.d,y),y.formattedText=this.allowNumberFormatting?y.formattedText:y.value;var C={isRightAlign:y.isRightAlign,result:y.formattedText,type:y.type,value:y.value,curSymbol:y.curSymbol,isRowFill:y.isRowFill};this.refreshNode(g,C)}}}},t.prototype.getModuleName=function(){return"spreadsheet"},t.prototype.refreshNode=function(e,t){var a;if(e){if(t){if(t.result=n.i(r.isNullOrUndefined)(t.result)?"":t.result.toString(),!t.isRowFill){var o=n.i(r.select)(".e-fill",e);o&&(n.i(r.detach)(o),e.style.display="table-cell");var s=n.i(r.select)(".e-fill-sec",e);s&&n.i(r.detach)(s)}var l=n.i(r.select)("#"+this.element.id+"_currency",e);if(l&&n.i(r.detach)(l),"Accounting"===t.type&&n.i(f._190)(t.value)&&t.result.includes(t.curSymbol)){var d=void 0,h=void 0,p=void 0;t.result.trim().endsWith(t.curSymbol)?h=t.result:(d=t.result.includes(" "+t.curSymbol)?" "+t.curSymbol:t.curSymbol,h=t.result.split(d).join(""));var u=e.querySelector(".e-databar-value"),g=e;if(u?(this.refreshNode(u,{result:h}),g=e.querySelector(".e-cf-databar")||e):e.querySelector("a")?e.querySelector("a").textContent=h:(p=!0,e.innerText=""),d){var m=this.createElement("span",{id:this.element.id+"_currency",styles:"float: left"});m.innerText=d,g.appendChild(m)}return p&&(e.innerHTML+=h),void e.classList.add("e-right-align")}var v=void 0;!t.result||"true"!==t.result.toLowerCase()&&"false"!==t.result.toLowerCase()?v="e-right-align":(t.result=t.result.toUpperCase(),v="e-center-align",t.isRightAlign=!0),a=t.result,this.allowWrap||a.toString().includes("\n")&&(a=a.replace(/\n/g,"")),t.isRightAlign?e.classList.add(v):e.classList.remove(v)}a=n.i(r.isNullOrUndefined)(a)?"":a,n.i(r.isNullOrUndefined)(t.rowIndex)||n.i(r.isNullOrUndefined)(t.colIndex)||n.i(r.attributes)(e,{"aria-label":(a?a+" ":"")+n.i(c.i)(t.rowIndex,t.colIndex)});var y=e.lastChild;e.querySelector(".e-databar-value")&&(y=e.querySelector(".e-databar-value").lastChild),e.querySelector(".e-hyperlink")&&(y=e.querySelector(".e-hyperlink").lastChild);var C=e.querySelector(".e-wrap-content");if(C&&(C.lastChild||C.appendChild(document.createTextNode("")),y=C.lastChild),(this.isAngular||this.isVue)&&e.classList.contains("e-cell-template")&&y&&(8===y.nodeType||3===y.nodeType)){if(3===y.nodeType||""!==a){var b=function(){e.childElementCount||(3===y.nodeType?t.isRowFill||(y.nodeValue=a):e.appendChild(document.createTextNode(a)))};this.isAngular?n.i(i._115)(b):b()}}else!y||3!==y.nodeType&&1!==y.nodeType?e.appendChild(document.createTextNode(a)):t.isRowFill||(y.nodeValue=a)}},t.prototype.calculateHeight=function(e,t,n){void 0===t&&(t=1),void 0===n&&(n=1);var r=e&&e.fontSize||this.cellStyle.fontSize,i="Arial Black"===e.fontFamily?1.44:1.24;return(r.indexOf("pt")>-1?1.33*parseInt(r,10):parseInt(r,10))*i*t+n*i},t.prototype.skipHidden=function(e,t,n,r){void 0===n&&(n="rows"),void 0===r&&(r=this.scrollSettings.isFinite);var i,a=this.getActiveSheet();this.scrollSettings.isFinite&&(i=("rows"===n?a.rowCount:a.colCount)-1);for(var o=e;o<=t;o++)if(a[""+n][o]&&a[""+n][o].hidden){if(e===o&&e++,t++,r&&t>i){t=i;break}}else if(!r&&this.scrollSettings.isFinite&&t>i&&a[""+n][o-1]&&a[""+n][o-1].hidden){t--;break}return[e,t]},t.prototype.updateActiveBorder=function(e,t){void 0===t&&(t=".e-ribbon");var i=n.i(r.select)(t+" .e-tab-header .e-indicator",this.element);i.style.display="none",n.i(r.setStyleAttribute)(i,{left:"",right:""}),n.i(r.setStyleAttribute)(i,{left:e.offsetLeft+"px",right:e.parentElement.offsetWidth-(e.offsetLeft+e.offsetWidth)+"px"}),i.style.display=""},t.prototype.undo=function(){this.notify(i._18,{isUndo:!0,isPublic:!0})},t.prototype.redo=function(){this.notify(i._18,{isUndo:!1,isPublic:!0})},t.prototype.updateUndoRedoCollection=function(e){this.notify(i._19,{args:e,isPublic:!0})},t.prototype.addDefinedName=function(e){var t={action:"addDefinedName",isAdded:!1,definedName:e};return this.notify(i.k,t),t.isAdded},t.prototype.removeDefinedName=function(t,n){return e.prototype.removeDefinedName.call(this,t,n)},t.prototype.mouseClickHandler=function(e){this.notify(i.m,e)},t.prototype.mouseDownHandler=function(e){this.notify(i.h,e)},t.prototype.keyUpHandler=function(e){n.i(r.closest)(e.target,".e-find-dlg")?this.notify(d._100,e):this.notify(i.n,e)},t.prototype.keyDownHandler=function(e){var t=n.i(r.closest)(e.target,".e-findtool-dlg");if(t){if(9===e.keyCode){var a=e.target;if(e.shiftKey){if(a.classList.contains("e-text-findNext-short")){var o=t.querySelector(".e-findRib-close .e-tbar-btn");o&&(e.preventDefault(),o.focus())}}else a.classList.contains("e-tbar-btn")&&a.parentElement.classList.contains("e-findRib-close")&&n.i(i._159)(t)}}else this.notify(i.o,e),!this.enableKeyboardNavigation&&document.activeElement.classList.contains("e-cell")&&[38,40,33,34,35,36].indexOf(e.keyCode)>-1&&e.preventDefault()},t.prototype.freeze=function(e){if(!(!this.allowFreezePane||e.row<0||e.column<0)){if(e.triggerEvent){var t={row:e.row,column:e.column,cancel:!1,sheetIndex:this.activeSheetIndex};if(this.notify(c._31,{eventArgs:t,action:"freezePanes"}),t.cancel)return}this.on(i.g,this.freezePaneUpdated,this),this.freezePanes(e.row,e.column),this.notify(d._127,null)}},t.prototype.freezePaneUpdated=function(){this.off(i.g,this.freezePaneUpdated);var e=this.getActiveSheet();n.i(i._159)(this.element),this.notify(i._31,{eventArgs:{row:e.frozenRows,column:e.frozenColumns,sheetIndex:this.activeSheetIndex},action:"freezePanes"})},t.prototype.wireEvents=function(){r.EventHandler.add(this.element,"click",this.mouseClickHandler,this),r.EventHandler.add(this.element,n.i(i._126)(),this.mouseDownHandler,this),r.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),r.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),r.EventHandler.add(this.element,"noderefresh",this.refreshNode,this),this.on(i._98,this.freeze,this),this.on(f._149,this.refreshInsertDelete,this)},t.prototype.destroy=function(){this.isReact&&this.clearTemplate(),this.unwireEvents(),this.notify(i.i,null),e.prototype.destroy.call(this),this.element.innerHTML="",this.element.removeAttribute("tabindex"),this.element.removeAttribute("role"),this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("min-height"),this.element.style.removeProperty("min-width"),this.sheetModule&&this.sheetModule.destroy()},t.prototype.unwireEvents=function(){r.EventHandler.remove(this.element,"click",this.mouseClickHandler),r.EventHandler.remove(this.element,n.i(i._126)(),this.mouseDownHandler),r.EventHandler.remove(this.element,"keyup",this.keyUpHandler),r.EventHandler.remove(this.element,"keydown",this.keyDownHandler),r.EventHandler.remove(this.element,"noderefresh",this.refreshNode),this.off(i._98,this.freeze),this.off(f._149,this.refreshInsertDelete)},t.prototype.refreshInsertDelete=function(e){var t,r,i=this;e.sheet.ranges.forEach(function(a){a.template&&a.address&&(r=n.i(f.T)(a.address),(t=i.updateRangeOnInsertDelete(e,r))&&(a.address=n.i(c.g)(r)))}),this.setSheetPropertyOnMute(e.sheet,"ranges",e.sheet.ranges)},t.prototype.addContextMenuItems=function(e,t,n,r){void 0===n&&(n=!0),this.notify(i.P,{items:e,text:t,insertAfter:n,isUniqueId:r})},t.prototype.removeContextMenuItems=function(e,t){this.notify(i.Q,{items:e,isUniqueId:t})},t.prototype.enableContextMenuItems=function(e,t,n){void 0===t&&(t=!0),this.notify(i.R,{items:e,enable:t,isUniqueId:n})},t.prototype.enableFileMenuItems=function(e,t,n){void 0===t&&(t=!0),this.notify(i.S,{items:e,enable:t,isUniqueId:n})},t.prototype.hideFileMenuItems=function(e,t,n){void 0===t&&(t=!0),this.notify(i.T,{items:e,hide:t,isUniqueId:n})},t.prototype.addFileMenuItems=function(e,t,n,r){void 0===n&&(n=!0),this.notify(i.U,{items:e,text:t,insertAfter:n,isUniqueId:r})},t.prototype.hideRibbonTabs=function(e,t){void 0===t&&(t=!0),this.notify(i.V,{tabs:e,hide:t})},t.prototype.enableRibbonTabs=function(e,t){void 0===t&&(t=!0),this.notify(i.W,{tabs:e,enable:t})},t.prototype.addRibbonTabs=function(e,t){this.notify(i.X,{items:e,insertBefore:t})},t.prototype.enableToolbarItems=function(e,t,n){this.notify(i.F,[{tab:e,items:t,enable:void 0===n||n}])},t.prototype.hideToolbarItems=function(e,t,n){void 0===n&&(n=!0),this.notify(i.Z,{tab:e,indexes:t,hide:n})},t.prototype.addToolbarItems=function(e,t,n){this.notify(i.Y,{tab:e,items:t,index:n})},t.prototype.selectRange=function(e){this.isEdit&&this.notify(i.j,{action:"endEdit"}),this.notify(i.H,{address:e})},t.prototype.selectChart=function(e){this.selectOverlay(e,!0)},t.prototype.selectImage=function(e){this.selectOverlay(e)},t.prototype.selectOverlay=function(e,t){var r=this.getActiveSheet();if(!r.isProtected&&this.allowEditing){if(!e){var a=n.i(f.U)(r.activeCell),o=n.i(u.h)(a[0],a[1],r,!1,!0);t?o.chart&&o.chart.length&&(e=o.chart[o.chart.length-1].id):o.image&&o.image.length&&(e=o.image[o.image.length-1].id)}var s;if(e?(s=this.element.querySelector("#"+e),s.classList.contains("e-ss-overlay")||(s=s.parentElement)):s=this.element.querySelector(".e-ss-overlay"+(t?".e-datavisualization-chart":":not(.e-datavisualization-chart)")),s){var l=void 0,d=this.element.getElementsByClassName("e-ss-overlay-active")[0];d&&(d.classList.remove("e-ss-overlay-active"),(l=d.classList.contains("e-datavisualization-chart"))&&this.notify(i._83,null)),s.classList.add("e-ss-overlay-active"),s.classList.contains("e-datavisualization-chart")?(this.notify(f._133,{id:s.id}),l||this.notify(i._86,{id:s.id})):l&&this.notify(i._87,null)}}},t.prototype.deselectChart=function(){this.notify(i._71,{selector:".e-datavisualization-chart"})},t.prototype.deselectImage=function(){this.notify(i._71,{selector:":not(.e-datavisualization-chart)"})},t.prototype.startEdit=function(){this.notify(i.j,{action:"startEdit",isNewValueEdit:!1})},t.prototype.closeEdit=function(){this.notify(i.j,{action:"cancelEdit"})},t.prototype.endEdit=function(){this.notify(i.j,{action:"endEdit",isPublic:!0})},t.prototype.onPropertyChanged=function(t,a){var o=this;e.prototype.onPropertyChanged.call(this,t,a);for(var s,l=0,h=Object.keys(t);l<h.length;l++){var p=h[l],g=void 0,m=void 0;switch(p){case"enableRtl":if(t.locale)break;if(g=this.getColumnHeaderContent(),g&&(g=g.parentElement),!g)break;if(t.enableRtl?(g.style.marginRight="",document.getElementById(this.element.id+"_sheet_panel").classList.add("e-rtl")):(g.style.marginLeft="",document.getElementById(this.element.id+"_sheet_panel").classList.remove("e-rtl")),this.allowScrolling&&this.scrollModule.setPadding(!0),this.allowAutoFill){var v=this.element.querySelector(".e-dragfill-ddb");if(v){var y=n.i(r.getComponent)(v,"dropdown-btn");y&&(y.enableRtl=t.enableRtl,y.dataBind())}}var C=this.getActiveSheet();if(this.sheetModule.setPanelWidth(C,this.getRowHeaderContent(),!0),this.allowImage||this.allowChart)for(var b=this.element.getElementsByClassName("e-ss-overlay"),x=void 0,S=void 0,w=void 0,_=0,I=b.length-1;_<=I;_++)S=b[0],S.classList.contains("e-datavisualization-chart")&&(w=S.querySelector(".e-accumulationchart"),w?x=n.i(r.getComponent)(w,"accumulationchart"):(w=S.querySelector(".e-chart"),x=w&&n.i(r.getComponent)(w,"chart")),x&&x.destroy()),n.i(r.detach)(S),_===I&&this.notify(f._147,{});var E=this.getScrollElement();E&&(E.scrollLeft=0),this.selectRange(C.selectedRange);break;case"cssClass":a.cssClass&&n.i(r.removeClass)([this.element],a.cssClass.split(" ")),t.cssClass&&n.i(r.addClass)([this.element],t.cssClass.split(" "));break;case"activeSheetIndex":this.renderModule.refreshSheet(),this.notify(i._5,{idx:t.activeSheetIndex});break;case"width":this.setWidth(),this.resize();break;case"height":this.setHeight(),this.resize();break;case"showRibbon":this.notify(i.b,{prop:"showRibbon",onPropertyChange:!0});break;case"showFormulaBar":this.notify(i.c,{uiUpdate:!0});break;case"showSheetTabs":this.notify(i.d,null);break;case"cellStyle":this.renderModule.refreshSheet();break;case"allowEditing":if(this.allowEditing){if(this.notify(i.j,{action:"renderEditor"}),this.enableKeyboardNavigation){this.enableKeyboardNavigation=!1,this.dataBind(),this.enableKeyboardNavigation=!0,this.dataBind();var R=this.selectionSettings.mode;"None"!==R&&(this.selectionSettings.mode="None",this.dataBind(),this.selectionSettings.mode=R,this.dataBind())}}else this.notify(i._71,null);break;case"allowInsert":m=this.element.getElementsByClassName("e-add-sheet-tab")[0],m&&(m.disabled=!this.allowInsert,this.allowInsert?m.classList.contains("e-disabled")&&m.classList.remove("e-disabled"):m.classList.contains("e-disabled")||m.classList.add("e-disabled"));break;case"sheets":if(t.sheets===this.sheets){this.renderModule.refreshSheet(),this.notify(i.e,null),this.notify(c.j,{action:"initSheetInfo"});break}Object.keys(t.sheets).forEach(function(e,l){var c=t.sheets[""+e];if(c.ranges&&Object.keys(c.ranges).length){var h,p=Object.keys(c.ranges);p.forEach(function(e,t){c.ranges[""+e].info||(h=t)}),p.forEach(function(t,i){c.ranges[""+t].dataSource&&(n.i(r.isUndefined)(h)||!n.i(r.isUndefined)(h)&&h===i)&&o.notify(d._29,{sheetIdx:e,rangeIdx:t,isLastRange:p.length-1===i,changedData:c.ranges[""+t].dataSource})})}else if(c.paneTopLeftCell&&a.sheets&&a.sheets[""+e]&&a.sheets[""+e].paneTopLeftCell){if(o.activeSheetIndex!==Number(e))return;var g=n.i(f.U)(c.paneTopLeftCell),m=n.i(f.U)(a.sheets[""+e].paneTopLeftCell);if(g[0]!==m[0]){var v=o.frozenRowCount(o.getActiveSheet()),y=g[0]>v?n.i(u.y)(o.getActiveSheet(),v,g[0]-1):0;o.notify(i._100,{top:y})}if(g[1]!==m[1]){var C=o.frozenColCount(o.getActiveSheet()),b=g[1]>C?n.i(d.E)(o.getActiveSheet(),C,g[1]-1):0;o.notify(i._100,{left:b})}}else if(0===l&&o.renderModule.refreshSheet(),o.showSheetTabs&&c.name&&!s){var x=n.i(r.select)(".e-sheet-tabs-items",o.element),S=Number(e);x.children[S+1]?o.notify(i._16,{items:x,value:c.name,idx:S}):(o.notify(i.e,null),s=!0)}});break;case"locale":this.refresh();break;case"currencyCode":t.locale||this.notify(f._147,{});break;case"password":this.password.length>0&&this.showSheetTabs&&(this.element.querySelector(".e-add-sheet-tab").setAttribute("disabled","true"),this.element.querySelector(".e-add-sheet-tab").classList.add("e-disabled"));break;case"isProtected":if(this.isProtected){var k=this.element.getElementsByClassName("e-add-sheet-tab")[0];k&&(k.disabled=this.isProtected,this.isProtected?k.classList.contains("e-disabled")&&k.classList.add("e-disabled"):k.classList.contains("e-disabled")||k.classList.remove("e-disabled"))}break;case"allowFreezePane":this.notify(i.b,{prop:"allowFreezePane",onPropertyChange:!0});break;case"allowImage":case"allowChart":this.renderModule.refreshSheet(),this.notify(i.b,{prop:p,onPropertyChange:!0})}}},t.prototype.requiredModules=function(){return n.i(i.a)(this)},t.prototype.appendTo=function(t){e.prototype.appendTo.call(this,t)},t.prototype.filter=function(t,n){return this.allowFiltering?(n=n||this.getActiveSheet().selectedRange,e.prototype.filter.call(this,t,n)):Promise.reject()},t.prototype.clearFilter=function(e){this.notify(i._29,{field:e})},t.prototype.applyFilter=function(e,t){var n=this;if(!this.allowFiltering)return Promise.reject();var r=new Promise(function(e,t){e(void 0)});if(e&&e.length){var a;e.forEach(function(e){a={instance:{options:{type:e.type,format:"date"===e.type&&"yMd"}},arg3:e.value,arg2:e.operator},n.notify(m.fltrPrevent,a),e.value=a.arg3})}var o={predicates:e,range:t,isInternal:!0,promise:r};return this.notify(i._23,o),o.promise},t.prototype.addCustomFunction=function(t,n,r){e.prototype.addCustomFunction.call(this,t,n,r),this.notify(i._35,null)};var h;return b([n.i(r.Property)("")],t.prototype,"cssClass",void 0),b([n.i(r.Property)(!0)],t.prototype,"allowScrolling",void 0),b([n.i(r.Property)(!0)],t.prototype,"allowResizing",void 0),b([n.i(r.Property)(!0)],t.prototype,"showAggregate",void 0),b([n.i(r.Property)(!0)],t.prototype,"enableClipboard",void 0),b([n.i(r.Property)(!0)],t.prototype,"enableContextMenu",void 0),b([n.i(r.Property)(!0)],t.prototype,"enableKeyboardNavigation",void 0),b([n.i(r.Property)(!0)],t.prototype,"enableKeyboardShortcut",void 0),b([n.i(r.Property)(!0)],t.prototype,"allowUndoRedo",void 0),b([n.i(r.Property)(!0)],t.prototype,"allowWrap",void 0),b([n.i(r.Complex)({},i._171)],t.prototype,"selectionSettings",void 0),b([n.i(r.Complex)({},i._170)],t.prototype,"scrollSettings",void 0),b([n.i(r.Event)()],t.prototype,"beforeCellRender",void 0),b([n.i(r.Event)()],t.prototype,"beforeSelect",void 0),b([n.i(r.Event)()],t.prototype,"select",void 0),b([n.i(r.Event)()],t.prototype,"contextMenuBeforeOpen",void 0),b([n.i(r.Event)()],t.prototype,"fileMenuBeforeOpen",void 0),b([n.i(r.Event)()],t.prototype,"contextMenuBeforeClose",void 0),b([n.i(r.Event)()],t.prototype,"dialogBeforeOpen",void 0),b([n.i(r.Event)()],t.prototype,"fileMenuBeforeClose",void 0),b([n.i(r.Event)()],t.prototype,"contextMenuItemSelect",void 0),b([n.i(r.Event)()],t.prototype,"fileMenuItemSelect",void 0),b([n.i(r.Event)()],t.prototype,"beforeDataBound",void 0),b([n.i(r.Event)()],t.prototype,"dataBound",void 0),b([n.i(r.Event)()],t.prototype,"dataSourceChanged",void 0),b([n.i(r.Event)()],t.prototype,"cellEdit",void 0),b([n.i(r.Event)()],t.prototype,"cellEditing",void 0),b([n.i(r.Event)()],t.prototype,"cellEdited",void 0),b([n.i(r.Event)()],t.prototype,"cellSave",void 0),b([n.i(r.Event)()],t.prototype,"beforeCellSave",void 0),b([n.i(r.Event)()],t.prototype,"created",void 0),b([n.i(r.Event)()],t.prototype,"beforeSort",void 0),b([n.i(r.Event)()],t.prototype,"beforeHyperlinkCreate",void 0),b([n.i(r.Event)()],t.prototype,"afterHyperlinkCreate",void 0),b([n.i(r.Event)()],t.prototype,"beforeHyperlinkClick",void 0),b([n.i(r.Event)()],t.prototype,"afterHyperlinkClick",void 0),b([n.i(r.Event)()],t.prototype,"beforeConditionalFormat",void 0),b([n.i(r.Event)()],t.prototype,"actionBegin",void 0),b([n.i(r.Event)()],t.prototype,"actionComplete",void 0),b([n.i(r.Event)()],t.prototype,"openComplete",void 0),b([n.i(r.Event)()],t.prototype,"sortComplete",void 0),b([n.i(r.Property)("USD")],t.prototype,"currencyCode",void 0),t=h=b([r.NotifyPropertyChanges],t)}(h.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s});var r=n(3),i=(n.n(r),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(!1)],t.prototype,"isFinite",void 0),a([n.i(r.Property)(!0)],t.prototype,"enableVirtualization",void 0),t}(r.ChildProperty),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("Multiple")],t.prototype,"mode",void 0),t}(r.ChildProperty)},function(e,t,n){"use strict";function r(e){var t=[];return i(e,t),n.i(a.a)(e,t),t}function i(e,t){e.showRibbon&&t.push({member:"ribbon",args:[e]}),e.showFormulaBar&&t.push({member:"formulaBar",args:[e]}),e.showSheetTabs&&t.push({member:"sheetTabs",args:[e]}),e.allowEditing&&(t.push({member:"edit",args:[e]}),t.push({member:"formula",args:[e]})),e.allowOpen&&t.push({member:"open",args:[e]}),e.allowSave&&t.push({member:"save",args:[e]}),e.enableContextMenu&&t.push({member:"contextMenu",args:[e]}),e.allowAutoFill&&t.push({member:"autofill",args:[e]}),"None"!==e.selectionSettings.mode&&t.push({member:"selection",args:[e]}),e.enableKeyboardNavigation&&t.push({member:"keyboardNavigation",args:[e]}),e.allowNumberFormatting&&t.push({member:"numberFormat",args:[e]}),e.enableKeyboardShortcut&&t.push({member:"keyboardShortcut",args:[e]}),e.enableClipboard&&t.push({member:"clipboard",args:[e]}),e.allowCellFormatting&&t.push({member:"cellformat",args:[e]}),e.allowSorting&&t.push({member:"sort",args:[e]}),e.allowResizing&&t.push({member:"resize",args:[e]}),t.push({member:"protectSheet",args:[e]}),t.push({member:"workbookFormula",args:[e]}),t.push({member:"workbookEdit",args:[e]}),e.allowHyperlink&&t.push({member:"spreadsheetHyperlink",args:[e]}),e.allowUndoRedo&&t.push({member:"undoredo",args:[e]}),e.allowFiltering&&t.push({member:"filter",args:[e]}),e.allowWrap&&t.push({member:"wrapText",args:[e]}),e.allowInsert&&t.push({member:"insert",args:[e]}),e.allowDelete&&t.push({member:"delete",args:[e]}),e.allowDataValidation&&t.push({member:"dataValidation",args:[e]}),e.allowFindAndReplace&&t.push({member:"findAndReplace",args:[e]}),e.allowMerge&&t.push({member:"merge",args:[e]}),e.allowConditionalFormat&&t.push({member:"conditionalFormatting",args:[e]}),e.allowImage&&t.push({member:"spreadsheetImage",args:[e]}),e.allowChart&&t.push({member:"spreadsheetChart",args:[e]})}t.a=r;var a=n(29)},function(e,t,n){"use strict";function r(e){requestAnimationFrame(function(){e()})}function i(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function a(e){var t=30;return e.toString().length>3&&(t=10*e.toString().length),t}function o(){if(null!==ue)return ue;var e=document.createElement("div"),t=0;return e.style.cssText="width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth|0,document.body.removeChild(e),ue=t}function s(e,t){return void 0===t&&(t=ge),l(e,"previous",t)+l(e,"next",t)}function l(e,t,n){for(var r=e[t+"ElementSibling"],i=0;r;)n.some(function(e){return r.classList.contains(e)})&&(i+=r.offsetHeight),r=r[t+"ElementSibling"];return i}function d(e,t,n){if(e.scrollSettings.enableVirtualization){var r=e.getActiveSheet(),i=e.frozenRowCount(r),a=e.frozenColCount(r),o=e.viewport.topIndex+i,s=e.viewport.leftIndex+a,l=e.viewport.bottomIndex,d=e.viewport.rightIndex;if(r.frozenRows||r.frozenColumns){if(e.insideViewport(t[0],t[1])||e.insideViewport(t[2],t[3]))return!0}else if(o<=t[0]&&l>=t[2]&&s<=t[1]&&d>=t[3])return!0;var c=!1;if(n){if(t[0]<o&&t[2]<o||t[0]>l&&t[2]>l)return!1;if(t[0]<o&&t[2]>o&&t[0]>=i&&(t[0]=o,c=!0),t[2]>l&&(t[2]=l,c=!0),t[1]<s&&t[3]<s||t[1]>d&&t[3]>d)return!1;t[1]<s&&t[3]>s&&t[1]>=a&&(t[1]=s,c=!0),t[3]>d&&(t[3]=d,c=!0)}return c}return!0}function c(e,t,r,i,a,o,s,l){var d,c={left:{idx:0,size:0},top:{idx:0,size:0}},h=c.top.size,p=c.left.size;for(d=c.top.idx;d<t[0];d++)r&&r-1<t[0]&&d<r||(h+=n.i(de.x)(e,d,!l));for(d=c.left.idx;d<t[1];d++)i&&i-1<t[1]&&d<i||(p+=n.i(de.D)(e,d,null,!l));return r&&t[0]<r&&(e.showHeaders&&(h+=30),a&&(h-=a)),i&&t[1]<i&&(e.showHeaders&&(p+=s||30),o&&(p-=o)),{top:h,left:p}}function h(e,t,r,i,a,o,s){void 0===i&&(i="e-selection");var l=e.getActiveSheet();if(!l.frozenRows&&!l.frozenColumns){var d=u(e,t,r,l,e.enableRtl,0,0,a);return t&&!e.getMainContent().querySelector("."+i)&&e.getMainContent().appendChild(t),d}var c,h=e.frozenRowCount(l),f=e.frozenColCount(l);if("e-active-cell"===i){if(r[0]<h||r[1]<f){t.style.display="none",c=r[0]<h&&r[1]<f?e.getSelectAllContent():r[0]<h?e.getColumnHeaderContent():e.getRowHeaderContent();var g=c.querySelector("."+i);g||(g=t.cloneNode(!0),c.appendChild(g)),t=g,u(e,t,r,l,e.enableRtl,h,f,a,!0,e.viewport.beforeFreezeHeight,e.viewport.beforeFreezeWidth,e.sheetModule.colGroupWidth)}else u(e,t,r,l,e.enableRtl,h,f,a);t.style.display&&(t.style.display=""),p(e.getSelectAllContent(),c,"e-active-cell"),p(e.getColumnHeaderContent(),c,"e-active-cell"),p(e.getRowHeaderContent(),c,"e-active-cell")}else if("e-autofill"===i){var m=void 0,v=e.frozenRowCount(l),y=e.frozenColCount(l);if(r[0]<v||r[1]<y){t.style.display="none",m=r[0]<v&&r[1]<y?e.getSelectAllContent():r[0]<v?e.getColumnHeaderContent():e.getRowHeaderContent();var g=m.querySelector("."+i);g||(g=t.cloneNode(!0),m.appendChild(g)),t=g,u(e,t,r,l,e.enableRtl,v,y,a,!0,e.viewport.beforeFreezeHeight,e.viewport.beforeFreezeWidth,e.sheetModule.colGroupWidth,"e-autofill")}else u(e,t,r,l,e.enableRtl,v,y,a,!1,0,0,0,"e-autofill");t.style.display&&(t.style.display=""),p(e.getSelectAllContent(),m,"e-autofill"),p(e.getColumnHeaderContent(),m,"e-autofill"),p(e.getRowHeaderContent(),m,"e-autofill")}else if("e-filloption"===i){var m=void 0,v=e.frozenRowCount(l),y=e.frozenColCount(l);if(r[0]<v||r[1]<y)if(r[3]+1===y&&r[2]+1>v)u(e,e.getMainContent().querySelector(".e-filloption"),r,l,e.enableRtl,v,y,a,!1,0,0,0,"e-filloption",!0,{left:-4});else if(r[2]+1===v&&r[3]+1>y)u(e,e.getMainContent().querySelector(".e-filloption"),r,l,e.enableRtl,v,y,a,!1,0,0,0,"e-filloption",!0,{top:-4});else if(r[3]+1===y&&r[2]+1<v){m=e.getColumnHeaderContent();var C=m.querySelector("."+i);C||e.notify(de._143,{id:e.element.id+"_autofilloptionbtn",appendElem:m}),t=e.autofillModule.autoFillDropDown.element,u(e,t,r,l,e.enableRtl,v,y,a,!1,0,0,0,"e-filloption",!0,{left:-4})}else if(r[2]+1===v&&r[3]+1===y)u(e,e.getMainContent().querySelector(".e-filloption"),r,l,e.enableRtl,v,y,a,!1,0,0,0,"e-filloption",!0,{top:-4,left:-4});else{m=r[0]<v&&r[1]<y?e.getSelectAllContent():r[0]<v?e.getColumnHeaderContent():e.getRowHeaderContent();var g=m.querySelector("."+i);g||e.notify(de._143,{id:e.element.id+"_autofilloptionbtn",appendElem:m}),t=e.autofillModule.autoFillDropDown.element,u(e,t,r,l,e.enableRtl,v,y,a,!0,e.viewport.beforeFreezeHeight,e.viewport.beforeFreezeWidth,e.sheetModule.colGroupWidth,"e-filloption",!0)}else u(e,e.getMainContent().querySelector(".e-filloption"),r,l,e.enableRtl,v,y,a,!1,0,0,0,"e-filloption",!0);t.style.display&&(t.style.display=""),p(e.getSelectAllContent(),m,"e-filloption"),p(e.getColumnHeaderContent(),m,"e-filloption"),p(e.getRowHeaderContent(),m,"e-filloption")}else{var b=n.i(de._4)(r);if(b[0]<h||b[1]<f){t&&!t.classList.contains("e-multi-range")&&t.classList.add("e-hide");var x=[];b[0]<h&&b[1]<f?b[2]<h&&b[3]<f?(x.push(r),o||(p(e.getColumnHeaderContent(),c,i,!0),p(e.getRowHeaderContent(),c,i,!0))):b[2]>h-1?b[3]<f?(o||p(e.getColumnHeaderContent(),c,i,!0),x.push([b[0],b[1],h-1,b[3]]),x.push([h,b[1],b[2],b[3]])):(x.push([b[0],b[1],h-1,f-1]),x.push([h,b[1],b[2],f-1]),x.push([b[0],f,h-1,b[3]]),x.push([h,f,b[2],b[3]])):b[2]<h?(x.push([b[0],b[1],b[2],f-1]),x.push([b[0],f,b[2],b[3]]),o||p(e.getRowHeaderContent(),c,i,!0)):(x.push([h,b[1],b[2],f-1]),x.push([b[0],b[1],h-1,f-1]),x.push([h,f,b[2],b[3]]),x.push([b[0],f,h-1,b[3]])):b[0]<h?b[2]<h?(x.push(r),o||p(e.getRowHeaderContent(),c,i,!0)):(x.push([b[0],b[1],h-1,b[3]]),x.push([h,b[1],b[2],b[3]]),o||(p(e.getSelectAllContent(),c,i,!0),p(e.getRowHeaderContent(),c,i,!0))):b[3]<f?(x.push(r),o||p(e.getSelectAllContent(),c,i,!0)):(x.push([b[0],b[1],b[2],f-1]),x.push([b[0],f,b[2],b[3]]),o||(p(e.getSelectAllContent(),c,i,!0),p(e.getColumnHeaderContent(),c,i,!0)));var S;x.forEach(function(r){c=r[2]<h&&r[3]<f?e.getSelectAllContent():r[2]<h?e.getColumnHeaderContent():r[3]<f?e.getRowHeaderContent():e.getMainContent();var d;"e-copy-indicator"===i||"e-range-indicator"===i?(d=t.cloneNode(!0),c.appendChild(d),h&&(r[2]+1===h&&x.forEach(function(e){e!==r&&(S=d.getElementsByClassName("e-bottom")[0])&&e[0]===h&&n.i(oe.detach)(S)}),r[0]===h&&c.parentElement.classList.contains("e-main-panel")&&x.forEach(function(e){e!==r&&(S=d.getElementsByClassName("e-top")[0])&&e[2]+1===h&&n.i(oe.detach)(S)})),f&&(r[3]+1===f&&x.forEach(function(e){e!==r&&(S=d.getElementsByClassName("e-right")[0])&&e[1]===f&&n.i(oe.detach)(S)}),r[1]===f&&(c.classList.contains("e-sheet-content")||c.classList.contains("e-column-header"))&&x.forEach(function(e){e!==r&&(S=d.getElementsByClassName("e-left")[0])&&e[3]+1===f&&n.i(oe.detach)(S)}))):(d=c.querySelector("."+i),d||(d=t.cloneNode(!0),o&&!d.classList.contains("e-multi-range")&&d.classList.add("e-multi-range"),c.appendChild(d)),s&&d.classList.remove(i)),u(e,d,r,l,e.enableRtl,h,f,a,!1,e.viewport.beforeFreezeHeight,e.viewport.beforeFreezeWidth,e.sheetModule.colGroupWidth),d.classList.contains("e-hide")&&d.classList.remove("e-hide")})}else o||(p(e.getSelectAllContent(),null,i,!0),p(e.getColumnHeaderContent(),null,i,!0),p(e.getRowHeaderContent(),null,i,!0)),u(e,t,r,l,e.enableRtl,h,f,a),"e-range-indicator"!==i&&e.getMainContent().querySelector("."+i)||e.getMainContent().appendChild(t),t.classList.contains("e-hide")&&t.classList.remove("e-hide"),s&&t.classList.remove(i)}}function p(e,t,r,i,a){if(i||e!==t)if(a)for(var o=e.querySelectorAll("."+r),s=0;s<o.length;)o[s].classList.remove(r),s++;else{var l=e.querySelector("."+r);l&&!l.classList.contains("e-multi-range")&&n.i(oe.detach)(l)}}function u(e,t,r,i,a,o,s,l,d,h,p,u,g,m,v){var y,C,b=n.i(de._4)(r),x=c(i,b,o,s,h,p,u),S=[n.i(de._172)(i,0,!0),n.i(de._172)(i,0,!0,"columns")];e.scrollSettings.isFinite?(y=b[0]>=i.rowCount?0:n.i(de.z)(i,b[0],b[2]<i.rowCount?b[2]:i.rowCount-1,!0),C=b[1]>=i.colCount?0:n.i(de.E)(i,b[1],b[3]<i.colCount?b[3]:i.colCount-1,!0)):(y=n.i(de.z)(i,b[0],b[2],!0),C=n.i(de.E)(i,b[1],b[3],!0));var w=0===b[1]&&b[3]===i.colCount-1,_=0===b[0]&&b[2]===i.rowCount-1,I=0,E=-5,R=-5,k=0,F=6,N=6;if(n.i(oe.isNullOrUndefined)(g)){var T={top:(b[0]===S[0]?x.top:x.top-A(1))+"px",height:y&&y+(b[0]===S[0]?0:A(1))+"px",width:C&&C+(b[1]===S[1]?0:A(1))+(d&&s&&b[1]<s&&b[3]>=s?1:0)+"px"};if(T[a?"right":"left"]=(b[1]===S[1]?x.left:x.left-1)+"px",t){return f([{element:t,attrs:T}],l)}}else{w&&(E=-5,R=-2,F=6,N=3),_&&(R=-5,E=0,F=1,N=6),_||(I+=y),w||(k+=C),I+=Math.round(x.top)+E,k+=Math.round(x.left)+R;var T={};m?(n.i(oe.removeClass)([t],"e-hide"),I=v&&v.top?v.top:I,k=v&&v.left?v.left:k,T={top:I+F+"px"},T[a?"right":"left"]=k+N+"px",t&&f([{element:t,attrs:T}],l)):(T={top:I+"px"},T[a?"right":"left"]=k+"px",t&&f([{element:t,attrs:T}],l))}}function f(e,t){return new Promise(function(r){var i=function(){e.forEach(function(e){n.i(oe.setStyleAttribute)(e.element,e.attrs),r()})};t?i():requestAnimationFrame(function(){return i()})})}function g(){return oe.Browser.isPointer?"pointerdown":"mousedown touchstart"}function m(){return oe.Browser.isPointer?"pointermove":"mousemove touchmove"}function v(){return oe.Browser.isPointer?"pointerup":"mouseup touchend"}function y(e){return"touchstart"===e.type||"pointerdown"===e.type&&"touch"===e.pointerType}function C(e){return"touchmove"===e.type||"pointermove"===e.type&&"touch"===e.pointerType}function b(e){return"touchend"===e.type||"pointerup"===e.type&&"touch"===e.pointerType}function x(e){return e&&("mousedown"===e.type||"pointerdown"===e.type)}function S(e){return e&&("mousemove"===e.type||"pointermove"===e.type)}function w(e){return e&&("mouseup"===e.type||"pointerup"===e.type)}function _(e){return e===pe.i.UP||e===pe.i.DOWN||e===pe.i.LEFT||e===pe.i.RIGHT}function I(e){return e.changedTouches?e.changedTouches[0].clientX:e.clientX}function E(e){return e.changedTouches?e.changedTouches[0].clientY:e.clientY}function R(e){return e.changedTouches?e.changedTouches[0].pageX:e.pageX}function k(e){return e.changedTouches?e.changedTouches[0].pageY:e.pageY}function A(e,t){if(window.devicePixelRatio%1>0){var n=e*window.devicePixelRatio%1;return e+(n?(n>.5||t?1-n:-1*n)/window.devicePixelRatio:0)}return e}function F(e,t){Object.keys(t).forEach(function(n){e&&e.setAttribute(me[""+n],t[""+n])})}function N(e,t){if(e){var r=n.i(oe.getComponent)(e,t);r&&r.destroy()}}function T(e,t,n,r,i){var a,o,s,l,d,c,h,p,u,f=i.getActiveSheet(),g=i.frozenRowCount(f),m=i.frozenColCount(f);if(r){var v=e<m?i.getSelectAllContent():i.getColumnHeaderContent();a=v.getElementsByTagName("th")[t],o=v.getElementsByTagName("col")[t],s=(e<m?i.getRowHeaderContent():i.getMainContent()).getElementsByTagName("col")[t]}else{a=o=g||m?i.getRow(e,null,m-1):i.getRow(e,i.getRowHeaderTable()),o.style.height=parseInt(n,10)>0?A(parseInt(n,10))+"px":"2px",s=i.getRow(e,null,m),s.style.height=parseInt(n,10)>0?A(parseInt(n,10))+"px":"0px";var y=void 0;if(f.showHeaders){var C=i.getRowHeaderContent().getElementsByClassName("e-row"),b=[];b[0]=C[t].getElementsByTagName("td")[0].cloneNode(!0),y=L(i.getRowHeaderTable(),b,!1,i)+1}for(var x=i.getMainContent().getElementsByClassName("e-row"),S=[],w=0;w<x[t].getElementsByTagName("td").length;w++)S[w]=x[t].getElementsByTagName("td")[w].cloneNode(!0);var _=L(i.getContentTable(),S,!1,i)+1,I=y>=_?y:_;parseInt(s.style.height,10)<I||a&&a.classList.contains("e-reach-fntsize")&&parseInt(s.style.height,10)===I?(f.showHeaders&&(a.classList.add("e-reach-fntsize"),o.style.lineHeight=parseInt(n,10)>=4?parseInt(n,10)-4+"px":parseInt(n,10)>0?parseInt(n,10)-1+"px":"0px"),s.style.lineHeight=parseInt(n,10)>0?parseInt(n,10)-1+"px":"0px"):(o&&o.style.removeProperty("line-height"),s.style.removeProperty("line-height"),a&&a.classList.contains("e-reach-fntsize")&&a.classList.remove("e-reach-fntsize"))}if(c=s.previousElementSibling,u=s.nextElementSibling,c&&(f.showHeaders&&(l=a.previousElementSibling,d=o.previousElementSibling),c=s.previousElementSibling),u&&(f.showHeaders&&(h=a.nextElementSibling,p=o.nextElementSibling),u=s.nextElementSibling),parseInt(n,10)<=0&&!s.classList.contains("e-zero")&&!s.classList.contains("e-zero-start")){if(c&&u)if(r?(f.showHeaders&&(o.style.width="2px"),s.style.width="0px"):(f.showHeaders&&(o.style.height="2px"),s.style.height="0px"),c.classList.contains("e-zero-start")?(f.showHeaders&&a.classList.add("e-zero-start"),s.classList.add("e-zero-start")):(f.showHeaders&&a.classList.add("e-zero"),s.classList.add("e-zero")),!h||h.classList.contains("e-zero")||h.classList.contains("e-zero-last")||(f.showHeaders&&a.classList.add("e-zero-last"),s.classList.add("e-zero-last")),c.classList.contains("e-zero-last")&&(f.showHeaders&&l.classList.remove("e-zero-last"),c.classList.remove("e-zero-last")),f.showHeaders&&l.classList.contains("e-zero")?(a.classList.contains("e-zero-end"),O(d,-2,r)):f.showHeaders&&O(d,-1,r),f.showHeaders&&l.classList.contains("e-zero-start")&&O(o,-1,r),f.showHeaders&&h.classList.contains("e-zero"))if(a.classList.contains("e-zero-start"))for(;h;){if(h.classList.contains("e-zero")&&0!==parseInt(p.style.height,10)&&!r||0!==parseInt(p.style.width,10)&&r){r?(o.style.width=parseInt(o.style.width,10)-1+"px",p.style.width=parseInt(p.style.width,10)-1+"px"):(o.style.height=parseInt(o.style.height,10)-1+"px",p.style.height=parseInt(p.style.height,10)-1+"px"),h.classList.remove("e-zero"),h.classList.add("e-zero-start");break}var E=void 0;h.classList.remove("e-zero"),h.classList.add("e-zero-start"),r?(E=parseInt(h.getAttribute("aria-colindex"),10)-1,h=i.getColHeaderTable().getElementsByTagName("th")[E+1],p=i.getColHeaderTable().getElementsByTagName("col")[E+1]):(E=parseInt(h.getAttribute("aria-rowindex"),10)-1,h=i.getRowHeaderTable().getElementsByTagName("tr")[E+1],p=i.getRowHeaderTable().getElementsByTagName("tr")[E+1])}else O(o,-2,r);else f.showHeaders&&(h.classList.contains("e-zero-end")?r?o.style.width="0px":o.style.height="0px":O(p,-1,r));else if(c)r?(f.showHeaders&&(o.style.width="1px"),s.style.width="0px"):(f.showHeaders&&(o.style.height="1px"),s.style.height="0px"),f.showHeaders&&a.classList.add("e-zero-end"),s.classList.add("e-zero-end"),f.showHeaders&&a.classList.add("e-zero-last"),s.classList.add("e-zero-last"),f.showHeaders&&l.classList.contains("e-zero")?O(d,-2,r):O(d,-1,r);else if(h)if(a.classList.add("e-zero-start"),s.classList.add("e-zero-start"),h.classList.contains("e-zero")||(a.classList.add("e-zero-last"),s.classList.add("e-zero-last")),r?(o.style.width="1px",s.style.width="0px"):(o.style.height="1px",s.style.height="0px"),f.showHeaders&&h.classList.contains("e-zero"))for(;h;){if(h.classList.contains("e-zero")&&0!==parseInt(p.style.width,10)&&r||0!==parseInt(p.style.height,10)&&!r){r?(p.style.width=parseInt(p.style.width,10)-1+"px",o.style.width=parseInt(o.style.width,10)-1+"px"):(p.style.height=parseInt(p.style.height,10)-1+"px",o.style.height=parseInt(o.style.height,10)-1+"px"),h.classList.add("e-zero-start"),h.classList.remove("e-zero");break}var E=void 0;h.classList.add("e-zero-start"),h.classList.remove("e-zero"),r?(E=parseInt(h.getAttribute("aria-colindex"),10)-1,p=i.getColHeaderTable().getElementsByTagName("col")[E+1],h=i.getColHeaderTable().getElementsByTagName("th")[E+1]):(E=parseInt(h.getAttribute("aria-rowindex"),10)-1,p=i.getRowHeaderTable().getElementsByTagName("tr")[E+1],h=i.getRowHeaderTable().getElementsByTagName("tr")[E+1])}else f.showHeaders&&O(p,-1,r)}else if(parseInt(n,10)>0){var R=A(parseInt(n,10))+"px";r?(o.style.width=R,s.style.width=R):(o.style.height=R,s.style.height=R),f.showHeaders&&l&&h?(l.classList.contains("e-zero")?a.classList.contains("e-zero")?r?(d.style.width=parseInt(d.style.width,10)+2+"px",o.style.width=parseInt(o.style.width,10)-1+"px"):(d.style.height=parseInt(d.style.height,10)+2+"px",o.style.height=parseInt(o.style.height,10)-1+"px"):O(o,-1,r):a.classList.contains("e-zero")?O(d,1,r):a.classList.contains("e-zero-start")&&(r?(d.style.width=parseInt(d.style.width,10)+1+"px",o.style.width=parseInt(o.style.width,10)-1+"px"):(d.style.height=parseInt(d.style.height,10)+1+"px",o.style.height=parseInt(o.style.height,10)-1+"px")),h.classList.contains("e-zero")?O(o,-1,r):(a.classList.contains("e-zero")||a.classList.contains("e-zero-start"))&&O(p,1,r),a.classList.contains("e-zero")&&a.classList.remove("e-zero"),a.classList.contains("e-zero-start")&&a.classList.remove("e-zero-start"),s.classList.contains("e-zero")&&s.classList.remove("e-zero"),s.classList.contains("e-zero-start")&&s.classList.remove("e-zero-start"),a.classList.contains("e-zero-last")&&a.classList.remove("e-zero-last"),s.classList.contains("e-zero-last")&&s.classList.remove("e-zero-last"),(l.classList.contains("e-zero")||l.classList.contains("e-zero-start"))&&(l.classList.add("e-zero-last"),c.classList.add("e-zero-last"))):f.showHeaders&&l?(l.classList.contains("e-zero")?a.classList.contains("e-zero")?r?(o.style.width=parseInt(o.style.width,10)-1+"px",d.style.width=parseInt(d.style.width,10)+2+"px"):(o.style.height=parseInt(o.style.height,10)-1+"px",d.style.height=parseInt(d.style.height,10)+2+"px"):O(o,-1,r):a.classList.contains("e-zero")?O(d,1,r):O(o,-1,r),a.classList.contains("e-zero")&&a.classList.remove("e-zero"),a.classList.contains("e-zero-end")&&a.classList.remove("e-zero-end"),s.classList.contains("e-zero")&&s.classList.remove("e-zero"),s.classList.contains("e-zero-end")&&s.classList.remove("e-zero-end")):f.showHeaders&&h&&(h.classList.contains("e-zero")?O(o,-1,r):a.classList.contains("e-zero-start")&&(O(p,1,r),a.classList.remove("e-zero-start")),a.classList.contains("e-zero")&&a.classList.remove("e-zero"),s.classList.contains("e-zero")&&s.classList.remove("e-zero"),a.classList.contains("e-zero-start")&&a.classList.remove("e-zero-start"),s.classList.contains("e-zero-start")&&s.classList.remove("e-zero-start"))}}function O(e,t,n){n?e.style.width=parseInt(e.style.width,10)+t+"px":e.style.height=parseInt(e.style.height,10)+t+"px"}function D(e){fe=e}function L(e,t,n,r,i,a){var o=r.createElement("div",{className:r.element.className,styles:"display: block"}),s=r.createElement("table",{className:e.className+"e-resizetable",styles:"width: auto;height: auto"}),l=r.createElement("tr");n?t.forEach(function(e){var t=l.cloneNode();t.appendChild(e),s.appendChild(t)}):(t.forEach(function(e){l.appendChild(e.cloneNode(!0))}),s.appendChild(l)),o.appendChild(s),document.body.appendChild(o);var d,c,h=s.getBoundingClientRect().width,p=s.getBoundingClientRect().height;return a?(d=n&&parseInt(i,10)>h?h:parseInt(i,10),c=!n&&parseInt(i,10)>p?p:parseInt(i,10)):(c=p,d=h),document.body.removeChild(o),n?Math.ceil(d):Math.ceil(c)}function P(e,t,i,a,o,s){var l,d,c,h,p,u,f,g,m,v,y,C,b,x=e.eventArgs,S=e.isFromUpdateAction||n.i(oe.isUndefined)(i);if(e.isUndoRedo)return S=e.isFromUpdateAction=!0,delete e.isUndoRedo,void t.notify(he._43,e);if(S&&!s){var w=x.address||x.range||x.pastedRange||x.addressCollection&&x.addressCollection[0]||x.dataRange,_=n.i(oe.isUndefined)(x.sheetIndex)?n.i(oe.isUndefined)(x.sheetIdx)?n.i(oe.isUndefined)(x.activeSheetIndex)?w?n.i(de._3)(t,w):t.activeSheetIndex:x.activeSheetIndex:x.sheetIdx:x.sheetIndex;if(_!==t.activeSheetIndex){var I={sheet:n.i(de.l)(t,_),resolveAfterFullDataLoaded:!0,indexes:[0,0,0,0],promise:new Promise(function(e){e(void 0)})};return t.notify(de._28,I),void I.promise.then(function(){P(e,t,i,a,o,!0)})}}var E,R,k;switch(e.action){case"sorting":c={range:e.eventArgs.range,sortOptions:e.eventArgs.sortOptions,cancel:!1},h=new Promise(function(e,t){e(void 0)}),p={args:c,promise:h},t.notify(de._68,p),p.promise.then(function(e){t.serviceLocator.getService("cell").refreshRange(n.i(de.Z)(e.range))});break;case"cellSave":u=e.eventArgs,E={element:u.element,value:u.value,oldValue:u.oldValue,address:u.address,displayText:u.displayText,formula:u.formula,originalEvent:u.originalEvent},f=E.formula?{formula:E.formula}:{value:E.value},t.updateCell(f,E.address),!0===i&&t.trigger("cellSave",E);break;case"cellDelete":R=n.i(de._2)(t,e.eventArgs.address),J(t,R.indices,R.sheetIndex);break;case"format":if("CellFormat"===x.requestType){if(x.style&&x.style.border&&!n.i(oe.isNullOrUndefined)(x.borderType)){var A={};Object.assign(A,x.style,null,!0),x.style.border=void 0,t.notify(de._43,{style:x.style,refreshRibbon:!0,range:x.range}),x.style.border=A.border,t.setBorder(x.style,x.range,x.borderType),x.style=A}else t.notify(de._43,{style:x.style,refreshRibbon:!0,range:x.range});r(function(){return t.selectRange(t.getActiveSheet().selectedRange)})}else t.numberFormat(x.format,x.range);break;case"clipboard":g=new Promise(function(e){e(void 0)}),b=t.getAddressInfo(x.copiedRange),t.notify(x.copiedInfo.isCut?he._10:he._11,{range:b.indices,sId:n.i(de.l)(t,b.sheetIndex).id,promise:h,invokeCopy:!0,isPublic:!0,isFromUpdateAction:!0}),g.then(function(){return t.notify(he._12,{range:n.i(de.Z)(x.pastedRange),sIdx:n.i(de.e)(t,n.i(de.g)(x.pastedRange)),type:x.type,isAction:!1,isInternal:!0,isFromUpdateAction:!0})});break;case"gridLines":t.setSheetPropertyOnMute(t.sheets[x.sheetIdx],"showGridLines",x.isShow),t.serviceLocator.getService("sheet").toggleGridlines(),t.notify(de._127,null);break;case"headers":t.setSheetPropertyOnMute(t.sheets[x.sheetIdx],"showHeaders",x.isShow),t.serviceLocator.getService("sheet").showHideHeaders(),t.notify(de._127,null);break;case"resize":case"resizeToFit":S&&(v=t.sheets[x.sheetIndex],y=n.i(de.B)(v,x.index),C=n.i(de.t)(v,x.index),(x.isCol&&y&&y.hidden||C&&C.hidden)&&t.notify(de._118,{startIndex:x.index,endIndex:x.index,hide:!1,isCol:x.isCol,sheetIndex:x.sheetIndex})),x.isCol?void 0===x.hide?t.setColWidth(S&&!n.i(oe.isUndefined)(i)?x.oldWidth:x.width,x.index,x.sheetIndex):t.hideColumn(x.index,x.index,x.hide):void 0===x.hide?t.setRowHeight(S&&!n.i(oe.isUndefined)(i)?x.oldHeight:x.height,x.index,x.sheetIndex):t.hideRow(x.index,x.index,x.hide);break;case"renameSheet":var _=n.i(de.f)(t,x.index);t.setSheetPropertyOnMute(t.sheets[_],"name",x.value),t.notify(he._41,{items:t.element.querySelector(".e-sheet-tabs-items"),value:x.value,idx:_});break;case"hideSheet":t.notify(he._42,{sheetIndex:x.sheetIndex});break;case"showSheet":t.notify(he._79,x);break;case"removeSheet":t.notify(ce.B,{index:x.index,isAction:!0,count:x.sheetCount,clicked:!0});break;case"gotoSheet":t.notify(he._78,{selectedIndex:x.currentSheetIndex,previousIndex:x.previousSheetIndex});break;case"moveSheet":n.i(de.q)(t,x.position,x.sheetIndexes,null,S);break;case"wrap":n.i(de.L)(e.eventArgs.address,e.eventArgs.wrap,t);break;case"hideShow":x.isCol?t.notify(de._118,{startIndex:x.startIndex,endIndex:x.endIndex,isCol:!0,hide:!1===i?!x.hide:x.hide,sheetIndex:x.sheetIndex}):t.notify(de._118,{startIndex:x.startIndex,endIndex:x.endIndex,hide:!1===i?!x.hide:x.hide,sheetIndex:x.sheetIndex});break;case"replace":t.notify(de._97,{value:x.compareValue,replaceValue:x.replaceValue,sheetIndex:x.sheetIndex,address:x.address});break;case"replaceAll":t.notify(de._98,x);break;case"filter":h=new Promise(function(e,t){e(void 0)}),!1===i?t.notify(ce._23,{predicates:x.previousPredicates,range:x.range,sIdx:x.sheetIndex,promise:h,isInternal:!0}):t.notify(ce._23,{predicates:x.predicates,range:x.range,sIdx:x.sheetIndex,promise:h,isInternal:!0,useFilterRange:x.useFilterRange,allowHeaderFilter:x.allowHeaderFilter}),o&&!S&&h.then(function(){t.notify(se._31,n.i(oe.extend)({isUndo:!i,isUndoRedo:!S},o))});break;case"insert":if("Sheet"===e.eventArgs.modelType)v=t;else if(!(v=n.i(de.l)(t,e.eventArgs.activeSheetIndex)))break;!1===i?t.notify(de._89,{model:v,start:e.eventArgs.index,isUndoRedo:!0,end:e.eventArgs.index+(e.eventArgs.model.length-1),modelType:e.eventArgs.modelType}):t.notify(de._88,{model:v,start:e.eventArgs.index,end:e.eventArgs.index+(e.eventArgs.model.length-1),modelType:e.eventArgs.modelType,checkCount:void 0===i?e.eventArgs.sheetCount:null,activeSheetIndex:e.eventArgs.activeSheetIndex,isUndoRedo:!0,insertType:e.eventArgs.insertType,isFromUpdateAction:S});break;case"delete":if("Sheet"===e.eventArgs.modelType)v=t;else if(!(v=n.i(de.l)(t,e.eventArgs.activeSheetIndex)))break;!1===i?t.notify(de._88,{model:v,start:e.eventArgs.deletedModel,modelType:e.eventArgs.modelType,columnCellsModel:e.eventArgs.deletedCellsModel,definedNames:e.eventArgs.definedNames,activeSheetIndex:e.eventArgs.activeSheetIndex,isUndoRedo:!0,insertType:"Row"===e.eventArgs.modelType?"above":"before",conditionalFormats:e.eventArgs.conditionalFormats,prevAction:e.action}):t.notify(de._89,{model:v,start:e.eventArgs.startIndex,checkCount:e.eventArgs.sheetCount,end:e.eventArgs.endIndex,modelType:e.eventArgs.modelType,isUndoRedo:!0,insertType:"Row"===e.eventArgs.modelType?"above":"before"});break;case"validation":!1===i?t.notify(se._57,{range:x.range}):t.notify(de._91,{rules:{type:x.type,operator:x.operator,value1:x.value1,value2:x.value2,ignoreBlank:x.ignoreBlank,inCellDropDown:x.inCellDropDown},range:x.range});break;case"removeHighlight":case"addHighlight":t.notify(le._40,{isRemoveHighlight:"removeHighlight"===e.action?!1!==i:!1===i,range:x.range,isPublic:!0});break;case"merge":e.eventArgs.isAction=!1,m=[];for(var F=0,N=x.model.length;F<N;F++){m.push({cells:[]});for(var T=0,O=x.model[F].cells.length;T<O;T++)m[F].cells[T]={},Object.assign(m[F].cells[T],x.model[F].cells[T])}t.notify(de._113,e.eventArgs),x.model=m;break;case"clear":k={options:e.eventArgs,isFromUpdateAction:S},t.notify(se._62,k),!S&&k.cfClearActionArgs&&(x.cfClearActionArgs.previousConditionalFormats=k.cfClearActionArgs.previousConditionalFormats,x.cfClearActionArgs.conditionalFormats=k.cfClearActionArgs.conditionalFormats);break;case"conditionalFormat":!1===i?t.notify(de._121,{range:x.range,cfModel:{type:x.type,cFColor:x.cFColor,value:x.value},sheetIdx:x.sheetIdx,isUndoRedo:!x.cancel,isFromUpdateAction:S}):t.notify(de._119,{cfModel:{type:x.type,cFColor:x.cFColor,value:x.value,range:x.range},sheetIdx:x.sheetIdx,isUndoRedo:!0,isFromUpdateAction:S});break;case"clearCF":if(!1===i)t.notify(de._121,{oldCFModel:x.previousConditionalFormats,updatedCFModel:x.conditionalFormats,range:x.selectedRange,isUndo:!0,sheetIdx:x.sheetIdx});else{var D={range:x.selectedRange,sheetIdx:x.sheetIdx,isUndoRedo:!0,isFromUpdateAction:S};t.notify(de._121,D),S||(x.previousConditionalFormats=D.oldCFModel,D.updatedCFModel.length?x.conditionalFormats=D.updatedCFModel:delete x.conditionalFormats)}break;case"insertImage":!1===i?t.notify(se._76,{id:e.eventArgs.id,sheetIdx:e.eventArgs.sheetIndex+1,range:e.eventArgs.range,preventEventTrigger:!0}):t.notify(se._75,{options:{src:e.eventArgs.imageData,height:e.eventArgs.imageHeight,width:e.eventArgs.imageWidth,imageId:e.eventArgs.id},range:e.eventArgs.range,isPublic:!1,isUndoRedo:!0});break;case"deleteImage":!1===i?t.notify(se._75,{options:{src:e.eventArgs.imageData,height:e.eventArgs.imageHeight,width:e.eventArgs.imageWidth,imageId:e.eventArgs.id},range:e.eventArgs.address,isPublic:!1,isUndoRedo:!0}):t.notify(se._76,{id:e.eventArgs.id,range:e.eventArgs.address,preventEventTrigger:!0});break;case"imageRefresh":d=document.getElementById(e.eventArgs.id),!1===i?t.notify(se._72,{prevTop:e.eventArgs.currentTop,prevLeft:e.eventArgs.currentLeft,currentTop:e.eventArgs.prevTop,currentLeft:e.eventArgs.prevLeft,id:e.eventArgs.id,currentHeight:e.eventArgs.prevHeight,currentWidth:e.eventArgs.prevWidth,requestType:"imageRefresh",prevHeight:e.eventArgs.currentHeight,prevWidth:e.eventArgs.currentWidth,isUndoRedo:!0}):(e.eventArgs.isUndoRedo=!0,t.notify(se._72,e.eventArgs)),d&&(d.style.height=!1===i?e.eventArgs.prevHeight+"px":e.eventArgs.currentHeight+"px",d.style.width=!1===i?e.eventArgs.prevWidth+"px":e.eventArgs.currentWidth+"px",d.style.top=!1===i?e.eventArgs.prevTop+"px":e.eventArgs.currentTop+"px",d.style.left=!1===i?e.eventArgs.prevLeft+"px":e.eventArgs.currentLeft+"px");break;case"insertChart":if(!1===i)t.notify(ce._77,{id:x.id,range:x.range,isUndoRedo:!0});else{var L=[{type:x.type,theme:x.theme,markerSettings:x.markerSettings,isSeriesInRows:x.isSeriesInRows,range:x.range,id:x.id,height:x.height,width:x.width,top:x.top,left:x.left}];t.notify(de._125,{chart:L,isUndoRedo:!1,range:x.posRange})}break;case"deleteChart":if(!1===i){var M=[{type:x.type,theme:x.theme,markerSettings:x.markerSettings,isSeriesInRows:x.isSeriesInRows,range:x.range,id:x.id,height:x.height,width:x.width,top:x.top,left:x.left}];t.notify(de._125,{chart:M,isUndoRedo:!1,range:x.posRange})}else t.notify(ce._77,{id:x.id,range:x.range,isUndoRedo:!0});break;case"chartRefresh":l=document.getElementById(e.eventArgs.id),l&&(l.style.height=!1===i?e.eventArgs.prevHeight+"px":e.eventArgs.currentHeight+"px",l.style.width=!1===i?e.eventArgs.prevWidth+"px":e.eventArgs.currentWidth+"px",l.style.top=!1===i?e.eventArgs.prevTop+"px":e.eventArgs.currentTop+"px",l.style.left=!1===i?e.eventArgs.prevLeft+"px":e.eventArgs.currentLeft+"px"),!1===i?(t.notify(he._87,n.i(oe.extend)({},e.eventArgs,{currentColIdx:e.eventArgs.prevColIdx,currentHeight:e.eventArgs.prevHeight,currentLeft:e.eventArgs.prevLeft,currentRowIdx:e.eventArgs.prevRowIdx,currentTop:e.eventArgs.prevTop,currentWidth:e.eventArgs.prevWidth,prevColIdx:e.eventArgs.currentColIdx,prevHeight:e.eventArgs.currentHeight,prevLeft:e.eventArgs.currentLeft,prevRowIdx:e.eventArgs.currentRowIdx,prevTop:e.eventArgs.currentTop,prevWidth:e.eventArgs.currentWidth,isUndoRedo:!0})),t.notify(de._129,{height:e.eventArgs.prevHeight.toString(),width:e.eventArgs.prevWidth.toString(),overlayEle:l})):(e.eventArgs.isUndoRedo=!0,t.notify(he._87,e.eventArgs),t.notify(de._129,{height:e.eventArgs.currentHeight.toString(),width:e.eventArgs.currentWidth.toString(),overlayEle:l}));break;case"chartDesign":t.notify(he._96,e.eventArgs);break;case"autofill":S&&x.undoArgs&&(x.undoArgs.isFromUpdateAction=x.undoArgs.isUndo=x.undoArgs.preventEvt=!0,x.undoArgs.isPublic=!0,t.notify(he._43,x.undoArgs)),t.notify(de._140,{fillRange:e.eventArgs.fillRange,dataRange:e.eventArgs.dataRange,fillType:e.eventArgs.fillType,direction:e.eventArgs.direction});break;case"removeValidation":!1!==i&&t.notify(se._57,{range:x.range,isCol:x.isColSelected});break;case"addDefinedName":if(!1===i)t.notify(de._49,{action:"removeDefinedName",isRemoved:!1,definedName:x.name,scope:x.scope,isEventTrigger:!0});else{var B={name:x.name,refersTo:x.refersTo,scope:x.scope,comment:x.comment};t.notify(de._49,{action:"addDefinedName",isAdded:!1,definedName:B,isEventTrigger:!0})}break;case"hyperlink":t.notify(de._78,{hyperlink:x.hyperlink,cell:x.address,displayText:x.displayText,triggerEvt:!1}),t.serviceLocator.getService("cell").refreshRange(n.i(de.Z)(x.address),!1,!1,!1,!1,Q(t));break;case"removeHyperlink":t.notify(he._39,{range:x.address,preventEventTrigger:!0});break;case"freezePanes":t.freezePanes(x.row,x.column,x.sheetIndex);break;case"duplicateSheet":n.i(de.r)(t,x.sheetIndex,null,S);break;case"protectSheet":x.isProtected?t.notify(de._107,x):(t.setSheetPropertyOnMute(n.i(de.l)(t,x.sheetIndex),"password",""),t.notify(he.t,{isActive:!0,sheetIndex:x.sheetIndex}));break;case"protectWorkbook":x.isProtected?t.notify(he.z,x):t.notify(he.A,null);break;case"lockCells":t.notify(de._111,x)}}function M(e,t,r,i){for(var a,o=e.sheets[i],s=o.ranges,l=0,d=s.length;l<d;l++)if(s[l].template&&(a=n.i(de.T)(s[l].address.length?s[l].address:s[l].startCell),a[0]<=t&&a[1]<=r&&a[2]>=t&&a[3]>=r))return!0;return!1}function B(e,t,r,i,a,o,s){void 0===s&&(s=!0);var l=n.i(de.x)(t,i,!0),d=e.frozenColCount(t),c=A(r);if(a=a||(t.frozenRows?e.getRow(i,null,d):e.getRow(i)),a&&(a.style.height=c+"px"),t.frozenColumns)o=o||e.getRow(i,null,d-1);else{var h=e.frozenRowCount(t);o=o||e.getRow(i,i<h?e.sheetModule.getSelectAllTable():e.getRowHeaderTable())}o&&(o.style.height=c+"px"),n.i(de.y)(t,i,r),e.setProperties({sheets:e.sheets},!0),s&&e.notify(ce._1,{rowIdx:i,threshold:c-l})}function H(e,t,n,r){void 0===n&&(n=1);var i=t&&t.fontSize||e.cellStyle.fontSize,a=i.indexOf("pt")>-1?parseInt(i,10)/.75:parseInt(i,10),o=a*(r||U(t&&t.fontFamily?t:e.cellStyle))*n;return Math.ceil(o%1>.9?o+1:o)}function U(e){var t=fe;return e&&("Arial Black"===e.fontFamily||"Comic Sans MS"===e.fontFamily?t=1.44:'"Segoe UI", sans-serif'===e.fontFamily&&(t=1.36)),t}function V(e,t,n,r){t||(t=n);var i=document.createElement("canvas"),a=i.getContext("2d");return a.font=(t.fontStyle||n.fontStyle)+" "+(t.fontWeight||n.fontWeight)+" "+(t.fontSize||n.fontSize)+" "+(t.fontFamily||n.fontFamily),r?a.measureText(e).width:A(a.measureText(e).width,!0)}function j(e,t,n,r){var i,a,o,s,l,d,c=0,h=e.toString().split(" "),p=V(" ",n,r),u=0,f=0,g=0,m=function(e,a){c&&u++,i/t>=1&&(e.split("").forEach(function(e){s=V(e,n,r,!0),(o+=s)>t&&(u++,o=s)}),i=A(o,!0)),a||v(i),c=i},v=function(e){i+=(e+p)/t>=1?0:p};return h.forEach(function(e){o=0,s=0,i=V(e,n,r),d=(c+i)/t,d>1?(a=e.split("-"),a.length>1?a.forEach(function(p){o=0,s=0,l||(l=V("-",n,r)),i=V(p,n,r),a[a.length-1]!==p&&(i+=l),d=(c+i)/t,d>=1?m(p,a[a.length-1]!==p):(a[a.length-1]===p&&h[h.length-1]!==e&&v(c+i),c+=i)}):m(e,!1)):(v(c+i),c+=i)}),c&&(f=(c-p)/t,g=parseFloat(f.toString().split(".")[0]),u+=f+.05>=g+1?Math.ceil(f)+1:Math.ceil(f)),u}function z(e,t,r){var i=0,a=n.i(de.I)(e,t,r,null,!0),o=n.i(de.I)(e,t+1,r,null,!0);return a.style&&(a.style.border?i=(0===t?2:1)*parseFloat(a.style.border.split("px")[0]):(0===t&&a.style.borderLeft&&(i=parseFloat(a.style.borderLeft.split("px")[0])),a.style.borderRight&&(i+=parseFloat(a.style.borderRight.split("px")[0])))),a.style&&(a.style.border||a.style.borderRight)||!o.style||!o.style.borderLeft||(i+=parseFloat(o.style.borderLeft.split("px")[0])),i>0&&i<1?1:i}function q(e,t,r){var i=0,a=n.i(de.I)(e,t,r,null,!0);a.style&&(a.style.border?i=(0===e?2:1)*parseFloat(a.style.border.split("px")[0]):(0===e&&a.style.borderTop&&(i=parseFloat(a.style.borderTop.split("px")[0])),a.style.borderBottom&&(i+=parseFloat(a.style.borderBottom.split("px")[0]))));var o=n.i(de.I)(e+1,t,r,null,!0);return a.style&&(a.style.border||a.style.borderBottom)||!o.style||!o.style.borderTop||(i+=parseFloat(o.style.borderTop.split("px")[0])),Math.ceil(i)||1}function W(e,t,r,i){return void 0===i&&(i=r),n.i(de.E)(e,r,i,!0)-A(4+(z(t,r,e)||1))}function G(e,t,n,r,i,a,o){return H(e,i,a,o)+q(t,n,r)}function Y(e,t,n,r){e.maxHgts[t]||(e.maxHgts[t]={}),e.maxHgts[t][n]=r}function X(e,t){var n=0,r=e.maxHgts[t];return r&&Object.keys(r).forEach(function(e){r[""+e]>n&&(n=r[""+e])}),n}function K(e){if(!document.activeElement.classList.contains("e-text-findNext-short"))if(oe.Browser.isIE){var t=window.scrollX,n=window.scrollY;e.focus(),window.scrollTo(t,n)}else{if(e.classList.contains("e-input")){var r=e,i=r.value.length;r.setSelectionRange(i,i)}e.focus({preventScroll:!0})}}function $(e,t){for(var r,i=e.getActiveSheet(),a=n.i(oe.isNullOrUndefined)(t)?n.i(de._4)(n.i(de.T)(i.selectedRange)):t,o=a[0];o<=a[2];o++)for(var s=a[1];s<=a[3];s++){var l=n.i(de.I)(o,s,i);if(n.i(de._169)(l,n.i(de.B)(i,s))){r=!0;break}}return r}function Z(e){return e.includes(" ")}function J(e,t,r){for(var i,a,o,s,l,d,c=n.i(de.l)(e,r),h=r===e.activeSheetIndex,p=c.conditionalFormats&&c.conditionalFormats.length&&[].slice.call(c.conditionalFormats),u=[],f=t[0],g=t[2];f<=g;f++)if(!n.i(de.w)(c,f))for(var m=t[1],v=t[3];m<=v;m++){var y={cellIdx:[f,m],isUnique:!1,uniqueRange:""};if(e.notify(de._63,y),i=!1,""!==y.uniqueRange){var C=n.i(de.Z)(y.uniqueRange);i="#SPILL!"===n.i(de.I)(C[0],C[1],c).value}if((!y.isUnique||i)&&(a=n.i(de.I)(f,m,c))){o={},a.formula&&(o.formula=""),(a.value||0===a.value)&&(o.value=""),a.hyperlink&&(o.hyperlink="");var b={sheet:c,cell:a,rowIdx:f,colIdx:m};if((a.colSpan>1||a.rowSpan>1)&&n.i(de._183)(b),s=e.getCell(b.rowIdx,b.colIdx),l={cell:o,rowIdx:f,colIdx:m,valChange:!0,uiRefresh:h,td:s,cellDelete:!0},!Object.keys(o).length||n.i(de._175)(e,c,l))continue;p&&!d&&((d=l.isFormulaDependent)||n.i(de._179)(p,u,f,m)),s&&(s.querySelector(".e-cf-databar")&&s.removeChild(s.querySelector(".e-cf-databar")),s.querySelector(".e-iconsetspan")&&s.removeChild(s.querySelector(".e-iconsetspan")))}}(u.length||d)&&h&&e.notify(de._120,{cfModel:!d&&u,refreshAll:d,isAction:!0,isEdit:!0})}function Q(e){return e.allowOpen&&e.openModule.preventFormatCheck}function ee(e,t){for(var r=0,i=e.getActiveSheet(),a=(i.frozenRows?e.viewport.height-e.sheetModule.getColHeaderHeight(i,!0):e.viewport.height)-17||20,o=t;;o++)if((r+=n.i(de.x)(i,o,!0))>=a)return{index:o,height:r}}function te(e,t){for(var r=0,i=e.getActiveSheet(),a=e.getMainContent().parentElement.offsetWidth-e.sheetModule.getRowHeaderWidth(i)-e.sheetModule.getScrollSize(),o=t;;o++)if((r+=n.i(de.D)(i,o,null,!0))>=a)return o}function ne(e,t){e.renderModule.setSheetPanelSize(t)}function re(e){if(window.devicePixelRatio%1>0){var t=e*window.devicePixelRatio%1;return e+(t?(t>.5?1-t:-1*t)/window.devicePixelRatio:0)}return e}function ie(e,t){var n=[];if(t){var r=Object.getPrototypeOf(new de.H(e,"cells",{},!0)).constructor.prototype.propList,i=r.colPropNames.concat(r.complexPropNames).concat(r.propNames);r=Object.getPrototypeOf(new de.s(e,"rows",{},!0)).constructor.prototype.propList;var a=r.colPropNames.concat(r.complexPropNames).concat(r.propNames);r=Object.getPrototypeOf(new de.A(e,"columns",{},!0)).constructor.prototype.propList;var o=r.colPropNames.concat(r.complexPropNames).concat(r.propNames);r=Object.getPrototypeOf(new de.d(e,"sheets",{},!0)).constructor.prototype.propList;var s=r.colPropNames.concat(r.complexPropNames).concat(r.propNames);s.splice(s.indexOf("rows"),1),s.splice(s.indexOf("columns"),1),s.splice(s.indexOf("cells"),1),a.splice(a.indexOf("cells"),1),n.push.apply(n,s),-1===t.indexOf("rows")&&n.push.apply(n,a),-1===t.indexOf("columns")&&n.push.apply(n,o),-1===t.indexOf("cells")&&n.push.apply(n,i);var l;t.forEach(function(e){l=n.indexOf(e),n.indexOf(e)>-1&&n.splice(l,1)})}else n.push("ranges");var d={skipProps:n};return e.notify("getStringifyObject",d),d.model}function ae(e){for(var t,r=[],i=e.getActiveSheet().name,a=0,o=e.chartColl.length;a<o;a++)if(t=e.chartColl[a],i===n.i(de.g)(t.range)){var s={clientY:t.top,isImage:!0},l={clientX:t.left,isImage:!0};e.notify(he.h,s),e.notify(he.i,l),r.push({chart:t,chartRowIdx:s.clientY,chartColIdx:l.clientX})}return r}t.a=r,t.b=i,t.c=a,t.d=o,t.e=s,t.f=d,t.g=c,t.h=h,t.i=p,t.j=u,t.k=f,t.l=g,t.m=m,t.n=v,t.o=y,t.p=C,t.q=b,t.r=x,t.s=S,t.t=w,t.u=_,t.v=I,t.w=E,t.x=R,t.y=k,t.z=A,t.A=F,t.B=N,t.C=T,t.D=O,t.E=D,t.F=L,t.G=P,t.H=M,t.I=B,t.J=H,t.K=U,t.L=V,t.M=j,t.N=q,t.O=W,t.P=G,t.Q=Y,t.R=X,t.S=K,t.T=$,t.U=Z,t.V=J,t.W=Q,t.X=ee,t.Y=te,t.Z=ne,t._0=re,t._1=ie,t._2=ae;var oe=n(3),se=(n.n(oe),n(1)),le=n(1),de=n(0),ce=n(5),he=n(7),pe=n(35),ue=null,fe=1.24,ge=["e-ribbon","e-formula-bar-panel","e-sheet-tab-panel","e-header-toolbar"],me={role:"role",selected:"aria-selected",multiselectable:"aria-multiselectable",busy:"aria-busy",colcount:"aria-colcount"}},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(0),i=n(2),a=n(1),o=n(17),s=(n.n(o),n(3));n.n(s);o.Chart.Inject(o.ColumnSeries,o.LineSeries,o.BarSeries,o.AreaSeries,o.StackingColumnSeries,o.StackingLineSeries,o.StackingBarSeries,o.ScatterSeries),o.Chart.Inject(o.StackingAreaSeries,o.Category,o.Legend,o.Tooltip,o.DataLabel),o.AccumulationChart.Inject(o.PieSeries,o.AccumulationTooltip,o.AccumulationDataLabel,o.AccumulationLegend);var l=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(i._75,this.initiateChartHandler,this),this.parent.on(a._78,this.refreshChartCellObj,this),this.parent.on(a._79,this.refreshChartCellModel,this),this.parent.on(i._76,this.refreshChartCellObj,this),this.parent.on(i._77,this.updateChartHandler,this),this.parent.on(a._77,this.deleteChart,this),this.parent.on(a._83,this.clearBorder,this),this.parent.on(a._84,this.insertChartHandler,this),this.parent.on(a._85,this.chartRangeHandler,this),this.parent.on(a._88,this.chartDesignTabHandler,this),this.parent.on(a._89,this.updateChartElement,this),this.parent.on(a._90,this.undoRedoForChartDesign,this)},e.prototype.insertChartHandler=function(e){var t=this,r="Column",o=!1;switch(e.id){case"clusteredColumn":r="Column";break;case"stackedColumn":r="StackingColumn";break;case"stackedColumn100":r="StackingColumn100";break;case"clusteredBar":r="Bar";break;case"stackedBar":r="StackingBar";break;case"stackedBar100":r="StackingBar100";break;case"area":r="Area";break;case"stackedArea":r="StackingArea";break;case"stackedArea100":r="StackingArea100";break;case"line":r="Line";break;case"lineMarker":r="Line",o=!0;break;case"stackedLine":r="StackingLine";break;case"stackedLineMarker":r="StackingLine",o=!0;break;case"stackedLine100":r="StackingLine100";break;case"stackedLine100Marker":r="StackingLine100",o=!0;break;case"pie":r="Pie";break;case"doughnut":r="Doughnut";break;case"scatter":r="Scatter"}var s=[{type:r,markerSettings:{visible:o,isFilled:!0}}];e.isChart?(this.parent.notify(i.h,{chart:s}),n.i(a._115)(function(){return n.i(a._159)(t.parent.element)})):this.parent.notify(a._88,{chartType:r,triggerEvent:!0,markerVisible:o})},e.prototype.chartRangeHandler=function(){var e=document.querySelector(".e-datavisualization-chart.e-ss-overlay-active");if(e)for(var t=e.getElementsByClassName("e-control")[0].id,n=this.parent.chartColl,r=n.length,a=0;a<r;a++){var o=document.getElementById(n[a].id);e&&o&&n[a].id===t&&this.parent.notify(i._75,{option:n[a],isRefresh:!0})}},e.prototype.updateChartHandler=function(e){var t=this.initiateChartHandler({option:e.chart,isRefresh:!0}),r=this.parent.element.querySelector("."+e.chart.id);if(r){var i=n.i(s.getComponent)(r,"chart");n.i(s.isNullOrUndefined)(i)&&(i=n.i(s.getComponent)(r,"accumulationchart")),i.series=t,i.refresh()}},e.prototype.refreshChartCellModel=function(e){for(var t=0,n=e.prevChartIndexes.length;t<n;t++){var r=e.prevChartIndexes[t].chart,i=e.prevChartIndexes[t].chartRowIdx,o=e.prevChartIndexes[t].chartColIdx,s=e.currentChartIndexes[t].chartRowIdx,l=e.currentChartIndexes[t].chartColIdx,d={prevTop:r.top,prevLeft:r.left,prevRowIdx:i,prevColIdx:o,prevHeight:r.height,prevWidth:r.width,currentTop:r.top,currentLeft:r.left,currentRowIdx:s,currentColIdx:l,currentHeight:r.height,currentWidth:r.width,id:r.id,requestType:"chartRefreshOnFilter"};this.parent.notify(a._78,d)}},e.prototype.refreshChartCellObj=function(e){var t,i,a=n.i(s.isUndefined)(e.sheetIdx)?this.parent.activeSheetIndex:e.sheetIdx,o=n.i(r.l)(this.parent,a),l=n.i(r.I)(e.prevRowIdx,e.prevColIdx,o),d=n.i(r.I)(e.currentRowIdx,e.currentColIdx,o),c=l?l.chart:[],h=c&&c.length?c.length:0;if(h){for(var p=0;p<h;p++)if(c[p].id===e.id.split("_overlay")[0]){t=c[p],t.height=e.currentHeight,t.width=e.currentWidth,t.top=e.currentTop,t.left=e.currentLeft,c.splice(p,1);for(var u=0,f=this.parent.chartColl.length;u<f;u++)t.id===this.parent.chartColl[u].id&&(t.height=e.currentHeight,this.parent.chartColl[u].width=e.currentWidth,this.parent.chartColl[u].top=e.currentTop,this.parent.chartColl[u].left=e.currentLeft)}if(d&&d.chart&&(i=d.chart,t&&i.push(t)),i?n.i(r.J)(e.currentRowIdx,e.currentColIdx,o,{chart:i},!0):n.i(r.J)(e.currentRowIdx,e.currentColIdx,o,{chart:[t]},!0),"chartRefresh"===e.requestType&&!e.isUndoRedo){var g={requestType:"chartRefresh",currentRowIdx:e.currentRowIdx,currentColIdx:e.currentColIdx,currentWidth:e.currentWidth,prevHeight:e.prevHeight,prevWidth:e.prevWidth,prevRowIdx:e.prevRowIdx,prevColIdx:e.prevColIdx,prevTop:e.prevTop,prevLeft:e.prevLeft,currentTop:e.currentTop,currentLeft:e.currentLeft,currentHeight:e.currentHeight,id:e.id,sheetIdx:a};this.parent.notify("actionComplete",{eventArgs:g,action:"chartRefresh"})}}},e.prototype.processChartRange=function(e,t,a){var o,l,d,c,h=this,p=e[0],u=e[1],f=!1,g=e[2],m=e[3],v=p===g,y=u===m,C=function(e,t,a,o){var l=n.i(r.I)(e,t,n.i(r.l)(h.parent,a));if(l){var d=void 0;if(l.format){var p={value:l.value,format:l.format,formattedText:l.value,cell:l,rowIndex:e,colIndex:t};h.parent.notify(i.d,p);var u=n.i(i.o)(l.value);if(u&&!n.i(r.O)(l.format,!0,null,!0)){var f=new RegExp("[!@#$%^&()+=';,{}|\":<>~_-]","g");p.formattedText=p.formattedText.toString().replace(f,""),d=parseInt(p.formattedText.toString(),10)}else o&&u&&(c=!0),d=p.formattedText&&p.formattedText.toString()}else d=l.value;return n.i(s.isNullOrUndefined)(d)?"":d}return""},b=C(p,m,t,!0),x=C(g,u,t),S=C(p,u,t);return n.i(i.o)(x)&&S||(f=!0),!n.i(s.isNullOrUndefined)(S)&&("Scatter"!==a.type||a.isSeriesInRows)||v||y?n.i(s.isNullOrUndefined)(x)||!f||v||y||c?(l=[p,u,g,m],n.i(s.isNullOrUndefined)(b)||n.i(i.o)(b)||c?n.i(s.isNullOrUndefined)(S)&&(v||y)&&(d=[p,u,p,m],v?(l[1]=l[1]+1,d[3]=d[1]):l[0]=l[0]+1):(d=[p,u,p,m],l[0]=l[0]+1)):n.i(s.isNullOrUndefined)(b)||n.i(i.o)(b)&&S?(o=[p,u,g,u],l=[p,u+1,g,m]):(o=[p+1,u,g,u],l=[p+1,u+1,g,m],d=[p,u+1,p,m]):(o=[p+1,u,g,u],l=[p+1,u+1,g,m],d=[p,u+1,p,m]),{xRange:o,yRange:l,lRange:d,isStringSeries:f}},e.prototype.toIntrnlRange=function(e,t){return e?"string"==typeof e&&(e=i.l[""+e]):e=i.l[this.parent.sheets[t].selectedRange],e},e.prototype.getRangeData=function(e){e.range=this.toIntrnlRange(e.range,e.sheetIdx);var t=[],n=[];return this.pushRowData(e,e.range[0],e.range[1],e.range[2],e.range[3],n,t,!0,e.isYvalue),n},e.prototype.pushRowData=function(e,t,a,o,s,l,d,c,h){for(var p,u=a,f=this.parent.sheets[e.sheetIdx];t<=o;)if(n.i(r.v)(f,t))t++;else{for(a=u;a<=s;)if(n.i(r.F)(f,a))a++;else{var g=n.i(r.I)(t,a,f,!1,!0);if(g.format&&!h){var m={value:g.value,format:g.format,formattedText:g.value,rowIndex:t,colIndex:a,cell:g};this.parent.notify(i.d,m),p=m.formattedText?m.formattedText.toString():null}else p=g.value||(0===g.value?0:null);l.push({value:p}),a++}t++}d.push(t)},e.prototype.toArrayData=function(e){for(var t,n=0,r=[],i=e.length;n<i;)t=e[n],Object.keys(t).length?"value"in t&&r.push(t.value):r.push(""),n++;return r},e.prototype.getVirtualXValues=function(e){for(var t=1,n=[];t<e;)n.push(t.toString()),t++;return n},e.prototype.processChartSeries=function(e,t,r,a,o){e=e||{};var l,d,c,h,p,u,f="",g={},m={},v=0,y=0,C=[];t=n.i(s.isNullOrUndefined)(t)?this.parent.getActiveSheet().index:t;var b=this.parent.sheets[t],x=this.getRangeData({range:a,sheetIdx:t,skipFormula:!0,isYvalue:!0}),S=a[2]-a[0]+1-this.parent.hiddenCount(a[0],a[2],"rows",b),w=a[3]-a[1]+1-this.parent.hiddenCount(a[1],a[3],"columns",b);e.isSeriesInRows?(d=o?this.toArrayData(this.getRangeData({range:o,sheetIdx:t,skipFormula:!1,isYvalue:!1})):this.getVirtualXValues(w+1),r&&(c=this.toArrayData(this.getRangeData({range:r,sheetIdx:t,skipFormula:!1,isYvalue:!1}))),h=S):(d=r?this.toArrayData(this.getRangeData({range:r,sheetIdx:t,skipFormula:!1,isYvalue:!1})):this.getVirtualXValues(S+1),o&&(c=this.toArrayData(this.getRangeData({range:o,sheetIdx:t,skipFormula:!1,isYvalue:!1}))),h=w);var _=d.length,I=e.isSeriesInRows?1:h;for(n.i(s.isNullOrUndefined)(e.dataLabelSettings)||(g.visible=e.dataLabelSettings.visible,g.position=e.dataLabelSettings.position);v<h;){for(u=0,p=[],y=e.isSeriesInRows?y:v;u<_;){if(x[y]){if(l=x[y].value,n.i(i.o)(l))l=Number(l);else{var E={value:n.i(s.isNullOrUndefined)(l)?"":l.toString(),sheetIndex:t,updatedVal:""};this.parent.notify(i._6,E),l=E.isDate||E.isTime?E.updatedVal:0}n.i(s.isNullOrUndefined)(d[u])&&!n.i(s.isNullOrUndefined)(l)&&(d[u]=n.i(s.getUniqueID)("spread-chart-empty-label-")),p.push({x:d[u],y:l})}y+=I,u++}if(f=c&&c.length>0?c[v]:"Scatter"===e.type?"series"+(v+1):"series"+v,n.i(s.isNullOrUndefined)(f)&&(f=""),e.type){var R=e.type;if("Line"===R||"StackingLine"===R||"StackingLine100"===R)m={dataSource:p,type:e.type,xName:"x",yName:"y",name:f.toString(),marker:e.markerSettings?{visible:e.markerSettings.visible,width:e.markerSettings.size,height:e.markerSettings.size,shape:e.markerSettings.shape,dataLabel:g,isFilled:e.markerSettings.isFilled,border:e.markerSettings.border,fill:e.markerSettings.isFilled?e.markerSettings.fill:null}:{dataLabel:g}};else if("Scatter"===R)m={dataSource:p,type:e.type,xName:"x",yName:"y",name:f.toString(),marker:{visible:!1,width:12,height:12,shape:"Circle",dataLabel:g}};else if("Pie"===R||"Doughnut"===R){var k="Pie"===e.type?"0%":"40%",A=g.visible,F=n.i(s.isNullOrUndefined)(g.position)?"Inside":"Outer"===g.position?"Outside":"Inside";m={dataSource:p,dataLabel:{visible:!n.i(s.isNullOrUndefined)(A)&&A,position:F,name:"text",font:{fontWeight:"600"}},radius:"100%",xName:"x",yName:"y",innerRadius:k}}else m={dataSource:p,type:e.type,xName:"x",yName:"y",name:f.toString(),marker:{dataLabel:g}}}C.push(m),v++}var N;return e.type&&(N={series:C,xRange:e.isSeriesInRows?o:r,yRange:a,lRange:e.isSeriesInRows?r:o}),N},e.prototype.primaryYAxisFormat=function(e){var t="";if(!n.i(s.isNullOrUndefined)(e)){var i=n.i(r.I)(e[0],e[1],this.parent.getActiveSheet());i&&i.format&&(t=i.format)}return t},e.prototype.focusChartRange=function(e,t,n){var r=["e-rcborderright","e-rcborderbottom","e-vcborderright","e-vcborderbottom","e-bcborderright","e-bcborderbottom"];this.clearBorder();var i,o=this.parent.getActiveSheet(),s=!(!o.frozenRows&&!o.frozenColumns);n&&(s?i=n:this.parent.notify(a._82,{startcell:{rowIndex:n[0],colIndex:n[1]},endcell:{rowIndex:n[2],colIndex:n[3]},classes:[r[0],r[1]]})),e&&(s?i?(i[0]=Math.min(n[0],e[0]),i[1]=Math.min(n[1],e[1]),i[2]=Math.max(n[2],e[2]),i[3]=Math.max(n[3],e[3])):i=e:this.parent.notify(a._82,{startcell:{rowIndex:e[0],colIndex:e[1]},endcell:{rowIndex:e[2],colIndex:e[3]},classes:[r[2],r[3]]})),s&&i?this.parent.notify(a._82,{startcell:{rowIndex:Math.min(i[0],t[0]),colIndex:Math.min(i[1],t[1])},endcell:{rowIndex:Math.max(i[2],t[2]),colIndex:Math.max(i[3],t[3])},classes:[r[4],r[5]]}):this.parent.notify(a._82,{startcell:{rowIndex:t[0],colIndex:t[1]},endcell:{rowIndex:t[2],colIndex:t[3]},classes:[r[4],r[5]]})},e.prototype.clearBorder=function(){var e=this.parent.getActiveSheet();if(e.frozenColumns||e.frozenRows){return void[].slice.call(this.parent.element.getElementsByClassName("e-chart-range")).forEach(function(e){n.i(s.detach)(e)})}for(var t=this.parent.getMainContent(),r=["e-rcborderright","e-rcborderbottom","e-vcborderright","e-vcborderbottom","e-bcborderright","e-bcborderbottom"],i=0,a=r.length;i<a;i++)for(var o=t.querySelectorAll("."+r[i]),l=0,d=o.length;l<d;l++){var c=o[l];c.classList.remove(r[i])}},e.prototype.initiateChartHandler=function(e){var t=this,l=e.option,d=!0;d=!!n.i(s.isNullOrUndefined)(e.isInitCell)||!e.isInitCell,e.triggerEvent=!!n.i(s.isNullOrUndefined)(e.triggerEvent)||e.triggerEvent;e.isRefresh=!n.i(s.isNullOrUndefined)(e.isRefresh)&&e.isRefresh;var c,h,p=l.range&&l.range.indexOf("!")>0?n.i(r.e)(this.parent,l.range.split("!")[0]):this.parent.activeSheetIndex,u=n.i(r.l)(this.parent,p),f=l.range?l.range:this.parent.getActiveSheet().selectedRange,g=n.i(i.l)(f),m={};if(this.parent.allowChart||!u.isProtected){var v={sheetIndex:p,reqType:"shape",type:"actionBegin",shapeType:"chart",action:"create",options:l,range:f,operation:"create"};if(m=v.options,f=v.range,m=m||{},g.length>0){g[2]-g[0]<g[3]-g[1]&&(c=!0)}m.isSeriesInRows=!!c||!!m.isSeriesInRows&&m.isSeriesInRows,e.dataSheetIdx=n.i(s.isNullOrUndefined)(e.dataSheetIdx)?p:e.dataSheetIdx;var y=this.processChartRange(g,e.dataSheetIdx,m),C=y.xRange,b=y.yRange,x=y.lRange;if(p===this.parent.activeSheetIndex&&d&&this.focusChartRange(C,b,x),e.triggerEvent&&!e.isRefresh){if(h={type:l.type,theme:l.theme,isSeriesInRows:l.isSeriesInRows,range:l.range,markerSettings:m.markerSettings,id:l.id,height:l.height,width:l.width,posRange:e.range,isInitCell:e.isInitCell,cancel:!1,top:l.top,left:l.left},this.parent.notify(r._34,{eventArgs:h,action:"beforeInsertChart"}),h.cancel)return[];l.type=h.type,l.theme=h.theme,l.isSeriesInRows=h.isSeriesInRows,l.markerSettings=h.markerSettings,l.range=h.range,l.id=h.id,l.height=h.height,l.width=h.width}var S=this.processChartSeries(m,e.dataSheetIdx,C,b,x),w={majorGridLines:l.primaryXAxis&&l.primaryXAxis.majorGridLines&&!n.i(s.isNullOrUndefined)(l.primaryXAxis.majorGridLines.width)?{width:l.primaryXAxis.majorGridLines.width}:{width:0},minorGridLines:l.primaryXAxis&&l.primaryXAxis.minorGridLines&&!n.i(s.isNullOrUndefined)(l.primaryXAxis.minorGridLines.width)?{width:l.primaryXAxis.minorGridLines.width}:{width:0},minorTicksPerInterval:l.primaryXAxis&&l.primaryXAxis.minorGridLines&&l.primaryXAxis.minorGridLines.width>0?5:0,lineStyle:{width:0},valueType:"Scatter"!==l.type||y.isStringSeries||l.isSeriesInRows?"Category":"Double",rangePadding:"Scatter"!==l.type||y.isStringSeries||l.isSeriesInRows?"Auto":"Round",visible:!l.primaryXAxis||l.primaryXAxis.visible,title:l.primaryXAxis?l.primaryXAxis.title:"",edgeLabelPlacement:"Shift"},_={lineStyle:{width:0},majorGridLines:l.primaryYAxis&&l.primaryYAxis.majorGridLines&&!n.i(s.isNullOrUndefined)(l.primaryYAxis.majorGridLines.width)?{width:l.primaryYAxis.majorGridLines.width}:{width:1},minorGridLines:l.primaryYAxis&&l.primaryYAxis.minorGridLines&&!n.i(s.isNullOrUndefined)(l.primaryYAxis.minorGridLines.width)?{width:l.primaryYAxis.minorGridLines.width}:{width:0},minorTicksPerInterval:l.primaryYAxis&&l.primaryYAxis.minorGridLines&&l.primaryYAxis.minorGridLines.width>0?5:0,visible:!l.primaryYAxis||l.primaryYAxis.visible,title:l.primaryYAxis?l.primaryYAxis.title:"",edgeLabelPlacement:"Shift"};if(e.isRefresh){if(e.isSwitchRowColumn&&"Scatter"===l.type){var I=this.parent.element.querySelector("."+l.id);if(I){n.i(s.getComponent)(I,"chart").primaryXAxis.valueType=y.isStringSeries||l.isSeriesInRows?"Category":"Double"}}return S.series}var E=l.id+"_overlay",R=this.parent.serviceLocator.getService(a._177),k=!n.i(s.isNullOrUndefined)(e.isInitCell)&&e.isInitCell?e.range:f,A=R.insertOverlayElement(E,k,n.i(i.L)(this.parent,k));A.element.classList.add("e-datavisualization-chart"),A.element.style.width=l.width+"px",A.element.style.height=l.height+"px",u.frozenRows||u.frozenColumns?R.adjustFreezePaneSize(l,A.element,k):(n.i(s.isNullOrUndefined)(l.top)?l.top=A.top:A.element.style.top=Number(n.i(a._167)(l.top).toFixed(2))+"px",n.i(s.isNullOrUndefined)(l.left)?l.left=A.left:A.element.style.left=Number(n.i(a._167)(l.left).toFixed(2))+"px"),this.parent.notify(a._99,{height:l.height,width:l.width});var F="Pie"===l.type||"Doughnut"===l.type?{position:"Bottom",visible:!0}:{};n.i(s.isNullOrUndefined)(l.legendSettings)||(F.visible=l.legendSettings.visible,F.position=l.legendSettings.position);var N=this.parent.createElement("div",{id:l.id,className:l.id}),T=l.theme||"Material",O=this.primaryYAxisFormat(b),D=2*Math.round(parseFloat(getComputedStyle(A.element).borderWidth)),L=parseFloat(A.element.style.height)-(isNaN(D)?0:D)+"px";"Pie"!==l.type&&"Doughnut"!==l.type?(this.chart=new o.Chart({primaryXAxis:w,primaryYAxis:_,background:this.getThemeBgColor(T),chartArea:{border:{width:0}},title:l.title,legendSettings:F,theme:T,series:S.series,tooltip:{enable:!0},width:A.element.style.width,height:L,enableRtl:this.parent.enableRtl,load:function(e){e.chart.theme=l.theme||"Material"},beforeResize:function(e){e.cancelResizedEvent=!0},axisLabelRender:function(e){"primaryYAxis"===e.axis.name&&O&&!n.i(s.isNullOrUndefined)(e.value)&&t.parent?e.text=t.parent.getDisplayText({format:O,value:e.value.toString()}):"primaryXAxis"===e.axis.name&&e.text.startsWith("spread-chart-empty-label-")&&(e.text=""),"primaryXAxis"===e.axis.name&&"Scatter"===l.type&&e.axis.labels.length>0&&(e.text=n.i(i.o)(e.text)?e.text:(e.axis.labels.indexOf(e.text)+1).toString())}}),this.chart.appendTo(N)):(this.chart=new o.AccumulationChart({title:l.title,legendSettings:F,theme:T,background:this.getThemeBgColor(T),series:S.series,width:A.element.style.width,height:L,center:{x:"50%",y:"50%"},enableSmartLabels:!0,enableAnimation:!0,enableRtl:this.parent.enableRtl,load:function(e){e.chart.theme=l.theme||"Material"},beforeResize:function(e){e.cancelResizedEvent=!0}}),this.chart.appendTo(N)),A.element.appendChild(N),A.element.classList.contains("e-ss-overlay-active")&&this.parent.notify(a._86,{id:A.element.id}),e.triggerEvent&&this.parent.notify(a._31,{eventArgs:h,action:"insertChart"})}},e.prototype.deleteChart=function(e){this.clearBorder();var t=null,o=this.parent.getActiveSheet();if(n.i(s.isNullOrUndefined)(e.id)?(t=document.querySelector(".e-datavisualization-chart.e-ss-overlay-active"),e.id=t?t.getElementsByClassName("e-control")[0].id:null):(e.id=e.id.includes("overlay")?e.id:e.id+"_overlay",t=document.getElementById(e.id)),!n.i(s.isNullOrUndefined)(e.id)){e.id=e.id.includes("overlay")?e.id:e.id+"_overlay";for(var l,d,c,h,p=!1,u=0,f=this.parent.chartColl.length;u<f;u++)if(this.parent.chartColl[u].id===e.id.split("_overlay")[0]){h=this.parent.chartColl[u];break}var g={id:h.id,range:h.range,type:h.type,markerSettings:h.markerSettings,theme:h.theme,height:h.height,width:h.width,isSeriesInRows:h.isSeriesInRows,isInitCell:!0,posRange:null,top:h.top,left:h.left,cancel:!1};if(t){var m=void 0,v=void 0;if(o.frozenRows||o.frozenColumns){var y=t.getBoundingClientRect();m={clientY:y.top},v={clientX:y.left},y.top<this.parent.getColumnHeaderContent().getBoundingClientRect().bottom&&(m.target=this.parent.getColumnHeaderContent()),y.left<this.parent.getRowHeaderContent().getBoundingClientRect().right&&(v.target=this.parent.getRowHeaderTable())}else m={clientY:parseFloat(t.style.top),isImage:!0},v={clientX:parseFloat(t.style.left),isImage:!0};this.parent.notify(i._78,{id:e.id}),this.parent.notify(a._73,m),this.parent.notify(a._74,v),p=!0,l=m.clientY,d=v.clientX,o=this.parent.sheets[this.parent.activeSheetIndex]}else{this.parent.notify(i._78,{id:e.id});var C=e.range&&e.range.indexOf("!")>0?n.i(r.e)(this.parent,e.range.split("!")[0]):this.parent.activeSheetIndex,b=e.range?e.range.indexOf("!")>0?e.range.split("!")[1]:e.range.split("!")[0]:this.parent.getActiveSheet().selectedRange,x=n.i(i.l)(b);l=x[0],d=x[1],o=this.parent.sheets[C]}var S=n.i(r.I)(l,d,o);S&&(c=S.chart);for(var w=c?c.length:null,u=0;u<w;u++)e.id===c[u].id+"_overlay"&&c.splice(u,1);p&&(document.getElementById(e.id).remove(),this.parent.notify(a._87,{})),n.i(r.J)(l,d,o,{chart:c},!0),g.posRange=n.i(i.i)(l,d),e.isUndoRedo||this.parent.notify(a._31,{eventArgs:g,action:"deleteChart"})}},e.prototype.updateChartModel=function(e,t,r,i,a){var o=t;t=t;var l=this.parent.chartColl[i].id;if(!(a&&["PHAxes","PVAxes","PHAxisTitle","PVAxisTitle","GLMajorHorizontal","GLMajorVertical","GLMinorHorizontal","GLMinorVertical"].indexOf(e)>-1))for(var d=0,c=r.chart.length;d<c;d++)if(r.chart[d].id===l)switch(e){case"PHAxes":case"PHAxisTitle":n.i(s.isNullOrUndefined)(r.chart[d].primaryXAxis)&&(r.chart[d].primaryXAxis={},this.parent.chartColl[i].primaryXAxis={}),"PHAxes"===e?(r.chart[d].primaryXAxis.visible=t.primaryXAxis.visible,this.parent.chartColl[i].primaryXAxis.visible=t.primaryXAxis.visible):"PHAxisTitle"===e&&(r.chart[d].primaryXAxis.title=t.primaryXAxis.title,this.parent.chartColl[i].primaryXAxis.title=t.primaryXAxis.title);break;case"PVAxes":case"PVAxisTitle":n.i(s.isNullOrUndefined)(r.chart[d].primaryYAxis)&&(r.chart[d].primaryYAxis={},this.parent.chartColl[i].primaryYAxis={}),"PVAxes"===e?(r.chart[d].primaryYAxis.visible=t.primaryYAxis.visible,this.parent.chartColl[i].primaryYAxis.visible=t.primaryYAxis.visible):"PVAxisTitle"===e&&(r.chart[d].primaryYAxis.title=t.primaryYAxis.title,this.parent.chartColl[i].primaryYAxis.title=t.primaryYAxis.title);break;case"ChartTitleNone":case"ChartTitleAbove":r.chart[d].title=t.title,this.parent.chartColl[i].title=t.title;break;case"DLNone":case"DLCenter":case"DLInsideend":case"DLInsidebase":case"DLOutsideend":if(n.i(s.isNullOrUndefined)(r.chart[d].dataLabelSettings)&&(r.chart[d].dataLabelSettings={},this.parent.chartColl[i].dataLabelSettings={}),"DLNone"===e)r.chart[d].dataLabelSettings.visible=!1,this.parent.chartColl[i].dataLabelSettings.visible=!1;else{r.chart[d].dataLabelSettings.visible=!0,this.parent.chartColl[i].dataLabelSettings.visible=!0;var h=void 0;h=a?"Outside"===o.series[0].dataLabel.position?"Outer":"Middle":t.series[0].marker.dataLabel.position,r.chart[d].dataLabelSettings.position=h,this.parent.chartColl[i].dataLabelSettings.position=h}break;case"GLMajorHorizontal":n.i(s.isNullOrUndefined)(r.chart[d].primaryYAxis)&&(r.chart[d].primaryYAxis={},this.parent.chartColl[i].primaryYAxis={}),n.i(s.isNullOrUndefined)(r.chart[d].primaryYAxis.majorGridLines)&&(r.chart[d].primaryYAxis.majorGridLines={},this.parent.chartColl[i].primaryYAxis.majorGridLines={}),r.chart[d].primaryYAxis.majorGridLines.width=t.primaryYAxis.majorGridLines.width,this.parent.chartColl[i].primaryYAxis.majorGridLines.width=t.primaryYAxis.majorGridLines.width;break;case"GLMajorVertical":n.i(s.isNullOrUndefined)(r.chart[d].primaryXAxis)&&(r.chart[d].primaryXAxis={},this.parent.chartColl[i].primaryXAxis={}),n.i(s.isNullOrUndefined)(r.chart[d].primaryXAxis.majorGridLines)&&(r.chart[d].primaryXAxis.majorGridLines={},this.parent.chartColl[i].primaryXAxis.majorGridLines={}),r.chart[d].primaryXAxis.majorGridLines.width=t.primaryXAxis.majorGridLines.width,this.parent.chartColl[i].primaryXAxis.majorGridLines.width=t.primaryXAxis.majorGridLines.width;break;case"GLMinorHorizontal":n.i(s.isNullOrUndefined)(r.chart[d].primaryYAxis)&&(r.chart[d].primaryYAxis={},this.parent.chartColl[i].primaryYAxis={}),n.i(s.isNullOrUndefined)(r.chart[d].primaryYAxis.minorGridLines)&&(r.chart[d].primaryYAxis.minorGridLines={},this.parent.chartColl[i].primaryYAxis.minorGridLines={}),r.chart[d].primaryYAxis.minorGridLines.width=t.primaryYAxis.minorGridLines.width,this.parent.chartColl[i].primaryYAxis.minorGridLines.width=t.primaryYAxis.minorGridLines.width;break;case"GLMinorVertical":n.i(s.isNullOrUndefined)(r.chart[d].primaryXAxis)&&(r.chart[d].primaryXAxis={},this.parent.chartColl[i].primaryXAxis={}),n.i(s.isNullOrUndefined)(r.chart[d].primaryXAxis.minorGridLines)&&(r.chart[d].primaryXAxis.minorGridLines={},this.parent.chartColl[i].primaryXAxis.minorGridLines={}),r.chart[d].primaryXAxis.minorGridLines.width=t.primaryXAxis.minorGridLines.width,this.parent.chartColl[i].primaryXAxis.minorGridLines.width=t.primaryXAxis.minorGridLines.width;break;case"LegendNone":case"LegendsRight":case"LegendsLeft":case"LegendsBottom":case"LegendsTop":if(n.i(s.isNullOrUndefined)(r.chart[d].legendSettings)&&(r.chart[d].legendSettings={},this.parent.chartColl[i].legendSettings={}),r.chart[d].legendSettings.visible=t.legendSettings.visible,this.parent.chartColl[i].legendSettings.visible=t.legendSettings.visible,"LegendNone"!==e){r.chart[d].legendSettings.position=t.legendSettings.position,this.parent.chartColl[i].legendSettings.position=t.legendSettings.position;break}}},e.prototype.updateChartElement=function(e,t,n,r,i,o,s,l){if(!(o&&["PHAxes","PVAxes","PHAxisTitle","PVAxisTitle","GLMajorHorizontal","GLMajorVertical","GLMinorHorizontal","GLMinorVertical"].indexOf(e)>-1)){var d;switch(e){case"PHAxes":t=t,t.primaryXAxis.visible=!t.primaryXAxis.visible;break;case"PVAxes":t=t,t.primaryYAxis.visible=!t.primaryYAxis.visible;break;case"PHAxisTitle":t=t,t.primaryXAxis.title=i;break;case"PVAxisTitle":t=t,t.primaryYAxis.title=i;break;case"ChartTitleNone":t.title="";break;case"ChartTitleAbove":t.title=i;break;case"DLNone":case"DLCenter":case"DLInsideend":case"DLInsidebase":case"DLOutsideend":if(t=t,d=t.series,"DLNone"===e)for(var c=0,h=d.length;c<h;c++)o?d[c].dataLabel.visible=!1:d[c].marker.dataLabel.visible=!1;else for(var c=0,h=d.length;c<h;c++)if(o){var p="DLOutsideend"===e?"Outside":"Inside";d[c].dataLabel.visible=!0,d[c].dataLabel.position=p}else{var p="DLCenter"===e?"Middle":"DLInsideend"===e?"Top":"DLInsidebase"===e?"Bottom":"DLOutsideend"===e?"Outer":d[0].marker.dataLabel.position;d[c].marker.dataLabel.visible=!0,d[c].marker.dataLabel.position=p}t.series=d,o&&t.refresh();break;case"GLMajorHorizontal":t=t,t.primaryYAxis.majorGridLines.width=0===t.primaryYAxis.majorGridLines.width?1:0;break;case"GLMajorVertical":t=t,t.primaryXAxis.majorGridLines.width=0===t.primaryXAxis.majorGridLines.width?1:0;break;case"GLMinorHorizontal":t=t,t.primaryYAxis.minorTicksPerInterval=0===t.primaryYAxis.minorGridLines.width?5:0,t.primaryYAxis.minorGridLines.width=0===t.primaryYAxis.minorGridLines.width?1:0;break;case"GLMinorVertical":t=t,t.primaryXAxis.minorTicksPerInterval=0===t.primaryXAxis.minorGridLines.width?5:0,t.primaryXAxis.minorGridLines.width=0===t.primaryXAxis.minorGridLines.width?1:0;break;case"LegendNone":t.legendSettings.visible=!1;break;case"LegendsRight":case"LegendsLeft":case"LegendsBottom":case"LegendsTop":t.legendSettings.visible=!0,t.legendSettings.position="LegendsRight"===e?"Right":"LegendsLeft"===e?"Left":"LegendsBottom"===e?"Bottom":"LegendsTop"===e?"Top":t.legendSettings.position}if(this.updateChartModel(e,t,n,r,o),l){var u={addChartEle:e,id:t.element.id+"_overlay",title:i,address:s};this.parent.notify(a._31,{action:"chartDesign",eventArgs:u})}}},e.prototype.undoRedoForChartDesign=function(e){var t=document.getElementById(e.id);if(t){var i=this.getChartElement(t),a=n.i(s.getComponent)(i,"chart");n.i(s.isNullOrUndefined)(a)&&(a=n.i(s.getComponent)(i,"accumulationchart"));for(var o,l=this.parent.getAddressInfo(e.address),d=n.i(r.I)(l.indices[0],l.indices[1],n.i(r.l)(this.parent,l.sheetIndex)),c=this.getChartCollectionId(i.id),h=e.addChartEle,p=e.title,u=0;u<e.beforeActionData.cellDetails[0].chart.length;u++)if(i.id===e.beforeActionData.cellDetails[0].chart[u].id){o=e.beforeActionData.cellDetails[0].chart[u];break}var f=!n.i(s.isNullOrUndefined)(o.markerSettings)&&o.markerSettings.visible;if(e.switchRowColumn)this.switchRowColumn(c,i.id,a,d);else if(e.chartTheme)this.switchChartTheme(c,i.id,e.isUndo?o.theme:e.chartTheme,a,d);else if(e.chartType)this.switchChartType(c,i.id,e.isUndo?o.type:e.chartType,a,d,!1,e.isUndo?f:e.chartMarker,"undoRedo");else if(e.addChartEle){if(e.isUndo){var g=void 0;switch(h){case"DLNone":case"DLCenter":case"DLInsideend":case"DLInsidebase":case"DLOutsideend":g=o.dataLabelSettings&&o.dataLabelSettings.position,h="Middle"===g?"DLCenter":"Top"===g?"DLInsideend":"Bottom"===g?"DLInsidebase":"Outer"===g?"DLOutsideend":"DLNone";break;case"LegendNone":case"LegendsRight":case"LegendsLeft":case"LegendsBottom":case"LegendsTop":o.legendSettings&&!o.legendSettings.visible?g="LegendNone":(g=o.legendSettings&&o.legendSettings.position,h="Right"===g?"LegendsRight":"Left"===g?"LegendsLeft":"Bottom"===g?"LegendsBottom":"Top"===g?"LegendsTop":"LegendsBottom");break;case"PVAxisTitle":p=o.primaryYAxis&&o.primaryYAxis.title;break;case"PHAxisTitle":p=o.primaryXAxis&&o.primaryXAxis.title;break;case"ChartTitleNone":case"ChartTitleAbove":p=o.title}}this.updateChartElement(h,a,d,c,p,null,e.address)}}},e.prototype.chartDesignTabHandler=function(e){var t=!1,o=this.parent.sheets[this.parent.activeSheetIndex],l=e.switchRowColumn,d=e.chartType,c=e.chartTheme,h=e.addChartEle,p=null,u=e.id?document.getElementById(e.id):document.querySelector(".e-datavisualization-chart.e-ss-overlay-active");if(u){var f,g,m="ChartTitleAbove"===h||"PHAxisTitle"===h||"PVAxisTitle"===h;if(o.frozenRows||o.frozenColumns){var v=u.getBoundingClientRect();f={clientY:v.top},g={clientX:v.left},v.top<this.parent.getColumnHeaderContent().getBoundingClientRect().bottom&&(f.target=this.parent.getColumnHeaderContent()),v.left<this.parent.getRowHeaderContent().getBoundingClientRect().right&&(g.target=this.parent.getRowHeaderTable())}else f={clientY:u.offsetTop,isImage:!0},g={clientX:u.offsetLeft,isImage:!0};this.parent.notify(a._73,f),this.parent.notify(a._74,g);var y=n.i(r.I)(f.clientY,g.clientX,o),C=o.name+"!"+n.i(i.i)(f.clientY,g.clientX);if(e.triggerEvent){var b={switchRowColumn:e.switchRowColumn,chartType:e.chartType,chartTheme:e.chartTheme,addChartEle:e.addChartEle,id:u.id,address:C,cancel:!1};if(this.parent.notify(r._34,{action:"chartDesign",eventArgs:b}),b.cancel)return}var x=this.getChartElement(u),S=x.getAttribute("id"),w=this.getChartCollectionId(S);if(x&&(p=n.i(s.getComponent)(x,"chart"),n.i(s.isNullOrUndefined)(p)&&(p=n.i(s.getComponent)(x,"accumulationchart"),t=!0)),l&&!t&&this.switchRowColumn(w,S,p,y),d&&this.switchChartType(w,S,d,p,y,e.markerVisible),c&&this.switchChartTheme(w,S,c,p,y),h)if(m&&!e.title){if(this.parent.element.getElementsByClassName("e-title-dlg").length>0)return;this.titleDlgHandler(h,p,y,w,t,C,e.triggerEvent)}else this.updateChartElement(h,p,y,w,e.title,t);if(e.triggerEvent&&!m){var b={switchRowColumn:e.switchRowColumn,chartType:e.chartType,chartMarker:e.markerVisible,chartTheme:e.chartTheme,addChartEle:e.addChartEle,id:u.id,address:C};this.parent.notify(a._31,{action:"chartDesign",eventArgs:b})}}},e.prototype.switchRowColumn=function(e,t,r,i){this.parent.chartColl[e].isSeriesInRows=!!n.i(s.isNullOrUndefined)(this.parent.chartColl[e].isSeriesInRows)||!this.parent.chartColl[e].isSeriesInRows;for(var a=0,o=i.chart.length;a<o;a++)i.chart[a].id===t&&(i.chart[a].isSeriesInRows=this.parent.chartColl[e].isSeriesInRows);var l=this.initiateChartHandler({option:this.parent.chartColl[e],isRefresh:!0,isSwitchRowColumn:!0});r.series=l},e.prototype.switchChartTheme=function(e,t,n,r,i){this.parent.chartColl[e].theme=n;for(var a=0,o=i.chart.length;a<o;a++)i.chart[a].id===t&&(i.chart[a].theme=n);r.setProperties({theme:n,background:this.getThemeBgColor(n)},!0),r.refresh()},e.prototype.getThemeBgColor=function(e){var t;if(e.includes("Dark"))switch(e){case"MaterialDark":t="#383838";break;case"FabricDark":t="#242424";break;case"BootstrapDark":t="#1b1b1b";break;case"Bootstrap5Dark":t="#212529";break;case"TailwindDark":t="#1f2937";break;case"FluentDark":t="#1b1a19";break;case"Material3Dark":t="#1C1B1F"}else t=e.includes("HighContrast")?"#000000":"#FFFFFF";return t},e.prototype.switchChartType=function(e,t,r,a,o,l,d,c){var h=this.parent.chartColl[e].type;this.parent.chartColl[e].type=r;for(var p=0,u=o.chart.length;p<u;p++)o.chart[p].id===t&&(o.chart[p].type=r,n.i(s.isNullOrUndefined)(o.chart[p].markerSettings)||(o.chart[p].markerSettings.visible=l));if("Pie"!==r&&"Doughnut"!==r)if("Pie"===h||"Doughnut"===h)this.changeCharType(e);else{if(h!==r)if("Scatter"===r){var f=a.primaryXAxis.labels;f&&f.length>0&&n.i(i.o)(f[f.length-1])&&(a.primaryXAxis.valueType="Double")}else"Double"===a.primaryXAxis.valueType&&(a.primaryXAxis.valueType="Category");for(var g=a.series,m="Line"===r||"StackingLine"===r||"StackingLine100"===r,p=0,v=g.length;p<v;p++)g[p].type=r,m?(g[p].marker.visible=l,g[p].marker.shape=n.i(s.isNullOrUndefined)(g[p].marker.shape)?"Circle":g[p].marker.shape,"undoRedo"===c&&(g[p].marker.visible=d)):g[p].marker.visible=!1;a.series=g,a.refresh()}else if("Pie"===h||"Doughnut"===h){for(var g=a.series,p=0,v=g.length;p<v;p++)g[p].innerRadius="Pie"===r?"0%":"40%";a.series=g,a.refresh()}else this.changeCharType(e)},e.prototype.getChartElement=function(e){var t=e.querySelector(".e-chart");return n.i(s.isNullOrUndefined)(t)&&(t=e.querySelector(".e-accumulationchart")),t},e.prototype.getChartCollectionId=function(e){for(var t,n=0,r=this.parent.chartColl.length;n<r;n++)e===this.parent.chartColl[n].id&&(t=n);return t},e.prototype.changeCharType=function(e){var t=document.getElementById(this.parent.chartColl[e].id),r=n.i(s.closest)(t,".e-datavisualization-chart");r.remove(),this.parent.notify(i._75,{option:this.parent.chartColl[e],isInitCell:!1,triggerEvent:!1,isPaste:!1}),t=document.getElementById(this.parent.chartColl[e].id),r=n.i(s.closest)(t,".e-datavisualization-chart"),r.classList.contains("e-ss-overlay-active")||r.classList.add("e-ss-overlay-active")},e.prototype.titleDlgHandler=function(e,t,n,r,i,o,s){var l=this,d="";if(!i||"PHAxisTitle"!==e&&"PVAxisTitle"!==e){var c=this.parent.serviceLocator.getService(a._174),h=this.parent.serviceLocator.getService(a._175);h.show({width:375,showCloseIcon:!0,isModal:!0,cssClass:"e-title-dlg",header:"chart_abovechart"===e?c.getConstant("ChartTitle"):"PHAxisTitle"===e?c.getConstant("HorizontalAxisTitle"):c.getConstant("VerticalAxisTitle"),beforeOpen:function(){h.dialogInstance.content=l.titleDlgContent(e,t),h.dialogInstance.dataBind(),l.parent.element.focus()},buttons:[{buttonModel:{content:c.getConstant("Ok"),isPrimary:!0,cssClass:"e-btn e-clearall-btn e-flat"},click:function(){var i=l.parent.element.querySelector(".e-title-dlg").getElementsByClassName("e-title-dlg-content")[0];d=i.getElementsByTagName("input")[0].value,h.hide(),l.updateChartElement(e,t,n,r,d,null,o,s)}}]}),h.dialogInstance.refresh()}},e.prototype.titleDlgContent=function(e,t){var n=this.parent.serviceLocator.getService(a._174),r=this.parent.createElement("div",{className:"e-title-dlg-content"}),i=this.parent.createElement("span",{className:"e-header e-top-header"});i.innerText=n.getConstant("EnterTitle");var o=this.parent.createElement("input",{className:"e-input",id:"titleInput",attrs:{type:"text"}});return r.appendChild(i),r.appendChild(o),t&&(o.value="PHAxisTitle"===e?t.primaryXAxis.title?t.primaryXAxis.title:o.value:"PVAxisTitle"===e?t.primaryYAxis.title?t.primaryYAxis.title:o.value:t.title?t.title:o.value),r},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._75,this.initiateChartHandler),this.parent.off(a._78,this.refreshChartCellObj),this.parent.off(i._76,this.refreshChartCellModel),this.parent.off(a._79,this.refreshChartCellModel),this.parent.off(i._77,this.updateChartHandler),this.parent.off(a._77,this.deleteChart),this.parent.off(a._83,this.clearBorder),this.parent.off(a._84,this.insertChartHandler),this.parent.off(a._85,this.chartRangeHandler),this.parent.off(a._88,this.chartDesignTabHandler),this.parent.off(a._89,this.updateChartElement),this.parent.off(a._90,this.undoRedoForChartDesign))},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null;var e=null;this.chart&&(e=this.chart.element,this.chart.destroy()),e&&n.i(s.detach)(e),this.chart=null},e.prototype.getModuleName=function(){return"spreadsheetChart"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(11),i=(n.n(r),n(3)),a=(n.n(i),n(1)),o=n(2),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.render=function(){var e=this,t=this.parent.element.id,s=this.parent.createElement("input",{attrs:{type:"color"}}),l=function(e){e.element.tabIndex=-1};this.fontColorPicker=new r.ColorPicker({value:"#000000ff",mode:"Palette",showButtons:!1,presetColors:a._178,enableOpacity:!1,cssClass:"e-spreadsheet-color-popup",beforeTileRender:l,beforeClose:function(){return e.beforeCloseHandler(e.fontColorPicker)},open:this.openHandler.bind(this),beforeModeSwitch:function(t){return e.beforeModeSwitch(e.fontColorPicker,t)},change:function(t){var n=e.fontColorPicker.getValue(t.currentValue.rgba),r={style:{color:n},onActionUpdate:!0};e.parent.notify(o.G,r),r.cancel?e.fontColorPicker.setProperties({value:e.fontColorPicker.getValue(t.previousValue.rgba,"HEXA")},!0):e.updateSelectedColor(r.style.color,e.fontColorPicker.element,"TextColor")},created:function(){return e.updateSelectedColor("#000000",e.fontColorPicker.element,"TextColor",!0)}}),this.fontColorPicker.createElement=this.parent.createElement,this.parent.element.appendChild(s),this.fontColorPicker.appendTo(s),s.parentElement.id=t+"_font_color_picker",n.i(i.addClass)([s.nextElementSibling.getElementsByClassName("e-selected-color")[0]],["e-icons","e-font-color"]),s=this.parent.createElement("input",{attrs:{type:"color"}}),this.filColorPicker=new r.ColorPicker({value:"#ffff00ff",mode:"Palette",presetColors:a._179,showButtons:!1,enableOpacity:!1,cssClass:"e-spreadsheet-color-popup",open:this.openHandler.bind(this),beforeTileRender:l,beforeClose:function(){return e.beforeCloseHandler(e.filColorPicker)},beforeModeSwitch:function(t){return e.beforeModeSwitch(e.filColorPicker,t)},change:function(t){var n=e.filColorPicker.getValue(t.currentValue.rgba),r={style:{backgroundColor:n},onActionUpdate:!0};e.parent.notify(o.G,r),r.cancel?e.filColorPicker.setProperties({value:e.filColorPicker.getValue(t.previousValue.rgba,"HEXA")},!0):e.updateSelectedColor(r.style.backgroundColor,e.filColorPicker.element,"FillColor")},created:function(){return e.updateSelectedColor("#ffff00",e.filColorPicker.element,"FillColor",!0)}}),this.filColorPicker.createElement=this.parent.createElement,this.parent.element.appendChild(s),this.filColorPicker.appendTo(s),s.parentElement.id=t+"_fill_color_picker",n.i(i.addClass)([s.nextElementSibling.getElementsByClassName("e-selected-color")[0]],["e-icons","e-fill-color"])},e.prototype.updateSelectedColor=function(e,t,n,r){var i=this.parent.serviceLocator.getService(a._174).getConstant(n);r&&t.parentElement.querySelector(".e-dropdown-btn").setAttribute("aria-label",i);var o=t.parentElement.querySelector(".e-split-colorpicker");o.setAttribute("aria-label",i+" "+e),o.firstElementChild.style.borderBottomColor=e},e.prototype.openHandler=function(e){e.element.querySelector(".e-mode-switch-btn").title=this.parent.serviceLocator.getService(a._174).getConstant("MoreColors")},e.prototype.beforeCloseHandler=function(e){e.modeSwitcher||e.setProperties({modeSwitcher:!0},!0),e.showButtons&&e.setProperties({showButtons:!1},!0),n.i(a._159)(e.element.parentElement.querySelector(".e-split-colorpicker"))},e.prototype.beforeModeSwitch=function(e,t){var n=this.parent.serviceLocator.getService(a._174);"Picker"===t.mode?(e.showButtons=!0,e.dataBind(),t.element.querySelector(".e-apply").title=n.getConstant("Apply"),t.element.querySelector(".e-cancel").title=n.getConstant("Cancel"),t.element.querySelector(".e-mode-switch-btn").title=n.getConstant("StandardColors")):(e.showButtons=!1,e.dataBind(),t.element.querySelector(".e-mode-switch-btn").title=n.getConstant("MoreColors"))},e.prototype.destroy=function(){this.parent&&(this.removeEventListener(),this.fontColorPicker&&this.fontColorPicker.destroy(),this.fontColorPicker=null,this.filColorPicker&&this.filColorPicker.destroy(),this.filColorPicker=null,this.parent=null)},e.prototype.addEventListener=function(){this.parent.on(a._0,this.render,this),this.parent.on("destroyRibbonComponents",this.destroy,this),this.parent.on(a.i,this.destroy,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._0,this.render),this.parent.off("destroyRibbonComponents",this.destroy),this.parent.off(a.i,this.destroy))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(8),i=(n.n(r),n(3)),a=(n.n(i),n(1)),o=n(2),s=n(0),l=function(){function e(e){this.parent=e,this.init()}return e.prototype.init=function(){this.initContextMenu(),this.addEventListener()},e.prototype.initContextMenu=function(){var e=document.createElement("ul");e.id=this.parent.element.id+"_contextmenu",this.parent.element.appendChild(e),this.contextMenuInstance=new r.ContextMenu({cssClass:"e-spreadsheet-contextmenu",target:"#"+this.parent.element.id,filter:"e-numericcontainer e-active-cell e-selection e-row e-header-row e-select-all-cell e-sheet-tabs-items",select:this.selectHandler.bind(this),beforeOpen:this.beforeOpenHandler.bind(this),beforeClose:this.beforeCloseHandler.bind(this),beforeItemRender:function(e){e.element.setAttribute("aria-label",e.item.text)}},e),e.setAttribute("role","menu")},e.prototype.beforeCloseHandler=function(e){var t=this;this.parent.trigger("contextMenuBeforeClose",e),this.parent.enableKeyboardShortcut&&e.event&&27===e.event.keyCode&&n.i(a._115)(function(){return n.i(a._159)(t.parent.element)})},e.prototype.selectHandler=function(e){var t=n.i(i.extend)({cancel:!1},e);this.parent.trigger("contextMenuItemSelect",t);var r=this.parent.element.id+"_cmenu",l=[];if(this.parent.sortCollection)for(var d=this.parent.sortCollection.length-1;d>=0;d--)this.parent.sortCollection[d]&&this.parent.sortCollection[d].sheetIndex===this.parent.activeSheetIndex&&(l.push(this.parent.sortCollection[d]),this.parent.sortCollection.splice(d,1));var c;if(!t.cancel){var h=void 0;switch(e.item.id){case r+"_cut":this.parent.notify(a.J,{invokeCopy:!0,promise:Promise});break;case r+"_copy":this.parent.notify(a.K,{invokeCopy:!0,promise:Promise});break;case r+"_paste":this.parent.notify(a.L,{isAction:!0,isInternal:!0,focus:!0});break;case r+"_pastevalues":this.parent.notify(a.L,{type:"Values",isAction:!0,isInternal:!0,focus:!0});break;case r+"_pasteformats":this.parent.notify(a.L,{type:"Formats",isAction:!0,isInternal:!0,focus:!0});break;case r+"_rename":this.parent.notify(a.C,{});break;case r+"_delete_sheet":this.parent.notify(a.B,{}),n.i(a._159)(this.parent.element);break;case r+"_insert_sheet":this.parent.notify(o.J,{model:this.parent,start:this.parent.activeSheetIndex,end:this.parent.activeSheetIndex,modelType:"Sheet",isAction:!0,activeSheetIndex:this.parent.activeSheetIndex});break;case r+"_hide_sheet":this.parent.notify(a._17,{sheetIndex:this.parent.activeSheetIndex,triggerEvent:!0});break;case r+"_duplicate":n.i(s.r)(this.parent,void 0,!0),n.i(a._159)(this.parent.element);break;case r+"_move_right":n.i(s.q)(this.parent,this.parent.activeSheetIndex+1,null,!0),n.i(a._159)(this.parent.element);break;case r+"_move_left":n.i(s.q)(this.parent,this.parent.activeSheetIndex-1,null,!0),n.i(a._159)(this.parent.element);break;case r+"_ascending":this.parent.notify(a._26,{sortOptions:{sortDescriptors:{order:"Ascending"}}}),this.parent.notify(a._7,{sortOptions:{sortDescriptors:{order:"Ascending"}},previousSort:l});break;case r+"_descending":this.parent.notify(a._26,{sortOptions:{sortDescriptors:{order:"Descending"}}}),this.parent.notify(a._7,{sortOptions:{sortDescriptors:{order:"Descending"}},previousSort:l});break;case r+"_customsort":this.parent.notify(a._6,null);break;case r+"_filtercellvalue":this.parent.notify(a._28,null);break;case r+"_clearfilter":c=n.i(o.a)(n.i(o.w)(this.parent.getActiveSheet().activeCell)[1]+1),this.parent.notify(a._29,{field:c});break;case r+"_reapplyfilter":this.parent.notify(a._27,null);break;case r+"_hide_row":h=n.i(o.l)(this.parent.getActiveSheet().selectedRange),this.parent.notify(s._118,{startIndex:h[0],endIndex:h[2],hide:!0,isCol:!1,actionUpdate:!0});break;case r+"_unhide_row":h=n.i(o.l)(this.parent.getActiveSheet().selectedRange),this.parent.notify(s._118,{startIndex:h[0],endIndex:h[2],hide:!1,isCol:!1,actionUpdate:!0});break;case r+"_hide_column":h=n.i(o.l)(this.parent.getActiveSheet().selectedRange),this.parent.notify(s._118,{startIndex:h[1],endIndex:h[3],hide:!0,isCol:!0,actionUpdate:!0});break;case r+"_unhide_column":h=n.i(o.l)(this.parent.getActiveSheet().selectedRange),this.parent.notify(s._118,{startIndex:h[1],endIndex:h[3],hide:!1,isCol:!0,actionUpdate:!0});break;case r+"_insert_row_above":case r+"_delete_row":h=n.i(o.l)(this.parent.getActiveSheet().selectedRange),this.parent.notify(e.item.id.substr(r.length+1,6)+"Model",{model:this.parent.getActiveSheet(),start:h[0],end:h[2],modelType:"Row",isAction:!0,insertType:"above"});break;case r+"_insert_row_below":h=n.i(s._4)(n.i(o.l)(this.parent.getActiveSheet().selectedRange)),this.parent.notify(o.J,{model:this.parent.getActiveSheet(),start:h[2]+1,end:h[2]+1+(h[2]-h[0]),modelType:"Row",isAction:!0,insertType:"below"});break;case r+"_insert_column_before":case r+"_delete_column":h=n.i(o.l)(this.parent.getActiveSheet().selectedRange),this.parent.notify(e.item.id.substr(r.length+1,6)+"Model",{model:this.parent.getActiveSheet(),start:h[1],end:h[3],modelType:"Column",isAction:!0,insertType:"before"});break;case r+"_insert_column_after":h=n.i(s._4)(n.i(o.l)(this.parent.getActiveSheet().selectedRange)),this.parent.notify(o.J,{model:this.parent.getActiveSheet(),start:h[3]+1,end:h[3]+1+(h[3]-h[1]),modelType:"Column",isAction:!0,insertType:"after"});break;case r+"_hyperlink":this.parent.notify(a._11,null);break;case r+"_editHyperlink":this.parent.notify(a._12,null);break;case r+"_openHyperlink":this.parent.notify(a._13,null);break;case r+"_removeHyperlink":this.parent.notify(a._14,{range:this.parent.getActiveSheet().selectedRange});break;case r+"_protect":this.parent.notify(a._114,{})}}},e.prototype.getInsertModel=function(e,t){for(var n=[],r=e;r<=t;r++)r===e?n.push({index:r}):n.push({});return n},e.prototype.beforeOpenHandler=function(e){var t,r=e.event.target,l=this.getTarget(r);if(e.element.classList.contains("e-contextmenu")){var d=this.parent.getActiveSheet();if(e.event.target&&(r.classList.contains("e-rowresize")||r.classList.contains("e-colresize"))){var c=n.i(o.l)(d.selectedRange);if(!(r.classList.contains("e-rowresize")?0===c[1]&&c[3]===d.colCount-1:0===c[0]&&c[2]===d.rowCount-1))return void(e.cancel=!0);t=(r.classList.contains("e-rowresize")?this.parent.hiddenCount(c[0],c[2])!==Math.abs(c[2]-c[0])+1:this.parent.hiddenCount(c[1],c[3],"columns")!==Math.abs(c[3]-c[1])+1)?this.getDataSource(l):this.getDataSource(l,r)}else{if("Content"===l){var c=n.i(o.l)(d.selectedRange),h=0===c[1]&&c[3]===d.colCount-1,p=0===c[0]&&c[2]===d.rowCount-1;l=h&&p?"SelectAll":h?"RowHeader":p?"ColumnHeader":"Content"}t=this.getDataSource(l)}this.contextMenuInstance.items=t,this.contextMenuInstance.dataBind()}else t=e.items;if("None"===this.parent.selectionSettings.mode&&"Content"===l&&this.parent.enableContextMenuItems(["Filter"],!1,!1),"ColumnHeader"===l||"RowHeader"===l){if(e.element&&e.element.childElementCount>0){var u="ColumnHeader"===l?e.element.querySelector("#"+this.parent.element.id+"_cmenu_insert_column"):e.element.querySelector("#"+this.parent.element.id+"_cmenu_insert_row"),f="ColumnHeader"===l?e.element.querySelector("#"+this.parent.element.id+"_cmenu_delete_column"):e.element.querySelector("#"+this.parent.element.id+"_cmenu_delete_row");this.parent.allowInsert&&u.classList.contains("e-disabled")?u.classList.remove("e-disabled"):this.parent.allowInsert&&!this.parent.element.querySelector(".e-selectall.e-highlight")||u.classList.contains("e-disabled")||u.classList.add("e-disabled"),this.parent.allowDelete&&f.classList.contains("e-disabled")?f.classList.remove("e-disabled"):this.parent.allowDelete||f.classList.contains("e-disabled")||f.classList.add("e-disabled"),"None"===this.parent.selectionSettings.mode&&("ColumnHeader"===l&&this.parent.enableContextMenuItems(["Insert Column","Delete Column","Hide Column"],!1,!1),"RowHeader"===l&&this.parent.enableContextMenuItems(["Insert Row","Delete Row","Hide Row"],!1,!1))}}else if("Footer"===l){var g=n.i(s.e)(this.parent,r.textContent);0===g&&e.element.querySelector("#"+this.parent.element.id+"_cmenu_move_left").classList.add("e-disabled"),g===this.parent.sheets.length-1&&e.element.querySelector("#"+this.parent.element.id+"_cmenu_move_right").classList.add("e-disabled"),"None"===this.parent.selectionSettings.mode&&this.parent.enableContextMenuItems(["Insert"],!1,!1)}this.parent.trigger("contextMenuBeforeOpen",e),this.parent.notify(a.z,n.i(i.extend)(e,{target:l,items:t}))},e.prototype.getTarget=function(e){return n.i(i.closest)(e,".e-sheet-content")?"Content":n.i(i.closest)(e,".e-column-header")?e.classList.contains("e-header-cell")?"ColumnHeader":"Content":n.i(i.closest)(e,".e-row-header")?e.classList.contains("e-header-cell")?"RowHeader":"Content":n.i(i.closest)(e,".e-sheet-tabs-items")?"Footer":n.i(i.closest)(e,".e-selectall-container")?e.classList.contains("e-header-cell")?n.i(i.closest)(e,".e-header-row")?"ColumnHeader":"RowHeader":n.i(i.closest)(e,".e-select-all-cell")?"SelectAll":"Content":""},e.prototype.getDataSource=function(e,t){var r=this.parent.serviceLocator.getService(a._174),i=[],s=this.parent.element.id+"_cmenu";if("Content"===e)this.setClipboardData(i,r,s),i.push({separator:!0}),this.setFilterItems(i,s),this.setSortItems(i,s),i.push({separator:!0}),this.setHyperLink(i,s);else if("RowHeader"===e){this.setClipboardData(i,r,s);var l=this.parent.getActiveSheet(),d=n.i(o.l)(l.selectedRange);this.setInsertDeleteItems(i,r,"Row",s,[d[0],d[2]],["Above","Below"]),t&&!t.classList.contains("e-rowresize")&&t.parentElement&&t.parentElement.classList.value.includes("e-hide")||this.setHideShowItems(i,r,"Row",s,[d[0],d[2]])}else if("ColumnHeader"===e){this.setClipboardData(i,r,s);var l=this.parent.getActiveSheet(),d=n.i(o.l)(l.selectedRange);this.setInsertDeleteItems(i,r,"Column",s,[d[1],d[3]],["Before","After"]),t&&t.classList.value.includes("e-hide")||this.setHideShowItems(i,r,"Column",s,[d[1],d[3]])}else"SelectAll"===e?(this.setClipboardData(i,r,s),this.setFilterItems(i,s),this.setSortItems(i,s)):"Footer"===e&&(i.push({text:r.getConstant("Insert"),id:s+"_insert_sheet"}),i.push({text:r.getConstant("Delete"),iconCss:"e-icons e-delete",id:s+"_delete_sheet"}),i.push({text:r.getConstant("DuplicateSheet"),id:s+"_duplicate"}),i.push({text:r.getConstant("Rename"),id:s+"_rename"}),i.push({text:r.getConstant("Hide"),id:s+"_hide_sheet"}),this.setProtectSheetItems(i,s),i.push({text:r.getConstant("MoveRight"),id:s+"_move_right"}),i.push({text:r.getConstant("MoveLeft"),id:s+"_move_left"}));return i},e.prototype.setProtectSheetItems=function(e,t){var n=this.parent.serviceLocator.getService(a._174);this.parent.getActiveSheet().isProtected?e.push({text:n.getConstant("UnprotectSheet"),id:t+"_protect",iconCss:"e-icons e-protect-icon"}):e.push({text:n.getConstant("ProtectSheet"),id:t+"_protect",iconCss:"e-icons e-protect-icon"})},e.prototype.setFilterItems=function(e,t){if(this.parent.allowFiltering){var n=this.parent.serviceLocator.getService(a._174),r={clearFilterText:null,isFiltered:!1};this.parent.notify(a._30,r),e.push({text:n.getConstant("Filter"),id:t+"_filter",iconCss:"",items:[{text:r.clearFilterText,iconCss:"e-icons e-filter-clear",id:t+"_clearfilter"},{text:n.getConstant("ReapplyFilter"),iconCss:"e-icons e-filter-reapply",id:t+"_reapplyfilter"},{separator:!0},{text:n.getConstant("FilterCellValue"),iconCss:"",id:t+"_filtercellvalue"}]})}},e.prototype.setSortItems=function(e,t){var n=this.parent.serviceLocator.getService(a._174);this.parent.allowSorting&&e.push({text:n.getConstant("Sort"),id:t+"_sort",iconCss:"e-icons e-sort-icon",items:[{text:n.getConstant("SortAscending"),iconCss:"e-icons e-sort-asc",id:t+"_ascending"},{text:n.getConstant("SortDescending"),iconCss:"e-icons e-sort-desc",id:t+"_descending"},{text:n.getConstant("CustomSort")+"...",iconCss:"e-icons e-sort-custom",id:t+"_customsort"}]})},e.prototype.setHyperLink=function(e,t){this.parent.getActiveSheet();if(this.parent.allowHyperlink){var n=this.parent.serviceLocator.getService(a._174);document.activeElement.getElementsByClassName("e-hyperlink")[0]||document.activeElement.classList.contains("e-hyperlink")?e.push({text:n.getConstant("EditHyperlink"),iconCss:"e-icons e-edithyperlink-icon",id:t+"_editHyperlink"},{text:n.getConstant("OpenHyperlink"),iconCss:"e-icons e-openhyperlink-icon",id:t+"_openHyperlink"},{text:n.getConstant("RemoveHyperlink"),iconCss:"e-icons e-removehyperlink-icon",id:t+"_removeHyperlink"}):e.push({text:n.getConstant("Hyperlink"),iconCss:"e-icons e-hyperlink-icon",id:t+"_hyperlink"})}},e.prototype.setClipboardData=function(e,t,n){this.parent.enableClipboard&&(e.push({text:t.getConstant("Cut"),iconCss:"e-icons e-cut-icon",id:n+"_cut"}),e.push({text:t.getConstant("Copy"),iconCss:"e-icons e-copy-icon",id:n+"_copy"}),e.push({text:t.getConstant("Paste"),iconCss:"e-icons e-paste-icon",id:n+"_paste"}),e.push({text:t.getConstant("PasteSpecial"),id:n+"_pastespecial",items:[{text:t.getConstant("Values"),id:n+"_pastevalues"},{text:t.getConstant("Formats"),id:n+"_pasteformats"}]}))},e.prototype.setInsertDeleteItems=function(e,t,n,r,i,a){e.push({separator:!0}),["Insert","Delete"].forEach(function(o){i[0]===i[1]?e.push({text:t.getConstant(""+o+n),id:r+"_"+o.toLowerCase()+"_"+n.toLowerCase()}):e.push({text:t.getConstant(""+o+n+"s"),id:r+"_"+o.toLowerCase()+"_"+n.toLowerCase()}),"Insert"===o&&(e[e.length-1].items=[],a.forEach(function(n){e[e.length-1].items.push({text:t.getConstant(n),id:e[e.length-1].id+"_"+n.toLowerCase()})}))})},e.prototype.setHideShowItems=function(e,t,n,r,i){if(i[0]===i[1])e.push({text:t.getConstant("Hide"+n),id:r+"_hide_"+n.toLowerCase()});else{var a=i[0];i[0]=i[0]>i[1]?i[1]:i[0],i[1]=i[1]>a?i[1]:a,e.push({text:t.getConstant("Hide"+n+"s"),id:r+"_hide_"+n.toLowerCase()})}this.parent.hiddenCount(i[0],i[1],n.toLowerCase()+"s")&&e.push({text:t.getConstant("Unhide"+n+"s"),id:r+"_unhide_"+n.toLowerCase()})},e.prototype.addEventListener=function(){this.parent.on(a.P,this.addItemsHandler,this),this.parent.on(a.Q,this.removeItemsHandler,this),this.parent.on(a.R,this.enableItemsHandler,this)},e.prototype.addItemsHandler=function(e){e.insertAfter?this.contextMenuInstance.insertAfter(e.items,e.text,e.isUniqueId):this.contextMenuInstance.insertBefore(e.items,e.text,e.isUniqueId)},e.prototype.removeItemsHandler=function(e){this.contextMenuInstance.removeItems(e.items,e.isUniqueId)},e.prototype.enableItemsHandler=function(e){this.contextMenuInstance.enableItems(e.items,e.enable,e.isUniqueId)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a.P,this.addItemsHandler),this.parent.off(a.Q,this.removeItemsHandler),this.parent.off(a.R,this.enableItemsHandler))},e.prototype.getModuleName=function(){return"contextMenu"},e.prototype.destroy=function(){this.removeEventListener(),this.contextMenuInstance.destroy();var e=document.getElementById(this.parent.element.id+"_contextmenu");e&&n.i(i.detach)(e),this.contextMenuInstance=null,this.parent=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return u});var r=n(5),i=n(27),a=n(6),o=n(0),s=n(3),l=(n.n(s),n(20)),d=(n.n(l),n(9)),c=(n.n(d),n(8)),h=(n.n(c),n(11)),p=(n.n(h),n(5)),u=function(){function e(e){this.parent=e,this.filterCollection=new Map,this.filterRange=new Map,this.filterBtn=e.createElement("div",{className:"e-filter-btn e-control e-btn e-lib e-filter-iconbtn e-icon-btn"}),this.filterBtn.appendChild(e.createElement("span",{className:"e-btn-icon e-icons e-filter-icon"})),this.addEventListener()}return e.prototype.destroy=function(){var e=this;this.removeEventListener(),this.parent.refreshing&&this.filterRange.size&&(this.parent.filterCollection=[],this.filterRange.forEach(function(t,n){e.setFilteredCollection({sheetIdx:n,saveJson:{filterCollection:e.parent.filterCollection}})})),this.filterRange=null,this.filterCollection=null,this.filterBtn&&this.filterBtn.remove(),this.filterBtn=null,this.treeViewObj&&this.treeViewObj.destroy(),this.treeViewObj=null,this.treeViewEle&&this.treeViewEle.remove(),this.treeViewEle=null,this.cBox&&(this.cBox.remove(),this.cBox=null),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(a._50,this.filterRangeAlertHandler,this),this.parent.on(r._23,this.initiateFilterUIHandler,this),this.parent.on(r.h,this.filterMouseDownHandler,this),this.parent.on(r._24,this.renderFilterCellHandler,this),this.parent.on(r._25,this.refreshFilterRange,this),this.parent.on(r._26,this.updateSortCollectionHandler,this),this.parent.on(l.beforeFltrcMenuOpen,this.beforeFilterMenuOpenHandler,this),this.parent.on(l.filterCmenuSelect,this.closeDialog,this),this.parent.on(r._27,this.reapplyFilterHandler,this),this.parent.on(r._28,this.filterByCellValueHandler,this),this.parent.on(r._29,this.clearFilterHandler,this),this.parent.on(r._30,this.getFilteredColumnHandler,this),this.parent.on(r.z,this.cMenuBeforeOpenHandler,this),this.parent.on(l.filterCboxValue,this.filterCboxValueHandler,this),this.parent.on(r._33,this.getFilterRangeHandler,this),this.parent.on(r._32,this.filterCellKeyDownHandler,this),this.parent.on(a._41,this.setFilteredCollection,this),this.parent.on(p.g,this.updateFilter,this),this.parent.on(o._136,this.beforeInsertHandler,this),this.parent.on(a._17,this.beforeDeleteHandler,this),this.parent.on(a.r,this.deleteSheetHandler,this),this.parent.on(o._122,this.clearHandler,this),this.parent.on(l.filterDialogCreated,this.filterDialogCreatedHandler,this),this.parent.on(l.filterDialogClose,this.removeFilterClass,this),this.parent.on(a.n,this.duplicateSheetFilterHandler,this),this.parent.on(l.fltrPrevent,this.beforeFilteringHandler,this),this.parent.on(l.beforeCustomFilterOpen,this.customFilterOpen,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._50,this.filterRangeAlertHandler),this.parent.off(r._23,this.initiateFilterUIHandler),this.parent.off(r.h,this.filterMouseDownHandler),this.parent.off(r._24,this.renderFilterCellHandler),this.parent.off(r._25,this.refreshFilterRange),this.parent.off(r._26,this.updateSortCollectionHandler),this.parent.off(l.beforeFltrcMenuOpen,this.beforeFilterMenuOpenHandler),this.parent.off(l.filterCmenuSelect,this.closeDialog),this.parent.off(r._27,this.reapplyFilterHandler),this.parent.off(r._28,this.filterByCellValueHandler),this.parent.off(r._29,this.clearFilterHandler),this.parent.off(r._30,this.getFilteredColumnHandler),this.parent.off(r.z,this.cMenuBeforeOpenHandler),this.parent.on(l.filterCboxValue,this.filterCboxValueHandler),this.parent.off(r._33,this.getFilterRangeHandler),this.parent.off(r._32,this.filterCellKeyDownHandler),this.parent.off(a._41,this.setFilteredCollection),this.parent.off(p.g,this.updateFilter),this.parent.off(o._136,this.beforeInsertHandler),this.parent.off(a._17,this.beforeDeleteHandler),this.parent.off(a.r,this.deleteSheetHandler),this.parent.off(o._122,this.clearHandler),this.parent.off(l.filterDialogCreated,this.filterDialogCreatedHandler),this.parent.off(l.filterDialogClose,this.removeFilterClass),this.parent.off(a.n,this.duplicateSheetFilterHandler),this.parent.off(l.fltrPrevent,this.beforeFilteringHandler),this.parent.off(l.beforeCustomFilterOpen,this.customFilterOpen))},e.prototype.getModuleName=function(){return"filter"},e.prototype.isInValidFilterRange=function(e,t){var r=t?n.i(o._4)(n.i(o.Z)(t)):n.i(o._4)(n.i(o.Z)(e.selectedRange)),i=!1;return 0===e.usedRange.colIndex&&0===e.usedRange.rowIndex&&n.i(s.isNullOrUndefined)(e.rows[e.usedRange.rowIndex])&&(i=!0),r[0]>e.usedRange.rowIndex||r[1]>e.usedRange.colIndex||i},e.prototype.filterRangeAlertHandler=function(e){var t=this;this.parent.serviceLocator.getService(r._175).show({content:e.error,isModal:!0,height:180,width:400,showCloseIcon:!0,beforeOpen:function(e){var i={dialogName:"FilterRangeDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",i),i.cancel?e.cancel=!0:n.i(r._159)(t.parent.element)}}),this.parent.hideSpinner()},e.prototype.beforeFilterMenuOpenHandler=function(e){var t=this.parent.serviceLocator.getService(r._174);e.element.classList.add("e-spreadsheet-contextmenu");var n=e.element.querySelector("ul");this.addMenuItem(n,t.getConstant("SortDescending"),"e-filter-sortdesc","e-sort-desc"),this.addMenuItem(n,t.getConstant("SortAscending"),"e-filter-sortasc","e-sort-asc"),e.element.appendChild(n)},e.prototype.addMenuItem=function(e,t,n,r){var i=this.parent.createElement("li",{className:n+" e-menu-item"});i.innerText=t,i.insertBefore(this.parent.createElement("span",{className:"e-menu-icon e-icons "+r}),i.firstChild),e.insertBefore(i,e.firstChild)},e.prototype.initiateFilterUIHandler=function(e){var t=this,i=e?e.predicates:null,a=e.sIdx;a||0===a||(a=e.isOpen?0:this.parent.activeSheetIndex);var s;e.promise&&(s=new d.Deferred,e.promise=s.promise);var l=function(){s&&s.resolve()},c=e.isInternal||e.isCut;if(this.filterRange.size>0&&this.filterRange.has(a)&&!this.parent.isOpen&&!i)return this.removeFilter(a,c,!1),void l();var h=n.i(o.l)(this.parent,a);if(this.isInValidFilterRange(h,e.range)){var u=this.parent.serviceLocator.getService(r._174);return this.filterRangeAlertHandler({error:u.getConstant("FilterOutOfRangeError")}),void l()}var f,g,m=e.range||h.selectedRange;if(!c){if(f={range:m,sheetIndex:a,cancel:!1,allowHeaderFilter:!1},e.predicates?(f.predicates=e.predicates,f.previousPredicates=this.filterCollection.get(a)&&[].slice.call(this.filterCollection.get(a))):f.filterOptions={predicates:e.predicates},f.useFilterRange=!1,g={action:"filter",eventArgs:f},this.parent.notify(o._34,g),f.cancel)return void l();delete f.cancel,e.useFilterRange=f.useFilterRange,e.allowHeaderFilter=f.allowHeaderFilter}if(e.range||!c&&m!==f.range)c||(m=f.range);else{var v=n.i(o.T)(m);v[0]===v[2]&&v[1]===v[3]&&(v=n.i(o._176)(v[0],v[1],h),m=n.i(o.X)(v),c||(f.range=m))}if(i){if(i.length){var y=this.filterRange.get(a);y&&(e.useFilterRange=y.useFilterRange,e.allowHeaderFilter=y.allowHeaderFilter),this.processRange(h,a,m,!0,e.useFilterRange,e.allowHeaderFilter);var C=this.filterRange.get(a).range.slice();e.allowHeaderFilter||(C[0]=C[0]+1),e.useFilterRange||(C[2]=h.usedRange.rowIndex),C[1]=C[3]=n.i(o.V)(i[0].field);var b=h.name+"!"+this.getPredicateRange(C,i.slice(1,i.length)),x=n.i(o.X)(C);return void n.i(o.P)(this.parent,b,!0,!0,null,!0,null,null,!1,x).then(function(n){t.filterSuccessHandler(new d.DataManager(n),{action:"filtering",filterCollection:i,field:i[0].field,sIdx:e.sIdx,isInternal:c,isOpen:e.isOpen,prevPredicates:f&&f.previousPredicates}),l()})}this.clearFilterHandler({sheetIndex:a}),l()}else this.processRange(h,a,m,!1,e.useFilterRange,e.allowHeaderFilter),l();c||(this.parent.notify(p._31,g),n.i(r._159)(this.parent.element))},e.prototype.processRange=function(e,t,r,i,a,s){var l=n.i(o._4)(n.i(o.Z)(r||e.selectedRange));l[0]===l[2]&&l[1]===l[3]?(l[0]=0,l[1]=0,l[2]=e.usedRange.rowIndex,l[3]=e.usedRange.colIndex):l[3]>e.usedRange.colIndex&&(l[3]=e.usedRange.colIndex);var d={useFilterRange:a,range:l};s&&(d.allowHeaderFilter=s),this.filterRange.set(t,d),this.filterCollection.set(t,[]),i||this.refreshFilterRange(l,!1,t)},e.prototype.removeFilter=function(e,t,r){var i,a=this.filterRange.get(e),s=a.range.slice(),l=a.allowHeaderFilter,d=n.i(o.X)(s);if(!t){if(i={action:"filter",eventArgs:{range:d,sheetIndex:e,cancel:!1}},this.parent.notify(o._34,i),i.eventArgs.cancel)return;delete i.eventArgs.cancel}(this.filterCollection.get(e).length||r)&&this.clearFilterHandler({preventRefresh:r,sheetIndex:e}),this.filterRange.delete(e),this.filterCollection.delete(e),this.refreshFilterRange(s,!0,e,l),t||this.parent.notify(p._31,i)},e.prototype.filterByCellValueHandler=function(){var e=this,t=this.parent.activeSheetIndex,i=this.parent.getActiveSheet();if(this.isInValidFilterRange(i)){var a=this.parent.serviceLocator.getService(r._174);return void this.filterRangeAlertHandler({error:a.getConstant("FilterOutOfRangeError")})}var s,l=n.i(o.T)(i.activeCell);this.isFilterRange(t,l[0],l[1])||(s=!0,this.processRange(i,t));var c=this.filterRange.get(t),h=c.range.slice(),p=n.i(o.X)(h);h[0]=h[0]+1,h[2]=i.usedRange.rowIndex,h[1]=h[3]=l[1];var u=n.i(o.Y)(l[1]+1),f=n.i(o.I)(l[0],l[1],i),g=n.i(o.Q)(this.parent,f,l[0],l[1]),m=[{field:u,operator:"equal",type:this.getColumnType(i,l[1],l).type,matchCase:!1,value:g}],v=[].slice.call(this.filterCollection.get(t));v.length||(v=void 0);var y={range:p,predicates:m,previousPredicates:v,sheetIndex:t,cancel:!1,allowHeaderFilter:!1};if(this.parent.notify(o._34,{action:"filter",eventArgs:y}),y.cancel)return void(s&&this.removeFilter(t,!0));y.allowHeaderFilter&&(c.allowHeaderFilter=y.allowHeaderFilter,h[0]--);var C=i.name+"!"+this.getPredicateRange(h,this.filterCollection.get(t)),b=n.i(o.X)(h);n.i(o.P)(this.parent,C,!0,!0,null,!0,null,null,!1,b).then(function(t){e.filterSuccessHandler(new d.DataManager(t),{action:"filtering",filterCollection:m,field:u,isFilterByValue:!0})})},e.prototype.renderFilterCellHandler=function(e){var t=n.i(s.isNullOrUndefined)(e.sIdx)?this.parent.activeSheetIndex:e.sIdx;if(t===this.parent.activeSheetIndex){var r=this.filterRange.get(t)&&this.filterRange.get(t),i=r&&r.range;if(i&&(i[0]===e.rowIndex||r.allowHeaderFilter)&&i[1]<=e.colIndex&&i[3]>=e.colIndex){if(!e.td||e.td.classList.contains(r.allowHeaderFilter?"e-cell":"e-header-cell"))return;for(var a=e.td.querySelector(".e-filter-icon"),l="",d=this.parent.sortCollection,c=n.i(o.Y)(e.colIndex+1),h=this.filterCollection.get(t),p=0;p<h.length;p++)if(h[p].field===c){l=" e-filtered";break}if(d)for(var p=0;p<d.length;p++)if(d[p].sheetIndex===t&&d[p].columnIndex===e.colIndex){l+="Ascending"===d[p].order?" e-sortasc-filter":" e-sortdesc-filter";break}a?a.className="e-btn-icon e-icons e-filter-icon"+l:(a=this.filterBtn.cloneNode(!0),a.firstElementChild.className="e-btn-icon e-icons e-filter-icon"+l,e.td.insertBefore(a,e.td.firstChild))}}},e.prototype.refreshFilterRange=function(e,t,r,i){var a=r;a||0===a||(a=this.parent.activeSheetIndex);var s=this.filterRange&&this.filterRange.get(a);s?(e=e||s.range.slice(),i=s.allowHeaderFilter):e||(e=[0,0,0,0]);for(var l,d=e,c=this.parent.frozenColCount(n.i(o.l)(this.parent,a)),h=d[1];h<=d[3];h++){if(i){var p=h<c?this.parent.sheetModule.getSelectAllTable():this.parent.getColHeaderTable(),u=p&&this.parent.getRow(0,p);l=u&&this.parent.getCell(0,h,u)}else l=this.parent.getCell(d[0],h);if(t){if(l){var f=l.querySelector(".e-filter-btn");f&&f.parentElement.removeChild(f)}}else this.renderFilterCellHandler({td:l,rowIndex:d[0],colIndex:h,sIdx:a})}this.parent.sortCollection&&this.parent.notify(o._35,null)},e.prototype.isFilterCell=function(e,t,n){var r=this.filterRange.get(e)&&this.filterRange.get(e).range;return r&&r[0]===t&&r[1]<=n&&r[3]>=n},e.prototype.isFilterRange=function(e,t,n){var r=this.filterRange.get(e)&&this.filterRange.get(e).range;return r&&r[0]<=t&&r[2]>=t&&r[1]<=n&&r[3]>=n},e.prototype.getFilteredColumnHandler=function(e){var t=n.i(s.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,i=this.parent.serviceLocator.getService(r._174);if(e.clearFilterText=i.getConstant("ClearFilter"),this.filterRange.has(t)){var a=this.filterCollection.get(t);if(e.isClearAll)return void(e.isFiltered=a&&a.length>0);var l=this.filterRange.get(t).range.slice(),d=n.i(o.l)(this.parent,t),c=n.i(o.U)(d.activeCell);if(this.isFilterRange(t,c[0],c[1])){e.field=n.i(o.Y)(c[1]+1);var h=n.i(o.I)(l[0],c[1],d),p=this.parent.getDisplayText(h);e.clearFilterText=i.getConstant("ClearFilterFrom")+'"'+(p?p.toString():"Column "+e.field)+'"',a.some(function(t){return e.isFiltered=t.field===e.field,e.isFiltered})}}},e.prototype.cMenuBeforeOpenHandler=function(e){var t=this.parent.element.id+"_cmenu";if(e.parentItem&&e.parentItem.id===t+"_filter"&&""===e.target){var n={isFiltered:!1};this.getFilteredColumnHandler(n),this.parent.enableContextMenuItems([t+"_clearfilter",t+"_reapplyfilter"],!!n.isFiltered,!0)}},e.prototype.closeDialog=function(){var e=document.querySelector(".e-filter-popup");if(e&&e.id.includes(this.parent.element.id)){var t=n.i(s.getComponent)(e,"dialog");s.EventHandler.remove(e,n.i(r._126)(),this.filterMouseDownHandler),t&&t.hide(),this.parent.notify(l.filterDialogClose,null)}},e.prototype.removeFilterClass=function(){"relative"===this.parent.element.style.position&&(this.parent.element.style.position=""),this.parent.element.classList.contains("e-filter-open")&&this.parent.element.classList.remove("e-filter-open")},e.prototype.isPopupOpened=function(){var e=document.getElementsByClassName("e-filter-popup")[0];return e&&e.id.includes(this.parent.element.id)&&"none"!==e.style.display},e.prototype.filterCellKeyDownHandler=function(e){var t=this.parent.getActiveSheet(),r=n.i(o.U)(t.activeCell);if(this.isFilterCell(this.parent.activeSheetIndex,r[0],r[1]))if(e.closePopup)this.closeDialog();else if(e.isFilterCell=!0,!this.isPopupOpened()){var i=this.parent.getCell(r[0],r[1]);i&&this.openDialog(i)}},e.prototype.filterMouseDownHandler=function(e){if(!(s.Browser.isDevice&&"mousedown"===e.type||this.parent.getActiveSheet().isProtected)){var t=e.target;if(t.classList.contains("e-filter-icon")||t.classList.contains("e-filter-btn"))this.isPopupOpened()&&this.closeDialog(),this.openDialog(n.i(l.parentsUntil)(t,"e-cell")||n.i(l.parentsUntil)(t,"e-header-cell"));else if(this.isPopupOpened()){var r=t.offsetParent;t.classList.contains("e-searchinput")||t.classList.contains("e-searchclear")||!r||r.classList.contains("e-filter-popup")||r.classList.contains("e-text-content")||r.classList.contains("e-checkboxtree")||r.classList.contains("e-checkbox-wrapper")?this.selectSortItemHandler(t):this.closeDialog()}}},e.prototype.cboxListSelected=function(e,t,r,i,a){var o=n.i(l.parentsUntil)(i.target,"e-ftrchk");if(o){var d=a&&o.querySelector(".e-add-current");if(d)return d.classList.contains("e-check")?(n.i(s.classList)(d,["e-uncheck"],["e-check"]),t.length||(e.btnObj.element.disabled=!0),!1):(n.i(s.classList)(d,["e-check"],["e-uncheck"]),e.btnObj.element.disabled=!1,!0);var c=o.querySelector(".e-selectall");if(c){o.querySelector(".e-chk-hidden").indeterminate=!1;for(var h=o.querySelector(".e-frame").classList.contains("e-check"),p=void 0,u=void 0,f=a?2:1,g=e.element.childElementCount;f<g;f++)p=e.element.children[f].querySelector(".e-frame"),n.i(s.removeClass)([p],["e-check","e-stop","e-uncheck"]),h?(e.element.children[f].querySelector(".e-chk-hidden").checked=!1,p.classList.add("e-uncheck"),t.splice(0,1)):(e.element.children[f].querySelector(".e-chk-hidden").checked=!0,p.classList.add("e-check"),u=e.element.children[f].querySelector(".e-checkboxfiltertext").textContent,-1===t.indexOf(u)&&t.push(u))}else{var u=o.querySelector(".e-checkboxfiltertext").textContent;o.querySelector(".e-frame").classList.contains("e-check")?t.splice(t.indexOf(u),1):t.push(u),n.i(l.toogleCheckbox)(o),c=e.element.querySelector(".e-selectall")}this.updateState(e,c,c.parentElement.querySelector(".e-chk-hidden"),t.length!==r,t.length)}return null},e.prototype.initCboxList=function(e,t){var i=this,a=e.column.field,c=new d.DataManager(e.dataSource).executeLocal((new d.Query).sortBy(a+"_value","ascending")),h=[],p=this.parent.getActiveSheet(),u=this.parent.serviceLocator.getService(r._174),f=document.createDocumentFragment(),g=this.createSelectAll(e,t);f.appendChild(g);var m,v,y={},C=[],b=[];c.forEach(function(e){if(""===e[a]){if(!y.isBlank){y.isBlank=!0;var r={};r[a]=u.getConstant("Blanks"),m=n.i(o.w)(p,Number(e.__rowIndex)-1);var i=n.i(l.createCboxWithWrap)(n.i(l.getUid)("cbox"),t.createCheckbox(r[a],!m,r),"e-ftrchk");1===f.childElementCount?f.appendChild(i):f.insertBefore(i,f.children[1]),h.splice(0,0,r[a]),m||(C.push(r[a]),b.push(r[a]))}}else y[e[a]]||(y[e[a]]=!0,m=n.i(o.w)(p,Number(e.__rowIndex)-1),v=e[a],f.appendChild(n.i(l.createCboxWithWrap)(n.i(l.getUid)("cbox"),t.createCheckbox(v,!m,e),"e-ftrchk")),h.push(v),m||(C.push(v),b.push(v)))}),e.element.appendChild(f);var x=g.querySelector(".e-frame");x.classList.add("e-selectall");var S=g.querySelector(".e-chk-hidden");this.updateState(e,x,S,b.length!==h.length,b.length);var w,_,I,E=[].slice.call(e.element.childNodes);e.element.addEventListener("click",function(t){if(w){var n=i.cboxListSelected(e,w,e.element.childElementCount-2,t,!0);null!==n&&(I=n)}else i.cboxListSelected(e,b,h.length,t)});var R=function(r){var a;if("keyup"===r.event.type)a=r.event.target.value.toLowerCase();else if(r.event.target.classList.contains("e-search-icon"))return;var o=document.createDocumentFragment();if(o.appendChild(g),a)if(_=[],w=[],h.forEach(function(r){if(r.toLowerCase().includes(a)){var i={};i[e.column.field]=r,o.appendChild(n.i(l.createCboxWithWrap)(n.i(l.getUid)("cbox"),t.createCheckbox(r,!0,i),"e-ftrchk")),_.push(r),w.push(r)}}),w.length){i.updateState(e,x,S,!1,0),g.classList.remove("e-hide");var s={};s[e.column.field]=u.getConstant("AddCurrentSelection");var d=n.i(l.createCboxWithWrap)(n.i(l.getUid)("cbox"),t.createCheckbox(s[e.column.field],!1,s),"e-ftrchk");o.insertBefore(d,o.children[1]),d.querySelector(".e-frame").classList.add("e-add-current")}else{g.classList.add("e-hide");var c=i.parent.createElement("div",{className:"e-checkfltrnmdiv"}),p=i.parent.createElement("span");p.innerText=u.getConstant("NoResult"),c.appendChild(p),o.appendChild(c),e.btnObj.element.disabled=!0}else E&&(w=null,_=null,i.updateState(e,x,S,b.length!==h.length,b.length),g.classList.remove("e-hide"),E.forEach(function(e){o.appendChild(e)}));e.element.innerHTML="",e.element.appendChild(o)},k=function(){if(_)if(I){var l=void 0,c=void 0;b=C;for(var p=0,f=_.length;p<f;p++)l=_[p],_.length===w.length||w.indexOf(l)>-1?-1===b.indexOf(l)&&b.push(l):(c=b.indexOf(l))>-1&&b.splice(c,1)}else b=w;var g=b.length;if(g===h.length)i.filterSuccessHandler(new d.DataManager(e.dataSource),{action:"clear-filter",field:e.column.field});else{var m=[],v={field:a,ignoreAccent:!1,matchCase:!1,isFilterByMenu:!0},y=n.i(s.getNumberDependable)(r._174,s.defaultCurrencyCode),x=n.i(s.getNumericObject)(i.parent.locale),S=function(t){var r=e.type;"number"===r&&(t===u.getConstant("Blanks")?(t="",r="string"):n.i(o._190)(n.i(o._181)([t],i.parent.locale,y,x)[0])||(r="string")),m.push(Object.assign({value:t,type:r},v))};if(g>h.length/2){v.operator="notequal",v.predicate="and";for(var p=0,f=h.length;p<f;p++)-1===b.indexOf(h[p])&&S(h[p])}else{v.operator="equal",v.predicate="or";for(var p=0,f=g;p<f;p++)S(b[p])}t.initiateFilter(m)}};this.wireFilterEvents(e,k,R.bind(this))},e.prototype.createSelectAll=function(e,t){var i={};return i[e.column.field]=this.parent.serviceLocator.getService(r._174).getConstant("SelectAll"),n.i(l.createCboxWithWrap)(n.i(l.getUid)("cbox"),t.createCheckbox(i[e.column.field],!1,i),"e-ftrchk")},e.prototype.updateState=function(e,t,r,i,a){if(n.i(s.removeClass)([t],["e-check","e-stop","e-uncheck"]),e.btnObj.element.disabled&&(e.btnObj.element.disabled=!1),i)if(a)t.classList.add("e-stop");else{t.classList.add("e-uncheck");var o=e.element.querySelector(".e-add-current");e.btnObj.element.disabled=!o||!o.classList.contains("e-check")}else t.classList.add("e-check");r.indeterminate=i,r.checked=!i},e.prototype.beforeFilteringHandler=function(e){var t=this;if(e.instance&&e.instance.options){if(e.isOpen&&"string"===e.instance.options.type){var r=n.i(s.getNumericObject)(this.parent.locale);if("."!==r.decimal){var a=e.arg3.toString().split(".");if(2===a.length){var l=a.join(r.decimal);n.i(o._190)(new s.Internationalization(this.parent.locale).parseNumber(l,{format:"n"}))&&(e.arg3=l)}}}var d=function(e,r){if(r&&("notequal"===r||t.isCustomNumFilter(r)))if(e){if(n.i(o._190)(e))e=parseFloat(e.toString());else if("string"==typeof e){var a=n.i(s.getNumericObject)(t.parent.locale),l=new s.Internationalization(t.parent.locale),c={};if(e.includes(a.percentSign)){var h=e.trim().split("%");""===h[0]||h[1]||(c=n.i(i.b)({value:h[0]},t.parent.locale,a.group,a.decimal))}if(c.isNumber)e=Number(c.value)/100;else{var p=l.parseNumber(e.trim(),{format:"n"});if(n.i(o._190)(p))e=p;else{var u=e.trim(),f={value:u,cell:{value:u}};t.parent.notify(o._51,f),(f.isTime||f.isDate)&&(e=parseFloat(f.updatedVal))}}}}else"notequal"===r&&null===e&&(e="");else"equal"===r&&(n.i(o._190)(e)?e=e.toString():"string"==typeof e&&n.i(o._190)(d(e,"notequal"))?e=e.trim():null===e&&(e=""));return e};if("date"!==e.instance.options.type)e.arg3=d(e.arg3,e.arg2),e.arg8=d(e.arg8,e.arg7);else if("yMd"===e.instance.options.format){var c=function(r,i){if(r)if("string"==typeof r){var a=r.trim(),s={value:a,cell:{value:a}};if(t.parent.notify(o._51,s),s.isDate)r="equal"===i?s.dateObj:parseFloat(s.updatedVal);else if("equal"===i||"notequal"===i){var l=d(r,"notequal");n.i(o._190)(l)?(e.instance.options.type="number","notequal"===i&&(r=l)):e.instance.options.type="string"}}else n.i(o._189)(r)&&"equal"!==i&&(r=n.i(o._188)(r,!0));return r},h=document.querySelectorAll(".e-xlfl-valuediv input.e-datepicker");2===h.length?(e.arg3=c(e.arg3||h[0].value,e.arg2),e.arg8=c(e.arg8||h[1].value,e.arg7)):e.arg3&&(e.arg3=c(e.arg3,e.arg2))}}},e.prototype.customFilterOpen=function(e){for(var t=document.querySelectorAll(".e-xlfl-optrdiv input.e-dropdownlist"),i=[],a=0;a<t.length;a++){var l=n.i(s.getComponent)(t[a],"dropdownlist");l&&i.push(l.value)}var d=[];if(2===i.length)for(var c=this.filterCollection.get(this.parent.activeSheetIndex),p=void 0,a=0;a<c.length;a++)c[a].field===e.column&&null!==c[a].value&&(p=i.indexOf(c[a].operator))>-1&&("equal"===c[a].operator&&n.i(o._189)(c[a].value)?d[p]=n.i(o._188)(c[a].value,!0).toString():d[p]=c[a].value.toString(),i[p]="");var u=n.i(s.getNumericObject)(this.parent.locale),f=function(e){if("."!==u.decimal&&n.i(o._190)(e)){var t=e.toString();if(t.includes("."))return t.replace(".",u.decimal)}return e},g=document.querySelectorAll(".e-xlfl-valuediv input.e-ss-filter-input");if(g.length)for(var a=0;a<g.length;a++){var m=new h.TextBox({placeholder:this.parent.serviceLocator.getService(r._174).getConstant("CustomFilterPlaceHolder")});d[a]&&(m.value=f(d[a])),m.appendTo(g[a])}else for(var v=document.querySelectorAll(".e-xlfl-valuediv input.e-datepicker"),y=void 0,C=void 0,a=0;a<v.length;a++)C=n.i(o._190)(d[a])?this.parent.getDisplayText({value:d[a],format:n.i(o._201)("ShortDate")+(d[a].includes(".")?" "+n.i(o._201)("Time"):"")}):f(d[a]),(y=n.i(s.getComponent)(v[a],"datepicker"))&&(y.value=C,v[a].value=C)},e.prototype.wireFilterEvents=function(e,t,i){var a=this;e.btnObj.element.addEventListener("click",t.bind(this)),e.searchBox.addEventListener("keydown",function(e){13===e.keyCode&&t()});var o=function(){a.parent.off(p._112,i),a.parent.off(l.filterDialogClose,o),n.i(r._159)(a.parent.element)};this.parent.on(l.filterDialogClose,o,this),this.parent.on(p._112,i,this)},e.prototype.initTreeView=function(e,t){var i,a,s,l,h,p,u,f,g=this,m=[],v=[],y={},C=[],b=[],x=[],S=[],w=["January","February","March","April","May","June","July","August","September","October","November","December"],_=!1,I=this.parent.getActiveSheet(),E=function(e){y[""+p]=!0,n.i(o.w)(I,Number(e.__rowIndex)-1)?_=!0:m.push(p),v.push(p)};e.dataSource.forEach(function(t){l=t[e.column.field],"object"==typeof l&&Date.parse(l.toString())?(i=l.getFullYear().toString(),y[""+i]||(f={__rowIndex:i,hasChild:!0},f[e.column.field]=i,C.push(f),y[""+i]=!0),u=l.getMonth(),a=w[u],h=i+" "+a,y[""+h]||(f={__rowIndex:h,pId:i,hasChild:!0,month:u},f[e.column.field]=a,b.push(f),y[""+h]=!0),s=l.getDate(),p=h+" "+s.toString(),y[""+p]||(f={__rowIndex:p,pId:h},f[e.column.field]=s,x.push(f),E(t))):(t[e.column.field]||0===t[e.column.field]?(p="text "+t[e.column.field].toString().toLowerCase(),i=t[e.column.field]):(p="blanks",i=g.parent.serviceLocator.getService(r._174).getConstant("Blanks")),y[""+p]||(f={__rowIndex:p},f[e.column.field]=i,S.push(f),E(t)))}),C=new d.DataManager(C).executeLocal((new d.Query).sortBy(e.column.field,"decending")),b=new d.DataManager(b).executeLocal((new d.Query).sortBy("month","ascending")),x=new d.DataManager(x).executeLocal((new d.Query).sortBy(e.column.field,"ascending")),x=C.concat(b.concat(x)),S.length&&(S=new d.DataManager(S).executeLocal((new d.Query).sortBy(e.column.field,"ascending")),x=x.concat(S));var R=function(e){var t=[e.node];if(e.event.target.classList.contains("e-fullrow")||"Enter"==e.event.key){"true"===O.getNode(e.node).isChecked?O.uncheckAll(t):O.checkAll(t)}},k=function(){N.indeterminate=!1,F.classList.contains("e-check")?(O.uncheckAll(),F.classList.add("e-uncheck"),N.checked=!1):(O.checkAll(),F.classList.add("e-check"),N.checked=!0)},A=this.createSelectAll(e,t);A.addEventListener("click",k.bind(this)),A.classList.add("e-spreadsheet-ftrchk");var F=A.querySelector(".e-frame");F.classList.add("e-selectall"),e.element.appendChild(A);var N=A.querySelector(".e-chk-hidden"),T=this.parent.createElement("div"),O=new c.TreeView({fields:{dataSource:x,id:"__rowIndex",parentID:"pId",text:e.column.field,hasChildren:"hasChild"},enableRtl:this.parent.enableRtl,showCheckBox:!0,cssClass:"e-checkboxtree",checkedNodes:m,nodeClicked:R.bind(this),keyPress:R.bind(this),nodeChecked:function(t){"indeterminate"!==t.action&&(_=O.checkedNodes.length!==O.fields.dataSource.length,g.updateState(e,F,N,_,O.checkedNodes.length))}});O.createElement=this.parent.createElement,O.appendTo(T),e.element.appendChild(T),m=O.checkedNodes,this.updateState(e,F,N,_,O.checkedNodes.length);var D=function(){O.checkedNodes.length===x.length?g.filterSuccessHandler(new d.DataManager(e.dataSource),{action:"clear-filter",field:e.column.field}):g.generatePredicate(O.checkedNodes,S.length?"string":e.type,e.column.field,t,v,O.checkedNodes.length>x.length/2)};this.treeViewObj=O,this.treeViewEle=T,this.cBox=N,this.wireFilterEvents(e,D,this.refreshCheckbox.bind(this,x,O,m))},e.prototype.generatePredicate=function(e,t,n,r,i,a){var o,s,l,d,c,h=[],p={January:0,February:1,March:2,April:3,May:4,June:5,July:6,August:7,September:8,October:9,November:10,December:11},u=function(){"blanks"===s[0]?h.push(Object.assign({value:"",type:t},o)):"text"===s[0]&&(s.splice(0,1),d=s.join(" "),isNaN(Number(d))?c="string":(d=Number(d),c="number"),h.push(Object.assign({value:d,type:c},o)))},f=function(){l=new Date(Number(s[0]),p[s[1]],Number(s[2])),l.getDate()?h.push(Object.assign({value:l,type:t},o)):u()};if(a){o={field:n,ignoreAccent:!1,matchCase:!1,predicate:"and",operator:"notequal",isFilterByMenu:!0};for(var g=0,m=i.length;g<m;g++)-1===e.indexOf(i[g])&&(s=i[g].split(" "),f())}else{o={field:n,ignoreAccent:!1,matchCase:!1,predicate:"or",operator:"equal",isFilterByMenu:!0};for(var g=0,m=e.length;g<m;g++)s=e[g].split(" "),3===s.length?f():u()}r.initiateFilter(h)},e.prototype.refreshCheckbox=function(e,t,i,a){var o;if("keyup"===a.event.type)o=a.event.target.value;else if(a.event.target.classList.contains("e-search-icon"))return;var l,c=function(){if(l.length&&!t.fields.dataSource.length){var e=t.element.parentElement;e.getElementsByClassName("e-spreadsheet-ftrchk")[0].classList.remove("e-hide"),n.i(s.detach)(e.getElementsByClassName("e-checkfltrnmdiv")[0])}t.fields.dataSource=l,t.dataBind()};if(o){l=new d.DataManager(e).executeLocal((new d.Query).where(new d.Predicate(t.fields.text,"contains",o,!0)));var h={},p=[],u=void 0,f=void 0,g=isNaN(Number(o)),m=void 0,v=void 0;if(g){for(var y=0;y<l.length;y++)l[y].hasChild&&(p.push(new d.Predicate("pId","equal",l[y].__rowIndex,!1)),u=l[y].pId,h[""+u]||(p.push(new d.Predicate("__rowIndex","equal",u,!1)),h[""+u]=!0));f=l,v=1}else{var C=void 0,b={};m=[];for(var y=0;y<l.length;y++)u=l[y].pId,u?(C=u.split(" ")[0],h[""+u]||(p.push(new d.Predicate("__rowIndex","equal",u,!1)),h[""+u]=!0,m.push(C),m.push(u)),b[""+C]||(h[""+C]||(p.push(new d.Predicate("__rowIndex","equal",C,!1)),h[""+C]=!0),p.push(new d.Predicate("__rowIndex","equal",l[y].__rowIndex,!1)))):(u=l[y].__rowIndex,b[""+u]||(p.push(new d.Predicate("__rowIndex","contains",u,!1)),b[""+u]=!0));f=[]}if(l.length){p.length&&(l=f.concat(new d.DataManager(e).executeLocal((new d.Query).where(d.Predicate.or(p))))),c(),t.checkAll();var x=t.animation.expand.duration;t.animation.expand.duration=0,t.expandAll(m,v),t.animation.expand.duration=x}else if(t.fields.dataSource.length){c();var S=t.element.parentElement;S.getElementsByClassName("e-spreadsheet-ftrchk")[0].classList.add("e-hide");var w=this.parent.createElement("div",{className:"e-checkfltrnmdiv"}),_=this.parent.createElement("span");_.innerText=this.parent.serviceLocator.getService(r._174).getConstant("NoResult"),w.appendChild(_),S.appendChild(w)}}else l=e,c(),t.checkedNodes=i,t.dataBind()},e.prototype.openDialog=function(e){var t=this,i=parseInt(e.getAttribute("aria-colindex"),10),a=n.i(o.Y)(i);this.parent.showSpinner();var c=this.parent.activeSheetIndex,h=this.filterRange.get(c),u=h.range.slice(),f=this.parent.getActiveSheet(),g=n.i(o.I)(u[0],i-1,f),m=this.parent.getDisplayText(g);h.allowHeaderFilter||(u[0]=u[0]+1),h.useFilterRange||(u[2]=f.usedRange.rowIndex);var v,y=[u[0],i-1,u[2],i-1],C=this.getPredicateRange(y,this.filterCollection.get(c),i-1),b=C.otherColPredicate;C.curPredicate.length&&(v={},v[a]=C.curPredicate);var x,S=f.name+"!"+C.address,w=n.i(o.X)(y),_=this.getColumnType(f,i-1,u),I=_.type,E="date"===I||_.isDateAvail,R="number"===I,k=E||R,A=_.isMultiFormattedCol;k&&!C.filteredCol&&(x=[]),n.i(o.P)(this.parent,S,!0,!0,null,!0,null,null,!1,w,null,x).then(function(i){var o;if(t.parent.element.style.position="relative",t.parent.element.classList.add("e-filter-open"),k){if(x||!b.length)o=new d.DataManager(x||i);else{var h=new d.DataManager(i).executeLocal((new d.Query).where(d.Predicate.and(t.getPredicates(t.getClonedPredicates(b)))));o=new d.DataManager(h)}var u=function(e){t.parent.off(p._111,u),e.isCheckboxFilterTemplate=!0,E?t.initTreeView(e,w):t.initCboxList(e,w)};t.parent.on(p._111,u,t)}else o=new d.DataManager(i);var f=e.querySelector(".e-filter-btn"),g={field:a,filter:{}};if(R){var y=t.parent;g.filterTemplate=function(e){if(!y.isReact||!e)return[y.createElement("input",{className:"e-ss-filter-input"})];e.appendChild(y.createElement("input",{className:"e-ss-filter-input"}))};var C=function(e){return function(t,n,r,i,a,o,s){return e(s)}};g.getFilterTemplate=function(){return C(g.filterTemplate)},y.isReact&&!y.renderTemplates&&(y.renderTemplates=function(e){return e()})}var S={type:I,field:a,format:"date"===I?"yMd":null,displayName:m||"Column "+a,dataSource:o||[],height:t.parent.element.classList.contains("e-bigger")?800:500,columns:[],hideSearchbox:!1,filteredColumns:t.getClonedPredicates(t.filterCollection.get(c)),column:g,handler:t.filterSuccessHandler.bind(t,new d.DataManager(i)),target:f,position:{X:0,Y:0},localeObj:t.parent.serviceLocator.getService(r._174),actualPredicate:v,isFormatted:k&&!E,isMultiFormattedCol:A},w=new l.ExcelFilterBase(t.parent,t.getLocalizedCustomOperators());w.openDialog(S);var _=document.querySelector(".e-filter-popup");if(_&&_.id.includes(t.parent.element.id)){s.EventHandler.add(_,n.i(r._126)(),t.filterMouseDownHandler,t);var F=t.parent.element.getBoundingClientRect(),N=f.getBoundingClientRect(),T=_.getBoundingClientRect(),O=N.right-F.left-T.width;O<0&&(O=N.left-F.left),_.style.left=O+"px",_.style.top="0px",_.style.visibility="hidden",_.classList.contains("e-hide")&&_.classList.remove("e-hide");var D=N.bottom-F.top;T.height-(F.bottom-N.bottom)>0&&(D-=T.height-(F.bottom-N.bottom))<0&&(D=0),_.style.top=D+"px",_.style.visibility=""}t.parent.hideSpinner()})},e.prototype.getPredicateRange=function(e,t,r){var i,a=n.i(o.X)(e),s=[],l=[];if(t&&t.length){var d,c;t.forEach(function(t){t.field&&(d=""+t.field+(e[0]+1)+":"+t.field+(e[2]+1),c=n.i(o.V)(t.field),a.includes(d)||(a+=","+d,c<e[1]&&(e[1]=c),c>e[3]&&(e[3]=c)),void 0!==r&&(c===r?(i=!0,l.push(t)):s.push(t)))})}else i=!0;return void 0===r?a:{address:a,filteredCol:i,otherColPredicate:s,curPredicate:l}},e.prototype.filterDialogCreatedHandler=function(){var e=document.querySelector(".e-filter-popup");e&&e.id.includes(this.parent.element.id)&&e.classList.contains("e-popup-close")&&e.classList.add("e-hide")},e.prototype.filterCboxValueHandler=function(e){if(e.column&&e.data){var t=e.column.field;if(e.value){var r=n.i(o.U)(t+e.data.dataObj.__rowIndex),i=n.i(o.I)(r[0],r[1],this.parent.getActiveSheet());i&&i.format&&(e.value=this.parent.getDisplayText(i))}}},e.prototype.selectSortItemHandler=function(e){var t=this.parent.serviceLocator.getService(r._174),i=e.classList.contains("e-filter-sortasc")?"Ascending":e.classList.contains("e-filter-sortdesc")?"Descending":null;if("Ascending"===i?e.setAttribute("aria-label",t.getConstant("SortAscending")):e.setAttribute("aria-label",t.getConstant("SortDescending")),i){var a=this.parent.getActiveSheet(),s=this.parent.activeSheetIndex,l=this.filterRange.get(s),d=l.range.slice();l.allowHeaderFilter||(d[0]=d[0]+1),l.useFilterRange||(d[2]=a.usedRange.rowIndex),this.parent.sortCollection=this.parent.sortCollection?this.parent.sortCollection:[];for(var c=[],h=this.parent.sortCollection.length-1;h>=0;h--)this.parent.sortCollection[h]&&this.parent.sortCollection[h].sheetIndex===s&&(c.push(this.parent.sortCollection[h]),this.parent.sortCollection.splice(h,1));this.parent.sortCollection.push({sortRange:n.i(o.X)(d),columnIndex:n.i(o.Z)(a.activeCell)[1],order:i,sheetIndex:s}),this.parent.notify(r._7,{sortOptions:{sortDescriptors:{order:i},containsHeader:!1},previousSort:c,range:n.i(o.X)(d)}),this.refreshFilterRange(),this.closeDialog()}},e.prototype.filterSuccessHandler=function(e,t){var r=t.sIdx;r||0===r||(r=t.isOpen?0:this.parent.activeSheetIndex);var i=t.prevPredicates||[].slice.call(this.filterCollection.get(r));t.isFilterByValue&&!i.length&&(i=void 0);var a=this.filterCollection.get(r);if(this.updatePredicate(a,t.field),"clear-filter"!==t.action||a.length!==i.length){"filtering"===t.action&&(a=a.concat(t.filterCollection)),this.filterCollection.set(r,a);var s={datasource:e,predicates:this.getPredicates(this.getClonedPredicates(a))},l=this.filterRange.get(r);l.useFilterRange||(l.range[2]=n.i(o.l)(this.parent,r).usedRange.rowIndex),this.applyFilter(s,n.i(o.X)(l.range),r,i,!1,t.isInternal,t.isFilterByValue)}},e.prototype.isCustomNumFilter=function(e){return e.includes("greaterthan")||e.includes("lessthan")||"between"===e},e.prototype.getClonedPredicates=function(e){for(var t,r=[],i=0;i<e.length;i++)t=e[i],(this.isCustomNumFilter(t.operator)||!t.isFilterByMenu&&"notequal"===t.operator)&&n.i(o._190)(t.value)?r.push(Object.assign({},t,{field:t.field+"_value",type:"number"})):r.push(t);return r},e.prototype.updatePredicate=function(e,t){for(var n=new d.DataManager(e),r=new d.Query,i=n.executeLocal(r.where("field","equal",t)),a=0;a<i.length;a++){for(var o=-1,s=0;s<e.length;s++)if(e[s].field===i[a].field){o=s;break}-1!==o&&e.splice(o,1)}},e.prototype.applyFilter=function(e,t,i,s,l,d,c){var h=this,u={range:t,predicates:[].slice.call(this.filterCollection.get(i)),previousPredicates:s,sheetIndex:i,cancel:!1};if(d||c||(this.parent.notify(o._34,{action:"filter",eventArgs:u}),!u.cancel)){t.indexOf("!")<0&&(t=this.parent.sheets[i].name+"!"+t),this.parent.showSpinner();var f=new Promise(function(e,t){e(void 0)}),g={args:{range:t,filterOptions:e},promise:f,refresh:l},m=n.i(r._169)(this.parent);this.parent.notify(a.G,g);var v=n.i(r._169)(this.parent);this.parent.notify(r._79,{prevChartIndexes:m,currentChartIndexes:v}),g.promise.then(function(e){return h.refreshFilterRange(),h.parent.hideSpinner(),d||(delete u.cancel,h.parent.notify(p._31,{action:"filter",eventArgs:u}),document.activeElement.id!==h.parent.element.id+"_SearchBox"&&n.i(r._159)(h.parent.element)),Promise.resolve(e)}).catch(function(e){return h.filterRangeAlertHandler({error:e}),Promise.reject(e)})}},e.prototype.getPredicates=function(e){for(var t=[],n=l.CheckBoxFilterBase.getPredicate(e),r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];t.push(n[""+a])}return t},e.prototype.getColumnType=function(e,t,r){for(var i,a,s,l,d=0,c=0,h=0,p=r[0];p<=r[2];p++)if(i=n.i(o.I)(p,t,e)){if(i.format&&"General"!==i.format){var u=n.i(o._202)(i.format).toLowerCase();switch(u){case"number":case"currency":case"accounting":case"percentage":d++;break;case"shortdate":case"longdate":h++;break;case"time":d++;break;default:a={},n.i(o.O)(i.format,!0,a)?"date"===a.type?h++:d++:n.i(o._190)(i.value)?d++:i.value&&c++}s||(s=i.format)}else n.i(o._190)(i.value)?d++:i.value&&c++;s&&s!==i.format&&(l=!0)}return{type:d>c&&d>h&&d>0?"number":c>=d&&c>=h&&c>=0?"string":h>d&&h>c&&h>0?"date":"datetime",isDateAvail:!!h,isMultiFormattedCol:l}},e.prototype.clearFilterHandler=function(e){var t=e&&void 0!==e.sheetIndex?e.sheetIndex:this.parent.activeSheetIndex;if(e&&e.field){var i=[].slice.call(this.filterCollection.get(t));i&&i.length&&(this.updatePredicate(i,e.field),this.initiateFilterUIHandler({predicates:i,range:n.i(o.X)(this.filterRange.get(t).range),sIdx:t}))}else{var a=e&&e.isAction,s={isFiltered:!1,isClearAll:!0,sheetIndex:t};if(this.getFilteredColumnHandler(s),s.isFiltered||e&&e.preventRefresh){var l=void 0,d=n.i(o.l)(this.parent,t),c=this.filterRange.get(t),h=c.range;if(a&&(l={range:n.i(o.X)(h),predicates:[],previousPredicates:this.filterCollection.get(t),sheetIndex:t,cancel:!1},this.parent.notify(o._34,{action:"filter",eventArgs:l}),l.cancel))return;this.filterCollection.set(t,[]);var u=c.useFilterRange?h[2]:d.usedRange.rowIndex;if(this.parent.scrollSettings.enableVirtualization&&u-h[0]+1>this.parent.viewport.rowCount+2*this.parent.getThreshold("row")){for(var f=0;f<=u;f++)n.i(o.u)(d,f,{hidden:!1,isFiltered:!1});e&&e.preventRefresh||this.parent.renderModule.refreshSheet(!1,!1,!0)}else{this.refreshFilterRange(null,null,t);var g={startIndex:h[0],hide:!1,isFiltering:!0,refreshUI:!1,endIndex:c.useFilterRange?h[2]:d.usedRange.rowIndex,sheetIndex:t};this.parent.notify(o._118,g),!g.refreshUI||e&&e.preventRefresh||this.parent.renderModule.refreshSheet(!1,!1,!0)}a&&(delete l.cancel,this.parent.notify(p._31,{action:"filter",eventArgs:l}),n.i(r._159)(this.parent.element))}}},e.prototype.reapplyFilterHandler=function(e,t){var r=this,i=this.parent.activeSheetIndex;if(this.filterRange.has(i)){var a=this.filterCollection.get(i);if(a&&a.length){var s=n.i(o.l)(this.parent,i),l=this.filterRange.get(i),c=l.range.slice();l.allowHeaderFilter||(c[0]=c[0]+1),l.useFilterRange||(c[2]=s.usedRange.rowIndex),c[1]=c[3]=n.i(o.V)(a[0].field);var h=s.name+"!"+this.getPredicateRange(c,a.slice(1,a.length));n.i(o.P)(this.parent,h,!0,!0,null,!0,null,null,!1,n.i(o.X)(c)).then(function(s){var c=r.getPredicates(r.getClonedPredicates(r.filterCollection.get(i)));r.applyFilter({predicates:c,datasource:new d.DataManager(s)},n.i(o.X)(l.range),i,[].slice.call(a),t,e)})}}},e.prototype.getFilterRangeHandler=function(e){var t=e.sheetIdx,n=this.filterRange&&this.filterRange.get(t);n?(e.hasFilter=!0,e.filterRange=n.range,e.allowHeaderFilter=n.allowHeaderFilter,e.isFiltered=this.filterCollection&&this.filterCollection.get(t)&&this.filterCollection.get(t).length>0):(e.hasFilter=!1,e.filterRange=null)},e.prototype.getLocalizedCustomOperators=function(){var e=this.parent.serviceLocator.getService(r._174),t=[{value:"equal",text:e.getConstant("Equal")},{value:"greaterthan",text:e.getConstant("GreaterThan")},{value:"greaterthanorequal",text:e.getConstant("GreaterThanOrEqual")},{value:"lessthan",text:e.getConstant("LessThan")},{value:"lessthanorequal",text:e.getConstant("LessThanOrEqual")},{value:"notequal",text:e.getConstant("NotEqual")}];return{stringOperator:[{value:"startswith",text:e.getConstant("StartsWith")},{value:"endswith",text:e.getConstant("EndsWith")},{value:"contains",text:e.getConstant("Contains")},{value:"equal",text:e.getConstant("Equal")},{value:"isempty",text:e.getConstant("IsEmpty")},{value:"doesnotstartwith",text:e.getConstant("NotStartsWith")},{value:"doesnotendwith",text:e.getConstant("NotEndsWith")},{value:"doesnotcontain",text:e.getConstant("NotContains")},{value:"notequal",text:e.getConstant("NotEqual")},{value:"isnotempty",text:e.getConstant("IsNotEmpty")}],numberOperator:t,dateOperator:t,datetimeOperator:t,booleanOperator:[{value:"equal",text:e.getConstant("Equal")},{value:"notequal",text:e.getConstant("NotEqual")}]}},e.prototype.setFilteredCollection=function(e){var t=this,r={sheetIdx:e.sheetIdx};if(this.getFilterRangeHandler(r),r.hasFilter){var i={sheetIndex:e.sheetIdx,filterRange:n.i(o.X)(r.filterRange),hasFilter:!0,column:[],criteria:[],value:[],dataType:[],predicates:[]};e.saveJson.filterCollection.push(i);for(var a,l=this.filterCollection.get(e.sheetIdx),c=new Map,h=void 0,p=function(t){if(n.i(s.isNullOrUndefined)(t))return"";if(e.isSaveAction&&"date"===a){var r=t;t=r.getMonth()+1+"/"+r.getDate()+"/"+r.getFullYear()+" "+r.getHours()+":"+r.getMinutes()+":"+r.getSeconds()}return t},u=0;u<l.length;u++)h=l[u],e.isSaveAction&&"notequal"===h.operator&&h.isFilterByMenu?c.has(h.field)?c.get(h.field).push(h):c.set(h.field,[h]):(i.column.push(n.i(o.V)(h.field)),i.criteria.push(h.operator),e.isSaveAction?"equal"===h.operator?(a=n.i(o._189)(h.value)?"date":"string",i.value.push(p(h.value)),i.dataType.push(a)):(i.value.push(h.value),i.dataType.push("custom")):(i.value.push(h.value),i.dataType.push(h.type)),i.predicates.push(h.predicate));var f,g=new Map;c.forEach(function(r,s){f=n.i(o.V)(s),g.has(s)||g.set(s,t.getColData(f,s,e.sheetIdx));for(var l=g.get(s),c=t.getPredicates(r),h=new d.DataManager(l).executeLocal((new d.Query).where(d.Predicate.and(c))),u=0;u<h.length;u++)i.column.push(f),i.criteria.push("equal"),a=n.i(o._189)(h[u][s])?"date":"string",i.value.push(p(h[u][s])),i.dataType.push(a),i.predicates.push("or")})}},e.prototype.updateFilter=function(e){if(this.parent.filterCollection&&(e.initLoad||e.isOpen)){for(var t=void 0,i=void 0,a=void 0,s={},l=void 0,c=void 0,h=void 0,p=0;p<this.parent.filterCollection.length;p++){a=this.parent.filterCollection[p];var u=a.sheetIndex;if(0!==p||this.parent.isOpen||e.isOpen||(u=0),i=[],a.column)for(var f=0;f<a.column.length;f++)if(c={field:n.i(o.Y)(a.column[f]+1),operator:this.getFilterOperator(a.criteria[f]),value:"string"==typeof a.value[f]?a.value[f].split("*").join(""):a.value[f],predicate:a.predicates&&a.predicates[f],type:a.dataType&&a.dataType[f]},["year","month","day"].indexOf(c.type)>-1){var g={value:c.value,cell:{value:c.value}};if(this.parent.notify(o._51,g),g.isDate){var m=g.dateObj;if(c.value=m,"day"===c.type)c.type="date",c.predicate="or",i.push(c);else{c.operator="greaterthanorequal",c.predicate="and";var v=c.type;c.type="date",t=this.getPredicates([c,{field:c.field,operator:"lessthanorequal",predicate:"and",type:"date",value:new Date(m.getFullYear(),"year"===v?12:m.getMonth()+1,0,0,0,0)}]),s[c.field]||(s[c.field]=this.getColData(a.column[f],c.field,p)),l=new d.DataManager(s[c.field]).executeLocal((new d.Query).where(d.Predicate.and(t)));for(var y=0;y<l.length;y++)i.push({field:c.field,operator:"equal",predicate:"or",type:"date",value:l[y][c.field]})}}}else{if(h={isOpen:!0,instance:{options:{type:c.type}},arg3:c.value,arg2:c.operator},this.beforeFilteringHandler(h),c.value=h.arg3,"string"===c.type||"custom"===c.type)this.isCustomNumFilter(c.operator)&&n.i(o._190)(c.value)&&(c.type="number");else if("date"===c.type&&"equal"===c.operator&&"string"==typeof c.value&&c.value.includes("/")&&c.value.includes(":")){var C=c.value.split(" ");if(2===C.length){var b=C[0].split("/"),x=C[1].split(":");3===b.length&&3===x.length&&(c.value=new Date(Number(b[2]),Number(b[0])-1,Number(b[1]),Number(x[0]),Number(x[1]),Number(x[2])))}}i.push(c)}if(!e.isOpen)for(var S=0;S<i.length-1;S++)i[S].field===i[S+1].field&&(i[S].predicate||(i[S].predicate="or"),i[S+1].predicate||(i[S+1].predicate="or"));this.parent.notify(r._23,{predicates:i.length?i:void 0,range:a.filterRange,sIdx:u,isInternal:!0,isOpen:e.isOpen})}this.parent.sortCollection&&this.parent.notify(o._35,null),this.parent.filterCollection=null}},e.prototype.getColData=function(e,t,r){var i=n.i(o.l)(this.parent,r);if(!i.rows||!i.rows.length)return[];for(var a,s,l=[],d=1,c=i.rows.length;d<c;d++)i.rows[d]&&(s=n.i(o.I)(d,e,i,!1,!0))&&s.value&&(a={},a[t]=n.i(o.Q)(this.parent,s,d,e),l.push(a));return l},e.prototype.getFilterOperator=function(e){switch(e){case"BeginsWith":e="startswith";break;case"Less":e="lessthan";break;case"EndsWith":e="endswith";break;case"Equal":e="equal";break;case"Notequal":e="notEqual";break;case"Greater":e="greaterthan";break;case"Contains":e="contains";break;case"LessOrEqual":e="lessthanorequal";break;case"GreaterOrEqual":e="greaterthanorequal";break;case"NotContains":e="doesnotcontain";break;case"NotBeginsWith":e="doesnotstartwith";break;case"NotEndsWith":e="doesnotendwith";break;case"Empty":e="isempty";break;case"NotEmpty":e="isnotempty"}return e},e.prototype.beforeInsertHandler=function(e){if("Column"===e.modelType){var t=n.i(s.isUndefined)(e.activeSheetIndex)?this.parent.activeSheetIndex:e.activeSheetIndex;if(this.filterRange.size&&this.filterRange.has(t)){var r=this.filterRange.get(t).range;(this.isFilterCell(t,r[0],e.index)||e.index<r[1])&&(r[3]+=e.model.length,e.index<=r[1]&&(r[1]+=e.model.length),this.filterCollection.get(t).forEach(function(t){var r=n.i(o.V)(t.field);e.index<=r&&(t.field=n.i(o.Y)(r+e.model.length+1))}),this.parent.sortCollection&&this.parent.sortCollection.forEach(function(n){n.sheetIndex===t&&e.index<=n.columnIndex&&(n.columnIndex+=e.model.length)}))}}else if("Sheet"===e.modelType){for(var i=0,a=Array.from(this.filterRange.keys()).sort().reverse();i<a.length;i++){var l=a[i];e.index<=l&&(this.filterRange.set(l+e.model.length,this.filterRange.get(l)),this.filterRange.delete(l),this.filterCollection.set(l+e.model.length,this.filterCollection.get(l)),this.filterCollection.delete(l))}this.parent.sortCollection&&this.parent.sortCollection.forEach(function(t){e.index<=t.sheetIndex&&(t.sheetIndex+=e.model.length)})}},e.prototype.beforeDeleteHandler=function(e){if("Column"===e.modelType){var t=this.parent.activeSheetIndex;if(this.filterRange.size&&this.filterRange.has(t)){var r=!0,i=this.filterRange.get(t).range;if(e.start>=i[1]&&e.end<=i[3]?i[3]-=e.end-e.start+1:e.start<i[1]&&e.end<i[1]?(i[1]-=e.end-e.start+1,i[3]-=e.end-e.start+1):e.start<i[1]&&e.end>i[1]&&e.end<i[3]?(i[1]=e.start,i[3]-=e.end-e.start+1):r=!1,r){for(var a=this.filterCollection.get(t),s=void 0,l=a.length-1;l>=0;l--){var d=n.i(o.V)(a[l].field);e.end<d?a[l].field=n.i(o.Y)(d-(e.end-e.start+1)+1):e.start<=d&&e.end>=d&&(s=!0,a.splice(l,1))}var c=this.parent.sortCollection;if(c)for(var l=0;l<c.length;l++)if(c[l].sheetIndex===t){if(e.end<c[l].columnIndex){c[l].columnIndex=c[l].columnIndex-(e.end-e.start+1);break}if(e.start<=c[l].columnIndex&&e.end>=c[l].columnIndex){c.splice(l,1);break}}i.some(function(e){return e<0})?(this.removeFilter(t,!0,!0),e.refreshSheet=!0):s&&(a&&a.length?(this.reapplyFilterHandler(!0,!0),e.refreshSheet=!1):(this.clearFilterHandler({preventRefresh:!0}),e.refreshSheet=!0))}}}},e.prototype.deleteSheetHandler=function(e){if(n.i(s.isUndefined)(e.sheetIndex))this.filterRange.get(this.parent.activeSheetIndex)&&(this.filterRange.delete(this.parent.activeSheetIndex),this.filterCollection.delete(this.parent.activeSheetIndex));else{for(var t=0,r=Array.from(this.filterRange.keys()).sort().reverse();t<r.length;t++){var i=r[t];e.sheetIndex===i?(this.filterRange.delete(i),this.filterCollection.delete(i)):e.sheetIndex<i&&(this.filterRange.set(i-1,this.filterRange.get(i)),this.filterRange.delete(i),this.filterCollection.set(i-1,this.filterCollection.get(i)),this.filterCollection.delete(i))}var a=this.parent.sortCollection;if(a)for(var o=a.length-1;o>=0;o--)e.sheetIndex===a[o].sheetIndex?a.splice(o,1):e.sheetIndex<a[o].sheetIndex&&(a[o].sheetIndex-=1)}},e.prototype.clearHandler=function(e){var t=this.parent.getAddressInfo(e.range);if(this.filterRange.has(t.sheetIndex)){var r=this.filterRange.get(t.sheetIndex).range.slice();n.i(o._165)(t.indices,r[0],r[1])&&n.i(o._165)(t.indices,r[0],r[3])&&this.removeFilter(t.sheetIndex)}},e.prototype.duplicateSheetFilterHandler=function(e){this.filterCollection.has(e.sheetIndex)&&this.filterCollection.set(e.newSheetIndex,this.filterCollection.get(e.sheetIndex)),this.filterRange.has(e.sheetIndex)&&this.filterRange.set(e.newSheetIndex,this.filterRange.get(e.sheetIndex))},e.prototype.updateSortCollectionHandler=function(e){var t=this.parent.getActiveSheet(),r=this.parent.activeSheetIndex,i=this.filterRange.get(r);if(i){var a=i.range.slice();i.allowHeaderFilter||(a[0]=a[0]+1),i.useFilterRange||(a[2]=t.usedRange.rowIndex);var s=e.sortOptions.sortDescriptors;if(this.parent.sortCollection=this.parent.sortCollection?this.parent.sortCollection:[],Array.isArray(s))for(var l=0;l<s.length;l++)this.parent.sortCollection.push({sortRange:n.i(o.X)(a),columnIndex:n.i(o.V)(s[l].field),order:s[l].order,sheetIndex:r});else this.parent.sortCollection.push({sortRange:n.i(o.X)(a),columnIndex:n.i(o.Z)(t.activeCell)[1],order:s.order,sheetIndex:r})}},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(1),i=n(15),a=n(0),o=n(10),s=(n.n(o),n(3)),l=(n.n(s),n(7)),d=n(28),c=n(21),h=(n.n(c),function(){function e(e){this.categoryCollection=[],this.formulaCollection=[],this.isGoto=!1,this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"formulaBar"},e.prototype.createFormulaBar=function(e){var t=this;if(!this.parent.showFormulaBar&&this.insertFnRipple)return void this.destroy();var i=this.parent.serviceLocator.getService(r._174),a=this.parent.element.id,l=this.parent.createElement("div",{className:"e-formula-bar-panel"});if(!this.parent.isMobileView()){var d=this.parent.createElement("input",{id:a+"_name_box",attrs:{type:"text"}});l.appendChild(d),this.comboBoxInstance=new o.ComboBox({value:"A1",cssClass:"e-name-box",width:"",noRecordsTemplate:n.i(s.initializeCSPTemplate)(function(){return""}),fields:{text:"name",value:"refersTo"},beforeOpen:this.nameBoxBeforeOpen.bind(this),blur:this.nameBoxBlur.bind(this),select:this.nameBoxSelect.bind(this),open:function(e){t.isDevice&&(window.browserDetails.isDevice=!0)},change:function(){}}),this.comboBoxInstance.createElement=this.parent.createElement,this.comboBoxInstance.appendTo(d),this.comboBoxInstance.element.parentElement.title=i.getConstant("NameBox")}l.appendChild(this.parent.createElement("button",{className:"e-btn e-css e-flat e-icon-btn e-insert-function",attrs:{title:i.getConstant("InsertFunction"),type:"button"}})).appendChild(this.parent.createElement("span",{className:"e-btn-icon e-icons"})),this.insertFnRipple=n.i(s.rippleEffect)(l,{selector:".e-insert-function"}),l.appendChild(this.parent.createElement("div",{className:"e-separator"}));var c=i.getConstant("FormulaBar"),h=l.appendChild(this.parent.createElement("textarea",{className:"e-formula-bar e-css",id:a+"_formula_input",attrs:{title:c,"aria-label":c,spellcheck:"false"}}));if(h.rows=1,this.parent.isMobileView())h.placeholder=i.getConstant("MobileFormulaBarPlaceHolder"),s.EventHandler.add(h,"focus",this.textAreaFocusIn,this),s.EventHandler.add(h,"blur",this.textAreaFocusOut,this);else{var p=i.getConstant("ExpandFormulaBar");l.appendChild(this.parent.createElement("span",{className:"e-drop-icon e-icons",attrs:{title:p,role:"button",tabindex:"-1","aria-label":p}}))}e&&e.uiUpdate?this.parent.element.insertBefore(l,document.getElementById(a+"_sheet_panel")):this.parent.element.appendChild(l)},e.prototype.textAreaFocusIn=function(){var e=this.parent.element.querySelector(".e-formula-bar-panel"),t=this.parent.createElement("button",{className:"e-btn e-css e-flat e-icon-btn e-formula-submit",attrs:{type:"button"}});t.appendChild(this.parent.createElement("span",{className:"e-btn-icon e-icons e-tick-icon"})),e.classList.add("e-focused"),e.appendChild(t)},e.prototype.textAreaFocusOut=function(){var e=this.parent.element.querySelector(".e-formula-bar-panel");e.classList.remove("e-focused"),n.i(s.detach)(e.querySelector(".e-formula-submit"))},e.prototype.keyDownHandler=function(e){var t=e.target;if(this.parent.isEdit&&(!this.parent.getActiveSheet().isProtected||t.classList.contains("e-formula-bar")&&!t.disabled)){if((n.i(a._160)(t.value)||t.validity&&0===t.value.toString().indexOf("="))&&16===e.keyCode)return;t.classList.contains("e-formula-bar")&&(!e.shiftKey||e.shiftKey&&!n.i(r._135)(e.keyCode))&&this.parent.notify(l.m,{action:"refreshEditor",value:t.value,refreshEditorElem:!0})}},e.prototype.keyUpHandler=function(e){if(this.parent.isEdit){var t=e.target;if(t.classList.contains("e-formula-bar")){var i={action:"getCurrentEditValue",editedValue:""};this.parent.notify(l.m,i),i.editedValue===t.value||16===e.keyCode||e.shiftKey&&(!e.shiftKey||n.i(r._135)(e.keyCode))||this.parent.notify(l.m,{action:"refreshEditor",value:t.value,refreshEditorElem:!0})}}},e.prototype.nameBoxBeforeOpen=function(e){this.comboBoxInstance.element.classList.contains("e-name-editing")?e.cancel=!0:(this.comboBoxInstance.element.select(),this.isDevice=window.browserDetails.isDevice,this.isDevice&&(window.browserDetails.isDevice=!1))},e.prototype.nameBoxBlur=function(){this.comboBoxInstance.element.classList.contains("e-name-editing")&&(this.comboBoxInstance.element.classList.remove("e-name-editing"),this.UpdateValueAfterMouseUp())},e.prototype.nameBoxSelect=function(e){if(e.isInteracted&&(!e.e||"keydown"!==e.e.type||40!==e.e.keyCode&&38!==e.e.keyCode)){var t=e.itemData.refersTo.substr(1),o=n.i(a.e)(this.parent,n.i(a.g)(t));if(void 0===o)return;var s=n.i(i.j)(t),l=n.i(a.l)(this.parent,o),d=void 0,c=void 0;if(-1===s.indexOf(":"))d=c=s.replace("$","");else{var h=s.indexOf(":");d=s.substr(0,h).replace("$",""),c=s.substr(h+1,s.length).replace("$","")}c.match(/\D/g)&&!c.match(/[0-9]/g)&&d.match(/\D/g)&&!d.match(/[0-9]/g)?(d+="1",c+=l.rowCount,s=d+":"+c):!c.match(/\D/g)&&c.match(/[0-9]/g)&&!d.match(/\D/g)&&d.match(/[0-9]/g)&&(d=n.i(i.c)(parseInt(d,10)-1,0),c=n.i(i.c)(parseInt(c,10)-1,l.colCount-1),s=d+":"+c),o===this.parent.activeSheetIndex?(this.parent.selectRange(s),n.i(r._159)(this.parent.element)):(n.i(a.i)(this.parent,s,l),this.parent.activeSheetIndex=o)}},e.prototype.formulaBarUpdateHandler=function(e){var t,r=this,o=this.parent.getActiveSheet(),c=o.selectedRange.split(":"),h={action:"getElement",element:null};this.parent.notify(l.m,h);var p=this.parent.element.querySelector(".e-formula-bar");if("mousemove"===e.type||"pointermove"===e.type){var u=n.i(i.d)(c[0]),f=n.i(i.d)(c[1]);t=Math.abs(u[0]-f[0])+1+"R x "+(Math.abs(u[1]-f[1])+1)+"C",this.parent.isEdit&&(e.target&&!e.target.classList.contains("e-spreadsheet-edit")?this.parent.notify(l.n,null):h.element&&(p.value=h.element.textContent))}else{t=c[0];var g=n.i(a.p)(this.parent)+"!"+t;n.i(a.P)(this.parent,g,!1,!0).then(function(t){if(r.parent){var i,o="";t.forEach(function(t){if(t)if(t.formula)o=t.formula;else if(n.i(s.isNullOrUndefined)(t.value)||""===t.value)t.hyperlink&&(o="string"==typeof t.hyperlink?t.hyperlink:t.hyperlink.address||"");else{var c={},u=t.format&&n.i(a.O)(t.format,!0,c,!0)&&c.type;if("date"===u||"time"===u||"datetime"===u){if((i=n.i(d.d)(Number(t.value)))&&"Invalid Date"!==i.toString()&&i.getFullYear()>=1900){var f=new s.Internationalization,g=t.format.toLowerCase();"time"!==u||!g.includes("m")||g.includes(":m")||g.includes("m:")||g.includes("[m")||g.includes("am")||(u="date");var m=t.value.toString().split("."),v=2===m.length,y=v?n.i(d.d)(parseFloat(m[0]+1+"."+m[1])||Number(t.value)):i;if("date"===u){var C={type:"date"};C.skeleton="yMd",o=f.formatDate(i,C),v&&(o+=" "+f.formatDate(y,{type:"dateTime",skeleton:"hms"}))}else(Number(t.value)>=1||"datetime"===u)&&(o=f.formatDate(i,{type:"dateTime",skeleton:"yMd"})+" "),o+=f.formatDate(y,{type:"dateTime",skeleton:"hms"})}}else t.format&&t.format.includes("%")&&n.i(d.a)(t.value)&&(o=r.parent.getDisplayText(t),o.includes("%")||(o=""));if(!o)if(o=t.value.toString(),"true"===o.toLowerCase()||"false"===o.toLowerCase())o=o.toUpperCase();else if("en-US"!==r.parent.locale){var b=n.i(s.getNumericObject)(r.parent.locale).decimal;"."!==b&&n.i(d.a)(o)&&o.includes(".")&&(o=o.replace(".",b))}}var x={action:"getCurrentEditValue",editedValue:""};r.parent.notify(l.m,x),document.getElementById(r.parent.element.id+"_formula_input").value=o,x.editedValue&&n.i(a._160)(x.editedValue.toString(),!0)||r.parent.notify(l.m,{action:"refreshEditor",value:o,refreshEditorElem:!0}),r.parent.isEdit&&(e.target&&!e.target.classList.contains("e-spreadsheet-edit")?r.parent.notify(l.n,null):h.element&&(p.value=h.element.textContent))})}})}this.updateComboBoxValue(t)},e.prototype.UpdateValueAfterMouseUp=function(){this.updateComboBoxValue(this.parent.getActiveSheet().selectedRange.split(":")[0])},e.prototype.updateComboBoxValue=function(e){var t=this.parent.getActiveSheet(),r=n.i(a.p)(this.parent)+"!"+t.selectedRange,i={action:"getNameFromRange",range:r,definedName:null};if(this.parent.notify(l.o,i),i.definedName&&(e=i.definedName.name),!this.parent.isMobileView()){if(this.comboBoxInstance.text===e)return;this.comboBoxInstance.text=e,this.comboBoxInstance.dataBind()}},e.prototype.disabletextarea=function(){var e=this.getFormulaBar();this.parent.getActiveSheet().isProtected&&!this.parent.isEdit?e.disabled=!0:e.disabled=!1},e.prototype.formulaBarScrollEdit=function(){var e=n.i(i.d)(this.parent.getActiveSheet().selectedRange),t=n.i(i.f)(this.parent.getActiveSheet().topLeftCell);e[0]<t[0]&&(this.parent.goTo(this.parent.getActiveSheet().selectedRange),this.isGoto=!0),this.parent.notify(l.m,{action:"startEdit",refreshCurPos:!1})},e.prototype.formulaBarClickHandler=function(e){var t=e.target,r=this.parent.getActiveSheet(),o=r.isProtected,d=n.i(i.f)(r.activeCell),c=n.i(a.I)(d[0],d[1],r),h=n.i(a._169)(c,n.i(a.B)(r,d[1]));if(t.classList.contains("e-drop-icon")&&t.parentElement.classList.contains("e-formula-bar-panel"))this.toggleFormulaBar(t);else if(t.classList.contains("e-formula-bar"))!this.parent.isEdit&&(!o||o&&!h)||this.parent.isEdit&&o&&!t.disabled?this.formulaBarScrollEdit():o&&h&&this.parent.notify(l.p,null);else if(t.parentElement&&t.parentElement.classList.contains("e-name-box"))if(t.classList.contains("e-ddl-icon")){var p={action:"getNames",names:[]};if(this.parent.notify(l.o,p),this.comboBoxInstance.dataSource.length!==p.names.length||this.comboBoxInstance.value===this.comboBoxInstance.text){var u=this.comboBoxInstance.text;this.comboBoxInstance.dataSource=p.names;var f=p.names.find(function(e){return e.name==u});this.comboBoxInstance.value=f?f.refersTo:this.comboBoxInstance.value,this.comboBoxInstance.dataBind()}}else this.comboBoxInstance.element.classList.add("e-name-editing"),this.comboBoxInstance.element.select();!n.i(s.isNullOrUndefined)(t.offsetParent)&&(t.offsetParent.classList.contains("e-insert-function")||t.classList.contains("e-insert-function")||this.parent.element.id+"_insert_function"===t.offsetParent.id||this.parent.element.id+"_insert_function"===t.id||t.parentElement.classList.contains("e-insert-function")||this.parent.element.id+"_insert_function"===t.parentElement.id)&&this.renderInsertDlg()},e.prototype.renderInsertDlg=function(){var e=this,t=this.parent.getActiveSheet();if(t.isProtected){var d=n.i(i.f)(t.activeCell);if(n.i(a._169)(n.i(a.I)(d[0],d[1],t),n.i(a.B)(t,d[1]))&&!this.parent.isEdit)return void this.parent.notify(l.p,null)}var h=this.parent.serviceLocator.getService(r._174),p=!this.parent.isEdit,u={action:"getCurrentEditValue",editedValue:""};if(!p){var f={action:"isFormulaEditing",isFormulaEdit:!1};this.parent.notify(l.o,f),p=f.isFormulaEdit,this.parent.notify(l.m,u)}if(p||""===u.editedValue){""===u.editedValue&&this.parent.notify(l.m,{action:"refreshEditor",value:"="});var g=this.parent.createElement("div",{className:"e-formula-description",id:this.parent.element.id+"_description_content"}),m=this.parent.createElement("div",{className:"e-category-content",id:this.parent.element.id+"_category_content"});m.innerText=h.getConstant("PickACategory");var v=this.parent.createElement("input",{className:"e-formula-category",id:this.parent.element.id+"_formula_category"}),y=this.parent.createElement("div",{className:"e-formula-list",id:this.parent.element.id+"_formula_list"}),C=this.parent.createElement("div",{className:"e-description-content"});C.innerText=h.getConstant("Description");var b=this.parent.createElement("div",{className:"e-header-content"});b.innerText=h.getConstant("InsertFunction");var x={action:"getFormulaCategory",categoryCollection:[]};this.parent.notify(a._49,x),this.categoryCollection=x.categoryCollection;var S;this.categoryList=new o.DropDownList({dataSource:this.categoryCollection,cssClass:"e-ss-formula-category",index:0,width:"285px",popupHeight:"210px",select:this.dropDownSelect.bind(this),open:function(){return S=!0},close:function(){return S=!1}});var w={action:"getLibraryFormulas",formulaCollection:[]};this.parent.notify(a._49,w),this.formulaCollection=w.formulaCollection,this.formulaList=new c.ListView({dataSource:this.formulaCollection.sort(),actionComplete:this.updateFormulaList.bind(this),select:this.listSelected.bind(this),width:"285px",height:"200px"}),this.dialog=this.parent.serviceLocator.getService(r._175),this.parent.element.querySelector(".e-spreadsheet-function-dlg")||(this.dialog.show({header:b.outerHTML,content:m.outerHTML+v.outerHTML+y.outerHTML+C.outerHTML+g.outerHTML,width:"320px",height:"485px",cssClass:"e-spreadsheet-function-dlg",showCloseIcon:!0,isModal:!0,beforeOpen:function(t){var i={dialogName:"InsertFunctionDialog",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",i),i.cancel&&(t.cancel=!0),n.i(r._159)(e.parent.element)},open:this.dialogOpen.bind(this),beforeClose:this.dialogBeforeClose.bind(this),close:this.dialogClose.bind(this),buttons:[{click:function(t){t&&13===t.keyCode&&!S||e.selectFormula()},buttonModel:{content:h.getConstant("Ok"),isPrimary:!0}}]}),this.categoryList.appendTo("#"+this.parent.element.id+"_formula_category"),this.formulaList.appendTo("#"+this.parent.element.id+"_formula_list"),s.EventHandler.add(this.formulaList.element,"dblclick",this.formulaClickHandler,this))}},e.prototype.toggleFormulaBar=function(e){var t=e.parentElement,n=this.parent.serviceLocator.getService(r._174);t.classList.contains("e-expanded")?(t.classList.remove("e-expanded"),document.getElementById(this.parent.element.id+"_formula_input").rows=1,e.title=n.getConstant("ExpandFormulaBar"),e.setAttribute("aria-label",n.getConstant("CollapseFormulaBar"))):(t.classList.add("e-expanded"),document.getElementById(this.parent.element.id+"_formula_input").rows=3,e.title=n.getConstant("CollapseFormulaBar"),e.setAttribute("aria-label",n.getConstant("ExpandFormulaBar"))),this.parent.setPanelSize()},e.prototype.dialogOpen=function(){var e=this;n.i(r._115)(function(){var t=e.dialog.dialogInstance.element.querySelector(".e-footer-content .e-primary"),i=e.parent.serviceLocator.getService(r._174);t.setAttribute("aria-label",i.getConstant("InsertFunction")+" "+i.getConstant("Ok")),e.categoryList&&n.i(r._159)(e.categoryList.element)})},e.prototype.dialogClose=function(){var e={action:"getCurrentEditValue",editedValue:""};this.parent.notify(l.m,e),"="===e.editedValue.toString().trim()&&this.parent.notify(l.m,{action:"refreshEditor",value:""})},e.prototype.dialogBeforeClose=function(){s.EventHandler.remove(this.formulaList.element,"dblclick",this.formulaClickHandler);var e=document.getElementsByClassName("e-spreadsheet-function-dlg")[0].querySelector(".e-dlg-content");e.parentNode.removeChild(e),this.categoryList.destroy(),this.categoryList=null,this.formulaList.destroy(),this.formulaList=null},e.prototype.selectFormula=function(){var e=this.formulaList.getSelectedItems().text,t=n.i(a.l)(this.parent,this.parent.activeSheetIndex);this.parent.isEdit?this.parent.notify(l.m,{action:"refreshEditor",value:e+"(",refreshFormulaBar:!0,refreshEditorElem:!0,isAppend:!0}):(this.parent.notify(l.m,{action:"startEdit",value:"="+e+"(",address:t.activeCell}),this.parent.notify(l.a,{action:"refreshFormulabar",value:"="+e+"("})),this.dialog.dialogInstance.storeActiveElement=document.getElementById(this.parent.element.id+"_edit"),this.dialog.hide()},e.prototype.listSelected=function(e){this.updateFormulaDescription(),e.isInteracted&&e.item&&e.item.focus()},e.prototype.updateFormulaList=function(){this.activeListFormula(),this.updateFormulaDescription()},e.prototype.dropDownSelect=function(e){this.formulaCollection=[];var t={action:"getLibraryFormulas",formulaCollection:[]};if("All"===e.item.textContent)this.parent.notify(a._49,t),this.formulaCollection=t.formulaCollection;else{var n=e.item.textContent,r={action:"dropDownSelectFormulas",formulaCollection:[],selectCategory:n};this.parent.notify(a._49,r),this.formulaCollection=r.formulaCollection}this.formulaList.dataSource=this.formulaCollection.sort()},e.prototype.activeListFormula=function(){var e=document.getElementById(this.parent.element.id+"_formula_list"),t=e.children[0].children[0].firstElementChild;this.formulaList.selectItem(t)},e.prototype.updateFormulaDescription=function(){var e=this.formulaList.getSelectedItems().text,t={action:"getFormulaDescription",description:"",selectedList:e,isCustom:!1};this.parent.notify(a._49,t);var n=this.dialog.dialogInstance.element.querySelector(".e-footer-content .e-primary");n.hasAttribute("aria-label")&&n.removeAttribute("aria-label");var i=document.getElementById(this.parent.element.id+"_description_content");e="AND"===e?"CalculateAND":"OR"===e?"CalculateOR":e,i.textContent=t.isCustom?t.description:this.parent.serviceLocator.getService(r._174).getConstant(e)},e.prototype.formulaClickHandler=function(e){var t=e.target,r=n.i(a.l)(this.parent,this.parent.activeSheetIndex);(t.offsetParent.classList.contains("e-text-content")||t.classList.contains("e-list-item"))&&(this.parent.isEdit?this.parent.notify(l.m,{action:"refreshEditor",value:t.innerText+"(",refreshFormulaBar:!0,refreshEditorElem:!0,isAppend:!0}):(this.parent.notify(l.m,{action:"startEdit",value:"="+t.innerText+"(",address:r.activeCell}),this.parent.notify(l.a,{action:"refreshFormulabar",value:"="+t.innerText+"("})),this.dialog.hide())},e.prototype.addEventListener=function(){this.parent.on(r.c,this.createFormulaBar,this),this.parent.on(r.m,this.formulaBarClickHandler,this),this.parent.on(l.q,this.keyDownHandler,this),this.parent.on(l.r,this.renderInsertDlg,this),this.parent.on(l.s,this.keyUpHandler,this),this.parent.on(a._148,this.formulaBarUpdateHandler,this),this.parent.on(r.y,this.UpdateValueAfterMouseUp,this),this.parent.on(l.a,this.editOperationHandler,this),this.parent.on(r._52,this.disabletextarea,this),this.parent.on(r.f,this.isFormulaBarEdit,this)},e.prototype.destroy=function(){this.removeEventListener(),this.comboBoxInstance&&this.comboBoxInstance.destroy(),this.comboBoxInstance=null,this.categoryCollection=null,this.formulaCollection=null,this.dialog=null,this.isGoto=null,this.insertFnRipple&&this.insertFnRipple(),this.insertFnRipple=null;var e=this.parent.element.querySelector(".e-formula-bar-panel");e&&(n.i(r._116)(e),n.i(s.detach)(e)),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.c,this.createFormulaBar),this.parent.off(r.m,this.formulaBarClickHandler),this.parent.off(l.r,this.renderInsertDlg),this.parent.off(l.q,this.keyDownHandler),this.parent.off(l.s,this.keyUpHandler),this.parent.off(a._148,this.formulaBarUpdateHandler),this.parent.off(r.y,this.UpdateValueAfterMouseUp),this.parent.off(l.a,this.editOperationHandler),this.parent.off(r._52,this.disabletextarea),this.parent.off(r.f,this.isFormulaBarEdit))},e.prototype.editOperationHandler=function(e){switch(e.action){case"refreshFormulabar":this.getFormulaBar().value=n.i(s.isUndefined)(e.value)?"":e.value;break;case"getElement":e.element=this.getFormulaBar()}},e.prototype.isFormulaBarEdit=function(e){this.parent.isEdit&&this.isGoto?e.isEdit=!0:e.isEdit=!1},e.prototype.getFormulaBar=function(){return n.i(s.select)("#"+this.parent.element.id+"_formula_input",this.parent.element)},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1),i=n(10),a=(n.n(i),n(3)),o=(n.n(a),n(0)),s=function(){function e(e){this.isFormulaBar=!1,this.isFormula=!1,this.isPopupOpened=!1,this.isPreventClose=!1,this.isSubFormula=!1,this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"formula"},e.prototype.destroy=function(){this.removeEventListener(),this.autocompleteInstance&&(this.autocompleteInstance.destroy(),this.autocompleteInstance.element&&(this.autocompleteInstance.element.remove(),this.autocompleteInstance.element=null)),this.autocompleteInstance=null,this.acInputElement&&(this.acInputElement.remove(),this.acInputElement=null),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(r.k,this.performFormulaOperation,this),this.parent.on(r.n,this.keyUpHandler,this),this.parent.on(r.o,this.keyDownHandler,this),this.parent.on(r.m,this.formulaClick,this),this.parent.on(r._35,this.refreshFormulaDatasource,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.k,this.performFormulaOperation),this.parent.off(r.n,this.keyUpHandler),this.parent.off(r.o,this.keyDownHandler),this.parent.off(r.m,this.formulaClick),this.parent.off(r._35,this.refreshFormulaDatasource))},e.prototype.performFormulaOperation=function(e){var t,i,a=this,s=e.action,l=this.parent.serviceLocator.getService(r._174);switch(s){case"renderAutoComplete":this.renderAutoComplete();break;case"endEdit":this.endEdit();break;case"addDefinedName":e.isAdded=this.addDefinedName(e.definedName);break;case"getNames":e.sheetName||(e.sheetName=n.i(o.p)(this.parent)),e.names=this.getNames(e.sheetName);break;case"getNameFromRange":e.definedName=this.getNameFromRange(e.range);break;case"isFormulaEditing":e.isFormulaEdit=this.isFormula;break;case"isCircularReference":t=this.parent.serviceLocator.getService(r._175),i=l.getConstant("CircularReference"),t.dialogInstance&&t.dialogInstance.visible&&t.dialogInstance.content===i||t.show({height:180,width:400,isModal:!0,showCloseIcon:!0,content:l.getConstant("CircularReference"),beforeOpen:function(e){var t={dialogName:"CircularReferenceDialog",element:e.element,target:e.target,cancel:e.cancel};a.parent.trigger("dialogBeforeOpen",t),t.cancel&&(e.cancel=!0)}}),e.argValue="0"}},e.prototype.renderAutoComplete=function(){if(!n.i(a.select)("#"+this.parent.element.id+"_ac",this.parent.element)){var e=this.parent.createElement("input",{id:this.parent.element.id+"_ac",className:"e-ss-ac"});this.parent.element.appendChild(e);var t={action:"getLibraryFormulas",formulaCollection:[]};this.parent.notify(o._49,t);var r={dataSource:t.formulaCollection,cssClass:"e-ss-atc",popupWidth:"130px",allowFiltering:!0,filterType:"StartsWith",sortOrder:"Ascending",open:this.onSuggestionOpen.bind(this),close:this.onSuggestionClose.bind(this),select:this.onSelect.bind(this),actionComplete:this.onSuggestionComplete.bind(this)};this.autocompleteInstance=new i.AutoComplete(r,e),this.autocompleteInstance.createElement=this.parent.createElement,this.acInputElement=e}},e.prototype.onSuggestionOpen=function(e){var t=this;this.isPopupOpened=!0,e.popup.relateTo=this.getRelateToElem(),e.popup.element.firstChild.style.maxHeight="180px",new Promise(function(e,t){setTimeout(function(){e()},100)}).then(function(){t.triggerKeyDownEvent(r._180.DOWN)})},e.prototype.onSuggestionClose=function(e){this.isPreventClose?e.cancel=!0:this.isPopupOpened=!1},e.prototype.onSelect=function(e){var t="="+e.itemData.value+"(";if(this.isSubFormula){var i=this.getEditingValue(),o=i.lastIndexOf(this.parent.listSeparator);o>-1?t=i.slice(0,o+1):(o=i.lastIndexOf("("))>-1&&(t=i.slice(0,o+1)),t+=e.itemData.value+"("}if(this.parent.notify(r.j,{action:"refreshEditor",value:t,refreshFormulaBar:!0,refreshEditorElem:!0,refreshCurPos:!this.isFormulaBar}),this.isPopupOpened){this.hidePopUp();var s=n.i(a.select)("#"+this.parent.element.id+"_ac_popup");s&&n.i(a.detach)(s),this.isPopupOpened=!1}},e.prototype.onSuggestionComplete=function(e){this.isPreventClose=e.result.length>0,this.isPreventClose||(e.cancel=!0,this.hidePopUp())},e.prototype.refreshFormulaDatasource=function(){var e={action:"getLibraryFormulas",formulaCollection:[]};this.parent.notify(o._49,e),this.autocompleteInstance&&(this.autocompleteInstance.dataSource=e.formulaCollection)},e.prototype.keyUpHandler=function(e){if(this.parent.isEdit){var t=this.getEditingValue();this.isFormula=n.i(o._160)(t),(this.isFormula||this.isPopupOpened)&&(e.keyCode!==r._180.TAB&&this.isFormula&&(t=this.getSuggestionKeyFromFormula(t)),this.refreshFormulaSuggestion(e,t))}else this.isPopupOpened&&this.hidePopUp()},e.prototype.keyDownHandler=function(e){var t=e.keyCode;if(this.isFormula){if(this.isPopupOpened)switch(t){case r._180.UP:case r._180.DOWN:e.preventDefault(),this.triggerKeyDownEvent(t);break;case r._180.TAB:e.preventDefault(),this.triggerKeyDownEvent(r._180.ENTER)}}else{var i=e.target;if(i.id===this.parent.element.id+"_name_box")switch(t){case r._180.ENTER:document.querySelector(".e-name-box.e-popup-open")||(this.addDefinedName({name:i.value}),n.i(r._159)(this.parent.element));break;case r._180.ESC:n.i(r._159)(this.parent.element)}}},e.prototype.formulaClick=function(e){if(this.parent.isEdit){var t=e.target;this.isFormulaBar=t.classList.contains("e-formula-bar")}},e.prototype.refreshFormulaSuggestion=function(e,t){if(t.length>0){var i=this.autocompleteInstance.element,a=e.keyCode,o=this.isPopupOpened;n.i(r._135)(a)||(i.value=t,i.dispatchEvent(new Event("input")),i.dispatchEvent(new Event("keyup")),o&&this.triggerKeyDownEvent(r._180.DOWN))}else this.isPopupOpened&&(this.isPreventClose=!1,this.hidePopUp())},e.prototype.endEdit=function(){if(this.isSubFormula=!1,this.isPreventClose=!1,this.isFormula=!1,this.isFormulaBar=!1,this.isPopupOpened){this.hidePopUp();var e=n.i(a.select)("#"+this.parent.element.id+"_ac_popup");e&&n.i(a.detach)(e),this.isPopupOpened=!1}},e.prototype.hidePopUp=function(){this.autocompleteInstance.hidePopup()},e.prototype.getSuggestionKeyFromFormula=function(e){var t="";if(e=e.substr(1)){var n=e.lastIndexOf("(");e=e.substr(n+1);var r=e.split(this.parent.listSeparator);1===r.length?(t=r[0],this.isSubFormula=n>-1):(t=r[r.length-1],this.isSubFormula=!0);var i=t.match(/\w/);(!i||i&&0!==i.index)&&(t="")}return t},e.prototype.getRelateToElem=function(){var e={action:"getElement"};return this.isFormulaBar?this.parent.notify(r.l,e):this.parent.notify(r.j,e),e.element},e.prototype.getEditingValue=function(){var e={action:"getCurrentEditValue",editedValue:""};return this.parent.notify(r.j,e),e.editedValue},e.prototype.triggerKeyDownEvent=function(e){var t=this.autocompleteInstance.element;t.dispatchEvent(new Event("input"));var n=new Event("keydown");n.keyCode=e,n.which=e,n.altKey=!1,n.shiftKey=!1,n.ctrlKey=!1,t.dispatchEvent(n)},e.prototype.getNames=function(e){return this.parent.definedNames.filter(function(t){return"Workbook"===t.scope||""===t.scope||t.scope===e})},e.prototype.getNameFromRange=function(e){var t=e.slice(0,e.indexOf(":")),n=e.slice(e.indexOf("!")+1).split(":"),r=n.length>1&&n[0]===n[1],i=this.parent.definedNames.filter(function(n){var i=n.refersTo.split("!");i[0].includes("'")&&i[0].match(/^='.*'$/)&&(i[0]="="+i[0].slice(2,-1));var a=i[0]+"!"+i[1].split("$").join("");return!(!r||a!=="="+t)||a==="="+e});return i&&i[0]},e.prototype.addDefinedName=function(e){var t=this,i=e.name,s=!1;if(i&&n.i(o._161)(i.toUpperCase()))return this.parent.goTo(i),s;if(!e.refersTo){var l=n.i(o.l)(this.parent,this.parent.activeSheetIndex),d=n.i(o.p)(this.parent);d=-1!==d.indexOf(" ")?"'"+d+"'":d;var c=l.selectedRange;if(!n.i(a.isNullOrUndefined)(c)){var h=c.indexOf(":"),p=c.substr(0,h),u=c.substr(h+1,c.length);parseInt(u.replace(/\D/g,""),10)===l.rowCount&&1===parseInt(p.replace(/\D/g,""),10)?(u=u.replace(/[0-9]/g,""),p=p.replace(/[0-9]/g,""),c="$"+p+":$"+u):n.i(o.U)(u)[1]===l.colCount-1&&0===n.i(o.U)(p)[1]?(u=u.replace(/\D/g,""),p=p.replace(/\D/g,""),c="$"+p+":$"+u):c=p===u?p:c}e.refersTo=d+"!"+c,e.scope="Workbook"}if(i.length>0&&/^([a-zA-Z_0-9.]){0,255}$/.test(i)){var f={action:"addDefinedName",definedName:e,isAdded:!1};this.parent.notify(o._49,f),s=f.isAdded,f.isAdded||this.parent.serviceLocator.getService(r._175).show({content:this.parent.serviceLocator.getService(r._174).getConstant("DefineNameExists"),width:"300",beforeOpen:function(e){var n={dialogName:"DefineNameExistsDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",n),n.cancel&&(e.cancel=!0)}})}else this.parent.serviceLocator.getService(r._175).show({content:this.parent.serviceLocator.getService(r._174).getConstant("DefineNameInValid"),width:"300",beforeOpen:function(e){var n={dialogName:"DefineNameInValidDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",n),n.cancel&&(e.cancel=!0)}});return s},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(7),i=n(1),a=n(3),o=(n.n(a),n(0)),s=function(){function e(e){this.parent=e,this.addEventListener(),this.renderImageUpload()}return e.prototype.addEventListener=function(){this.parent.on(r.c,this.insertImage,this),this.parent.on(r.d,this.refreshImgCellObj,this),this.parent.on(r.e,this.createImageElement,this),this.parent.on(r.f,this.deleteImage,this),this.parent.on(r.g,this.refreshInsDelImagePosition,this)},e.prototype.renderImageUpload=function(){this.parent.element.appendChild(this.parent.createElement("input",{id:this.parent.element.id+"_imageUpload",styles:"display: none;",attrs:{type:"file",accept:".image, .jpg, .png, .gif ,jpeg",name:"fileUpload"}})).onchange=this.imageSelect.bind(this)},e.prototype.imageSelect=function(e){var t=e.target.files[0];t&&(t.type.includes("image")?this.insertImage({file:t}):this.parent.serviceLocator.getService(i._175).show({content:this.parent.serviceLocator.getService("spreadsheetLocale").getConstant("UnsupportedFile"),width:"300"}),e.target.value="")},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.c,this.insertImage),this.parent.off(r.d,this.refreshImgCellObj),this.parent.off(r.e,this.createImageElement),this.parent.off(r.f,this.deleteImage),this.parent.off(r.g,this.refreshInsDelImagePosition))},e.prototype.insertImage=function(e,t){var n=this;this.binaryStringVal(e).then(function(e){return n.createImageElement({options:{src:e},range:t,isPublic:!0})})},e.prototype.binaryStringVal=function(e){return new Promise(function(t,n){var r=new FileReader;r.readAsDataURL(e.file),r.onload=function(){return t(r.result)},r.onerror=function(e){return n(e)}})},e.prototype.createImageElement=function(e){var t=e.range?e.range.indexOf("!")>0?e.range.split("!")[1]:e.range.split("!")[0]:this.parent.getActiveSheet().selectedRange,r=e.range&&e.range.indexOf("!")>0?n.i(o.e)(this.parent,e.range.split("!")[0]):this.parent.activeSheetIndex,s=this.parent.serviceLocator.getService(i._177),l=e.options.imageId?e.options.imageId:n.i(a.getUniqueID)(this.parent.element.id+"_overlay_picture_"),d=n.i(o.T)(t),c=n.i(a.isUndefined)(r)?this.parent.getActiveSheet():this.parent.sheets[r];if(!this.parent.element.querySelector("#"+l)){var h={requestType:"beforeInsertImage",range:c.name+"!"+t,imageData:e.options.src,sheetIndex:r};if(e.isPublic&&this.parent.notify("actionBegin",{eventArgs:h,action:"beforeInsertImage"}),!h.cancel){var p=s.insertOverlayElement(l,t,r);p.element.style.backgroundImage="url('"+e.options.src+"')",(e.options.height||e.options.left)&&(p.element.style.height=e.options.height+"px",p.element.style.width=e.options.width+"px",n.i(a.isNullOrUndefined)(e.options.top)||(p.element.style.top=Number(n.i(i._167)(e.options.top).toFixed(2))+"px"),n.i(a.isNullOrUndefined)(e.options.left)||(p.element.style.left=Number(n.i(i._167)(e.options.left).toFixed(2))+"px")),(c.frozenRows||c.frozenColumns)&&s.adjustFreezePaneSize(e.options,p.element,t);var u={src:e.options.src,id:l,height:parseFloat(p.element.style.height.replace("px","")),width:parseFloat(p.element.style.width.replace("px","")),top:c.frozenRows||c.frozenColumns?d[0]?n.i(o.z)(c,0,d[0]-1):0:n.i(a.isNullOrUndefined)(e.options.top)?p.top:e.options.top,left:c.frozenRows||c.frozenColumns?d[1]?n.i(o.E)(c,0,d[1]-1):0:n.i(a.isNullOrUndefined)(e.options.left)?p.left:e.options.left};this.parent.setUsedRange(d[0],d[1]),(e.isPublic||e.isUndoRedo)&&this.parent.notify(o._124,{options:[u],range:c.name+"!"+t});var f=n.i(o.I)(d[0],d[1],c);f.image[f.image.length-1].id||(f.image[f.image.length-1].id=u.id),!e.isUndoRedo&&e.isPublic&&(h={requestType:"insertImage",range:c.name+"!"+t,imageHeight:e.options.height?e.options.height:300,imageWidth:e.options.width?e.options.width:400,imageData:e.options.src,id:l,sheetIndex:r},this.parent.notify("actionComplete",{eventArgs:h,action:"insertImage"}))}}},e.prototype.refreshInsDelImagePosition=function(e){for(var t,r,i,a=e.count,s=e.sheetIdx,l=this.parent.sheets[s],d=n.i(o.I)(e.rowIdx,e.colIdx,l),c=d.image.length,h=0;h<c;h++)t=document.getElementById(d.image[h].id),r="Row"===e.type?"insert"===e.status?d.image[h].top+20*a:d.image[h].top-20*a:d.image[h].top,i="Column"===e.type?"insert"===e.status?d.image[h].left+64*a:d.image[h].left-64*a:d.image[h].left,d.image[h].top=r,d.image[h].left=i,t.style.top=r+"px",t.style.left=i+"px"},e.prototype.refreshImgCellObj=function(e){var t,r,i=n.i(a.isUndefined)(e.sheetIdx)?this.parent.activeSheetIndex:e.sheetIdx,s=n.i(o.l)(this.parent,i),l=n.i(o.I)(e.prevRowIdx,e.prevColIdx,s),d=n.i(o.I)(e.currentRowIdx,e.currentColIdx,s),c=l?l.image:[],h=c&&c.length?c.length:0;if(l&&l.image&&c.length>0){for(var p=0;p<h;p++)c[p]&&c[p].id===e.id&&(t=c[p],t.height=e.currentHeight,t.width=e.currentWidth,t.top=e.currentTop,t.left=e.currentLeft,c.splice(p,1));if(d&&d.image&&(r=d.image,t&&r.push(t)),r?n.i(o.J)(e.currentRowIdx,e.currentColIdx,s,{image:r},!0):n.i(o.J)(e.currentRowIdx,e.currentColIdx,s,{image:[t]},!0),"imageRefresh"===e.requestType&&!e.isUndoRedo){var u={requestType:"imageRefresh",currentRowIdx:e.currentRowIdx,currentColIdx:e.currentColIdx,prevRowIdx:e.prevRowIdx,prevColIdx:e.prevColIdx,prevTop:e.prevTop,prevLeft:e.prevLeft,currentTop:e.currentTop,currentLeft:e.currentLeft,currentHeight:e.currentHeight,currentWidth:e.currentWidth,prevHeight:e.prevHeight,prevWidth:e.prevWidth,id:e.id,sheetIdx:this.parent.activeSheetIndex};this.parent.notify("actionComplete",{eventArgs:u,action:"imageRefresh"})}}},e.prototype.deleteImage=function(e){var t,i=e.sheet||this.parent.getActiveSheet(),a=document.getElementById(e.id),s=e.rowIdx,l=e.colIdx;if(a){if(void 0===e.rowIdx&&void 0===e.colIdx){var d=void 0,c=void 0;if(i.frozenRows||i.frozenColumns){var h=a.getBoundingClientRect();d={clientY:h.top},c={clientX:h.left},h.top<this.parent.getColumnHeaderContent().getBoundingClientRect().bottom&&(d.target=this.parent.getColumnHeaderContent()),h.left<this.parent.getRowHeaderContent().getBoundingClientRect().right&&(c.target=this.parent.getRowHeaderTable())}else d={clientY:parseFloat(a.style.top),isImage:!0},c={clientX:parseFloat(a.style.left),isImage:!0};this.parent.notify(r.h,d),this.parent.notify(r.i,c),s=d.clientY,l=c.clientX}if(t=i.name+"!"+n.i(o.W)(s,l),!e.preventEventTrigger){var p={address:t,cancel:!1};if(this.parent.notify(o._34,{action:"deleteImage",eventArgs:p}),p.cancel)return}document.getElementById(e.id).remove()}else if(!e.sheet){var u=e.range?e.range.indexOf("!")>0?e.range.split("!")[1]:e.range.split("!")[0]:this.parent.getActiveSheet().selectedRange,f=e.range&&e.range.indexOf("!")>0?n.i(o.e)(this.parent,e.range.split("!")[0]):this.parent.activeSheetIndex,g=n.i(o.T)(u);s=g[0],l=g[1],i=this.parent.sheets[f]}for(var m=n.i(o.I)(s,l,i),v=m.image,y=v.length,C={},b=y-1;b>=0;b--)v[b].id===e.id&&(C=v.splice(b,1)[0]);n.i(o.J)(s,l,i,{image:v},!0),e.preventEventTrigger||this.parent.notify(r.j,{action:"deleteImage",eventArgs:{address:t,id:C.id,imageData:C.src,imageWidth:C.width,imageHeight:C.height,cancel:!1}})},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"spreadsheetImage"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(6),i=n(1),a=n(0),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.refreshCellElement=function(e){e.cellEle&&this.parent.refreshNode(e.cellEle,e)},e.prototype.getTextSpace=function(e){e.width=n.i(i._152)(e.char,e.cell.style,this.parent.cellStyle)},e.prototype.rowFillHandler=function(e){var t=e.cellEle;if(t){var r=n.i(i._152)(e.repeatChar,e.cell.style,this.parent.cellStyle),o=e.colIdx;if(e.cell.colSpan>1){var s={range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]};this.parent.notify(a._116,s),o=s.range[3]}var l=n.i(i._155)(this.parent.getActiveSheet(),e.rowIdx,e.colIdx,o);t.innerText="",e.beforeFillText&&(t.innerText=e.beforeFillText,l-=n.i(i._152)(e.beforeFillText,e.cell.style,this.parent.cellStyle));var d=this.parent.createElement("span",{className:"e-fill"});if(t.appendChild(d),e.afterFillText){var c=this.parent.createElement("span",{className:"e-fill-sec"});c.innerText=e.afterFillText,t.appendChild(c),l-=n.i(i._152)(e.afterFillText,e.cell.style,this.parent.cellStyle)}var h=parseInt((l/r).toString(),10);e.formattedText=h>0?e.repeatChar.repeat(h):"",d.textContent=e.formattedText}},e.prototype.addEventListener=function(){this.parent.on(r.U,this.refreshCellElement,this),this.parent.on(r.V,this.rowFillHandler,this),this.parent.on(r._54,this.getTextSpace,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.U,this.refreshCellElement),this.parent.off(r.V,this.rowFillHandler),this.parent.off(r._54,this.getTextSpace))},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"numberFormat"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(7),i=n(1),a=n(0),o=function(){function e(e){this.isImportedFile=!1,this.unProtectSheetIdx=[],this.parent=e,this.addEventListener(),this.renderFileUpload()}return e.prototype.addEventListener=function(){this.parent.on(a._56,this.openSuccess,this),this.parent.on(a._57,this.openFailed,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a._56,this.openSuccess),this.parent.off(a._57,this.openFailed))},e.prototype.renderFileUpload=function(){var e=this.parent.element.id+"_fileUpload";this.parent.element.appendChild(this.parent.createElement("input",{id:e,attrs:{type:"file",accept:".xls, .xlsx, .csv, .xlsm, .xlsb",name:"fileUpload"}}));var t=document.getElementById(e);t.onchange=this.fileSelect.bind(this),t.onerror=this.openFailed.bind(this),t.style.display="none"},e.prototype.fileSelect=function(e){var t=e.target.files[0];if(!(t&&t.length<1)){var n={file:t};this.parent.open(n),document.getElementById(this.parent.element.id+"_fileUpload").value=""}},e.prototype.openSuccess=function(e){var t=this,n=["UnsupportedFile","InvalidUrl","NeedPassword","InCorrectPassword","InCorrectSheetPassword","CorrectSheetPassword","DataLimitExceeded","FileSizeLimitExceeded","ExternalWorkbook"],o=function(n){t.parent.serviceLocator.getService(i._175).hide(!0);var r=new File([],e.guid,{type:n.toLowerCase()});t.parent.open({file:r,guid:e.guid,password:e.eventArgs.password,orginalFile:e.eventArgs.file})};if(n.indexOf(e.data)>-1){var s=this.parent.serviceLocator.getService(i._174);if(n[2]===e.data)this.parent.element.querySelector(".e-importprotectworkbook-dlg")||this.parent.notify(i._96,e.eventArgs);else if(n[3]===e.data){var l=this.parent.createElement("span",{className:"e-importprotectpwd-alert-span"});l.innerText=s.getConstant("IncorrectPassword"),this.parent.element.querySelector(".e-importprotectworkbook-dlg").querySelector(".e-dlg-content").appendChild(l)}else if(n[4]===e.data){var l=this.parent.createElement("span",{className:"e-unprotectsheetpwd-alert-span"});l.innerText=s.getConstant("IncorrectPassword"),this.parent.element.querySelector(".e-unprotectworksheet-dlg").querySelector(".e-dlg-content").appendChild(l)}else{if(n[5]!==e.data){if(n[8]===e.data){var d=this.parent.serviceLocator.getService(i._175);d.hide(!0);var c=e.data.includes("ExternalWorkbook");return this.parent.serviceLocator.getService(i._175).show({content:this.parent.serviceLocator.getService("spreadsheetLocale").getConstant("ExternalWorkbook"),width:"350",buttons:c?[{click:o.bind(this,e.data+"Yes"),buttonModel:{content:s.getConstant("Yes"),isPrimary:!0}},{click:o.bind(this,e.data+"No"),buttonModel:{content:s.getConstant("No")}}]:[],beforeOpen:function(e){var n={dialogName:"OpenDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",n),n.cancel&&(e.cancel=!0)}},!!c||null),void this.parent.hideSpinner()}var d=this.parent.serviceLocator.getService(i._175);d.hide(!0);var h=e.data.includes("LimitExceeded");return this.parent.serviceLocator.getService(i._175).show({content:this.parent.serviceLocator.getService("spreadsheetLocale").getConstant(e.data),width:"300",buttons:h?[{click:o.bind(this,e.data+"Open"),buttonModel:{content:s.getConstant("Ok"),isPrimary:!0}},{click:o.bind(this,e.data+"Cancel"),buttonModel:{content:s.getConstant("Cancel")}}]:[],beforeOpen:function(e){var n={dialogName:"OpenDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",n),n.cancel&&(e.cancel=!0)}},!!h||null),void this.parent.hideSpinner()}this.parent.isOpen=!1,this.parent.notify(r.k,null);var d=this.parent.serviceLocator.getService(i._175);d.hide(),this.parent.hideSpinner()}}else{var d=this.parent.serviceLocator.getService(i._175);d.hide(),this.parent.showSpinner()}this.parent.element&&n[5]!==e.data&&(e.isOpenFromJson||(this.parent.trigger("openComplete",{response:e}),this.parent.notify(r.j,{response:e,action:"import"})),this.parent.notify(a._65,{cellRef:null,isOpen:!0}),this.parent.isProtected&&this.parent.showSheetTabs&&e.isOpenFromJson&&(this.parent.element.querySelector(".e-add-sheet-tab").setAttribute("disabled","true"),this.parent.element.querySelector(".e-add-sheet-tab").classList.add("e-disabled")),this.parent.renderModule.refreshSheet(e.isOpenFromJson,!1,!1,!1,e),this.parent.notify(r.l,null),this.isImportedFile=!0,this.preventFormatCheck=e.eventArgs&&e.eventArgs.file&&e.eventArgs.file.name&&!e.eventArgs.file.name.includes(".csv"),this.unProtectSheetIdx=[],this.parent.hideSpinner())},e.prototype.openFailed=function(e){this.parent.trigger("openFailure",e),this.parent.hideSpinner()},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"open"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return g});var r=n(49),i=n(1),a=n(8),o=(n.n(a),n(11)),s=(n.n(o),n(21)),l=(n.n(s),n(3)),d=(n.n(l),n(0)),c=n(30),h=(n.n(c),n(12)),p=(n.n(h),n(2)),u=n(16),f=(n.n(u),n(77)),g=function(){function e(e){this.border="1px solid #000000",this.fontNameIndex=5,this.numPopupWidth=0,this.preTabIdx=1,this.parent=e,this.addEventListener(),new f.a(e)}return e.prototype.getModuleName=function(){return"ribbon"},e.prototype.ribbonOperation=function(e){e&&e.onPropertyChange?this.onPropertyChanged(e.prop):this.initialize()},e.prototype.initialize=function(e){if(this.parent.notify(i._0,{}),this.parent.isMobileView())this.createMobileView();else{var t=e&&(this.parent.element.querySelector(".e-formula-bar-panel")||document.getElementById(this.parent.element.id+"_sheet_panel"));this.createRibbon(t)}},e.prototype.getRibbonMenuItems=function(){var e=this.parent.serviceLocator.getService(i._174),t=this.parent.element.id;return[{text:this.parent.isMobileView()?"":e.getConstant("File"),iconCss:this.parent.isMobileView()?"e-icons e-file-menu-icon":null,id:t+"_File",items:[{text:e.getConstant("New"),id:t+"_New",iconCss:"e-new e-icons"},{text:e.getConstant("Open"),id:t+"_Open",iconCss:"e-open e-icons"},{text:e.getConstant("SaveAs"),iconCss:"e-save e-icons",id:t+"_Save_As",items:[{text:e.getConstant("ExcelXlsx"),id:t+"_Xlsx",iconCss:"e-xlsx e-icons"},{text:e.getConstant("ExcelXls"),id:t+"_Xls",iconCss:"e-xls e-icons"},{text:e.getConstant("CSV"),id:t+"_Csv",iconCss:"e-csv e-icons"},{text:e.getConstant("PDF"),id:t+"_Pdf",iconCss:"e-pdf e-icons"}]}]}]},e.prototype.getRibbonItems=function(){var e=this,t=this.parent.element.id,r=this.parent.serviceLocator.getService(i._174),a=[{header:{text:r.getConstant("Home")},content:[{prefixIcon:"e-undo-icon",tooltipText:r.getConstant("Undo")+" (Ctrl+Z)",htmlAttributes:{"aria-label":r.getConstant("Undo")},id:t+"_undo",disabled:!0},{prefixIcon:"e-redo-icon",tooltipText:r.getConstant("Redo")+" (Ctrl+Y)",htmlAttributes:{"aria-label":r.getConstant("Redo")},id:t+"_redo",disabled:!0},{type:"Separator",id:t+"_separator_1"},{prefixIcon:"e-cut-icon",tooltipText:r.getConstant("Cut")+" (Ctrl+X)",htmlAttributes:{"aria-label":r.getConstant("Cut")},id:t+"_cut"},{prefixIcon:"e-copy-icon",tooltipText:r.getConstant("Copy")+" (Ctrl+C)",htmlAttributes:{"aria-label":r.getConstant("Copy")},id:t+"_copy"},{tooltipText:r.getConstant("Paste")+" (Ctrl+V)",template:this.getPasteBtn(t,r),id:t+"_paste",disabled:!0},{type:"Separator",id:t+"_separator_2"},{template:this.getNumFormatDDB(t,r),tooltipText:r.getConstant("NumberFormat"),id:t+"_number_format"},{type:"Separator",id:t+"_separator_3"},{template:this.getFontNameDDB(t),tooltipText:r.getConstant("Font"),id:t+"_font_name"},{type:"Separator",id:t+"_separator_4"},{template:this.getFontSizeDDB(t),tooltipText:r.getConstant("FontSize"),id:t+"_font_size"},{type:"Separator",id:t+"_separator_5"},{template:this.getBtn(t,"bold",r.getConstant("Bold")),tooltipText:r.getConstant("Bold")+" (Ctrl+B)",id:t+"_bold"},{template:this.getBtn(t,"italic",r.getConstant("Italic")),tooltipText:r.getConstant("Italic")+" (Ctrl+I)",id:t+"_italic"},{template:this.getBtn(t,"line-through",r.getConstant("Strikethrough")),tooltipText:r.getConstant("Strikethrough")+" (Ctrl+5)",id:t+"_line-through"},{template:this.getBtn(t,"underline",r.getConstant("Underline")),tooltipText:r.getConstant("Underline")+" (Ctrl+U)",id:t+"_underline"},{template:document.getElementById(t+"_font_color_picker"),tooltipText:r.getConstant("TextColor"),id:t+"_font_color_picker"},{type:"Separator",id:t+"_separator_6"},{template:document.getElementById(t+"_fill_color_picker"),tooltipText:r.getConstant("FillColor"),id:t+"_fill_color_picker"},{template:this.getBordersDBB(t),tooltipText:r.getConstant("Borders"),id:t+"_borders"},{template:this.getMergeSplitBtn(t),tooltipText:r.getConstant("MergeCells"),id:t+"_merge_cells",disabled:!0},{type:"Separator",id:t+"_separator_7"},{template:this.getTextAlignDDB(t),tooltipText:r.getConstant("HorizontalAlignment"),id:t+"_text_align"},{template:this.getVerticalAlignDDB(t),tooltipText:r.getConstant("VerticalAlignment"),id:t+"_vertical_align"},{template:this.getBtn(t,"wrap",r.getConstant("WrapText"),!1),tooltipText:""+r.getConstant("WrapText"),id:t+"_wrap"}]},{header:{text:r.getConstant("Insert")},content:[{prefixIcon:"e-hyperlink-icon",text:r.getConstant("Link"),id:t+"_hyperlink",tooltipText:r.getConstant("Link"),click:function(){e.getHyperlinkDlg()}},{prefixIcon:"e-image-icon",text:r.getConstant("Image"),id:t+"_image",tooltipText:r.getConstant("Image"),click:function(){n.i(l.select)("#"+t+"_imageUpload",e.parent.element).click()}}]},{header:{text:r.getConstant("Formulas")},content:[{prefixIcon:"e-insert-function",tooltipText:r.getConstant("InsertFunction"),text:r.getConstant("InsertFunction"),id:t+"_insert_function"}]},{header:{text:r.getConstant("Data")},content:[{prefixIcon:"e-protect-icon",text:r.getConstant("ProtectSheet"),id:t+"_protect",tooltipText:r.getConstant("ProtectSheet")},{prefixIcon:"e-password-protect-icon",text:r.getConstant("ProtectWorkbook"),id:t+"_protectworkbook",tooltipText:r.getConstant("ProtectWorkbook")},{type:"Separator",id:t+"_separator_8"},{template:this.datavalidationDDB(t),tooltipText:r.getConstant("DataValidation"),id:t+"_datavalidation"}]},{header:{text:r.getConstant("View")},content:[{prefixIcon:"e-hide-headers",text:this.getLocaleText("Headers"),id:t+"_headers",tooltipText:this.getLocaleText("Headers")},{type:"Separator",id:t+"_separator_9"},{prefixIcon:"e-hide-gridlines",text:this.getLocaleText("GridLines"),id:t+"_gridlines",tooltipText:this.getLocaleText("GridLines")},{type:"Separator",id:t+"_separator_13"},{prefixIcon:"e-freeze-pane",text:r.getConstant("FreezePanes"),id:t+"_freezepanes",tooltipText:r.getConstant("FreezePanes"),disabled:!this.parent.allowFreezePane},{prefixIcon:"e-freeze-row",text:r.getConstant("FreezeRows"),id:t+"_freezerows",tooltipText:r.getConstant("FreezeRows"),disabled:!this.parent.allowFreezePane},{prefixIcon:"e-freeze-column",text:r.getConstant("FreezeColumns"),id:t+"_freezecolumns",tooltipText:r.getConstant("FreezeColumns"),disabled:!this.parent.allowFreezePane}]}];return this.parent.allowConditionalFormat&&a.find(function(e){return e.header&&e.header.text===r.getConstant("Home")}).content.push({type:"Separator",id:t+"_separator_10"},{template:this.getCFDBB(t),tooltipText:r.getConstant("ConditionalFormatting"),id:t+"_conditionalformatting"}),this.parent.allowChart&&a.find(function(e){return e.header&&e.header.text===r.getConstant("Insert")}).content.push({type:"Separator",id:t+"_separator_11"},{template:this.getChartDDB(t,!0),text:r.getConstant("Chart"),tooltipText:r.getConstant("Chart"),id:t+"_chart"}),this.parent.allowCellFormatting&&a.find(function(e){return e.header&&e.header.text===r.getConstant("Home")}).content.push({type:"Separator",id:t+"_separator_12"},{template:this.getClearDDB(t),tooltipText:r.getConstant("Clear"),id:t+"_clear"}),(this.parent.allowSorting||this.parent.allowFiltering)&&a.find(function(e){return e.header&&e.header.text===r.getConstant("Home")}).content.push({template:this.getSortFilterDDB(t),tooltipText:r.getConstant("SortAndFilter"),id:t+"_sorting"}),this.parent.allowFindAndReplace&&a.find(function(e){return e.header&&e.header.text===r.getConstant("Home")}).content.push({template:this.getFindBtn(t),prefixIcon:"e-tbar-search-icon tb-icons",tooltipText:r.getConstant("FindReplaceTooltip"),id:t+"_find"}),a},e.prototype.getPasteBtn=function(e,t){var n=this,r=this.parent.element.appendChild(this.parent.createElement("button",{id:e+"_paste",attrs:{type:"button"}}));return this.pasteSplitBtn=new c.SplitButton({iconCss:"e-icons e-paste-icon",items:[{text:t.getConstant("All"),id:"All"},{text:t.getConstant("Values"),id:"Values"},{text:t.getConstant("Formats"),id:"Formats"}],createPopupOnClick:!0,select:function(e){n.pasteSplitBtn.element.setAttribute("aria-label",t.getConstant("Paste")+" "+e.item.text),n.parent.notify(i.L,{type:e.item.id,isAction:!0,isInternal:!0})},click:function(){r.setAttribute("aria-label",t.getConstant("Paste")),n.parent.notify(i.L,{isAction:!0,isInternal:!0})},beforeOpen:function(e){e.element.setAttribute("aria-label",t.getConstant("Paste"))}}),this.pasteSplitBtn.createElement=this.parent.createElement,this.pasteSplitBtn.appendTo(r),r.parentElement},e.prototype.getHyperlinkDlg=function(){var e,t=n.i(p.l)(this.parent.getActiveSheet().activeCell),r=this.parent.sheets[this.parent.activeSheetIndex].rows[t[0]];n.i(l.isNullOrUndefined)(r)||(e=r.cells[t[1]]),n.i(l.isNullOrUndefined)(e)&&n.i(d.J)(t[0],t[1],this.parent.getActiveSheet(),e,!1),e&&e.hyperlink?this.parent.notify(i._12,null):this.parent.notify(i._11,null)},e.prototype.passwordProtectDlg=function(){this.parent.password.length>0?this.parent.notify(i._92,null):document.getElementById(this.parent.element.id+"_protectworkbook").classList.contains("e-active")?(document.getElementById(this.parent.element.id+"_protectworkbook").classList.remove("e-active"),this.parent.showSheetTabs&&this.parent.element.querySelector(".e-add-sheet-tab").removeAttribute("disabled")):this.parent.notify(i._91,null)},e.prototype.getLocaleText=function(e){var t=this.parent.serviceLocator.getService(i._174);return this.parent.getActiveSheet()["show"+e]?t.getConstant("Hide"+e):t.getConstant("Show"+e)},e.prototype.getLocaleProtectText=function(e,t){var n,r=this.parent.serviceLocator.getService(i._174);return this.parent.getActiveSheet().isProtected?(t&&this.parent.getMainContent().classList.remove("e-hide-"+e.toLowerCase()),n=r.getConstant("Unprotect"+e)):(t&&this.parent.getMainContent().classList.add("e-hide-"+e.toLowerCase()),n=r.getConstant("Protect"+e)),n},e.prototype.getLocaleProtectWorkbook=function(e,t){var n,r=this.parent.serviceLocator.getService(i._174);return this.parent.isProtected?(t&&this.parent.getMainContent().classList.remove("e-hide-"+e.toLowerCase()),n=r.getConstant(e)):(t&&this.parent.getMainContent().classList.add("e-hide-"+e.toLowerCase()),n=r.getConstant(e)),n},e.prototype.insertDesignChart=function(){var e=this,t=this.parent.serviceLocator.getService(i._174),n=this.ribbon.items.length-1,r=t.getConstant("ChartDesign");if(this.parent.allowChart&&this.ribbon.items[n]&&this.ribbon.items[n].header.text!==r){this.preTabIdx=this.ribbon.selectedTab;var a=this.parent.element.id,o=[{header:{text:r},content:[{template:this.getAddChartEleDBB(a),tooltipText:t.getConstant("AddChartElement"),id:a+"add_chart_ element_chart"},{type:"Separator"},{prefixIcon:"e-switch-row-column-icon",text:t.getConstant("SwitchRowColumn"),tooltipText:t.getConstant("SwitchRowColumn"),id:a+"switch_row_column_chart",click:function(){e.parent.notify(i._88,{switchRowColumn:!0,triggerEvent:!0})}},{type:"Separator"},{template:this.getChartThemeDDB(a),tooltipText:t.getConstant("ChartTheme"),id:a+"_chart_theme"},{type:"Separator"},{template:this.getChartDDB(a,!1),tooltipText:t.getConstant("ChartType"),id:a+"_chart_type"}]}];this.addRibbonTabs({items:o}),this.ribbon.tabObj.select(this.ribbon.items.length)}},e.prototype.removeDesignChart=function(){var e=this.parent.serviceLocator.getService(i._174),t=this.ribbon.items.length-1;this.ribbon.items[t]&&this.ribbon.items[t].header.text===e.getConstant("ChartDesign")&&(this.ribbon.tabObj.select(this.preTabIdx+1),this.parent.hideRibbonTabs([e.getConstant("ChartDesign")],!0),document.getElementsByClassName("e-addchart-ddb").length>0&&document.getElementsByClassName("e-addchart-ddb")[0].remove(),document.getElementsByClassName("e-chart-type-ddb").length>0&&document.getElementsByClassName("e-chart-type-ddb")[0].remove(),document.getElementsByClassName("e-charttheme-ddb").length>0&&document.getElementsByClassName("e-charttheme-ddb")[0].remove(),delete this.ribbon.items[t].content[0],this.ribbon.items.length=this.ribbon.items.length-1)},e.prototype.createRibbon=function(e){var t=this.parent.createElement("div",{id:this.parent.element.id+"_ribbon"});this.ribbon=new r.a({selectedTab:0,menuItems:this.getRibbonMenuItems(),items:this.getRibbonItems(),fileMenuItemSelect:this.fileMenuItemSelect.bind(this),beforeOpen:this.fileMenuBeforeOpen.bind(this),beforeClose:this.fileMenuBeforeClose.bind(this),clicked:this.toolbarClicked.bind(this),created:this.ribbonCreated.bind(this),selecting:this.tabSelecting.bind(this),expandCollapse:this.expandCollapseHandler.bind(this),beforeFileMenuItemRender:this.beforeRenderHandler.bind(this)}),this.ribbon.createElement=this.parent.createElement,e?this.parent.element.insertBefore(t,e):this.parent.element.appendChild(t),this.ribbon.appendTo(t)},e.prototype.tabSelecting=function(e){if(e.selectingIndex!==this.ribbon.selectedTab){var t=this.parent.serviceLocator.getService(i._174);if(this.ribbon.items[e.selectingIndex]&&this.ribbon.items[e.selectingIndex].header.text===t.getConstant("Insert"))for(var n=this.ribbon.items[e.selectingIndex].content,r=n.length-1;r>=0;r--)if(n[r].id===this.parent.element.id+"_chart"){var a=n[r].template;a&&!a.classList.contains("e-dropdown-btn")&&this.createChartDdb(document.getElementById(this.parent.element.id+"_chart-btn"),!0);break}if(this.ribbon.items[e.selectedIndex]&&this.ribbon.items[e.selectedIndex].header.text===t.getConstant("Insert"))for(var n=this.ribbon.items[e.selectedIndex].content,r=n.length-1;r>=0;r--)if(n[r].id===this.parent.element.id+"_chart"){var a=n[r].template;a&&a.classList.contains("e-dropdown-btn")&&this.destroyComponent(a,"dropdown-btn");break}this.refreshRibbonContent(e.selectingIndex),this.parent.notify(i.G,{activeTab:e.selectingIndex})}},e.prototype.beforeRenderHandler=function(e){var t=this.parent.serviceLocator.getService(i._174);e.item.text!==t.getConstant("Open")||this.parent.openUrl&&this.parent.allowOpen||e.element.classList.add("e-disabled"),e.item.text!==t.getConstant("SaveAs")||this.parent.saveUrl&&this.parent.allowSave||e.element.classList.add("e-disabled")},e.prototype.getChartThemeDDB=function(e){var t=this,r=this.parent.serviceLocator.getService(i._174),a=this.parent.createElement("button",{id:e+"_chart_theme",attrs:{type:"button"},className:"e-ss-ddb"});a.appendChild(this.parent.createElement("span",{className:"e-tbar-btn-text"}));var o="Material",s=this.parent.element.querySelector(".e-ss-overlay-active");if(s){var h=s.querySelector(".e-chart");h?o=n.i(l.getComponent)(h,"chart").theme:(h=s.querySelector(".e-accumulationchart"))&&(o=n.i(l.getComponent)(h,"accumulationchart").theme)}var p=new c.DropDownButton({items:this.getChartThemeDdbItems(o),content:r.getConstant(o),createPopupOnClick:!0,select:function(e){t.parent.notify(d._148,{type:"mousedown"}),e.element&&e.element.querySelector(".e-selected-icon")||(p.content=e.item.text,p.dataBind(),t.parent.notify(i._88,{chartTheme:e.item.id,triggerEvent:!0}),p.setProperties({items:t.getChartThemeDdbItems(e.item.id)},!0))},cssClass:"e-flat e-charttheme-ddb",beforeOpen:function(e){t.tBarDdbBeforeOpen(e.element,e.items,t.parent.serviceLocator.getService(i._174).getConstant("Chart"))}});return p.createElement=this.parent.createElement,p.appendTo(a),a},e.prototype.getNumFormatDDB=function(e,t){var r=this,a=this.parent.createElement("button",{id:e+"_number_format",attrs:{type:"button"},className:"e-ss-ddb"}),o=this.parent.createElement("span",{className:"e-tbar-btn-text"});o.innerText=t.getConstant("General"),a.appendChild(o);var s=["General","0","0.00","#,##0","#,##0.00","#,##0_);(#,##0)","#,##0_);[Red](#,##0)","#,##0.00_);(#,##0.00)","#,##0.00_);[Red](#,##0.00)",p.Z.currency[4],p.Z.currency[2],p.Z.currency[3],p.Z.currency[5],"0%","0.00%","0.00E+00","##0.0E+0","# ?/?","# ??/??","dd-MM-yy","dd-MMM-yy","dd-MMM","MMM-yy","h:mm AM/PM","h:mm:ss AM/PM","h:mm","h:mm:ss","dd-MM-yy h:mm","mm:ss","mm:ss.0","@","[h]:mm:ss",p.Z.accounting[1],'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',p.Z.accounting[0],'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)'];return this.numFormatDDB=new c.DropDownButton({items:this.getNumFormatDdbItems(e),createPopupOnClick:!0,select:function(e){var t=r.parent.serviceLocator.getService(i._174);if(e.item.text===t.getConstant("Custom"))r.renderCustomFormatDialog(s);else{var a=e.item.id.split(r.parent.element.id+"_")[1];r.applyNumFormat(n.i(d._201)(a),e.item.text);var o=r.parent.getActiveSheet(),l=n.i(d.U)(o.activeCell);r.refreshTextAlign(o,n.i(d.I)(l[0],l[1],o,!1,!0),a,l),r.numFormatDDB.element.setAttribute("aria-label",a)}},open:function(e){return r.numDDBOpen(e)},beforeItemRender:function(e){return r.previewNumFormat(e)},cssClass:"e-flat e-numformat-ddb",beforeOpen:function(e){r.tBarDdbBeforeOpen(e.element,e.items,r.parent.serviceLocator.getService(i._174).getConstant("NumberFormat"))}}),this.numFormatDDB.createElement=this.parent.createElement,this.numFormatDDB.appendTo(a),a},e.prototype.getFontSizeDDB=function(e){var t=this;return this.fontSizeDdb=new c.DropDownButton({cssClass:"e-font-size-ddb",content:"11",createPopupOnClick:!0,items:[{text:"8"},{text:"9"},{text:"10"},{text:"11"},{text:"12"},{text:"14"},{text:"16"},{text:"18"},{text:"20"},{text:"22"},{text:"24"},{text:"26"},{text:"28"},{text:"36"},{text:"48"},{text:"72"}],beforeOpen:function(e){t.tBarDdbBeforeOpen(e.element,e.items,t.parent.serviceLocator.getService(i._174).getConstant("FontSize")),t.refreshSelected(t.fontSizeDdb,e.element,"content","text")},select:function(e){var n={style:{fontSize:e.item.text+"pt"},onActionUpdate:!0};t.parent.notify(d._43,n),n.cancel||(t.fontSizeDdb.content=n.style.fontSize.split("pt")[0],t.fontSizeDdb.dataBind()),t.fontSizeDdb.element.setAttribute("aria-label",e.item.text)}}),this.fontSizeDdb.createElement=this.parent.createElement,this.fontSizeDdb.appendTo(this.parent.createElement("button",{id:e+"_font_size",attrs:{type:"button"},className:"e-ss-ddb"})),this.fontSizeDdb.element},e.prototype.getChartDDB=function(e,t){var n,r=this.parent.serviceLocator.getService(i._174);if(t){n=this.parent.createElement("button",{id:e+"_chart-btn",attrs:{type:"button"}});var a=this.parent.createElement("span",{id:e+"_chart"});a.innerText=r.getConstant("Chart"),n.appendChild(a)}else{n=this.parent.createElement("button",{id:e+"_chart-type-btn",attrs:{type:"button"}});var a=this.parent.createElement("span",{id:e+"_chart_type"});a.innerText=r.getConstant("ChartType"),n.appendChild(a),this.createChartDdb(n,!1)}return n},e.prototype.closeDropdownPopup=function(e){if(e.altKey&&38===e.keyCode||27===e.keyCode){var t=this[1];t&&(t.toggle(),n.i(i._159)(t.element))}},e.prototype.createChartDdb=function(e,t){var r,a=this,o=this.parent.serviceLocator.getService(i._174),s=t?"e-chart-menu":"e-chart-type-menu",d=this.parent.createElement("ul",{id:this.parent.element.id+(t?"_chart_menu":"_chart_type_menu")}),h=new c.DropDownButton({iconCss:"e-icons "+(t?"e-chart-icon":"e-chart-type-icon"),cssClass:t?"e-chart-ddb":"e-chart-type-ddb",target:d,createPopupOnClick:!0,beforeOpen:function(e){r=a.createChartMenu(d,s,o,h),a.tBarDdbBeforeOpen(e.element,r.items,a.parent.serviceLocator.getService(i._174).getConstant("Chart")),l.EventHandler.add(d,"keydown",a.closeDropdownPopup,[a,h])},open:function(){return n.i(i._159)(d)},beforeClose:function(e){e.event&&n.i(l.closest)(e.event.target,"."+s)?e.cancel=!0:(l.EventHandler.remove(d,"keydown",a.closeDropdownPopup),r.destroy())}});h.createElement=this.parent.createElement,h.appendTo(e)},e.prototype.createChartMenu=function(e,t,n,r){var i=this,o=new a.Menu({cssClass:t,items:[{iconCss:"e-icons e-column",text:n.getConstant("Column"),items:[{id:"column_chart"}]},{iconCss:"e-icons e-bar",text:n.getConstant("Bar"),items:[{id:"bar_chart"}]},{iconCss:"e-icons e-area",text:n.getConstant("Area"),items:[{id:"area_chart"}]},{iconCss:"e-icons e-pie-doughnut",text:n.getConstant("PieAndDoughnut"),items:[{id:"pie_doughnut_chart"}]},{iconCss:"e-icons e-line",text:n.getConstant("Line"),items:[{id:"line_chart"}]},{iconCss:"e-icons e-scatter",text:n.getConstant("Scatter"),items:[{id:"scatter_chart"}]}],orientation:"Vertical",beforeOpen:function(e){var t;e.parentItem.text===n.getConstant("Column")?(e.element.firstChild.appendChild(s),t="e-column-chart"):e.parentItem.text===n.getConstant("Bar")?(e.element.firstChild.appendChild(C),t="e-bar-chart"):e.parentItem.text===n.getConstant("Area")?(e.element.firstChild.appendChild(A),t="e-area-chart"):e.parentItem.text===n.getConstant("Line")?(e.element.firstChild.appendChild(L),t="e-line-chart"):e.parentItem.text===n.getConstant("PieAndDoughnut")?(e.element.firstChild.appendChild(W),t="e-pie-doughnut-chart"):e.parentItem.text===n.getConstant("Radar")?(e.element.firstChild.appendChild($),t="e-radar-chart"):e.parentItem.text===n.getConstant("Scatter")&&(e.element.firstChild.appendChild(te),t="e-scatter-chart"),t&&(e.element.parentElement.classList.add(t),l.EventHandler.add(e.element,"keydown",i.menuIconKeyDown.bind(i,t+" .e-menu-icon",0)))},select:function(e){return i.chartSelected(e,r)},beforeItemRender:function(e){e.item.text||e.element.removeAttribute("tabindex")},beforeClose:function(e){e.event&&37===e.event.keyCode?e.cancel=!0:l.EventHandler.remove(e.element,"keydown",i.menuIconKeyDown)}}),s=this.parent.createElement("div",{id:"column_main",className:"e-column-main"}),d=this.parent.createElement("div",{id:"column1_text",className:"e-column1-text"});d.innerText=n.getConstant("Column");var c=this.parent.createElement("div",{id:"column1_cont",className:"e-column1-cont"}),h=this.parent.createElement("div",{id:"column2_cont",className:"e-column2-cont"});s.appendChild(d),s.appendChild(c);var p=n.getConstant("ClusteredColumn"),u=this.parent.createElement("span",{id:"clusteredColumn",className:"e-clusteredcolumn e-column-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedColumn");var f=this.parent.createElement("span",{id:"stackedColumn",className:"e-stackedcolumn e-column-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedColumn100");var g=this.parent.createElement("span",{id:"stackedColumn100",className:"e-stackedcolumn100 e-column-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}}),m=this.parent.createElement("span",{id:"clusteredColumn3D",className:"e-clusteredColumn3D e-column-icon"}),v=this.parent.createElement("span",{id:"stackedColumn3D",className:"e-stackedColumn3D e-column-icon"}),y=this.parent.createElement("span",{id:"stackedColumn1003D",className:"e-stackedColumn1003D e-column-icon"});c.appendChild(u),c.appendChild(f),c.appendChild(g),h.appendChild(m),h.appendChild(v),h.appendChild(y);var C=this.parent.createElement("div",{id:"bar_main",className:"e-bar-main"}),b=this.parent.createElement("div",{id:"bar1_text",className:"e-bar1-text"});b.innerText=n.getConstant("Bar");var x=this.parent.createElement("div",{id:"bar1_cont",className:"e-bar1-cont"}),S=this.parent.createElement("div",{id:"bar2_cont",className:"e-bar2-cont"});C.appendChild(b),C.appendChild(x),p=n.getConstant("ClusteredBar");var w=this.parent.createElement("span",{id:"clusteredBar",className:"e-clusteredbar e-bar-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedBar");var _=this.parent.createElement("span",{id:"stackedBar",className:"e-stackedbar e-bar-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedBar100");var I=this.parent.createElement("span",{id:"stackedBar100",className:"e-stackedbar100 e-bar-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}}),E=this.parent.createElement("span",{id:"clusteredBar3D",className:"e-clusteredBar3D e-bar-icon"}),R=this.parent.createElement("span",{id:"stackedBar3D",className:"e-stackedBar3D e-bar-icon"}),k=this.parent.createElement("span",{id:"stackedBar1003D",className:"e-stackedBar1003D e-bar-icon"});x.appendChild(w),x.appendChild(_),x.appendChild(I),S.appendChild(E),S.appendChild(R),S.appendChild(k);var A=this.parent.createElement("div",{id:"area_main",className:"e-area-main"}),F=this.parent.createElement("div",{id:"area_text",className:"e-area-text"});F.innerText=n.getConstant("Area");var N=this.parent.createElement("div",{id:"area_cont",className:"e-area-cont"});A.appendChild(F),A.appendChild(N),p=n.getConstant("Area");var T=this.parent.createElement("span",{id:"area",className:"e-area e-area-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedArea");var O=this.parent.createElement("span",{id:"stackedArea",className:"e-stackedarea e-area-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedArea100");var D=this.parent.createElement("span",{id:"stackedArea100",className:"e-stackedarea100 e-area-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});N.appendChild(T),N.appendChild(O),N.appendChild(D);var L=this.parent.createElement("div",{id:"line_main",className:"e-line-main"}),P=this.parent.createElement("div",{id:"line_text",className:"e-line-text"});P.innerText=n.getConstant("Line");var M=this.parent.createElement("div",{id:"line_cont",className:"e-line-cont"}),B=this.parent.createElement("div",{id:"line_cont_marker",className:"e-line-cont"});L.appendChild(P),L.appendChild(M),L.appendChild(B),p=n.getConstant("Line");var H=this.parent.createElement("span",{id:"line",className:"e-line e-line-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedLine");var U=this.parent.createElement("span",{id:"stackedLine",className:"e-stackedline e-line-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedLine100");var V=this.parent.createElement("span",{id:"stackedLine100",className:"e-stackedline100 e-line-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("LineMarker");var j=this.parent.createElement("span",{id:"lineMarker",className:"e-line-marker e-line-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedLineMarker");var z=this.parent.createElement("span",{id:"stackedLineMarker",className:"e-stackedline-marker e-line-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("StackedLine100Marker");var q=this.parent.createElement("span",{id:"stackedLine100Marker",className:"e-stackedline100-marker e-line-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});M.appendChild(H),M.appendChild(U),M.appendChild(V),B.appendChild(j),B.appendChild(z),B.appendChild(q);var W=this.parent.createElement("div",{id:"pie_main",className:"e-pie-main"}),G=this.parent.createElement("div",{id:"pie_text",className:"e-pie-text"});G.innerText=n.getConstant("Pie");var Y=this.parent.createElement("div",{id:"pie_cont",className:"e-pie-cont"});W.appendChild(G),W.appendChild(Y),p=n.getConstant("Pie");var X=this.parent.createElement("span",{id:"pie",className:"e-pie e-pie-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});p=n.getConstant("Doughnut");var K=this.parent.createElement("span",{id:"doughnut",className:"e-doughnut e-pie-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});Y.appendChild(X),Y.appendChild(K);var $=this.parent.createElement("div",{id:"radar_main",className:"e-radar-main"}),Z=this.parent.createElement("div",{id:"radar_text",className:"e-radar-text"});Z.innerText=n.getConstant("Radar");var J=this.parent.createElement("div",{id:"radar_cont",className:"e-radar-cont"});$.appendChild(Z),$.appendChild(J);var Q=this.parent.createElement("span",{id:"radar",className:"e-radar e-radar-icon e-menu-icon e-icons",attrs:{tabindex:"-1"}}),ee=this.parent.createElement("span",{id:"radar_markers",className:"e-radar-markers e-radar-icon e-menu-icon e-icons",attrs:{tabindex:"-1"}});Q.title=n.getConstant("BlueDataBar"),ee.title=n.getConstant("GreenDataBar"),J.appendChild(Q),J.appendChild(ee);var te=this.parent.createElement("div",{id:"scatter_main",className:"e-scatter-main"}),ne=this.parent.createElement("div",{id:"scatter_text",className:"e-scatter-text"});p=n.getConstant("Scatter"),ne.innerText=p;var re=this.parent.createElement("div",{id:"scatter_cont",className:"e-scatter-cont"});te.appendChild(ne),te.appendChild(re);var ie=this.parent.createElement("span",{id:"scatter",className:"e-scatter e-scatter-icon e-menu-icon e-icons",attrs:{title:p,"aria-label":p,tabindex:"-1"}});return re.appendChild(ie),o.createElement=this.parent.createElement,o.appendTo(e),e.classList.add("e-ul"),o},e.prototype.getAddChartEleDBB=function(e){var t,r=this,a=this.parent.serviceLocator.getService(i._174),o=this.parent.createElement("ul",{id:e+"_add_chart_menu"});this.addChartDdb=new c.DropDownButton({iconCss:"e-icons e-addchart-icon",cssClass:"e-addchart-ddb",target:o,createPopupOnClick:!0,close:function(){return n.i(i._159)(r.parent.element)},beforeOpen:function(e){t=r.createAddChartMenu(o,a),r.tBarDdbBeforeOpen(e.element,t.items),l.EventHandler.add(o,"keydown",r.closeDropdownPopup,[r,r.addChartDdb])},open:function(){return n.i(i._159)(o)},beforeClose:function(e){e.event&&n.i(l.closest)(e.event.target,".e-addchart-menu")?e.cancel=!0:(l.EventHandler.remove(o,"keydown",r.closeDropdownPopup),t.destroy())}}),this.addChartDdb.createElement=this.parent.createElement;var s=this.parent.createElement("button",{id:e+"_addchart",attrs:{type:"button"}}),d=this.parent.createElement("span",{id:e+"_chart"});return d.innerText=a.getConstant("AddChartElement"),s.appendChild(d),this.addChartDdb.appendTo(s),this.addChartDdb.element},e.prototype.createAddChartMenu=function(e,t){var r=this,i=new a.Menu({cssClass:"e-addchart-menu",title:t.getConstant("AddChartElement"),items:[{iconCss:"e-icons e-axes",text:t.getConstant("Axes"),items:[{iconCss:"e-icons e-ph-axes",id:"PHAxes",text:t.getConstant("PrimaryHorizontal")},{iconCss:"e-icons e-pv-axes",id:"PVAxes",text:t.getConstant("PrimaryVertical")}]},{iconCss:"e-icons e-axis-title",text:t.getConstant("AxisTitle"),items:[{iconCss:"e-icons e-ph-axistitle",id:"PHAxisTitle",text:t.getConstant("PrimaryHorizontal")},{iconCss:"e-icons e-pv-axistitle",id:"PVAxisTitle",text:t.getConstant("PrimaryVertical")}]},{iconCss:"e-icons e-chart-title",text:t.getConstant("ChartTitle"),items:[{iconCss:"e-icons e-ct-none",id:"ChartTitleNone",text:t.getConstant("None")},{iconCss:"e-icons e-ct-abovechart",id:"ChartTitleAbove",text:t.getConstant("AboveChart")}]},{iconCss:"e-icons e-data-labels",id:this.parent.element.id+"data-labels",text:t.getConstant("DataLabels"),items:[{iconCss:"e-icons e-dl-none",id:"DLNone",text:t.getConstant("None")},{iconCss:"e-icons e-dl-center",id:"DLCenter",text:t.getConstant("Center")},{iconCss:"e-icons e-dl-insideend",id:"DLInsideend",text:t.getConstant("InsideEnd")},{iconCss:"e-icons e-dl-insidebase",id:"DLInsidebase",text:t.getConstant("InsideBase")},{iconCss:"e-icons e-dl-outsideend",id:"DLOutsideend",text:t.getConstant("OutsideEnd")}]},{iconCss:"e-icons e-gridlines",text:t.getConstant("Gridlines"),items:[{iconCss:"e-icons e-gl-major-horizontal",id:"GLMajorHorizontal",text:t.getConstant("PrimaryMajorHorizontal")},{iconCss:"e-icons e-gl-major-vertical",id:"GLMajorVertical",text:t.getConstant("PrimaryMajorVertical")},{iconCss:"e-icons e-gl-minor-horizontal",id:"GLMinorHorizontal",text:t.getConstant("PrimaryMinorHorizontal")},{iconCss:"e-icons e-gl-minor-vertical",id:"GLMinorVertical",text:t.getConstant("PrimaryMinorVertical")}]},{iconCss:"e-icons e-legends",text:t.getConstant("Legends"),items:[{iconCss:"e-icons e-legends-none",id:"LegendNone",text:t.getConstant("None")},{iconCss:"e-icons e-legends-right",id:"LegendsRight",text:t.getConstant("Right")},{iconCss:"e-icons e-legends-left",id:"LegendsLeft",text:t.getConstant("Left")},{iconCss:"e-icons e-legends-bottom",id:"LegendsBottom",text:t.getConstant("Bottom")},{iconCss:"e-icons e-legends-top",id:"LegendsTop",text:t.getConstant("Top")}]}],orientation:"Vertical",select:this.addChartEleSelected.bind(this),beforeOpen:function(e){if(e.parentItem.id===r.parent.element.id+"data-labels"){var i=r.parent.element.querySelector(".e-ss-overlay-active");if(i){var a=i.querySelector(".e-chart");if(a){if(n.i(l.getComponent)(a,"chart").series[0].type.includes("Line")){var o=function(e,n){if(e){var r=e.parentElement;r.innerHTML="",r.appendChild(e),r.appendChild(document.createTextNode(t.getConstant(n)))}};o(e.element.querySelector(".e-dl-insideend"),"Above"),o(e.element.querySelector(".e-dl-insidebase"),"Below");var s=e.element.querySelector(".e-dl-outsideend");s&&(s.parentElement.style.display="none")}}}}}});return i.createElement=this.parent.createElement,i.appendTo(e),e.classList.add("e-ul"),i},e.prototype.getCFDBB=function(e){var t,r=this,a=this.parent.createElement("ul",{id:e+"_cf_menu"});return this.cfDdb=new c.DropDownButton({iconCss:"e-icons e-conditionalformatting-icon",cssClass:"e-cf-ddb",target:a,createPopupOnClick:!0,close:function(){return n.i(i._159)(r.parent.element)},beforeOpen:function(e){t=r.createCFMenu(a),r.tBarDdbBeforeOpen(e.element,t.items,r.parent.serviceLocator.getService(i._174).getConstant("ConditionalFormatting")),l.EventHandler.add(a,"keydown",r.closeDropdownPopup,[r,r.cfDdb])},open:function(){return n.i(i._159)(a)},beforeClose:function(e){e.event&&n.i(l.closest)(e.event.target,".e-cf-menu")?e.cancel=!0:(t.destroy(),l.EventHandler.remove(a,"keydown",r.closeDropdownPopup))}}),this.cfDdb.createElement=this.parent.createElement,this.cfDdb.appendTo(this.parent.createElement("button",{id:e+"_conditionalformatting",attrs:{type:"button"}})),this.cfDdb.element},e.prototype.createCFMenu=function(e){var t=this,n=this.parent.serviceLocator.getService(i._174),r=function(e,r,i){var a;e.forEach(function(e){a=n.getConstant(e+r),i.appendChild(t.parent.createElement("span",{id:e+r,className:"e-"+e.toLowerCase()+" e-cf-icon",attrs:{title:a,"aria-label":a,tabindex:"-1"}}))})},o=new a.Menu({cssClass:"e-cf-menu",items:[{iconCss:"e-icons e-hlcellrules",text:n.getConstant("HighlightCellsRules"),items:[{iconCss:"e-icons e-greaterthan",id:"cf_greaterthan_dlg",text:n.getConstant("GreaterThan")+"..."},{iconCss:"e-icons e-lessthan",id:"cf_lessthan_dlg",text:n.getConstant("LessThan")+"..."},{iconCss:"e-icons e-between",id:"cf_between_dlg",text:n.getConstant("Between")+"..."},{iconCss:"e-icons e-equalto",id:"cf_eqaulto_dlg",text:n.getConstant("CFEqualTo")+"..."},{iconCss:"e-icons e-textcontains",id:"cf_textcontains_dlg",text:n.getConstant("TextThatContains")+"..."},{iconCss:"e-icons e-adateoccuring",id:"cf_adateoccuring_dlg",text:n.getConstant("ADateOccuring")+"..."},{iconCss:"e-icons e-duplicate",id:"cf_duplicatevalues_dlg",text:n.getConstant("DuplicateValues")+"..."}]},{iconCss:"e-icons e-topbottomrules",text:n.getConstant("TopBottomRules"),items:[{iconCss:"e-icons e-top10items",id:"cf_top10items_dlg",text:n.getConstant("Top10Items")+"..."},{iconCss:"e-icons e-top10",id:"cf_top10_dlg",text:n.getConstant("Top10")+" %..."},{iconCss:"e-icons e-bottom10items",id:"cf_bottom10items_dlg",text:n.getConstant("Bottom10Items")+"..."},{iconCss:"e-icons e-bottom10",id:"cf_bottom10_dlg",text:n.getConstant("Bottom10")+" %..."},{iconCss:"e-icons e-aboveaverage",id:"cf_aboveaverage_dlg",text:n.getConstant("AboveAverage")+"..."},{iconCss:"e-icons e-belowaverage",id:"cf_belowaverage_dlg",text:n.getConstant("BelowAverage")+"..."}]},{iconCss:"e-icons e-databars",text:n.getConstant("DataBars"),items:[{id:"db_icons1"},{id:"db_icons2"}]},{iconCss:"e-icons e-colorscales",text:n.getConstant("ColorScales"),items:[{id:"cs_icons1"},{id:"cs_icons2"},{id:"cs_icons3"}]},{iconCss:"e-icons e-iconsets",text:n.getConstant("IconSets"),items:[{id:"is_icons"}]},{iconCss:"e-icons e-clearrules",text:n.getConstant("ClearRules"),items:[{id:"cf_cr_cells",text:n.getConstant("SelectedCells")},{id:"cf_cr_sheet",text:n.getConstant("EntireSheet")}]}],orientation:"Vertical",beforeOpen:function(e){"e-icons e-databars"===e.parentItem.iconCss?(e.element.parentElement.classList.add("e-databars"),r(["Blue","Green","Red"],"DataBar",e.element.firstChild),r(["Orange","LightBlue","Purple"],"DataBar",e.element.lastChild),l.EventHandler.add(e.element,"keydown",t.menuIconKeyDown.bind(t,"e-cf-icon",3))):"e-icons e-colorscales"===e.parentItem.iconCss?(e.element.parentElement.classList.add("e-colorscales"),r(["GYR","RYG","GWR","RWG"],"ColorScale",e.element.firstChild),r(["BWR","RWB","WR","RW"],"ColorScale",e.element.querySelector("#cs_icons2")),r(["GW","WG","GY","YG"],"ColorScale",e.element.lastChild),l.EventHandler.add(e.element,"keydown",t.menuIconKeyDown.bind(t,"e-cf-icon",4))):"e-icons e-iconsets"===e.parentItem.iconCss&&(e.element.parentElement.classList.add("e-iconsets"),e.element.firstChild.appendChild(p),l.EventHandler.add(e.element,"keydown",t.menuIconKeyDown.bind(t,"e-is-wrapper",0)))},select:this.cfSelected.bind(this),beforeItemRender:function(e){(e.item.id.includes("db_icons")||e.item.id.includes("cs_icons")||"is_icons"===e.item.id)&&e.element.removeAttribute("tabindex")},beforeClose:function(e){var n=["e-icons e-databars","e-icons e-colorscales","e-icons e-iconsets"].indexOf(e.parentItem.iconCss)>-1;e.cancel=e.event&&37===e.event.keyCode&&n,n&&!e.cancel&&l.EventHandler.remove(e.element,"keydown",t.menuIconKeyDown)}});o.createElement=this.parent.createElement;var s,d,c,h,p=this.parent.createElement("div",{id:"is",className:"e-is"}),u=[{hdr:"Directional"},{cont:[{cls:"3arrows",key:"ThreeArrowsColor",id:"ThreeArrows",count:3},{cls:"3arrowsgray",key:"ThreeArrowsGray",count:3},{cls:"3triangles",key:"ThreeTriangles",count:3},{cls:"4arrowsgray",key:"FourArrowsGray",count:4},{cls:"4arrows",key:"FourArrowsColor",id:"FourArrows",count:4},{cls:"5arrowsgray",key:"FiveArrowsGray",count:5},{cls:"5arrows",key:"FiveArrowsColor",id:"FiveArrows",count:5}]},{hdr:"Shapes"},{cont:[{cls:"3trafficlights",key:"ThreeTrafficLights1",count:3},{cls:"3rafficlights2",key:"ThreeTrafficLights2",count:3},{cls:"3signs",key:"ThreeSigns",count:3},{cls:"4trafficlights",key:"FourTrafficLights",count:4},{cls:"4redtoblack",key:"RedToBlack",id:"FourRedToBlack",count:4}]},{hdr:"Indicators"},{cont:[{cls:"3symbols",key:"ThreeSymbols1",id:"ThreeSymbols",count:3},{cls:"3symbols2",key:"ThreeSymbols2",count:3},{cls:"3flags",key:"ThreeFlags",count:3}]},{hdr:"Ratings"},{cont:[{cls:"3stars",key:"ThreeStars",count:3},{cls:"4rating",key:"FourRatings",id:"FourRating",count:4},{cls:"5quarters",key:"FiveQuarters",count:5},{cls:"5rating",key:"FiveRatings",id:"FiveRating",count:5},{cls:"5boxes",key:"FiveBoxes",count:5}]}];return u.forEach(function(e,r){s=t.parent.createElement("div",{id:"is"+(r+1),className:"e-is"+(r+1)}),e.hdr?s.innerText=n.getConstant(e.hdr):e.cont.forEach(function(e){for(c=n.getConstant(e.key),d=t.parent.createElement("div",{id:e.id||e.key,className:"e-"+e.cls+" e-is-wrapper",attrs:{title:c,"aria-label":c,tabindex:"-1"}}),h=0;h<e.count;h++)d.appendChild(t.createElement("span","e-"+e.cls+"-"+(h+1)+" e-iconsetspan"));s.appendChild(d)}),p.appendChild(s)}),o.createElement=this.parent.createElement,o.appendTo(e),e.classList.add("e-ul"),o},e.prototype.menuIconKeyDown=function(e,t,r){var a,o=[];if(r){if(40===r.keyCode||39===r.keyCode||38===r.keyCode||37===r.keyCode)if(r.preventDefault(),o=[].slice.call(document.querySelectorAll("."+e)),-1===(a=o.indexOf(r.target)))a=0;else if(39===r.keyCode)++a===o.length&&(a=0);else if(37===r.keyCode)-1===--a&&(a=o.length-1);else if(!e.includes("e-menu-icon")){var s=o.length,l=void 0,d=void 0;t||(t=2,40===r.keyCode?(l=[6,11,14,19],d=[5,10,13]):(l=[7,12,15],d=[8,13,16]),s--),40===r.keyCode?a===s-1?a=0:(a+=l&&l.indexOf(a)>-1?1:d&&d.indexOf(a)>-1?3:t,l&&s++,a>=s&&(a=a-s+1)):0===a?a=s-1:(a-=l&&l.indexOf(a)>-1?1:d&&d.indexOf(a)>-1?3:t)<0&&(a=l?s:s+a-1)}}else a=0,o=[].slice.call(document.querySelectorAll("."+e));o[a]&&n.i(i._159)(o[a])},e.prototype.createElement=function(e,t){return this.parent.createElement(e,{className:t})},e.prototype.getBordersDBB=function(e){var t=this,r=this.parent.createElement("ul",{id:e+"_borders_menu"});this.cPickerEle=this.parent.createElement("input",{id:e+"_cell_border_color",attrs:{type:"color"}}),this.parent.element.appendChild(this.cPickerEle),this.colorPicker=new o.ColorPicker({cssClass:"e-border-colorpicker",mode:"Palette",inline:!0,beforeTileRender:function(e){e.element.tabIndex=-1},change:function(e){var n=t.border.split(" ");n[2]=e.currentValue.hex,t.border=n.join(" ")}}),this.colorPicker.createElement=this.parent.createElement,this.colorPicker.appendTo(this.cPickerEle);var a;return this.bordersDdb=new c.DropDownButton({iconCss:"e-icons e-bottom-borders",cssClass:"e-borders-ddb",target:r,createPopupOnClick:!0,beforeOpen:function(e){a=t.createBorderMenu(r),t.tBarDdbBeforeOpen(e.element,a.items,t.parent.serviceLocator.getService(i._174).getConstant("Borders"),1),l.EventHandler.add(r,"keydown",t.closeDropdownPopup,[t,t.bordersDdb])},open:function(){return n.i(i._159)(r)},beforeClose:function(e){e.event&&n.i(l.closest)(e.event.target,".e-borders-menu")?e.cancel=!0:(l.EventHandler.remove(r,"keydown",t.closeDropdownPopup),a.destroy())},close:function(){return n.i(i._159)(t.bordersDdb.element)}}),this.bordersDdb.createElement=this.parent.createElement,this.bordersDdb.appendTo(this.parent.createElement("button",{id:e+"_borders",attrs:{type:"button"}})),this.bordersDdb.element},e.prototype.createBorderMenu=function(e){var t=this,r=this.parent.serviceLocator.getService(i._174),o=this.parent.element.id,s=new a.Menu({cssClass:"e-borders-menu",items:[{iconCss:"e-icons e-top-borders",text:r.getConstant("TopBorders"),id:o+"_border_topborders"},{iconCss:"e-icons e-left-borders",text:r.getConstant("LeftBorders"),id:o+"_border_leftborders"},{iconCss:"e-icons e-right-borders",text:r.getConstant("RightBorders"),id:o+"_border_rightborders"},{iconCss:"e-icons e-bottom-borders",text:r.getConstant("BottomBorders"),id:o+"_border_bottomborders"},{iconCss:"e-icons e-all-borders",text:r.getConstant("AllBorders"),id:o+"_border_allborders"},{iconCss:"e-icons e-horizontal-borders",text:r.getConstant("HorizontalBorders"),id:o+"_border_horizontalborders"},{iconCss:"e-icons e-vertical-borders",text:r.getConstant("VerticalBorders"),id:o+"_border_verticalborders"},{iconCss:"e-icons e-outside-borders",text:r.getConstant("OutsideBorders"),id:o+"_border_outsideborders"},{iconCss:"e-icons e-inside-borders",text:r.getConstant("InsideBorders"),id:o+"_border_insideborders"},{iconCss:"e-icons e-no-borders",text:r.getConstant("NoBorders"),id:o+"_border_noborders"},{separator:!0},{text:r.getConstant("BorderColor"),items:[{id:o+"_border_colors"}],id:o+"_border_bordercolor"},{text:r.getConstant("BorderStyle"),items:[{iconCss:"e-icons e-selected-icon",id:o+"_1px"},{id:o+"_2px"},{id:o+"_3px"},{id:o+"_dashed"},{id:o+"_dotted"},{id:o+"_double"}]}],orientation:"Vertical",beforeOpen:function(e){if(e.parentItem.id===o+"_border_bordercolor"){t.colorPicker.refresh();var n=t.colorPicker.element.parentElement;e.element.firstElementChild.appendChild(n),n.style.display="inline-block",e.element.parentElement.classList.add("e-border-color"),e.element.firstElementChild.removeAttribute("tabindex")}else e.element.classList.add("e-border-style")},beforeClose:function(e){if(e.event&&e.parentItem.id===o+"_border_bordercolor")if(!n.i(l.closest)(e.event.target,".e-border-colorpicker")||n.i(l.closest)(e.event.target,".e-apply")||n.i(l.closest)(e.event.target,".e-cancel")){t.colorPicker=n.i(l.getComponent)(t.cPickerEle,"colorpicker"),"Picker"===t.colorPicker.mode&&(t.colorPicker.mode="Palette",t.colorPicker.dataBind());var r=t.colorPicker.element.parentElement;r.style.display="",t.parent.element.appendChild(r)}else e.cancel=!0},onOpen:function(e){if(e.parentItem.id===o+"_border_bordercolor"){e.element.parentElement.style.overflow="visible";var t=e.element.querySelector(".e-color-palette .e-palette");t&&n.i(i._159)(t)}},onClose:function(){return n.i(i._159)(s.element)},select:function(e){t.borderSelected(e,s)}});return s.createElement=this.parent.createElement,s.appendTo(e),e.classList.add("e-ul"),s},e.prototype.chartSelected=function(e,t){var r=!n.i(l.isNullOrUndefined)(n.i(l.closest)(e.element,".e-chart-menu")),a=e.element.id;if("column_chartbar_chartarea_chartpie_doughnut_chartline_chartradar_chartscatter_chart".includes(a)){!e.item||e.item.items&&e.item.items.length||t.toggle();var o=e.event.target.id;this.parent.notify(i._84,{action:a,id:o,isChart:r})}},e.prototype.addChartEleSelected=function(e){var t=e.element.id;this.parent.notify(i._88,{addChartEle:t,triggerEvent:!0}),!e.item||e.item.items&&e.item.items.length||this.addChartDdb.toggle()},e.prototype.cfSelected=function(e){var t=this.parent.getActiveSheet();if(e.item.id.includes("_dlg"))this.parent.notify(i._61,{action:e.item.text});else if(e.item.id.includes("icons")){var n=e.event.target;this.parent.notify(p._72,{cfModel:{type:n.id||n.parentElement.id,range:t.selectedRange},isAction:!0})}else"cf_cr_cells"===e.item.id?this.parent.notify(p._73,{range:t.selectedRange,isAction:!0}):"cf_cr_sheet"===e.item.id&&(this.parent.conditionalFormat=null,this.parent.notify(p._73,{isAction:!0}));!e.item||e.item.items&&e.item.items.length||this.cfDdb.toggle()},e.prototype.borderSelected=function(e,t){this.bordersDdb.element.setAttribute("aria-label",e.item.text);var n=this.parent.element.id;if(!e.item.items.length&&e.item.id!==n+"_border_colors"){if(!e.item.text){var r=this.border.split(" "),i="solid"===r[1]?n+"_"+r[0]:n+"_"+r[1];if(i===e.item.id)return;return e.item.id===n+"_1px"||e.item.id===n+"_2px"||e.item.id===n+"_3px"?(r[0]=e.item.id.split(n+"_")[1],r[1]="solid"):(r[1]=e.item.id.split(n+"_")[1],r[0]="double"===r[1]?"3px":"1px"),this.border=r.join(" "),t.items[12].items.forEach(function(t){t.id===i&&(t.iconCss=null),t.id===e.item.id&&(t.iconCss="e-icons e-selected-icon")}),void t.setProperties({items:t.items},!0)}switch(this.bordersDdb.toggle(),this.parent.showSpinner(),e.item.id){case n+"_border_topborders":this.parent.notify(d._43,{style:{borderTop:this.border},onActionUpdate:!0});break;case n+"_border_leftborders":this.parent.notify(d._43,{style:{borderLeft:this.border},onActionUpdate:!0});break;case n+"_border_rightborders":this.parent.notify(d._43,{style:{borderRight:this.border},onActionUpdate:!0});break;case n+"_border_bottomborders":this.parent.notify(d._43,{style:{borderBottom:this.border},onActionUpdate:!0});break;case n+"_border_allborders":this.parent.notify(d._43,{style:{border:this.border},onActionUpdate:!0});break;case n+"_border_horizontalborders":this.parent.notify(d._43,{style:{border:this.border},onActionUpdate:!0,borderType:"Horizontal"});break;case n+"_border_verticalborders":this.parent.notify(d._43,{style:{border:this.border},onActionUpdate:!0,borderType:"Vertical"});break;case n+"_border_outsideborders":this.parent.notify(d._43,{style:{border:this.border},onActionUpdate:!0,borderType:"Outer"});break;case n+"_border_insideborders":this.parent.notify(d._43,{style:{border:this.border},onActionUpdate:!0,borderType:"Inner"});break;case n+"_border_noborders":this.parent.notify(d._43,{style:{border:""},onActionUpdate:!0})}this.parent.hideSpinner()}},e.prototype.getFontNameDDB=function(e){var t=this,n=this.parent.createElement("button",{id:e+"_font_name",attrs:{type:"button"},className:"e-ss-ddb"}),r=this.parent.createElement("span",{className:"e-tbar-btn-text"});return r.innerText="Calibri",n.appendChild(r),this.fontNameDdb=new c.DropDownButton({cssClass:"e-font-family",items:this.getFontFamilyItems(),createPopupOnClick:!0,select:function(e){var r={style:{fontFamily:e.item.text},onActionUpdate:!0};t.parent.notify(d._43,r),n.setAttribute("aria-label",e.item.text),r.cancel||t.refreshFontNameSelection(r.style.fontFamily)},beforeOpen:function(e){t.tBarDdbBeforeOpen(e.element,e.items,t.parent.serviceLocator.getService(i._174).getConstant("Font"))}}),this.fontNameDdb.createElement=this.parent.createElement,this.fontNameDdb.appendTo(n),n},e.prototype.getBtn=function(e,t,n,r){void 0===r&&(r=!0);var i=new u.Button({iconCss:"e-icons e-"+t+"-icon",cssClass:"e-flat",isToggle:!0});return i.createElement=this.parent.createElement,i.appendTo(this.parent.createElement("button",{id:e+"_"+t,attrs:{"aria-label":n,type:"button"}})),r&&i.element.addEventListener("click",this.toggleBtnClicked.bind(this)),i.element},e.prototype.datavalidationDDB=function(e){var t,n=this,r=this.parent.serviceLocator.getService(i._174);return this.datavalidationDdb=new c.DropDownButton({cssClass:"e-datavalidation-ddb",iconCss:"e-datavalidation-icon e-icons",content:r.getConstant("DataValidation"),items:[{text:r.getConstant("DataValidation")},{text:r.getConstant("HighlightInvalidData")},{text:r.getConstant("ClearHighlight")},{text:r.getConstant("ClearValidation")}],createPopupOnClick:!0,beforeOpen:function(e){n.refreshSelected(n.datavalidationDdb,e.element,"iconCss"),e.element.setAttribute("aria-label",r.getConstant("DataValidation"))},select:function(e){switch(e.item.text){case r.getConstant("DataValidation"):n.parent.notify(i._37,null);break;case r.getConstant("HighlightInvalidData"):n.parent.notify(i._40,{isRemoveHighlight:!1});break;case r.getConstant("ClearHighlight"):n.parent.notify(i._40,{isRemoveHighlight:!0});break;case r.getConstant("ClearValidation"):n.parent.notify(i._57,{isAction:!0});break;default:t=e.item.text===r.getConstant("SortAscending")?"Ascending":"Descending",n.parent.notify(i._7,{sortOptions:{sortDescriptors:{order:t}}})}n.datavalidationDdb.element.setAttribute("aria-label",e.item.text)}}),this.datavalidationDdb.createElement=this.parent.createElement,this.datavalidationDdb.appendTo(this.parent.createElement("button",{id:e+"_datavalidation",attrs:{type:"button"},className:"e-ss-ddb"})),this.datavalidationDdb.element},e.prototype.getTextAlignDDB=function(e){var t=this,n=this.parent.serviceLocator.getService(i._174);return this.textAlignDdb=new c.DropDownButton({cssClass:"e-align-ddb",iconCss:"e-icons e-left-icon",items:[{iconCss:"e-icons e-left-icon"},{iconCss:"e-icons e-center-icon"},{iconCss:"e-icons e-right-icon"}],beforeItemRender:this.alignItemRender.bind(this),createPopupOnClick:!0,beforeOpen:function(e){t.refreshSelected(t.textAlignDdb,e.element,"iconCss"),e.element.setAttribute("aria-label",n.getConstant("HorizontalAlignment"))},select:function(e){var r={style:{textAlign:e.item.iconCss.split(" e-")[1].split("-icon")[0]},onActionUpdate:!0};t.parent.notify(d._43,r),r.cancel||(t.textAlignDdb.iconCss="e-icons e-"+r.style.textAlign+"-icon",t.textAlignDdb.dataBind()),t.textAlignDdb.element.setAttribute("aria-label",n.getConstant("HorizontalAlignment")+" "+n.getConstant("Align"+t.getAlignText(e)))}}),this.textAlignDdb.createElement=this.parent.createElement,this.textAlignDdb.appendTo(this.parent.createElement("button",{id:e+"_text_align",attrs:{type:"button"},className:"e-ss-ddb"})),this.textAlignDdb.element},e.prototype.getVerticalAlignDDB=function(e){var t=this,n=this.parent.serviceLocator.getService(i._174);return this.verticalAlignDdb=new c.DropDownButton({cssClass:"e-align-ddb",iconCss:"e-icons e-bottom-icon",items:[{iconCss:"e-icons e-top-icon"},{iconCss:"e-icons e-middle-icon"},{iconCss:"e-icons e-bottom-icon"}],beforeItemRender:this.alignItemRender.bind(this),createPopupOnClick:!0,beforeOpen:function(e){t.refreshSelected(t.verticalAlignDdb,e.element,"iconCss"),e.element.setAttribute("aria-label",n.getConstant("VerticalAlignment"))},select:function(e){var r={style:{verticalAlign:e.item.iconCss.split(" e-")[1].split("-icon")[0]},onActionUpdate:!0};t.parent.notify(d._43,r),r.cancel||(t.verticalAlignDdb.iconCss="e-icons e-"+r.style.verticalAlign+"-icon",t.verticalAlignDdb.dataBind()),t.verticalAlignDdb.element.setAttribute("aria-label",n.getConstant("VerticalAlignment")+" "+n.getConstant("Align"+t.getAlignText(e)))}}),this.verticalAlignDdb.createElement=this.parent.createElement,this.verticalAlignDdb.appendTo(this.parent.createElement("button",{id:e+"_vertical_align",attrs:{type:"button"},className:"e-ss-ddb"})),this.verticalAlignDdb.element},e.prototype.getMergeSplitBtn=function(e){var t=this;this.parent.element.appendChild(this.parent.createElement("button",{id:e+"_merge",attrs:{type:"button"}}));var n=this.parent.serviceLocator.getService(i._174);return this.mergeSplitBtn=new c.SplitButton({cssClass:"e-merge-ddb",iconCss:"e-icons e-merge-icon",createPopupOnClick:!0,items:[{text:n.getConstant("MergeAll"),id:e+"_merge_all"},{text:n.getConstant("MergeHorizontally"),id:e+"_merge_horizontally"},{text:n.getConstant("MergeVertically"),id:e+"_merge_vertically"},{separator:!0,id:e+"_merge_separator"},{text:n.getConstant("Unmerge"),id:e+"_unmerge"}],select:this.mergeSelectHandler.bind(this),click:function(e){e.element.setAttribute("aria-label",n.getConstant("MergeCells")),e.element.classList.contains("e-active")?t.unMerge():t.merge(t.parent.element.id+"_merge_all")},created:function(){var e=n.getConstant("MergeCells");t.mergeSplitBtn.element.title=e,t.mergeSplitBtn.element.setAttribute("aria-label",e),t.mergeSplitBtn.element.nextElementSibling.title=n.getConstant("SelectMergeType")},beforeOpen:function(e){return e.element.setAttribute("aria-label",n.getConstant("MergeCells"))}}),this.mergeSplitBtn.createElement=this.parent.createElement,this.mergeSplitBtn.appendTo("#"+e+"_merge"),this.mergeSplitBtn.element.parentElement},e.prototype.mergeSelectHandler=function(e){e.item.id===this.parent.element.id+"_unmerge"?this.unMerge():this.merge(e.item.id),this.mergeSplitBtn.element.setAttribute("aria-label",e.item.text)},e.prototype.unMerge=function(e){this.parent.showSpinner();var t=this.parent.getActiveSheet().selectedRange;this.parent.notify(p.M,{merge:!1,range:e?e.range||t:t,isAction:!0,refreshRibbon:!0,type:"All"}),this.toggleActiveState(!1),this.parent.hideSpinner()},e.prototype.merge=function(e){for(var t,r,a=this,o=this.parent.getActiveSheet(),s=n.i(p.l)(o.selectedRange),l=e.includes("merge_all"),c=s[0];c<=s[2];c++)for(var h=s[1];h<=s[3];h++)c===s[0]&&h===s[1]&&l||c===s[0]&&e.includes("merge_vertically")||h===s[1]&&e.includes("_merge_horizontally")||(t=n.i(d.I)(c,h,o)||{},(t.value||t.formula)&&(r=!0));if(!r)return this.performMerge(e),void(l&&this.toggleActiveState(!0));var u=this.parent.serviceLocator.getService(i._175);u.show({height:200,width:400,isModal:!0,showCloseIcon:!0,cssClass:"e-merge-alert-dlg",content:this.parent.serviceLocator.getService(i._174).getConstant("MergeCellsAlert"),beforeOpen:function(e){var t={dialogName:"MergeAlertDialog",element:e.element,target:e.target,cancel:e.cancel};a.parent.trigger("dialogBeforeOpen",t),t.cancel?e.cancel=!0:n.i(i._159)(a.parent.element)},buttons:[{buttonModel:{content:this.parent.serviceLocator.getService(i._174).getConstant("Ok"),isPrimary:!0},click:function(){u.hide(),a.performMerge(e),l&&a.toggleActiveState(!0)}}]})},e.prototype.performMerge=function(e){var t=this.parent.element.id;switch(this.parent.showSpinner(),e){case t+"_merge_all":this.parent.notify(p.M,{merge:!0,range:this.parent.getActiveSheet().selectedRange,type:"All",isAction:!0,refreshRibbon:!0});break;case t+"_merge_horizontally":this.parent.notify(p.M,{merge:!0,range:this.parent.getActiveSheet().selectedRange,type:"Horizontally",isAction:!0});break;case t+"_merge_vertically":this.parent.notify(p.M,{merge:!0,range:this.parent.getActiveSheet().selectedRange,type:"Vertically",isAction:!0})}this.parent.hideSpinner()},e.prototype.getSortFilterDDB=function(e){var t,n=this,r=this.parent.serviceLocator.getService(i._174);return this.sortingDdb=new c.DropDownButton({cssClass:"e-sort-filter-ddb",iconCss:"e-icons e-sort-filter-icon",items:[{text:r.getConstant("SortAscending"),iconCss:"e-icons e-sort-asc"},{text:r.getConstant("SortDescending"),iconCss:"e-icons e-sort-desc"},{text:r.getConstant("CustomSort")+"...",iconCss:"e-icons e-sort-custom"},{separator:!0},{text:r.getConstant("Filter"),iconCss:"e-icons e-filter-apply",id:e+"_applyfilter"},{text:r.getConstant("ClearAllFilter"),iconCss:"e-icons e-filter-clear",id:e+"_clearfilter"},{text:r.getConstant("ReapplyFilter"),iconCss:"e-icons e-filter-reapply",id:e+"_reapplyfilter"}],createPopupOnClick:!0,beforeItemRender:function(t){var a={isFiltered:!1,isClearAll:!0};n.parent.notify(i._30,a),n.parent.allowSorting||t.item.text!==r.getConstant("SortAscending")&&t.item.text!==r.getConstant("SortDescending")&&t.item.text!==r.getConstant("CustomSort")+"..."||t.element.classList.add("e-disabled"),n.parent.allowFiltering||t.item.text!==r.getConstant("Filter")||t.element.classList.add("e-disabled"),t.item.id!==e+"_clearfilter"&&t.item.id!==e+"_reapplyfilter"||(a.isFiltered?t.element.classList.remove("e-disabled"):t.element.classList.add("e-disabled"))},beforeOpen:function(e){n.refreshSelected(n.sortingDdb,e.element,"iconCss"),e.element.setAttribute("aria-label",n.parent.serviceLocator.getService(i._174).getConstant("SortAndFilter"))},select:function(e){switch(e.item.text){case r.getConstant("Filter"):n.parent.notify(i._23,{});break;case r.getConstant("ClearAllFilter"):n.parent.notify(i._29,{isAction:!0});break;case r.getConstant("ReapplyFilter"):n.parent.notify(i._27,null);break;case r.getConstant("CustomSort")+"...":n.parent.notify(i._6,null);break;default:t=e.item.text===r.getConstant("SortAscending")?"Ascending":"Descending";var a=[];if(n.parent.sortCollection)for(var o=n.parent.sortCollection.length-1;o>=0;o--)n.parent.sortCollection[o]&&n.parent.sortCollection[o].sheetIndex===n.parent.activeSheetIndex&&(a.push(n.parent.sortCollection[o]),n.parent.sortCollection.splice(o,1));n.parent.notify(i._26,{sortOptions:{sortDescriptors:{order:t}}}),n.parent.notify(i._7,{sortOptions:{sortDescriptors:{order:t}},previousSort:a})}n.sortingDdb.element.setAttribute("aria-label",e.item.text)}}),this.sortingDdb.createElement=this.parent.createElement,this.sortingDdb.appendTo(this.parent.createElement("button",{id:e+"_sorting",attrs:{type:"button"},className:"e-ss-ddb"})),this.sortingDdb.element},e.prototype.getFindBtn=function(e){var t=this,n=this.parent.createElement("button",{id:e+"_findbtn",attrs:{type:"button","aria-label":this.parent.serviceLocator.getService(i._174).getConstant("FindReplaceTooltip")}});return this.findDdb=new u.Button({cssClass:"e-spreadsheet-find-ddb e-flat",iconCss:"e-icons e-search-icon"}),this.findDdb.createElement=this.parent.createElement,this.findDdb.appendTo(n),n.onclick=function(e){t.parent.notify(p._26,{event:e})},this.findDdb.element},e.prototype.getClearDDB=function(e){var t=this,n=this.parent.serviceLocator.getService(i._174);return this.clearDdb=new c.DropDownButton({cssClass:"e-clear-ddb",iconCss:"e-icons e-clear-icon",items:[{text:n.getConstant("ClearAll"),id:e+"_Clear All"},{text:n.getConstant("ClearFormats"),id:e+"_Clear Formats"},{text:n.getConstant("ClearContents"),id:e+"_Clear Contents"},{text:n.getConstant("ClearHyperlinks"),id:e+"_Clear Hyperlinks"}],createPopupOnClick:!0,beforeOpen:function(e){e.element.setAttribute("aria-label",t.parent.serviceLocator.getService(i._174).getConstant("Clear"))},select:function(n){t.parent.notify(i._62,{options:{type:n.item.id.replace(e+"_","")},isAction:!0}),t.clearDdb.element.setAttribute("aria-label",n.item.text)}}),this.clearDdb.createElement=this.parent.createElement,this.clearDdb.appendTo(this.parent.createElement("button",{id:e+"_clear",attrs:{type:"button"},className:"e-ss-ddb"})),this.clearDdb.element},e.prototype.ribbonCreated=function(){var e=this.parent.serviceLocator.getService(i._174).getConstant("CollapseToolbar");n.i(l.attributes)(this.ribbon.element.querySelector(".e-drop-icon"),{role:"button",tabindex:"-1",title:e,"aria-label":e}),this.ribbon.toolbarObj&&(this.ribbon.toolbarObj.allowKeyboard=this.parent.enableKeyboardNavigation,this.ribbon.toolbarObj.dataBind())},e.prototype.alignItemRender=function(e){e.element.title=this.parent.serviceLocator.getService(i._174).getConstant("Align"+this.getAlignText(e))},e.prototype.getAlignText=function(e){var t=e.item.iconCss.split(" e-")[1].split("-icon")[0];return t[0].toUpperCase()+t.slice(1,t.length)},e.prototype.toggleBtnClicked=function(e){var t,r,i,a,o,s=n.i(l.closest)(e.target,".e-btn"),c=this.parent.element.id,h=s.id,u=d._43;switch(h){case c+"_bold":r={fontWeight:"normal"},i={fontWeight:"bold"},o="fontWeight";break;case c+"_italic":r={fontStyle:"normal"},i={fontStyle:"italic"},o="fontStyle";break;case c+"_line-through":u=p._69,r={textDecoration:"line-through"},i=r,o="textDecoration";break;case c+"_underline":u=p._69,r={textDecoration:"underline"},i=r,o="textDecoration"}s.classList.contains("e-active")?(t=i[""+o],a={style:i,onActionUpdate:!0},this.parent.notify(u,a),a.cancel&&s.classList.remove("e-active")):(t=r[""+o],a={style:r,onActionUpdate:!0},this.parent.notify(u,a),a.cancel&&s.classList.add("e-active")),a.cancel||t===a.style[""+o]||this.refreshToggleBtn(n.i(d.U)(this.parent.getActiveSheet().activeCell))},e.prototype.getCellStyleValue=function(e,t){var r=n.i(d.I)(t[0],t[1],this.parent.getActiveSheet()),i=this.parent.cellStyle[""+e];return r&&r.style&&r.style[""+e]&&(i=r.style[""+e]),i},e.prototype.refreshSelected=function(e,t,n,r){void 0===r&&(r=n);for(var i=0;i<e.items.length;i++)if(e.items[i][""+r]===e[""+n]){t.children[i].classList.add("e-selected");break}},e.prototype.expandCollapseHandler=function(e){var t=this.ribbon.element.querySelector(".e-drop-icon"),n=this.parent.serviceLocator.getService(i._174);e.expanded?(t.title=n.getConstant("CollapseToolbar"),t.setAttribute("aria-label",n.getConstant("ExpandToolbar"))):(t.title=n.getConstant("ExpandToolbar"),t.setAttribute("aria-label",n.getConstant("CollapseToolbar"))),this.parent.setPanelSize()},e.prototype.getChartThemeDdbItems=function(e){var t=this.parent.serviceLocator.getService(i._174),n=[];return["Material","Fabric","Bootstrap","HighContrastLight","MaterialDark","FabricDark","HighContrast","BootstrapDark","Bootstrap4","Bootstrap5Dark","Bootstrap5","TailwindDark","Tailwind","FluentDark","Fluent","Material3","Material3Dark"].forEach(function(r){n.push({id:r,text:t.getConstant(r),iconCss:r===e?"e-icons e-selected-icon":""})}),n},e.prototype.getNumFormatDdbItems=function(e){var t=this.parent.serviceLocator.getService(i._174);return[{id:e+"_General",text:t.getConstant("General")},{id:e+"_Number",text:t.getConstant("Number")},{id:e+"_Currency",text:t.getConstant("Currency")},{id:e+"_Accounting",text:t.getConstant("Accounting")},{id:e+"_ShortDate",text:t.getConstant("ShortDate")},{id:e+"_LongDate",text:t.getConstant("LongDate")},{id:e+"_Time",text:t.getConstant("Time")},{id:e+"_Percentage",text:t.getConstant("Percentage")},{id:e+"_Fraction",text:t.getConstant("Fraction")},{id:e+"_Scientific",text:t.getConstant("Scientific")},{id:e+"_Text",text:t.getConstant("Text")},{id:e+"_Custom",text:t.getConstant("Custom")}]},e.prototype.getFontFamilyItems=function(){return[{text:"Arial"},{text:"Arial Black"},{text:"Axettac Demo"},{text:"Batang"},{text:"Book Antiqua"},{text:"Calibri",iconCss:"e-icons e-selected-icon"},{text:"Comic Sans MS"},{text:"Courier"},{text:"Courier New"},{text:"Din Condensed"},{text:"Georgia"},{text:"Helvetica"},{text:"Helvetica New"},{text:"Roboto"},{text:"Tahoma"},{text:"Times New Roman"},{text:"Verdana"}]},e.prototype.applyNumFormat=function(e,t){var n=this.parent.getActiveSheet(),r={format:e,range:n.selectedRange,cancel:!1,requestType:"NumberFormat"},a={range:n.name+"!"+r.range,format:r.format,requestType:"NumberFormat"};this.parent.trigger("beforeCellFormat",r),this.parent.notify(p._31,{eventArgs:r,action:"format"}),r.cancel||(this.parent.notify(p._5,r),this.parent.notify(d._148,{type:"mousedown"}),this.refreshNumFormatSelection(t),this.parent.notify(i._31,{eventArgs:a,action:"format"}))},e.prototype.renderCustomFormatDialog=function(e){var t=this,r=this.parent.serviceLocator.getService(i._174),a=this.parent.createElement("div"),o=this.parent.createElement("div",{className:"e-custom-dialog"}),l=this.parent.createElement("button",{className:"e-btn",attrs:{type:"button"}});l.innerText=r.getConstant("Apply");var c=this.parent.createElement("div",{className:"e-custom-sample"});c.innerText=r.getConstant("CustomFormatTypeList")+":";var h=this.parent.createElement("input",{className:"e-input e-dialog-input",attrs:{type:"text",name:"input",placeholder:r.getConstant("CustomFormatPlaceholder"),spellcheck:"false"}}),u=this.parent.createElement("div",{className:"e-custom-listview"}),f=this.parent.serviceLocator.getService(i._175),g=new s.ListView({dataSource:e,select:function(e){h.value=e.text,e.event&&"keydown"===e.event.type&&e.item&&e.item.focus()}});o.appendChild(h),o.appendChild(l),o.appendChild(c),o.appendChild(u),g.appendTo(u);var m=function(t){-1===e.indexOf(t.format)&&e.push(t.format)};this.parent.on(p._79,m,this),l.addEventListener("click",function(){var e=h.value;t.applyNumFormat(e,r.getConstant("Custom")),g.destroy(),f.hide(),m({format:e})}),f.show({header:r.getConstant("CustomFormat"),cssClass:"e-custom-format-dlg",height:this.parent.cssClass.indexOf("e-bigger")>-1?502:480,width:440,isModal:!0,showCloseIcon:!0,content:o,footerTemplate:a,beforeOpen:function(){return n.i(i._159)(t.parent.element)}});var v=this.parent.getActiveSheet(),y=n.i(d.U)(v.activeCell),C=n.i(d.I)(y[0],y[1],v);C&&C.format&&g.selectItem(C.format)},e.prototype.tBarDdbBeforeOpen=function(e,t,n,r){void 0===r&&(r=0);var i=this.parent.viewport.height,a=parseInt(getComputedStyle(e.firstElementChild).height,10)*(t.length-r)+2*parseInt(getComputedStyle(e).paddingTop,10);if(r){var o=getComputedStyle(e.querySelector(".e-separator"));a+=r*(parseInt(o.borderBottomWidth,10)+2*parseInt(o.marginTop,10))}a>i?(e.style.height=i+"px",e.style.overflowY="auto"):e.style.height&&(e.style.height="",e.style.overflowY=""),e.setAttribute("aria-label",n)},e.prototype.numDDBOpen=function(e){this.numPopupWidth=0;for(var t=e.element.querySelectorAll("span.e-numformat-preview-text"),n=0,r=t.length;n<r;n++)this.numPopupWidth<t[n].offsetWidth&&(this.numPopupWidth=t[n].offsetWidth);var i=this.numPopupWidth+160;document.querySelector(".e-numformat-ddb.e-dropdown-popup").style.width=i+"px"},e.prototype.previewNumFormat=function(e){if(!e.item.id.includes("_Custom")){var t=this.parent.createElement("div",{className:"e-numformat-text",styles:"width:100%",innerHTML:e.element.innerHTML});e.element.innerHTML="";var r=this.parent.getActiveSheet(),a=n.i(d.U)(r.activeCell),o=n.i(d.I)(a[0],a[1],r,!1,!0);if(!n.i(l.isNullOrUndefined)(o.value)||""!==o.value){var s=n.i(d._201)(e.item.id.split(this.parent.element.id+"_")[1]),c={type:e.item.text,formattedText:"",value:o.value,format:s,cell:{value:o.value,format:s},skipFormatCheck:n.i(i._163)(this.parent)};this.parent.notify(p.d,c);var h=this.parent.createElement("span",{className:"e-numformat-preview-text",styles:"float:right;"});h.innerText=c.formattedText,t.appendChild(h)}e.element.appendChild(t)}},e.prototype.refreshRibbonContent=function(e){if(this.ribbon){n.i(l.isNullOrUndefined)(e)&&(e=this.ribbon.selectedTab);var t=this.parent.serviceLocator.getService(i._174),r=this.parent.getActiveSheet();switch(this.ribbon.items[e].header.text){case t.getConstant("Home"):this.refreshHomeTabContent(n.i(d.U)(r.activeCell));break;case t.getConstant("Insert"):case t.getConstant("Formulas"):break;case t.getConstant("Data"):this.refreshDataTabContent(e);break;case t.getConstant("View"):this.refreshViewTabContent(e)}}},e.prototype.refreshHomeTabContent=function(e){n.i(l.isNullOrUndefined)(document.getElementById(this.parent.element.id+"_number_format"))||(this.numFormatDDB=n.i(l.getComponent)(document.getElementById(this.parent.element.id+"_number_format"),c.DropDownButton));var t=this.parent.getActiveSheet(),r=n.i(d.U)(this.parent.getActiveSheet().activeCell),a=this.parent.serviceLocator.getService(i._174),o=n.i(d.I)(r[0],r[1],this.parent.getActiveSheet())||{},s=n.i(d._202)(o.format||"General",!0);if(this.numFormatDDB&&(t.isProtected&&!t.protectSettings.formatCells?(s="General",this.refreshNumFormatSelection(s)):(o.format&&"General"===s&&"General"!==o.format&&(s="Custom"),this.refreshNumFormatSelection(a.getConstant(s)))),this.fontNameDdb&&(t.isProtected&&!t.protectSettings.formatCells?this.refreshFontNameSelection("Calibri"):this.refreshFontNameSelection(this.getCellStyleValue("fontFamily",e))),this.fontSizeDdb){var h=this.getCellStyleValue("fontSize",e);t.isProtected&&!t.protectSettings.formatCells?this.fontSizeDdb.content="11":(h=h.includes("pt")?h.split("pt")[0]:"11")!==this.fontSizeDdb.content&&(this.fontSizeDdb.content=h,this.fontSizeDdb.dataBind())}if(this.refreshTextAlign(t,o,s,e),this.verticalAlignDdb){var h="e-icons e-"+this.getCellStyleValue("verticalAlign",e).toLowerCase()+"-icon";t.isProtected&&!t.protectSettings.formatCells?this.verticalAlignDdb.iconCss="e-icons e-bottom-icon":h!==this.verticalAlignDdb.iconCss&&(this.verticalAlignDdb.iconCss=h,this.verticalAlignDdb.dataBind())}if(this.refreshToggleBtn(e),!t.isProtected&&(o.rowSpan>1||o.colSpan>1))this.enableToolbarItems([{tab:a.getConstant("Home"),items:[this.parent.element.id+"_merge_cells"],enable:!0}]),this.toggleActiveState(!0);else{var u=n.i(p.l)(t.selectedRange);this.enableToolbarItems([{tab:a.getConstant("Home"),items:[this.parent.element.id+"_merge_cells"],enable:u[0]!==u[2]||u[1]!==u[3]}]),this.toggleActiveState(!1)}},e.prototype.refreshTextAlign=function(e,t,r,i){if(this.textAlignDdb){var a=this.getCellStyleValue("textAlign",i);if(e.isProtected&&!e.protectSettings.formatCells)this.textAlignDdb.iconCss="e-icons e-left-icon";else{void 0!==t.value&&"left"===a&&("Accounting"===r||n.i(p.o)(t.value)&&"Text"!==r)&&(a="right");var o="e-icons e-"+a.toLowerCase()+"-icon";o!==this.textAlignDdb.iconCss&&(this.textAlignDdb.iconCss=o,this.textAlignDdb.dataBind())}}},e.prototype.toggleActiveState=function(e){var t=this.parent.serviceLocator.getService(i._174);this.parent.getActiveSheet().isProtected||(e?(this.mergeSplitBtn.element.classList.add("e-active"),this.mergeSplitBtn.element.title=t.getConstant("UnmergeCells")):(this.mergeSplitBtn.element.classList.contains("e-active")&&this.mergeSplitBtn.element.classList.remove("e-active"),this.mergeSplitBtn.element.title=t.getConstant("MergeCells")))},e.prototype.refreshToggleBtn=function(e){var t,r,i,a=this,o=this.parent.getActiveSheet(),s=this.parent.element.id,l=n.i(d.I)(e[0],e[1],o),c=["fontWeight","fontStyle","textDecoration","textDecoration"];["bold","italic","line-through","underline","wrap"].forEach(function(n,d){(t=document.getElementById(s+"_"+n))&&(o.isProtected&&!o.protectSettings.formatCells?t.classList.remove("e-active"):"wrap"===n?i=l&&l.wrap:(r=a.getCellStyleValue(c[d],e).toLowerCase(),i=r.indexOf(n)>-1),i?t.classList.add("e-active"):t.classList.contains("e-active")&&t.classList.remove("e-active"))})},e.prototype.refreshFontNameSelection=function(e){e=e.split('"').join(""),this.fontNameDdb.element.firstElementChild.textContent=e;for(var t=0;t<this.fontNameDdb.items.length;t++)if(this.fontNameDdb.items[t].text===e){this.fontNameDdb.items[t].iconCss="e-icons e-selected-icon",t!==this.fontNameIndex&&(this.fontNameDdb.items[this.fontNameIndex].iconCss=""),this.fontNameDdb.setProperties({items:this.fontNameDdb.items},!0),this.fontNameIndex=t;break}["Arial","Arial Black","Axettac Demo","Batang","Book Antiqua","Calibri","Comic Sans MS","Courier","Courier New","Din Condensed","Georgia","Helvetica","Helvetica New","Roboto","Tahoma","Times New Roman","Verdana"].indexOf(e)<0&&(this.fontNameDdb.items[this.fontNameIndex].iconCss=""),this.fontNameDdb.element.setAttribute("aria-label",e)},e.prototype.refreshNumFormatSelection=function(e){for(var t=0;t<this.numFormatDDB.items.length;t++)""!==this.numFormatDDB.items[t].iconCss&&(this.numFormatDDB.items[t].iconCss=""),this.numFormatDDB.items[t].text===e&&(this.numFormatDDB.items[t].iconCss="e-icons e-selected-icon");this.numFormatDDB.element.firstElementChild.textContent=e,this.numFormatDDB.setProperties({items:this.numFormatDDB.items},!0),this.numFormatDDB.element.setAttribute("aria-label",e)},e.prototype.fileMenuItemSelect=function(e){var t=this,r=n.i(l.extend)({cancel:!1},e);this.parent.trigger("fileMenuItemSelect",r);var a,o=this.parent.element.id;if(!r.cancel)switch(e.item.id){case o+"_Open":n.i(l.select)("#"+o+"_fileUpload",this.parent.element).click(),n.i(i._159)(this.parent.element);break;case o+"_Xlsx":case o+"_Xls":case o+"_Csv":case o+"_Pdf":this.parent.notify(p._80,e);break;case o+"_New":a=this.parent.serviceLocator.getService(i._175),a.show({height:200,width:400,isModal:!0,showCloseIcon:!0,content:this.parent.serviceLocator.getService(i._174).getConstant("DestroyAlert"),beforeOpen:function(e){var r={dialogName:"DestroySheetDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",r),r.cancel?e.cancel=!0:n.i(i._159)(t.parent.element)},buttons:[{buttonModel:{content:this.parent.serviceLocator.getService(i._174).getConstant("Ok"),isPrimary:!0},click:function(){a.hide(),t.parent.refresh(!0)}}]})}},e.prototype.toolbarClicked=function(e){if(e.item&&"spreadsheet_find"!==e.item.id){var t=this.parent.element.id,r=this.parent.getActiveSheet(),a=void 0,o=void 0,s=void 0,l=void 0;switch(e.item.id){case t+"_headers":if(a={isShow:!r.showHeaders,sheetIdx:this.parent.activeSheetIndex,cancel:!1},this.parent.notify(i._31,{eventArgs:a,action:"headers"}),a.cancel)return;this.parent.setSheetPropertyOnMute(r,"showHeaders",!r.showHeaders),this.parent.serviceLocator.getService("sheet").showHideHeaders(),this.toggleRibbonItems({props:"Headers",activeTab:this.ribbon.selectedTab});break;case t+"_gridlines":if(o={isShow:!r.showGridLines,sheetIdx:this.parent.activeSheetIndex,cancel:!1},this.parent.notify(i._31,{eventArgs:o,action:"gridLines"}),o.cancel)return;this.parent.setSheetPropertyOnMute(r,"showGridLines",!r.showGridLines),this.toggleRibbonItems({props:"GridLines",activeTab:this.ribbon.selectedTab});break;case t+"_protect":this.parent.notify(i._114,{});break;case t+"_undo":this.parent.notify(i._18,{isUndo:!0});break;case t+"_redo":this.parent.notify(i._18,{isUndo:!1});break;case t+"_freezepanes":s=n.i(d.U)(r.topLeftCell),l=r.frozenRows||r.frozenColumns?s:n.i(d.U)(r.activeCell),this.parent.notify(i._98,{row:l[0]-s[0],column:l[1]-s[1],triggerEvent:!0});break;case t+"_freezerows":this.parent.notify(i._98,{row:r.frozenRows?0:n.i(d.U)(r.activeCell)[0]-n.i(d.U)(r.topLeftCell)[0],column:r.frozenColumns,triggerEvent:!0});break;case t+"_freezecolumns":this.parent.notify(i._98,{row:r.frozenRows,column:r.frozenColumns?0:n.i(d.U)(r.activeCell)[1]-n.i(d.U)(r.topLeftCell)[1],triggerEvent:!0});break;case t+"_protectworkbook":this.parent.password.length>0?this.parent.notify(i._92,null):this.parent.isProtected?(this.parent.isProtected=!1,this.parent.showSheetTabs&&(this.parent.element.querySelector(".e-add-sheet-tab").removeAttribute("disabled"),this.parent.element.querySelector(".e-add-sheet-tab").classList.remove("e-disabled")),this.toggleRibbonItems({props:"Protectworkbook",activeTab:this.ribbon.selectedTab}),this.parent.notify(i._31,{action:"protectWorkbook",eventArgs:{isProtected:!1}})):this.parent.element.querySelector(".e-add-sheet-tab").classList.contains("e-disabled")?this.toggleRibbonItems({props:"Protectworkbook",activeTab:this.ribbon.selectedTab}):this.parent.notify(i._91,null)}this.parent.notify(i.D,e)}},e.prototype.toggleRibbonItems=function(e){var t="",r=this.parent.serviceLocator.getService(i._174).getConstant("View"),a=this.parent.serviceLocator.getService(i._174).getConstant("Data");if(this.ribbon.items[this.ribbon.selectedTab].header.text===r){if(n.i(l.isNullOrUndefined)(e.activeTab))for(var o=0,s=this.ribbon.items.length;o<s;o++)if(this.ribbon.items[o].header.text===r){e.activeTab=o;break}var d=this.getLocaleText(e.props);"GridLines"===e.props&&this.parent.serviceLocator.getService("sheet").toggleGridlines();for(var c=this.parent.element.id+"_"+e.props.toLowerCase(),h=this.ribbon.items[e.activeTab].content.length,o=void 0;o<h;o++)"Separator"!==this.ribbon.items[e.activeTab].content[o].type&&this.ribbon.items[e.activeTab].content[o].id===c&&(this.ribbon.items[e.activeTab].content[o].text=d,this.ribbon.setProperties({items:this.ribbon.items},!0));this.ribbon.items[this.ribbon.selectedTab].header.text===r&&"Protect"!==e.props&&this.updateToggleText(e.props.toLowerCase(),d)}if(this.ribbon.items[this.ribbon.selectedTab].header.text===a){if(n.i(l.isNullOrUndefined)(e.activeTab))for(var o=0,p=this.ribbon.items.length;o<p;o++)if(this.ribbon.items[o].header.text===a){e.activeTab=o;break}var c=this.parent.element.id+"_"+e.props.toLowerCase();if(c===this.parent.element.id+"_protect"){var u=this.ribbon.items[this.ribbon.selectedTab].content.length,f=void 0;for(f=0;f<u&&this.ribbon.items[this.ribbon.selectedTab].content[f].id!==this.parent.element.id+"_protect";f++);t=this.getLocaleProtectText("Sheet",!0)}else if(c===this.parent.element.id+"_protectworkbook"){var g=this.ribbon.items[this.ribbon.selectedTab].content.length,f=void 0;for(f=0;f<g&&this.ribbon.items[this.ribbon.selectedTab].content[f].id!==this.parent.element.id+"_protectworkbook";f++);this.parent.isProtected||this.parent.password.length>0?t=this.getLocaleProtectWorkbook("UnprotectWorkbook"):this.parent.isProtected||(t=this.getLocaleProtectWorkbook("ProtectWorkbook"))}for(var h=this.ribbon.items[e.activeTab].content.length,o=void 0;o<h;o++)"Separator"!==this.ribbon.items[e.activeTab].content[o].type&&this.ribbon.items[e.activeTab].content[o].id===c&&(this.ribbon.items[e.activeTab].content[o].text=t,this.ribbon.setProperties({items:this.ribbon.items},!0));this.ribbon.items[this.ribbon.selectedTab].header.text===a&&this.updateToggleText(e.props.toLowerCase(),t)}},e.prototype.enableFileMenuItems=function(e){this.ribbon.enableMenuItems(e.items,e.enable,e.isUniqueId)},e.prototype.hideRibbonTabs=function(e){this.ribbon.hideTabs(e.tabs,e.hide)},e.prototype.addRibbonTabs=function(e){this.ribbon.addTabs(e.items,e.insertBefore),n.i(l.select)(".e-ribbon .e-tab-header .e-toolbar-item:not(.e-menu-tab).e-hide",this.parent.element)&&this.parent.updateActiveBorder(n.i(l.selectAll)(".e-ribbon .e-tab-header .e-toolbar-item:not(.e-menu-tab)",this.parent.element)[this.ribbon.selectedTab])},e.prototype.updateToggleText=function(e,t){var r=n.i(l.select)("#"+this.parent.element.id+"_"+e+" .e-tbar-btn-text",this.ribbon.element);if("protect"===e||"protectworkbook"===e?r.parentElement.setAttribute("aria-label",t):r.parentElement.setAttribute("aria-label",r.textContent),n.i(i._115)(function(){r&&(r.textContent=t)}),"headers"===e){var a=this.parent.element.getElementsByClassName("e-findtool-dlg")[0];a&&a.classList.contains("e-popup-open")&&this.parent.notify(p._26,{refreshPosition:!0,dialogEle:a})}},e.prototype.refreshViewTabContent=function(e){for(var t,n=this.parent.element.id,r=this.parent.getActiveSheet(),a=this.parent.serviceLocator.getService(i._174),o=0;o<this.ribbon.items[e].content.length;o++)t=this.ribbon.items[e].content[o],"Separator"!==t.type&&(t.id===n+"_headers"&&this.updateViewTabContent(e,"Headers",o),t.id===n+"_gridlines"&&this.updateViewTabContent(e,"GridLines",o),t.id===n+"_freezepanes"&&(r.frozenRows||r.frozenColumns?t.text===a.getConstant("FreezePanes")&&this.updateToggleText("freezepanes",this.updateRibbonItemText("Unfreeze","Panes",o,e)):t.text===a.getConstant("UnfreezePanes")&&this.updateToggleText("freezepanes",this.updateRibbonItemText("Freeze","Panes",o,e))),t.id===n+"_freezerows"&&(r.frozenRows?t.text===a.getConstant("FreezeRows")&&this.updateToggleText("freezerows",this.updateRibbonItemText("Unfreeze","Rows",o,e)):t.text===a.getConstant("UnfreezeRows")&&this.updateToggleText("freezerows",this.updateRibbonItemText("Freeze","Rows",o,e))),t.id===n+"_freezecolumns"&&(r.frozenColumns?t.text===a.getConstant("FreezeColumns")&&this.updateToggleText("freezecolumns",this.updateRibbonItemText("Unfreeze","Columns",o,e)):t.text===a.getConstant("UnfreezeColumns")&&this.updateToggleText("freezecolumns",this.updateRibbonItemText("Freeze","Columns",o,e))))},e.prototype.updateViewTabContent=function(e,t,n){var r=this.parent.getActiveSheet(),a=this.parent.serviceLocator.getService(i._174);r["show"+t]?this.ribbon.items[e].content[n].text===a.getConstant("Show"+t)&&this.updateToggleText(t.toLowerCase(),this.updateRibbonItemText("Hide",t,n,e)):this.ribbon.items[e].content[n].text===a.getConstant("Hide"+t)&&this.updateToggleText(t.toLowerCase(),this.updateRibbonItemText("Show",t,n,e))},e.prototype.updateRibbonItemText=function(e,t,n,r){var a=this.parent.serviceLocator.getService(i._174),o=a.getConstant(e+t);return this.ribbon.items[r].content[n].text=o,this.ribbon.setProperties({items:this.ribbon.items},!0),o},e.prototype.refreshDataTabContent=function(e){for(var t,n=this.parent.element.id,r=0;r<this.ribbon.items[e].content.length;r++)if("Separator"!==this.ribbon.items[e].content[r].type){if(this.ribbon.items[e].content[r].id===n+"_protect"){if(this.updateDataTabContent(e,"Sheet",r),t)break;t=!0}this.ribbon.items[e].content[r].id===n+"_protectworkbook"&&this.updateDataTabContent(e,"Workbook",r)}},e.prototype.updateDataTabContent=function(e,t,n){var r=this.parent.getActiveSheet(),a=this.parent.serviceLocator.getService(i._174);if("Sheet"===t)r.isProtected?this.ribbon.items[e].content[n].text===a.getConstant("Protect"+t)&&(this.ribbon.items[e].content[n].cssClass="e-active",this.updateProtectBtn("Unprotect",t,n,e)):this.updateProtectBtn("Protect",t,n,e);else if("Workbook"===t){var o=this.parent.serviceLocator.getService(i._174);this.parent.isProtected?this.ribbon.items[e].content[n].text===o.getConstant("Protect"+t)&&this.updateToggleText("protectworkbook",this.updateRibbonItemText("Unprotect",t,n,e)):this.ribbon.items[e].content[n].text===o.getConstant("Unprotect"+t)&&this.updateToggleText("protectworkbook",this.updateRibbonItemText("Protect",t,n,e))}},e.prototype.updateProtectBtn=function(e,t,n,r){var a=this.parent.serviceLocator.getService(i._174),o=a.getConstant(e+t);this.ribbon.items[r].content[n].text=o,this.ribbon.setProperties({items:this.ribbon.items},!0),this.updateToggleText("protect",o)},e.prototype.updateProtectWorkbookBtn=function(e,t,n,r){var a=this.parent.serviceLocator.getService(i._174),o=a.getConstant(e);this.ribbon.items[r].content[n].text=o,this.ribbon.setProperties({items:this.ribbon.items},!0),this.updateToggleText("protectworkbook",o)},e.prototype.addToolbarItems=function(e){var t=this.parent.serviceLocator.getService(i._174);this.ribbon.addToolbarItems(t.getConstant(e.tab),e.items,e.index)},e.prototype.enableToolbarItems=function(e){var t=this;e.forEach(function(e){t.ribbon.enableItems(e.tab||t.ribbon.items[t.ribbon.selectedTab].header.text,e.items,e.enable)})},e.prototype.createMobileView=function(){var e=this,t=this.parent.element.id,n=this.parent.createElement("div",{className:"e-header-toolbar"}),r=this.parent.createElement("ul");n.appendChild(r);var i=new a.Toolbar({items:[{prefixIcon:"e-tick-icon",align:"Left",id:t+"focused_tick",cssClass:"e-focused-tick"},{template:r,align:"Right",id:t+"file_menu"}],clicked:function(n){switch(n.item.id){case t+"focused_tick":e.parent.element.classList.remove("e-mobile-focused"),e.parent.renderModule.setSheetPanelSize()}},created:function(){var t=new a.Menu({cssClass:"e-mobile e-file-menu",enableRtl:!0,showItemOnClick:!0,items:e.getRibbonMenuItems(),select:e.fileMenuItemSelect.bind(e),beforeOpen:function(t){t.element.parentElement.classList.remove("e-rtl"),e.fileMenuBeforeOpen(t)},beforeClose:e.fileMenuBeforeClose.bind(e)});t.createElement=e.parent.createElement,t.appendTo(r)}});i.createElement=this.parent.createElement,i.appendTo(n),this.parent.element.insertBefore(n,this.parent.element.firstElementChild),this.renderMobileToolbar()},e.prototype.renderMobileToolbar=function(){var e=this,t=this.parent.createElement("div",{className:"e-toolbar-panel e-ribbon"}),r=this.parent.createElement("div"),o=this.parent.createElement("button",{attrs:{type:"button"}});t.appendChild(r),t.appendChild(o),t.style.display="block",this.parent.element.appendChild(t);var s=new c.DropDownButton({cssClass:"e-caret-hide",content:this.ribbon.items[0].header.text,items:[{text:this.ribbon.items[0].header.text},{text:this.ribbon.items[1].header.text},{text:this.ribbon.items[2].header.text},{text:this.ribbon.items[3].header.text}],createPopupOnClick:!0,select:function(t){t.item.text!==s.content&&(l.element.style.display="none",s.content=t.item.text,s.dataBind(),l.items=e.ribbon.items[s.items.indexOf(t.item)+1].content,l.width="calc(100% - "+o.getBoundingClientRect().width+"px)",l.element.style.display="",l.dataBind(),l.items[0].text=t.item.text,l.dataBind())},open:function(e){var t=e.element.parentElement,r=t.getBoundingClientRect(),i=n.i(h.calculatePosition)(s.element,"right","bottom");t.style.left=i.left-r.width+"px",t.style.top=i.top-r.height+"px";for(var a=0;a<s.items.length;a++)if(s.content===s.items[a].text){e.element.children[a].classList.add("e-selected");break}},close:function(){return n.i(i._159)(e.parent.element)}});s.createElement=this.parent.createElement,s.appendTo(o);var l=new a.Toolbar({width:"calc(100% - "+o.getBoundingClientRect().width+"px)",items:this.ribbon.items[0].content,clicked:this.toolbarClicked.bind(this)});l.createElement=this.parent.createElement,l.appendTo(r),t.style.display=""},e.prototype.fileMenuBeforeOpen=function(e){var t,n=this,r=this.parent.serviceLocator.getService(i._174),a=[".xlsx",".xls",".csv",".pdf"];e.parentItem.text===r.getConstant("SaveAs")&&[].slice.call(e.element.children).forEach(function(e,r){t=n.parent.createElement("div",{innerHTML:e.innerHTML}),e.innerHTML="";var i=n.parent.createElement("span",{className:"e-extension"});i.innerText=a[r],t.appendChild(i),e.appendChild(t)}),this.parent.trigger("fileMenuBeforeOpen",e),e.element.setAttribute("aria-label",this.parent.serviceLocator.getService(i._174).getConstant("File"))},e.prototype.enableRibbonTabs=function(e){this.ribbon.enableTabs(e.tabs,e.enable)},e.prototype.fileMenuBeforeClose=function(e){var t=this;this.parent.trigger("fileMenuBeforeClose",e),e.parentItem&&e.event&&37===e.event.keyCode&&e.parentItem.id===this.parent.element.id+"_File"&&n.i(i._115)(function(){var e=t.ribbon.element.querySelector(".e-tab-header .e-toolbar-item .e-tab-wrap");if(e){n.i(i._159)(e);var r=e.querySelector(".e-menu-item.e-focused");r&&r.classList.remove("e-focused")}})},e.prototype.hideFileMenuItems=function(e){this.ribbon.hideMenuItems(e.items,e.hide,e.isUniqueId)},e.prototype.addFileMenuItems=function(e){this.ribbon.addMenuItems(e.items,e.text,e.insertAfter,e.isUniqueId)},e.prototype.hideToolbarItems=function(e){this.ribbon.hideToolbarItems(e.tab,e.indexes,e.hide)},e.prototype.protectSheetHandler=function(e){var t=this.parent.getActiveSheet(),n=this.parent.serviceLocator.getService(i._174);t.isProtected&&t.protectSettings.formatCells||!t.isProtected?(this.parent.allowCellFormatting?this.enableToolbarItems([{tab:n.getConstant("Home"),items:e.enableHomeBtnId,enable:!0}]):this.enableToolbarItems([{tab:n.getConstant("Home"),items:e.enableHomeBtnId.slice(2,14),enable:!1}]),this.parent.allowWrap||this.enableToolbarItems([{tab:n.getConstant("Home"),items:e.enableHomeBtnId.slice(14,15),enable:!1}]),this.parent.allowNumberFormatting||this.enableToolbarItems([{tab:n.getConstant("Home"),items:e.enableHomeBtnId.slice(2,3),enable:!1}]),this.parent.notify(i._51,null)):this.enableToolbarItems([{tab:n.getConstant("Home"),items:e.disableHomeBtnId,enable:!1}]),t.isProtected&&t.protectSettings.insertLink||!t.isProtected?!this.parent.allowHyperlink||t.isProtected&&t.protectSettings.insertLink?this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.enableInsertBtnId.slice(0,1),enable:!1}]):this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.enableInsertBtnId,enable:!0}]):this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.enableInsertBtnId,enable:!1}]),this.enableToolbarItems([{tab:n.getConstant("Home"),items:e.findBtnId,enable:!t.isProtected||t.protectSettings.selectCells||t.protectSettings.selectUnLockedCells}]);var r,a=this.ribbon.items[this.ribbon.selectedTab].content.length;for(r=0;r<a&&this.ribbon.items[this.ribbon.selectedTab].content[r].id!==this.parent.element.id+"_protectworkbook";r++);t.isProtected?(this.parent.isProtected&&this.parent.element.querySelector("#"+this.parent.element.id+"_protectworkbook")&&this.parent.element.querySelector("#"+this.parent.element.id+"_protectworkbook").querySelector(".e-tbar-btn-text").textContent===n.getConstant("UnprotectWorkbook")?this.ribbon.items[this.ribbon.selectedTab].header.text===n.getConstant("Data")&&(this.ribbon.items[this.ribbon.selectedTab].content[r].text=n.getConstant("UnprotectWorkbook")):this.ribbon.items[this.ribbon.selectedTab].header.text===n.getConstant("Data")&&(this.ribbon.items[this.ribbon.selectedTab].content[r].text=n.getConstant("ProtectWorkbook")),this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.imageBtnId,enable:!1}]),this.enableToolbarItems([{tab:n.getConstant("Data"),items:e.dataValidationBtnId,enable:!1}]),this.enableToolbarItems([{tab:n.getConstant("Formulas"),items:e.enableFrmlaBtnId,enable:!1}]),this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.chartBtnId,enable:!1}])):(this.parent.isProtected&&this.parent.element.querySelector("#"+this.parent.element.id+"_protectworkbook")&&this.parent.element.querySelector("#"+this.parent.element.id+"_protectworkbook").querySelector(".e-tbar-btn-text").textContent===n.getConstant("UnprotectWorkbook")?this.ribbon.items[this.ribbon.selectedTab].header.text===n.getConstant("Data")&&(this.ribbon.items[this.ribbon.selectedTab].content[r].text=n.getConstant("UnprotectWorkbook")):this.ribbon.items[this.ribbon.selectedTab].header.text===n.getConstant("Data")&&(this.ribbon.items[this.ribbon.selectedTab].content[r].text=n.getConstant("ProtectWorkbook")),this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.imageBtnId,enable:this.parent.allowImage}]),this.enableToolbarItems([{tab:n.getConstant("Data"),items:e.dataValidationBtnId,enable:this.parent.allowDataValidation}]),this.enableToolbarItems([{tab:n.getConstant("Formulas"),items:e.enableFrmlaBtnId,enable:!0}]),this.enableToolbarItems([{tab:n.getConstant("Insert"),items:e.chartBtnId,enable:this.parent.allowChart}]))},e.prototype.updateMergeItem=function(e){if("mousemove"===e.type||"pointermove"===e.type||"touchmove"===e.type||e.shiftKey&&("mousedown"===e.type||"touchend"===e.type)){var t=n.i(p.l)(this.parent.getActiveSheet().selectedRange);t[1]===t[3]&&t[0]===t[2]||this.parent.getActiveSheet().isProtected||!this.parent.allowMerge||(this.enableToolbarItems([{tab:this.parent.serviceLocator.getService(i._174).getConstant("Home"),items:[this.parent.element.id+"_merge_cells"],enable:!0}]),this.toggleActiveState(!1))}},e.prototype.onPropertyChanged=function(e){var t=this.parent.serviceLocator.getService(i._174),n=this.parent.element.id;switch(e){case"allowFreezePane":this.ribbon.enableItems(t.getConstant("View"),[n+"_freezepanes",n+"_freezerows",n+"_freezecolumns"],this.parent.allowFreezePane);break;case"showRibbon":this.parent.showRibbon?this.initialize(!0):this.ribbon&&this.destroy();break;case"allowImage":this.ribbon.enableItems(t.getConstant("Insert"),[n+"_image"],this.parent.allowImage);break;case"allowChart":this.ribbon.enableItems(t.getConstant("Insert"),[n+"_chart"],this.parent.allowChart),this.parent.allowChart||this.removeDesignChart()}},e.prototype.addEventListener=function(){this.parent.on(i.b,this.ribbonOperation,this),this.parent.on(i.F,this.enableToolbarItems,this),this.parent.on(p.Q,this.refreshRibbonContent,this),this.parent.on(i._10,this.toggleRibbonItems,this),this.parent.on(i.S,this.enableFileMenuItems,this),this.parent.on(i.V,this.hideRibbonTabs,this),this.parent.on(i.X,this.addRibbonTabs,this),this.parent.on(i.Y,this.addToolbarItems,this),this.parent.on(i.T,this.hideFileMenuItems,this),this.parent.on(i.U,this.addFileMenuItems,this),this.parent.on(i.Z,this.hideToolbarItems,this),this.parent.on(i.W,this.enableRibbonTabs,this),this.parent.on(i._45,this.protectSheetHandler,this),this.parent.on(d._148,this.updateMergeItem,this),this.parent.on(p._81,this.refreshRibbonContent,this),this.parent.on(i._86,this.insertDesignChart,this),this.parent.on(i._87,this.removeDesignChart,this),this.parent.on(p._82,this.unMerge,this)},e.prototype.destroy=function(){var e=this.parent.element,t=this.ribbon?this.ribbon.element:null,r=this.cPickerEle,a=e.id;["bold","italic","line-through","underline"].forEach(function(t){n.i(i._142)(n.i(l.select)("#"+a+"_"+t,e),u.Button)}),this.pasteSplitBtn&&this.pasteSplitBtn.destroy(),this.pasteSplitBtn=null,this.mergeSplitBtn&&this.mergeSplitBtn.destroy(),this.mergeSplitBtn=null,this.numFormatDDB&&this.numFormatDDB.destroy(),this.numFormatDDB=null,this.fontSizeDdb&&this.fontSizeDdb.destroy(),this.fontSizeDdb=null,this.fontNameDdb&&this.fontNameDdb.destroy(),this.fontNameDdb=null,this.textAlignDdb&&this.textAlignDdb.destroy(),this.textAlignDdb=null,this.verticalAlignDdb&&this.verticalAlignDdb.destroy(),this.verticalAlignDdb=null,this.sortingDdb&&this.sortingDdb.destroy(),this.sortingDdb=null,this.clearDdb&&this.clearDdb.destroy(),this.clearDdb=null,this.colorPicker&&this.colorPicker.destroy(),this.colorPicker=null,this.destroyComponent(a+"_borders_menu","menu"),this.bordersDdb&&this.bordersDdb.destroy(),this.bordersDdb=null,this.findDdb&&this.findDdb.destroy(),this.findDdb=null,this.destroyComponent(a+"_chart_menu","menu"),this.destroyComponent(a+"_chart_type_menu","menu"),this.destroyComponent(a+"_chart-btn","dropdown-btn"),this.destroyComponent(a+"_chart-type-btn","dropdown-btn"),this.destroyComponent(a+"_cf_menu","menu"),this.cfDdb&&this.cfDdb.destroy(),this.cfDdb=null,this.detachPopupElement(a),this.parent.notify("destroyRibbonComponents",null),this.ribbon&&this.ribbon.destroy(),t&&n.i(l.detach)(t),this.ribbon=null,r&&n.i(l.detach)(r),this.cPickerEle=null,this.datavalidationDdb&&this.datavalidationDdb.destroy(),this.datavalidationDdb=null,this.border&&(this.border=""),this.fontNameIndex&&(this.fontNameIndex=null),this.preTabIdx&&(this.preTabIdx=null),this.numPopupWidth&&(this.numPopupWidth=null),this.removeEventListener(),this.parent=null},e.prototype.destroyComponent=function(e,t){var r="string"==typeof e?document.getElementById(e):e;if(r){if("menu"!==t||r.childElementCount){var i=n.i(l.getComponent)(r,t);if(i&&(i.destroy(),"dropdown-btn"===t)){var a=document.getElementById(r.id+"-popup");a&&n.i(l.detach)(a)}}"menu"===t&&n.i(l.detach)(r)}},e.prototype.detachPopupElement=function(e){["_conditionalformatting","_chart-type-btn","_chart-btn","_borders"].forEach(function(t){var r=document.getElementById(""+e+t+"-popup");r&&n.i(l.detach)(r)})},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.b,this.ribbonOperation),this.parent.off(i.F,this.enableToolbarItems),this.parent.off(p.Q,this.refreshRibbonContent),this.parent.off(i._10,this.toggleRibbonItems),this.parent.off(i.S,this.enableFileMenuItems),this.parent.off(i.V,this.hideRibbonTabs),this.parent.off(i.X,this.addRibbonTabs),this.parent.off(i.Y,this.addToolbarItems),this.parent.off(i.T,this.hideFileMenuItems),this.parent.off(i.U,this.addFileMenuItems),this.parent.off(i.Z,this.hideToolbarItems),this.parent.off(i.W,this.enableRibbonTabs),this.parent.off(i._45,this.protectSheetHandler),this.parent.off(d._148,this.updateMergeItem),this.parent.off(p._81,this.refreshRibbonContent),this.parent.off(i._86,this.insertDesignChart),this.parent.off(i._87,this.removeDesignChart),this.parent.off(p._82,this.unMerge),this.parent.off(p._79))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(5),i=n(6),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i.t,this.initiateSave,this),this.parent.on(i.v,this.saveCompleted,this),this.parent.on(i._40,this.showErrorDialog,this),this.parent.on(i._55,this.exportDialog,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.t,this.initiateSave),this.parent.off(i.v,this.saveCompleted),this.parent.off(i._40,this.showErrorDialog),this.parent.off(i._55,this.exportDialog))},e.prototype.getModuleName=function(){return"save"},e.prototype.initiateSave=function(){this.parent.showSpinner()},e.prototype.saveCompleted=function(){this.parent.hideSpinner()},e.prototype.showErrorDialog=function(e){var t=this;this.parent.serviceLocator.getService(r._175).show({isModal:!0,showCloseIcon:!0,height:180,width:400,content:e.content,beforeOpen:function(){return n.i(r._159)(t.parent.element)}})},e.prototype.exportDialog=function(e){var t=this,i=this.parent.serviceLocator.getService(r._174),o=this.parent.serviceLocator.getService(r._175),s=e?e.item.id.split(this.parent.element.id+"_")[1]:"xlsx";if(n.i(a.isNullOrUndefined)(this.parent.element.querySelector(".e-find-dlg"))){var l={isModal:!0,showCloseIcon:!0,cssClass:"e-open-dlg",header:i.getConstant("SaveAs"),beforeOpen:function(e){var a={dialogName:i.getConstant("SaveAs"),element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",a),a.cancel&&(e.cancel=!0),o.dialogInstance.content=t.OpenContent(s),o.dialogInstance.dataBind(),t.parent.element.querySelector(".e-text-open").setSelectionRange(0,t.parent.element.querySelector(".e-text-open").value.length),n.i(r._159)(t.parent.element)},buttons:[{buttonModel:{content:i.getConstant("Save"),isPrimary:!0,cssClass:"e-btn-open-ok"},click:function(){var i=t.parent.element.querySelector(".e-text-open").value;if(t.checkValidName(i)){o.hide();var s=e?e.item.id.split(t.parent.element.id+"_")[1]:"Xlsx";t.parent.save({saveType:s,fileName:i})}else{var l=t.parent.element.querySelector(".e-btn-open-ok");n.i(a.getComponent)(l,"btn").disabled=!0;var d=t.parent.serviceLocator.getService(r._174),c=0===i.length?d.getConstant("EmptyFileName"):i.length>218?d.getConstant("LargeName"):d.getConstant("FileNameError"),h=t.parent.createElement("span",{className:"e-file-alert-span"});h.innerText=c,t.parent.element.querySelector(".e-file-alert-span")&&t.parent.element.querySelector(".e-file-alert-span").remove(),t.parent.element.querySelector(".e-open-dlg").querySelector(".e-dlg-content").appendChild(h)}}}],close:function(){o.hide()}};o.show(l)}else o.hide()},e.prototype.checkValidName=function(e){var t=!0;return(e.match(new RegExp('.*[\\[\\]\\*\\\\/\\?\\:\\<\\>\\|\\"].*'))||e.length<1||e.length>218)&&(t=!1),t},e.prototype.OpenContent=function(e){var t=this,i=this.parent.serviceLocator.getService(r._174),o=this.parent.createElement("div",{className:"e-open-dialog"}),s=this.parent.createElement("div",{className:"e-open-head"}),l=this.parent.createElement("div",{className:"e-input-group"});o.appendChild(s),o.appendChild(l);var d=i.getConstant("FileName"),c=this.parent.element.id+"_filename",h=this.parent.createElement("p",{className:"e-header",id:c,attrs:{"aria-label":i.getConstant("SaveAs")+" "+d}});h.innerText=d;var p=this.parent.createElement("input",{className:"e-input e-text-open",attrs:{type:"Text","aria-labelledby":c}}),u=this.parent.createElement("span",{className:"e-input-group-icon"});return p.onkeyup=function(e){if(t.parent.element.querySelector(".e-file-alert-span")&&13!==e.keyCode){var r=t.parent.element.querySelector(".e-btn-open-ok");n.i(a.getComponent)(r,"btn").disabled=!1,t.parent.element.querySelector(".e-file-alert-span").remove()}},s.appendChild(h),u.textContent="."+e.toLowerCase(),l.appendChild(p),p.setAttribute("value","Sample"),l.appendChild(u),o},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(8),i=(n.n(r),n(1)),a=n(0),o=n(30),s=(n.n(o),n(12)),l=(n.n(s),n(3)),d=(n.n(l),n(2)),c=n(2),h=function(){function e(e){this.aggregateContent="",this.selaggregateCnt="Sum",this.parent=e,this.addEventListener()}return e.prototype.getModuleName=function(){return"sheetTabs"},e.prototype.createSheetTabs=function(){var e=this;if(!this.parent.showSheetTabs&&this.tabInstance)return void this.destroy();var t=this.parent.serviceLocator.getService(i._174),s=this.parent.createElement("div",{className:"e-sheet-tab-panel",id:this.parent.element.id+"_sheet_tab_panel"}),c=this.parent.createElement("button",{className:"e-add-sheet-tab e-btn e-css e-flat e-icon-btn"+(this.parent.allowInsert?"":" e-disabled"),attrs:{title:t.getConstant("AddSheet"),type:"button"}});c.appendChild(this.parent.createElement("span",{className:"e-btn-icon e-icons e-add-icon"})),c.addEventListener("click",this.addSheetTab.bind(this)),c.disabled=!this.parent.allowInsert,s.appendChild(c),this.addBtnRipple=n.i(l.rippleEffect)(s,{selector:".e-add-sheet-tab"});var h=this.parent.createElement("button",{attrs:{title:t.getConstant("ListAllSheets"),type:"button"}});s.appendChild(h),this.parent.element.appendChild(s);var p=this.getSheetTabItems();this.dropDownInstance=new o.DropDownButton({iconCss:"e-icons",items:p.ddbItems,createPopupOnClick:!0,beforeItemRender:function(t){var n=e.parent.sheets[e.dropDownInstance.items.indexOf(t.item)];"Hidden"===n.state?t.element.classList.add("e-hide"):"VeryHidden"===n.state&&(t.element.style.display="none")},select:function(t){return e.updateSheetTab({idx:e.dropDownInstance.items.indexOf(t.item)})},beforeOpen:function(n){return e.beforeOpenHandler(e.dropDownInstance,n.element,t.getConstant("ListAllSheets"))},open:function(t){return e.openHandler(e.dropDownInstance,t.element,"left")},cssClass:"e-sheets-list e-flat e-caret-hide",close:function(){return e.focusTab(e.tabInstance.element)}}),this.dropDownInstance.createElement=this.parent.createElement,this.dropDownInstance.appendTo(h);var u,f=this.parent.createElement("div",{className:"e-sheet-tab"});this.tabInstance=new r.Tab({selectedItem:this.parent.activeSheetIndex,overflowMode:"Scrollable",items:p.tabItems,scrollStep:250,selecting:function(t){if(t.selectingIndex!==t.selectedIndex)if(u)u=!1;else{var n={currentSheetIndex:t.selectingIndex,previousSheetIndex:t.selectedIndex,cancel:!1};e.parent.notify(a._34,{eventArgs:n,action:"gotoSheet"}),u=n.cancel}},selected:function(t){t.isInteracted||(t.preventFocus=!0),e.goToSheet(t,u,!0)},created:function(){var t=e.tabInstance.element.querySelector(".e-toolbar-items");t.classList.add("e-sheet-tabs-items"),l.EventHandler.add(t,"dblclick",e.renameSheetTab,e)}}),s.appendChild(f),this.tabInstance.createElement=this.parent.createElement,this.tabInstance.appendTo(f),l.EventHandler.remove(this.tabInstance.element,"keydown",this.tabInstance.spaceKeyDown);for(var g,m=p.tabItems.length,v=0;v<m;v++){g=n.i(a.l)(this.parent,v);var y={action:"addSheet",sheetName:"Sheet"+g.id,sheetId:g.id,visibleName:g.name};this.parent.notify(d.j,y)}this.parent.notify(d.j,{action:"initiateDefinedNames"}),this.parent.notify(i._42,null)},e.prototype.goToSheet=function(e,t,r){var a=this;if(e.selectedIndex!==e.previousIndex){if(t)return this.tabInstance.selectedItem=e.previousIndex,this.tabInstance.dataBind(),void n.i(i._159)(this.parent.element);if(this.parent.notify(i._87,{}),this.parent.isEdit){var o=window.getSelection(),s={action:"getCurrentEditValue",editedValue:""};this.parent.notify(i.j,s);var l=!!s.editedValue&&n.i(d.k)(s.editedValue,!0);!l&&o&&o.focusNode&&o.focusNode.classList&&o.focusNode.classList.contains("e-formula-bar-panel")&&(l=n.i(d.k)(this.parent.element.querySelector(".e-formula-bar").value,!0)),l||this.parent.endEdit()}this.parent.activeSheetIndex=e.selectedIndex,this.parent.dataBind(),this.updateDropDownItems(e.selectedIndex,e.previousIndex);var c={action:"registerGridInCalc",sheetID:(e.selectedIndex+1).toString()};this.parent.notify(d.j,c),r&&(this.parent.notify(i._31,{eventArgs:{previousSheetIndex:e.previousIndex,currentSheetIndex:e.selectedIndex},action:"gotoSheet"}),n.i(i._115)(function(){return n.i(i._159)(a.parent.element)}))}},e.prototype.updateDropDownItems=function(e,t){t>-1&&(this.dropDownInstance.items[t].iconCss=""),this.dropDownInstance.items[e].iconCss="e-selected-icon e-icons",this.dropDownInstance.setProperties({items:this.dropDownInstance.items},!0)},e.prototype.beforeOpenHandler=function(e,t,n){var r=this.parent.viewport.height;parseInt(getComputedStyle(t.firstElementChild).height,10)*e.items.length+2*parseInt(getComputedStyle(t).paddingTop,10)>r&&(t.style.height=r+"px",t.style.overflowY="auto"),t.parentElement.style.visibility="hidden",n&&t.setAttribute("aria-label",n)},e.prototype.openHandler=function(e,t,r){var a,o=t.parentElement;if(-1===n.i(s.isCollide)(o).indexOf("bottom")){a="auto"===t.style.overflowY?this.parent.viewport.height:o.getBoundingClientRect().height;var l=n.i(s.calculatePosition)(e.element,r,"top");"right"===r&&(l.left-=o.getBoundingClientRect().width),o.style.left=l.left+"px",o.style.top=l.top-a+"px"}o.style.visibility="",n.i(i._159)(t)},e.prototype.getSheetTabItems=function(){var e,t=this,r=[],i=[];return this.parent.sheets.forEach(function(o,s){e=n.i(a.p)(t.parent,s).replace(/</g,"<").replace(/>/g,">"),r.push({header:{text:e},visible:"Visible"===o.state}),i.push({text:e,iconCss:s===t.parent.activeSheetIndex?"e-selected-icon e-icons":""})}),{tabItems:r,ddbItems:i}},e.prototype.refreshSheetTab=function(){var e=this.getSheetTabItems();this.dropDownInstance.items=e.ddbItems,this.dropDownInstance.setProperties({items:this.dropDownInstance.items},!0),this.tabInstance.items=e.tabItems,this.tabInstance.selectedItem=this.parent.activeSheetIndex,this.tabInstance.dataBind()},e.prototype.addSheetTab=function(){this.parent.notify(c.J,{model:this.parent,start:this.parent.activeSheetIndex+1,end:this.parent.activeSheetIndex+1,modelType:"Sheet",isAction:!0,activeSheetIndex:this.parent.activeSheetIndex+1})},e.prototype.insertSheetTab=function(e){this.parent.notify(i._87,{}),e.preventUpdate&&e.startIdx!==this.tabInstance.selectedItem||(this.dropDownInstance.items[this.tabInstance.selectedItem].iconCss="");for(var t=e.startIdx;t<=e.endIdx;t++){var n=this.parent.sheets[t].name.replace(/</g,"<").replace(/>/g,">");this.dropDownInstance.items.splice(t,0,{text:n}),this.tabInstance.addTab([{header:{text:n},content:""}],t)}e.preventUpdate&&e.startIdx!==this.tabInstance.selectedItem||(this.dropDownInstance.items[e.startIdx].iconCss="e-selected-icon e-icons"),this.dropDownInstance.setProperties({items:this.dropDownInstance.items},!0),e.preventUpdate?e.startIdx!==this.tabInstance.selectedItem&&this.refreshSheetTab():this.updateSheetTab({idx:e.startIdx,preventDataBind:!0})},e.prototype.updateSheetTab=function(e){if("activeSheetChanged"===e.name)e.idx=this.parent.skipHiddenSheets(e.idx);else if("Hidden"===this.parent.sheets[e.idx].state){if(this.parent.isProtected)return;this.showSheet({sheetIndex:e.idx,triggerEvent:!0})}this.tabInstance.selectedItem=e.idx,e.preventDataBind||this.tabInstance.dataBind(),this.parent.notify(i._42,null)},e.prototype.showSheet=function(e){this.parent.setSheetPropertyOnMute(this.parent.sheets[e.sheetIndex],"state","Visible"),this.tabInstance.hideTab(e.sheetIndex,!1),e.triggerEvent&&this.parent.notify(i._31,{action:"showSheet",eventArgs:{sheetIndex:e.sheetIndex}})},e.prototype.switchSheetTab=function(e){var t=n.i(l.closest)(e.event.target,".e-toolbar-item");if(t){for(var r=t.querySelector(".e-tab-text").textContent,i=[],a=this.parent.element.id+"_cmenu",o=0,s=this.parent.sheets.length;o<s;o++)if(this.parent.sheets[o].name===r){this.parent.activeSheetIndex!==o&&this.updateSheetTab({idx:o});break}e.element.classList.contains("e-contextmenu")&&e.items[0]&&e.items[0].id===this.parent.element.id+"_cmenu_insert_sheet"&&(1===this.skipHiddenSheets()&&i.push(a+"_hide_sheet",a+"_delete_sheet"),this.parent.allowInsert&&!this.parent.isProtected||i.push(a+"_insert_sheet"),!this.parent.allowDelete&&i.indexOf(a+"_delete_sheet")>-1&&i.push(a+"_delete_sheet")),(this.parent.password.length>0||this.parent.isProtected)&&(i.indexOf(a+"_insert_sheet")>-1&&i.push(a+"_insert_sheet"),i.indexOf(a+"_delete_sheet")>-1&&i.push(a+"_delete_sheet"),i.push(a+"_duplicate",a+"_rename",a+"_hide_sheet",a+"_delete_sheet",a+"_insert_sheet",a+"_move_left",a+"_move_right")),this.parent.enableContextMenuItems(i,!1,!0)}},e.prototype.skipHiddenSheets=function(){var e=this.parent.sheets.length;return this.parent.sheets.forEach(function(t){"Visible"!==t.state&&--e}),e},e.prototype.renameSheetTab=function(){var e=this.tabInstance.element.querySelector(".e-toolbar-item.e-active");if(e){e=e.querySelector(".e-text-wrap");var t=e.querySelector(".e-tab-text").textContent,r={eventArgs:{name:t,index:this.parent.getActiveSheet().id},action:"renameSheet",cancel:!1};if(this.parent.trigger("actionBegin",r),r.cancel||this.parent.isProtected)return;var i=this.parent.createElement("input",{id:this.parent.element.id+"_rename_input",className:"e-input e-sheet-rename",styles:"width: "+e.getBoundingClientRect().width+"px",attrs:{type:"text",name:"Rename",required:"",value:t,spellcheck:"false",maxlength:"31"}});e.firstElementChild.style.display="none",e.appendChild(i),l.EventHandler.add(document,"mousedown touchstart",this.renameInputFocusOut,this),l.EventHandler.add(i,"keydown",this.renameKeyDown,this),l.EventHandler.add(i,"input",this.updateWidth,this),i.focus(),i.setSelectionRange(0,t.length),l.EventHandler.remove(n.i(l.closest)(e,".e-toolbar-items"),"dblclick",this.renameSheetTab)}},e.prototype.updateWidth=function(e){var t=e.target,n=t.value.length,r=t.value.split(" ");if(r.length){var i=r.length-1;n-=i,n+=.5*i}t.style.width=n+"ch"},e.prototype.renameKeyDown=function(e){32===e.keyCode?e.stopPropagation():27===e.keyCode?(this.removeRenameInput(e.target),this.focusTab(this.tabInstance.element)):13===e.keyCode&&this.renameInputFocusOut(e)},e.prototype.renameInputFocusOut=function(e){var t=e.target;if("mousedown"!==e.type&&"touchstart"!==e.type||!t.classList.contains("e-sheet-rename")&&!n.i(l.closest)(t,".e-dlg-container")){t=document.getElementById(this.parent.element.id+"_rename_input");var r=t.value,a=this.parent.serviceLocator.getService(i._174);if(r){var o=this.tabInstance.selectedItem;if(r.match(new RegExp(".*[\\[\\]\\*\\\\/\\?].*")))this.showRenameDialog(t,a.getConstant("SheetRenameInvalidAlert"));else{if(this.parent.sheets[o].name!==r)for(var s=0,d=this.parent.sheets.length;s<d;s++)if(s!==this.parent.activeSheetIndex&&this.parent.sheets[s].name.toLowerCase()===r.toLowerCase())return void this.showRenameDialog(t,a.getConstant("SheetRenameAlreadyExistsAlert"));var c=this.removeRenameInput(t);this.parent.sheets[o].name!==r&&(this.parent.setSheetPropertyOnMute(this.parent.sheets[o],"name",r),this.updateSheetName({value:r,idx:o,items:c})),"keydown"===e.type?this.focusTab(c):n.i(l.closest)(e.target,".e-spreadsheet")&&n.i(i._159)(this.parent.element)}}else this.showRenameDialog(t,a.getConstant("SheetRenameEmptyAlert"));this.parent.notify(i._31,{eventArgs:{index:this.parent.getActiveSheet().id,value:r},action:"renameSheet"})}},e.prototype.focusTab=function(e){n.i(i._159)(n.i(l.select)(".e-toolbar-item.e-active .e-tab-wrap",e))},e.prototype.updateSheetName=function(e){var t=this.tabInstance.items[e.idx].header.text.replace(/</g,"<").replace(/>/g,">"),n=e.value.replace(/</g,"<").replace(/>/g,">");this.tabInstance.items[e.idx].header.text=n,this.dropDownInstance.items[e.idx].text=n,this.dropDownInstance.setProperties({items:this.dropDownInstance.items},!0);var r=e.items.querySelectorAll(".e-toolbar-item")[e.idx].querySelector(".e-tab-text");if(r.textContent="",r.appendChild(document.createTextNode(e.value)),e.value.indexOf(" ")>-1?this.tabInstance.setProperties({items:this.tabInstance.items},!0):this.tabInstance.dataBind(),this.parent.notify(d.j,{action:"renameUpdation",value:e.value,pName:t}),this.parent.allowChart){var i;this.parent.chartColl.forEach(function(n){n.range.includes("!")&&(i=n.range.split("!"),i[0].toLowerCase()===t.toLowerCase()&&(i[0]=e.value,n.range=i.join("!")))})}},e.prototype.hideSheet=function(e){var t={action:"hideSheet",eventArgs:{sheetIndex:e.sheetIndex,cancel:!1}};e.triggerEvent&&(this.parent.notify(a._34,t),t.eventArgs.cancel)||(this.parent.setSheetPropertyOnMute(n.i(a.l)(this.parent,e.sheetIndex),"state","Hidden"),this.tabInstance.hideTab(e.sheetIndex),e.triggerEvent&&(delete t.eventArgs.cancel,this.parent.notify(i._31,t)))},e.prototype.removeRenameInput=function(e){var t=e.parentElement.querySelector(".e-tab-text"),r=n.i(l.closest)(e,".e-toolbar-items");return l.EventHandler.add(r,"dblclick",this.renameSheetTab,this),l.EventHandler.remove(document,"mousedown touchstart",this.renameInputFocusOut),l.EventHandler.remove(e,"keydown",this.renameKeyDown),l.EventHandler.remove(e,"input",this.updateWidth),n.i(l.remove)(e),t.style.display="",r},e.prototype.showRenameDialog=function(e,t){var n=this;this.parent.serviceLocator.getService(i._175).show({height:180,width:400,isModal:!0,showCloseIcon:!0,content:t,beforeOpen:function(r){var a={dialogName:"SheetRenameDialog",element:r.element,target:r.target,cancel:r.cancel};n.parent.trigger("dialogBeforeOpen",a),a.cancel&&(r.cancel=!0),r.element.querySelector(".e-footer-content .e-primary").setAttribute("aria-label",t+" "+n.parent.serviceLocator.getService(i._174).getConstant("Ok")),e.focus()},close:function(){return e.setSelectionRange(0,e.value.length)}})},e.prototype.focusRenameInput=function(){var e=document.getElementById(this.parent.element.id+"_rename_input");e&&e.focus()},e.prototype.removeSheetTab=function(e){var t=this;if(!e.count||e.count!==this.parent.sheets.length){var r=this.parent.serviceLocator.getService(i._174);if(this.skipHiddenSheets()>1){var o=e.sheetName?n.i(a.l)(this.parent,n.i(a.e)(this.parent,e.sheetName)):this.parent.getActiveSheet(),s=n.i(l.isNullOrUndefined)(e.index)?n.i(a.e)(this.parent,o.name):e.index,c={index:s,sheetCount:this.parent.sheets.length,sheetName:o.name};if(!(!o.rows||!o.rows.length)&&(1!==o.rows.length||!(!o.rows[0].cells||!o.rows[0].cells.length))){var h=this.parent.serviceLocator.getService(i._175);e.clicked?this.forceDelete(s):h.show({height:200,width:400,isModal:!0,showCloseIcon:!0,cssClass:"e-delete-sheet-dlg",content:r.getConstant("DeleteSheetAlert"),beforeOpen:function(e){var a={dialogName:"DeleteSheetDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",a),a.cancel&&(e.cancel=!0),e.element.querySelector(".e-footer-content .e-primary").setAttribute("aria-label",r.getConstant("DeleteSheetAlert")+" "+r.getConstant("Ok")),n.i(i._159)(t.parent.element)},buttons:[{buttonModel:{content:r.getConstant("Ok"),isPrimary:!0},click:function(){h.hide(),t.forceDelete(s),t.parent.notify(i._22,null),e&&!e.isAction&&(c.sheetCount=t.parent.sheets.length,t.parent.notify(i._31,{eventArgs:c,action:"removeSheet"}))}}]})}else this.parent.notify(d.j,{action:"deleteSheetTab",sheetId:n.i(a.l)(this.parent,s).id}),this.destroySheet(s),this.parent.notify(i._22,null),e&&!e.isAction&&(c.sheetCount=this.parent.sheets.length,this.parent.notify(i._31,{eventArgs:c,action:"removeSheet"}))}else this.parent.serviceLocator.getService(i._175).show({height:180,width:400,isModal:!0,showCloseIcon:!0,content:r.getConstant("DeleteSingleLastSheetAlert"),beforeOpen:function(e){var n={dialogName:"DeleteSingleSheetDialog",element:e.element,target:e.target,cancel:e.cancel};t.parent.trigger("dialogBeforeOpen",n),n.cancel&&(e.cancel=!0)}})}},e.prototype.forceDelete=function(e){this.parent.notify(i._87,{}),this.parent.notify(d.j,{action:"deleteSheetTab",sheetId:n.i(a.l)(this.parent,e).id}),this.destroySheet(e)},e.prototype.destroySheet=function(e){var t=n.i(l.isNullOrUndefined)(e)?this.parent.activeSheetIndex:e;this.parent.removeSheet(t),this.parent.notify(d._65,{sheetIndex:t}),this.dropDownInstance.items.splice(t,1),this.dropDownInstance.setProperties({items:this.dropDownInstance.items},!0),this.tabInstance.removeTab(t);var r=this.parent.skipHiddenSheets(this.tabInstance.selectedItem);this.parent.activeSheetIndex=r,this.parent.setProperties({activeSheetIndex:r},!0),this.parent.renderModule.refreshSheet(),this.tabInstance.selectedItem=r,this.tabInstance.dataBind(),this.updateDropDownItems(r),this.parent.notify(i._42,null)},e.prototype.showAggregate=function(){var e=this;if(!n.i(a._5)(n.i(a.T)(this.parent.getActiveSheet().selectedRange))){var t={Count:0,Sum:"0",Avg:"0",Min:"0",Max:"0",countOnly:!0};if(this.parent.notify(a._60,t),t.Count>1){this.aggregateContent=t.countOnly?"Count":this.selaggregateCnt,t.countOnly&&(this.aggregateContent="Count",delete t.Sum,delete t.Avg,delete t.Min,delete t.Max);var r=t.countOnly?"e-aggregate-list e-flat e-aggregate-list-countonly e-caret-hide":"e-aggregate-list e-flat";delete t.countOnly;var s=this.aggregateContent,l=s+": "+t[s.toString()];if(this.aggregateDropDown)this.updateAggregateContent(l,t);else{var d=this.parent.createElement("button",{id:this.parent.element.id+"_aggregate",attrs:{type:"button"}});document.getElementById(this.parent.element.id+"_sheet_tab_panel").appendChild(d),this.aggregateDropDown=new o.DropDownButton({content:l,items:this.getAggregateItems(t),createPopupOnClick:!0,select:function(n){e.parent.notify(a._60,t),e.updateAggregateContent(n.item.text,{Count:t.Count,Sum:t.Sum,Avg:t.Avg,Min:t.Min,Max:t.Max},!0)},beforeOpen:function(t){return e.beforeOpenHandler(e.aggregateDropDown,t.element)},open:function(t){return e.openHandler(e.aggregateDropDown,t.element,"right")},close:function(){return n.i(i._159)(e.parent.element)},cssClass:r}),this.aggregateDropDown.createElement=this.parent.createElement,this.aggregateDropDown.appendTo(d)}}else this.removeAggregate()}},e.prototype.getAggregateItems=function(e){var t,n,r,i=this,o=[];return Object.keys(e).forEach(function(s){(r=e[""+s])!==a._60&&(t=s+": "+r,n=s===i.aggregateContent?"e-selected-icon e-icons":"",o.push({text:t,iconCss:n}))}),o},e.prototype.updateAggregateContent=function(e,t,n){this.aggregateContent=e.split(": ")[0],n&&(this.selaggregateCnt=e.split(": ")[0]),this.aggregateDropDown.content=e,this.aggregateDropDown.dataBind(),this.aggregateDropDown.setProperties({items:this.getAggregateItems(t)},!0)},e.prototype.removeAggregate=function(){n.i(l.isNullOrUndefined)(this.aggregateDropDown)||(this.aggregateDropDown.destroy(),n.i(l.remove)(this.aggregateDropDown.element),this.aggregateDropDown=null)},e.prototype.addEventListener=function(){this.parent.on(i.d,this.createSheetTabs,this),this.parent.on(i.e,this.refreshSheetTab,this),this.parent.on(i.A,this.insertSheetTab,this),this.parent.on(i.B,this.removeSheetTab,this),this.parent.on(i.C,this.renameSheetTab,this),this.parent.on(i.z,this.switchSheetTab,this),this.parent.on(i._5,this.updateSheetTab,this),this.parent.on(d.Q,this.removeAggregate,this),this.parent.on(i.r,this.focusRenameInput,this),this.parent.on(i.s,this.focusRenameInput,this),this.parent.on(i._16,this.updateSheetName,this),this.parent.on(i._17,this.hideSheet,this),this.parent.on(i._58,this.showAggregate,this),this.parent.on(i._59,this.goToSheet,this),this.parent.on(i._60,this.showSheet,this)},e.prototype.destroy=function(){this.removeEventListener(),this.dropDownInstance&&this.dropDownInstance.destroy(),this.dropDownInstance=null,this.tabInstance&&this.tabInstance.destroy(),this.tabInstance=null,this.removeAggregate(),this.aggregateContent=null,this.addBtnRipple&&this.addBtnRipple(),this.addBtnRipple=null,l.EventHandler.remove(document,"mousedown touchstart",this.renameInputFocusOut);var e=document.getElementById(this.parent.element.id+"_sheet_tab_panel");e&&n.i(l.remove)(e),this.selaggregateCnt&&(this.selaggregateCnt=null),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.d,this.createSheetTabs),this.parent.off(i.e,this.refreshSheetTab),this.parent.off(i.A,this.insertSheetTab),this.parent.off(i.B,this.removeSheetTab),this.parent.off(i.C,this.renameSheetTab),this.parent.off(i.z,this.switchSheetTab),this.parent.off(i._5,this.updateSheetTab),this.parent.off(d.Q,this.removeAggregate),this.parent.off(i.r,this.focusRenameInput),this.parent.off(i.s,this.focusRenameInput),this.parent.off(i._16,this.updateSheetName),this.parent.off(i._17,this.hideSheet),this.parent.off(i._58,this.showAggregate),this.parent.off(i._59,this.goToSheet),this.parent.off(i._60,this.showSheet))},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return h});var r=n(5),i=n(6),a=n(0),o=n(2),s=n(3),l=(n.n(s),n(10)),d=(n.n(l),n(16)),c=(n.n(d),n(21)),h=(n.n(c),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(r._7,this.applySortHandler,this),this.parent.on(i._51,this.sortCompleteHandler,this),this.parent.on(r._6,this.initiateCustomSortHandler,this),this.parent.on(i._52,this.sortImport,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r._7,this.applySortHandler),this.parent.off(i._51,this.sortCompleteHandler),this.parent.off(r._6,this.initiateCustomSortHandler),this.parent.off(i._52,this.sortImport))},e.prototype.getModuleName=function(){return"sort"},e.prototype.isValidSortRange=function(){var e=this.parent.getActiveSheet(),t=n.i(a._4)(n.i(a.Z)(e.selectedRange));return!(t[0]>e.usedRange.rowIndex||t[1]>e.usedRange.colIndex)},e.prototype.sortImport=function(e){for(var t,n=this.parent.sortCollection,r=this.parent.getActiveSheet().usedRange.rowIndex-1,i=e?e.sheetIdx:this.parent.activeSheetIndex,a=0;a<n.length;a++)if(n[a].sheetIndex===i)for(var o=0;o<r;o++)if((t=this.parent.getCell(o,n[a].columnIndex))&&t.querySelector(".e-filter-icon"))return void("Ascending"===n[a].order||"OnTop"===n[a].order?t.querySelector(".e-filter-icon").classList.contains("e-sortasc-filter")||t.querySelector(".e-filter-icon").classList.add("e-sortasc-filter"):t.querySelector(".e-filter-icon").classList.contains("e-sortdesc-filter")||t.querySelector(".e-filter-icon").classList.add("e-sortdesc-filter"))},e.prototype.sortRangeAlertHandler=function(e){var t=this,i=this.parent.serviceLocator.getService(r._175),a=this.parent.serviceLocator.getService(r._174);i.show({height:180,width:400,isModal:!0,showCloseIcon:!0,content:e.error,beforeOpen:function(o){var s={dialogName:e.error===a.getConstant("MultiRangeSortError")?"MultiRangeSortDialog":"SortRangeDialog",content:e.error,element:o.element,target:o.target,cancel:o.cancel};t.parent.trigger("dialogBeforeOpen",s),s.cancel?o.cancel=!0:n.i(r._159)(t.parent.element),i.dialogInstance.content=s.content}}),this.parent.hideSpinner()},e.prototype.initiateCustomSortHandler=function(){var e=this,t=this.parent.serviceLocator.getService(r._174),i=this.parent.getActiveSheet();if(!this.isValidSortRange()||0===i.rows.length)return void this.sortRangeAlertHandler({error:t.getConstant("SortOutOfRangeError")});if(n.i(r._161)(i.selectedRange))return void this.sortRangeAlertHandler({error:t.getConstant("MultiRangeSortError")});var a,o=this.parent.serviceLocator.getService(r._175);o.show({height:400,width:560,isModal:!0,showCloseIcon:!0,cssClass:"e-customsort-dlg",header:t.getConstant("CustomSort"),beforeOpen:function(t){var i={dialogName:"CustomSortDialog",element:t.element,target:t.target,cancel:t.cancel};e.parent.trigger("dialogBeforeOpen",i),i.cancel&&(t.cancel=!0),o.dialogInstance.content=e.customSortContent(),o.dialogInstance.dataBind(),n.i(r._159)(e.parent.element)},buttons:[{buttonModel:{content:t.getConstant("Ok"),isPrimary:!0},click:function(){var t=o.dialogInstance.content,r=n.i(s.getComponent)(t.getElementsByClassName("e-list-sort e-listview e-lib")[0],"listview"),i=r.dataSource;e.clearError();var l=t.getElementsByClassName("e-sort-error")[0];l.style.display="block",e.validateError(i,t,l)||(a={sortDescriptors:i,containsHeader:t.getElementsByClassName("e-sort-checkheader")[0].checked,caseSensitive:t.getElementsByClassName("e-sort-checkcase")[0].checked},o.hide())}}],close:function(){a&&n.i(r._115)(function(){return e.applySortHandler({sortOptions:a})})}})},e.prototype.validateError=function(e,t,i){var a=this.parent.serviceLocator.getService(r._174);if(e.some(function(e){return""===e.field.toString()}))return Array.prototype.some.call(t.getElementsByClassName("e-sort-field"),function(e){var t=!n.i(s.getComponent)(e,"dropdownlist").value;return t&&e.parentElement.classList.add("e-error"),t}),i.innerText=a.getConstant("SortEmptyFieldError"),!0;var o=new Set,l="",d=e.some(function(e){return l=e.field.toString(),o.size===o.add(e.field).size}),c="";if(d){var h=0;Array.prototype.some.call(t.getElementsByClassName("e-sort-field"),function(e){var t=n.i(s.getComponent)(e,"dropdownlist");return t.value===l&&(e.parentElement.classList.add("e-error"),c=t.text,h++),2===h}),i.innerText="";var p=this.parent.createElement("strong");return p.innerText=c,i.appendChild(p),i.appendChild(document.createTextNode(a.getConstant("SortDuplicateFieldError"))),!0}return!1},e.prototype.customSortContent=function(){var e=this.parent.createElement("div",{className:"e-sort-dialog"}),t=this.getFields(),r=n.i(s.getUniqueID)("customSort"),i=this.getCustomListview(r);this.setHeaderTab(e,i,t);var a=this.parent.createElement("div",{className:"e-sort-listsection",styles:""});e.appendChild(a);var o=this.parent.createElement("div",{className:"e-list-sort",styles:""});a.appendChild(o),i.createElement=this.parent.createElement,i.appendTo(o),o.removeAttribute("tabindex"),this.renderListItem(r,i,!0,t);var l=this.parent.createElement("div",{className:"e-sort-error"});return e.appendChild(l),e},e.prototype.getFields=function(){var e=this.parent.getActiveSheet(),t=n.i(a._4)(n.i(a.Z)(e.selectedRange));if(t[0]===t[2]&&t[2]-t[0]==0){t[0]=0,t[1]=0,t[3]=e.usedRange.colIndex;var o={filterRange:[],hasFilter:!1};this.parent.notify(r._33,o),o.hasFilter&&o.filterRange&&(t[0]=o.filterRange[0])}var s,l,d=[];for(t[1];t[1]<=t[3];t[1]++){var c=n.i(a.I)(t[0],t[1],e);if(l="Column "+n.i(a.Y)(t[1]+1),c&&c.value){if(s=c.value,c.format){var h={formattedText:s,value:s,format:c.format,rowIndex:t[0],colIndex:t[1]};this.parent.notify(i.c,h),s=h.formattedText}}else s=l;d.push({text:s,value:l})}return d},e.prototype.setHeaderTab=function(e,t,i){var a=this,o=this.parent.serviceLocator.getService(r._174),l=this.parent.createElement("div",{className:"e-sort-header"});e.appendChild(l);var c=this.parent.createElement("button",{className:"e-btn e-sort-addbtn e-flat",attrs:{type:"button"}});c.innerText=o.getConstant("AddColumn");var h=this.parent.element.querySelector(".e-customsort-dlg .e-footer-content");h.insertBefore(c,h.firstElementChild),c.addEventListener("click",function(){if(t){var e=n.i(s.getUniqueID)("customSort");t.addItem([{id:e,text:o.getConstant("ThenBy"),field:"",order:"ascending"}]),a.renderListItem(e,t,p.checked,i,!0)}});var p=new d.CheckBox({label:o.getConstant("ContainsHeader"),checked:!0,change:function(t){var r=t.checked?{text:"text",value:"value"}:{text:"value"};Array.prototype.forEach.call(e.getElementsByClassName("e-sort-field e-dropdownlist e-lib"),function(e){var t=n.i(s.getComponent)(e,"dropdownlist");t.dataSource=null,t.dataSource=i,t.fields=r,t.dataBind()})},cssClass:"e-sort-headercheckbox"}),u=this.parent.createElement("input",{className:"e-sort-checkheader",attrs:{type:"checkbox"}});l.appendChild(u),p.createElement=this.parent.createElement,p.appendTo(u);var f=new d.CheckBox({label:o.getConstant("CaseSensitive"),checked:!1,cssClass:"e-sort-casecheckbox"}),g=this.parent.createElement("input",{className:"e-sort-checkcase",attrs:{type:"checkbox"}});l.appendChild(g),f.createElement=this.parent.createElement,f.appendTo(g)},e.prototype.getCustomListview=function(e){var t=this.parent.serviceLocator.getService(r._174),i=[{id:e,text:t.getConstant("SortBy"),field:"",order:"ascending"}];return n.i(s.enableRipple)(!1),new c.ListView({dataSource:i,fields:{id:"id"},height:"100%",template:n.i(s.initializeCSPTemplate)(function(e){return'<div class="e-sort-listwrapper"><span class="text">'+e.text+'</span><div class="e-sort-row"><div class="e-sort-field"></div><div class="e-sort-order"><span class="e-sort-ordertxt" style="display:none;">'+e.order+'</span></div><span class="e-icons e-sort-delete" tabindex="0"></span></div>'}),cssClass:"e-sort-template"})},e.prototype.deleteHandler=function(e,t){e.getElementsByClassName("e-sort-delete")[0].addEventListener("click",function(){e&&t.removeItem(e)})},e.prototype.renderListItem=function(e,t,n,i,a){var o=this,s=this.parent.serviceLocator.getService(r._174),c=t.element.querySelector("li[data-uid="+e+"]"),h=n?{text:"text",value:"value"}:{text:"value"},p=c.getElementsByClassName("e-sort-field")[0],u=new l.DropDownList({dataSource:i,width:"auto",cssClass:"e-sort-field-ddl",fields:h,placeholder:s.getConstant("SelectAColumn"),change:function(n){n.value&&(Array.prototype.some.call(t.dataSource,function(t){return t.id===e&&(t.field=n.value.toString().replace("Column ","")),t.id===e}),o.clearError())}});u.createElement=this.parent.createElement,u.appendTo(p),a||(u.index=0);var f=c.getElementsByClassName("e-sort-order")[0],g=f.getElementsByClassName("e-sort-ordertxt")[0],m="ascending"===g.innerText.toLocaleLowerCase(),v=new d.RadioButton({label:s.getConstant("SortAscending"),name:"sortAZ_"+e,value:"ascending",checked:m,cssClass:"e-sort-radiobutton",change:function(n){o.setRadioBtnValue(t,e,n.value)}}),y=this.parent.createElement("input",{id:"orderAsc_"+e,className:"e-sort-radioasc",styles:"",attrs:{type:"radio"}});f.appendChild(y),v.createElement=this.parent.createElement,v.appendTo(y);var C=new d.RadioButton({label:s.getConstant("SortDescending"),name:"sortAZ_"+e,value:"descending",checked:!m,cssClass:"e-sort-radiobutton",change:function(n){o.setRadioBtnValue(t,e,n.value)}}),b=this.parent.createElement("input",{id:"orderDesc_"+e,className:"e-sort-radiodesc",styles:"",attrs:{type:"radio"}});f.appendChild(b),C.createElement=this.parent.createElement,C.appendTo(b),this.deleteHandler(c,t)},e.prototype.setRadioBtnValue=function(e,t,n){n&&Array.prototype.some.call(e.dataSource,function(e){return e.id===t&&(e.order=n),e.id===t})},e.prototype.clearError=function(){var e=document.getElementsByClassName("e-sort-dialog")[0],t=e.getElementsByClassName("e-sort-error")[0];"none"!==t.style.display&&""!==t.innerHTML&&(t.style.display="none",Array.prototype.forEach.call(e.getElementsByClassName("e-error"),function(e){e.classList.remove("e-error")}))},e.prototype.applySortHandler=function(e){var t=this,o=this.parent.getActiveSheet(),s=e&&e.range||o.selectedRange,l=n.i(a._4)(n.i(a.Z)(s)),d=e&&e.sortOptions||{sortDescriptors:{}},c=l[0]===l[2],h={filterRange:[],hasFilter:!1,sheetIdx:this.parent.activeSheetIndex};this.parent.notify(r._33,h),h.hasFilter&&(c?n.i(a._165)(h.filterRange,l[0],l[1]):h.filterRange[0]===l[0]&&(this.parent.element.querySelector(".e-selectall.e-highlight")||l[1]>=h.filterRange[1]&&l[1]<=h.filterRange[3]||l[3]>=h.filterRange[1]&&l[3]<=h.filterRange[3]))&&(l[0]=h.filterRange[0],l[1]=h.filterRange[1],l[2]=o.usedRange.rowIndex,l[3]=o.usedRange.colIndex,d.containsHeader=!h.allowHeaderFilter,c=!1),s=n.i(a.X)(l);var p={range:s,sortOptions:d,cancel:!1};if(this.parent.trigger(i._53,p),!p.cancel){this.parent.notify(a._34,{eventArgs:p,action:"beforeSort"}),this.parent.showSpinner();var u=new Promise(function(e,t){e(void 0)}),f={args:{range:p.range,sortOptions:p.sortOptions,checkForHeader:c&&s!==p.range},promise:u,previousSort:e&&e.previousSort};this.parent.notify(a._68,f),f.promise.then(function(e){return t.sortCompleteHandler(e),t.parent.trigger(i._51,e),t.parent.notify(r._31,{eventArgs:e,action:"sorting"}),"BODY"===document.activeElement.tagName&&n.i(r._159)(t.parent.element),Promise.resolve(e)}).catch(function(e){return t.sortRangeAlertHandler({error:e}),Promise.reject(e)})}},e.prototype.sortCompleteHandler=function(e){var t,s,l=this.parent.activeSheetIndex;if(e.range.includes("!")){var d=e.range.split("!");l=n.i(a.e)(this.parent,d[0]),t=n.i(a.l)(this.parent,l),s=n.i(o.l)(d[1])}else t=this.parent.getActiveSheet(),s=n.i(o.l)(e.range);for(var c=s[0];c<=s[2];c++)for(var h=s[1];h<=s[3];h++)this.parent.notify(i.g,{action:"refreshCalculate",rowIndex:c,colIndex:h});this.parent.serviceLocator.getService("cell").refreshRange(s,!0,!0,!1,!1,n.i(r._163)(this.parent)),l===this.parent.activeSheetIndex&&t.conditionalFormats&&t.conditionalFormats.length&&this.parent.notify(o.b,{indexes:s}),this.parent.hideSpinner(),this.parent.notify(r._25,null)},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(1),i=n(2),a=n(4),o=n(3),s=(n.n(o),n(0)),l=function(){function e(e){this.parent=e,this.element=this.parent.createElement("td"),this.th=this.parent.createElement("th",{className:"e-header-cell"}),this.tableRow=e.createElement("tr",{className:"e-row"}),this.parent.on(s._147,this.updateView,this),this.parent.on("calculateFormula",this.calculateFormula,this)}return e.prototype.renderColHeader=function(e,t,s){var l=this.th.cloneNode(),d=n.i(i.a)(e+1);l.innerText=d;var c=this.parent.getActiveSheet();n.i(a.a)(c,e+1)&&l.classList.add("e-hide-start"),0!==e&&n.i(a.a)(c,e-1)&&l.classList.add("e-hide-end"),s?t.insertBefore(l,s):t.appendChild(l),this.parent.trigger("beforeCellRender",{cell:null,element:l,address:d,colIndex:e}),this.parent.notify(r._24,{td:l,rowIndex:0,colIndex:e}),n.i(o.attributes)(l,{"aria-colindex":(e+1).toString(),tabindex:"-1"})},e.prototype.renderRowHeader=function(e,t,r){var i=this.element.cloneNode();n.i(o.addClass)([i],"e-header-cell"),n.i(o.attributes)(i,{role:"rowheader",tabindex:"-1"}),i.innerText=(e+1).toString(),r?t.insertBefore(i,r):t.appendChild(i),this.parent.trigger("beforeCellRender",{cell:null,element:i,address:""+(e+1),rowIndex:e})},e.prototype.render=function(e){var t=this.parent.getActiveSheet();if(e.td=this.element.cloneNode(),e.td.className="e-cell",n.i(o.attributes)(e.td,{"aria-colindex":(e.colIdx+1).toString(),tabindex:"-1"}),this.checkMerged(e))return this.createImageAndChart(e),e.refChild?e.row.insertBefore(e.td,e.refChild):e.row.appendChild(e.td),e.td;e.isRefresh=!1,e.skipFormatCheck=n.i(r._163)(this.parent),this.update(e),e.checkCF&&e.cell&&t.conditionalFormats&&t.conditionalFormats.length&&this.parent.notify(i.b,{indexes:[e.rowIdx,e.colIdx],cell:e.cell,ele:e.td,isRender:!0}),e.td.classList.contains("e-cell-template")||this.parent.notify(r._24,{td:e.td,rowIndex:e.rowIdx,colIndex:e.colIdx}),e.refChild?e.row.insertBefore(e.td,e.refChild):e.row.appendChild(e.td);var s={cell:e.cell,element:e.td,address:e.address,rowIndex:e.rowIdx,colIndex:e.colIdx,needHeightCheck:!1,row:e.row};if(this.parent.trigger("beforeCellRender",s),!t.rows[e.rowIdx]||!t.rows[e.rowIdx].customHeight){if(s.element&&s.element.children.length||s.needHeightCheck){var l=s.element.cloneNode(!0);l.style.width=n.i(a.b)(t,e.colIdx,!0)+"px",this.tableRow.appendChild(l)}if(e.lastCell&&this.tableRow.childElementCount||s.needHeightCheck){var d=e.row||this.parent.getRow(e.rowIdx),c=n.i(a.c)(t,e.rowIdx),h=this.getRowHeightOnInit();if(h>c){var p=n.i(r._140)(h);d.style.height=p+"px",(e.hRow||this.parent.getRow(e.rowIdx,this.parent.getRowHeaderTable())).style.height=p+"px",n.i(a.d)(t,e.rowIdx,h)}this.tableRow.innerText=""}}return this.setWrapByValue(t,e),s.element},e.prototype.setWrapByValue=function(e,t){t.cell&&n.i(o.isNullOrUndefined)(t.cell.wrap)&&t.cell.value&&t.cell.value.toString().includes("\n")&&(n.i(a.e)(t.rowIdx,t.colIdx,e,{wrap:!0},!0),this.parent.notify(i.c,{range:[t.rowIdx,t.colIdx,t.rowIdx,t.colIdx],wrap:!0,initial:!0,sheet:e,td:t.td,row:t.row,hRow:t.hRow}))},e.prototype.update=function(e){var t=this.parent.getActiveSheet();if(!e.isRefresh||e.cell&&e.cell.template){var l=this.processTemplates(e.cell,e.rowIdx,e.colIdx);l&&("string"==typeof l?e.td.innerHTML=l:(n.i(r._116)(e.td),n.i(o.append)(l,e.td)),e.td.classList.add("e-cell-template"))}if(e.isRefresh){if(e.td.rowSpan&&(this.mergeFreezeRow(t,e.rowIdx,e.colIdx,e.td.rowSpan,e.row,!0),e.td.removeAttribute("rowSpan")),e.td.colSpan&&(this.mergeFreezeCol(t,e.rowIdx,e.colIdx,e.td.colSpan,!0),e.td.removeAttribute("colSpan")),this.checkMerged(e))return;if(e.cell&&!e.cell.hyperlink){var d=e.td.querySelector(".e-hyperlink");d&&n.i(o.detach)(d)}!e.cell&&e.td.classList.contains("e-wraptext")&&e.td.classList.remove("e-wraptext")}e.cell&&e.cell.formula&&!e.isRandomFormula&&this.calculateFormula(e);var c={value:e.cell&&e.cell.value,type:e.cell&&n.i(s._202)(e.cell.format),format:e.cell&&e.cell.format,formattedText:e.cell&&e.cell.value,isRightAlign:!1,cell:e.cell,rowIndex:e.rowIdx,colIndex:e.colIdx,td:e.td,skipFormatCheck:e.skipFormatCheck,refresh:!0};e.cell&&this.parent.notify(i.d,c),this.parent.refreshNode(e.td,{type:c.type,result:c.formattedText,curSymbol:c.curSymbol,isRightAlign:c.isRightAlign,value:c.value||0===c.value?c.value:"",isRowFill:c.isRowFill,rowIndex:e.rowIdx,colIndex:e.colIdx});var h={};if(e.cell){if(e.cell.style&&(h=e.cell.style.properties?n.i(a.f)(e.cell.style,!0):e.cell.style),void 0!==c.color&&(h.color=c.color),this.createImageAndChart(e),e.cell.hyperlink&&this.parent.notify(r._15,{cell:e.cell,style:h,td:e.td,rowIdx:e.rowIdx,colIdx:e.colIdx}),e.cell.rowSpan>1){var p=e.rowSpan||e.cell.rowSpan-this.parent.hiddenCount(e.rowIdx,e.rowIdx+(e.cell.rowSpan-1));p>1&&(e.td.rowSpan=p,this.mergeFreezeRow(t,e.rowIdx,e.colIdx,p,e.row))}if(e.cell.colSpan>1){var u=e.colSpan||e.cell.colSpan-this.parent.hiddenCount(e.colIdx,e.colIdx+(e.cell.colSpan-1),"columns");u>1&&(e.td.colSpan=u,this.mergeFreezeCol(t,e.rowIdx,e.colIdx,u))}}if(e.isRefresh&&this.removeStyle(e.td,e.rowIdx,e.colIdx),e.lastCell&&this.parent.chartColl&&this.parent.chartColl.length&&this.parent.notify(i.e,{cell:e.cell,rIdx:e.rowIdx,cIdx:e.colIdx,sheetIdx:this.parent.activeSheetIndex}),this.applyStyle(e,h),"Row"===e.checkNextBorder){var f=this.parent.getCellStyleValue(["borderTop"],[Number(this.parent.getContentTable().rows[0].getAttribute("aria-rowindex"))-1,e.colIdx]).borderTop;""===f||e.cell&&e.cell.style&&e.cell.style.bottomPriority||(e.style={borderBottom:f},this.parent.notify(i.f,e))}if("Column"===e.checkNextBorder){var g=this.parent.getCellStyleValue(["borderLeft"],[e.rowIdx,e.colIdx+1]).borderLeft;""===g||e.cell&&e.cell.style&&(e.cell.style.borderRight||e.cell.style.border)||(e.style={borderRight:g},this.parent.notify(i.f,e))}e.cell&&!n.i(o.isNullOrUndefined)(e.cell.wrap)&&this.parent.notify(i.c,{range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx],wrap:e.cell.wrap,sheet:t,initial:!0,td:e.td,row:e.row,hRow:e.hRow,isCustomHgt:!e.isRefresh&&n.i(a.c)(t,e.rowIdx)>20});var m=e.cell&&e.cell.validation||t.columns&&t.columns[e.colIdx]&&t.columns[e.colIdx].validation;m&&m.isHighlighted&&this.parent.notify(s._92,{range:n.i(i.g)([e.rowIdx,e.colIdx]),td:e.td}),e.cell&&e.cell.validation&&e.cell.validation.isHighlighted&&this.parent.notify(s._92,{range:n.i(i.g)([e.rowIdx,e.colIdx]),td:e.td})},e.prototype.applyStyle=function(e,t){(Object.keys(t).length||Object.keys(this.parent.commonCellStyle).length||e.lastCell)&&(e.style=n.i(o.extend)({},this.parent.commonCellStyle,t),this.parent.notify(i.f,e))},e.prototype.createImageAndChart=function(e){if(e.cell.chart&&e.cell.chart.length>0&&this.parent.notify(i.h,{chart:e.cell.chart,isInitCell:!0,range:n.i(i.i)(e.rowIdx,e.colIdx),isUndoRedo:!1}),e.cell.image&&e.cell.image.length>0)for(var t=0;t<e.cell.image.length;t++)e.cell.image[t]&&this.parent.notify(r._75,{options:{src:e.cell.image[t].src,imageId:e.cell.image[t].id,height:e.cell.image[t].height,width:e.cell.image[t].width,top:e.cell.image[t].top,left:e.cell.image[t].left},range:n.i(i.g)([e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]),isPublic:!1})},e.prototype.calculateFormula=function(e){if(void 0!==e.cell.value&&null!==e.cell.value){var t={action:"checkFormulaAdded",added:!0,address:e.address,sheetId:(void 0===e.sheetIndex?this.parent.getActiveSheet():n.i(a.g)(this.parent,e.sheetIndex)).id.toString()};if(this.parent.notify(i.j,t),t.added)return}else e.formulaRefresh&&(e.cell.value="");var r=n.i(i.k)(e.cell.formula),s={action:"refreshCalculate",value:e.cell.formula,rowIndex:e.rowIdx,colIndex:e.colIdx,isFormula:r,sheetIndex:e.sheetIndex,isRefreshing:e.isRefreshing,isDependentRefresh:e.isDependentRefresh,isRandomFormula:e.isRandomFormula};this.parent.notify(i.j,s),e.cell.value=n.i(a.h)(e.rowIdx,e.colIdx,n.i(o.isNullOrUndefined)(e.sheetIndex)?this.parent.getActiveSheet():n.i(a.g)(this.parent,e.sheetIndex)).value,e.cell.formula=e.cell.formula.indexOf("^+")>-1||e.cell.formula.indexOf("&+")>-1?s.value:e.cell.formula},e.prototype.checkMerged=function(e){if(e.cell&&(e.cell.colSpan<0||e.cell.rowSpan<0)){var t=this.parent.getActiveSheet();if(t.frozenRows||t.frozenColumns){var n={range:[e.rowIdx,e.colIdx,e.rowIdx,e.colIdx]};this.parent.notify(s._116,n);var i=this.parent.frozenRowCount(t),a=this.parent.frozenColCount(t),o=void 0;n.range=n.range,o=t.frozenRows&&t.frozenColumns?n.range[0]<i&&n.range[1]<a?e.rowIdx<i&&e.colIdx<a:n.range[0]<i?e.rowIdx<i:!(n.range[1]<a)||e.colIdx<a:i?n.range[0]>=i||e.rowIdx<i:n.range[1]>=a||e.colIdx<a,o&&(e.td.style.display="none")}else e.td.style.display="none";e.isMerged=!0;var l=e.cell.rowSpan,d=e.cell.colSpan;return(d<0||l<0)&&(this.parent.notify(r._55,e),d<0&&e.cell.style&&e.cell.style.borderTop&&this.applyStyle(e,{borderTop:e.cell.style.borderTop}),l<0&&e.cell.style&&e.cell.style.borderLeft&&this.applyStyle(e,{borderLeft:e.cell.style.borderLeft})),e.isMerged}return!1},e.prototype.mergeFreezeRow=function(e,t,r,i,l,d){var c=this.parent.frozenRowCount(e);if(c&&t<c&&t+(i-1)>=c){var h=void 0,p=0,u=void 0,f=this.parent.frozenColCount(e),g=l||this.parent.getRow(t,null,r),m=[].slice.call(g.parentElement.querySelectorAll(".e-empty"));if(d){var v=t+i-c;if(v<m.length)return;var y=0;if(v===m.length){var C=void 0,b=void 0,x=void 0;for(f&&r<f?(b=n.i(s.U)(e.topLeftCell)[1],x=f):(b=this.parent.viewport.leftIndex+f,x=this.parent.viewport.rightIndex),b;b<x;b++)b!==r&&(C=n.i(a.h)(t,b,e,!1,!0),C.rowSpan&&t+C.rowSpan-c>y&&(y=t+C.rowSpan-c));if(y===v)return}else y=v;for(var S=t+(i-1),b=y,x=m.length;b<x;b++)p+=n.i(a.c)(e,S),S--,n.i(o.detach)(m.pop());return this.updateSpanTop(r,f,p,!0),void(m.length||this.updateColZIndex(r,f,!0))}this.updateColZIndex(r,f);for(var b=c,x=t+(i-1);b<=x;b++)u=n.i(a.c)(e,n.i(s._172)(e,b,!0),!0),p+=-u,c+m.length>b||(h=g.cloneNode(),h.classList.add("e-empty"),h.style.visibility="hidden",h.style.height=u+"px",g.parentElement.appendChild(h));this.updateSpanTop(r,f,p)}},e.prototype.updateSpanTop=function(e,t,n,r){var i=this.parent.serviceLocator.getService("sheet").contentPanel;if(r){if(!parseInt(i.style.top,10))return;n=parseInt(i.style.top,10)+n}if(t&&e<t&&(r||!parseInt(i.style.top,10)||n<parseInt(i.style.top,10))){i.style.top=n+"px";var a=i.nextElementSibling;a&&(a.style.top=n+"px")}},e.prototype.mergeFreezeCol=function(e,t,r,i,l){var d=this.parent.frozenColCount(e);if(d&&r<d&&r+(i-1)>=d){var c=void 0,h=void 0,p=this.parent.frozenRowCount(e),u=(t<p?this.parent.getSelectAllContent():this.parent.getRowHeaderContent()).querySelector("colgroup"),f=[].slice.call(u.querySelectorAll(".e-empty"));if(l){var g=r+i-d;if(g<f.length)return;var m=0;if(g===f.length){var v=void 0,y=void 0,C=void 0;for(p&&t<d?(y=p,C=n.i(s.U)(e.topLeftCell)[0]):(y=this.parent.viewport.bottomIndex,C=this.parent.viewport.topIndex+p),C;C<y;C++)C!==t&&(v=n.i(a.h)(C,r,e,!1,!0),v.colSpan&&r+v.colSpan-d>m&&(m=r+v.colSpan-d));if(m===g)return}else m=g;for(var C=m,y=f.length;C<y;C++)n.i(o.detach)(f.pop());return this.parent.serviceLocator.getService("sheet").setPanelWidth(e,this.parent.getRowHeaderContent()),void(f.length||this.updateRowZIndex(t,p,!0))}this.updateRowZIndex(t,p);for(var C=d,y=r+(i-1);C<=y;C++)d+f.length>C||(c=u.childNodes[0].cloneNode(),c.classList.add("e-empty"),c.style.visibility="hidden",h=n.i(a.b)(e,n.i(s._172)(e,C,!0,"columns"),null,!0),c.style.width=h+"px",u.appendChild(c),C===y&&this.parent.serviceLocator.getService("sheet").setPanelWidth(e,this.parent.getRowHeaderContent()))}},e.prototype.updateColZIndex=function(e,t,n){e<t?this.updateSelectAllZIndex(n):(this.parent.getColumnHeaderContent().style.zIndex=n?"":"2",this.updatedHeaderZIndex(n))},e.prototype.updateSelectAllZIndex=function(e){var t=this.parent.element.querySelector(".e-frozen-row"),n=this.parent.element.querySelector(".e-frozen-column");e?(this.parent.getSelectAllContent().style.zIndex="",t&&(t.style.zIndex=""),n&&(n.style.zIndex="")):this.parent.getRowHeaderContent().style.zIndex||this.parent.getColumnHeaderContent().style.zIndex?(this.parent.getSelectAllContent().style.zIndex="3",t&&(t.style.zIndex="4"),n&&(n.style.zIndex="4")):this.parent.getSelectAllContent().style.zIndex="2"},e.prototype.updatedHeaderZIndex=function(e){if(!e&&"2"===this.parent.getSelectAllContent().style.zIndex){this.parent.getSelectAllContent().style.zIndex="3";var t=this.parent.element.querySelector(".e-frozen-row"),n=this.parent.element.querySelector(".e-frozen-column");n&&(n.style.zIndex="4"),t&&(t.style.zIndex="4")}},e.prototype.updateRowZIndex=function(e,t,n){e<t?this.updateSelectAllZIndex(n):(this.parent.getRowHeaderContent().style.zIndex=n?"":"2",this.updatedHeaderZIndex(n))},e.prototype.processTemplates=function(e,t,r){for(var o,s=this.parent.getActiveSheet(),l=s.ranges,d=0,c=l.length;d<c;d++)if(l[d].template&&(o=n.i(i.l)(l[d].address.length?l[d].address:l[d].startCell),o[0]<=t&&o[1]<=r&&o[2]>=t&&o[3]>=r)){if(e)return this.compileCellTemplate(l[d].template,Object.assign({rowIndex:t,colIndex:r},e));if(!n.i(a.h)(t,r,s,!0))return this.compileCellTemplate(l[d].template,Object.assign({rowIndex:t,colIndex:r},n.i(a.h)(t,r,s,null,!0)))}return""},e.prototype.compileCellTemplate=function(e,t){var r;if("string"==typeof e){var i=void 0;return i=0===e.trim().indexOf("#")?document.querySelector(e).innerHTML.trim():e,r=n.i(o.compile)(i),!this.parent.isVue||this.isSelector(e)?r(t,this.parent,"ranges","",!0)[0].outerHTML:r(t,this.parent,"ranges","")}r=n.i(o.compile)(e);var a=r(t,this.parent,"ranges","");return a[0]?a:[a]},e.prototype.isSelector=function(e){try{return!!document.querySelector(e)}catch(e){return!1}},e.prototype.getRowHeightOnInit=function(){var e=this.parent.createElement("table",{className:"e-table e-test-table"});e.appendChild(this.parent.createElement("tbody")).appendChild(this.tableRow),this.parent.element.appendChild(e);var t=Math.round(this.tableRow.getBoundingClientRect().height);return this.parent.element.removeChild(e),t<20?20:t},e.prototype.removeStyle=function(e,t,n){var r;if(e.style.length){r=this.parent.getCellStyleValue(["borderLeft","border"],[t,n+1]);var i=r.borderLeft||r.border;r=this.parent.getCellStyleValue(["borderTop","border"],[t+1,n]);var a=r.borderTop||r.border;i||a?[].slice.call(e.style).forEach(function(t){i&&a?t.includes("border-right")||t.includes("border-bottom")||e.style.removeProperty(t):(!i||t.indexOf("border-right")>-1||a&&"none"!==a)&&(!a||t.indexOf("border-bottom")>-1||i&&"none"!==i)||e.style.removeProperty(t)}):e.removeAttribute("style")}var o=this.parent.getCell(t-1,n);if(o&&o.style.borderBottom){var s=Number(o.parentElement.getAttribute("aria-rowindex"))-1;r=this.parent.getCellStyleValue(["borderBottom","border"],[s,n]),r.borderBottom||r.border||(o.style.borderBottom="")}var l=e.previousElementSibling;l&&l.style.borderRight&&(n=Number(l.getAttribute("aria-colindex"))-1,r=this.parent.getCellStyleValue(["borderRight","border"],[t,n]),r.borderRight||r.border||(l.style.borderRight=""))},e.prototype.refreshRange=function(e,t,o,s,l,d,c){var h,p,u=this.parent.getActiveSheet(),f=e.slice();if(n.i(r._120)(this.parent,f,!0))for(var g=f[0];g<=f[2];g++)if(!n.i(a.i)(u,g))for(var m=f[1];m<=f[3];m++)n.i(a.a)(u,m)||(p=this.parent.getCell(g,m))&&(h={rowIdx:g,colIdx:m,td:p,cell:n.i(a.h)(g,m,u),isRefreshing:t,lastCell:m===f[3],isRefresh:!0,isHeightCheckNeeded:!0,manualUpdate:!0,first:"",onActionUpdate:s,skipFormatCheck:d},c&&(h.address=n.i(i.i)(g,m)),this.update(h),l&&u.conditionalFormats&&u.conditionalFormats.length&&this.parent.notify(i.b,{indexes:[g,m],isAction:!0}),this.parent.notify(r._24,{td:p,rowIndex:g,colIndex:m}),o&&this.setWrapByValue(u,h))},e.prototype.refresh=function(e,t,o,s,l,d,c,h){var p=this.parent.getActiveSheet();if((s||!n.i(a.i)(p,e)&&!n.i(a.a)(p,t))&&(s||!this.parent.scrollSettings.enableVirtualization||this.parent.insideViewport(e,t))){var u=s||this.parent.getCell(e,t);if(!u)return;var f={rowIdx:e,colIdx:t,td:u,cell:n.i(a.h)(e,t,p),isRefresh:!0,lastCell:o,isHeightCheckNeeded:!0,manualUpdate:!0,first:"",skipFormatCheck:c,isRandomFormula:h};this.update(f),l&&p.conditionalFormats&&p.conditionalFormats.length&&this.parent.notify(i.b,{indexes:[e,t],isAction:!0}),this.parent.notify(r._24,{td:u,rowIndex:e,colIndex:t}),d&&this.setWrapByValue(p,f)}},e.prototype.updateView=function(e){if(n.i(o.isNullOrUndefined)(e.sheetIndex)||e.sheetIndex===this.parent.activeSheetIndex){if(!e.indexes){var t=this.parent.getActiveSheet(),r=this.parent.frozenRowCount(t),s=this.parent.frozenColCount(t),l=n.i(i.l)(t.topLeftCell);r&&s&&this.refreshRange([l[0],l[1],r-1,s-1],e.refreshing,e.checkWrap,!1,e.checkCF),r&&this.refreshRange([l[0],this.parent.viewport.leftIndex+s,r-1,this.parent.viewport.rightIndex],e.refreshing,e.checkWrap,!1,e.checkCF),s&&this.refreshRange([this.parent.viewport.topIndex+r,l[1],this.parent.viewport.bottomIndex,s-1],e.refreshing,e.checkWrap,!1,e.checkCF),e.indexes=[this.parent.viewport.topIndex+r,this.parent.viewport.leftIndex+s,this.parent.viewport.bottomIndex,this.parent.viewport.rightIndex]}this.refreshRange(e.indexes,e.refreshing,e.checkWrap,!1,e.checkCF)}else e.refreshing&&this.calculateFormula({cell:n.i(a.h)(e.indexes[0],e.indexes[1],n.i(a.g)(this.parent,e.sheetIndex),!0,!0),rowIdx:e.indexes[0],colIdx:e.indexes[1],sheetIndex:e.sheetIndex})},e.prototype.destroy=function(){this.parent.off(s._147,this.updateView),this.parent.off("calculateFormula",this.calculateFormula),this.element&&this.element.remove(),this.element=null,this.th&&this.th.remove(),this.th=null,this.tableRow&&this.tableRow.remove(),this.tableRow=null,this.parent=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(1),i=n(4),a=n(3),o=(n.n(a),n(2)),s=function(){function e(e){this.parent=e,this.element=this.parent.createElement("tr"),this.cellRenderer=e.serviceLocator.getService("cell"),this.parent.on(r._4,this.initProps,this)}return e.prototype.render=function(e,t,r){var o=this.element.cloneNode();if(void 0===e)return o.classList.add("e-header-row"),o;o.classList.add("e-row");var s=this.parent.getActiveSheet();n.i(a.attributes)(o,{"aria-rowindex":(e+1).toString()});var l=n.i(i.c)(s,e,!0);o.style.height=l+"px";var d=n.i(i.c)(s,e);if(!this.bottomBorderWidth){var c=1;if(window.devicePixelRatio%1>0){var h=1*window.devicePixelRatio%1;c=1+(h?(h>.5?1-h:-1*h)/window.devicePixelRatio:0)}this.bottomBorderWidth=c}if(d<20&&(o.style.lineHeight=l>this.bottomBorderWidth?l-this.bottomBorderWidth+"px":"0px"),t&&!r){if(d<20){var c=this.bottomBorderWidth-1+4;o.style.lineHeight=l>=c?l-c+"px":l>this.bottomBorderWidth?l-this.bottomBorderWidth+"px":"0px",o.classList.contains("e-reach-fntsize")||o.classList.add("e-reach-fntsize")}n.i(i.i)(s,e+1)&&!n.i(i.i)(s,e-1)&&o.classList.add("e-hide-start"),0!==e&&n.i(i.i)(s,e-1)&&!n.i(i.i)(s,e+1)&&o.classList.add("e-hide-end")}return o},e.prototype.refresh=function(e,t,a,s,l){var d,c=this,h=this.parent.getActiveSheet();if(s)d=this.render(e,s,l),this.cellRenderer.renderRowHeader(e,d);else{var p,u,f=function(){for(;p<=u;)n.i(i.a)(h,p)||c.cellRenderer.render({colIdx:p,rowIdx:e,cell:n.i(i.h)(e,p,h),address:n.i(o.i)(e,p),lastCell:p===u,row:d,hRow:a,isHeightCheckNeeded:!0,pRow:t,first:e===c.parent.viewport.topIndex&&n.i(o._50)(h,e,!0)!==n.i(o._50)(h,0,!0)?"Row":"",skipFormatCheck:n.i(r._163)(c.parent),checkCF:!0}),p++},g=this.parent.frozenColCount(h);g&&(d=a,p=n.i(o.w)(h.topLeftCell)[0],u=g-1,f()),d=this.render(e,s,l),p=this.parent.viewport.leftIndex+g,u=this.parent.viewport.rightIndex,f()}return d},e.prototype.initProps=function(){this.bottomBorderWidth=null},e.prototype.destroy=function(){this.parent.off(r._4,this.initProps),this.element&&this.element.remove(),this.bottomBorderWidth&&(this.bottomBorderWidth=null),this.parent=null,this.element=null},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(3),i=(n.n(r),n(2)),a=n(0),o=n(1),s=function(){function e(e){this.colGroupWidth=30,this.parent=e,this.col=e.createElement("col"),this.rowRenderer=e.serviceLocator.getService("row"),this.cellRenderer=e.serviceLocator.getService("cell"),this.addEventListener()}return e.prototype.refreshSelectALLContent=function(){var e,t=this.parent.getActiveSheet();if(t.frozenColumns||t.frozenRows){var n=this.getSelectAllTable().querySelector("thead"),r=this.rowRenderer.render();n.appendChild(r),e=this.parent.createElement("th",{className:"e-select-all-cell"}),r.appendChild(e)}else e=this.headerPanel.firstElementChild,e.classList.add("e-select-all-cell");e.appendChild(this.parent.createElement("button",{className:"e-selectall",id:this.parent.element.id+"_select_all",attrs:{"aria-label":this.parent.serviceLocator.getService(o._174).getConstant("SelectAll"),type:"button"}}))},e.prototype.updateLeftColGroup=function(e,t){e&&(this.colGroupWidth=e),t||(t=this.getRowHeaderPanel());var n,r=t.querySelector("table"),i=this.parent.getActiveSheet();if(e)r.querySelector("colgroup").firstElementChild.style.width=this.colGroupWidth+"px";else{n=this.parent.createElement("colgroup");var a=this.col.cloneNode();a.style.width=this.colGroupWidth+"px",n.appendChild(a),r.insertBefore(n,r.querySelector("tbody"))}(i.frozenRows||i.frozenColumns)&&(r=this.getSelectAllTable(),e?r.querySelector("colgroup").firstElementChild.style.width=this.colGroupWidth+"px":r.insertBefore(n.cloneNode(!0),r.querySelector("thead"))),this.setPanelWidth(i,t),this.setPanelHeight(i)},e.prototype.setPanelWidth=function(e,t,i){var a,s=this.getScrollSize(!0),l=this.getRowHeaderWidth(e),d=this.parent.enableRtl?"right":"left";if(i&&(a=this.parent.enableRtl?"left":"right",this.getContentPanel().style[""+a]=this.getColHeaderPanel().style[""+a]=""),e.frozenColumns){var c=document.getElementById(this.parent.element.id+"_sheet").getElementsByClassName("e-frozen-column")[0];c.style.height="calc(100% - "+s+"px)",i&&(c.style[""+a]=""),c.style[""+d]=l-n.i(o._140)(1)+"Px",c.style.display=""}this.setHeaderPanelWidth(this.getSelectAllContent(),l),this.getColHeaderPanel().style.width="calc(100% - "+l+"px)",this.getColHeaderPanel().style[""+d]=l+"px",this.setHeaderPanelWidth(t,l),this.getContentPanel().style.width="calc(100% - "+l+"px)",this.getContentPanel().style[""+d]=l+"px";var h=this.contentPanel.nextElementSibling?this.contentPanel.nextElementSibling:null;h&&(s?h.style.height=s+1+"px":(h.style.height="1px",h.style.borderTopWidth="0px"),h=h.firstElementChild,i&&(h.style[""+a]=""),h.style[""+d]=l+"px",h.style.width="calc(100% - "+l+"px)",r.Browser.userAgent.indexOf("Mac OS")>-1&&"safari"===r.Browser.info.name&&(h.style.height="7px",h.style.top="-7px"))},e.prototype.getScrollSize=function(e){var t=parseInt(this.headerPanel.style[this.parent.enableRtl?"margin-left":"margin-right"],10);return t?t+(e?1:0):0},e.prototype.setHeaderPanelWidth=function(e,t){[].slice.call(e.querySelectorAll("col.e-empty")).forEach(function(e){t+=parseInt(e.style.width,10)}),e.style.width=t+"px"},e.prototype.setPanelHeight=function(e){var t=this.getScrollSize(!0);if(e.frozenRows){var i=this.getColHeaderHeight(e);e.showHeaders||e.frozenColumns?this.headerPanel.style.height="":this.headerPanel.style.height=i+"px",this.contentPanel.style.height="calc(100% - "+(i+t)+"px)";var a=document.getElementById(this.parent.element.id+"_sheet").getElementsByClassName("e-frozen-row")[0];a.style.width=r.Browser.isDevice?"100%":"calc(100% - "+t+"px)",a.style.top=i-1-(e.showHeaders?1:0)+"px",a.style.display=""}else this.contentPanel.style.height="calc(100% - "+((e.showHeaders?n.i(o._140)(31):0)+t)+"px)"},e.prototype.renderPanel=function(){this.contentPanel=this.parent.createElement("div",{className:"e-main-panel",attrs:{tabindex:"0"}});var e=this.parent.getActiveSheet(),t=this.parent.element.id;this.contentPanel.appendChild(this.parent.createElement("div",{className:"e-row-header",id:t+"_row_header"})),this.initHeaderPanel(),this.parent.allowScrolling&&this.parent.scrollModule.setPadding();var n=document.getElementById(this.parent.element.id+"_sheet");e.frozenColumns&&n.classList.add("e-frozen-columns"),e.frozenRows&&n.classList.add("e-frozen-rows"),this.updateHideHeaders(e,n),e.showGridLines||n.classList.add("e-hide-gridlines");var i=this.contentPanel.appendChild(this.parent.createElement("div",{className:"e-sheet-content",id:t+"_main_content"}));this.parent.allowScrolling||(i.style.overflow="hidden"),e.frozenRows&&n.appendChild(this.parent.createElement("div",{className:"e-frozen-row",styles:"display: none"})),e.frozenColumns&&n.appendChild(this.parent.createElement("div",{className:"e-frozen-column",styles:"display: none"})),r.Browser.userAgent.indexOf("Mac OS")>-1&&"safari"===r.Browser.info.name&&n.classList.add("e-mac-safari")},e.prototype.initHeaderPanel=function(){var e=this.parent.element.id;this.headerPanel=this.parent.createElement("div",{className:"e-header-panel"}),this.headerPanel.appendChild(this.parent.createElement("div",{className:"e-selectall-container",id:e+"_selectall"})),this.headerPanel.appendChild(this.parent.createElement("div",{className:"e-column-header",id:e+"_col_header"}))},e.prototype.createHeaderTable=function(){var e=this.contentPanel.querySelector(".e-row-header"),t=this.parent.getActiveSheet();(t.frozenRows||t.frozenColumns)&&this.updateTable(t.frozenRows?["thead","tbody"]:["thead"],"selectall",this.headerPanel.querySelector(".e-selectall-container")),this.updateTable(t.frozenRows?["thead","tbody"]:["thead"],"colhdr",this.headerPanel.querySelector(".e-column-header")),this.updateTable(["tbody"],"rowhdr",e),this.updateLeftColGroup(null,e)},e.prototype.updateTable=function(e,t,n){var r=this,i=this.parent.createElement("table",{className:"e-table",attrs:{role:"grid"}});i.classList.add("e-"+t+"-table"),n.appendChild(i),e.forEach(function(e){i.appendChild(r.parent.createElement(e))})},e.prototype.renderTable=function(e){var t,a,s,l=this,d=this.parent.getActiveSheet(),c=document.createDocumentFragment();if(c.appendChild(this.headerPanel),c.appendChild(this.contentPanel),this.parent.allowScrolling){var h=this.parent.createElement("div",{className:"e-scrollbar"});h.appendChild(this.parent.createElement("div",{className:"e-scroller"})),c.appendChild(h)}this.createHeaderTable(),this.updateTable(["tbody"],"content",this.contentPanel.lastElementChild);var p,u=this.parent.createElement("colgroup"),f=this.contentPanel.querySelector(".e-sheet-content tbody");this.refreshSelectALLContent();var g=this.getSelectAllContent().querySelector("colgroup"),m=this.getRowHeaderPanel().querySelector("colgroup"),v=this.getSelectAllContent().querySelector("thead .e-header-row"),y=this.contentPanel.querySelector(".e-row-header tbody"),C=this.getSelectAllContent().querySelector("tbody"),b=this.headerPanel.querySelector(".e-column-header thead"),x=this.headerPanel.querySelector(".e-column-header tbody"),S=this.rowRenderer.render();b.appendChild(S),this.getColHeaderTable().insertBefore(u,b);var w=this.parent.frozenRowCount(d),_=this.parent.frozenColCount(d),I=n.i(i._50)(d,_-1,!1,"columns");this.parent.notify(o.t,{top:e.top,left:e.left});var E=d.colCount.toString(),R=d.colCount.toString(),k=e.top&&e.left?"RowColumn":e.top?"Row":e.left?"Column":"";this.parent.getColHeaderTable().setAttribute("aria-colcount",E),this.parent.getRowHeaderTable().setAttribute("aria-rowcount",R);var A;n.i(r.attributes)(this.parent.getContentTable(),{"aria-rowcount":R,"aria-colcount":E}),e.cells.forEach(function(r,o){if(t=n.i(i.l)(o),t[1]!==e.indexes[1]&&a||(t[1]===e.indexes[1]&&(s=l.rowRenderer.render(t[0],!0)),_&&w&&t[1]<_&&t[0]<w?(A=C.querySelector(".e-empty"),A?C.insertBefore(s,A):C.appendChild(s),a=s):_&&t[1]<_?(y.appendChild(s),a=s):(a=l.rowRenderer.render(t[0]),w&&t[0]<w?(A=x.querySelector(".e-empty"),A?x.insertBefore(a,A):x.appendChild(a)):f.appendChild(a),t[1]===e.indexes[1]&&(w&&t[0]<w?C.appendChild(s):y.appendChild(s))),t[1]===e.indexes[1]&&l.cellRenderer.renderRowHeader(t[0],s)),l.cellRenderer.render({colIdx:t[1],rowIdx:t[0],cell:r,address:o,lastCell:t[1]===e.indexes[3],isHeightCheckNeeded:!0,row:a,hRow:s,pRow:a.previousSibling,pHRow:s.previousSibling,isRefreshing:e.isRefreshing,first:k?k.includes("Row")?t[0]===e.indexes[0]?"Row":k.includes("Column")&&t[1]===e.indexes[1]?"Column":"":t[1]===e.indexes[1]?"Column":"":""}),_&&t[1]===I&&(a=null),t[0]===e.indexes[0])if(_&&t[1]<_){p=l.updateCol(d,t[1],g);var c=m.querySelector(".e-empty");c?m.insertBefore(p.cloneNode(!0),c):m.appendChild(p.cloneNode(!0)),l.cellRenderer.renderColHeader(t[1],v)}else l.updateCol(d,t[1],u),l.cellRenderer.renderColHeader(t[1],S)}),this.parent.isReact&&this.parent.renderReactTemplates(),f.parentElement.insertBefore(u.cloneNode(!0),f),n.i(o._115)(function(){if(l.parent){var t=l.parent.getMainContent(),r=document.getElementById(l.parent.element.id+"_sheet");if(r.childElementCount&&r.querySelector(".e-header-panel")!==l.headerPanel)for(var a=r.children,s=0;s<a.length;s++)a[s].classList.contains("e-frozen-row")||a[s].classList.contains("e-frozen-column")||a[s].classList.contains("e-ss-overlay")||r.removeChild(a[s]);if(r.appendChild(c),r.style.backgroundColor="",d.conditionalFormats&&d.conditionalFormats.length&&l.parent.notify(i.b,{indexes:e.indexes}),l.checkRowHeightChanged(e,d),e.top&&(t.parentElement.scrollTop=e.top),e.left&&(t.scrollLeft=e.left,l.parent.getColumnHeaderContent().scrollLeft=e.left),l.parent.notify(o.g,e),l.checkTableWidth(d),l.parent.notify(o.j,{action:"renderEditor",initLoad:e.initLoad&&!l.parent.isOpen}),e.initLoad||l.parent.isOpen||l.parent.hideSpinner(),n.i(o._141)(t,{busy:!1}),l.parent.trigger(o.N,{}),l.parent.isEdit&&l.parent.notify(o._68,null),e.openOptions&&e.openOptions.eventArgs&&e.openOptions.eventArgs.triggerEvent&&l.parent.trigger("openComplete",{response:e.openOptions}),e.initLoad){var h=!0;if(l.parent.scrollSettings.enableVirtualization)for(var s=0;s<d.ranges.length;s++)if(d.ranges[s].info.count-1>l.parent.viewport.bottomIndex){h=!1;break}h?l.parent.isReact?setTimeout(function(){l.parent&&l.triggerCreatedEvent()}):l.triggerCreatedEvent():l.parent.isOpen||l.parent.hideSpinner()}}})},e.prototype.triggerCreatedEvent=function(){this.parent.isOpen||this.parent.hideSpinner(),this.parent.createdHandler&&(this.parent.createdHandler.observers?(this.parent.created.observers=this.parent.createdHandler.observers,this.parent.isAngular&&this.parent.createdHandler.currentObservers&&(this.parent.created.currentObservers=this.parent.createdHandler.currentObservers)):this.parent.setProperties({created:this.parent.createdHandler},!0),this.parent.createdHandler=void 0,this.parent.trigger(o._49,null),this.parent.notify(o._22,null))},e.prototype.checkRowHeightChanged=function(e,t){var r={top:e.top,left:e.left,sheet:t};this.parent.notify(o._109,r),e.top!==r.top&&(this.parent.scrollModule&&this.parent.scrollModule.offset.top.idx&&r.top-e.top<n.i(a.x)(t,this.parent.scrollModule.offset.top.idx)&&(this.parent.scrollModule.offset.top.size=r.top),e.top=r.top),e.left!==r.left&&(this.parent.scrollModule&&this.parent.scrollModule.offset.left.idx&&r.left-e.left<n.i(a.D)(t,this.parent.scrollModule.offset.left.idx)&&(this.parent.scrollModule.offset.left.size=r.left),e.left=r.left)},e.prototype.checkTableWidth=function(e){if(this.parent.scrollSettings.isFinite&&!this.parent.scrollSettings.enableVirtualization&&e.colCount-1===this.parent.viewport.rightIndex){var t=n.i(a.E)(e,this.parent.viewport.leftIndex+this.parent.frozenColCount(e),this.parent.viewport.rightIndex),r=this.getRowHeaderWidth(e),i=this.getScrollSize();t<this.contentPanel.getBoundingClientRect().width-r-i?(this.getContentPanel().style.width=t+"px",this.getColHeaderPanel().style.width=t+"px"):this.getContentPanel().style.width.includes("calc")||(this.getContentPanel().style.width="calc(100% - "+r+"px)",this.getColHeaderPanel().style.width="calc(100% - "+r+"px)")}},e.prototype.clearCFResult=function(e){if(e.conditionalFormats&&e.conditionalFormats.length)for(var t=e.conditionalFormats,n=0;n<t.length;n++)delete t[n].result},e.prototype.refreshColumnContent=function(e){var t,r,a,s,l,d=this,c=0,h=this.parent.getActiveSheet(),p=document.createDocumentFragment(),u=document.createDocumentFragment(),f=this.parent.element.querySelector(".e-sheet-content tbody"),g=this.parent.element.querySelector(".e-column-header tbody"),m=this.parent.element.querySelector(".e-sheet-content colgroup");m=m.cloneNode(),p.appendChild(m),f=p.appendChild(f.cloneNode(!0));var v=m.cloneNode();u.appendChild(v);var y;y=this.parent.element.querySelector(".e-column-header thead"),y=u.appendChild(y.cloneNode(!0));var C=y.querySelector("tr");C.innerText="";var b=this.parent.frozenRowCount(h),x=this.parent.frozenColCount(h);b&&(g=u.appendChild(g.cloneNode(!0)));var S=n.i(i._50)(h,b-1,!1),w=this.parent.scrollSettings.enableVirtualization&&this.parent.viewport.topIndex!==n.i(i._50)(h,0,!0);this.clearCFResult(h),e.cells.forEach(function(a,o){if(t=n.i(i.l)(o),t[0]===e.indexes[0]&&(l=d.updateCol(h,t[1],v),m.appendChild(l.cloneNode()),d.cellRenderer.renderColHeader(t[1],C)),t[1]-x===e.indexes[1]){if(!(r=t[0]<b?g.children[c]:f.children[c]))return;r.innerText="",c++}r&&(s=d.cellRenderer.render({colIdx:t[1],rowIdx:t[0],cell:a,address:o,row:r,pRow:r.previousSibling,first:e.skipUpdateOnFirst||t[1]!==e.indexes[1]?w&&t[0]===e.indexes[0]?"Row":"":"Column",isRefreshing:!0}),d.checkColMerge(t,e.indexes,s,a),b&&t[0]===S&&(c=0))});var _=function(){a=d.getColHeaderTable(),n.i(o._116)(a),a.appendChild(u),a=d.getContentTable(),n.i(o._116)(a),a.appendChild(p),d.parent.notify(o.v,{refresh:"Column",prevRowColCnt:e.prevRowColCnt}),h.conditionalFormats&&h.conditionalFormats.length&&d.parent.notify(i.b,{indexes:e.indexes,isRender:!0}),d.parent.isEdit&&d.parent.notify(o._69,{}),d.parent.allowChart&&d.parent.notify(o._85,null),d.parent.isOpen||d.parent.hideSpinner(),n.i(o._141)(d.parent.getMainContent(),{busy:!1})};e.insertDelete?_():n.i(o._115)(function(){return _()})},e.prototype.refreshRowContent=function(e){var t,a,s,l,d=this,c=this.colGroupWidth,h=this.parent.getActiveSheet(),p=document.createDocumentFragment(),u=this.parent.createElement("tbody"),f=document.createDocumentFragment(),g=u.cloneNode();f.appendChild(g),p.appendChild(u);var m=this.parent.frozenColCount(h),v=n.i(i._50)(h,m-1,!1,"columns"),y=this.parent.scrollSettings.enableVirtualization&&this.parent.viewport.leftIndex!==n.i(i._50)(h,0,!0,"columns");this.clearCFResult(h),e.cells.forEach(function(r,h){t=n.i(i.l)(h),t[1]!==e.indexes[1]&&a||(t[1]===e.indexes[1]&&(s=d.rowRenderer.render(t[0],!0)),m&&t[1]<m?(g.appendChild(s),a=s):(t[1]===e.indexes[1]&&g.appendChild(s),a=d.rowRenderer.render(t[0]),u.appendChild(a)),t[1]===e.indexes[1]&&(d.cellRenderer.renderRowHeader(t[0],s),c=n.i(o._117)(t[0]+1))),m&&(s=g.lastElementChild||s),l=d.cellRenderer.render({rowIdx:t[0],colIdx:t[1],cell:r,address:h,lastCell:t[1]===e.indexes[3],row:a,hRow:s,pRow:a.previousSibling,pHRow:s.previousSibling,isHeightCheckNeeded:!0,first:e.skipUpdateOnFirst||t[0]!==e.indexes[0]?y&&t[1]===e.indexes[1]?"Column":"":"Row",isRefreshing:!0}),d.checkRowMerge(t,e.indexes,l,r),m&&t[1]===v&&(a=null)}),this.colGroupWidth!==c&&this.updateLeftColGroup(c),this.contentPanel.querySelector(".e-row-header tbody")&&(n.i(r.detach)(this.contentPanel.querySelector(".e-row-header tbody")),this.getRowHeaderTable().appendChild(f)),this.contentPanel.querySelector(".e-sheet-content tbody")&&(n.i(r.detach)(this.contentPanel.querySelector(".e-sheet-content tbody")),this.getContentTable().appendChild(p)),this.parent.notify(o.v,{refresh:"Row",prevRowColCnt:e.prevRowColCnt}),h.conditionalFormats&&h.conditionalFormats.length&&this.parent.notify(i.b,{indexes:e.indexes,isRender:!0}),this.parent.allowChart&&this.parent.notify(o._85,{}),this.parent.isEdit&&this.parent.notify(o._69,null),this.parent.isOpen||this.parent.hideSpinner(),n.i(o._141)(this.parent.getMainContent(),{busy:!1})},e.prototype.updateCol=function(e,t,i){var o=this.col.cloneNode();if(o.style.width=n.i(r.formatUnit)(n.i(a.D)(e,t,null,!0)),i){var s=i.querySelector(".e-empty");return s?i.insertBefore(o,s):i.appendChild(o)}return o},e.prototype.updateColContent=function(e){var t=this;n.i(o._115)(function(){var s,l,d,c,h,p,u,f=0,g=t.parent.getActiveSheet(),m=t.parent.element.querySelector(".e-column-header .e-header-row"),v=m.firstElementChild,y=t.parent.element.querySelector(".e-sheet-content colgroup"),C=t.parent.element.querySelector(".e-column-header colgroup"),b=y.firstElementChild,x=C.firstElementChild,S=t.parent.element.querySelector(".e-sheet-content tbody"),w=t.parent.element.querySelector(".e-column-header tbody"),_=t.parent.frozenRowCount(g),I=t.parent.frozenColCount(g),E=n.i(i._50)(g,_-1,!1),R=n.i(i._50)(g,e.indexes[0],!0);t.clearCFResult(g),e.cells.forEach(function(o,k){if(!p){if(s=n.i(i.l)(k),"first"===e.direction&&s[1]===e.indexes[1]&&t.checkColMerge([s[0],t.parent.viewport.leftIndex+I],e.indexes,((s[0]<_?w:S).rows[f]||{cells:[]}).cells[e.indexes[3]-e.indexes[1]+1],n.i(a.I)(s[0],t.parent.viewport.leftIndex+I,g)||{}),s[0]===R&&("last"===e.direction?(h=t.col.cloneNode(),h.style.width=n.i(r.formatUnit)(n.i(a.D)(g,s[1],null,!0)),y.insertBefore(h,b),C.insertBefore(h.cloneNode(),x),t.cellRenderer.renderColHeader(s[1],m,v)):(h=t.updateCol(g,s[1],y),C.appendChild(h.cloneNode()),t.cellRenderer.renderColHeader(s[1],m)),t.parent.scrollSettings.enableVirtualization&&e.direction&&(n.i(r.detach)(y[e.direction+"ElementChild"]),n.i(r.detach)(C[e.direction+"ElementChild"]),n.i(r.detach)(m[e.direction+"ElementChild"]))),s[1]===e.indexes[1]){if(s[0]<_)l=w.children[f];else if(!(l=S.children[f]))return void(p=!0);f++,d=l.firstElementChild}u={colIdx:s[1],rowIdx:s[0],cell:o,address:k,row:l,lastCell:s[1]===e.indexes[3],isHeightCheckNeeded:"first"===e.direction,first:"last"!==e.direction||e.skipUpdateOnFirst||s[1]!==e.indexes[1]?"":"Column",checkNextBorder:"last"===e.direction&&s[3]===e.indexes[3]?"Column":"",isRefreshing:"first"===e.direction},"last"===e.direction?(u.refChild=d,c=t.cellRenderer.render(u),t.checkColMerge(s,e.indexes,c,o,((s[0]<_?w:S).rows[f-1]||{cells:[]}).cells[1])):c=t.cellRenderer.render(u),t.parent.scrollSettings.enableVirtualization&&e.direction&&n.i(r.detach)(l[e.direction+"ElementChild"]),_&&s[0]===E&&(f=0)}}),t.parent.notify(o.v,{refresh:"Column",prevRowColCnt:e.prevRowColCnt}),g.conditionalFormats&&g.conditionalFormats.length&&t.parent.notify(i.b,{indexes:e.indexes,isRender:!0}),t.parent.allowChart&&t.parent.notify(o._85,null),t.parent.isEdit&&t.parent.notify(o._69,{}),t.parent.isOpen||t.parent.hideSpinner(),n.i(o._141)(t.parent.getMainContent(),{busy:!1})})},e.prototype.updateRowContent=function(e){var t=this,s=this.parent.getMainContent();if(""!==e.direction||s.children.length){var l,d,c,h,p=this.colGroupWidth,u=this.parent.getActiveSheet(),f=0,g=s.querySelector("tbody"),m=this.parent.getRowHeaderContent().querySelector("tbody"),v=document.createDocumentFragment(),y=document.createDocumentFragment();this.parent.showSpinner();var C,b=this.parent.frozenColCount(u),x=this.parent.frozenRowCount(u),S=n.i(i._50)(u,e.indexes[1],!0,"columns"),w=n.i(i._50)(u,b-1,!1,"columns");this.clearCFResult(u),e.cells.forEach(function(s,_){h=n.i(i.l)(_),"first"===e.direction&&h[0]===e.indexes[0]&&(void 0===C&&(C=(h[1]<b?m:g).rows[e.indexes[2]-e.indexes[0]+1]||null),t.checkRowMerge([t.parent.viewport.topIndex+x,h[1]],e.indexes,(C||{cells:[]}).cells[h[1]<b?f+1:f],n.i(a.I)(t.parent.viewport.topIndex+x,h[1],u)||{})),h[1]!==S&&l||(h[1]===S&&(d=t.rowRenderer.render(h[0],!0)),b&&h[1]<b?(v.appendChild(d),l=d):(l=t.rowRenderer.render(h[0]),y.appendChild(l),h[1]===S&&v.appendChild(d),t.parent.scrollSettings.enableVirtualization&&e.direction&&n.i(r.detach)(g[e.direction+"ElementChild"])),h[1]===S&&(t.cellRenderer.renderRowHeader(h[0],d),p=n.i(o._117)(h[0]+1),t.parent.scrollSettings.enableVirtualization&&e.direction&&n.i(r.detach)(m[e.direction+"ElementChild"]))),b&&(d=v.lastElementChild||d),c=t.cellRenderer.render({colIdx:h[1],rowIdx:h[2],cell:s,address:_,row:l,lastCell:h[1]===e.indexes[3],pHRow:d.previousSibling,checkNextBorder:"last"===e.direction&&h[2]===e.indexes[2]?"Row":"",pRow:l.previousSibling,isHeightCheckNeeded:"first"===e.direction||""===e.direction,hRow:d,first:"last"!==e.direction||e.skipUpdateOnFirst||h[0]!==e.indexes[0]?"":"Row",isRefreshing:"first"===e.direction}),"last"===e.direction&&g.rows.length&&t.checkRowMerge(h,e.indexes,c,s,(h[1]<b?m:g).rows[0].cells[h[1]<b?f+1:f]),f++,b&&h[1]===w&&(l=null,C=void 0,f=0)}),this.colGroupWidth!==p&&this.updateLeftColGroup(p),"last"===e.direction?(m.insertBefore(v,m.firstElementChild),g.insertBefore(y,g.firstElementChild)):(m.appendChild(v),g.appendChild(y)),this.parent.scrollSettings.enableVirtualization&&this.parent.notify(o.v,{refresh:"Row",prevRowColCnt:e.prevRowColCnt}),u.conditionalFormats&&u.conditionalFormats.length&&this.parent.notify(i.b,{indexes:e.indexes,isRender:!0}),this.parent.isEdit&&this.parent.notify(o._69,null),this.parent.allowChart&&this.parent.notify(o._85,{}),this.parent.isOpen||this.parent.hideSpinner(),n.i(o._141)(this.parent.getMainContent(),{busy:!1})}},e.prototype.checkRowMerge=function(e,t,i,a,s){if(this.parent.scrollSettings.enableVirtualization&&i&&(!n.i(r.isNullOrUndefined)(a.rowSpan)||!n.i(r.isNullOrUndefined)(a.colSpan))){var l=this.parent.frozenRowCount(this.parent.getActiveSheet());if(e[0]===this.parent.viewport.topIndex+l){if(a.rowSpan<0){var d={td:i,rowIdx:e[0],colIdx:e[1],isRow:!0,isFreezePane:!0};if(this.parent.notify(o._56,d),d.insideFreezePane)return;this.parent.viewport.topIndex+l>=t[2]&&this.refreshPrevMerge(t[2]+1,e[1])}s&&this.refreshFirstCell(e[0]+(t[2]-t[0])+1,e[1],s)}else if(a.rowSpan>1){var c=t[2]+1;e[0]+a.rowSpan-1>=c&&e[0]<c&&this.refreshPrevMerge(c,e[1],this.parent.viewport.topIndex+l)}}},e.prototype.refreshPrevMerge=function(e,t,n){var r=this.parent.getCell(e,t,this.parent.getRow(n||0,null,t));r&&this.cellRenderer.refresh(e,t,null,r)},e.prototype.refreshFirstCell=function(e,t,r){var i=n.i(a.I)(e,t,this.parent.getActiveSheet(),!1,!0);(i.rowSpan<0||i.colSpan<0)&&this.cellRenderer.refresh(e,t,null,r)},e.prototype.checkColMerge=function(e,t,i,a,s){if(this.parent.scrollSettings.enableVirtualization&&i&&(!n.i(r.isNullOrUndefined)(a.rowSpan)||!n.i(r.isNullOrUndefined)(a.colSpan))){var l=this.parent.frozenColCount(this.parent.getActiveSheet());if(e[1]===this.parent.viewport.leftIndex+l){if(a.colSpan<0){var d={td:i,colIdx:e[1],rowIdx:e[0],isFreezePane:!0};if(this.parent.notify(o._56,d),d.insideFreezePane)return;if(this.parent.viewport.leftIndex+l>=t[3]){var c=this.parent.getCell(e[0],e[3]+1,this.parent.getRow(e[0],null,e[3]+1));c&&this.cellRenderer.refresh(e[0],t[3]+1,null,c)}}s&&this.refreshFirstCell(e[0],e[1]+(t[3]-t[1])+1,s)}else if(a.colSpan>1&&e[1]+a.colSpan-1>=t[3]+1&&e[1]<t[3]+1){var c=this.parent.getCell(e[0],e[3]+1,this.parent.getRow(e[0],null,e[3]+1));c&&this.cellRenderer.refresh(e[0],t[3]+1,null,c)}}},e.prototype.toggleGridlines=function(){var e=document.getElementById(this.parent.element.id+"_sheet");this.parent.getActiveSheet().showGridLines?e.classList.remove("e-hide-gridlines"):e.classList.add("e-hide-gridlines")},e.prototype.showHideHeaders=function(){var e=this,t=this.parent.getActiveSheet();n.i(o._115)(function(){if(t.showHeaders){var n=e.getContentPanel();e.setPanelWidth(t,e.getRowHeaderPanel()),e.setPanelHeight(t),document.getElementById(e.parent.element.id+"_sheet").classList.remove("e-hide-headers"),e.getColHeaderPanel().scrollLeft=n.scrollLeft,e.parent.selectRange(t.selectedRange)}else e.updateHideHeaders(t,document.getElementById(e.parent.element.id+"_sheet")),e.setPanelHeight(t),e.parent.frozenColCount(t)||e.parent.frozenRowCount(t)?(e.setPanelWidth(t,e.getRowHeaderPanel()),e.parent.selectRange(t.selectedRange)):(e.getContentPanel().style.width="",e.getContentPanel().style[e.parent.enableRtl?"right":"left"]=""),e.getScrollElement().style.left=e.getRowHeaderWidth(t)+"px"})},e.prototype.updateHideHeaders=function(e,t){e.showHeaders||t.classList.add("e-hide-headers")},e.prototype.rowHeightChanged=function(e){if(e.threshold||e.isHideShow){var t=this.parent.getActiveSheet();e.rowIdx<this.parent.frozenRowCount(t)&&this.setPanelHeight(t)}},e.prototype.colWidthChanged=function(e){if(e.threshold||e.isHideShow){var t=this.parent.getActiveSheet();e.colIdx<this.parent.frozenColCount(t)&&this.setPanelWidth(t,this.getRowHeaderPanel()),this.checkTableWidth(t)}},e.prototype.getRowHeaderWidth=function(e,t){var r=0;if(!t&&e.frozenColumns){var s=n.i(i.w)(e.topLeftCell)[1];r=n.i(a.E)(e,s,s+e.frozenColumns-1,!0)}return r+=e.showHeaders?n.i(o._140)(this.colGroupWidth):0},e.prototype.getColHeaderHeight=function(e,t){var r=n.i(i.w)(e.topLeftCell)[0];return(e.showHeaders&&!t?n.i(o._140)(31):0)+n.i(a.z)(e,r,r+e.frozenRows-1,!0)},e.prototype.getSelectAllContent=function(){return this.headerPanel.getElementsByClassName("e-selectall-container")[0]},e.prototype.getScrollElement=function(){var e=this.contentPanel.parentElement||this.contentPanel.nextElementSibling;return e&&e.querySelector(".e-scroller")},e.prototype.getSelectAllTable=function(){return this.headerPanel.getElementsByClassName("e-selectall-table")[0]},e.prototype.getColHeaderTable=function(){return this.headerPanel.getElementsByClassName("e-colhdr-table")[0]},e.prototype.getRowHeaderTable=function(){return this.contentPanel.getElementsByClassName("e-rowhdr-table")[0]},e.prototype.getContentTable=function(){return this.contentPanel.getElementsByClassName("e-content-table")[0]},e.prototype.getRowHeaderPanel=function(){return this.contentPanel.getElementsByClassName("e-row-header")[0]},e.prototype.getColHeaderPanel=function(){return this.headerPanel.getElementsByClassName("e-column-header")[0]},e.prototype.getContentPanel=function(){return this.contentPanel.getElementsByClassName("e-sheet-content")[0]},e.prototype.addEventListener=function(){this.parent.on(o._49,this.triggerCreatedEvent,this),this.parent.on(o._1,this.rowHeightChanged,this),this.parent.on(o._2,this.colWidthChanged,this),this.parent.on(o.i,this.removeEventListener,this)},e.prototype.destroy=function(){this.headerPanel&&this.headerPanel.remove(),this.headerPanel=null,this.contentPanel&&this.contentPanel.remove(),this.contentPanel=null,this.col&&this.col.remove(),this.col=null,this.rowRenderer=null,this.cellRenderer=null,this.colGroupWidth=null,this.parent=null},e.prototype.removeEventListener=function(){this.parent.off(o._49,this.triggerCreatedEvent),this.parent.off(o._1,this.rowHeightChanged),this.parent.off(o._2,this.colWidthChanged),this.parent.off(o.i,this.removeEventListener)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(0),i=n(1),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.initializeActionBegin=function(){var e=this,t=this.parent.beforeCellFormat;this.parent.beforeCellFormat=function(n){e.actionEventHandler({evtArgs:n,evtFunc:t,actionType:"begin",eventType:"format"})};var n=this.parent.beforeOpen;this.parent.beforeOpen=function(t){e.actionEventHandler({evtArgs:t,evtFunc:n,actionType:"begin",eventType:"beforeOpen"})};var r=this.parent.beforeSave;this.parent.beforeSave=function(t){e.actionEventHandler({evtArgs:t,evtFunc:r,actionType:"begin",eventType:"beforeSave"})};var i=this.parent.beforeSort;this.parent.beforeSort=function(t){e.actionEventHandler({evtArgs:t,evtFunc:i,actionType:"begin",eventType:"beforeSort"})}},e.prototype.initializeActionComplete=function(){var e=this,t=this.parent.sortComplete;this.parent.sortComplete=function(n){e.actionEventHandler({evtArgs:n,evtFunc:t,actionType:"complete",eventType:"sorting"})};var n=this.parent.cellSave;this.parent.cellSave=function(t){e.actionEventHandler({evtArgs:t,evtFunc:n,actionType:"complete",eventType:"cellSave"})}},e.prototype.actionEventHandler=function(e){e.evtFunc&&e.evtFunc.apply(this,[e]),"begin"===e.actionType?this.actionBeginHandler({eventArgs:e.evtArgs,action:e.eventType}):this.actionCompleteHandler({eventArgs:e.evtArgs,action:e.eventType})},e.prototype.actionBeginHandler=function(e){var t=e.preventAction;delete e.preventAction;var n={action:e.action};e.isUndo&&(n.isUndo=!0,delete e.isUndo),e.isRedo&&(n.isUndo=!1,delete e.isRedo),n.args=e,this.parent.trigger("actionBegin",n),t||"clipboard"!==e.action&&"format"!==e.action&&"cellSave"!==e.action&&"beforeWrap"!==e.action&&"beforeReplace"!==e.action&&"filter"!==e.action&&"beforeClear"!==e.action&&"beforeInsertImage"!==e.action&&"beforeInsertChart"!==e.action&&"chartDesign"!==e.action&&"cellDelete"!==e.action&&"autofill"!==e.action&&"removeValidation"!==e.action&&"hyperlink"!==e.action&&"removeHyperlink"!==e.action&&"deleteImage"!==e.action||this.parent.notify(i._20,{args:e}),t&&(e.preventAction=!0),n.isUndo&&(e.isUndo=!0),!1===n.isUndo&&(e.isRedo=!0)},e.prototype.actionCompleteHandler=function(e){var t=e.preventAction;delete e.preventAction,this.parent.notify(r._31,e),e.preventEventTrigger||this.parent.trigger("actionComplete",e),t||"undoRedo"===e.action||"gotoSheet"===e.action||this.parent.notify(i._19,{args:e}),this.parent.notify(i._101,null)},e.prototype.addEventListener=function(){this.parent.on(i._31,this.actionCompleteHandler,this),this.parent.on(r._34,this.actionBeginHandler,this),this.parent.on(i.i,this.removeEventListener,this)},e.prototype.removeEventListener=function(){this.parent.off(i._31,this.actionCompleteHandler),this.parent.off(r._34,this.actionBeginHandler),this.parent.off(i.i,this.removeEventListener)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(12),i=(n.n(r),n(3)),a=(n.n(i),n(1)),o=function(){function e(e){this.parent=e}return e.prototype.show=function(e,t){var o,s=this;t=!!n.i(i.isNullOrUndefined)(t);var l=e.close||null,d={header:"Spreadsheet",cssClass:this.parent.cssClass,target:this.parent.element,buttons:[],allowDragging:!0};e.close=function(){s.destroyDialog(),l&&l()},n.i(i.extend)(d,e),t&&(o=this.parent.serviceLocator.getService(a._174).getConstant(d.buttons.length?"Cancel":"Ok"),d.buttons.push({buttonModel:{content:o,isPrimary:0===d.buttons.length},click:this.hide.bind(this)}));var c=this.parent.createElement("div");document.body.appendChild(c),this.dialogInstance=new r.Dialog(d),this.dialogInstance.createElement=this.parent.createElement,this.dialogInstance.appendTo(c),this.dialogInstance.refreshPosition()},e.prototype.destroyDialog=function(){this.dialogInstance.destroy(),n.i(i.remove)(this.dialogInstance.element),this.dialogInstance=null},e.prototype.hide=function(e){this.dialogInstance&&(e&&(this.dialogInstance.animationSettings.effect="None",this.dialogInstance.dataBind()),this.dialogInstance.hide())},e.prototype.destroy=function(){this.parent=null},e}()},function(e,t,n){"use strict";var r=n(93);n.d(t,"a",function(){return r.a});var i=n(92);n.d(t,"b",function(){return i.a});var a=n(95);n.d(t,"c",function(){return a.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(5),i=n(1),a=n(0),o=n(3),s=(n.n(o),function(){function e(e){this.minHeight="300px",this.minWidth="400px",this.isOverlayClicked=!1,this.isResizerClicked=!1,this.currentWidth=400,this.currenHeight=300,this.parent=e,this.parent.on(i._97,this.isOverlaySelected,this),this.parent.on(i._71,this.refreshOverlayElem,this),this.parent.on(i.i,this.destroy,this)}return e.prototype.insertOverlayElement=function(e,t,s){var l=this.parent.createElement("div",{id:e,attrs:{class:"e-ss-overlay"},styles:"width: "+this.minWidth+"; height: "+this.minHeight});if(this.parent.allowEditing){var d=this.parent.element.getElementsByClassName("e-ss-overlay-active")[0];d&&(n.i(o.removeClass)([d],"e-ss-overlay-active"),this.parent.notify(r._87,{})),l.classList.add("e-ss-overlay-active")}var c=n.i(a.T)(t),h=this.parent.sheets[s],p=this.parent.frozenRowCount(h),u=this.parent.frozenColCount(h),f=n.i(i._121)(h,c,p,u,this.parent.viewport.beforeFreezeHeight,this.parent.viewport.beforeFreezeWidth,this.parent.sheetModule.colGroupWidth,!0);if(c[0]>=p&&c[1]<u){var g=this.parent.sheetModule.contentPanel;g.scrollTop&&(f.top-=g.scrollTop,f.top+=this.parent.getColumnHeaderContent().parentElement.getBoundingClientRect().height)}if(c[1]>=u&&c[0]<p){var m=this.parent.getScrollElement();m.scrollLeft&&(f.left-=m.scrollLeft,f.left+=this.parent.sheetModule.getRowHeaderWidth(h))}var v;return c[0]<p||c[1]<u?(v=this.parent.element.querySelector("#"+this.parent.element.id+"_sheet"),p&&(c[0]>=p?f.top+=(h.showHeaders?31:0)+n.i(a.z)(h,n.i(a.U)(h.topLeftCell)[0],p-1):u||(f.left+=this.parent.sheetModule.getRowHeaderWidth(h,!0))),u&&(c[1]>=u?f.left+=this.parent.sheetModule.getRowHeaderWidth(h):p||(f.left+=h.showHeaders?31:0))):v=this.parent.getMainContent(),l.style.top=Number(n.i(i._167)(f.top).toFixed(2))+"px",l.style.left=Number(n.i(i._167)(f.left).toFixed(2))+"px",s===this.parent.activeSheetIndex&&(v.appendChild(l),this.renderResizeHandler(l),this.addEventListener(l)),this.originalWidth=parseFloat(getComputedStyle(l,null).getPropertyValue("width").replace("px","")),this.originalHeight=parseFloat(getComputedStyle(l,null).getPropertyValue("height").replace("px","")),{element:l,top:f.top,left:f.left}},e.prototype.adjustFreezePaneSize=function(e,t,r){var i=n.i(a.T)(r),s=this.parent.getActiveSheet(),l=this.parent.frozenRowCount(s),d=this.parent.frozenColCount(s);if(i[0]<l||i[1]<d?(n.i(o.isNullOrUndefined)(e.top)||(t.style.top=e.top+(s.showHeaders?31:0)-this.parent.viewport.beforeFreezeHeight+"px"),n.i(o.isNullOrUndefined)(e.left)||(t.style.left=e.left+this.parent.sheetModule.getRowHeaderWidth(s,!0)-this.parent.viewport.beforeFreezeWidth+"px")):(n.i(o.isNullOrUndefined)(e.top)||(t.style.top=e.top-this.parent.viewport.beforeFreezeHeight-(l?n.i(a.z)(s,n.i(a.U)(s.topLeftCell)[0],l-1):0)+"px"),n.i(o.isNullOrUndefined)(e.left)||(t.style.left=e.left-this.parent.viewport.beforeFreezeWidth-(d?n.i(a.E)(s,n.i(a.U)(s.topLeftCell)[1],d-1):0)+"px")),n.i(o.isNullOrUndefined)(e.top)){var c=n.i(a.U)(s.topLeftCell)[0];e.top=this.parent.viewport.beforeFreezeHeight+(l&&c===i[0]?0:n.i(a.z)(s,l?c:0,i[0]-1))}if(n.i(o.isNullOrUndefined)(e.left)){var h=n.i(a.U)(s.topLeftCell)[1];e.left=this.parent.viewport.beforeFreezeWidth+(d&&h===i[1]?0:n.i(a.E)(s,d?h:0,i[1]-1))}},e.prototype.addEventListener=function(e){var t=e;o.EventHandler.add(t,n.i(i._126)(),this.overlayClickHandler,this),o.EventHandler.add(t,n.i(i._127)(),this.overlayMouseMoveHandler,this),o.EventHandler.add(this.parent.element.querySelector("#"+this.parent.element.id+"_sheet"),n.i(i._127)(),this.overlayMouseMoveHandler,this),o.EventHandler.add(document,n.i(i._128)(),this.overlayMouseUpHandler,this),this.parent.on(i._99,this.setOriginalSize,this)},e.prototype.setOriginalSize=function(e){this.originalHeight=e.height,this.originalWidth=e.width},e.prototype.overlayMouseMoveHandler=function(e){var t,r,s,l,d,c,h=e.target,p=document.getElementsByClassName("e-ss-overlay-active")[0],u=this.parent.getActiveSheet(),f=u.frozenRows||u.frozenColumns?[29,this.parent.sheetModule.getRowHeaderWidth(u,!0)]:[-1,-1];if(this.isOverlayClicked&&this.isResizerClicked)switch(n.i(i._130)(e)&&e.preventDefault(),this.resizer){case"e-ss-overlay-t":t=Math.max(this.originalMouseY-n.i(i._137)(e)+this.originalHeight,20),r=n.i(i._137)(e)-(this.originalMouseY-this.originalResizeTop),t>20&&r>f[0]&&(p.style.height=t+"px",p.style.top=r+"px",this.resizedReorderTop=r,this.currenHeight=t,this.parent.notify(a._129,{height:p.style.height,width:p.style.width,overlayEle:p}));break;case"e-ss-overlay-r":s=this.originalWidth+(n.i(i._138)(e)-this.originalMouseX),s>20&&(p.style.width=s+"px",this.currentWidth=s,this.parent.notify(a._129,{height:p.style.height,width:p.style.width,overlayEle:p}));break;case"e-ss-overlay-b":l=this.originalHeight+(n.i(i._139)(e)-this.originalMouseY),l>20&&(p.style.height=l+"px",this.currenHeight=l,this.parent.notify(a._129,{height:p.style.height,width:p.style.width,overlayEle:p}));break;case"e-ss-overlay-l":d=Math.max(this.originalMouseX-n.i(i._136)(e)+this.originalWidth,20),c=n.i(i._136)(e)-(this.originalMouseX-this.originalResizeLeft),d>20&&c>f[1]&&(p.style.width=d+"px",p.style.left=c+"px",this.resizedReorderLeft=c,this.currentWidth=d,this.parent.notify(a._129,{height:p.style.height,width:p.style.width,overlayEle:p}))}else if(this.isOverlayClicked)if(n.i(i._130)(e)&&e.preventDefault(),n.i(o.closest)(h,".e-sheet")&&!h.classList.contains("e-sheet-content")||h.classList.contains("e-cell")){if(!p)return;var g=n.i(i._136)(e)-this.diffX,m=n.i(i._137)(e)-this.diffY;g>f[1]&&(p.style.left=g+"px"),m>f[0]&&(p.style.top=m+"px"),this.resizedReorderLeft=g<0?0:g,this.resizedReorderTop=m<0?0:m}else this.overlayMouseUpHandler(e,!0)},e.prototype.overlayMouseUpHandler=function(e,t){if(this.parent&&!this.parent.getActiveSheet().isProtected&&this.parent.allowEditing){this.isResizerClicked=!1;var r=e.target,a=document.getElementsByClassName("e-datavisualization-chart e-ss-overlay-active");r.classList.contains("e-ss-overlay")||(r=n.i(o.closest)(e.target,".e-datavisualization-chart")?n.i(o.closest)(e.target,".e-datavisualization-chart"):r);var s=this.parent.getActiveSheet(),l={prevTop:s.frozenRows||s.frozenColumns?this.prevY:this.originalReorderTop,prevLeft:s.frozenRows||s.frozenColumns?this.prevX:this.originalReorderLeft,currentTop:this.resizedReorderTop>=0?parseInt(this.resizedReorderTop.toString(),10):this.originalReorderTop,currentLeft:this.resizedReorderLeft>=0?parseInt(this.resizedReorderLeft.toString(),10):this.originalReorderLeft,id:r.id,currentHeight:this.currenHeight,currentWidth:this.currentWidth,requestType:"imageRefresh",prevHeight:this.originalHeight,prevWidth:this.originalWidth};if(this.isOverlayClicked||t){var d=void 0,c=void 0,h={clientY:l.prevTop,isImage:!0},p={clientX:l.prevLeft,isImage:!0},u=this.parent.element.getElementsByClassName("e-ss-overlay-active")[0];if(s.frozenRows||s.frozenColumns){if(!u)return;h.isImage=!1,p.isImage=!1,h.target=u,p.target=u,l.prevTop<this.parent.getColumnHeaderContent().getBoundingClientRect().bottom&&(h.target=this.parent.getColumnHeaderContent()),l.prevLeft<this.parent.getRowHeaderContent().getBoundingClientRect().right&&(p.target=this.parent.getRowHeaderTable());var f=u.getBoundingClientRect();d={clientY:f.top},c={clientX:f.left},f.top<this.parent.getColumnHeaderContent().getBoundingClientRect().bottom&&(d.target=this.parent.getColumnHeaderContent()),f.left<this.parent.getRowHeaderContent().getBoundingClientRect().right&&(c.target=this.parent.getRowHeaderTable())}else d={clientY:l.currentTop,isImage:!0},c={clientX:l.currentLeft,isImage:!0};if(this.parent.notify(i._73,h),this.parent.notify(i._73,d),this.parent.notify(i._74,p),this.parent.notify(i._74,c),d.size&&(l.currentTop=d.size),c.size&&(l.currentLeft=c.size),l.prevRowIdx=h.clientY,l.prevColIdx=p.clientX,l.currentRowIdx=d.clientY,l.currentColIdx=c.clientX,(s.frozenColumns||s.frozenRows)&&!n.i(o.closest)(u,".e-sheet-content")){var g=this.parent.frozenColCount(s),m=this.parent.frozenRowCount(s);if(l.currentRowIdx>=m&&l.currentColIdx>=g){var v=parseInt(u.style.top,10),y=parseInt(u.style.left,10);v+=this.parent.sheetModule.contentPanel.scrollTop,v-=this.parent.getColumnHeaderContent().parentElement.getBoundingClientRect().height;y+=this.parent.getScrollElement().scrollLeft,y-=this.parent.sheetModule.getRowHeaderWidth(s),u.style.top=v+"px",u.style.left=y+"px",this.parent.getMainContent().appendChild(u)}}a&&a[0]&&a[0].querySelector(".e-control")&&(l.id=a[0].id),this.originalReorderTop!==this.resizedReorderTop||this.originalReorderLeft!==this.resizedReorderLeft?(l.id=u.id,a&&a[0]?(l.requestType="chartRefresh",this.parent.notify(i._78,l)):this.parent.notify(i._72,l),this.resizedReorderTop=this.originalReorderTop,this.resizedReorderLeft=this.originalReorderLeft):this.currenHeight===this.originalHeight&&this.originalWidth===this.currentWidth||(l.id=r.id.indexOf("overlay")>0?r.id:r.parentElement&&r.parentElement.classList.contains("e-ss-overlay")?r.parentElement.id:u.id,a&&a[0]?(l.requestType="chartRefresh",this.parent.notify(i._78,l)):this.parent.notify(i._72,l),this.originalHeight=this.currenHeight,this.originalWidth=this.currentWidth)}this.isOverlayClicked=!1}},e.prototype.isOverlaySelected=function(e){e.isOverlayClicked=this.isOverlayClicked},e.prototype.refreshOverlayElem=function(e){if(e){var t=".e-ss-overlay-active"+(e&&e.selector||""),i=this.parent.element.querySelector(t);i&&(n.i(o.removeClass)([i],"e-ss-overlay-active"),this.parent.notify(r._87,{}))}else for(var t="e-ss-overlay-active",a=Array.from(this.parent.element.getElementsByClassName(t)),s=0;s<a.length;s++){var l=a[s];l&&(n.i(o.removeClass)([l],"e-ss-overlay-active"),this.parent.notify(r._87,{}))}this.parent.notify(r._83,null)},e.prototype.overlayClickHandler=function(e){if(!this.parent.getActiveSheet().isProtected&&this.parent.allowEditing){this.isOverlayClicked=!0;var t=e.target,r=e.target;t.classList.contains("e-ss-overlay")||(r=t.parentElement,n.i(o.closest)(e.target,".e-datavisualization-chart")&&(r=n.i(o.closest)(e.target,".e-datavisualization-chart")));var s=this.parent.getActiveSheet();if((s.frozenColumns||s.frozenRows)&&n.i(o.closest)(r,".e-sheet-content")){var l=parseInt(r.style.top,10),d=parseInt(r.style.left,10);l-=this.parent.sheetModule.contentPanel.scrollTop,l+=this.parent.getColumnHeaderContent().parentElement.getBoundingClientRect().height;d-=this.parent.getScrollElement().scrollLeft,d+=this.parent.sheetModule.getRowHeaderWidth(s),r.style.top=l+"px",r.style.left=d+"px",this.parent.element.querySelector("#"+this.parent.element.id+"_sheet").appendChild(r)}this.originalWidth=this.currentWidth=parseFloat(r.style.width),this.originalHeight=this.currenHeight=parseFloat(r.style.height),this.originalReorderLeft=parseFloat(r.style.left),this.originalReorderTop=parseFloat(r.style.top),this.resizedReorderLeft=parseFloat(r.style.left),this.resizedReorderTop=parseFloat(r.style.top),this.originalResizeTop=this.originalReorderTop,this.originalResizeLeft=this.originalReorderLeft,this.originalMouseX=n.i(i._136)(e),this.originalMouseY=n.i(i._137)(e),this.diffX=this.originalMouseX-this.originalReorderLeft,this.diffY=this.originalMouseY-this.originalReorderTop;var c=document.getElementsByClassName("e-ss-overlay-active")[0];c&&n.i(o.removeClass)([c],"e-ss-overlay-active"),this.parent.element.querySelector("#"+r.id).classList.add("e-ss-overlay-active"),t.classList.contains("e-ss-resizer")&&(this.resizer=t.classList[0],this.isResizerClicked=!0),r.classList.contains("e-datavisualization-chart")&&(this.parent.notify(a._133,{id:r.id}),c||this.parent.notify(i._86,{id:r.id}));var h=r.getBoundingClientRect();this.prevX=h.left,this.prevY=h.top}},e.prototype.renderResizeHandler=function(e){for(var t,n=["e-ss-overlay-t","e-ss-overlay-r","e-ss-overlay-b","e-ss-overlay-l"],r=0;r<n.length;)t=this.parent.createElement("div",{className:n[r]+" e-ss-resizer"+(o.Browser.isDevice?" e-ss-resizer-touch":""),styles:"width: 8px; height: 8px; border-radius: 4px;"}),e.appendChild(t),r++},e.prototype.removeEventListener=function(){var e=this.parent.element.querySelectorAll(".e-ss-overlay");if(e.length)for(var t=0;t<e.length;t++)o.EventHandler.remove(e[t],n.i(i._126)(),this.overlayClickHandler),o.EventHandler.remove(e[t],n.i(i._127)(),this.overlayMouseMoveHandler);var r=this.parent.element.querySelector("#"+this.parent.element.id+"_sheet");r&&o.EventHandler.remove(r,n.i(i._127)(),this.overlayMouseMoveHandler),document&&o.EventHandler.remove(document,n.i(i._128)(),this.overlayMouseUpHandler),this.parent.isDestroyed||(this.parent.off(i._99,this.setOriginalSize),this.parent.off(i._97,this.isOverlaySelected),this.parent.off(i._71,this.refreshOverlayElem),this.parent.off(i.i,this.destroy))},e.prototype.destroy=function(){this.removeEventListener(),this.currentWidth&&(this.currentWidth=null),this.currenHeight&&(this.currenHeight=null),this.minHeight&&(this.minHeight=null),this.minWidth&&(this.minWidth=null),this.isOverlayClicked&&(this.isOverlayClicked=null),this.isResizerClicked&&(this.isResizerClicked=null),this.parent=null},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(3),i=(n.n(r),n(4)),a=n(2),o=n(0),s=n(2),l=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.getFillInfo=function(e){for(var t=this.parent.serviceLocator.getService(a.E),i="",s=!0,l="CopyCells",d=[],c=["Down","Up"].indexOf(e.direction)>-1,h=this.getRangeData({range:e.dataRange,sheetIdx:this.parent.activeSheetIndex}),p=h.join().replace(/,/g,"").length,u=this.isRange(e.dataRange)&&p?h.length:1;u--;)if(i=h[u]&&!n.i(r.isNullOrUndefined)(h[u].value)?h[u].value:"",n.i(o._190)(i)||n.i(o._160)(i)||n.i(o._190)(i[i.length-1])){s=!1,l=this.parent.autoFillSettings.fillType;break}return p&&!s||(d.push(t.getConstant("FillSeries")),l="FillSeries"===e.fillType?l:e.fillType),(!c||c&&e.dataRange[1]!==e.dataRange[3])&&d.push("Flash Fill"),{fillType:l,disableItems:d}},e.prototype.isRange=function(e){return e&&(e[0]!==e[2]||e[1]!==e[3])},e.prototype.autoFill=function(e){if(e.dataRange&&e.fillRange&&e.direction&&this.parent.allowEditing&&(!this.parent.getActiveSheet().isProtected||!e.isLockedCell)){var t=n.i(a._10)(n.i(a.l)(e.dataRange)),r=n.i(a._10)(n.i(a.l)(e.fillRange)),i={dataRange:t,fillRange:r,direction:e.direction,fillType:e.fillType||this.fillInfo.fillType,sheetIndex:n.i(a.L)(this.parent,e.dataRange)};switch(this.fillInfo=this.getFillInfo({dataRange:t,fillRange:r,fillType:e.fillType,direction:e.direction}),this.fillInfo.fillType=e.isFillOptClick?e.fillType:this.fillInfo.fillType,e.fillType){case"FillSeries":case"FillWithoutFormatting":this.fillSeries(i);break;case"CopyCells":case"FillFormattingOnly":this.copyCells(i)}}},e.prototype.fillSeries=function(e){for(var t,s,l,d,c,h,p,u,f,g,m,v,y,C,b,x,S,w,_,I,E,R,k,A,F,N,T={},O=0,D=n.i(r.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,L=n.i(i.g)(this.parent,D),P=e.dataRange[0],M=e.dataRange[1],B=e.dataRange[2],H=e.dataRange[3],U=e.fillRange[0],V=e.fillRange[1],j=e.fillRange[2],z=e.fillRange[3],q=["Down","Up"].indexOf(e.direction)>-1,W=["Up","Left"].indexOf(e.direction)>-1,G=q?H-M:B-P,Y="FillSeries"===e.fillType,X=L.conditionalFormats&&L.conditionalFormats.length&&[].slice.call(L.conditionalFormats),K=[];O<=G;){if(c=this.updateFillValues(q,P,M,B,H,U,V,j,z,O),h=c.patternRange,p=c.fillRange,l=this.getPattern(h,{isReverseFill:W,isVFill:q}),u=this.getRangeData({range:h,sheetIdx:D}),v=u.length,!l||!l.length)return;for(s=l.length,_=this.getSelectedRange(L,{rowIndex:p[0],colIndex:p[1]},{rowIndex:p[2],colIndex:p[3]}),I=_.length,W&&(_=_.reverse(),l=l.reverse(),l=this.ensurePattern(l),u=u.reverse()),y=0;y<I;){switch(E=_[y],d=l[y%s],n.i(o._190)(d)&&(d=l[d]),b=y%v,d.type){case"number":case"date":if(d=d,d.isStartWithMonth&&1===v?(k=n.i(a._3)(d.regVal.a),A=new Date(k),k.setMonth(k.getMonth()+d.regVal.b*d.i),A.getDate()>28&&A.getDate()!==k.getDate()&&(A.setDate(1),A.setMonth(A.getMonth()+d.regVal.b*d.i),A.setDate(new Date(A.getFullYear(),A.getMonth()+1,0).getDate()),k=A),t=n.i(a.W)(k).toString()):(t=this.round(d.regVal.a+d.regVal.b*d.i,5).toString(),d.val&&(g="string"==typeof d.val[0]&&d.val[0].match(/^0+/))&&(f=this.getNextFormattedValue(d.val[0],Number(t)))),d.dataVal){if(void 0===d.copy&&!g&&(d.copy=d.val.length>2,d.copy))for(var $=2;$<d.val.length&&(d.copy=Math.abs(this.round(d.regVal.a+d.regVal.b*$,5))!==d.val[$],!d.copy);$++);t=d.copy?u[b]&&!n.i(r.isNullOrUndefined)(u[b].value)?u[b].value:"":d.start?Math.abs(Number(t))+d.dataVal:g?d.dataVal+f:d.dataVal+Math.abs(Number(t))}W?d.i--:d.i++;break;case"string":var Z=d.i%d.val.length;t=d.val[Z],d.i++;break;case"formula":for(w=!1,t="=",C=0,x=d.val.length;C<x;)m=d.val[C],"object"==typeof m?(w=!0,S=this.round(m.a+m.b*d.i,5),t+=S<1?"#REF!":q?m.c+(m.b?S:"$"+S):(m.b?n.i(o.Y)(S):m.c.substring(0,m.c.search(/\d/))+"$"+n.i(o.Y)(S))+m.c.trim()):t+=m,C++;w&&W?d.i--:d.i++;break;case"time":t=(d.regVal.a+d.regVal.b*d.i).toString(),W?d.i--:d.i++}R=n.i(i.h)(E.rowIndex,E.colIndex,L,!1,!0),Y?Object.assign(T,u[b],null,!0):(T.style=R.style,T.format=R.format,T.wrap=R.wrap,T.rowSpan=R.rowSpan,T.colSpan=R.colSpan),T.value=t,n.i(o._160)(t)&&(T.formula=t),F={cell:T,rowIdx:E.rowIndex,colIdx:E.colIndex,valChange:!0,uiRefresh:!0,pvtExtend:!0,skipFormatCheck:!0},n.i(a.C)(this.parent,L,F),X&&!N&&((N=F.isFormulaDependent)||n.i(o._179)(X,K,E.rowIndex,E.colIndex)),T={},y++}O++}(K.length||N)&&this.parent.notify(a.b,{cfModel:!N&&K,refreshAll:N,isAction:!0,isEdit:!0})},e.prototype.copyCells=function(e){for(var t,s,l,d,c,h,p,u,f,g,m,v,y,C=0,b={},x=e.dataRange[0],S=e.dataRange[1],w=e.dataRange[2],_=e.dataRange[3],I=e.fillRange[0],E=e.fillRange[1],R=e.fillRange[2],k=e.fillRange[3],A=["Down","Up"].indexOf(e.direction)>-1,F=["Up","Left"].indexOf(e.direction)>-1,N=A?_-S:w-x,T=n.i(r.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,O=n.i(i.g)(this.parent,T),D="FillFormattingOnly"===e.fillType,L=O.conditionalFormats&&O.conditionalFormats.length&&[].slice.call(O.conditionalFormats),P=[];C<=N;){for(c=this.updateFillValues(A,x,S,w,_,I,E,R,k,C),l=c.patternRange,d=c.fillRange,h=this.getRangeData({range:l,sheetIdx:T}),p=h.length,u=this.getSelectedRange(O,{rowIndex:d[0],colIndex:d[1]},{rowIndex:d[2],colIndex:d[3]}),f=u.length,t=0,F&&(u=u.reverse());t<f;)s=t%p,g=u[t],D&&(m=n.i(i.h)(g.rowIndex,g.colIndex,O)),Object.assign(b,h[s],null,!0),D&&(b.value=m.value,b.formula=m.formula),y={cell:b,rowIdx:g.rowIndex,colIdx:g.colIndex,valChange:!0,uiRefresh:!0,pvtExtend:!0},n.i(a.C)(this.parent,O,y),L&&!v&&((v=y.isFormulaDependent)||n.i(o._179)(L,P,g.rowIndex,g.colIndex)),b={},t++;C++}(P.length||v)&&this.parent.notify(a.b,{cfModel:!v&&P,refreshAll:v,isAction:!0,isEdit:!0})},e.prototype.updateFillValues=function(e,t,n,r,i,a,o,s,l,d){var c,h,p,u;return e?(c={rowIndex:t,colIndex:n+d},h={rowIndex:r,colIndex:n+d},p={rowIndex:a,colIndex:o+d},u={rowIndex:s,colIndex:o+d}):(c={rowIndex:t+d,colIndex:n},h={rowIndex:t+d,colIndex:i},p={rowIndex:a+d,colIndex:o},u={rowIndex:a+d,colIndex:l}),{patternRange:[c.rowIndex,c.colIndex,h.rowIndex,h.colIndex],fillRange:[p.rowIndex,p.colIndex,u.rowIndex,u.colIndex]}},e.prototype.getDataPattern=function(e){var t,i,a,l,d,c=0,h={val:null,type:null},p=[],u=this.getRangeData({range:e,sheetIdx:this.parent.activeSheetIndex}),f=u.length;if(f){for(var g=void 0,m=void 0,v=void 0,y=void 0,C=function(e){return!l&&e&&"-"===e[e.length-1]?e.slice(0,e.length-1):e};c<f;){if(d=!1,u[c])if(u[c].formula&&n.i(o._160)(u[c].formula))t=u[c].formula,a="formula";else{t=n.i(r.isNullOrUndefined)(u[c].value)?"":u[c].value;var b={};if(v=u[c].format,y=n.i(o._190)(t),v&&n.i(o.O)(v,!0,b)){if(a=b.type,t&&!y){var x={value:t,updatedVal:t,cell:u[c]};this.parent.notify(s._6,x),x.isDate||x.isTime?u[c].value=t=x.updatedVal:a="string"}d="date"===a&&v.toLowerCase().startsWith("mmm")}else a=y?"number":"string"}else t="",a="string";if(m="","string"===a){if(l=!1,n.i(o._190)(t[0])){g=0;do{g++}while(n.i(o._190)(t[g]));" "===t[g]&&(l=!0,a="number",m=t.slice(g,t.length),t=Number(t.slice(0,g)))}if(t=t,!l&&n.i(o._190)(t[t.length-1])){g=1;do{g++}while(n.i(o._190)(t[t.length-g]));a="number",g-=1,m=t.slice(0,t.length-g),i=t.slice(t.length-g,t.length),t=i.match(/^0+/)?i:Number(i),h.dataVal&&h.dataVal!==m&&h.dataVal===C(m)&&(m=h.dataVal)}}0===c?(h={val:[t],type:a,isStartWithMonth:d},m&&(h.dataVal=m,h.start=l)):a!==h.type||h.dataVal&&C(h.dataVal)!==C(m)?(p.push(h),h={val:[t],type:a},m&&(h.dataVal=m,h.start=l)):h.val.push(t),c++}return p.push(h),p}return[{val:null,type:null}]},e.prototype.getPredictionValue=function(e,t){for(var n=0,r=0,i=0,a=0,o=0,s=0,l=0,d=e.length;n<d;)r+=n,i+=Number(e[n]),a+=n*Number(e[n]),o+=n*n,n++;return t?(s=(i*o-r*a)/(d*o-r*r),l=(d*a-r*i)/(d*o-r*r)):(s=this.round((i*o-r*a)/(d*o-r*r),5),l=this.round((d*a-r*i)/(d*o-r*r),5)),{a:s,b:l}},e.prototype.getPattern=function(e,t){var r,i,o,s,l,d,c,h=0,p=[],u=this.getDataPattern(e),f=u.length;if(u){for(;h<f;){switch(c=u[h],c.type){case"number":case"date":if(i=p.length,d=c.val.length,l=t.isReverseFill?-1:d,1===d){var g=parseFloat(c.val[0])+1;"string"==typeof c.val[0]&&c.val[0].match(/^0+/)?c.val.push(this.getNextFormattedValue(c.val[0],g)):c.val.push(g)}for(s=this.getPredictionValue(c.dataVal?c.val.slice(0,2):c.val),o={regVal:s,type:c.type,i:l,isStartWithMonth:c.isStartWithMonth},c.dataVal&&(o.dataVal=c.dataVal,o.val=c.val,o.start=c.start),p.push(o),r=1;r<d;)p.push(i),r++;break;case"string":for(i=p.length,o={val:c.val,type:c.type,i:0},p.push(o),r=1,d=c.val.length;r<d;)p.push(i),r++;break;case"formula":if(d=c.val.length,c=this.getFormulaPattern(c.val,t),l=t.isReverseFill?-1:d,c.isInPattern)for(i=p.length,o={val:c.val,type:"formula",i:l},p.push(o),r=1;r<d;)p.push(i),r++;else for(r=0,l=t.isReverseFill?-1:1;r<d;)p.push({val:c.val[r],type:"formula",i:l}),r++;break;case"time":if(i=p.length,d=c.val.length,l=t.isReverseFill?-1:d,1===d){var m=n.i(a._3)(c.val[0]),v=Number(c.val[0]),y=v>0&&v<1,C=n.i(a.W)(new Date(m.getTime()+36e5),!0,y);c.val.push(C)}for(s=this.getPredictionValue(c.val,!0),o={regVal:s,type:c.type,i:l},p.push(o),r=1;r<d;)p.push(i),r++}h++}return p}return[{regVal:null}]},e.prototype.getNextFormattedValue=function(e,t){return(new r.Internationalization).formatNumber(Math.abs(t),{minimumIntegerDigits:e.length,useGrouping:!1})},e.prototype.isCellReference=function(e){return/^[a-z]{1,3}\d{1,7}$/gi.test(e)?"relative":/^\$[a-z]{1,3}\$\d{1,7}$/gi.test(e)?"absolute":!!/^((\$[a-z]{1,3})\d{1,7}|[a-z]{1,3}(\$\d{1,7}))$/gi.test(e)&&"mixed"},e.prototype.round=function(e,t){return Number(Math.round(parseFloat(e+"e"+t))+"e-"+t)||Number(e)},e.prototype.getRangeData=function(e){for(var t,r=[],a=this.parent.getActiveSheet(),o=e.range[0],s=e.range[1],l=e.range[2],d=e.range[3],c=s;o<=l;)if(n.i(i.i)(a,o))o++;else{for(s=c;s<=d;)n.i(i.a)(a,s)?s++:(t=n.i(i.h)(o,s,a),r.push(t),s++);o++}return r},e.prototype.getFormulaPattern=function(e,t){for(var n,r,i,a,o=[],l=0,d=e.length,c={};l<d;)c.formula=e[l],this.parent.notify(s._11,c),o.push(c.formulaArr),l++;var h=this.isInPattern(o,t.isVFill);if(h){for(i=o[0],l=i.length;l--;)r=i[l],(a=this.isCellReference(r))&&"absolute"!==a&&(i[l]=this.getCellRefPrediction(r,t,null,a));return{isInPattern:h,val:i}}for(l=0;l<d;){for(i=o[l],n=i.length;n--;)r=i[n],(a=this.isCellReference(r.trim()))&&"absolute"!==a&&(o[l][n]=this.getCellRefPrediction(r,t,d,a));l++}return{isInPattern:h,val:o}},e.prototype.generateColCount=function(e){for(var t=0,n=e.split("").reverse().join(""),r=n.length-1;r>=0;r--)t+=(e[r].charCodeAt(parseInt(n[r],10))-64)*Math.pow(26,r);return t},e.prototype.getCellRefPrediction=function(e,t,n,r){e=e.toUpperCase();var i=new RegExp("[a-z$]","gi"),a=new RegExp("[0-9$]","g"),o=t.isVFill?e.replace(a,""):e.replace(i,""),s=t.isVFill?Number(e.replace(i,"")):this.generateColCount(e.replace(a,"").trim()),l=null,d=[s],c="$"===e[0];if(!c&&e.includes("$")&&"$"===e.trim()[0])for(var h=1;h<e.length;h++)if("$"===e[h]){l=h,c=!0;break}return n&&1!==n?d.push(s+n):d.push(s+1),s=this.getPredictionValue(d),r&&"mixed"===r&&(c===t.isVFill?o=l?o.substring(0,l)+"$"+o.substring(l):"$"+o:s.b=0),s.c=o,s},e.prototype.isInPattern=function(e,t){var n,r,i,a,o,s,l,d,c=0,h=1,p=e.length,u=new RegExp("[0-9$]","g"),f=new RegExp("[a-z$]","gi");if(1===p)return!1;for(;h<p;){if(n=e[c],i=e[h],r=n.length,a=i.length,r!==a)return!1;for(;r--;)if(o=n[r],s=i[r],this.isCellReference(o)===this.isCellReference(s)){if(t?(l=Number(o.replace(f,"")),d=Number(s.replace(f,""))):(l=this.generateColCount(o.replace(u,"")),d=this.generateColCount(s.replace(u,""))),l!==d-1)return!1}else if(o!==s)return!1;c++,h++}return!0},e.prototype.ensurePattern=function(e){for(var t,n=-1,r=e.length;r--;)t=e[r],"object"==typeof t?(n=r,"string"===t.type&&(t.val=t.val.reverse())):e[r]=n;return e},e.prototype.getSelectedRange=function(e,t,r){var o,s,l,d=[],c=n.i(a._10)([t.rowIndex,t.colIndex,r.rowIndex,r.colIndex]);o=c[0];for(var h=c[2];o<=h;)if(n.i(i.r)(e,o))o++;else{for(s=c[1],l=c[3];s<=l;)d.push({rowIndex:o,colIndex:s}),s++;o++}return d},e.prototype.getFillType=function(e){return e.fillType=this.fillInfo.fillType,e.disableItems=this.fillInfo.disableItems,e},e.prototype.addEventListener=function(){this.parent.on(a.U,this.autoFill,this),this.parent.on(a._12,this.getFillType,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a.U,this.autoFill),this.parent.off(a._12,this.getFillType))},e.prototype.getModuleName=function(){return"workbookautofill"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(2),i=n(0),a=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.format=function(e){var t,a=this,o=e.range;o&&"string"==typeof o&&o.indexOf("!")>-1?(o=o.split("!")[1],t=this.parent.sheets[n.i(i.e)(this.parent,e.range.split("!")[0])]):t=this.parent.getActiveSheet(),void 0===o&&(o=t.selectedRange);var s="object"!=typeof o&&e.onActionUpdate,l={range:o,style:Object.assign({},e.style),requestType:"CellFormat"};e.borderType&&(l.borderType=e.borderType);var d={};if(Object.assign(d,l.style,null,!0),s&&(this.parent.trigger("beforeCellFormat",l),this.parent.notify("actionBegin",{eventArgs:l,action:"format"}),l.cancel))return void(e.cancel=!0);var c="object"==typeof l.range?l.range:n.i(r._10)(n.i(r.l)(l.range));e.borderType&&(this.setTypedBorder(t,e.style.border,c,e.borderType,e.onActionUpdate),delete e.style.border,delete l.style.border);var h,p,u={cell:null,rowIdx:0,colIdx:0,eventOnly:!0,preventEvt:!s},f=function(e){return u.cell={style:e},u.rowIdx=h,u.colIdx=p,n.i(i._175)(a.parent,t,u)};if(void 0!==l.style.borderTop){for(p=c[1];p<=c[3];p++)h=c[0],f({borderTop:l.style.borderTop})||(e.isUndoRedo||(this.checkAdjacentBorder(t,"borderBottom",h-1,p),this.checkFullBorder(t,"borderBottom",h-1,p)),this.checkFullBorder(t,"borderTop",h,p),this.setCellBorder(t,u.cell.style,h,p,e.onActionUpdate,p===c[3],null,null,e.isUndoRedo));delete l.style.borderTop}if(void 0!==l.style.borderBottom){var g=void 0,m=void 0;for(p=c[1];p<=c[3];p++)h=c[0],g=n.i(i.I)(h,p,t,!1,!0),m=g.rowSpan>0?n.i(i.I)(c[2],c[1],t,!1,!0):n.i(i.I)(c[2],c[3],t,!1,!0),g.rowSpan>1&&m.rowSpan<0||(h=c[2]),f({borderBottom:l.style.borderBottom})||(e.isUndoRedo||(this.checkAdjacentBorder(t,"borderTop",c[2]+1,p),this.checkFullBorder(t,"borderTop",c[2]+1,p)),this.checkFullBorder(t,"borderBottom",c[2],p),this.setCellBorder(t,u.cell.style,h,p,e.onActionUpdate,p===c[3],null,null,e.isUndoRedo),this.setBottomBorderPriority(t,c[2],p));delete l.style.borderBottom}if(void 0!==l.style.borderLeft){for(var v=c[0];v<=c[2];v++)p=c[1],f({borderLeft:l.style.borderLeft})||(e.isUndoRedo||(this.checkAdjacentBorder(t,"borderRight",v,p-1),this.checkFullBorder(t,"borderRight",v,p-1)),this.checkFullBorder(t,"borderLeft",v,p),this.setCellBorder(t,u.cell.style,v,p,e.onActionUpdate,null,null,null,e.isUndoRedo));delete l.style.borderLeft}if(void 0!==l.style.borderRight){for(var y=c[0];y<=c[2];y++)p=c[3],f({borderRight:l.style.borderRight})||(e.isUndoRedo||(this.checkAdjacentBorder(t,"borderLeft",y,p+1),this.checkFullBorder(t,"borderLeft",y,p+1)),this.checkFullBorder(t,"borderRight",y,p),this.setCellBorder(t,u.cell.style,y,p,e.onActionUpdate,null,null,null,e.isUndoRedo));delete l.style.borderRight}var C,b,x;if(Object.keys(l.style).length){var S=this.parent,w=S.viewport&&this.parent.getActiveSheet().id===t.id,_=this.parent.frozenRowCount(t),I=this.parent.frozenColCount(t),E=[_+S.viewport.topIndex,I+S.viewport.leftIndex,S.viewport.bottomIndex,S.viewport.rightIndex],R=void 0,k=void 0,A=void 0,F=void 0;for(h=c[0];h<=c[2];h++)if(k=n.i(i.t)(t,h)||{},!k.isFiltered)for(R=h>=E[0]&&h<=E[2]||h<_,A=!1,p=c[1];p<=c[3];p++)if(!f(l.style)){if(void 0===b&&(void 0!==l.style.border?(C=l.style.border,delete l.style.border,b=!0):b=!1),x=n.i(i.I)(h,p,t,!1,!0),x.rowSpan>1||x.colSpan>1)for(var N=h,T=x.rowSpan>1?h+(x.rowSpan-1):h;N<=T;N++)for(var O=p,D=x.colSpan>1?p+(x.colSpan-1):p;O<=D;O++)b&&this.setFullBorder(t,C,c,N,O,e.onActionUpdate,!0),this.setCellStyle(t,N,O,l.style);if(b&&this.setFullBorder(t,C,c,h,p,e.onActionUpdate),this.setCellStyle(t,h,p,l.style),w)if(R&&(p>=E[1]&&p<=E[3]||p<I)){if(F=null,l.style.color&&x.format&&x.format.includes("[")){var L=n.i(i.M)(x.format);L&&(F=L.toLowerCase())}this.parent.notify(r.f,{style:l.style,rowIdx:h,colIdx:p,lastCell:p===c[3],isHeightCheckNeeded:!0,manualUpdate:!0,onActionUpdate:e.onActionUpdate,formatColor:F})}else k.customHeight||(A=A||n.i(i._173)(l.style,e.onActionUpdate))&&this.parent.notify(r.f,{rowIdx:h,colIdx:p,lastCell:p===c[3],checkHeight:!0,outsideViewport:!R,onActionUpdate:e.onActionUpdate})}}b&&(l.style.border=C),this.parent.setUsedRange(c[2],c[3]),e.refreshRibbon&&this.parent.notify(r.Q,null),s&&(l.style=d,l.range=t.name+"!"+o,this.parent.notify("actionComplete",{eventArgs:l,action:"format"}))},e.prototype.setBottomBorderPriority=function(e,t,r){if(n.i(i.v)(e,t+1)){var a=this.skipHiddenRows(e,t+1);""!==this.parent.getCellStyleValue(["borderTop"],[a,r]).borderTop&&(e.rows[t].cells[r].style.bottomPriority=!0)}},e.prototype.setFullBorder=function(e,t,n,r,i,a,o){var s={};r===n[0]&&(this.checkAdjacentBorder(e,"borderBottom",r-1,i),this.checkFullBorder(e,"borderBottom",r-1,i)),i===n[1]&&(this.checkAdjacentBorder(e,"borderRight",r,i-1),this.checkFullBorder(e,"borderRight",r,i-1)),i===n[3]?(this.checkAdjacentBorder(e,"borderLeft",r,i+1),this.checkFullBorder(e,"borderLeft",r,i+1)):this.checkAdjacentBorder(e,"border",r,i+1),s.borderRight=t,s.borderTop=t,s.borderLeft=t,s.borderBottom=t,this.setCellBorder(e,s,r,i,a,i===n[3],null,o),r===n[2]?(this.checkAdjacentBorder(e,"borderTop",r+1,i),this.checkFullBorder(e,"borderTop",r+1,i),this.setBottomBorderPriority(e,r,i)):this.checkAdjacentBorder(e,"border",r+1,i)},e.prototype.checkAdjacentBorder=function(e,t,n,r){var i={};""!==this.parent.getCellStyleValue([t],[n,r])[""+t]&&(i[""+t]=void 0,this.setCellStyle(e,n,r,i))},e.prototype.checkFullBorder=function(e,t,n,r){var i=this.parent.getCellStyleValue(["border"],[n,r]).border;if(""!==i){var a={border:void 0};["borderBottom","borderTop","borderLeft","borderRight"].forEach(function(e){e!==t&&(a[""+e]=i)}),this.setCellStyle(e,n,r,a)}},e.prototype.textDecorationActionUpdate=function(e){var t=this.parent.getActiveSheet(),i={range:t.selectedRange,style:e.style,requestType:"CellFormat"};if(this.parent.trigger("beforeCellFormat",i),this.parent.notify("actionBegin",{eventArgs:i,action:"format"}),i.cancel)return void(e.cancel=!0);var a,o=n.i(r._10)(n.i(r.l)(t.selectedRange)),s=e.style.textDecoration,l=s,d=n.i(r.l)(t.activeCell),c=this.parent.getCellStyleValue(["textDecoration"],d).textDecoration,h=!1;"underline"===c?l="underline"===s?"none":"underline line-through":"line-through"===c?l="line-through"===s?"none":"underline line-through":"underline line-through"===c&&(l="underline"===s?"line-through":"underline",h=!0),"none"===l&&(h=!0),this.format({style:{textDecoration:l},range:d,refreshRibbon:e.refreshRibbon,onActionUpdate:!0});for(var p=o[0];p<=o[2];p++)for(var u=o[1];u<=o[3];u++)if(p!==d[0]||u!==d[1]){if(a={},"none"===(c=this.parent.getCellStyleValue(["textDecoration"],[p,u]).textDecoration)){if(h)continue;a.textDecoration=s}else if("underline"===c||"line-through"===c)if(h){if(s!==c)continue;a.textDecoration="none"}else a.textDecoration=s!==c?"underline line-through":s;else if("underline line-through"===c){if(!h)continue;a.textDecoration="underline"===s?"line-through":"underline"}this.format({style:a,range:[p,u,p,u],refreshRibbon:e.refreshRibbon,onActionUpdate:!0})}i.range=t.name+"!"+i.range,i.style.textDecoration=l,this.parent.notify("actionComplete",{eventArgs:i,action:"format"})},e.prototype.setTypedBorder=function(e,t,n,r,i){var a;if("Outer"===r){for(var o=n[1];o<=n[3];o++)this.checkAdjacentBorder(e,"borderBottom",n[0]-1,o),this.checkFullBorder(e,"borderBottom",n[0]-1,o),this.setCellBorder(e,{borderTop:t},n[0],o,i,o===n[3]),this.checkAdjacentBorder(e,"borderTop",n[2]+1,o),this.checkFullBorder(e,"borderTop",n[2]+1,o),this.setCellBorder(e,{borderBottom:t},n[2],o,i,o===n[3],r),this.setBottomBorderPriority(e,n[2],o);for(var s=n[0];s<=n[2];s++)this.checkAdjacentBorder(e,"borderRight",s,n[1]-1),this.checkFullBorder(e,"borderRight",s,n[1]-1),this.setCellBorder(e,{borderLeft:t},s,n[1],i),this.checkAdjacentBorder(e,"borderLeft",s,n[3]+1),this.checkFullBorder(e,"borderLeft",s,n[3]+1),this.setCellBorder(e,{borderRight:t},s,n[3],i,null,r)}else if("Inner"===r)for(var l=n[0];l<=n[2];l++)for(var d=n[1];d<=n[3];d++){var c={};a=this.parent.getCellStyleValue(["border"],[l,d]).border,""!==a&&(c.border=void 0,d!==n[3]&&d!==n[1]&&l!==n[0]&&l!==n[2]||(l===n[0]&&(c.borderTop=a),l===n[2]&&(c.borderBottom=a),d===n[3]&&(c.borderRight=a),d===n[1]&&(c.borderLeft=a))),d!==n[3]&&(c.borderRight=t),l!==n[0]&&(c.borderTop=t),l!==n[2]&&(c.borderBottom=t),d!==n[1]&&(c.borderLeft=t),this.setCellBorder(e,c,l,d,i,d===n[3])}else if("Vertical"===r)for(var l=n[0];l<=n[2];l++)for(var d=n[1];d<=n[3];d++){var c={borderRight:t,borderLeft:t};d===n[1]&&(this.checkAdjacentBorder(e,"borderRight",l,d-1),this.checkFullBorder(e,"borderRight",l,d-1)),d===n[3]&&(this.checkAdjacentBorder(e,"borderLeft",l,d+1),this.checkFullBorder(e,"borderLeft",l,d+1)),this.setCellBorder(e,c,l,d,i)}else for(var l=n[0];l<=n[2];l++)for(var d=n[1];d<=n[3];d++){var c={borderTop:t,borderBottom:t};l===n[0]&&(this.checkAdjacentBorder(e,"borderBottom",l-1,d),this.checkFullBorder(e,"borderBottom",l-1,d)),this.setCellBorder(e,c,l,d,i,d===n[3]),l===n[2]&&(this.checkAdjacentBorder(e,"borderTop",l+1,d),this.checkFullBorder(e,"borderTop",l+1,d),this.setBottomBorderPriority(e,l,d))}},e.prototype.setCellBorder=function(e,t,n,i,a,o,s,l,d){if(this.setCellStyle(e,n,i,t),!l&&this.parent.getActiveSheet().id===e.id){if("Outer"===s&&(t.borderBottom||t.borderRight)){var c={range:[n,i,n,i]};this.parent.notify(r._15,c),n=c.range[0],i=c.range[1]}d&&(""===t.borderTop&&""!==this.parent.getCellStyleValue(["borderBottom"],[n-1,i]).borderBottom&&(t.borderTop=this.parent.getCellStyleValue(["borderBottom"],[n-1,i]).borderBottom),""===t.borderLeft&&""!==this.parent.getCellStyleValue(["borderRight"],[n,i-1]).borderRight&&(t.borderLeft=this.parent.getCellStyleValue(["borderRight"],[n,i-1]).borderRight),""===t.borderRight&&""!==this.parent.getCellStyleValue(["borderLeft"],[n,i+1]).borderLeft&&(t.borderRight=this.parent.getCellStyleValue(["borderLeft"],[n,i+1]).borderLeft)),this.parent.notify(r.f,{style:t,rowIdx:n,colIdx:i,onActionUpdate:a,first:"",lastCell:o,isHeightCheckNeeded:!0,manualUpdate:!0})}},e.prototype.setCellStyle=function(e,t,n,r){e.rows[t]?e.rows[t].cells||(e.rows[t].cells=[]):e.rows[t]={cells:[]},e.rows[t].cells[n]||(e.rows[t].cells[n]={}),e.rows[t].cells[n].style||(e.rows[t].cells[n].style={}),Object.assign(e.rows[t].cells[n].style,r,null,!0)},e.prototype.skipHiddenRows=function(e,t){return t++,n.i(i.v)(e,t)&&(t=this.skipHiddenRows(e,t)),t},e.prototype.addEventListener=function(){this.parent.on(r.G,this.format,this),this.parent.on(r._69,this.textDecorationActionUpdate,this),this.parent.on(r._70,this.clearCellObj,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(r.G,this.format),this.parent.off(r._69,this.textDecorationActionUpdate),this.parent.off(r._70,this.clearCellObj))},e.prototype.clearCellObj=function(e){var t,a,o,s,l,d=e.range?e.range.indexOf("!")>0?e.range.split("!")[1]:e.range.split("!")[0]:this.parent.getActiveSheet().selectedRange,c=e.range&&e.range.indexOf("!")>0?n.i(i.e)(this.parent,e.range.split("!")[0]):this.parent.activeSheetIndex,h=n.i(i.l)(this.parent,c),p=n.i(r._10)(n.i(r.m)(d)),u=p[0],f=p[2],g=h.conditionalFormats&&h.conditionalFormats.length&&[].slice.call(h.conditionalFormats),m=[];for(u;u<=f;u++)for(o=p[1],s=p[3],o;o<=s;o++){var v=n.i(i.I)(u,o,h);if(v)switch(e.type){case"Clear Formats":delete v.format,delete v.rowSpan,delete v.style,delete v.wrap,delete v.colSpan;break;case"Clear Contents":v.hyperlink&&this.parent.notify(r._71,{sheet:h,rowIdx:u,colIdx:o,preventRefresh:!0}),l=!(!v.value&&!v.formula),delete v.value,delete v.formula,l&&(a={action:"refreshCalculate",rowIndex:u,colIndex:o,sheetIndex:c},this.parent.notify(i._49,a),g&&!t&&((t=a.isFormulaDependent)||n.i(i._179)(g,m,u,o)));break;case"Clear Hyperlinks":delete v.hyperlink;break;case"Clear All":l=!(!v.value&&!v.formula),n.i(i.J)(u,o,h,{},!1),l&&(a={action:"refreshCalculate",rowIndex:u,colIndex:o,sheetIndex:c},this.parent.notify(i._49,a),g&&!t&&(t=a.isFormulaDependent))}}(m.length||t)&&c===this.parent.activeSheetIndex&&this.parent.notify(i._120,{cfModel:!t&&m,refreshAll:t,isAction:!0})},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"workbookcellformat"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(4),i=n(2),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i._33,this.validationHandler,this),this.parent.on(i._34,this.addHighlightHandler,this),this.parent.on(i._35,this.removeHighlightHandler,this),this.parent.on(i._36,this.beforeInsertDeleteHandler,this),this.parent.on(i._37,this.beforeInsertDeleteHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._33,this.validationHandler),this.parent.off(i._34,this.addHighlightHandler),this.parent.off(i._35,this.removeHighlightHandler),this.parent.off(i._36,this.beforeInsertDeleteHandler),this.parent.off(i._37,this.beforeInsertDeleteHandler))},e.prototype.validationHandler=function(e){var t=this,o=e.range,s="";e.range.indexOf("!")>-1&&(o=e.range.split("!")[1],s=e.range.split("!")[0]);var l=n.i(r.g)(this.parent,s?n.i(r.m)(this.parent,s):this.parent.activeSheetIndex);this.parent.dataValidationRange=(this.parent.dataValidationRange.indexOf("!")>-1?"":l.name+"!")+this.parent.dataValidationRange+o+",";var d=this.getRangeWhenColumnSelected(o,l);o=d.range,n.i(a.isNullOrUndefined)(s)||(e.range=s+"!"+o),e.range=e.range||l.selectedRange;var c,h,p,u=n.i(i._10)(n.i(i.l)(e.range));e.viewport&&d.isFullCol&&(p=n.i(i._38)(this.parent,e.viewport)),","!==this.parent.listSeparator&&!e.isRemoveValidation&&"List"===e.rules.type&&e.rules.value1.includes(this.parent.listSeparator)&&(e.rules.value1=e.rules.value1.split(this.parent.listSeparator).join(","));for(var f=this,g=u[1];g<=u[3];g++)!function(a){if(d.isFullCol){if(h=n.i(r.t)(l,a),!e.isRemoveValidation)return h=n.i(r.t)(l,a),h.validation={operator:e.rules.operator,type:e.rules.type,value1:e.rules.value1,value2:e.rules.value2,inCellDropDown:e.rules.inCellDropDown,ignoreBlank:e.rules.ignoreBlank},"continue";if(h&&h.validation)return delete h.validation,p&&p.forEach(function(e){for(var o=e[0];o<=e[2];o++)c=n.i(r.h)(o,a,l),t.parent.notify(i.f,{rowIdx:o,colIdx:a,style:t.parent.getCellStyleValue(["backgroundColor","color"],[o,a])})}),"continue"}for(var o=u[0];o<=u[2];o++)e.isRemoveValidation?(o===u[2]&&(h=n.i(r.t)(l,a))&&h.validation&&(h.validation.address=n.i(i._39)(h.validation.address,[u[0],a,u[2],a],a)),(c=n.i(r.h)(o,a,l))&&c.validation&&!n.i(i.C)(f.parent,l,{cell:{validation:{}},rowIdx:o,colIdx:a})&&(delete c.validation,f.parent.notify(i.f,{rowIdx:o,colIdx:a,style:f.parent.getCellStyleValue(["backgroundColor","color"],[o,a])}))):(c={validation:Object.assign({},e.rules)},n.i(i.C)(f.parent,l,{cell:c,rowIdx:o,colIdx:a}))}(g)},e.prototype.addHighlightHandler=function(e){this.InvalidDataHandler(e.range,!1,e.td,e.isclearFormat)},e.prototype.removeHighlightHandler=function(e){this.InvalidDataHandler(e.range,!0)},e.prototype.getRange=function(e){var t=n.i(i.l)(e),r=this.parent.getActiveSheet(),a=r.colCount,o=r.rowCount;return t[2]===o-1&&0===t[0]?e=e.replace(/[0-9]/g,""):t[3]===a-1&&0===t[2]&&(e=e.replace(/\D/g,"")),e},e.prototype.InvalidDataHandler=function(e,t,a,o){var s,l,d=e?n.i(i.L)(this.parent,e):this.parent.activeSheetIndex,c=n.i(r.g)(this.parent,d);e=e||c.selectedRange;var h=e.includes("!")?n.i(r.n)(e):c.name,p=this.getRangeWhenColumnSelected(n.i(i._40)(e),c),u=p.isFullCol;e=h+"!"+p.range;var f=e?n.i(i._10)(n.i(i.l)(e)):[];e=this.getRange(e);var g=e?f[0]:0,m=e?f[2]:c.rows.length;for(g;g<=m;g++)if(c.rows[g]){var v=e?f[1]:0,y=e?f[3]:c.rows[g].cells.length;for(v;v<=y;v++){var C=void 0;if(c.rows[g].cells&&c.rows[g].cells[v]){var b=n.i(r.t)(c,v);if((s=c.rows[g].cells[v])&&s.validation){if(C=s.validation,o&&!C.isHighlighted)return;t?C.isHighlighted&&(s.validation.isHighlighted=!1):s.validation.isHighlighted=!0}else if(b&&b.validation){if(C=b.validation,o&&!C.isHighlighted)return;t&&u?C.isHighlighted&&(b.validation.isHighlighted=!1):u&&(b.validation.isHighlighted=!0)}l=s.value?s.value:"";var x=[g,v];if(C&&this.parent.allowDataValidation){var S={value:l,range:x,sheetIdx:d,isCell:!1,td:a,isValid:!0};this.parent.notify(i._41,S);var w=S.isValid;w||n.i(r.i)(c,g)||d!==this.parent.activeSheetIndex||this.parent.notify(i._42,{isRemoveHighlightedData:t,rowIdx:g,colIdx:v,td:a})}}}}},e.prototype.beforeInsertDeleteHandler=function(e){if("Sheet"!==e.modelType)for(var t,a,o=0,s=this.parent.sheets.length;o<s;o++){a=this.parent.sheets[o];for(var l=0,d=a.rows.length;l<d;l++)if(a.rows[l]&&a.rows[l].cells)for(var c=0,h=a.rows[l].cells.length;c<h;c++)if((t=a.rows[l].cells[c])&&t.validation){var p="beforeInsert"===e.name,u=e.index+(e.model.length-1),f="Row"===e.modelType?l>=e.index&&l<=u:c>=e.index&&c<=u,g=void 0;g=p?{insertDeleteArgs:{startIndex:e.index,endIndex:e.index+e.model.length-1,modelType:e.modelType,isInsert:!0,sheet:n.i(r.g)(this.parent,e.activeSheetIndex)},row:l,col:c,sheetIdx:o}:{insertDeleteArgs:{startIndex:e.start,modelType:e.modelType,endIndex:e.end,sheet:e.model},row:l,col:c,sheetIdx:o},n.i(i.k)(t.validation.value1)&&!f&&(g.cell={formula:t.validation.value1},this.parent.notify(i._43,g),t.validation.value1=g.cell.formula),n.i(i.k)(t.validation.value2)&&!f&&(g.cell={formula:t.validation.value2},this.parent.notify(i._43,g),t.validation.value2=g.cell.formula),e.activeSheetIndex===o&&p&&this.updateValidationForInsertedModel(e,a,l,c,t.validation)}}},e.prototype.getRangeWhenColumnSelected=function(e,t){var r,a=e.split(":");return e.match(/\D/g)&&!e.match(/[0-9]/g)?(a[0]+=1,a[1]+=t.rowCount,e=a[0]+":"+a[1],r=!0):!e.match(/\D/g)&&e.match(/[0-9]/g)&&(a[0]="A"+a[0],a[1]=n.i(i.i)(0,t.colCount-1).replace(/[0-9]/g,"")+a[1],e=a[0]+":"+a[1]),{range:e,isFullCol:r}},e.prototype.updateValidationForInsertedModel=function(e,t,i,o,s){var l=e.index+(e.model.length-1);if("Column"===e.modelType){if("before"===e.insertType&&l===o-1||"after"===e.insertType&&e.index-1===o)for(var d=e.index;d<=l;d++)n.i(r.e)(i,d,t,{validation:n.i(a.extend)({},s)},!0)}else if("Row"===e.modelType&&("above"===e.insertType&&l===i-1||"below"===e.insertType&&e.index-1===i))for(var d=e.index;d<=l;d++)n.i(r.e)(d,o,t,{validation:n.i(a.extend)({},s)},!0)},e.prototype.getModuleName=function(){return"workbookDataValidation"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(0),i=n(2),a=n(0),o=n(3),s=(n.n(o),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.deleteModel=function(e){var t=this,o=this.parent.sheets.length;if("Sheet"!==e.modelType||1!==o){var s=e.modelType.toLowerCase()+"s";if(e.start=e.start,e.start>e.end){var l=e.start;e.start=e.end,e.end=l}var d={startIndex:e.start,endIndex:e.end,modelType:e.modelType,cancel:!1,isUndoRedo:e.isUndoRedo},c={eventArgs:d,action:"delete"};if(!e.isAction||(this.parent.notify(a._34,c),!d.cancel)){var h,p,u=[],f=e.end-e.start+1,g={startIndex:e.start,endIndex:e.end,modelType:e.modelType,sheet:e.model},m=this.parent.scrollSettings.isFinite;if("Row"===e.modelType){if(void 0!==e.checkCount&&e.checkCount===e.model.usedRange.rowIndex)return;if(this.parent.notify(a._149,g),e.model=e.model,m){if(e.start>=e.model.rowCount)return;e.end>=e.model.rowCount&&(e.end=e.model.rowCount-1)}else{if(e.start>e.model.usedRange.rowIndex)return;e.end>e.model.usedRange.rowIndex&&(e.end-=e.end-e.model.usedRange.rowIndex)}this.setRowColCount(e.start,e.end,e.model,"row"),e.start<=e.model.usedRange.rowIndex&&(e.model.usedRange.rowIndex-=e.end-e.start+1,e.model.usedRange.rowIndex<0&&(e.model.usedRange.rowIndex=0));var v=this.parent.frozenRowCount(e.model);e.start<v&&(v=e.end<v?e.end-e.start+1:v-e.start,v=e.model.frozenRows-v,this.parent.setSheetPropertyOnMute(e.model,"frozenRows",v),d.freezePane=!0);var y=e.end+1,C=void 0,b=void 0;if(e.model.rows[e.start]&&e.model.rows[e.start].cells)for(var x=0;x<=e.model.usedRange.colIndex;x++){if(e.model.rows[e.start].cells[x]&&void 0!==e.model.rows[e.start].cells[x].rowSpan&&e.model.rows[e.start].cells[x].rowSpan<0&&void 0===e.model.rows[e.start].cells[x].colSpan&&(b={range:[e.start,x,e.start,x]},this.parent.notify(i._15,b),b.range=b.range,b.range[2]<=e.end&&(p=n.i(r.I)(b.range[0],x,e.model),p&&p.rowSpan>1&&(p.rowSpan-(b.range[2]-e.start+1)>1?n.i(r.J)(b.range[0],x,e.model,{colSpan:p.rowSpan-(b.range[2]-e.start+1)},!0):delete e.model.rows[b.range[0]].cells[x].rowSpan),b=null)),e.model.rows[y]&&e.model.rows[y].cells&&e.model.rows[y].cells[x]&&void 0!==e.model.rows[y].cells[x].rowSpan&&e.model.rows[y].cells[x].rowSpan<0&&void 0===e.model.rows[y].cells[x].colSpan&&(b||(b={range:[y,x,y,x]},this.parent.notify(i._15,b)),C=new Object,b.range=b.range,Object.assign(C,n.i(r.I)(b.range[0],b.range[1],e.model)),C&&C.rowSpan&&(C.rowSpan>1||C.colSpan>1))){var S=[];S[1]=x,S[3]=C.colSpan>1?x+(C.colSpan-1):x,b.range=b.range,b.range[0]<e.start?(S[0]=S[2]=b.range[0],C.rowSpan-f>1&&(S[2]+=C.rowSpan-f-1)):(S[0]=S[2]=e.start,C.rowSpan-(e.end-b.range[0]+1)>1&&(S[2]+=C.rowSpan-(e.end-b.range[0]+1)-1)),u.push({range:S,isAction:!1,preventRefresh:!0,merge:!0,type:"All",skipChecking:!0})}b=null}d.sheetCount=e.model.usedRange.rowIndex}else if("Column"===e.modelType){if(void 0!==e.checkCount&&e.checkCount===e.model.usedRange.colIndex)return;if(this.parent.notify(a._149,g),e.model=e.model,m){if(e.start>=e.model.colCount)return;e.end>=e.model.colCount&&(e.end=e.model.colCount-1)}else{if(e.start>e.model.usedRange.colIndex)return;e.end>e.model.usedRange.colIndex&&(e.end-=e.end-e.model.usedRange.colIndex)}this.setRowColCount(e.start,e.end,e.model,"col"),e.start<=e.model.usedRange.colIndex&&(e.model.usedRange.colIndex-=f,e.model.usedRange.colIndex<0&&(e.model.usedRange.colIndex=0));var w=this.parent.frozenColCount(e.model);e.start<w&&(w=e.end<w?e.end-e.start+1:w-e.start,w=e.model.frozenColumns-w,this.parent.setSheetPropertyOnMute(e.model,"frozenColumns",w),this.parent.updateTopLeftCell(),d.freezePane=!0),h=[];for(var y=e.end+1,C=void 0,b=void 0,x=0;x<=e.model.usedRange.rowIndex;x++)if(h.push({}),e.model.rows[x]&&e.model.rows[x].cells){if(e.model.rows[x].cells[e.start]&&void 0!==e.model.rows[x].cells[e.start].colSpan&&e.model.rows[x].cells[e.start].colSpan<0&&void 0===e.model.rows[x].cells[e.start].rowSpan&&(b={range:[x,e.start,x,e.start]},this.parent.notify(i._15,b),b.range=b.range,b.range[3]<=e.end)){var _=n.i(r.I)(x,b.range[1],e.model);_&&_.colSpan>1&&(_.colSpan-(b.range[3]-e.start+1)>1?n.i(r.J)(x,b.range[1],e.model,{colSpan:_.colSpan-(b.range[3]-e.start+1)},!0):delete e.model.rows[x].cells[b.range[1]].colSpan),b=null}if(e.model.rows[x].cells[y]&&void 0!==e.model.rows[x].cells[y].colSpan&&e.model.rows[x].cells[y].colSpan<0&&void 0===e.model.rows[x].cells[y].rowSpan&&(b||(b={range:[x,y,x,y]},this.parent.notify(i._15,b)),C=new Object,b.range=b.range,Object.assign(C,n.i(r.I)(b.range[0],b.range[1],e.model)),C&&C.colSpan&&(C.colSpan>1||C.rowSpan>1))){var S=[];S[0]=x,S[2]=C.rowSpan>1?x+(C.rowSpan-1):x,b.range=b.range,b.range[1]<e.start?(S[1]=S[3]=b.range[1],C.colSpan-f>1&&(S[3]+=C.colSpan-f-1)):(S[1]=S[3]=e.start,C.colSpan-(e.end-b.range[1]+1)>1&&(S[3]+=C.colSpan-(e.end-b.range[1]+1)-1)),u.push({range:S,isAction:!1,preventRefresh:!0,merge:!0,type:"All",skipChecking:!0})}h[x].cells=e.model.rows[x].cells.splice(e.start,f),b=null}d.sheetCount=e.model.usedRange.colIndex,d.deletedCellsModel=h}else{if(e.end-e.start==this.parent.sheets.length-1||void 0!==e.checkCount&&e.checkCount===this.parent.sheets.length)return;d.sheetCount=this.parent.sheets.length,d.activeSheetIndex=this.parent.activeSheetIndex}for(var I=[],E="Row"===e.modelType&&e.start<e.model.maxHgts.length,x=e.start;x<=e.end;x++){var R=e.model[""+s];"Sheet"===e.modelType&&R[x]&&this.parent.notify(i.j,{action:"deleteSheetTab",sheetId:R[x].id}),R[e.start]||e.start<R.length?(I.push(R[e.start]||{}),R.splice(e.start,1)):I.push({}),x===e.start&&(I[0].index=e.start),E&&e.model.maxHgts.splice(e.start,1)}u.forEach(function(e){return t.parent.notify(i.M,e)}),this.parent.notify(i._37,e),"Sheet"!==e.modelType&&(this.parent.notify(i._44,e),d.refreshSheet=e.refreshSheet,d.activeSheetIndex=n.i(a.e)(this.parent,e.model.name),d.conditionalFormats=[],this.deleteConditionalFormats(e,d)),d.definedNames=g.definedNames,d.isAction=e.isAction,d.deletedModel=I,delete d.cancel,this.parent.notify(i._45,c)}}},e.prototype.setRowColCount=function(e,t,n,r){var i=r+"Count",o=n[""+i];t>=o&&(t=o-1),t<e||(this.parent.setSheetPropertyOnMute(n,i,o-(t-e+1)),n.id===this.parent.getActiveSheet().id&&this.parent.notify(a._48,{index:o-1,update:r,isDelete:!0,start:e,end:t}))},e.prototype.setDeleteInfo=function(e,t,n,r){void 0===r&&(r="Row");var i=t-e+1,a=[];this.parent.getActiveSheet().ranges.forEach(function(o){o.info&&e<o.info[""+n]&&(o.info["delete"+r+"Range"]?o.info["delete"+r+"Range"].push([e,t]):o.info["delete"+r+"Range"]=[[e,t]],o.info[""+n]-=i,o.info["insert"+r+"Range"]&&(o.info["insert"+r+"Range"]=a))})},e.prototype.deleteConditionalFormats=function(e,t){var r=e.model.conditionalFormats;if(r)for(var s=0;s<r.length;s++){t.conditionalFormats.push(n.i(o.extend)({},r[s],null,!0));var l=n.i(i.l)(r[s].range),d=n.i(i.l)(e.model.selectedRange);"Column"===e.modelType&&d[1]<=l[1]&&d[3]>=l[3]||"Row"===e.modelType&&d[0]<=l[0]&&d[2]>=l[2]?(r.splice(r.indexOf(r[s]),1),s--):r[s].range=n.i(i.g)(n.i(a._178)(e,l))}},e.prototype.addEventListener=function(){this.parent.on(i.K,this.deleteModel,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i.K,this.deleteModel)},e.prototype.getModuleName=function(){return"workbookdelete"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return d});var r=n(4),i=n(6),a=n(2),o=n(3),s=(n.n(o),n(2)),l=n(19),d=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i.l,this.performEditOperation,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i.l,this.performEditOperation)},e.prototype.getModuleName=function(){return"workbookEdit"},e.prototype.performEditOperation=function(e){switch(e.action){case"updateCellValue":e.isFormulaDependent=this.updateCellValue(e.address,e.value,e.sheetIndex,e.isValueOnly,e.skipFormatCheck,e.isRandomFormula,e.skipCellFormat)}},e.prototype.updateCellValue=function(e,t,d,c,h,p,u){void 0===d&&(d=this.parent.activeSheetIndex);var f,g;f="string"==typeof e?n.i(a.l)(e):e;var m=n.i(r.g)(this.parent,d),v=n.i(r.h)(f[0],f[1],m,!0);if(v||(v=m.rows[f[0]].cells[f[1]]={}),c)v.value=t;else{var y=n.i(s.k)(t);y="#SPILL!"===t||y;var C=!1;v.formula&&v.formula.indexOf("UNIQUE")>-1&&""===t&&(C=!0);var b=!("Text"===n.i(l.h)(v.format)||y&&t.toLowerCase().startsWith("=text("));y||C||(v.formula&&(v.formula=""),v.value=b?n.i(a._48)(t):t);var x={action:"refreshCalculate",value:t,rowIndex:f[0],colIndex:f[1],sheetIndex:d,isFormula:y,isRandomFormula:p};if(b&&!h){var S={value:t,rowIndex:f[0],colIndex:f[1],sheetIndex:d,updatedVal:"",skipCellFormat:u};y?t.toLowerCase().includes("unique(")&&(S.updatedVal=t):this.parent.notify(i.W,S),!n.i(o.isNullOrUndefined)(S.updatedVal)&&S.updatedVal.length>0&&(v.value=S.updatedVal)}if("#SPILL!"===t)v.value=t;else{var w={cellIdx:f,isUnique:!1};if(this.parent.notify(i._24,w),C?t=v.value:(this.parent.notify(i.g,x),g=x.isFormulaDependent),y){v.formula=x.value,t=v.value;var _=v.formula.toLowerCase();"=now()"!==_||v.format&&"General"!==v.format?_.includes("=time(")&&!v.format&&(v.format="h:mm AM/PM"):v.format=n.i(l.i)("ShortDate")+" h:mm"}else!v.value||"string"!=typeof v.value||0!==v.value.indexOf("www.")&&0!==v.value.indexOf("https://")&&0!==v.value.indexOf("http://")&&0!==v.value.indexOf("ftp://")||this.parent.notify(a.O,{hyperlink:v.value,cell:m.name+"!"+n.i(a.i)(f[0],f[1])})}}return this.parent.setUsedRange(f[0],f[1],m),!this.parent.chartColl.length||this.parent.isEdit||p||this.parent.notify(i.d,{cell:v,rIdx:f[0],cIdx:f[1],sheetIdx:d}),g},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(4),i=n(2),a=n(3),o=(n.n(a),this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},o.apply(this,arguments)}),s=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i._21,this.find,this),this.parent.on(i._22,this.replace,this),this.parent.on(i._23,this.replaceAll,this),this.parent.on(i._24,this.totalCount,this),this.parent.on(i._25,this.findAllValues,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._21,this.find),this.parent.off(i._22,this.replace),this.parent.off(i._23,this.replaceAll),this.parent.off(i._24,this.totalCount),this.parent.off(i._25,this.findAllValues))},e.prototype.find=function(e){e.sheetIndex=n.i(a.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex;var t=this.parent.sheets[e.sheetIndex],r=n.i(i.l)(t.activeCell),o={startRow:r[0],startCol:r[1],findVal:e.isCSen?e.value:e.value.toLowerCase(),activeCell:r};("By Row"===e.searchBy?o.startRow>t.usedRange.rowIndex:o.startCol>t.usedRange.colIndex)?"next"===e.findOpt?o.startRow=o.startCol=0:(o.startRow=t.usedRange.rowIndex,o.startCol=t.usedRange.colIndex):"By Row"===e.searchBy?o.startCol>t.usedRange.colIndex&&("next"===e.findOpt?(o.startRow++,o.startRow>t.usedRange.rowIndex&&(o.startRow=0),o.startCol=0):(o.startRow--,o.startRow<0&&(o.startRow=t.usedRange.rowIndex),o.startCol=t.usedRange.colIndex)):o.startRow>t.usedRange.rowIndex&&("next"===e.findOpt?(o.startCol++,o.startCol>t.usedRange.colIndex&&(o.startRow=0),o.startRow=0):(o.startCol--,o.startCol<0&&(o.startCol=t.usedRange.colIndex),o.startRow=t.usedRange.colIndex)),"Workbook"===e.mode?(o.sheets=this.parent.sheets,o.sheetIdx=e.sheetIndex):(o.sheets=[t],o.sheetIdx=0);var s,l=e.showDialog&&this.parent.element&&this.parent.element.querySelector(".e-header-panel");l&&(s=(l.offsetHeight||(t.showHeaders?30:0))+1),"next"===e.findOpt?this.findNext(e,o):this.findPrevious(e,o),e.showDialog&&this.parent.notify(i._26,{findValue:e.value,isPublic:!0,headerHgt:s})},e.prototype.findNext=function(e,t){var n=this,r=function(r,i,a){for(var o,s,l=r;l<=i&&(o=t.sheets[l],!(s=l===t.sheetIdx?a?n.findNextOnSheet(e,t.startRow,t.startCol,t.findVal,o,void 0,t.activeCell):n.findNextOnSheet(e,0,0,t.findVal,o,"By Row"===e.searchBy?t.startRow:t.startCol):n.findNextOnSheet(e,0,0,t.findVal,o)));l++);return s},a=r(t.sheetIdx,t.sheets.length-1,!0);a||(a=r(0,t.sheetIdx)),a?this.parent.notify(i._27,{address:a}):this.parent.notify(i._28,null)},e.prototype.findNextOnSheet=function(e,t,i,a,o,s,l){var d,c,h;if("By Row"===e.searchBy){void 0===s&&(s=o.rows.length-1);var p=void 0;for(c=t;c<=s;c++)if(!n.i(r.i)(o,c))for(h=l&&c===t?i:0,p=o.rows[c]&&o.rows[c].cells&&o.rows[c].cells.length,h;h<p;h++)if(!n.i(r.a)(o,h)&&(d=this.checkMatch(e,a,c,h,o,l)))return d}else{void 0===s&&(s=o.usedRange.colIndex);var u=o.rows&&o.rows.length-1;for(h=i;h<=s;h++)if(!n.i(r.a)(o,h))for(c=l&&h===i?t:0;c<=u;c++)if(!n.i(r.i)(o,c)&&(d=this.checkMatch(e,a,c,h,o,l)))return d}return d},e.prototype.findPrevious=function(e,t){var n,r=this,a=function(n,i,a){for(var o,s,l=n;l>=i&&(o=t.sheets[l],!(s=l===t.sheetIdx?a?r.findPrevOnSheet(e,t.startRow,t.startCol,0,0,t.findVal,o,t.activeCell):"By Row"===e.searchBy?r.findPrevOnSheet(e,o.usedRange.rowIndex,o.usedRange.colIndex,t.startRow,0,t.findVal,o):r.findPrevOnSheet(e,o.usedRange.rowIndex,o.usedRange.colIndex,0,t.startCol,t.findVal,o):r.findPrevOnSheet(e,o.usedRange.rowIndex,o.usedRange.colIndex,0,0,t.findVal,o)));l--);return s};n=a(t.sheetIdx,0,!0),n||(n=a(t.sheets.length-1,t.sheetIdx)),n?this.parent.notify(i._27,{address:n}):this.parent.notify(i._28,null)},e.prototype.findPrevOnSheet=function(e,t,i,a,o,s,l,d){var c,h,p;if("By Row"===e.searchBy){for(p=t;p>=a;p--)if(!n.i(r.i)(l,p))for(h=d&&p===t?i:l.rows[p]&&l.rows[p].cells&&l.rows[p].cells.length-1;h>=o;h--)if(!n.i(r.a)(l,h)&&(c=this.checkMatch(e,s,p,h,l,d)))return c}else for(h=i;h>=o;h--)if(!n.i(r.a)(l,h))for(p=d&&h===i?t:l.rows&&l.rows.length-1;p>=a;p--)if(!n.i(r.i)(l,p)&&(c=this.checkMatch(e,s,p,h,l,d)))return c;return c},e.prototype.checkMatch=function(e,t,a,o,s,l){if(l&&a===l[0]&&o===l[1])return null;var d=n.i(r.h)(a,o,s,!1,!0);if(s.isProtected&&!s.protectSettings.selectCells&&s.protectSettings.selectUnLockedCells&&n.i(i._29)(d,n.i(r.t)(s,o)))return null;var c=this.parent.getDisplayText(d);if(c)if(e.isCSen||(c=c.toLowerCase()),e.isEMatch){if(c===t)return s.name+"!"+n.i(i.i)(a,o)}else if(c.includes(t))return s.name+"!"+n.i(i.i)(a,o);return null},e.prototype.replace=function(e){var t=n.i(a.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,o=n.i(r.g)(this.parent,e.sheetIndex);if(o.isProtected)return void this.parent.notify(i._30,null);var s,l=e.address,d=n.i(i.l)(l||o.activeCell),c=this.parent.getDisplayText(n.i(r.h)(d[0],d[1],o,!1,!0)).toString();e.value=e.value.toString(),e.isCSen||(s=e.value.toLowerCase());var h=this.getReplaceValue(e,c,s);if(h||(e.findOpt="next",this.find(e),d=n.i(i.w)(o.activeCell),c=this.parent.getDisplayText(n.i(r.h)(d[0],d[1],o)).toString(),h=this.getReplaceValue(e,c,s))){var p={address:o.name+"!"+n.i(i.i)(d[0],d[1]),cancel:!1,compareValue:e.value,replaceValue:e.replaceValue,sheetIndex:t};if(e.isAction){if(this.parent.notify(i._31,{action:"beforeReplace",eventArgs:p}),p.cancel)return;delete p.cancel}n.i(i.C)(this.parent,o,{cell:{value:h},rowIdx:d[0],colIdx:d[1],uiRefresh:!0,valChange:!0}),e.isAction&&this.parent.notify("actionComplete",{action:"replace",eventArgs:p})}},e.prototype.replaceAll=function(e){var t,r,a,s=this,l="Sheet"===e.mode?e.sheetIndex:0,d=this.parent.sheets[l],c=d.usedRange.rowIndex,h=0,p=d.usedRange.colIndex,u=0,f=[],g=e.isAction,m=o({addressCollection:f,cancel:!1},e),v=function(t,r){requestAnimationFrame?requestAnimationFrame(function(){if(!m.cancel&&m.addressCollection[r]){var a=n.i(i.w)(m.addressCollection[r].split("!")[1]),o=n.i(i.L)(s.parent,m.addressCollection[r]);n.i(i.C)(s.parent,s.parent.sheets[o],{cell:{value:t},rowIdx:a[0],uiRefresh:!0,colIdx:a[1],valChange:!0,skipFormatCheck:e.skipFormatCheck}),r===m.addressCollection.length-1&&g&&s.parent.notify("actionComplete",{action:"replaceAll",eventArgs:m})}}):s.parent.updateCell({value:t},m.addressCollection[r])};for(h;h<=c+1;h++){if(u>p&&h>c&&"Workbook"===e.mode){if(l++,!(d=this.parent.sheets[l]))break;u=0,h=0,p=d.usedRange.colIndex,c=d.usedRange.rowIndex}if(r=d.rows[h])for(u===p+1&&(u=0),u;u<=p;u++)if(r&&r.cells&&r.cells[u]&&(t=this.parent.getDisplayText(d.rows[h].cells[u]).toString()))if(e.isCSen)e.isEMatch?t===e.value&&(v(e.replaceValue,f.length),f.push(d.name+"!"+n.i(i.i)(h,u))):t.indexOf(e.value)>-1&&(v(t.replace(e.value,e.replaceValue),f.length),f.push(d.name+"!"+n.i(i.i)(h,u)));else if(e.isEMatch)t.toLowerCase()===e.value&&(v(e.replaceValue,f.length),f.push(d.name+"!"+n.i(i.i)(h,u)));else{var y=t.toLowerCase();if(t===e.value||y.indexOf(e.value.toString().toLowerCase())>-1||y===e.value||t===e.value||y.indexOf(e.value)>-1){var C=RegExp;a=new C(e.value.toString().replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"ig"),v(t.replace(a,e.replaceValue),f.length),f.push(d.name+"!"+n.i(i.i)(h,u))}}}f.length&&g?(this.parent.notify("actionBegin",{action:"beforeReplaceAll",eventArgs:m}),m.cancel||this.parent.notify(i._32,{count:m.addressCollection.length,replaceValue:m.replaceValue})):this.parent.notify(i._32,{count:m.addressCollection.length,replaceValue:m.replaceValue})},e.prototype.getReplaceValue=function(e,t,n){if(e.isCSen)return e.isEMatch?t===e.value&&e.replaceValue:t.indexOf(e.value)>-1&&t.replace(e.value,e.replaceValue);if(e.isEMatch)return t.toLowerCase()===n&&e.replaceValue;var r=RegExp;return t.toLowerCase().includes(n)&&t.replace(new r(e.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"ig"),e.replaceValue)},e.prototype.totalCount=function(e){var t,a=this,o=this.parent.sheets[e.sheetIndex],s=n.i(i.w)(o.activeCell),l=0,d=0,c=e.value.toLowerCase();o.rows.filter(function(e,h){return e&&e.cells&&!e.isFiltered&&!e.hidden&&e.cells.filter(function(e,p){!e||!e.value&&0!==e.value||n.i(r.a)(o,p)||o.isProtected&&!o.protectSettings.selectCells&&n.i(i._29)(e,n.i(r.t)(o,p))||(t=(e.format?a.parent.getDisplayText(e):e.value.toString()).toLowerCase(),t.includes(c)&&(l++,(h===s[0]&&p>=s[1]||h>s[0])&&d++))})}),d-=1;var h=l;l=h-d,l>h&&(l=h),0===l||this.parent.getDisplayText(n.i(r.h)(s[0],s[1],o)).toLowerCase().includes(c)||(l-=1),e.findCount=l+" of "+h},e.prototype.findAllValues=function(e){var t,o=e.sheetIndex,s=this.parent.sheets[o],l=s.usedRange.rowIndex,d=0,c=0,h=s.usedRange.colIndex,p=0,u=this.parent.sheets.length,f=e.sheetIndex;for(d;d<=l+1;d++){if(1!==f&&e.sheetIndex===u&&(o=1),d>l&&p>h&&"Workbook"===e.mode){if(o++,o>u-1&&(o=0),f===o)return void 0;s=this.parent.sheets[o],s&&(d=0,p=0,h=s.usedRange.colIndex,l=s.usedRange.rowIndex)}if(!n.i(a.isNullOrUndefined)(s)&&s.rows[d]){var g=s.rows[d];for(p===h+2&&(p=0),p;p<=h+1;p++)if(g&&g.cells&&g.cells[p]){var m=s.rows[d].cells[p];if(m&&!n.i(a.isNullOrUndefined)(m.value)&&""!==m.value&&(!s.isProtected||s.protectSettings.selectCells||s.protectSettings.selectUnLockedCells&&!n.i(i._29)(m,n.i(r.t)(s,p)))){var v=m.format,y=void 0;if(v){var C=this.parent.getDisplayText(s.rows[d].cells[p]);y=C.toString()}else y=m.value.toString();if(e.isCSen&&e.isEMatch)y===e.value&&(t=s.name+"!"+n.i(i.i)(d,p),e.findCollection.push(t),c++);else if(e.isCSen&&!e.isEMatch){var b=y.indexOf(e.value)>-1;(y===e.value||b)&&(t=s.name+"!"+n.i(i.i)(d,p),e.findCollection.push(t),c++)}else if(!e.isCSen&&e.isEMatch){var x=y.toString().toLowerCase();x===e.value.toLowerCase()&&(t=s.name+"!"+n.i(i.i)(d,p),e.findCollection.push(t),c++)}else if(!e.isCSen&&!e.isEMatch){var x=y.toString().toLowerCase(),b=x.indexOf(e.value.toLowerCase())>-1;(x===e.value||y===e.value||b||y===e.value)&&(t=s.name+"!"+n.i(i.i)(d,p),e.findCollection.push(t),c++)}}}}}},e.prototype.getModuleName=function(){return"workbookfindAndReplace"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(4),i=n(2),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i.O,this.setLinkHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i.O,this.setLinkHandler)},e.prototype.setLinkHandler=function(e){var t,o=e.hyperlink,s=e.cell;if(s&&-1!==s.indexOf("!")){var l=s.split("!");if(t=n.i(r.g)(this.parent,n.i(r.m)(this.parent,l[0])),s=l[1],!t)return}else t=this.parent.getActiveSheet(),s=s||t.selectedRange;var d=!e.triggerEvt&&t.isProtected;if(!d||t.protectSettings.insertLink){var c=n.i(i._10)(n.i(i.l)(s));"string"==typeof o?0===o.toLowerCase().indexOf("www.")&&(o="http://"+o):0===o.address.toLowerCase().indexOf("www.")&&(o.address="http://"+o.address);for(var h,p=n.i(i.l)(t.activeCell),u=c[0];u<=c[2];u++)for(var f=c[1];f<=c[3];f++)d&&n.i(i._29)(n.i(r.h)(u,f,t),n.i(r.t)(t,f))||(h={hyperlink:o},n.i(a.isNullOrUndefined)(e.displayText)||u!==p[0]||f!==p[1]||(e.triggerEvt?u===p[0]&&f===p[1]&&(h.value=e.displayText):n.i(a.isNullOrUndefined)(n.i(r.h)(u,f,t,!1,!0).value)&&(h.value=e.displayText)),h.style={textDecoration:"underline",color:"#00e"},n.i(i.C)(this.parent,t,{cell:h,rowIdx:u,colIdx:f,preventEvt:!e.triggerEvt}))}},e.prototype.getModuleName=function(){return"workbookHyperlink"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(4),i=n(2),a=n(0),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.insertModel=function(e){var t,a,o,s,l=this;if(e.model){var d,c,h,p,u=[];if("number"==typeof e.start){d=e.start,e.end=e.end||d,d>e.end&&(d=e.end,e.end=e.start),"Row"===e.modelType&&d<e.model.maxHgts.length&&(p=[]);for(var f=d;f<=e.end;f++)u.push({}),p&&p.push(null)}else e.start?(d=e.start[0].index||0,u=e.start,h=!0):(d=0,u.push({})),"Row"===e.modelType&&d<e.model.maxHgts.length&&(p=[],u.forEach(function(){p.push(null)}));var g={model:u,index:d,modelType:e.modelType,insertType:e.insertType,cancel:!1,isUndoRedo:e.isUndoRedo},m={eventArgs:g,action:"insert"};if(e.isAction){if(this.parent.notify(i._31,m),g.cancel)return;delete g.cancel,g.isAction=e.isAction}var v={startIndex:d,endIndex:d+u.length-1,modelType:e.modelType,sheet:e.model,isInsert:!0};if("Row"===e.modelType){if(void 0!==e.checkCount&&e.model.rows&&e.checkCount===e.model.rows.length)return;if(this.parent.notify(i._46,v),e.model=e.model,e.model.rows||(e.model.rows=[]),h&&e.model.usedRange.rowIndex>-1&&d>e.model.usedRange.rowIndex)for(var f=e.model.usedRange.rowIndex;f<d-1;f++)u.splice(0,0,{});var y=this.parent.frozenRowCount(e.model);d<y&&(this.parent.setSheetPropertyOnMute(e.model,"frozenRows",e.model.frozenRows+u.length),g.freezePane=!0),(t=e.model.rows).splice.apply(t,[d,0].concat(u)),p&&(a=e.model.maxHgts).splice.apply(a,[d,0].concat(p)),this.setRowColCount(v.startIndex,v.endIndex,e.model,"row"),d>e.model.usedRange.rowIndex?this.parent.setUsedRange(d+(u.length-1),e.model.usedRange.colIndex,e.model,!0):this.parent.setUsedRange(e.model.usedRange.rowIndex+u.length,e.model.usedRange.colIndex,e.model,!0);for(var C,b=d+u.length,x=void 0,S=this,f=0;f<=e.model.usedRange.colIndex;f++)!function(t){e.model.rows[b]&&e.model.rows[b].cells&&e.model.rows[b].cells[t]&&(x=e.model.rows[b].cells[t],void 0!==x.rowSpan&&x.rowSpan<0&&void 0===x.colSpan&&S.parent.notify(i._16,{range:[b,t,b,t],insertCount:u.length,insertModel:"Row"}),x.style&&n.i(r.h)(d-1,t,e.model,!1,!0).style&&(C=S.checkBorder(x.style,e.model.rows[d-1].cells[t].style))!=={}&&u.forEach(function(e){e.cells||(e.cells=[]),e.cells[t]||(e.cells[t]={}),e.cells[t].style||(e.cells[t].style={}),Object.assign(e.cells[t].style,C)}))}(f);g.sheetCount=e.model.rows.length}else if("Column"===e.modelType){if(void 0!==e.checkCount&&e.model.columns&&e.checkCount===e.model.columns.length)return;this.parent.notify(i._46,v),e.model=e.model,e.model.columns||(e.model.columns=[]),d&&!e.model.columns[d-1]&&(e.model.columns[d-1]={}),(o=e.model.columns).splice.apply(o,[d,0].concat(u));var w=this.parent.frozenColCount(e.model);d<w&&(this.parent.setSheetPropertyOnMute(e.model,"frozenColumns",e.model.frozenColumns+u.length),g.freezePane=!0),this.setRowColCount(v.startIndex,v.endIndex,e.model,"col"),d>e.model.usedRange.colIndex?this.parent.setUsedRange(e.model.usedRange.rowIndex,d+(u.length-1),e.model,!0):this.parent.setUsedRange(e.model.usedRange.rowIndex,e.model.usedRange.colIndex+u.length,e.model,!0),e.model.rows||(e.model.rows=[]);var _=[];e.columnCellsModel||(e.columnCellsModel=[]);for(var f=0;f<u.length;f++)_.push(null);c=[];for(var x=void 0,I=void 0,f=0;f<=e.model.usedRange.rowIndex;f++){e.model.rows[f]?e.model.rows[f].cells||(e.model.rows[f].cells=[]):e.model.rows[f]={cells:[]},d&&!e.model.rows[f].cells[d-1]&&(e.model.rows[f].cells[d-1]={}),(s=e.model.rows[f].cells).splice.apply(s,[d,0].concat(e.columnCellsModel[f]&&e.columnCellsModel[f].cells?e.columnCellsModel[f].cells:_));var b=d+u.length;if(e.model.rows[f].cells[b]&&(x=e.model.rows[f].cells[b],void 0!==x.colSpan&&x.colSpan<0&&void 0===x.rowSpan&&c.push({range:[f,b,f,b],insertCount:_.length,insertModel:"Column"}),x.style&&n.i(r.h)(f,d-1,e.model,!1,!0).style&&(I=this.checkBorder(x.style,e.model.rows[f].cells[d-1].style))!=={}))for(var E=d;E<b;E++)e.model.rows[f].cells[E]||(e.model.rows[f].cells[E]={}),e.model.rows[f].cells[E].style||(e.model.rows[f].cells[E].style={}),Object.assign(e.model.rows[f].cells[E].style,I)}c.forEach(function(e){l.parent.notify(i._16,e)}),g.sheetCount=e.model.columns.length}else{if(void 0!==e.checkCount&&e.checkCount===this.parent.sheets.length)return;for(var R=u,k=n.i(r.u)(this.parent),A=e.isFromUpdateAction,f=0;f<R.length;f++)if(R[f].name)for(var E=0;E<this.parent.sheets.length;E++)if(R[f].name===this.parent.sheets[E].name){R.splice(f,1),f--;break}if(!R.length)return;delete u[0].index,this.parent.createSheet(d,u);var F;e.activeSheetIndex?(g.activeSheetIndex=e.activeSheetIndex,this.parent.setProperties({activeSheetIndex:e.activeSheetIndex},!0)):!e.isAction&&e.start<this.parent.activeSheetIndex&&this.parent.setProperties({activeSheetIndex:this.parent.skipHiddenSheets(this.parent.activeSheetIndex)},!0),A&&this.parent.setProperties({activeSheetIndex:n.i(r.m)(this.parent,k)},!0),u.forEach(function(e){h&&l.updateRangeModel(e.ranges);var t=l.parent.viewport,n=[t.topIndex,t.leftIndex,t.bottomIndex,t.rightIndex],r={sheet:e,resolveAfterFullDataLoaded:!0,indexes:n,promise:new Promise(function(e){e(void 0)})};l.parent.notify(i.n,r),F=e.id,l.parent.notify(i.j,{action:"addSheet",visibleName:e.name,sheetName:"Sheet"+F,sheetId:F})}),g.activeSheetIndex=e.activeSheetIndex,g.sheetCount=this.parent.sheets.length}"Sheet"!==e.modelType&&(this.insertConditionalFormats(e),this.parent.notify(i._44,{start:d,end:d+u.length-1,modelType:e.modelType,model:e.model,isInsert:!0}),g.activeSheetIndex=n.i(r.m)(this.parent,e.model.name)),this.parent.notify(i._47,m)}},e.prototype.setRowColCount=function(e,t,n,r){var a=r+"Count";this.parent.setSheetPropertyOnMute(n,a,n[""+a]+(t-e+1)),n.id===this.parent.getActiveSheet().id&&this.parent.notify(i.N,{index:n[""+a]-1,update:r,isInsert:!0,start:e,end:t})},e.prototype.updateRangeModel=function(e){e.forEach(function(e){e.dataSource&&(e.startCell=e.startCell||"A1",e.showFieldAsHeader=void 0===e.showFieldAsHeader||e.showFieldAsHeader,e.template=e.template||"",e.address=e.address||"A1")})},e.prototype.checkBorder=function(e,t){var n={};return e.borderLeft&&e.borderLeft===t.borderLeft&&(n.borderLeft=e.borderLeft),e.borderRight&&e.borderRight===t.borderRight&&(n.borderRight=e.borderRight),e.borderTop&&e.borderTop===t.borderTop&&(n.borderTop=e.borderTop),e.borderBottom&&e.borderBottom===t.borderBottom&&(n.borderBottom=e.borderBottom),n},e.prototype.setInsertInfo=function(e,t,n,r,i){void 0===i&&(i="Row");var a=n=t+(n-1);e.ranges.forEach(function(e){e.info&&t<e.info[""+r]&&(e.info["insert"+i+"Range"]?e.info["insert"+i+"Range"].push([t,a]):e.info["insert"+i+"Range"]=[[t,a]],e.info[""+r]+=a-t+1)})},e.prototype.insertConditionalFormats=function(e){var t=e.model.conditionalFormats;if("delete"===e.prevAction)this.parent.setSheetPropertyOnMute(e.model,"conditionalFormats",e.conditionalFormats);else if(t)for(var r=0,o=t.length;r<o;r++)t[r].range=n.i(i.g)(n.i(a._177)(e,n.i(i.l)(t[r].range),!e.isAction&&!e.isUndoRedo))},e.prototype.addEventListener=function(){this.parent.on(i.J,this.insertModel,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i.J,this.insertModel)},e.prototype.getModuleName=function(){return"workbookinsert"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(4),i=n(2),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.merge=function(e){e.sheetIndex=n.i(a.isUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,e.isAction&&(this.parent.notify("actionBegin",{eventArgs:e,action:"merge"}),e.model||(e.model=[])),"string"==typeof e.range&&(e.range=n.i(i.l)(e.range));var t=e.range=n.i(i._10)(e.range);if(e.skipChecking||this.mergedRange(e),e.merge&&"All"!==e.type){if("Horizontally"===e.type)for(var o=e.range[0],s=e.range[2];o<=s;o++)e.range=[o,t[1],o,t[3]],this.mergeAll(e,o-t[0]);else if("Vertically"===e.type)for(var l=e.range[1],s=e.range[3];l<=s;l++)e.range=[t[0],l,t[2],l],this.mergeAll(e,0,l-t[1])}else this.mergeAll(e),e.refreshRibbon&&this.parent.notify(i.Q,null);e.range=t,this.parent.setUsedRange(e.range[2],e.range[3]),e.isAction&&this.parent.notify("actionComplete",{eventArgs:e,action:"merge"}),e.sheetIndex===this.parent.activeSheetIndex&&(this.parent.notify("selectRange",{address:n.i(r.g)(this.parent,e.sheetIndex).selectedRange,skipChecking:!0}),this.parent.chartColl&&this.parent.chartColl.length&&this.parent.notify(i.e,{range:e.range}))},e.prototype.mergeAll=function(e,t,o){void 0===t&&(t=0),void 0===o&&(o=0);var s,l=0;e.range=e.range;for(var d,c,h,p,u,f=n.i(a.isUndefined)(e.sheetIndex)?this.parent.getActiveSheet():n.i(r.g)(this.parent,e.sheetIndex),g={cell:new Object,rowIdx:e.range[0],colIdx:e.range[1],valChange:!e.merge,preventEvt:!0,uiRefresh:!e.preventRefresh,skipFormatCheck:!0},m=e.range[0],v=t;m<=e.range[2];m++,v++){d=0,e.isAction&&!e.model[v]&&e.model.push({cells:[]});for(var y=e.range[1],C=o;y<=e.range[3];y++,C++){if(s=n.i(r.h)(m,y,f),s&&(s.value||0===s.value||s.formula)&&!c&&(c=s.formula||s.value,p=s.format),e.isAction&&e.merge&&(u=e.model[v].cells[C]={},n.i(a.extend)(u,s,null,!0)),s&&(delete s.rowSpan,delete s.colSpan,(u=!e.merge&&!e.isAction&&e.model&&e.model[v]&&e.model[v].cells[C])&&n.i(r.e)(m,y,f,u)),m===e.range[0]&&y===e.range[1]){if(e.merge){e.range[3]-e.range[1]>0&&(g.cell.colSpan=e.range[3]-e.range[1]+1),e.range[2]-e.range[0]>0&&(g.cell.rowSpan=e.range[2]-e.range[0]+1),n.i(i.C)(this.parent,f,g),g.valChange=g.mergedCells=!0;continue}}else g.rowIdx=m,g.colIdx=y,g.cell={},e.merge&&(m!==e.range[0]&&(g.cell.rowSpan=-l),y!==e.range[1]&&(d++,g.cell.colSpan=-d));n.i(i.C)(this.parent,f,g),h||(h=g.isFormulaDependent)}l++}if(e.merge)if(c||0===c){delete g.mergedCells,g.cell={};var b=n.i(r.h)(e.range[0],e.range[1],f);b&&(b.value||b.formula)||(n.i(i.k)(c)?g.cell.formula=c:g.cell.value=c,p&&(g.cell.format=p)),g.rowIdx=e.range[0],g.colIdx=e.range[1],n.i(i.C)(this.parent,f,g)}else e.preventRefresh||this.parent.notify(i._13,{rowIdx:e.range[0],colIdx:e.range[1]});e.preventRefresh||this.refreshCF(f,e.range[0],e.range[1],h)},e.prototype.refreshCF=function(e,t,n,r){e.conditionalFormats&&e.conditionalFormats.length&&this.parent.notify(i.b,{indexes:[t,n],refreshAll:r,isAction:!0})},e.prototype.activeCellRange=function(e){e.range=e.range;var t=this.parent.getActiveSheet(),i=n.i(r.h)(e.range[0],e.range[1],t);i&&(!n.i(a.isNullOrUndefined)(i.rowSpan)&&i.rowSpan<0&&(e.range[0]+=i.rowSpan,e.insertCount&&(e.range[0]-=e.insertCount)),!n.i(a.isNullOrUndefined)(i.colSpan)&&i.colSpan<0&&(e.range[1]+=i.colSpan,e.insertCount&&(e.range[1]-=e.insertCount)),(i=n.i(r.h)(e.range[0],e.range[1],t))&&(i.rowSpan>1&&(e.range[0]+(i.rowSpan-1)>=e.range[2]||e.insertCount)&&(e.range[2]=e.range[0]+(i.rowSpan-1)),i.colSpan>1&&(e.range[1]+(i.colSpan-1)>=e.range[3]||e.insertCount)&&(e.range[3]=e.range[1]+(i.colSpan-1))))},e.prototype.mergedRange=function(e){"string"==typeof e.range&&(e.range=n.i(i.l)(e.range)),e.range[0]<=e.range[2]&&e.range[1]<=e.range[3]?this.forward(e):e.range[0]>=e.range[2]&&e.range[1]>=e.range[3]?this.reverse(e):e.range[0]<e.range[2]&&e.range[1]>e.range[3]?this.forwardReverse(e):e.range[0]>e.range[2]&&e.range[1]<e.range[3]&&this.reverseForward(e)},e.prototype.forward=function(e){e.range=e.range;var t,i,o=n.i(a.isUndefined)(e.sheetIndex)?this.parent.getActiveSheet():n.i(r.g)(this.parent,e.sheetIndex),s=n.i(r.h)(e.range[0],e.range[1],o),l=t=e.range[0],d=i=e.range[1];if(s&&(!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(l=t=e.range[0]+s.rowSpan),!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(d=i=e.range[1]+s.colSpan),(s=n.i(r.h)(l,d,o))&&(s.rowSpan>1&&(t+=s.rowSpan-1,l+(s.rowSpan-1)>=e.range[2]&&(e.range[2]=e.range[0],e.range[2]=l+(s.rowSpan-1))),s.colSpan>1&&(i+=s.colSpan-1,d+(s.colSpan-1)>=e.range[3]&&(e.range[3]=e.range[1],e.range[3]=d+(s.colSpan-1))))),e.range[0]=l,e.range[1]=d,e.range[0]===l&&e.range[1]===d&&e.range[2]===t&&e.range[3]===i&&(e.isActiveCell=!0),!e.skipChecking){for(var c=e.range[1];c<=e.range[3];c++)(s=n.i(r.h)(e.range[2],c,o))&&(l=e.range[2],d=c,!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(d+=s.colSpan)<e.range[1]&&(e.range[1]=d),!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(l+=s.rowSpan)<e.range[0]&&(e.range[0]=l),(s=n.i(r.h)(l,d,o))&&(s.colSpan>1&&d+(s.colSpan-1)>e.range[3]&&(e.range[3]=d,e.range[3]=d+(s.colSpan-1)),s.rowSpan>1&&l+(s.rowSpan-1)>e.range[2]&&(e.range[2]=l,e.range[2]=l+(s.rowSpan-1))));for(var h,p,c=e.range[1];c<=e.range[3];c++)(s=n.i(r.h)(e.range[0],c,o))&&(p=c,h=e.range[0],!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(p+=s.colSpan)<e.range[1]&&(e.range[1]=p),!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(h+=s.rowSpan)<e.range[0]&&(e.range[0]=h));for(var c=e.range[0];c<=e.range[2];c++)(s=n.i(r.h)(c,e.range[3],o))&&(l=c,d=e.range[3],!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(l+=s.rowSpan)<e.range[0]&&(e.range[0]=l),!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(d+=s.colSpan)<e.range[1]&&(e.range[1]=d),(s=n.i(r.h)(l,d,o))&&(s.rowSpan>1&&l+(s.rowSpan-1)>e.range[2]&&(e.range[2]=l,e.range[2]=l+(s.rowSpan-1)),s.colSpan>1&&d+(s.colSpan-1)>e.range[3]&&(e.range[3]=d,e.range[3]=d+(s.colSpan-1))))}},e.prototype.forwardReverse=function(e){var t=this.parent.getActiveSheet();e.range=e.range;var i=e.range[1],o=n.i(r.h)(e.range[0],e.range[1],t),s=e.range[0];if(o&&(!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(i+=o.colSpan,e.range[3]>=i&&(e.range[3]=i)),!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(s+=o.rowSpan)<e.range[0]&&(e.range[0]=s),(o=n.i(r.h)(s,i,t))&&(o.rowSpan>1&&s+(o.rowSpan-1)>=e.range[2]&&(e.range[2]=s+(o.rowSpan-1)),o.colSpan>1&&i+(o.colSpan-1)>=e.range[1]&&(e.range[1]=i+(o.colSpan-1)))),e.range[0]=s,!e.skipChecking){for(var l,d,c=e.range[3];c<=e.range[1];c++)(o=n.i(r.h)(e.range[2],c,t))&&(d=c,l=e.range[2],!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(l+=o.rowSpan)<e.range[0]&&(e.range[0]=l),!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(d+=o.colSpan)<e.range[3]&&(e.range[3]=d),(o=n.i(r.h)(l,d,t))&&(o.rowSpan>1&&l+(o.rowSpan-1)>e.range[2]&&(e.range[2]=l+(o.rowSpan-1)),o.colSpan>1&&d+(o.colSpan-1)>e.range[1]&&(e.range[1]=d+(o.colSpan-1))));for(var h,c=e.range[3];c<=e.range[1];c++)(o=n.i(r.h)(e.range[0],c,t))&&(d=c,h=e.range[0],!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(h+=o.rowSpan)<e.range[0]&&(e.range[0]=h),!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(d+=o.colSpan),(o=n.i(r.h)(h,d,t))&&(o.rowSpan>1&&h+(o.rowSpan-1)>e.range[2]&&(e.range[2]=h+(o.rowSpan-1)),o.colSpan>1&&d+(o.colSpan-1)>e.range[1]&&(e.range[1]=d,e.range[1]=d+(o.colSpan-1))));for(var p,c=e.range[0];c<=e.range[2];c++)(o=n.i(r.h)(c,e.range[3],t))&&(h=c,p=e.range[3],!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(h+=o.rowSpan)<e.range[0]&&(e.range[0]=h),!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(p+=o.colSpan)<e.range[3]&&(e.range[3]=p),(o=n.i(r.h)(h,p,t))&&(o.rowSpan>1&&h+(o.rowSpan-1)>e.range[2]&&(e.range[2]=h,e.range[2]=h+(o.rowSpan-1)),o.colSpan>1&&p+(o.colSpan-1)>e.range[1]&&(e.range[1]=p,e.range[1]=p+(o.colSpan-1))))}},e.prototype.reverse=function(e){e.range=e.range;var t=e.range[1],i=n.i(a.isUndefined)(e.sheetIndex)?this.parent.getActiveSheet():n.i(r.g)(this.parent,e.sheetIndex),o=n.i(r.h)(e.range[0],e.range[1],i),s=e.range[0];o&&(!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(t+=o.colSpan),!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(s+=o.rowSpan),e.range[2]>=s&&(e.range[2]=s,e.isActiveCell=!0),e.range[3]>=t?(e.range[3]=t,e.range[2]===s&&(e.isActiveCell=!0)):e.isActiveCell&&(e.isActiveCell=!1),(o=n.i(r.h)(s,t,i))&&(o.rowSpan>1&&s+(o.rowSpan-1)>=e.range[0]&&(e.range[0]=s,e.range[0]=s+(o.rowSpan-1)),o.colSpan>1&&t+(o.colSpan-1)>=e.range[1]&&(e.range[1]=t,e.range[1]=t+(o.colSpan-1))));var l=e.range[3];if(!e.skipChecking){for(var d=e.range[3];d<=e.range[1];d++)(o=n.i(r.h)(e.range[2],d,i))&&(l=d,s=e.range[2],!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(s+=o.rowSpan)<e.range[2]&&(e.range[2]=s),!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(l+=o.colSpan)<e.range[3]&&(e.range[3]=l),(o=n.i(r.h)(s,l,i))&&(o.rowSpan>1&&s+(o.rowSpan-1)>e.range[0]&&(e.range[0]=s,e.range[0]=s+(o.rowSpan-1)),o.colSpan>1&&l+(o.colSpan-1)>e.range[1]&&(e.range[1]=l,e.range[1]=l+(o.colSpan-1))));l=e.range[3];for(var d=e.range[3];d<=e.range[1];d++)(o=n.i(r.h)(e.range[0],d,i))&&(l=d,s=e.range[0],!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(l+=o.colSpan),!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(s+=o.rowSpan),(o=n.i(r.h)(s,l,i))&&(o.colSpan>1&&l+(o.colSpan-1)>e.range[1]&&(e.range[1]=l,e.range[1]=l+(o.colSpan-1)),o.rowSpan>1&&s+(o.rowSpan-1)>e.range[0]&&(e.range[0]=s,e.range[0]=s+(o.rowSpan-1))));for(var c,h,d=e.range[2];d<=e.range[0];d++)(o=n.i(r.h)(d,e.range[3],i))&&(h=d,c=e.range[3],!n.i(a.isNullOrUndefined)(o.rowSpan)&&o.rowSpan<0&&(h+=o.rowSpan)<e.range[2]&&(e.range[2]=h),!n.i(a.isNullOrUndefined)(o.colSpan)&&o.colSpan<0&&(c+=o.colSpan)<e.range[3]&&(e.range[3]=c),(o=n.i(r.h)(h,c,i))&&(o.rowSpan>1&&h+(o.rowSpan-1)>e.range[0]&&(e.range[0]=h,e.range[0]=h+(o.rowSpan-1)),o.colSpan>1&&c+(o.colSpan-1)>e.range[1]&&(e.range[1]=c,e.range[1]=c+(o.colSpan-1))))}},e.prototype.reverseForward=function(e){e.range=e.range;var t=n.i(a.isUndefined)(e.sheetIndex)?this.parent.getActiveSheet():n.i(r.g)(this.parent,e.sheetIndex),i=e.range[0],o=e.range[1],s=n.i(r.h)(e.range[0],e.range[1],t);if(s&&(!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(i+=s.rowSpan,e.range[2]>=i&&(e.range[2]=i)),!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(o+=s.colSpan),(s=n.i(r.h)(i,o,t))&&(s.rowSpan>1&&i+(s.rowSpan-1)>=e.range[0]&&(e.range[0]=i,e.range[0]=i+(s.rowSpan-1)),s.colSpan>1&&o+(s.colSpan-1)>=e.range[3]&&(e.range[3]=e.range[1],e.range[3]=o+(s.colSpan-1)))),!e.skipChecking){for(var l,d=e.range[3],c=e.range[1];c<=e.range[3];c++)(s=n.i(r.h)(e.range[2],c,t))&&(l=e.range[2],d=c,!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(l+=s.rowSpan)<e.range[2]&&(e.range[2]=l),!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(d+=s.colSpan)<e.range[1]&&(e.range[1]=d),(s=n.i(r.h)(l,d,t))&&(s.colSpan>1&&d+(s.colSpan-1)>e.range[3]&&(e.range[3]=d+(s.colSpan-1)),s.rowSpan>1&&s.rowSpan-1+l>e.range[0]&&(e.range[0]=s.rowSpan-1+l)));for(var h,p,c=e.range[1];c<=e.range[3];c++)(s=n.i(r.h)(e.range[0],c,t))&&(p=c,h=e.range[0],!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(p+=s.colSpan)<e.range[1]&&(e.range[1]=p),!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(h+=s.rowSpan),(s=n.i(r.h)(h,p,t))&&s.rowSpan>1&&h+(s.rowSpan-1)>e.range[0]&&(e.range[0]=h+(s.rowSpan-1)));for(var u,c=e.range[2];c<=e.range[0];c++)(s=n.i(r.h)(c,e.range[3],t))&&(l=c,u=e.range[3],!n.i(a.isNullOrUndefined)(s.rowSpan)&&s.rowSpan<0&&(l+=s.rowSpan)<e.range[2]&&(e.range[2]=l),!n.i(a.isNullOrUndefined)(s.colSpan)&&s.colSpan<0&&(u+=s.colSpan)<e.range[1]&&(e.range[1]=u),(s=n.i(r.h)(l,u,t))&&(s.rowSpan>1&&s.rowSpan-1+l>e.range[0]&&(e.range[0]=s.rowSpan-1+l),s.colSpan>1&&s.colSpan-1+u>e.range[3]&&(e.range[3]=u,e.range[3]=s.colSpan-1+u)))}},e.prototype.insertHandler=function(e){this.activeCellRange(e),e.range=e.range,"Row"===e.insertModel?e.range[2]+=e.insertCount:e.range[3]+=e.insertCount,e.preventRefresh=!0,e.merge=!0,this.mergeAll(e)},e.prototype.addEventListener=function(){this.parent.on(i.M,this.merge,this),this.parent.on(i._14,this.mergedRange,this),this.parent.on(i._15,this.activeCellRange,this),this.parent.on(i._16,this.insertHandler,this)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.M,this.merge),this.parent.off(i._14,this.mergedRange),this.parent.off(i._15,this.activeCellRange),this.parent.off(i._16,this.insertHandler))},e.prototype.getModuleName=function(){return"workbookmerge"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(4),i=n(2),a=n(3),o=(n.n(a),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.protectsheetHandler=function(e){var t=n.i(a.isNullOrUndefined)(e.sheetIndex)?this.parent.activeSheetIndex:e.sheetIndex,o=n.i(r.g)(this.parent,t);this.parent.setSheetPropertyOnMute(o,"isProtected",!0),this.parent.setSheetPropertyOnMute(o,"protectSettings",{selectCells:e.protectSettings.selectCells,formatCells:e.protectSettings.formatCells,formatColumns:e.protectSettings.formatColumns,formatRows:e.protectSettings.formatRows,insertLink:e.protectSettings.insertLink,selectUnLockedCells:e.protectSettings.selectUnLockedCells}),this.parent.notify(i._17,{sheetIndex:t,triggerEvent:e.triggerEvent}),this.parent.notify(i._18,{props:"Protect"}),o.password=e.password?e.password:"",o.columns.forEach(function(e){e&&n.i(a.isUndefined)(e.isLocked)&&(e.isLocked=!0)})},e.prototype.unprotectsheetHandler=function(e){var t=this.parent.getActiveSheet();t.isImportProtected&&(t.isImportProtected=!1),e.sheet&&(t=this.parent.sheets[e.sheet]),t.protectSettings.formatCells=t.protectSettings.formatColumns=!1,t.protectSettings.formatRows=t.protectSettings.selectCells=!1,this.parent.setSheetPropertyOnMute(t,"isProtected",!1),this.parent.notify(i._17,t.protectSettings),this.parent.notify(i._18,{props:"Protect"})},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i._19,this.protectsheetHandler,this),this.parent.on(i._20,this.unprotectsheetHandler,this),this.parent.on(i.H,this.lockCells,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i._19,this.protectsheetHandler),this.parent.off(i.H,this.lockCells),this.parent.off(i._19,this.unprotectsheetHandler))},e.prototype.lockCells=function(e){var t=this.parent.getAddressInfo(e.range),a=n.i(i._10)(t.indices),o=n.i(r.g)(this.parent,t.sheetIndex),s=!!e.isLocked&&e.isLocked;if(0===a[0]&&a[2]===o.rowCount-1)for(var l=a[1];l<=a[3];l++)n.i(r.s)(o,l,{isLocked:e.isLocked});for(var l=a[0];l<=a[2];l++)for(var d=a[1];d<=a[3];d++)n.i(r.e)(l,d,o,{isLocked:s},!0);e.triggerEvent&&this.parent.notify("actionComplete",{action:"lockCells",eventArgs:e})},e.prototype.getModuleName=function(){return"workbookProtectSheet"},e}())},function(e,t,n){"use strict";function r(e,t){return e.columns?e.columns[t]||(e.columns[t]={}):(e.columns=[],e.columns[t]={}),e.columns[t]}function i(e,t,n){var i=r(e,t);Object.keys(n).forEach(function(e){i[""+e]=n[""+e]})}function a(e,t,n,r){var i;if(e&&e.columns&&e.columns[t]){if(!n&&e.columns[t].hidden)return 0;i=e.columns[t].width||e.columns[t].customWidth?e.columns[t].width:64}else i=64;if(r&&window.devicePixelRatio%1>0){var a=i*window.devicePixelRatio%1;return i+(a?(a>.5?1-a:-1*a)/window.devicePixelRatio:0)}return i}function o(e,t,n,r){void 0===n&&(n=t);var i=0;if(t>n){var o=t;t=n,n=o}for(var s=t;s<=n;s++)i+=a(e,s,null,r);return i}function s(e,t){return e.columns[t]&&e.columns[t].hidden}function l(e,t,r){return!!(e&&e.validation&&(!e.validation.address||e.validation.address&&n.i(c.D)(e.validation.address,t,r)))}n.d(t,"g",function(){return u}),t.d=r,t.c=i,t.b=a,t.e=o,t.a=s,t.f=l;var d=n(3),c=(n.n(d),n(2)),h=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),p([n.i(d.Property)(0)],t.prototype,"index",void 0),p([n.i(d.Property)(64)],t.prototype,"width",void 0),p([n.i(d.Property)(!1)],t.prototype,"customWidth",void 0),p([n.i(d.Property)(!1)],t.prototype,"hidden",void 0),p([n.i(d.Complex)({},c.q)],t.prototype,"format",void 0),p([n.i(d.Property)(!0)],t.prototype,"isLocked",void 0),p([n.i(d.Property)("")],t.prototype,"validation",void 0),t}(d.ChildProperty)},function(e,t,n){"use strict";function r(e,t){return e.rows[t]}function i(e,t,n){e.rows[t]||(e.rows[t]={}),Object.keys(n).forEach(function(r){e.rows[t][""+r]=n[""+r]})}function a(e,t){return e.rows[t]&&e.rows[t].hidden}function o(e,t){return e.rows[t]&&e.rows[t].isFiltered}function s(e,t,n,r){var i;if(e&&e.rows&&e.rows[t]){if(!r&&e.rows[t].hidden)return 0;i=void 0===e.rows[t].height?20:e.rows[t].height}else i=20;if(n&&window.devicePixelRatio%1>0){var a=i*window.devicePixelRatio%1;return i+(a?(a>.5?1-a:-1*a)/window.devicePixelRatio:0)}return i}function l(e,t,n){e&&e.rows&&(e.rows[t]||(e.rows[t]={}),e.rows[t].height=n)}function d(e,t,n,r,i){void 0===n&&(n=t);var a,o=0;t>n&&(a=t,t=n,n=a);for(var l=t;l<=n;l++)o+=s(e,l,r,i);return o}n.d(t,"h",function(){return g}),t.d=r,t.f=i,t.c=a,t.e=o,t.a=s,t.b=l,t.g=d;var c=n(3),h=(n.n(c),n(25)),p=n(2),u=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),f([n.i(c.Collection)([],h.d)],t.prototype,"cells",void 0),f([n.i(c.Property)(0)],t.prototype,"index",void 0),f([n.i(c.Property)(20)],t.prototype,"height",void 0),f([n.i(c.Property)(!1)],t.prototype,"customHeight",void 0),f([n.i(c.Property)(!1)],t.prototype,"hidden",void 0),f([n.i(c.Complex)({},p.q)],t.prototype,"format",void 0),t}(c.ChildProperty)},function(e,t,n){"use strict";n.d(t,"f",function(){return o}),n.d(t,"i",function(){return s}),n.d(t,"j",function(){return l}),n.d(t,"h",function(){return d}),n.d(t,"b",function(){return c}),n.d(t,"k",function(){return h}),n.d(t,"l",function(){return p}),n.d(t,"a",function(){return u}),n.d(t,"c",function(){return f}),n.d(t,"m",function(){return g}),n.d(t,"n",function(){return m}),n.d(t,"o",function(){return v}),n.d(t,"p",function(){return y}),n.d(t,"q",function(){return C}),n.d(t,"r",function(){return b}),n.d(t,"s",function(){return x}),n.d(t,"e",function(){return S}),n.d(t,"d",function(){return w}),n.d(t,"g",function(){return _});var r=n(3),i=(n.n(r),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("Calibri")],t.prototype,"fontFamily",void 0),a([n.i(r.Property)("bottom")],t.prototype,"verticalAlign",void 0),a([n.i(r.Property)("left")],t.prototype,"textAlign",void 0),a([n.i(r.Property)("0pt")],t.prototype,"textIndent",void 0),a([n.i(r.Property)("#000000")],t.prototype,"color",void 0),a([n.i(r.Property)("#ffffff")],t.prototype,"backgroundColor",void 0),a([n.i(r.Property)("normal")],t.prototype,"fontWeight",void 0),a([n.i(r.Property)("normal")],t.prototype,"fontStyle",void 0),a([n.i(r.Property)("11pt")],t.prototype,"fontSize",void 0),a([n.i(r.Property)("none")],t.prototype,"textDecoration",void 0),a([n.i(r.Property)("")],t.prototype,"border",void 0),a([n.i(r.Property)("")],t.prototype,"borderTop",void 0),a([n.i(r.Property)("")],t.prototype,"borderBottom",void 0),a([n.i(r.Property)("")],t.prototype,"borderLeft",void 0),a([n.i(r.Property)("")],t.prototype,"borderRight",void 0),t}(r.ChildProperty),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)()],t.prototype,"sheetIndex",void 0),a([n.i(r.Property)()],t.prototype,"filterRange",void 0),a([n.i(r.Property)(!1)],t.prototype,"hasFilter",void 0),a([n.i(r.Property)()],t.prototype,"column",void 0),a([n.i(r.Property)()],t.prototype,"criteria",void 0),a([n.i(r.Property)()],t.prototype,"value",void 0),a([n.i(r.Property)()],t.prototype,"dataType",void 0),a([n.i(r.Property)()],t.prototype,"predicates",void 0),t}(r.ChildProperty),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)()],t.prototype,"sortRange",void 0),a([n.i(r.Property)()],t.prototype,"columnIndex",void 0),a([n.i(r.Property)()],t.prototype,"order",void 0),a([n.i(r.Property)()],t.prototype,"sheetIndex",void 0),t}(r.ChildProperty),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("")],t.prototype,"name",void 0),a([n.i(r.Property)("")],t.prototype,"scope",void 0),a([n.i(r.Property)("")],t.prototype,"comment",void 0),a([n.i(r.Property)("")],t.prototype,"refersTo",void 0),t}(r.ChildProperty),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(!1)],t.prototype,"selectCells",void 0),a([n.i(r.Property)(!1)],t.prototype,"selectUnLockedCells",void 0),a([n.i(r.Property)(!1)],t.prototype,"formatCells",void 0),a([n.i(r.Property)(!1)],t.prototype,"formatRows",void 0),a([n.i(r.Property)(!1)],t.prototype,"formatColumns",void 0),a([n.i(r.Property)(!1)],t.prototype,"insertLink",void 0),t}(r.ChildProperty),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("")],t.prototype,"address",void 0),t}(r.ChildProperty),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("WholeNumber")],t.prototype,"type",void 0),a([n.i(r.Property)("Between")],t.prototype,"operator",void 0),a([n.i(r.Property)("0")],t.prototype,"value1",void 0),a([n.i(r.Property)("0")],t.prototype,"value2",void 0),a([n.i(r.Property)(!0)],t.prototype,"ignoreBlank",void 0),a([n.i(r.Property)(!0)],t.prototype,"inCellDropDown",void 0),a([n.i(r.Property)(!1)],t.prototype,"isHighlighted",void 0),a([n.i(r.Property)("")],t.prototype,"address",void 0),t}(r.ChildProperty),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("General")],t.prototype,"format",void 0),a([n.i(r.Complex)({},o)],t.prototype,"style",void 0),a([n.i(r.Property)(!0)],t.prototype,"isLocked",void 0),t}(r.ChildProperty),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("GreaterThan")],t.prototype,"type",void 0),a([n.i(r.Complex)({},u)],t.prototype,"format",void 0),a([n.i(r.Property)("RedFT")],t.prototype,"cFColor",void 0),a([n.i(r.Property)("")],t.prototype,"value",void 0),a([n.i(r.Property)("")],t.prototype,"range",void 0),t}(r.ChildProperty),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(!0)],t.prototype,"visible",void 0),a([n.i(r.Property)("Auto")],t.prototype,"position",void 0),t}(r.ChildProperty),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(!1)],t.prototype,"visible",void 0),a([n.i(r.Property)("Auto")],t.prototype,"position",void 0),t}(r.ChildProperty),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("")],t.prototype,"color",void 0),a([n.i(r.Property)(1)],t.prototype,"width",void 0),t}(r.ChildProperty),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(!1)],t.prototype,"visible",void 0),a([n.i(r.Property)("Circle")],t.prototype,"shape",void 0),a([n.i(r.Property)(5)],t.prototype,"size",void 0),a([n.i(r.Property)(null)],t.prototype,"fill",void 0),a([n.i(r.Property)(!0)],t.prototype,"isFilled",void 0),a([n.i(r.Complex)({},v)],t.prototype,"border",void 0),t}(r.ChildProperty),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(0)],t.prototype,"width",void 0),t}(r.ChildProperty),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)(0)],t.prototype,"width",void 0),t}(r.ChildProperty),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("")],t.prototype,"title",void 0),a([n.i(r.Complex)({},C)],t.prototype,"majorGridLines",void 0),a([n.i(r.Complex)({},b)],t.prototype,"minorGridLines",void 0),a([n.i(r.Property)(!0)],t.prototype,"visible",void 0),t}(r.ChildProperty),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("Line")],t.prototype,"type",void 0),a([n.i(r.Property)("Material")],t.prototype,"theme",void 0),a([n.i(r.Property)(!1)],t.prototype,"isSeriesInRows",void 0),a([n.i(r.Complex)({},y)],t.prototype,"markerSettings",void 0),a([n.i(r.Property)("")],t.prototype,"range",void 0),a([n.i(r.Property)("")],t.prototype,"id",void 0),a([n.i(r.Property)("")],t.prototype,"title",void 0),a([n.i(r.Property)(290)],t.prototype,"height",void 0),a([n.i(r.Property)(480)],t.prototype,"width",void 0),a([n.i(r.Property)(0)],t.prototype,"top",void 0),a([n.i(r.Property)(0)],t.prototype,"left",void 0),a([n.i(r.Complex)({},g)],t.prototype,"legendSettings",void 0),a([n.i(r.Complex)({},x)],t.prototype,"primaryXAxis",void 0),a([n.i(r.Complex)({},x)],t.prototype,"primaryYAxis",void 0),a([n.i(r.Complex)({},m)],t.prototype,"dataLabelSettings",void 0),t}(r.ChildProperty),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("")],t.prototype,"src",void 0),a([n.i(r.Property)("")],t.prototype,"id",void 0),a([n.i(r.Property)(300)],t.prototype,"height",void 0),a([n.i(r.Property)(400)],t.prototype,"width",void 0),a([n.i(r.Property)(0)],t.prototype,"top",void 0),a([n.i(r.Property)(0)],t.prototype,"left",void 0),t}(r.ChildProperty),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([n.i(r.Property)("FillSeries")],t.prototype,"fillType",void 0),a([n.i(r.Property)(!0)],t.prototype,"showFillOptions",void 0),t}(r.ChildProperty)},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a});var r="spreadsheetLocale",i={SortOutOfRangeError:"Select a cell or range inside the used range and try again."},a={currency:["$#,##0.00","$#,##0","$#,##0_);[Red]($#,##0)","$#,##0.00_);($#,##0.00)","$#,##0_);($#,##0)","$#,##0.00_);[Red]($#,##0.00)"],accounting:['_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)','_($* #,##0_);_($* (#,##0);_($* "-"_);_(@_)']}},function(e,t,n){"use strict";function r(e,t){return e&&"="===e[0]&&(e.length>1||t)}function i(e){var t=e;if(t=t.split("$").join(""),t.indexOf(":")>-1){var n=t.split(":");if(u(n[0])&&u(n[1]))return!0}else if(t.indexOf(":")<0&&u(t))return!0;return!1}function a(e){return e.charCodeAt(0)>=65&&e.charCodeAt(0)<=90||e.charCodeAt(0)>=97&&e.charCodeAt(0)<=122}function o(e,t){return 0===t[1]&&t[3]===e.colCount-1}function s(e,t){return 0===t[0]&&t[2]===e.rowCount-1}function l(e,t,n){return e&&t>=e[0]&&t<=e[2]&&n>=e[1]&&n<=e[3]}function d(e,t,r){for(var i,a,o=e.split(" "),s=0,d=o.length;s<d&&(i=n.i(A.l)(o[s]),!(a=l(i,t,r)));s++);return a}function c(e,t,n){var r=e[0]<=t[0]&&e[2]>=t[2]&&e[1]<=t[1]&&e[3]>=t[3];if(r)return!0;if(n){if(t[0]<e[0]&&t[2]<e[0]||t[0]>e[2]&&t[2]>e[2])return!1;if(t[0]<e[0]&&t[2]>e[0]&&(t[0]=e[0],r=!0),t[2]>e[2]&&(t[2]=e[2],r=!0),t[1]<e[1]&&t[3]<e[1]||t[1]>e[3]&&t[3]>e[3])return!1;t[1]<e[1]&&t[3]>e[1]&&(t[1]=e[1],r=!0),t[3]>e[3]&&(t[3]=e[3],r=!0)}return r}function h(e,t,r){var i=n.i(A.a)(r+1);return e?e.split(" ").forEach(function(r){var a=n.i(A.l)(r);if(c(a,t))e=e.split(r).join(i+(a[0]+1)+":"+i+t[0]+" "+i+(t[2]+2)+":"+i+(a[2]+1));else if(c(a,t,!0)){var o=void 0;o=t[0]>a[0]?i+(a[0]+1)+":"+i+t[0]:i+(t[2]+2)+":"+i+(a[2]+1),e=e.split(r).join(o)}}):e=i+"1:"+i+t[0]+" "+i+(t[2]+2)+":"+i+"1048576",e}function p(e,t){return e||(e={}),!!e.isLocked||!1!==e.isLocked&&(!(!t||!t.isLocked)||!(e.isLocked||!t||!1===t.isLocked))}function u(e){for(var t=e,n=0,r="",i=t.length,o=0;o<i;o++)a(t[o])&&n++;r=t.substring(0,n);var s=r.length;if(s!==i&&s<4&&1!==i&&isNaN(parseInt(t,10))){if(f(r)>16384)return!1;var l=parseFloat(t.substring(n,i));if(l>0&&l<1048577)return!0}return!1}function f(e){var t=0,n=0;if(e=e.toUpperCase(),t<e.length&&"!"===e[t]){for(t++;t<e.length&&"!"!==e[t];)t++;t++}for(;t<e.length&&a(e[t]);){n=26*n+e[t].charCodeAt(0)-64,t++}return 0===n?-1:n}function g(e,t,n,r,i){void 0===r&&(r="rows");var a;if(n)for(var o=t;o<1/0;o++)if(a=e[""+r],a[t]&&a[t].hidden)t++;else{if(!i)break;i--,t++}else for(var o=t;o>-1&&(a=e[""+r],a[t]&&a[t].hidden);o--)t--;return t}function m(e,t){var n=Object.keys(e);return(t?n.indexOf("fontSize")>-1:n.indexOf("fontSize")>-1&&Number(e.fontSize.split("pt")[0])>12)||n.indexOf("fontFamily")>-1||n.indexOf("borderTop")>-1||n.indexOf("borderBottom")>-1}function v(e,t,r,a,o,s){var l,d;if(t&&(d=o||n.i(k.I)(t[0],t[1],r,!1,!0),l=d.formula||""),l){s&&a.notify(A.r,{cellRef:n.i(A.i)(t[0],t[1])}),0===l.indexOf("=")&&(l=l.slice(1)),l=l.split("(").join(a.listSeparator).split(")").join(a.listSeparator);for(var c=["+","-","*","/",">=","<=","<>",">","<","=","%"],h=void 0,p=l,u=0;u<c.length;u++)h=p.split(c[u]),p=h.join(a.listSeparator);h=p.split(a.listSeparator);for(var f=[],g=void 0,m=void 0,v=void 0,y=void 0,C=void 0,b=0;b<h.length;b++)if(v=h[b].includes("!"),v?(y=h[b].split("!"),C=y[1].toUpperCase()):C=h[b].toUpperCase(),i(C)&&!C.includes("$")){var x=n.i(A.l)(C),S=[e[0]-(t[0]-x[0]),e[1]-(t[1]-x[1]),e[0]-(t[0]-x[2]),e[1]-(t[1]-x[3])];S[1]<0||S[2]<0||S[3]<0||!s&&S[0]<0?g="#REF!":(s&&S[0]<0&&(S[0]=S[2]),g=n.i(A.i)(S[0],S[1]),C.includes(":")&&(g+=":"+n.i(A.i)(S[2],S[3])),g=i(g)?g:"#REF!"),m={},v&&(g=y[0]+"!"+g),m[h[b]]=g,h[b].includes(":")?f.splice(0,0,m):f.push(m)}var w=void 0,_=void 0;l=d.formula;for(var I=l,b=0;b<f.length;b++){w=Object.keys(f[b])[0],_=f[b][""+w];for(var E=w.length,R=I.indexOf(w),F="",N=0;N<_.length;N++)F+=" ";l=l.slice(0,R)+_+l.slice(R+E),I=I.slice(0,R)+F+I.slice(R+E)}return l}return null}function y(e,t,r){var i={cell:r.cell,rowIndex:r.rowIdx,colIndex:r.colIdx,cancel:!1,sheet:t.name};if(r.preventEvt||e.trigger(A.s,i),!r.eventOnly&&!i.cancel)if(r.valChange){var a=n.i(k.I)(i.rowIndex,i.colIndex,t),o=!r.preventEvt&&e.getDisplayText(a),s=!(!a||!a.formula);n.i(k.J)(i.rowIndex,i.colIndex,t,i.cell,!r.pvtExtend);var l=n.i(k.I)(i.rowIndex,i.colIndex,t,!1,!0);r.mergedCells&&(delete l.value,delete l.formula);var d={action:"updateCellValue",address:[i.rowIndex,i.colIndex],sheetIndex:n.i(k.e)(e,t.name),value:s&&!l.formula?l.value||(0===l.value?"0":""):l.formula||l.value||(0===l.value?"0":""),skipFormatCheck:r.skipFormatCheck,isRandomFormula:r.isRandomFormula};if(e.notify(A.t,d),r.isFormulaDependent=d.isFormulaDependent,r.requestType&&null===i.cell&&n.i(k.J)(i.rowIndex,i.colIndex,t,i.cell,!r.pvtExtend),r.cellDelete&&(delete l.value,delete l.formula,delete l.hyperlink),r.uiRefresh&&e.serviceLocator.getService("cell").refresh(i.rowIndex,i.colIndex,r.lastCell,r.td,r.checkCF,r.checkWrap,r.skipFormatCheck,r.isRandomFormula),!r.preventEvt){var c=e.getDisplayText(l);if(c!==o){var h=n.i(k.I)(i.rowIndex,i.colIndex,t,!1,!0).value;h=h||(0===h?"0":"");var p={value:h,oldValue:o,formula:l.formula||"",address:t.name+"!"+n.i(A.i)(i.rowIndex,i.colIndex),displayText:c};r.requestType&&(p.requestType=r.requestType),e.trigger("cellSave",p)}}}else n.i(k.J)(i.rowIndex,i.colIndex,t,i.cell,!r.pvtExtend);return i.cancel}function C(e,t,r){for(var i=e,a=e,o=t,s=t,l=r.usedRange.rowIndex,d=r.usedRange.colIndex,c=function(e){for(var t=0;t<=d;t++)if(!n.i(F.isUndefined)(n.i(k.I)(e,t,r,null,!0).value))return!1;return!0},h=function(e){for(var t=i;t<=a;t++)if(!n.i(F.isUndefined)(n.i(k.I)(t,e,r,null,!0).value))return!1;return!0},p=i;p<=l&&(!n.i(F.isUndefined)(n.i(k.I)(p,t,r,null,!0).value)||!c(p));p++)a=p;for(var p=i;p>=0&&(!n.i(F.isUndefined)(n.i(k.I)(p,t,r,null,!0).value)||!c(p));p--)i=p;for(var p=o;p<=d&&(!n.i(F.isUndefined)(n.i(k.I)(e,p,r,null,!0).value)||!h(p));p++)s=p;for(var p=o;p>=0&&(!n.i(F.isUndefined)(n.i(k.I)(e,p,r,null,!0).value)||!h(p));p--)o=p;return[i,o,a,s]}function b(e,t,r){var i=n.i(A.l)(e.model.selectedRange),a=0,o=0;return"Column"===e.modelType?(r&&(i=[0,e.start,0,e.end]),"before"===e.insertType?t[1]<=i[1]&&t[3]>=i[1]?(a=0,o=i[3]-i[1]+1):i[1]<t[1]&&(a=o=i[3]-i[1]+1):t[1]<=i[3]&&t[3]>=i[3]?(a=0,o=i[3]-i[1]+1):i[3]<t[3]&&(a=o=i[3]-i[1]+1),[t[0],t[1]+a,t[2],t[3]+o]):(r&&(i=[e.start,0,e.end,0]),"above"===e.insertType?t[0]<=i[0]&&t[2]>=i[0]?(a=0,o=i[2]-i[0]+1):i[0]<t[0]&&(a=o=i[2]-i[0]+1):t[0]<=i[2]&&t[2]>=i[2]?(a=0,o=i[2]-i[0]+1):i[2]<t[2]&&(a=o=i[2]-i[0]+1),[t[0]+a,t[1],t[2]+o,t[3]])}function x(e,t){var n,r=0,i=0;return"Column"===e.modelType?(n=[0,e.start,e.model.usedRange.rowIndex,e.end],n[3]<t[1]?r=i=n[3]-n[1]+1:n[1]>=t[1]&&n[3]<=t[3]?i=n[3]-n[1]+1:n[1]>=t[1]&&n[1]<=t[3]?i=t[3]-n[1]+1:n[1]<t[1]&&n[3]>=t[1]?(r=t[1]-n[1],i=n[3]-n[1]+1):n[1]<t[1]&&n[3]<t[3]&&(r=n[3]-t[1]+(n[3]-n[1])+1,i=n[3]-n[1]+1),[t[0],t[1]-r,t[2],t[3]-i]):(n=[e.start,0,e.end,e.model.usedRange.colIndex],n[2]<t[0]?r=i=n[2]-n[0]+1:n[0]>=t[0]&&n[2]<=t[2]?i=n[2]-n[0]+1:n[0]>=t[0]&&n[0]<=t[2]?i=t[2]-n[0]+1:n[0]<t[0]&&n[2]>=t[0]?(r=t[0]-n[0],i=n[2]-n[0]+1):n[0]<t[0]&&n[2]<t[2]&&(r=n[2]-t[0]+(n[2]-n[0])+1,i=n[2]-n[0]+1),[t[0]-r,t[1],t[2]-i,t[3]])}function S(e,t,r,i){for(var a,o,s=e.length-1;s>=0;s--){a=e[s].range.trim().split(",");for(var l=0;l<a.length;l++)if(o=n.i(A.l)(a[l].includes(":")?a[l]:a[l]+":"+a[l]),r>=o[0]&&i>=o[1]&&r<=o[2]&&i<=o[3]){t.push(e[s]),e.splice(s,1);break}}}function w(e,t){for(var r,i,a,o,s,l=t.trim().split(","),d=0;d<e.length;d++)if(function(e){for(var t=0;t<l.length;t++){if(s=n.i(A.l)(l[t].includes(":")?l[t]:l[t]+":"+l[t]),e[0]<=s[0]&&e[1]<=s[1]&&e[2]>=s[2]&&e[3]>=s[3])return!0;if(a=e[0]>=s[0]&&e[0]<=s[2],o=e[2]>=s[0]&&e[2]<=s[2],r=e[1]>=s[1]&&e[1]<=s[3],i=e[3]>=s[1]&&e[3]<=s[3],a&&o){if(r||i||e[1]<s[1]&&e[3]>s[3]){if(e[0]-s[0]>0)return!0;if(s[2]-e[2]>0)return!0}if(r&&e[1]!==s[1])return!0;if(i&&e[3]!==s[3])return!0}else if(r&&i){if(a||o||e[0]<s[0]&&e[2]>s[2]){if(e[1]-s[1]>0)return!0;if(s[3]-e[3]>0)return!0}if(a){if(e[0]!==s[0])return!0}else if(o&&e[2]!==s[2])return!0}else if(a||o){if(r){if(e[1]!==s[1])return!0;if(e[0]-s[0]>0)return!0;if(s[2]-e[2]>0)return!0}else if(i){if(e[3]!==s[3])return!0;if(e[0]-s[0]>0)return!0;if(s[2]-e[2]>0)return!0}else if(e[1]<s[1]&&e[3]>s[3])return!0}else if((r||i)&&e[0]<s[0]&&e[2]>s[2])return!0}return!1}(e[d]))return!0;return!1}function _(e,t,r,i){var a,o;r||(r=n.i(F.getNumberDependable)(t,F.defaultCurrencyCode)),i||(i=n.i(F.getNumericObject)(t));for(var s=0;s<e.length;s++)a=e[s].toString().split(r).join(""),o=a.split(i.group),2===o.length&&n.i(N.a)(a,t,i.group,i.decimal)&&(a=o.join("")),"."!==i.decimal&&a.includes(i.decimal)&&(a=a.replace(i.decimal,".")),n.i(k._190)(a)&&(e[s]=a);return e}function I(e,t){var r=e.getActiveSheet(),i=[[t.topIndex+e.frozenRowCount(r),t.leftIndex+e.frozenColCount(r),t.bottomIndex,t.rightIndex]];if(r.frozenRows||r.frozenColumns){var a=e.frozenRowCount(r),o=e.frozenColCount(r),s=n.i(k.U)(r.topLeftCell);if(a&&o){i.push([s[0],s[1],a-1,o-1]);var l=n.i(k.U)(r.paneTopLeftCell);i.push([l[0],s[1],t.bottomIndex,o-1])}a&&i.push([s[0],t.leftIndex+o,a-1,t.rightIndex]),o&&i.push([t.topIndex+a,s[1],t.bottomIndex,o-1])}return i}function E(e){if(n.i(k.v)(e.sheet,e.rowIdx)){var t=g(e.sheet,e.rowIdx,!0);t<e.rowIdx+e.cell.rowSpan&&(e.rowIdx=t,e.isMergedHiddenCell=!0)}if(n.i(k.F)(e.sheet,e.colIdx)){var t=g(e.sheet,e.colIdx,!0,"columns");t<e.colIdx+e.cell.colSpan&&(e.colIdx=t,e.isMergedHiddenCell=!0)}}function R(e){var t=new F.Internationalization,r={};t.getNumberFormat(r);var i={intl:t,updateValue:!0,value:""},a={args:i,intl:t,currencySymbol:n.i(F.getNumberDependable)(e.locale,r.currency)};return function(t){t.format||!t.value||n.i(k._190)(t.value)||(i.cell=t,i.value=t.value,e.notify(k._51,i),t.format||!t.value.includes(a.currencySymbol)&&!t.value.includes("%")||(a.fResult=t.value,e.notify(k._52,a)))}}t.a=r,t.m=i,t.q=a,t.p=o,t.r=s,t.e=l,t.c=d,t.o=c,t.h=h,t.f=p,t.s=u,t.t=f,t.j=g,t.u=m,t.l=v,t.b=y,t.k=C,t.v=b,t.w=x,t.x=S,t.i=w,t.y=_,t.g=I,t.d=E,t.n=R;var k=n(0),A=n(2),F=n(3),N=(n.n(F),n(27))},function(e,t,n){"use strict";function r(e,t,n,r,a){return new i(e,t,n,r,a)}t.a=r;var i=function(){function e(e,t,n,r,i){this.preventCallback=!1,this.context=e,this.workerTask=t,this.defaultListener=n,this.workerData=r,i&&(this.preventCallback=!0),this.initWorker()}return e.prototype.terminate=function(){this.worker.terminate(),URL.revokeObjectURL(this.workerUrl)},e.prototype.initWorker=function(){var e=new Blob([this.getFnCode()],{type:"text/javascript"});this.workerUrl=URL.createObjectURL(e),this.worker=new Worker(this.workerUrl),this.worker.onmessage=this.messageFromWorker.bind(this),this.worker.onerror=this.onError.bind(this),this.worker.postMessage(this.workerData)},e.prototype.messageFromWorker=function(e){this.terminate(),this.defaultListener.apply(this.context,[e.data])},e.prototype.onError=function(e){if(this.terminate(),!e.message||!e.message.includes("FormData"))throw e.message||e;this.defaultListener.apply(this.context,[{isFormDataError:!0}])},e.prototype.getFnCode=function(){var e,t,n="",r="",i=!1;if("function"==typeof this.workerTask)this.workerTask.toString().indexOf("function")<0?r="function "+this.workerTask.toString():(r=this.workerTask.toString(),i=!0),n+="self.workerTask = "+r+"; \n";else if("object"==typeof this.workerTask)for(t=Object.keys(this.workerTask),e=0;e<t.length;e++)this.workerTask[t[e]].toString().indexOf("function")<0?r="function "+this.workerTask[t[e]].toString():(r=this.workerTask[t[e]].toString(),i=!0),n+=(0===e?"self.workerTask":t[e])+"= "+r+"; \n";return n+="self.onmessage = "+(i?"":" function ")+(this.preventCallback?this.getMessageFn.toString():this.getCallbackMessageFn.toString())+"; \n"},e.prototype.getCallbackMessageFn=function(e){postMessage(this.workerTask.apply(this,e.data))},e.prototype.getMessageFn=function(e){this.workerTask.apply(this,e.data)},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(2),i=n(4),a=n(6),o=n(3),s=(n.n(o),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(a.f,this.setChartHandler,this),this.parent.on(a.d,this.refreshChartData,this),this.parent.on(a._25,this.deleteChartColl,this),this.parent.on(a._26,this.refreshChartSize,this),this.parent.on(a._27,this.focusChartBorder,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a.f,this.setChartHandler),this.parent.off(a.d,this.refreshChartData),this.parent.off(a._25,this.deleteChartColl),this.parent.off(a._26,this.refreshChartSize),this.parent.off(a._27,this.focusChartBorder))},e.prototype.setChartHandler=function(e){var t=0;e.isInitCell=!n.i(o.isNullOrUndefined)(e.isInitCell)&&e.isInitCell,e.isUndoRedo=!!n.i(o.isNullOrUndefined)(e.isUndoRedo)||e.isUndoRedo,e.isPaste=!n.i(o.isNullOrUndefined)(e.isPaste)&&e.isPaste;var s,l=e.chart;if(l.length>0)for(;t<l.length;){if(!1===e.isCut&&document.getElementById(e.chart[t].id)&&(l[t]={range:l[t].range,id:n.i(o.getUniqueID)("e_spreadsheet_chart"),theme:l[t].theme,isSeriesInRows:l[t].isSeriesInRows,type:l[t].type,markerSettings:l[t].markerSettings}),document.getElementById(e.chart[t].id))return;s=l[t],s.theme=s.theme||"Material",s.type=s.type||"Line",s.isSeriesInRows=s.isSeriesInRows||!1,s.range=s.range||this.parent.getActiveSheet().selectedRange;var d=n.i(r._10)(n.i(r.l)(s.range)),c=n.i(r.g)(d);if(s.range.indexOf("!")>0?s.range=s.range.split("!")[0]+"!"+c:s.range=this.parent.getActiveSheet().name+"!"+c,n.i(o.isNullOrUndefined)(s.id)&&(s.id=n.i(o.getUniqueID)("e_spreadsheet_chart")),s.markerSettings&&s.markerSettings.visible&&(void 0===s.markerSettings.isFilled&&(s.markerSettings.isFilled=!0),void 0===s.markerSettings.shape&&(s.markerSettings.shape="Circle")),s.height=s.height||290,s.width=s.width||480,this.parent.notify(a._28,{option:s,isInitCell:e.isInitCell,triggerEvent:e.isUndoRedo,dataSheetIdx:e.dataSheetIdx,range:e.range,isPaste:e.isPaste}),this.parent.chartColl.push(s),!e.isInitCell||e.isPaste){var h=void 0===e.sheetId?s.range&&s.range.indexOf("!")>0?n.i(i.m)(this.parent,s.range.split("!")[0]):this.parent.activeSheetIndex:n.i(i.v)(this.parent,e.sheetId),p={clientY:s.top,isImage:!0},u={clientX:s.left,isImage:!0};this.parent.notify(a._29,p),this.parent.notify(a._30,u);var f=n.i(o.isUndefined)(h)?this.parent.getActiveSheet():this.parent.sheets[h],g=n.i(i.h)(p.clientY,u.clientX,f);g&&g.chart?g.chart.push(s):n.i(i.e)(p.clientY,u.clientX,f,{chart:[s]},!0)}else{var m=n.i(r.l)(e.range),p={clientY:s.top,isImage:!0},u={clientX:s.left,isImage:!0};this.parent.notify(a._29,p),this.parent.notify(a._30,u);var v={prevTop:s.top,prevLeft:s.left,prevRowIdx:m[0],prevColIdx:m[1],prevHeight:s.height,prevWidth:s.width,currentTop:s.top,currentLeft:s.left,currentRowIdx:p.clientY,currentColIdx:u.clientX,currentHeight:s.height,currentWidth:s.width,id:s.id,requestType:"chartRefreshOnInit"};m[0]===p.clientY&&m[1]===u.clientX||this.parent.notify(a._31,v)}t++}},e.prototype.refreshChartData=function(e){if(this.parent.chartColl&&this.parent.chartColl.length)for(var t,o,s,l,d=0,c=this.parent.chartColl.length;d<c;d++){if(t=this.parent.chartColl[d],t.range.includes("!")){if(o=t.range.split("!"),this.parent.activeSheetIndex!==n.i(i.m)(this.parent,o[0]))continue;s=o[1]}else s=t.range;if(e.viewportIndexes){for(var h=0;h<e.viewportIndexes.length;h++)if(n.i(r._49)([e.viewportIndexes[h]],s)){l=!0;break}}else l=e.range?n.i(r._49)([e.range],s):e.showHide?this.inRowColumnRange(n.i(r.l)(s),e.rIdx,e.showHide):n.i(r.R)(n.i(r.l)(s),e.rIdx,e.cIdx);l&&this.parent.notify(a._32,{chart:t})}},e.prototype.inRowColumnRange=function(e,t,n){return"rows"===n?t>=e[0]&&t<=e[2]:t>=e[1]&&t<=e[3]},e.prototype.refreshChartSize=function(e){for(var t,r=1,i=this.parent.sheets.length+1;r<i;){var a=this.parent.chartColl;if(t=a?a.length:0)for(;t--;){var s=this.parent.chartColl[t];if(!n.i(o.isNullOrUndefined)(e.overlayEle.querySelector("#"+s.id))){var l=this.parent.element.querySelector("."+s.id),d=n.i(o.getComponent)(l,"chart");d&&(d.height=e.height,d.width=e.width)}}r++}},e.prototype.focusChartBorder=function(e){for(var t=0;t<this.parent.chartColl.length;t++){var r=document.getElementById(e.id),i=document.getElementById(this.parent.chartColl[t].id);r&&i&&n.i(o.closest)(i,"."+r.classList[1])===r&&this.parent.notify(a._28,{option:this.parent.chartColl[t],isRefresh:!0})}},e.prototype.deleteChartColl=function(e){for(var t=0;t<this.parent.chartColl.length;t++)this.parent.chartColl[t].id+"_overlay"===e.id&&this.parent.chartColl.splice(t,1)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"workbookChart"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(9),i=(n.n(r),n(4)),a=n(2),o=n(0),s=n(3),l=(n.n(s),function(){function e(e){this.parent=e,this.requestedInfo=[],this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on(a.n,this.updateSheetFromDataSourceHandler,this),this.parent.on(a._67,this.dataSourceChangedHandler,this),this.parent.on(a.S,this.dataChangedHandler,this),this.parent.on(o._31,this.triggerDataChangeHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a.n,this.updateSheetFromDataSourceHandler),this.parent.off(a._67,this.dataSourceChangedHandler),this.parent.off(a.S,this.dataChangedHandler),this.parent.off(o._31,this.triggerDataChangeHandler))},e.prototype.updateSheetFromDataSourceHandler=function(e){var t,s,l,d,c,h,p,u,f,g,m,v=this,y=[],C=[],b=new r.Deferred;e.promise=b.promise;var x,S=e.autoDetectFormat,w=S&&n.i(o._184)(this.parent);if(e.sheet&&e.sheet.ranges.length)for(var _=this,I=e.sheet.ranges.length-1;I>=0;I--)!function(o){var I=e.sheet.ranges[o];x=n.i(a.l)(I.startCell),e.isSaveAction&&(e.indexes=x);var E=e.indexes[0],R=e.indexes[2];f=x[0],h=I.dataSource instanceof r.DataManager?I.dataSource:I.dataSource?new r.DataManager(I.dataSource):new r.DataManager,c=c||h.dataSource.url,e.sheet.isLocalData=!h.dataSource.url,f<=E?E-=f:f<=R?(R-=f,E=0):E=-1,I.showFieldAsHeader&&0!==E&&(E-=1);var k=!1,A=0;_.initRangeInfo(I);var F=_.getMaxCount(I);if(m=_.getLoadedInfo(E,R,I),E=m.unloadedRange[0],R=m.unloadedRange[1],I.info.insertRowRange&&(I.info.insertRowRange.forEach(function(e){A+=e[1]-e[0]+1}),E-=A,R-=A),E>=F?k=!0:R>F&&(R=F),e.loadComplete||_.requestedInfo.push({deferred:b,indexes:e.indexes,isNotLoaded:m.isNotLoaded}),E>=0&&m.isNotLoaded&&!k){C[o]=E,y[o]=!1;var N=(I.query?I.query:new r.Query).clone();h.executeQuery(N.range(E,R>=F?R:R+1).requiresCount()).then(function(r){if(v.parent&&!v.parent.isDestroyed){if(d=r.result&&r.result.result?r.result.result:r.result,l=n.i(a.l)(I.startCell),f=l[0],g=l[1],d&&d.length){if(I.info.count||(F=r.count,I.info.count=r.count),s=I.info.flds||Object.keys(d[0]),I.info.fldLen||(I.info.fldLen=s.length,I.info.flds=s),I.info.insertColumnRange){var c=0;I.info.insertColumnRange.forEach(function(e){for(var t=e[0];t<=e[1];t++)t<=g?s.splice(0,0,"emptyCell"+c):s.splice(t-g,0,"emptyCell"+c),c++})}0===C[o]&&I.showFieldAsHeader&&(p=f+C[o]+A,s.forEach(function(r,a){t=n.i(i.h)(p,g+a,e.sheet,!0),t?r.includes("emptyCell")||(t.value=r):e.sheet.rows[f+C[o]].cells[g+a]=r.includes("emptyCell")?{}:{value:r}})),d.forEach(function(r,a){p=f+C[o]+a+(I.showFieldAsHeader?1:0)+A;for(var l=0;l<s.length;l++)u=g+l,t=n.i(i.h)(p,u,e.sheet,!0),t?s[l].includes("emptyCell")||n.i(i.e)(p,u,e.sheet,v.getCellDataFromProp(r[s[l]]),!0):t=e.sheet.rows[p].cells[u]=s[l].includes("emptyCell")?{}:v.getCellDataFromProp(r[s[l]]),S&&w(t)})}else s=[];var h;h=f+(F||r.count)>0?f+(F||r.count)+(I.showFieldAsHeader?1:0)+A-1:e.sheet.usedRange.rowIndex;var b=g+s.length-1<0?e.sheet.usedRange.colIndex:g+s.length-1,x={rowIndex:h,colIndex:b};if(e.isFinite&&(x.rowIndex=h<e.sheet.rowCount?h:e.sheet.rowCount-1,x.colIndex=b<e.sheet.colCount?b:e.sheet.colCount-1),e.sheet.usedRange.rowIndex<x.rowIndex&&(e.sheet.usedRange.rowIndex=x.rowIndex),e.sheet.usedRange.colIndex<x.colIndex&&(e.sheet.usedRange.colIndex=x.colIndex),A?(m=v.getLoadedInfo(E,R,I),E=m.unloadedRange[0],R=m.unloadedRange[1],E>F&&(m.isNotLoaded=!1),m.isNotLoaded&&(R>F&&(R=F),I.info.loadedRange.push([E,R]))):I.info.loadedRange.push([E,R]),y[o]=!0,-1===y.indexOf(!1)){var _=void 0;if(R+f<f+I.info.count){e.rangeSettingCount||(e.rangeSettingCount=[]),e.rangeSettingCount.push(o),_=!0;var k={sheet:e.sheet,indexes:[0,0,h,b],promise:new Promise(function(e,t){e(void 0)}),rangeSettingCount:e.rangeSettingCount,isFinite:e.isFinite,loadComplete:e.loadComplete,autoDetectFormat:e.autoDetectFormat,resolveAfterFullDataLoaded:e.resolveAfterFullDataLoaded};v.updateSheetFromDataSourceHandler(k),k.promise.then(function(){"workbook"!==v.parent.getModuleName()&&(e.rangeSettingCount.pop(),e.rangeSettingCount.length||v.parent.notify("created",null),e.formulaCellRef?v.notfyFormulaCellRefresh(e.formulaCellRef,e.sheetIndex):e.loadComplete&&e.loadComplete())})}else e.formulaCellRef?v.notfyFormulaCellRefresh(e.formulaCellRef,e.sheetIndex):e.loadComplete&&e.loadComplete();_&&e.resolveAfterFullDataLoaded||(v.checkResolve(e.indexes),e.resolveAfterFullDataLoaded&&v.checkResolve([0,0,0,0]))}}})}else 0===o&&-1===y.indexOf(!1)&&_.checkResolve(e.indexes)}(I);else b.resolve()},e.prototype.notfyFormulaCellRefresh=function(e,t){this.parent.formulaRefCell=null,this.parent.notify("updateView",{indexes:n.i(a.l)(e),sheetIndex:t,refreshing:!0})},e.prototype.checkResolve=function(e){var t,n,r=0;this.requestedInfo.forEach(function(i,a){((n=JSON.stringify(i.indexes)===JSON.stringify(e))||t)&&(0===a?(i.deferred.resolve(),r++,t=!0):!t||!i.isLoaded&&i.isNotLoaded?n&&t?(i.deferred.resolve(),r++):n?i.isLoaded=!0:t=!1:(i.deferred.resolve(),r++))}),this.requestedInfo.splice(0,r)},e.prototype.getCellDataFromProp=function(e){var t={};return"[object Object]"===Object.prototype.toString.call(e)?e.formula?t.formula=e.formula:n.i(s.isNullOrUndefined)(e.value)||("string"==typeof e.value&&(0===e.value.indexOf("http://")||0===e.value.indexOf("https://")||0===e.value.indexOf("ftp://")||0===e.value.indexOf("www."))?(t.hyperlink=e.value,t.style={textDecoration:"underline",color:"#00e"}):t.value=e.value):n.i(a.k)(e)?t.formula=e:"string"==typeof e&&(0===e.indexOf("http://")||0===e.indexOf("https://")||0===e.indexOf("ftp://")||0===e.indexOf("www."))?(t.hyperlink=e,t.style={textDecoration:"underline",color:"#00e"}):t.value=e,t},e.prototype.getLoadedInfo=function(e,t,n){var r=!0;return n.info.loadedRange.forEach(function(n){n[0]<=e&&e<=n[1]?n[0]<=t&&t<=n[1]?r=!1:e=n[1]+1:n[0]<=t&&t<=n[1]&&(t=n[0]-1)}),{isNotLoaded:r,unloadedRange:[e,t]}},e.prototype.getMaxCount=function(e){if(e.query)for(var t=e.query.queries,n=0;n<t.length;n++)if("onTake"===t[n].fn)return Math.min(t[n].e.nos,e.info.count||t[n].e.nos);return e.info.count},e.prototype.initRangeInfo=function(e){e.info||(e.info={loadedRange:[]})},e.prototype.dataSourceChangedHandler=function(e){var t,r=this,i=this.parent.sheets[e.sheetIdx],o=i.ranges[e.rangeIdx];if(o&&(this.checkRangeHasChanges(i,e.rangeIdx)||!o.info)){var s=o.showFieldAsHeader,l=n.i(a.w)(o.startCell);o.info&&(o.info.loadedRange.forEach(function(e){for(var n=e[0];n<=e[1]&&n<o.info.count+(s?1:0);n++)if(t=i.rows[n+l[0]])for(var r=l[1];r<l[1]+o.info.fldLen;r++)t.cells&&t.cells[r]&&delete t.cells[r]}),o.info=null);var d=this.parent.viewport,c=[d.topIndex,d.leftIndex,d.bottomIndex,d.rightIndex],h={sheet:i,indexes:c,dataSourceChange:!0,promise:new Promise(function(e,t){e(void 0)})};this.updateSheetFromDataSourceHandler(h),h.promise.then(function(){r.parent.trigger("dataSourceChanged",{data:e.changedData,action:"dataSourceChanged",rangeIndex:Number(e.rangeIdx),sheetIndex:Number(e.sheetIdx)}),r.parent.notify("updateView",{indexes:c,checkWrap:!0,checkCF:!0})})}},e.prototype.checkRangeHasChanges=function(e,t){return!this.parent.isAngular||e.changedRangeIdx===parseInt(t,10)&&(delete e.changedRangeIdx,!0)},e.prototype.dataChangedHandler=function(e){var t,r,o,s,l,d,c,h,p,u=this,f=[{}],g=void 0===e.sheetIdx?this.parent.activeSheetIndex:e.sheetIdx,m=this.parent.sheets[g];m.ranges.forEach(function(v,y){if(v.dataSource){var C=void 0;if(s=n.i(a.w)(v.startCell),o=s.concat([s[0]+v.info.count+(v.showFieldAsHeader?0:-1),s[1]+v.info.fldLen-1]),"Row"===e.modelType||"Column"===e.modelType){if("Column"===e.modelType){if(e.insertType)l=o[1]<e.index&&o[3]>=e.index,h=[e.index],l?(e.model.forEach(function(){v.info.flds.splice(e.index-s[1],0,"")}),v.info.fldLen+=e.model.length):o[3]+1===e.index&&"after"===e.insertType?(e.model.forEach(function(){v.info.flds.splice(e.index-s[1],0,"")}),v.info.fldLen+=e.model.length):o[1]>=e.index&&(v.startCell=n.i(a.i)(s[0],s[1]+e.model.length));else if(l=o[1]<=e.startIndex&&o[3]>=e.startIndex)for(var b=e.startIndex;b<=e.endIndex;b++)b<=o[3]&&(v.info.flds.splice(e.startIndex,1),v.info.fldLen-=1);return}if(e.insertType){if(l=(v.showFieldAsHeader||"above"!==e.insertType&&!e.isMethod?o[0]<e.index:o[0]<=e.index)&&o[2]>=e.index,h=[e.index],l?(C=!0,v.info.count+=e.model.length):o[2]+1===e.index&&"below"===e.insertType?(C=!0,v.info.count+=e.model.length):o[0]>=e.index&&(v.startCell=n.i(a.i)(s[0]+e.model.length,s[1])),e.isMethod)return}else l=o[0]<=e.startIndex&&o[2]>=e.startIndex,e.isDataRequest?h=[e.startIndex,o[1],e.startIndex,o[1]]:t="delete"}else{h=n.i(a.l)(e.requestType&&e.requestType.toLowerCase().includes("paste")?e.pastedRange.split("!")[1]:e.sheetIdx>-1?e.address:(e.address||e.range||e.fillRange).split("!")[1]);var x=[v.showFieldAsHeader?o[0]+1:o[0]].concat(o.slice(1,4));if(v.showFieldAsHeader&&h[0]===s[0])for(var b=h[1];b<=h[3];b++)b>=x[1]&&b<=x[3]&&(v.info.flds[b-s[1]]=n.i(i.h)(s[0],b,m,!1,!0).value||"");if(l=n.i(a._68)(x,h,!0),"paste"===e.requestType&&e.copiedInfo.isCut){if(p=[].slice.call(e.copiedInfo.range),v.showFieldAsHeader&&p[0]===s[0]){for(var b=p[1];b<=p[3];b++)b>=x[1]&&b<=x[3]&&(v.info.flds[b-s[1]]="");l=!1}d=n.i(a._68)(x,p,!0)}}if(l||C||d){if("Row"!==e.modelType||e.insertType||e.isDataRequest){t=C?"add":"edit";var S=0;if(d){S=p[2]-p[0]+1;for(var b=0;b<S;b++)!function(e){f[e]={},v.info.flds.forEach(function(t,a){t&&(r=n.i(i.h)(p[0]+e,s[1]+a,m),f[e][""+t]=u.getFormattedValue(r))})}(b)}if(l||C)for(var w,_=!(e.isDataRequest||d||C||e.skipFilterCheck),b=0,I=0;b<(C?e.model.length:h[2]-h[0]+1||1);b++)!function(e,t){if(_&&n.i(i.r)(m,h[0]+e))return w=t,"continue";f[t+S]={},v.info.flds.forEach(function(a,o){a&&(r=n.i(i.h)(h[0]+e,s[1]+o,m),f[t+S][""+a]=u.getFormattedValue(r))}),t++,w=t}(b,I),I=w}else{if(e.deletedModel.forEach(function(e,t){f[t]={},v.info.flds.forEach(function(n,i){e.cells?(r=e.cells[s[1]+i],f[t][""+n]=u.getFormattedValue(r)):f[t][""+n]=null}),v.info.count-=1}),e.isMethod)return;c={count:e.deletedModel.length,index:e.endIndex}}e.isDataRequest?e.data=f:u.parent.trigger("dataSourceChanged",{data:f,action:t,rangeIndex:y,sheetIndex:g})}else c&&c.count&&o[0]>c.index&&(v.startCell=n.i(a.i)(s[0]-c.count,s[1]))}})},e.prototype.getFormattedValue=function(e){var t=this.parent.getDisplayText(e);return""===t?null:e&&!e.format&&"number"==typeof e.value?e.value:t},e.prototype.triggerDataChangeHandler=function(e){var t=["insert","delete","edit","cellDelete","cellSave","autofill","clipboard","clear"],r=!0;if(("delete"===e.action||"insert"===e.action)&&["Sheet"].indexOf(e.eventArgs.modelType)>-1?r=!1:"clear"===e.action&&["Clear Formats","Clear Hyperlinks"].indexOf(e.eventArgs.type)>-1?r=!1:"clipboard"===e.action&&"Formats"===e.eventArgs.requestType&&(r=!1),r&&t.indexOf(e.action)>-1){var i=void 0;!e.isUndo||"delete"!==e.action&&"insert"!==e.action?i=e.eventArgs:(i=n.i(s.extend)({},e.eventArgs),"delete"===e.action?(i.index=i.startIndex,i.model=i.deletedModel,i.insertType="below"):(i.startIndex=i.index,i.endIndex=e.eventArgs.index+e.eventArgs.model.length-1,i.deletedModel=i.model,delete i.insertType)),this.parent.notify(a.S,i)}},e.prototype.getModuleName=function(){return"dataBind"},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null,this.requestedInfo=[]},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(4),i=n(9),a=(n.n(i),n(2)),o=n(0),s=n(6),l=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(s.G,this.initiateFilterHandler,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(s.G,this.initiateFilterHandler)},e.prototype.initiateFilterHandler=function(e){var t=this,o=e.args,s=new i.Deferred,l=n.i(r.g)(this.parent,n.i(a.L)(this.parent,o.range)),d=o.filterOptions||{};if(e.promise=s.promise,d.datasource){this.setFilter(d.datasource,d.predicates,o.range,e.refresh);var c={range:o.range,filterOptions:d};s.resolve(c)}else{var h=n.i(a._10)(n.i(a.m)(o.range));if(h[0]>l.usedRange.rowIndex||h[1]>l.usedRange.colIndex)return void s.reject("Select a cell or range inside the used range and try again.");h[0]===h[2]&&h[2]-h[0]==0&&(h[0]=0,h[1]=0,h[3]=l.usedRange.colIndex),h[2]=l.usedRange.rowIndex,h[0]=h[0]+1;var p=n.i(a.g)(h);n.i(r.o)(this.parent,l.name+"!"+p,!0,!0,null,null,null,null,!1).then(function(n){var r=new i.DataManager(n);t.setFilter(r,d.predicates,o.range,e.refresh);var a={range:p,filterOptions:d};s.resolve(a)})}},e.prototype.setFilter=function(e,t,l,d){var c=this;if(e&&t){var h=e.dataSource.json,p=new i.Query;t.length&&p.where(i.Predicate.and(t));var u,f,g=e.executeLocal(p);if(l.indexOf("!")>-1?(f=n.i(o.e)(this.parent,l.split("!")[0]),u=n.i(r.g)(this.parent,f)):(u=this.parent.getActiveSheet(),f=n.i(o.e)(this.parent,u.name)),"spreadsheet"===this.parent.getModuleName()){var m,v,y=this.parent;if(y.scrollSettings.enableVirtualization&&(u.rows||h).length>y.viewport.rowCount+2*y.getThreshold("row")||u.frozenRows||u.frozenColumns||d){h.forEach(function(e){m=g.indexOf(e)<0,n.i(o.u)(u,Number(e.__rowIndex)-1,{hidden:m,isFiltered:m})}),v=f===y.activeSheetIndex;var C=n.i(a.l)(u.paneTopLeftCell);this.parent.updateTopLeftCell(n.i(a._50)(u,C[0],!0)-this.parent.frozenRowCount(u),null,"col")}else h.forEach(function(e){if(m=g.indexOf(e)<0,v)n.i(o.u)(u,Number(e.__rowIndex)-1,{hidden:m,isFiltered:m});else{var t={startIndex:Number(e.__rowIndex)-1,hide:m,isFiltering:!0,sheetIndex:f};t.endIndex=t.startIndex,c.parent.notify(s._33,t),v=t.refreshUI}});v&&y.renderModule.refreshSheet(!1,!1,document.activeElement.id!==this.parent.element.id+"_SearchBox")}else{var b;h.forEach(function(e){b=g.indexOf(e)<0,n.i(o.u)(u,Number(e.__rowIndex)-1,{hidden:b,isFiltered:b})})}}},e.prototype.getModuleName=function(){return"workbookFilter"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(0),i=n(2),a=n(31),o=n(3),s=(n.n(o),function(){function e(e){this.uniqueOBracket=String.fromCharCode(129),this.uniqueCBracket=String.fromCharCode(130),this.uniqueCSeparator=String.fromCharCode(131),this.uniqueCOperator=String.fromCharCode(132),this.uniquePOperator=String.fromCharCode(133),this.uniqueSOperator=String.fromCharCode(134),this.uniqueMOperator=String.fromCharCode(135),this.uniqueDOperator=String.fromCharCode(136),this.uniqueModOperator=String.fromCharCode(137),this.uniqueConcateOperator=String.fromCharCode(138),this.uniqueEqualOperator=String.fromCharCode(139),this.uniqueExpOperator=String.fromCharCode(140),this.uniqueGTOperator=String.fromCharCode(141),this.uniqueLTOperator=String.fromCharCode(142),this.sheetInfo=[],this.parent=e,this.init()}return e.prototype.init=function(){var e=this;this.addEventListener(),this.initCalculate(),this.registerSheet(),this.parent.customFormulaCollection.forEach(function(t,n){e.addCustomFunction(t.handler,n,t.description)})},e.prototype.destroy=function(){var e=this;if(this.removeEventListener(),this.parent.refreshing){this.clearAllUniqueFormulaValue();this.calculateInstance.getLibraryFormulas().forEach(function(t,n){t.isCustom&&e.parent.customFormulaCollection.set(n,{handler:t.handler,description:t.description})})}this.calculateInstance.dispose(),this.calculateInstance=null,this.sheetInfo&&(this.sheetInfo=[]),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(i.j,this.performFormulaOperation,this),this.parent.on(i._54,this.aggregateComputation,this),this.parent.on(i._55,this.getUniqueRange,this),this.parent.on(i._56,this.removeUniquecol,this),this.parent.on(i.r,this.clearFormulaDependentCells,this),this.parent.on(i._57,this.formulaInValidation,this),this.parent.on(i._46,this.refreshInsertDelete,this),this.parent.on(i._43,this.getUpdatedFormulaOnInsertDelete,this),this.parent.on(r._155,this.autoCorrectCellRef,this),this.parent.on(r._156,this.parseFormulaArgument,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(i.j,this.performFormulaOperation),this.parent.off(i._54,this.aggregateComputation),this.parent.off(i._55,this.getUniqueRange),this.parent.off(i._56,this.removeUniquecol),this.parent.off(i.r,this.clearFormulaDependentCells),this.parent.off(i._57,this.formulaInValidation),this.parent.off(i._46,this.refreshInsertDelete),this.parent.off(i._43,this.getUpdatedFormulaOnInsertDelete),this.parent.off(r._155,this.autoCorrectCellRef),this.parent.off(r._156,this.parseFormulaArgument))},e.prototype.getModuleName=function(){return"workbookFormula"},e.prototype.initCalculate=function(){this.calculateInstance=new a.a(this.parent),this.calcID=this.calculateInstance.createSheetFamilyID(),this.calculateInstance.setTreatEmptyStringAsZero(!0),this.calculateInstance.grid=this.parent.getActiveSheet().id.toString(),this.calculateInstance.setParseArgumentSeparator(this.parent.listSeparator);var e=n.i(o.getNumericObject)(this.parent.locale).decimal;"."!==e&&this.parent.listSeparator!==e&&this.calculateInstance.setParseDecimalSeparator(e)},e.prototype.clearFormulaDependentCells=function(e){if(e.isOpen)return this.calculateInstance.getDependentCells().clear(),void this.calculateInstance.getFormulaInfoTable().clear();var t=e.cellRef.split(":")[0],r=this.parent.getActiveSheet().id.toString(),i=this.calculateInstance.getSheetFamilyItem(r);i.isSheetMember&&!n.i(o.isNullOrUndefined)(i.parentObjectToToken)&&(t=i.parentObjectToToken.get(r)+t),this.calculateInstance.clearFormulaDependentCells(t)},e.prototype.formulaInValidation=function(e){var t=this.calculateInstance.getLibraryFormulas().get(e.value);e.skip=n.i(o.isNullOrUndefined)(t)},e.prototype.performFormulaOperation=function(e){var t,r,i=e.action;"refreshCalculate"!==i&&(t=this.calculateInstance.getLibraryFormulas(),r=Array.from(t.values()));var s;switch(i){case"getLibraryFormulas":e.formulaCollection=Array.from(t.keys());break;case"getFormulaCategory":s=["All"];for(var l=1;l<Array.from(t.values()).length;l++)s.indexOf(r[l].category)<0&&s.push(r[l].category);e.categoryCollection=s;break;case"dropDownSelectFormulas":for(var l=0;l<Array.from(t.values()).length;l++)e.selectCategory===r[l].category&&(e.formulaCollection[l]=Array.from(t.keys())[l]);break;case"getFormulaDescription":for(var l=0;l<Array.from(t.values()).length;l++)e.selectedList===Array.from(t.keys())[l]&&(e.description=r[l].description,e.isCustom=r[l].isCustom);break;case"registerSheet":this.registerSheet(e.sheetIndex,e.sheetCount),e.isImport&&(this.calculateInstance.setParseArgumentSeparator(this.parent.listSeparator),this.updateSheetInfo());break;case"unRegisterSheet":this.unRegisterSheet(e.sheetIndex,e.sheetCount,e.propertyChange);break;case"initSheetInfo":this.updateSheetInfo();break;case"refreshCalculate":e.isFormula&&(e.value=this.autoCorrectFormula(e.value,e.rowIndex,e.colIndex,e.sheetIndex),e.isClipboard&&e.value.toString().toUpperCase().includes("UNIQUE")&&(this.parent.sheets[e.sheetIndex].rows[e.rowIndex].cells[e.colIndex].value="")),e.isFormulaDependent=this.refreshCalculate(e.rowIndex,e.colIndex,e.value,e.isFormula,e.sheetIndex,e.isRefreshing,e.isDependentRefresh,e.isRandomFormula),e.value=e.value?e.value.toString().split("^+").join("^").split("&+").join("&"):e.value;break;case"refreshRandomFormula":this.refreshRandomFormula(),this.calculateInstance.cell="";break;case"setArgumentSeparator":this.calculateInstance.setParseArgumentSeparator(this.parent.listSeparator);break;case"addDefinedName":e.isAdded=this.addDefinedName(e.definedName,!1,e.index,e.isEventTrigger);break;case"removeDefinedName":e.isRemoved=this.removeDefinedName(e.definedName,e.scope,e.isEventTrigger);break;case"initiateDefinedNames":this.initiateDefinedNames();break;case"renameUpdation":this.renameUpdation(e.value,e.pName);break;case"addSheet":this.sheetInfo.push({visibleName:e.visibleName,sheet:e.sheetName,index:e.sheetId});break;case"getSheetInfo":e.sheetInfo=this.sheetInfo;break;case"deleteSheetTab":for(var l=0;l<this.sheetInfo.length;l++)if(this.sheetInfo[l].index===e.sheetId){var d=this.sheetInfo[l].visibleName,c=this.sheetInfo[l].sheet;this.sheetInfo.splice(l,1);var h=e.sheetId.toString();this.sheetDeletion(c,h),this.calculateInstance.unregisterGridAsSheet(h,h),this.definedNamesDeletion(d);break}break;case"getReferenceError":e.refError=this.referenceError();break;case"getAlpha":e.col=n.i(a.e)(e.col);break;case"addCustomFunction":this.addCustomFunction(e.functionHandler,e.functionName,e.formulaDescription);break;case"computeExpression":e.calcValue=this.calculateInstance.computeExpression(e.formula,e.isFromComputeExpression);break;case"registerGridInCalc":this.calculateInstance.grid=e.sheetID;break;case"dependentCellsAvailable":case"checkFormulaAdded":var p=this.calculateInstance.getSheetFamilyItem(e.sheetId);p.isSheetMember&&!n.i(o.isNullOrUndefined)(p.parentObjectToToken)&&(e.address=p.parentObjectToToken.get(e.sheetId)+e.address),"checkFormulaAdded"===i?e.added=this.calculateInstance.getFormulaInfoTable().has(e.address):e.isAvailable=this.calculateInstance.getDependentCells().has(e.address)}},e.prototype.definedNamesDeletion=function(e){var t=this.parent.definedNames;if(t&&t.length>0)for(var n=t.length-1;n>=0;n--)t[n].refersTo.split("=")[1].split("!")[0].split("'").join("")===e&&this.removeDefinedName(t[n].name,t[n].scope)},e.prototype.referenceError=function(){return this.calculateInstance.getErrorStrings()[a.p.ref]},e.prototype.getSheetInfo=function(){return this.sheetInfo},e.prototype.addCustomFunction=function(e,t,n){this.calculateInstance.defineFunction(t,e,n)},e.prototype.updateSheetInfo=function(){var e=this;this.sheetInfo=[],this.parent.sheets.forEach(function(t){e.sheetInfo.push({visibleName:t.name,sheet:"Sheet"+t.id,index:t.id})})},e.prototype.sheetDeletion=function(e,t){var r,i,a,s,l,d,c,h=this,p=this.calculateInstance.getDependentCells(),u=this.calculateInstance.getSheetFamilyItem(t),f=this.calculateInstance.namedRanges;f&&f.size&&(d=Array.from(f.keys()),c=Array.from(f.values()));var g,m;p.forEach(function(p,v){p.forEach(function(p){if(r=h.calculateInstance.getFormulaInfoTable().get(p),!n.i(o.isNullOrUndefined)(r)){i=r.formulaText;var y=!1;if(!i.includes(e)&&f&&f.size){var C=i.replace(/\w+/g,function(e){var t=d.indexOf(e);return-1!==t?(y=!0,c[t]):e});i=C}g=e.toUpperCase(),i=i.toUpperCase(),m=i.indexOf(g),m>-1&&("'"===i[m-1]&&"'"===i[m+g.length]&&(g="'"+g+"'"),g+=h.calculateInstance.sheetToken,i=i.split(g).join(h.referenceError()),a=h.calculateInstance.rowIndex(p),s=h.calculateInstance.colIndex(p),l=p.slice(0,p.lastIndexOf(h.calculateInstance.sheetToken)+1),h.updateDataContainer([a-1,s-1],{value:i,visible:!1,isNamedRange:y,sheetId:u.tokenToParentObject.has(l)?Number(u.tokenToParentObject.get(l)):parseInt(p.split("!")[1],10)+1}),h.calculateInstance.refresh(r.getParsedFormula()))}l=v.slice(0,v.lastIndexOf(h.calculateInstance.sheetToken)+1),t===(u.tokenToParentObject.has(l)?u.tokenToParentObject.get(l):v.split("!")[1])&&(h.calculateInstance.getFormulaInfoTable().delete(v),h.calculateInstance.clearFormulaDependentCells(v))})})},e.prototype.renameUpdation=function(e,t){var a,o,s=this,l=t.toUpperCase(),d=new RegExp("[!@#$%^&()+=';,.{}|\\\":<>~_-]","g"),c=RegExp,h=new c(t.replace(d,"\\$&")+'(?=[\'!])(?=[^"]*(?:"[^"]*"[^"]*)*$)',"gi"),p=function(t){n.i(i.k)(t.value1)&&t.value1.toUpperCase().includes(l)&&t.value1.match(h)&&(t.value1=t.value1.replace(h,e)),n.i(i.k)(t.value2)&&t.value2.toUpperCase().includes(l)&&t.value2.match(h)&&(t.value2=t.value2.replace(h,e))};this.sheetInfo.forEach(function(d,c){if((a=n.i(r.l)(s.parent,c))&&a.rows&&a.rows.length)for(var u=0,f=a.rows.length;u<f;u++)if(a.rows[u]&&a.rows[u].cells)for(var g=0,m=a.rows[u].cells.length;g<m;g++)o=n.i(r.I)(u,g,a,!1,!0),o.formula&&n.i(i.k)(o.formula)&&o.formula.toUpperCase().includes(l)&&o.formula.match(h)&&(o.formula=o.formula.replace(h,e)),o.validation&&p(o.validation);if(a&&a.columns&&a.columns.length)for(var v=void 0,u=0,y=a.columns.length;u<y;u++)(v=a.columns[u])&&v.validation&&p(v.validation);for(var C=s.parent.definedNames,u=0;u<C.length;u++)n.i(i.k)(C[u].refersTo)&&C[u].refersTo.includes(t)&&C[u].refersTo.match(h)&&(C[u].refersTo=C[u].refersTo.replace(h,e),C[u].scope.includes(t)&&(C[u].scope=e));s.calculateInstance.updateNamedRange(t,e),d.visibleName===t&&(d.visibleName=e)})},e.prototype.updateDataContainer=function(e,t){for(var a,o,s,l=0,d=this.parent.sheets.length;l<d;l++)if(a=n.i(r.l)(this.parent,l),a.id===t.sheetId){e[0]in a.rows?(o=a.rows[e[0]],e[1]in o.cells?(s=o.cells[e[1]],s.formula=t.isNamedRange?s.formula:t.value,t.visible?l===this.parent.activeSheetIndex&&a.activeCell===n.i(i.i)(e[0],e[1])&&this.parent.notify(i._58,{}):s.value=this.referenceError()):o.cells[e[1]]=s={}):(o=a.rows[e[0]]={},o[e[1]]=s={});break}},e.prototype.parseSheetRef=function(e,t){var n,r=new RegExp("[!@#$%^&()+=';,.{}|\":<>~_-]","g"),i=0,a=this.getSheetInfo(),o=a.length,s=[];s.length=0;var l,d,c,h,p,u='(?=[\'!])(?=[^"]*(?:"[^"]*"[^"]*)*$)',f=RegExp;for(i=0;i<o;i++)if(a[i].sheet!==a[i].visibleName&&(n=new f(a[i].visibleName.replace(r,"\\$&")+u,"gi"),c=i,e.match(n))){for(var g=i+1;g<o;g++)a[g].visibleName.includes(a[i].visibleName)&&(l=new f(a[g].visibleName.replace(r,"\\$&")+u,"gi"),d=e.search(l),h=e.search(n),d>-1&&(d<h||d===h&&a[g].visibleName.length>a[i].visibleName.length)&&(p=new RegExp("Sheet","gi"),0!==a[g].visibleName.search(p)&&(n=l,c=g)));e=e.replace(n,c+"/"),s.push(c)}i=0;for(var m;i<s.length;)n=new f(s[i]+"/"+u,"gi"),m=t?"`"+a[s[i]].sheet+"`":a[s[i]].sheet,e=e.replace(n,m),i++;return e},e.prototype.registerSheet=function(e,t){void 0===e&&(e=0),void 0===t&&(t=this.parent.sheets.length);for(var i;e<t;)i=n.i(r.l)(this.parent,e).id+"",this.calculateInstance.registerGridAsSheet(i,i,this.calcID),e++},e.prototype.unRegisterSheet=function(e,t,i){void 0===e&&(e=0),void 0===t&&(t=this.parent.sheets.length);var a;if(this.calculateInstance.tokenCount=0,i)this.calculateInstance.unregisterGridAsSheet(a,a,i);else for(;e<t;)a=n.i(r.l)(this.parent,e).id+"",this.calculateInstance.unregisterGridAsSheet(a,a),e++},e.prototype.getUniqueRange=function(e){e.range=this.calculateInstance.uniqueRange},e.prototype.removeUniquecol=function(e){if(e&&e.clearAll)return void this.clearAllUniqueFormulaValue();for(var t=this.parent.getActiveSheet(),a=0;a<this.calculateInstance.uniqueRange.length;a++){var o=this.calculateInstance.uniqueRange[a].split(":")[0].split("!");if(o[0]===t.name&&o[1]===t.activeCell){var s=n.i(i.l)(this.calculateInstance.uniqueRange[a]);this.calculateInstance.uniqueRange.splice(a,1);for(var l=s[0];l<=s[2];l++)for(var d=s[1];d<=s[3];d++){var c=n.i(r.I)(l,d,this.parent.getActiveSheet());c.formula="",this.parent.updateCell({value:"",formula:""},n.i(i.g)([l,d]))}}}},e.prototype.refreshCalculate=function(e,t,s,l,d,c,h,p){var u=this,f=n.i(o.isNullOrUndefined)(d)?this.parent.getActiveSheet():n.i(r.l)(this.parent,d),g=f.id+"",m=f.name,v=this.calculateInstance.getSheetFamilyItem(g),y=n.i(i.a)(t+1)+(e+1);if(v.isSheetMember&&!n.i(o.isNullOrUndefined)(v.parentObjectToToken)&&(y=v.parentObjectToToken.get(g)+y),l){var C=s;s=this.parseSheetRef(s);var b=new a.f(e+1,t+1,s),x=[f.usedRange.rowIndex,f.usedRange.colIndex];this.calculateInstance.valueChanged(g,b,!0,x,c,m,p),!0!==this.calculateInstance.isRandomVal||p||this.refreshRandomFormula();var S=n.i(r.I)(e,t,f);if(S&&C&&!h){C=C.toString().toUpperCase();var w=void 0;if(0===C.indexOf("=SUM(")?w="=SUM(":0===C.indexOf("=AVERAGE(")?w="=AVERAGE(":0===C.indexOf("=ROUNDDOWN(")?w="=ROUNDDOWN(":0===C.indexOf("=ROUNDUP(")?w="=ROUNDUP(":0===C.indexOf("=MOD(")&&(w="=MOD("),w){if(C=C.replace(w,""),C.includes(")")){C=C.slice(0,C.lastIndexOf(")"));for(var _=void 0,I=void 0;C.includes("(")&&C.includes(")");)I=C.indexOf("("),_=C.slice(I+1),C=C.slice(0,I)+(_.includes(")")?_.slice(_.indexOf(")")+1):_)}for(var E,R,k,A=C.split(this.calculateInstance.getParseArgumentSeparator()),F=void 0,N=void 0,T=void 0,O=void 0,I=0;I<A.length;I++)if(E=A[I].split(":")[0],E.includes("!")?(T=E.split("!"),k=T[0].split("'").join(""),E=T[1]):k="",n.i(i._59)(E)&&(k?(R=n.i(r.e)(this.parent,k),N=void 0!==R?n.i(r.l)(this.parent,R):f):N=f,O=n.i(i.l)(E),(F=n.i(r.I)(O[0],O[1],N))&&F.format)){S.format=F.format;break}}else{var D=this.calculateInstance.getDependentFormulaCells().get(y);if(D&&D.size&&this.calculateInstance.getFormulaInfoTable().has(y)&&-1===this.calculateInstance.getFormulaInfoTable().get(y).getParsedFormula().lastIndexOf("q")&&!S.format){var L,P,M,B,H,U,V=this.calculateInstance.getSheetFamilyItem(null,this.calcID);D.forEach(function(e){L||(M=e.slice(0,e.lastIndexOf("!")+1),e=e.replace(M,""),n.i(i._59)(e)&&(U=n.i(i.l)(e),V.tokenToParentObject.has(M)?(H=n.i(r.f)(u.parent,Number(V.tokenToParentObject.get(M))),B=void 0!==H?n.i(r.l)(u.parent,H):f):B=f,(P=n.i(r.I)(U[0],U[1],B))&&P.format&&(L=P.format)))}),L&&(S.format=L)}}}}else this.calculateInstance.getFormulaInfoTable().has(y)&&(this.calculateInstance.getFormulaInfoTable().delete(y),this.calculateInstance.clearFormulaDependentCells(y)),this.calculateInstance.refresh(y),this.calculateInstance.refreshRandValues(y);return this.calculateInstance.cell="",this.calculateInstance.getDependentCells().has(y)},e.prototype.refreshRandomFormula=function(){var e,t,n="",r=this.calculateInstance.randCollection;if(this.calculateInstance.randomValues.size>1&&this.calculateInstance.randomValues.size===r.length)for(var i=0;i<this.calculateInstance.randomValues.size;i++){e=this.calculateInstance.rowIndex(r[i]),t=this.calculateInstance.colIndex(r[i]),n=this.calculateInstance.randomValues.get(r[i]);var o=(parseFloat(this.calculateInstance.getSheetToken(r[i]).split(this.calculateInstance.sheetToken).join(""))+1).toString(),s=new a.f(e,t,n);this.calculateInstance.valueChanged(o,s,!0,void 0,void 0,void 0,!1,!0)}},e.prototype.autoCorrectFormula=function(e,t,i,a){if(!n.i(o.isNullOrUndefined)(e)){e=this.autoCorrectCellRef({formula:e}),e=e.toString(),2===e.split("(").length&&e.indexOf(")")<0&&(e+=")");var s=void 0;0===e.indexOf("=")&&(e=e.slice(1),s=!0);var l=e.match(/</g),d=e.match(/>/g),c=e.match(/=/g);if(l){for(var h="",p=0;p<l.length;p++)h+=l[p];e=e.replace(h,"<")}if(d){for(var u="",f=0;f<d.length;f++)u+=d[f];e=e.replace(u,">")}if(c){for(var g="",m=0;m<c.length;m++)g+=c[m];e=e.split(g).join("=")}e=s?"="+e:e,(l||d||c)&&(n.i(r.I)(t,i,n.i(o.isNullOrUndefined)(a)?this.parent.getActiveSheet():n.i(r.l)(this.parent,a)).formula=e)}return e},e.prototype.correctCellReference=function(e){var t,n,r,i,a,o=this,s=e.split(":");return s.forEach(function(l,d){if(n=l.split("!"),e=n[1]||l,a=null,e.includes("&"))t=e.split("&"),o.calculateInstance.isCellReference(t[1].split("$").join(""))&&(t[1]=o.getUpdatedCellRef(t[1]),a=t.join("&"));else if(o.calculateInstance.isCellReference(e.split("$").join("")))a=o.getUpdatedCellRef(e),n.length>1&&(a=n[0]+"!"+a);else if(r=l.match(/[\/\+\-\*\^\>\<\>=\<=\<>]+/g)){t=l.split(r[0]);for(var c=0;c<t.length;c++)n=t[c].split("!"),e=n[1]||n[0],o.calculateInstance.isCellReference(e.split("$").join(""))&&(t[c]=o.getUpdatedCellRef(e),n.length>1&&(t[c]=n[0]+"!"+t[c]));a=t.join(r[0])}a&&a!==l&&(i=!0,s[d]=a)}),{isInvalid:i,ref:s.join(":")}},e.prototype.autoCorrectCellRef=function(e){var t,n=e.formula.lastIndexOf(")");if(n>-1&&2===e.formula.split(")").length){for(var r=n-1;r>-1&&"("!==e.formula[r];){if(")"===e.formula[r])return e.formula;r--}if(r>-1){for(var i=e.formula.substring(r+1,n),a=this.calculateInstance.getParseArgumentSeparator(),o=i.split(a),s=void 0,l=0;l<o.length;l++)t=this.correctCellReference(o[l]),t.isInvalid&&(s=!0,o[l]=t.ref);s&&(e.formula=e.formula.split(i).join(o.join(a)),e.isInvalid=!0)}}else e.formula.startsWith("=")&&!e.formula.includes(")")&&(t=this.correctCellReference(e.formula.substring(1,e.formula.length)),t.isInvalid&&(e.formula="="+t.ref,e.isInvalid=!0));return e.formula},e.prototype.getUpdatedCellRef=function(e){var t=e;e=e.trim();var r=0===e.indexOf("$"),a=e.search(/[a-zA-Z]/),o=e.search(/\d/);return a=r?a-1:a,(r?o>1:o>0)&&n.i(i.o)(e.substring(o,e.length))?t:e.substring(a,e.length)+e.substring(0,a)},e.prototype.initiateDefinedNames=function(){for(var e=this.parent.definedNames,t=0;t<e.length;){var r=e[t],a=this.parseSheetRef(r.refersTo),o=n.i(i._40)(a),s=!1,l=a.indexOf("http:")>-1||a.indexOf("https:")>-1;if(o=o.split("$").join(""),o=o.split("=").join(""),o.indexOf(":")>-1){var d=o.split(":");(n.i(i._59)(d[0])&&n.i(i._59)(d[1])||d[0].match(/[0-9]/)&&d[1].match(/[0-9]/)||d[0].toUpperCase().match(/[A-Z]/)&&d[1].toUpperCase().match(/[A-Z]/))&&(s=!0)}else o.indexOf(":")<0&&n.i(i._59)(o)&&(s=!0);l&&(s=!1),s?this.addDefinedName(r,!0,void 0,!0):(this.removeDefinedName(r.name,r.scope,!0),t--),t++}},e.prototype.addDefinedName=function(e,t,i,a){(void 0===i||i<-1)&&(i=this.parent.definedNames.length);var o,s=!0,l=e.name;if(e.refersTo.indexOf("!")<0){var d=n.i(r.p)(this.parent);d=-1!==d.indexOf(" ")?"'"+d+"'":d,e.refersTo=d+"!"+(e.refersTo.indexOf("=")<0?e.refersTo:e.refersTo.split("=")[1])}var c=e.refersTo,h=this.parseSheetRef(e.refersTo);e.scope?(o=n.i(r.e)(this.parent,e.scope))>-1&&(l=n.i(r.p)(this.parent,o)+"!"+l):e.scope="",e.comment||(e.comment=""),!t&&this.checkIsNameExist(e.name,e.scope)?s=!1:(this.calculateInstance.addNamedRange(l,"="===h[0]?h.substr(1):h),"="!==h[0]&&(e.refersTo="="+c),this.parent.definedNames.indexOf(e)<0&&this.parent.definedNames.splice(i,0,e));var p={name:e.name,scope:e.scope,comment:e.comment,refersTo:e.refersTo,cancel:!1};return a||this.parent.notify("actionComplete",{eventArgs:p,action:"addDefinedName"}),s},e.prototype.removeDefinedName=function(e,t,i){var a=!1,o=this.getIndexFromNameColl(e,t);if(o>-1){var s=e;if(t){var l=n.i(r.e)(this.parent,t);l>-1&&(s=n.i(r.p)(this.parent,l)+"!"+e)}if(this.calculateInstance.removeNamedRange(s),this.parent.definedNames.splice(o,1),!i){var d={name:e,scope:t,cancel:!1};this.parent.notify("actionComplete",{eventArgs:d,action:"removeDefinedName"})}a=!0}return a},e.prototype.checkIsNameExist=function(e,t){return this.parent.definedNames.some(function(n){return n.name===e&&(t?n.scope===t:""===n.scope)})},e.prototype.getIndexFromNameColl=function(e,t){void 0===t&&(t="");var n=-1;return this.parent.definedNames.filter(function(r,i){r.name===e&&r.scope===t&&(n=i)}),n},e.prototype.toFixed=function(e){var t=Number(e);return Math.round(t)!==t&&(e=t.toFixed(2)),e},e.prototype.aggregateComputation=function(e){var t=this.parent.getActiveSheet(),a=n.i(r.k)(t),o=n.i(i.l)(a.split(":")[1]);o[0]+1===t.rowCount&&o[1]+1===t.colCount&&(a="A1:"+n.i(i.i)(t.usedRange.rowIndex,t.usedRange.colIndex));var s,l,d=this.calculateInstance.getCellCollection(a);for(l=0;l<d.length;l++)if(s=this.calculateInstance.getValueFromArg(d[l]),n.i(i.o)(s)){e.countOnly=!1;break}if(e.Count=this.calculateInstance.getFunction("COUNTA")(a),e.Count&&!e.countOnly){var c=["SUM","AVERAGE","MIN","MAX"],h=[],p=n.i(i.l)(t.activeCell),u=n.i(r.I)(p[0],p[1],t,!1,!0);for(l=0;l<4;l++){if(s=this.toFixed(this.calculateInstance.getFunction(c[l])(a)),u.format){var f={formattedText:s,value:s,format:u.format,cell:{value:s,format:u.format}};this.parent.notify(i.d,f),s=f.formattedText}h.push(s)}e.Sum=h[0],e.Avg=h[1],e.Min=h[2],e.Max=h[3]}},e.prototype.refreshInsertDelete=function(e){var t,a=this,o=this.calculateInstance.getDependentFormulaCells(),s=n.i(r.f)(this.parent,e.sheet.id);this.parent.sheets.forEach(function(o,l){for(var d=0,c=o.usedRange.rowIndex;d<=c;d++)for(var h=0,p=o.usedRange.colIndex;h<=p;h++)t=n.i(r.I)(d,h,o,!1,!0),t.formula&&n.i(i.k)(t.formula)&&(l===s?!e.isInsert&&("Row"===e.modelType?d>=e.startIndex&&d<=e.endIndex:h>=e.startIndex&&h<=e.endIndex)||a.updateFormula(e,t,d,h,s):t.formula.includes(e.sheet.name)&&a.updateFormula(e,t,d,h,s,!0,o))}),o.clear(),this.calculateInstance.getDependentCells().clear(),this.calculateInstance.getFormulaInfoTable().clear(),this.refreshNamedRange(e)},e.prototype.getUpdatedFormulaOnInsertDelete=function(e){this.updateFormula(e.insertDeleteArgs,e.cell,e.row,e.col,e.sheetIdx)},e.prototype.updateFormula=function(e,t,r,s,l,d,c){var h,p,u,f,g,m,v,y,C=new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)/g);t.formula&&t.formula.includes("UNIQUE")&&this.clearUniqueRange(r,s,c||e.sheet);for(var b,x,S,w=this.parseFormulaArgument({formula:this.parseSheetRef(t.formula,!0),rangeRef:!0}),_=this.getSheetInfo(),I=0;I<w.length;I++)if(h=w[I].trim(),S=h.includes("$"),S&&(h=h.replace(/[$]/g,"")),v=!0,this.calculateInstance.isCellReference(h)){if(m=h.includes(":"),(p=I&&w[I-1].trim())&&"!"===p[p.length-1]){if(p=p.replace(/['!]/g,""),b=_[l].sheet===_[l].visibleName?e.sheet.name:"`"+_[l].sheet+"`",p!==b)continue}else if(d)continue;!C.test(h)&&h.indexOf(":")>-1&&(v=!1,y=!!n.i(o.isNullOrUndefined)(h.match(/[0-9]/))),u=n.i(i.l)(h),f=this.parent.updateRangeOnInsertDelete(e,u,m),g=n.i(i._10)(u),f&&(w[I]=g[2]<g[0]||g[3]<g[1]?this.calculateInstance.getErrorStrings()[a.p.ref]:v?function(){var e=(S?"$":"")+n.i(i.a)(u[1]+1)+(S?"$":"")+(u[0]+1);return u[0]===u[2]&&u[1]===u[3]||(e+=":"+(S?"$":"")+n.i(i.a)(u[3]+1)+(S?"$":"")+(u[2]+1)),e}():y?n.i(i.g)(u).replace(/\d/g,""):n.i(i.g)(u).replace(/[a-zA-Z]/g,""),x=!0)}var E="="+w.join("");if(x){var R,k=RegExp;_.forEach(function(e){E.includes("`"+e.sheet+"`")&&(R=new k("`"+e.sheet+"`","gi"),E=E.replace(R,e.visibleName))}),t.formula!==E&&(t.formula=E,t.value=null)}},e.prototype.clearUniqueRange=function(e,t,a){var o={cellIdx:[e,t,e,t],isUnique:!1,uniqueRange:"",sheetName:a.name};this.parent.notify(i._60,o);for(var s=n.i(i.l)(o.uniqueRange),l=s[0];l<=s[2];l++)for(var d=s[1];d<=s[3];d++)delete n.i(r.I)(l,d,a,!1,!0).value},e.prototype.clearAllUniqueFormulaValue=function(){for(var e,t,a,o,s=this.calculateInstance.uniqueRange,l=0;l<s.length;l++)if(e=s[l].split("!"),a=n.i(r.l)(this.parent,n.i(r.e)(this.parent,e[0])),o=n.i(i.l)(e[1]),!(t=n.i(r.I)(o[0],o[1],a))||"#SPILL!"!==t.value)for(var d=o[0];d<=o[2];d++)for(var c=o[1];c<=o[3];c++)(t=n.i(r.I)(d,c,a))&&t.value&&delete t.value},e.prototype.parseFormulaArgument=function(e){var t,n,r=0,i=[],a=this.markSpecialChar(e.formula.replace("=",""),e.rangeRef),o=RegExp,s=new o(e.rangeRef?/\(|\)|=|\^|>|<|\+|-|\*|\/|%|&/g:/\(|\)|=|\^|>|<|:|\+|-|\*|\/|%|&/g),l=new o(this.parent.listSeparator,"g");a=a.split(new o(s.source+"|"+l.source,"g"));for(var d=a.length;r<d;)t=a[r],t?(1===t.length?i.push(this.isUniqueChar(t)?this.getUniqueCharVal(t):t):(n=t[0],t.indexOf("!")>0?(this.isUniqueChar(n)&&(i.push(this.getUniqueCharVal(n)),t=t.substr(1)),n=t.indexOf("!")+1,i.push(t.substr(0,n)),i.push(t.substr(n))):this.isUniqueChar(n)?(i.push(this.getUniqueCharVal(n)),i.push(t.substr(1))):i.push(t)),r++):r++;return e.formulaArr=i,i},e.prototype.getUniqueCharVal=function(e){switch(e){case this.uniqueOBracket:return"(";case this.uniqueCBracket:return")";case this.uniqueCSeparator:return this.parent.listSeparator;case this.uniqueCOperator:return":";case this.uniquePOperator:return"+";case this.uniqueSOperator:return"-";case this.uniqueMOperator:return"*";case this.uniqueDOperator:return"/";case this.uniqueModOperator:return"%";case this.uniqueConcateOperator:return"&";case this.uniqueEqualOperator:return"=";case this.uniqueExpOperator:return"^";case this.uniqueGTOperator:return">";case this.uniqueLTOperator:return"<"}return""},e.prototype.isUniqueChar=function(e){var t=e.charCodeAt(e);return t>=129&&t<=142},e.prototype.markSpecialChar=function(e,t){e=e.replace(/\(/g,"("+this.uniqueOBracket).replace(/\)/g,")"+this.uniqueCBracket);var n=RegExp;return e=t?e.replace(new n(this.parent.listSeparator,"g"),this.parent.listSeparator+this.uniqueCSeparator):e.replace(new n(this.parent.listSeparator,"g"),this.parent.listSeparator+this.uniqueCSeparator).replace(/:/g,":"+this.uniqueCOperator),e=e.replace(/\+/g,"+"+this.uniquePOperator).replace(/-/g,"-"+this.uniqueSOperator),e=e.replace(/\*/g,"*"+this.uniqueMOperator).replace(/\//g,"/"+this.uniqueDOperator),e=e.replace(/&/g,"&"+this.uniqueConcateOperator),e=e.replace(/=/g,"="+this.uniqueEqualOperator),e=e.replace(/\^/g,"^"+this.uniqueExpOperator),e=e.replace(/>/g,">"+this.uniqueGTOperator).replace(/</g,"<"+this.uniqueLTOperator),e.replace(/%/g,"%"+this.uniqueModOperator)},e.prototype.refreshNamedRange=function(e){var t=this;if(e.definedNames&&e.definedNames.length)return void e.definedNames.forEach(function(e){t.parent.removeDefinedName(e.name,e.scope),t.parent.addDefinedName(e)});var r=this.parent.definedNames.length;if(r)for(var a,s,l,d,c,h,p,u,f,g=Object.assign({},this.parent.definedNames),m=new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)/g),v=0;v<r;v++)u=!0,d=g[v],l=d.refersTo.split("!"),s=l[0].split("=")[1],h=s,h.match(/'/g)&&(h=h.slice(1,-1)),h===e.sheet.name&&(!m.test(l[1])&&l[1].indexOf(":")>-1&&(u=!1,f=!!n.i(o.isNullOrUndefined)(l[1].match(/[0-9]/))),a=n.i(i.l)(l[1]),c=this.parent.updateRangeOnInsertDelete(e,a),p=u?n.i(i.g)(a):f?n.i(i.g)(a).replace(/\d/g,""):n.i(i.g)(a).replace(/[a-zA-Z]/g,""),e.isInsert?this.updateDefinedNames(d,s,p,c):"Row"===e.modelType?this.updateDefinedNames(d,s,p,c,[a[0],a[2]],e):"Column"===e.modelType&&this.updateDefinedNames(d,s,p,c,[a[1],a[3]],e))},e.prototype.updateDefinedNames=function(e,t,n,r,a,o){if(r){var s=this.parent.definedNames.indexOf(e),l={action:"removeDefinedName",isRemoved:!1,definedName:e.name,scope:e.scope,isEventTrigger:!0};if(this.parent.notify(i.j,l),a){var d={name:e.name,comment:e.comment,refersTo:e.refersTo,scope:e.scope};if(d=new i.Y(this.parent,"definedNames",d,!0),o.definedNames?o.definedNames.push(d):o.definedNames=[d],a[1]<a[0])return}e.refersTo=t+"!"+n,this.parent.notify(i.j,{action:"addDefinedName",definedName:e,isAdded:!1,index:s,isEventTrigger:!0});var c={name:e.name,scope:e.scope,comment:e.comment,refersTo:e.refersTo,cancel:!1};this.parent.notify("actionComplete",{eventArgs:c,action:"refreshNamedRange"})}},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n(2),i=n(4),a=n(6),o=n(3),s=(n.n(o),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.setImage=function(e){var t,a=e.range?e.range.indexOf("!")>0?e.range.split("!")[1]:e.range.split("!")[0]:this.parent.getActiveSheet().selectedRange,s=e.range&&e.range.indexOf("!")>0?n.i(i.m)(this.parent,e.range.split("!")[0]):this.parent.activeSheetIndex,l=n.i(r.l)(a),d=n.i(o.isUndefined)(s)?this.parent.getActiveSheet():n.i(i.g)(this.parent,s),c=n.i(i.h)(l[0],l[1],d),h=e.options;if(c&&c.image){t=c.image;for(var p=0;p<h.length;p++)t.push(h[p])}n.i(i.e)(l[0],l[1],d,{image:c&&c.image?t:h},!0)},e.prototype.addEventListener=function(){this.parent.on(a.S,this.setImage,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(a.S,this.setImage)},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"workbookImage"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(3),i=(n.n(r),n(2)),a=n(4),o=function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.open=function(e){var t=this;if(this.parent.allowOpen){if(e.jsonObject)return void this.fetchSuccess(e.jsonObject,e,null,!0,!0);var a=new FormData;if(e.file)a.append("file",e.file);else{if(!(e.sheetIndex>=0))return void(this.parent.isOpen=!1);a.append("sheetPassword",e.sheetPassword),a.append("sheetIndex",e.sheetIndex.toString())}var o={passWord:""};e.password&&e.password.length&&(o.passWord=e.password),o.passWord&&o.passWord.length&&(e.password=o.passWord),e.password&&a.append("password",e.password);var s={file:e.file||null,cancel:!1,requestData:{method:"POST",body:a},password:o.passWord},l=e.guid;if(n.i(r.isNullOrUndefined)(e.sheetPassword)&&!l?(this.parent.trigger("beforeOpen",s),this.parent.notify(i._31,{eventArgs:s,action:"beforeOpen"})):l&&a.append("guid",l),s.cancel)return void(this.parent.isOpen=!1);fetch(this.parent.openUrl,s.requestData).then(function(e){return e.ok?e.json():Promise.reject({status:e.status,statusText:e.statusText,url:e.url})}).then(function(n){return t.fetchSuccess(n,s,e.orginalFile,void 0,!0)}).catch(function(e){return t.fetchFailure(e)})}},e.prototype.fetchFailure=function(e){n.i(r.isUndefined)(e.status)&&n.i(r.isUndefined)(e.statusText)&&(e.statusText="Improper response"),this.parent.notify(i._63,e),this.parent.isOpen=!1},e.prototype.fetchSuccess=function(e,t,n,r,a){var o=["UnsupportedFile","InvalidUrl","NeedPassword","InCorrectPassword","InCorrectSheetPassword","CorrectSheetPassword","DataLimitExceeded","FileSizeLimitExceeded","ExternalWorkbook"],s="string"==typeof e?JSON.parse(e):e,l=s.Workbook;if(o.indexOf(l)>-1)return n&&(t.file=n),void this.parent.notify(i._64,{context:this,data:l,guid:s.Guid,eventArgs:t,isOpenFromJson:r});this.updateModel(l,r,a),this.parent.notify(i._64,{context:this,data:l,isOpenFromJson:r,eventArgs:t}),this.parent.isOpen=!1,t&&t.password&&t.password.length>0&&(this.parent.showSheetTabs&&(this.parent.element.querySelector(".e-add-sheet-tab").removeAttribute("disabled"),this.parent.element.querySelector(".e-add-sheet-tab").classList.remove("e-disabled")),this.parent.password="")},e.prototype.updateModel=function(e,t,o){this.parent.notify(i.j,{action:"unRegisterSheet"}),this.setSelectAllRange(e.sheets,t),this.parent.sheetNameCount=1,this.parent.sheets=[],this.parent.notify(i._65,{}),e.activeSheetIndex=e.activeSheetIndex||e.sheets.findIndex(function(e){return"Hidden"!==e.state}),this.parent.setProperties({isProtected:e.isProtected||!1,password:e.password||"",sheets:e.sheets,activeSheetIndex:e.activeSheetIndex,definedNames:e.definedNames||[],filterCollection:e.filterCollection||[],sortCollection:e.sortCollection||[],listSeparator:e.listSeparator||this.parent.listSeparator},!0),n.i(r.isNullOrUndefined)(e.showSheetTabs)||(this.parent.showSheetTabs=e.showSheetTabs),n.i(a.w)(this.parent,void 0,o),this.parent.notify(i.I,null),this.parent.notify(i.j,{action:"registerSheet",isImport:!0}),this.parent.notify(i.j,{action:"initiateDefinedNames"}),this.parent.notify(i._17,null)},e.prototype.setSelectAllRange=function(e,t){var o,s,l=this;e.forEach(function(e){if(e.selectedRange){var d=n.i(i.l)(e.selectedRange),c=(n.i(r.isUndefined)(e.rowCount)?100:e.rowCount)-1,h=(n.i(r.isUndefined)(e.colCount)?100:e.colCount)-1;65535===d[2]&&(d[2]=c),255===d[3]&&(d[3]=h),65535===d[0]&&(d[0]=c),255===d[1]&&(d[1]=h),e.selectedRange=n.i(i.g)(d)}if(t&&l.parent.isAngular)for(var p=0;p<l.parent.sheets.length;p++)if(o=n.i(a.g)(l.parent,p),e.name===o.name){e.ranges&&e.ranges.forEach(function(e,t){(s=o.ranges[t])&&s.template&&(e.template=s.template)});break}})},e.prototype.addEventListener=function(){this.parent.on(i._66,this.open.bind(this))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off(i._66,this.open.bind(this))},e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.getModuleName=function(){return"workbookOpen"},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(4),i=n(2),a=n(6),o=n(121),s=n(3),l=(n.n(s),this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),d=this&&this.__assign||function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},d.apply(this,arguments)},c=function(e){function t(t){var n=e.call(this,t)||this;return n.isProcessCompleted=!1,n.saveJSON={},n.isFullPost=!1,n.needBlobData=!1,n.customParams=null,n.pdfLayoutSettings={fitSheetOnOnePage:!1},n.addEventListener(),n}return l(t,e),t.prototype.getModuleName=function(){return"workbookSave"},t.prototype.destroy=function(){this.removeEventListener(),this.parent=null},t.prototype.addEventListener=function(){this.parent.on(a.t,this.initiateSave,this),this.parent.on("getStringifyObject",this.performStringifyAction,this)},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(a.t,this.initiateSave),this.parent.off("getStringifyObject",this.performStringifyAction))},t.prototype.initiateSave=function(e){var t=e.saveSettings;this.saveSettings={saveType:t.saveType,url:t.url,fileName:t.fileName||"Sample"},this.isFullPost=e.isFullPost,this.needBlobData=e.needBlobData,this.needBlobData&&(this.isFullPost=!1),this.customParams=e.customParams,this.pdfLayoutSettings=e.pdfLayoutSettings,this.updateBasicSettings(),this.processSheets(t.autoDetectFormat)},t.prototype.updateBasicSettings=function(){var e=this.getStringifyObject(this.parent,["sheets","_isScalar","observers","closed","isStopped","hasError","__isAsync","beforeCellFormat","beforeCellRender","beforeDataBound","beforeOpen","beforeSave","beforeSelect","beforeSort","cellEdit","cellEdited","cellEditing","cellSave","beforeCellSave","contextMenuItemSelect","contextMenuBeforeClose","contextMenuBeforeOpen","created","dataBound","fileMenuItemSelect","fileMenuBeforeClose","fileMenuBeforeOpen","saveComplete","sortComplete","select","actionBegin","actionComplete","afterHyperlinkClick","afterHyperlinkCreate","beforeHyperlinkClick","beforeHyperlinkCreate","openComplete","openFailure","queryCellInfo","dialogBeforeOpen","dataSourceChanged","beforeConditionalFormat","beforeCellUpdate"]),t=JSON.parse(e);this.parent.sheets.length&&(t.sheets=[]),this.saveJSON=t,this.saveJSON.filterCollection=[]},t.prototype.processSheets=function(e){var t=this,r=["dataSource","startCell","query","showFieldAsHeader","result"];this.parent.isAngular&&r.push("template");for(var a,o,s,l,d=0,c=this.parent.sheets.length;d<c;d++){s=this.parent.sheets[d],a=!1,o=!1;for(var h=0,p=s.ranges.length;h<p;h++)if(l=s.ranges[h],l.dataSource&&(o=!0,!l.info||!l.info.loadedRange||!l.info.loadedRange.length)){a=!0;break}if(a){var u=function(e){n.i(i._61)(t,t.processSheet,t.updateSheet,[t.getStringifyObject(t.parent.sheets[e],r,e,!1,!0),e])},f=this.parent;this.parent.notify(i.n,{sheet:s,sheetIndex:d,loadComplete:u.bind(this,d),isFinite:f.scrollSettings&&f.scrollSettings.isFinite,isSaveAction:!0,autoDetectFormat:e})}else n.i(i._61)(this,this.processSheet,this.updateSheet,[this.getStringifyObject(s,r,d,e&&o,!0),d])}},t.prototype.updateSheet=function(e){this.saveJSON.sheets[e[0]]=e[1],this.isProcessCompleted=this.getSheetLength(this.saveJSON.sheets)===this.parent.sheets.length,this.isProcessCompleted&&this.save(this.saveSettings)},t.prototype.getSheetLength=function(e){var t=0;return e.forEach(function(e){e&&t++}),t},t.prototype.save=function(e){var t={cancel:!1,jsonObject:this.saveJSON};this.parent.notify(a.u,t),t.cancel||(this.isFullPost?(this.initiateFullPostSave(),this.saveJSON={}):n.i(i._61)(this,{workerTask:this.processSave},this.updateSaveResult,[this.saveJSON,e,this.customParams,this.pdfLayoutSettings],!0))},t.prototype.updateSaveResult=function(e){if(e.isFormDataError)return void this.processSave(this.saveJSON,this.saveSettings,this.customParams,this.pdfLayoutSettings,this.updateSaveResult);this.saveJSON={};var t={status:"Success",message:"",url:this.saveSettings.url,fileName:this.saveSettings.fileName,saveType:this.saveSettings.saveType,blobData:null};"object"==typeof e&&e.error?(t.status="Failure",t.message=e.error.toString()):"object"==typeof e&&e.dialog?this.parent.notify(a._40,{content:e.dialog}):this.needBlobData?t.blobData=e:this.ClientFileDownload(e),this.parent.trigger("saveComplete",t),this.parent.notify(a.v,t)},t.prototype.ClientFileDownload=function(e){var t=this.parent.createElement("a",{attrs:{download:this.getFileNameWithExtension()}}),n=URL.createObjectURL(e);t.href=n,document.body.appendChild(t),t.click(),URL.revokeObjectURL(n),document.body.removeChild(t)},t.prototype.initiateFullPostSave=function(){var e,t=Object.keys(this.saveSettings),r=this.parent.createElement("form",{attrs:{method:"POST",action:this.saveSettings.url}}),i=this.parent.createElement("input",{attrs:{type:"hidden",name:"JSONData"}});for(i.value=JSON.stringify(this.saveJSON),r.appendChild(i),e=0;e<t.length;e++)i=this.parent.createElement("input",{attrs:{type:"hidden",name:t[e]}}),i.value=this.saveSettings[t[e]],r.appendChild(i);for(t=Object.keys(this.customParams),e=0;e<t.length;e++)i=this.parent.createElement("input",{attrs:{type:"hidden",name:t[e]}}),i.value=this.customParams[t[e]],r.appendChild(i);i=this.parent.createElement("input",{attrs:{type:"hidden",name:"pdfLayoutSettings"}}),i.value=JSON.stringify(this.pdfLayoutSettings),r.appendChild(i),document.body.appendChild(r),r.submit(),n.i(s.detach)(r),this.parent.notify(a.v,{})},t.prototype.performStringifyAction=function(e){e.model='{"jsonObject":{"Workbook":{"sheets":[';for(var t=0,n=this.parent.sheets.length-1;t<=n;t++)e.model+=this.getStringifyObject(this.parent.sheets[t],e.skipProps,t)+(t<n?",":"]}}}")},t.prototype.getStringifyObject=function(e,t,o,s,l){var c=this;void 0===t&&(t=[]),0===o&&this.parent.notify(i._56,{clearAll:!0}),l&&this.parent.notify(a._41,{sheetIdx:o,isSaveAction:!0,saveJson:this.saveJSON});var h,p=[],u=s&&n.i(i._62)(this.parent),f=JSON.stringify(e,function(a,l){if(!(t.indexOf(a)>-1)){if("cellStyle"===a)return c.parent.commonCellStyle;if(l&&l.cells)for(var f=0,g=l.cells.length;f<g;f++){var m=l.cells[f],v=[Number(a),f];if(m&&(m.value?s&&!m.formula&&u(m):m.formula&&m.formula.indexOf("=UNIQUE(")<0&&(c.parent.notify(i.j,{action:"refreshCalculate",value:m.formula,rowIndex:v[0],colIndex:f,isFormula:n.i(i.k)(m.formula),sheetIndex:o,isRefreshing:!0}),m.value=n.i(r.h)(v[0],f,e).value),m.chart)){p.push({index:v,chart:m.chart}),h=[];for(var y=0,C=m.chart.length;y<C;y++){var b=Object.assign({},m.chart[y]);delete b.id,h.push(b)}m.chart=h}}return l&&l.properties&&l.maxHgts&&(l.properties=d({},l.properties,{maxHgts:l.maxHgts})),l&&"object"==typeof l&&l.hasOwnProperty("properties")?l.properties:null!==l?l:void 0}}),g=n.i(r.g)(this.parent,o);return p.forEach(function(e){n.i(r.e)(e.index[0],e.index[1],g,{chart:e.chart},!0)}),f},t.prototype.getFileNameWithExtension=function(e){e||(e=this.saveSettings.fileName);var t=this.getFileExtension(),n=e.lastIndexOf(".");return n>-1&&(e=e.substr(0,n)),e+t},t.prototype.getFileExtension=function(){return"."+this.saveSettings.saveType.toLowerCase()},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(4),i=n(9),a=(n.n(i),n(2)),o=n(6),s=n(3),l=(n.n(s),function(){function e(e){this.parent=e,this.addEventListener()}return e.prototype.destroy=function(){this.removeEventListener(),this.parent=null},e.prototype.addEventListener=function(){this.parent.on(o.B,this.initiateSortHandler,this),this.parent.on(o._34,this.updateSortedDataOnCell,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(o.B,this.initiateSortHandler),this.parent.off(o._34,this.updateSortedDataOnCell))},e.prototype.initiateSortHandler=function(e){var t=this,o=e.args,l=new i.Deferred,d=this.parent.getAddressInfo(o.range),c=n.i(r.g)(this.parent,d.sheetIndex),h=n.i(a._10)(d.indices),p=o.sortOptions||{sortDescriptors:{},containsHeader:!0},u=!1;if(e.promise=l.promise,h[0]>c.usedRange.rowIndex||h[1]>c.usedRange.colIndex)return void l.reject(this.parent.serviceLocator.getService(a.E).getConstant("SortOutOfRangeError"));var f=p.containsHeader,g=o.checkForHeader;if((h[0]===h[2]||g)&&(g||(h=n.i(a._51)(h[0],h[1],c)),u=!0,n.i(s.isNullOrUndefined)(p.containsHeader)&&(f=typeof n.i(r.h)(h[0],h[1],c,null,!0).value!=typeof n.i(r.h)(h[0]+1,h[1],c,null,!0).value||!this.isSameStyle(n.i(r.h)(h[0],h[1],c,null,!0).style,n.i(r.h)(h[0]+1,h[1],c,null,!0).style))),(n.i(s.isNullOrUndefined)(o.sortOptions)||n.i(s.isNullOrUndefined)(o.sortOptions.containsHeader))&&!u){var m=n.i(r.h)(h[0],h[1],c),v=n.i(r.h)(h[0]+1,h[1],c);m&&v&&(f=typeof m.value!=typeof v.value||!this.isSameStyle(m.style,v.style))}h[0]=f?h[0]+1:h[0];var y=n.i(a.w)(c.activeCell),C=n.i(a.a)(y[1]+1);delete p.containsHeader;var b=p.sortDescriptors,x=new i.Query;if(Array.isArray(b)){b&&0!==b.length||(b=[{field:C}]);for(var S=b.length,w=S-1;w>-1;w--)if(b[S-1].field||(b[S-1].field=C),b[w].field){var _=b[w].sortComparer||this.sortComparer.bind(this,b[w],p.caseSensitive);x.sortBy(b[w].field,_),C=b[w].field}}else{b||(b={field:C}),b.field||(b.field=C);var _=b.sortComparer||this.sortComparer.bind(this,b,p.caseSensitive);x.sortBy(b.field,_),C=b.field}var I=n.i(a.g)(h);n.i(r.o)(this.parent,c.name+"!"+I,!0,null,null,null,null,null,void 0,null,n.i(a._52)(C)).then(function(n){new i.DataManager(n).executeQuery(x).then(function(r){t.parent.notify("setActionData",{args:{action:"beforeSort",eventArgs:{range:I,cellDetails:n,sortedCellDetails:r.result}}}),t.updateSortedDataOnCell({result:r.result,range:h,sheet:c,jsonData:n});var i={range:c.name+"!"+I,sortOptions:o.sortOptions};e.previousSort&&(i.previousSort=e.previousSort),l.resolve(i)})})},e.prototype.updateSortedDataOnCell=function(e){for(var t,i,o,l=this,d=[],c=function(i,o){for(var c=e.range[1],h=0;c<=e.range[3];c++,h++){if(d[h]||(d[h]=n.i(a.a)(c+1)),o[d[h]])t=n.i(s.extend)({},o[d[h]],null,!0);else{if(!n.i(r.h)(i,c,e.sheet))continue;t=null}t=l.skipBorderOnSorting(i,c,e.sheet,t),t&&t.formula&&(t.formula=n.i(a._53)([i,c],[parseInt(o.__rowIndex,10)-1,c],e.sheet,l.parent,t,!0)),n.i(r.e)(i,c,e.sheet,t)}},h=e.isUndo&&{},p=e.range[0],u=0;p<=e.range[2];p++,u++)if(n.i(r.i)(e.sheet,p))u--;else if(o=e.result[u],e.isUndo){if(o&&(i=parseInt(o.__rowIndex,10)-1,h[i]=!0,c(i,o),p===i))continue;!h[p]&&e.sheet.rows[p]&&c(p,{})}else c(p,o||{})},e.prototype.skipBorderOnSorting=function(e,t,i,a){var o=n.i(r.h)(e,t,i),s=["borderBottom","borderTop","borderRight","borderLeft","border"];if(a&&a.style)for(var l=0,d=s;l<d.length;l++){var c=d[l];delete a.style[""+c]}if(o&&o.style)for(var h=0,p=s;h<p.length;h++){var c=p[h];o.style[""+c]&&(a||(a={}),a.style||(a.style={}),a.style[""+c]=o.style[""+c])}return a},e.prototype.isSameStyle=function(e,t){e||(e={}),t||(t={});for(var n=!0,r=Object.keys(e),i=0;i<r.length;i++){if(e[r[i]]!==t[r[i]]&&this.parent.cellStyle[r[i]]!==e[r[i]]){n=!1;break}n=!0}return n},e.prototype.sortComparer=function(e,t,r,o){var l=e.order||"",d=i.DataUtil.fnSort(l),c=!1;if(r&&o&&("string"==typeof r.value||"string"==typeof o.value)&&""!==r.value&&""!==o.value&&(n.i(a.o)(r.value)&&(r.value=n.i(a._48)(r.value),!0),n.i(a.o)(o.value)&&(o.value=n.i(a._48)(o.value),c=!0),!c&&!c)){var h={sensitivity:t?"case":"base"},p=new Intl.Collator(this.parent.locale,h);return l&&"ascending"!==l.toLowerCase()?-1*p.compare(r.value,o.value):p.compare(r.value,o.value)}var u=n.i(s.isNullOrUndefined)(r)||r&&(n.i(s.isNullOrUndefined)(r.value)||""===r.value),f=n.i(s.isNullOrUndefined)(o)||o&&(n.i(s.isNullOrUndefined)(o.value)||""===o.value);return u&&f?-1:u?1:f?-1:d(r?r.value:r,o?o.value:o)},e.prototype.getModuleName=function(){return"workbookSort"},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(3),i=(n.n(r),function(){function e(){this.services={}}return e.prototype.getService=function(e){if(n.i(r.isNullOrUndefined)(this.services[""+e]))throw"The service "+e+" is not registered";return this.services[""+e]},e.prototype.register=function(e,t){n.i(r.isNullOrUndefined)(this.services[""+e])&&(this.services[""+e]=t)},e}())},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(e){this.parent=e}return e.prototype.processSheet=function(e,t){return[t,JSON.parse(e,function(e,t){if(!Array.isArray(t)&&"string"!=typeof t||t.length)return t})]},e.prototype.processSave=function(e,t,n,r,i){var a,o=this,s=new FormData,l=Object.keys(t);for(s.append("JSONData",JSON.stringify(e)),a=0;a<l.length;a++)s.append(l[a],t[l[a]]);for(l=Object.keys(n),a=0;a<l.length;a++)s.append(l[a],n[l[a]]);s.append("pdfLayoutSettings",JSON.stringify(r)),fetch(t.url,{method:"POST",body:s}).then(function(e){return e.ok?e.blob():Promise.reject({message:e.statusText})}).then(function(e){new Promise(function(t){var r=new FileReader;r.onload=function(){var a=r.result.toString(),s=n.customParams&&"string"==typeof n.customParams&&"saveashtml"===n.customParams.toLowerCase();if(a.indexOf("data:text/plain;base64,")>-1||!s&&a.indexOf("data:text/html;base64,")>-1||a.indexOf("data:application/json;base64,")>-1){var l=void 0;if(a=a.replace("data:text/plain;base64,",""),a=a.replace("data:text/html;base64,",""),a.indexOf("data:application/json;base64,")>-1?(a=a.replace("data:application/json;base64,",""),l=atob(a).split(".")):l=atob(a).split(/(\r\n|\n|\r)/gm),l.length){var d=l[0].length>1&&'"'===l[0][0]?l[0].split('"')[1]+".":l[0];i?i.apply(o,[{dialog:d}]):postMessage({dialog:d})}}else i?i.apply(o,[e]):postMessage(e);t(r.result)},r.readAsDataURL(e)})}).catch(function(e){i?i.apply(o,[{error:e.message}]):postMessage({error:e.message})})},e}()}])});
|