jspreadsheet 8.1.2 → 8.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +408 -406
- package/dist/jspreadsheet.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v8.1.
|
|
2
|
+
* Jspreadsheet v8.1.4
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -22,7 +22,7 @@ $jscomp.polyfill=function(z,D,F,O){D&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
22
22
|
$jscomp.polyfillIsolated=function(z,D,F,O){var M=z.split(".");z=1===M.length;O=M[0];O=!z&&O in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var V=0;V<M.length-1;V++){var K=M[V];if(!(K in O))return;O=O[K]}M=M[M.length-1];F=$jscomp.IS_SYMBOL_NATIVE&&"es6"===F?O[M]:null;D=D(F);null!=D&&(z?$jscomp.defineProperty($jscomp.polyfills,M,{configurable:!0,writable:!0,value:D}):D!==F&&(void 0===$jscomp.propertyToPolyfillSymbol[M]&&(F=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[M]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
23
|
$jscomp.global.Symbol(M):$jscomp.POLYFILL_PREFIX+F+"$"+M),$jscomp.defineProperty(O,$jscomp.propertyToPolyfillSymbol[M],{configurable:!0,writable:!0,value:D})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(z){z={next:z};z[Symbol.iterator]=function(){return this};return z};
|
|
24
24
|
$jscomp.iteratorFromArray=function(z,D){z instanceof String&&(z+="");var F=0,O=!1,M={next:function(){if(!O&&F<z.length){var V=F++;return{value:D(V,z[V]),done:!1}}O=!0;return{done:!0,value:void 0}}};M[Symbol.iterator]=function(){return M};return M};$jscomp.polyfill("Array.prototype.values",function(z){return z?z:function(){return $jscomp.iteratorFromArray(this,function(D,F){return F})}},"es8","es3");
|
|
25
|
-
var _$
|
|
25
|
+
var _$_519c=["use strict","{","}","","8.1.4","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
|
|
26
26
|
"none","status","data-x","data-y","px","X","goto","jss_scroll","jss_control","hidden","jss_freezed","get","colspan","center","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","setProperty","orderBy","setValue","renameWorksheet","moveWorksheet",
|
|
27
27
|
"onundo","onredo","object","function","contextMenu","toolbar","Jspreadsheet: cursor not in the viewport","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","onevent","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave",
|
|
28
28
|
"persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","selection","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","-2000px","#ccc","transparent","0px","tr","jss_group_container","td"," ",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.","jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action",
|
|
@@ -40,411 +40,413 @@ var _$_5e1e=["use strict","{","}","","8.1.2","Base","https://jspreadsheet.com","
|
|
|
40
40
|
"ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","TABLE","Element is not a table","colgroup > col","data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV",
|
|
41
41
|
"data-current","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","Cloud plugin not loaded.","jtabs","jss_dialog","#","decimal","data-locale","%","jss_percent","\\[Red\\]","red","\\(","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","<","timepicker",
|
|
42
42
|
"YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","absolute","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
43
|
-
(function(z,D){typeof exports===_$
|
|
44
|
-
{version:_$
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
this.refreshBorders()},Fa=function(k){if(void 0===k)return this.status;var
|
|
49
|
-
l(e));for(var
|
|
50
|
-
new Date;v=parseInt(m.getTime()/1E3);var u=F();f[1].date<v?(
|
|
51
|
-
_$
|
|
52
|
-
Z.position.call(this,d,e)}},
|
|
53
|
-
|
|
54
|
-
this.scrollX.style.display=this.width>e?_$
|
|
55
|
-
function(){if(
|
|
56
|
-
(d=
|
|
57
|
-
!1;
|
|
58
|
-
g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):f+parseInt(this.options.defaultRowHeight));if(f>=e)return g}return e?g:f};return
|
|
59
|
-
|
|
60
|
-
0)+
|
|
61
|
-
this.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
this.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
parseInt(this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
_$
|
|
82
|
-
|
|
83
|
-
(
|
|
84
|
-
(
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
d,
|
|
88
|
-
|
|
89
|
-
this
|
|
90
|
-
|
|
91
|
-
|
|
43
|
+
(function(z,D){typeof exports===_$_519c[84]&&typeof module!==_$_519c[13]?module.exports=D():typeof define===_$_519c[85]&&define.amd?define(D):z.jspreadsheet=z.jexcel=D()})(this,function(){_$_519c[0];var z=function(k,c){k=jSuites.translate(k);if(c&&c.length)for(var b=0;b<c.length;b++)k=k.replace(_$_519c[1]+b+_$_519c[2],c[b]);return k},D=function(k,c){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_519c[3]).toUpperCase();if(void 0===c)return window[k]?window[k]:null;window[k]=c},F=function(){var k=
|
|
44
|
+
{version:_$_519c[4],edition:_$_519c[5],host:_$_519c[6],license:_$_519c[7],print:function(){return[_$_519c[8]+this.edition+_$_519c[9]+this.version+_$_519c[10]+this.host+_$_519c[10]+this.license]}};return function(){return k}}(),O=function(k){var c=parseInt(k.y);if(k.id)var b=parseInt(k.id);else k.value&&(b=parseInt(k.value));0<b&&(this.rows[c].id=b,pa[_$_519c[11]].call(this,b))},M=function(k){return(_$_519c[3]+k).substr(0,1)===_$_519c[12]},V=function(k){var c=this.options.columns;return c[k]&&c[k].name?
|
|
45
|
+
c[k].name:k},K=function(k,c,b){var a;if(a=this.options.data[c]){var d=0<=k?V.call(this,k):k;typeof b===_$_519c[13]?b=typeof d===_$_519c[14]?a[k]:jSuites.path.call(a,_$_519c[3]+d):(typeof d===_$_519c[14]?a[k]=b:jSuites.path.call(a,_$_519c[3]+d,b),!M(b)&&this.records[c][k]&&(this.records[c][k].v=b))}else b=null;return b},N=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Fa.call(this))?7<=k?!0:!1:!0},Ga=function(k){var c=_$_519c[15];if(this.parent)var b=this.parent.config,
|
|
46
|
+
a=this.parent.element,d=this;else b=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$_519c[13]&&(k=!a.classList.contains(c));k?(a.classList.add(c),b.fullscreen=!0):(a.classList.remove(c),b.fullscreen=!1);d&&(d.tbody.innerHTML=_$_519c[3],C.call(d),P.refresh.call(d),ca.update.call(d.parent,d))},Ha=function(k){var c=this.loading;null===k&&(k=c.style.display==_$_519c[16]?!0:!1);c.style.display=k?_$_519c[16]:_$_519c[3];setTimeout(function(){c.style.display=_$_519c[3]},1E3)},Ca=function(k,
|
|
47
|
+
c){if(typeof k===_$_519c[17]){var b=A.getCoordsFromColumnName(k);b=this.records[b[1]][b[0]];if(b.element)k=b.element;else return typeof c===_$_519c[13]?b.readonly:b.readonly=c?!0:!1}b=_$_519c[18];k=k.classList;if(typeof c===_$_519c[13])return k.contains(b)?!0:!1;c?k.add(b):k.remove(b)},ua=function(k){var c=_$_519c[19],b=this.table.classList;if(typeof k==_$_519c[13])return b.contains(c)?!1:!0;k?b.remove(c):b.add(c);0<this.options.freezeColumns&&ia[_$_519c[11]].call(this,this.options.freezeColumns);
|
|
48
|
+
this.refreshBorders()},Fa=function(k){if(void 0===k)return this.status;var c=document.createElement(_$_519c[20]);c.style.textAlign=_$_519c[21];c.style.fontSize=_$_519c[22];c.style.cursor=_$_519c[23];c.onclick=function(){window.location.href=F().host+_$_519c[24]};var b=null,a=[74,50,48,50,48,33].join(_$_519c[3]);(function(e){b=1;try{if(e){var f=window.atob(e);f=f.split(_$_519c[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=a;var h=f[1],l=jSuites.sha512,n=_$_519c[3],p=_$_519c[3];128<e.length&&(e=
|
|
49
|
+
l(e));for(var q=0;128>q;q++){var r=e[q]?e[q].charCodeAt(0):0;n+=String.fromCharCode(54^r);p+=String.fromCharCode(92^r)}var w=l(p+l(n+h));if(g!=w)b=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var m=window.location.hostname||_$_519c[26],v=m.split(_$_519c[27]);m=m.split(_$_519c[27]);2<m.length&&!jSuites.isNumeric(m[m.length-1])&&v.shift();v=v.join(_$_519c[27]);m=m.join(_$_519c[27]);if(-1==f[1].domain.indexOf(v)&&-1==f[1].domain.indexOf(m))b=4;else if(f[1].scope&&0<=f[1].scope.indexOf(_$_519c[28])){m=
|
|
50
|
+
new Date;v=parseInt(m.getTime()/1E3);var u=F();f[1].date<v?(b=f[1].date+2592E3<v&&!f[1].plan||f[1].date+15552E3<v?6:7,u.license=f[1].name+_$_519c[29]):(b=8,u.license=_$_519c[30]+f[1].name,u.edition=3==f[1].plan||6==f[1].plan?_$_519c[31]:_$_519c[5])}else b=5}else b=4}else b=2}}catch(x){}})(k);k=_$_519c[3];if(1==b)k=_$_519c[32];else if(2==b||3==b||4==b)k=_$_519c[33];else if(5==b)k=_$_519c[34];else if(6==b||7==b)k=_$_519c[35];c.appendChild(document.createTextNode(k));if(8>b)try{if(typeof sessionStorage!==
|
|
51
|
+
_$_519c[13]&&!sessionStorage.getItem(_$_519c[36])){sessionStorage.setItem(_$_519c[36],!0);var d=document.createElement(_$_519c[37]);d.src=F().host+_$_519c[38]+_$_519c[39];d.style.display=_$_519c[40];c.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_519c[41],{value:b,writable:!1,configurable:!1,enumerable:!1,extensible:!1});F().edition===_$_519c[31]&&(this.edition=1);return c},P=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_519c[42]),e=this.edition.getAttribute(_$_519c[43]);
|
|
52
|
+
Z.position.call(this,d,e)}},c=function(){this.scrollX.scrollWidth<this.scrollX.scrollLeft+this.scrollX.offsetWidth+25?(this.content.scrollLeft=this.content.scrollWidth,0<this.options.freezeColumns&&da.refresh.call(this)):this.content.scrollLeft=0;k.call(this)},b=function(){var d=this.tbody.lastChild.getAttribute(_$_519c[43]),e=this.scrollY.scrollHeight-this.content.offsetHeight-this.scrollY.scrollTop;this.content.scrollTop=d!=(this.results?this.rows[this.results[this.results.length-1]].y:this.rows[this.rows.length-
|
|
53
|
+
1].y)&&e?0:this.content.scrollHeight;k.call(this)},a=function(){if(C.limited.call(this)){var d=ia.getWidth.call(this),e=this.content.offsetWidth,f=this.content.offsetHeight;this.width=a.width.call(this)+(d?d:1);this.height=a.height.call(this);this.tfoot.offsetHeight&&(this.height+=this.tfoot.offsetHeight+26);this.scrollX.firstChild.style.width=this.width+_$_519c[44];this.scrollY.firstChild.style.height=this.height+_$_519c[44];this.scrollX.style.width=e+_$_519c[44];this.scrollY.style.height=f+_$_519c[44];
|
|
54
|
+
this.scrollX.style.display=this.width>e?_$_519c[3]:_$_519c[40];this.scrollY.style.display=this.height>f?_$_519c[3]:_$_519c[40]}else this.scrollX.style.display=_$_519c[40],this.scrollY.style.display=_$_519c[40]};a.refresh=function(){this.scrollY.scrollTop=0;this.scrollX.scrollLeft=0;a.call(this)};a.updateX=function(){if(a.event)return!1;var d=parseInt(this.thead.lastChild.children[(this.options.freezeColumns||0)+1].getAttribute(_$_519c[42]));a.setX.call(this,a.width.call(this,d));c.call(this)};a.updateY=
|
|
55
|
+
function(){if(a.event)return!1;if(this.tbody.firstChild){var d=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]));a.setY.call(this,a.height.call(this,d));b.call(this)}};a.setX=function(d){a.ignore=!0;this.scrollX.scrollLeft=d};a.setY=function(d){a.ignore=!0;this.scrollY.scrollTop=d};a.update=function(d,e){e==_$_519c[45]?(d=a.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),C.reset.call(this),C[_$_519c[46]].call(this,null,d),c.call(this)):
|
|
56
|
+
(d=a.height.call(this,null,d.target.scrollTop/(d.target.scrollHeight-this.content.offsetHeight)*(this.height-(this.tbody.offsetHeight-5))),this.tbody.textContent=_$_519c[3],C[_$_519c[46]].call(this,d),b.call(this))};a.build=function(d){var e=this,f=document.createElement(_$_519c[20]),g=document.createElement(_$_519c[20]);f.className=_$_519c[47]+d;g.className=_$_519c[48]+d;f.appendChild(g);d==_$_519c[45]?f.style.height=_$_519c[22]:f.style.width=_$_519c[22];f.onscroll=function(h){if(a.ignore)return a.ignore=
|
|
57
|
+
!1;a.event=!0;a.update.call(e,h,d);a.event=!1};return f};a.width=function(d,e){for(var f=this.options.columns,g=0,h=this.options.freezeColumns||0;h<this.options.columns.length;h++){if(d===h)return g;!1!==f[h].visible&&f[h].type!==_$_519c[49]&&(g+=parseInt(f[h].width));if(g>=e)return h}return e?h:g};a.height=function(d,e){var f=0,g=0;this.options.defaultRowHeight||(this.options.defaultRowHeight=26);for(var h=this.results?this.results:this.rows,l=0;l<h.length;l++){g=l;this.results&&(g=h[l]);if(d===
|
|
58
|
+
g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):this.rows[g].element&&this.rows[g].element.offsetHeight?f+parseInt(this.rows[g].element.offsetHeight):f+parseInt(this.options.defaultRowHeight));if(f>=e)return g}return e?g:f};return a}(),C=function(){var k=function(b,a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=b.getAttribute(_$_519c[42]),h=b.getAttribute(_$_519c[43]);var l=this.records[h][g];l.merged&&(g-=l.merged[0],h-=l.merged[1],
|
|
59
|
+
b=this.records[h][g].element);h=this.content.getBoundingClientRect();l=b.getBoundingClientRect();var n=ia.getWidth.call(this),p=h.left+n,q=h.left+h.width;g=h.top+d;var r=h.top+h.height;var w=0;h=l.top;h>=g&&h<=r||(w++,e=!0);h=l.top+l.height;h>=g&&h<=r||w++;if(w>=a)return 2>a&&(a=this.content.scrollTop,0==e?r-g>l.height&&(this.content.scrollTop+=h-r+3,P.ignore=!0,this.scrollY.scrollTop+=h-r+3):(this.content.scrollTop=b.offsetTop-d,P.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!n||
|
|
60
|
+
!b.classList.contains(_$_519c[50]))if(w=0,g=l.left,g>=p&&g<=q||(w++,f=!0),g=l.left+l.width,g>=p&&g<q||w++,w>=a)return 2>a&&(a=this.content.scrollLeft,0==f?q-p>l.width&&(this.content.scrollLeft+=g-q+3,P.ignore=!0,this.scrollX.scrollLeft+=g-q+3):(this.content.scrollLeft=b.offsetLeft-p-50,P.ignore=!0,this.scrollX.scrollLeft-=a-this.content.scrollLeft)),!1;return!0},c=function(){var b=0;this.results&&(b=this.results[0]);c.reset.call(this,!0);c.renderX.call(this,0);c.renderY.call(this,b);ia.headers.call(this);
|
|
61
|
+
0<this.options.pagination&&qa.update.call(this);T.update.call(this);this.refreshBorders();P.call(this)};c.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};c.refresh=function(){if(!this.tbody.lastChild)return!1;var b=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_519c[42]))+1,a=parseInt(this.tbody.lastChild.getAttribute(_$_519c[43]));this.results?(a=this.results.indexOf(a),a<this.results.length-1&&a++,a=this.results[a]):a++;c.renderX.call(this,b);
|
|
62
|
+
c.renderY.call(this,a);c.adjustX.call(this,!1,!0);c.adjustY.call(this,!1,!0);P.call(this)};c.renderX=function(b,a,d){var e=this.options.columns,f=0,g=[],h=(this.options.freezeColumns||0)+1;1==this.parent.config.fullscreen?f=this.content.offsetWidth:1==this.options.tableOverflow&&(f=parseInt(this.options.tableWidth));var l=this.headerContainer.offsetWidth||0;for(d||(d=0);e[b]&&(!f||l<f||0<d);){!1!==e[b].visible&&e[b].type!==_$_519c[49]&&(l+=parseInt(e[b].width));0<d&&d--;var n=X.getWidth.call(this,
|
|
63
|
+
b,g);n>d&&(d=n);a?(c.renderColumn.call(this,b,h),b--):(c.renderColumn.call(this,b),b++)}X.batch.call(this,g)};c.renderY=function(b,a,d){var e=0,f=[];1==this.parent.config.fullscreen?e=this.content.offsetHeight:1==this.options.tableOverflow&&(e=parseInt(this.options.tableHeight));e&&(e-=this.thead.offsetHeight+4,this.tfoot.offsetHeight&&(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$_519c[42]));
|
|
64
|
+
h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$_519c[42])):l;var n=this.results?this.results.indexOf(b):b,p=parseInt(this.options.pagination)||0,q=this.tbody.children.length||0,r=!1;for(d||(d=0);this.options.data&&this.options.data[b]&&(!p||q<p||0<d)&&(!e||g<=e||0<d);){var w=c.renderRow.call(this,b,h,l);a?(this.tbody.insertBefore(w,this.tbody.firstChild),n--):(this.tbody.appendChild(w),n++);this.rows[b].height?(w.offsetHeight!==this.rows[b].height&&
|
|
65
|
+
(this.rows[b].height=w.offsetHeight,r=!0),g+=this.rows[b].height):(g+=this.rows[b].height=w.offsetHeight,r=!0);0<d&&d--;b=X.getHeight.call(this,b,f);b>d&&(d=b);b=this.results?this.results[n]:n;q++}X.batch.call(this,f);r&&P.call(this)};c.renderColumn=function(b,a,d){this.headers[b]||ya.create.call(this,b);if(this.options.nestedHeaders)for(d=0;d<this.options.nestedHeaders.length;d++){var e=la.getColumns.call(this,d);void 0!==e[b]&&la.renderCell.call(this,e[b],d,a)}if(this.options.footers)for(d=0;d<
|
|
66
|
+
this.options.footers.length;d++)e=W.create.call(this,b,d),null===a?this.tfoot.children[d].appendChild(e):this.tfoot.children[d].insertBefore(e,this.tfoot.children[d].children[a]);null===a?(this.headerContainer.appendChild(this.headers[b]),this.colgroupContainer.appendChild(this.colgroup[b])):(this.headerContainer.insertBefore(this.headers[b],this.headerContainer.children[a]),this.colgroupContainer.insertBefore(this.colgroup[b],this.colgroupContainer.children[a]));if(this.tbody.children.length)for(d=
|
|
67
|
+
0;d<this.tbody.children.length;d++)e=parseInt(this.tbody.children[d].getAttribute(_$_519c[43])),(e=I[_$_519c[51]].call(this,b,e))&&(null===a?this.tbody.children[d].appendChild(e):this.tbody.children[d].insertBefore(e,this.tbody.children[d].children[a]))};c.renderRow=function(b,a,d,e){var f=this.options.freezeColumns||0;null==a&&(a=parseInt(this.headerContainer.children[f+1].getAttribute(_$_519c[42])));null==d&&(d=parseInt(this.headerContainer.lastChild.getAttribute(_$_519c[42])));var g=wa.create.call(this,
|
|
68
|
+
b,e);if(g.children.length)for(;g.children[f+1];)g.removeChild(g.lastChild);if(0<f){for(var h=0;h<f;h++)g.appendChild(I[_$_519c[51]].call(this,h,b));ia.update.call(this,b)}for(h=a;h<=d;h++)a=I[_$_519c[51]].call(this,h,b,e),g.appendChild(a);return g};c.resetY=function(){if(this.options.pagination){this.pageNumber||(this.pageNumber=0);var b=this.options.pagination*this.pageNumber}else b=0;var a=0;if(this.merged.rows[b]){for(a=this.options.pagination;this.merged.rows[b]&&0<=b;)b--;b++}this.tbody.textContent=
|
|
69
|
+
_$_519c[3];this.results&&this.results.length&&(b=this.results[b]);(!this.results||0<this.results.length)&&C.renderY.call(this,b,0,a);0<this.options.pagination&&qa.update.call(this);P.call(this);this.refreshBorders()};c[_$_519c[46]]=function(b,a){if(null!==b&&0<=b)if(0<this.options.pagination)this.page(this.whichPage(b));else if(this.rows[b]||(b=this.options.data.length-1),!wa.attached.call(this,b)){if(this.merged.rows[b]){for(;this.merged.rows[b]&&0<=b;)b--;b++}this.tbody.textContent=_$_519c[3];c.renderY.call(this,
|
|
70
|
+
b);var d=this.results?this.results.indexOf(b):b;0<d&&(this.results?d=this.results[d-1]:d--,c.renderY.call(this,d,!0));P.updateY.call(this)}if(null!==a&&0<=a&&(this.options.columns[a]||(a=this.options.columns.length-1),b||(b=c.getY.call(this)),!I.attached.call(this,a,b))){if(this.merged.cols[a]){for(d=b=0;d<this.rows.length;d++)this.records[d][a].merged&&(b=this.records[d][a].merged[0]);a-=b}c.reset.call(this);c.renderX.call(this,a);0<a&&c.renderX.call(this,a-1,!0);P.updateX.call(this)}this.refreshBorders()};
|
|
71
|
+
c.pageUp=function(b,a,d){var e=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]));if(a){b=null;var f=this.results?this.results[0]:0}else this.results?(f=this.results.indexOf(e),0<f&&f--,f=this.results[f]):(f=e,0<f&&f--);if(f<e){if(null==b)this.tbody.textContent=_$_519c[3];else{e=b;if(this.options.mergeCells){var g=parseInt(this.tbody.lastChild.getAttribute(_$_519c[43]));e+=X.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.lastChild)}c.renderY.call(this,f,!a,b);c.adjustY.call(this,
|
|
72
|
+
!1);d&&d.preventDefault();P.updateY.call(this)}this.refreshBorders()};c.pageDown=function(b,a,d){var e=parseInt(this.tbody.lastChild.getAttribute(_$_519c[43]));if(a){b=null;var f=this.results?this.results[this.results.length-1]:this.rows.length-1}else this.results?(f=this.results.indexOf(e),f<this.results.length-1&&f++,f=this.results[f]):(f=e,e<this.options.data.length-1&&f++);if(f>e){if(null==b)this.tbody.textContent=_$_519c[3];else{e=b;if(this.options.mergeCells){var g=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]));
|
|
73
|
+
e+=X.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.firstChild)}c.renderY.call(this,f,a,b);c.adjustY.call(this,!0);d&&d.preventDefault();P.updateY.call(this)}this.refreshBorders()};c.removeColumns=function(b,a){var d=null===a?this.headerContainer.lastChild:this.headerContainer.children[a];if(d)d=parseInt(d.getAttribute(_$_519c[42]));else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<b;g++){var h=X.getWidth.call(this,f);h>e&&(e=h);null===a?f--:f++}b+=e}b>=this.headerContainer.children.length&&
|
|
74
|
+
(b=this.headerContainer.children.length-1);if((e=this.options.nestedHeaders)&&e.length)for(f=0;f<e.length;f++)for(h=la.getColumns.call(this,f),g=0;g<b;g++)if(void 0!==h[d+g]&&this.nested.content[f][h[d+g]]){var l=this.nested.content[f][h[d+g]].element,n=l.getAttribute(_$_519c[52]);0<n&&n--;0<n?l.setAttribute(_$_519c[52],n):l.parentNode&&this.thead.children[f].removeChild(l)}for(g=0;g<b;g++)null===a?(this.headerContainer.removeChild(this.headerContainer.lastChild),this.colgroupContainer.removeChild(this.colgroupContainer.lastChild)):
|
|
75
|
+
this.headerContainer.children[a]&&(this.headerContainer.removeChild(this.headerContainer.children[a]),this.colgroupContainer.removeChild(this.colgroupContainer.children[a]));for(f=0;f<this.tbody.children.length;f++)for(g=0;g<b;g++)null===a?this.tbody.children[f].removeChild(this.tbody.children[f].lastChild):this.tbody.children[f].children[a]&&this.tbody.children[f].removeChild(this.tbody.children[f].children[a]);for(f=0;f<this.tfoot.children.length;f++)for(g=0;g<b;g++)null===a?this.tfoot.children[f].removeChild(this.tfoot.children[f].lastChild):
|
|
76
|
+
this.tfoot.children[f].removeChild(this.tfoot.children[f].children[a])};c.pageLeft=function(b,a){var d=this.options.freezeColumns||0;if(a){b=null;var e=d}else e=parseInt(this.thead.lastChild.children[d+1].getAttribute(_$_519c[42]))-1;e>=d&&(null==b?c.reset.call(this):c.removeColumns.call(this,b,null),c.renderX.call(this,e,!a,b),c.adjustX.call(this,!1),P.updateX.call(this));this.refreshBorders()};c.pageRight=function(b,a){var d=this.options.freezeColumns||0;if(a){b=null;var e=this.options.columns.length-
|
|
77
|
+
1}else e=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_519c[42]))+1;e<this.options.columns.length&&(null==b?c.reset.call(this):c.removeColumns.call(this,b,d+1),c.renderX.call(this,e,a,b),c.adjustX.call(this,!0),P.updateX.call(this));this.refreshBorders()};c.reset=function(b){1<this.headerContainer.children.length&&(b=b?0:this.options.freezeColumns||0,c.removeColumns.call(this,this.headerContainer.children.length-(b+1),b+1))};c.getX=function(){if(this.thead.lastChild)return parseInt(this.thead.lastChild.children[1].getAttribute(_$_519c[42]))};
|
|
78
|
+
c.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]))};c.adjustX=function(b,a){var d=this.options.freezeColumns||0;if(b)var e=this.options.columns.length-1,f=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_519c[42])),g=parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_519c[42]));else e=d,f=parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_519c[42])),g=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_519c[42]));
|
|
79
|
+
f===e&&(b?g--:g++,c.renderX.call(this,g,b));if(!0===a){b=[];for(d+=1;d<this.thead.lastChild.children.length;d++)k.call(this,this.tbody.firstChild.children[d],2)||b.push(d);b.length&&c.removeColumns.call(this,b.length,b[0])}};c.adjustY=function(b,a){if(b)var d=this.rows.length-1,e=parseInt(this.tbody.lastChild.getAttribute(_$_519c[43])),f=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]));else d=0,e=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43])),f=parseInt(this.tbody.lastChild.getAttribute(_$_519c[43]));
|
|
80
|
+
e==d&&(this.results?(d=this.results.indexOf(f),f=b?this.results[d-1]:this.results[d+1]):b?f--:f++,c.renderY.call(this,f,b));if(!0===a){b=[];for(a=0;a<this.tbody.children.length;a++)this.tbody.children[a].children[1]&&(k.call(this,this.tbody.children[a].children[1],2)||b.push(this.tbody.children[a].firstChild.getAttribute(_$_519c[43])));if(b.length)for(a=0;a<b.length;a++)this.rows[b[a]].element.remove()}};c.isVisible=k;return c}(),Ia=function(k,c,b,a){for(var d=this.options.columns,e=k,f,g=null;k<
|
|
81
|
+
d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$_519c[49]){f=this.records[c]&&this.records[c][k].v===_$_519c[3]?!1:!0;null===g&&(g=f);if(this.records[c]&&this.records[c][k].element&&this.records[c][k].element.style.display==_$_519c[40]){if(this.records[c][k].merged){if(k==k+this.records[c][k].merged[0]&&(e=k,!b))break;f=!1}}else{if(b&&f!==g&&!a)break;if(b)e=k;else return k}g=f}return e},Ja=function(k,c,b,a){for(var d=this.options.columns,e=k,f,g=null;0<k;)if(k--,!1!==d[k].visible&&d[k].type!==
|
|
82
|
+
_$_519c[49]){f=this.records[c]&&this.records[c][k].v===_$_519c[3]?!1:!0;null===g&&(g=f);if(this.records[c]&&this.records[c][k].element&&this.records[c][k].element.style.display==_$_519c[40]){if(this.records[c][k].merged){e=k-this.records[c][k].merged[0];if(!b)break;f=!0}}else{if(b&&f!==g&&!a)break;if(b)e=k;else return k}g=f}return e},Oa=function(){var k=function(b,a,d,e){1==b||3==b?wa.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):(1==b?C.pageUp.call(this,1,e):C.pageDown.call(this,
|
|
83
|
+
1,e),wa.attached.call(this,d)||C[_$_519c[46]].call(this,d))):I.attached.call(this,a,d)||(0==b?C.pageLeft.call(this,1,e):C.pageRight.call(this,1,e),I.attached.call(this,a,d)||C[_$_519c[46]].call(this,d,a))},c=function(b){b.up=c.up;b.down=c.down;b.right=c.right;b.left=c.left;b.last=c.last;b.first=c.first};c.up=function(b,a,d){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,n=null;if(this.results&&
|
|
84
|
+
(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var p=this.results?this.results[h]:h;if(!1!==this.rows[p].visible){var q=this.records[p][g].v===_$_519c[3]?!1:!0;null===n&&(n=q);if(this.records[p][g].element&&this.records[p][g].element.style.display==_$_519c[40]){if(this.records[p][g].merged){l=p-this.records[p][g].merged[1];if(!a)break;q=!0}}else if(a&&q!==n&&!d){d=l;break a}else if(a)l=this.records[p][g].merged?p-this.records[p][g].merged[1]:p;else{d=p;break a}n=q}}d=l}d!=f&&(f=d,b?
|
|
85
|
+
(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,1,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.down=function(b,a,d){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,n=null;if(this.results){h=this.results.indexOf(h);if(-1==h){d=l;break a}var p=this.results.length-1}else p=this.rows.length-1;for(;h<p;){h++;var q=this.results?this.results[h]:h;if(!1!==
|
|
86
|
+
this.rows[q].visible){var r=this.records[q][g].v===_$_519c[3]?!1:!0;null===n&&(n=r);if(this.records[q][g].element&&this.records[q][g].element.style.display==_$_519c[40]){if(this.records[q][g].merged){if(!this.records[q][g].merged[1]&&(l=q,!a))break;r=!0}}else if(a&&r!==n&&!d){d=l;break a}else if(a)l=q;else{d=q;break a}n=r}}d=l}d!=f&&(f=d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,3,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.right=function(b,a,d){if(b)var e=
|
|
87
|
+
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ia.call(this,e,f,a,d);d!=e&&(e=d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,2,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.left=function(b,a,d){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ja.call(this,e,f,a,d);d!=e&&(e=
|
|
88
|
+
d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,0,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.first=function(b,a){a?c.up.call(this,b,!0,!0):c.left.call(this,b,!0,!0)};c.last=function(b,a){a?c.down.call(this,b,!0,!0):c.right.call(this,b,!0,!0)};return c}(),Pa=function(){return function(k){k.save=Ka;k.fullscreen=Ga;k.setReadOnly=Ca;k.getReadOnly=Ca;k.isReadOnly=Ca;k.setPlugins=function(c){ja.call(this.parent,c)};k.showIndex=function(){ua.call(this,!0)};k.hideIndex=
|
|
89
|
+
function(){ua.call(this,!1)};k[_$_519c[46]]=C[_$_519c[46]];k.undo=function(){Q.undo.call(k.parent)};k.redo=function(){Q.redo.call(k.parent)};k.isEditable=function(){return N.call(k.parent,k)};k.dispatch=function(){return B.apply(this.parent,arguments)};k.setViewport=function(c,b){this.options.tableOverflow=!0;c=parseInt(c);b=parseInt(b);100<c&&(this.options.tableWidth=c+_$_519c[44],this.content.style.maxWidth=this.options.tableWidth);100<b&&(this.options.tableHeight=parseInt(b)+_$_519c[44],this.content.style.maxHeight=
|
|
90
|
+
this.options.tableHeight);this.tbody.innerHTML=_$_519c[3];C.call(this);P.refresh.call(this);ca.update.call(this.parent,this)}}}(),za=function(){var k={logo:null,url:null,persistence:!1,sequence:!0,data:null,json:null,rows:[],columns:[],cells:{},role:null,nestedHeaders:null,defaultColWidth:100,defaultRowHeight:0,defaultColAlign:_$_519c[53],minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_519c[36],csvHeaders:!0,csvDelimiter:_$_519c[25],columnSorting:!0,columnDrag:!0,columnResize:!0,
|
|
91
|
+
rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$_519c[54],tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_519c[3],worksheetName:null,worksheetState:null,
|
|
92
|
+
filters:!1,footers:null,validations:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0},c={application:_$_519c[55],cloud:null,root:null,definedNames:{},sorting:null,server:null,toolbar:null,editable:!0,allowExport:!0,includeHeadersOnDownload:!1,forceUpdateOnPaste:!1,loadingSpin:!1,fullscreen:!1,secureFormulas:!0,parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,
|
|
92
93
|
allowRenameWorksheet:!0,allowMoveWorksheet:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresizerow:null,onresizecolumn:null,onselection:null,onbeforecomments:null,
|
|
93
94
|
oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,
|
|
94
|
-
onsearch:null,onbeforefilter:null,onfilter:null,oncreatecell:null,oncreaterow:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,wordWrap:!0,about:!0,license:null,worksheets:null},
|
|
95
|
-
(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$
|
|
96
|
-
{type:_$
|
|
97
|
-
jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$
|
|
98
|
-
group:f.parent.name,success:function(g){g=A.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&0<g.length)for(var h=g.shift(),l=0;l<h.length;l++)f.options.columns[l]||(f.options.columns[l]={type:_$
|
|
99
|
-
g)}}):
|
|
100
|
-
(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));G.call(this,_$
|
|
101
|
-
this.history[this.historyIndex--];if(
|
|
102
|
-
|
|
103
|
-
_$
|
|
104
|
-
_$
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
!1;B.call(this,_$
|
|
108
|
-
function(
|
|
109
|
-
|
|
110
|
-
!1;C[_$
|
|
111
|
-
this.edition=
|
|
112
|
-
|
|
113
|
-
(
|
|
114
|
-
(e.setAttribute(_$
|
|
115
|
-
|
|
116
|
-
k.getId;
|
|
117
|
-
if(
|
|
118
|
-
|
|
119
|
-
h)return!1;if(h=B.call(f,_$
|
|
120
|
-
l.success?typeof e===_$
|
|
121
|
-
k=-1==k.indexOf(_$
|
|
122
|
-
d=
|
|
123
|
-
k.all;
|
|
124
|
-
this.resetBorders(_$
|
|
125
|
-
|
|
126
|
-
h&&(h=
|
|
127
|
-
t.current,this.selectedCell))};k.fromElements=function(
|
|
128
|
-
var
|
|
129
|
-
this.borders[g];else{var l={};l.element=document.createElement(_$
|
|
130
|
-
this.rows[d].element.offsetTop:0,
|
|
131
|
-
this.thead.lastChild.children[1].style.display==_$
|
|
132
|
-
this.headers[u].offsetWidth,w=!0):n=this.thead.lastChild.children[r].offsetLeft+this.thead.lastChild.children[r].offsetWidth,l.element.style.borderRightColor=g==_$
|
|
133
|
-
this.rows[x].element.offsetHeight,l.element.style.borderBottomColor=g==_$
|
|
134
|
-
e>h&&(e-=h,e>n?h=
|
|
135
|
-
_$
|
|
136
|
-
|
|
137
|
-
k[_$
|
|
138
|
-
function(
|
|
139
|
-
this.getSelectedRows(!0);
|
|
140
|
-
-1==
|
|
141
|
-
return k}(),La=function(){var k={start:function(
|
|
142
|
-
|
|
143
|
-
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
144
|
-
this.content.getBoundingClientRect();this.parent.helper.style.left=(
|
|
145
|
-
|
|
146
|
-
this.tbody.children[
|
|
147
|
-
null!=k.event.d&&k.event.y!=k.event.d&&(this.moveRow(k.event.y,k.event.d),this.updateSelectionFromCoords(0,k.event.d,this.options.columns.length-1,k.event.d)),this.parent.helper.classList.remove(_$
|
|
148
|
-
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
149
|
-
|
|
150
|
-
this.parent.helper.style.left=(
|
|
151
|
-
this.records[
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
(l&&C[_$
|
|
155
|
-
{},d={};typeof
|
|
156
|
-
|
|
157
|
-
_$
|
|
158
|
-
e+h,d+a
|
|
159
|
-
l[h[f]][1]);k.build.call(this)};k.build=function(){var
|
|
160
|
-
0;b
|
|
161
|
-
if(
|
|
162
|
-
f=document.createElement(_$
|
|
163
|
-
this.headers[
|
|
164
|
-
1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},
|
|
165
|
-
B.call(this.parent,_$
|
|
166
|
-
_$
|
|
167
|
-
_$
|
|
168
|
-
(this.footers.content[
|
|
169
|
-
n=g[d].splice(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var
|
|
175
|
-
this.thead.lastChild.children[d].getAttribute(_$
|
|
176
|
-
ua.call(this)?_$
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
1;else return!1;var f,g=0,h=[],l=[],n=!1,
|
|
181
|
-
this.records[x][m].element.classList.contains(_$
|
|
182
|
-
1))+_$
|
|
183
|
-
|
|
184
|
-
g=this.options.columns.length,h=this.options.data.length,l,n=this.dataType&&typeof
|
|
185
|
-
_$
|
|
186
|
-
0;g<=
|
|
187
|
-
this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===
|
|
188
|
-
b,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var
|
|
189
|
-
_$
|
|
190
|
-
k.getRowData=function(
|
|
191
|
-
_$
|
|
192
|
-
this,b=this.getHighlighted(),d=function(){
|
|
193
|
-
(d.resetBorders(_$
|
|
194
|
-
A.getColumnNameFromCoords(w,r),
|
|
195
|
-
|
|
196
|
-
0<r&&this.insertRow(r);m=g=
|
|
197
|
-
_$
|
|
198
|
-
_$
|
|
199
|
-
c
|
|
200
|
-
a[c[b]];G.call(this,_$
|
|
201
|
-
0;f<e.length;f++){var g=S.updateWorksheetName(
|
|
202
|
-
for(var g=0,h=[],l,n=0;n<f.children.length;n++)if(l=f.children[n].getAttribute(_$
|
|
203
|
-
f.classList.add(_$
|
|
204
|
-
|
|
205
|
-
l.addRange(n));d.call(this,f)};e.close=function(f){
|
|
206
|
-
g,h,l,n){e.current.getAttribute(_$
|
|
207
|
-
|
|
208
|
-
e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$
|
|
209
|
-
_$
|
|
210
|
-
h[w]==_$
|
|
211
|
-
1])&&-1==
|
|
212
|
-
p
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
L=E[0];E=E[1];var oa=void 0!==R.records[E][L].v?R.records[E][L].v:K.call(R,L,E);m[U[J]]||((_$
|
|
217
|
-
0;y<v[x].length;y++)null===u&&(0<x&&x>y&&this.options.data[n+x][l+y]?u=_$
|
|
218
|
-
l,n,
|
|
219
|
-
|
|
220
|
-
l
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
q[
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
r[1]){var m=0;
|
|
228
|
-
return q[1]>
|
|
229
|
-
(h[n]=l+_$
|
|
230
|
-
|
|
231
|
-
e=q.element.getAttribute(_$
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
c
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
_$
|
|
241
|
-
|
|
242
|
-
this.
|
|
243
|
-
a.
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
_$
|
|
247
|
-
[]
|
|
248
|
-
_$
|
|
249
|
-
|
|
250
|
-
this.rows[
|
|
251
|
-
|
|
252
|
-
!1;this.resetBorders();var l=d?
|
|
253
|
-
force:!0})}
|
|
254
|
-
|
|
255
|
-
this.
|
|
256
|
-
this,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
e)
|
|
266
|
-
|
|
267
|
-
0;f<this.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
p;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
(
|
|
280
|
-
|
|
281
|
-
_$
|
|
282
|
-
_$
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
d
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
this.options.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
a
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
this.
|
|
303
|
-
this.
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
this.
|
|
307
|
-
this.
|
|
308
|
-
this.
|
|
309
|
-
this.table.classList.add(_$
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
(
|
|
317
|
-
|
|
318
|
-
_$
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
_$
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
b
|
|
328
|
-
_$
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
f.
|
|
334
|
-
f
|
|
335
|
-
|
|
336
|
-
g
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
1
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
_$
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
onclick:function(){
|
|
352
|
-
h.push({title:z(_$
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
a.
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
c
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
m.
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
95
|
+
onsearch:null,onbeforefilter:null,onfilter:null,oncreatecell:null,oncreaterow:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,wordWrap:!0,about:!0,license:null,worksheets:null},b=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$_519c[17]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||
|
|
96
|
+
(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_519c[13]){var f=this.options.data[0].data&&0<Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=_$_519c[56]):this.options.columns[g]=
|
|
97
|
+
{type:_$_519c[56]},this.options.columns[g].type==_$_519c[57]&&(this.options.columns[g].type=_$_519c[58],this.options.columns[g].autocomplete=!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=f[g]),this.options.columns[g].width||(this.options.columns[g].width=this.options.defaultColWidth),this.options.columns[g].type!=_$_519c[58]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_519c[58]&&this.options.columns[g].url&&
|
|
98
|
+
jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_519c[59],dataType:_$_519c[60],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=d[_$_519c[51]];e.setConfig=d[_$_519c[11]]};d.spreadsheet=function(e){this.config=b(e,c);1!=this.config.secureFormulas&&console.log(_$_519c[61])};d.worksheet=function(e){var f=this;f.options=b(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_519c[59],dataType:_$_519c[56],
|
|
99
|
+
group:f.parent.name,success:function(g){g=A.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&0<g.length)for(var h=g.shift(),l=0;l<h.length;l++)f.options.columns[l]||(f.options.columns[l]={type:_$_519c[56],align:f.options.defaultColAlign,width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_519c[13]&&(f.options.columns[l].title=h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_519c[59],dataType:_$_519c[60],group:f.parent.name,success:function(g){a.call(f,
|
|
100
|
+
g)}}):a.call(f)};d[_$_519c[51]]=function(){return this.options};d[_$_519c[11]]=function(e){typeof e==_$_519c[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_519c[13]&&(this.options[f[g]]=e[f[g]]);!0===e.filters?Y.show.call(this):!1===e.filters&&Y.hide.call(this);!0===e.search?ma.show.call(this):!1===e.search&&ma.hide.call(this);!0===e.toolbar?ca.show.call(this.parent):!1===e.toolbar&&ca.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&
|
|
101
|
+
(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));G.call(this,_$_519c[62],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof c[f[g]]!==_$_519c[13]&&(this.config[f[g]]=e[f[g]])};return d}(),Q=function(k){k=function(c){if(1!=this.ignoreHistory){var b=++this.historyIndex;this.history=this.history.slice(0,b+1);this.history[b]=c}};k.undo=function(){if(0<=this.historyIndex)var c=
|
|
102
|
+
this.history[this.historyIndex--];if(c){this.ignoreHistory=!0;var b=c.worksheet;b.openWorksheet();var a=[];if(c.action==_$_519c[63])b.deleteRow(c.insertBefore?c.rowNumber:c.rowNumber+1,c.numOfRows);else if(c.action==_$_519c[64])b.insertRow(c.numOfRows,c.rowNumber,1,c.data),I.setAttributes.call(b,c.attributes);else if(c.action==_$_519c[65])b.deleteColumn(c.insertBefore?c.columnNumber:c.columnNumber+1,c.numOfColumns);else if(c.action==_$_519c[66])b.insertColumn(c.numOfColumns,c.columnNumber,1,c.properties,
|
|
103
|
+
c.data,c.extra),I.setAttributes.call(b,c.attributes);else if(c.action==_$_519c[67])b.moveRow(c.newValue,c.oldValue);else if(c.action==_$_519c[68])b.moveColumn(c.newValue,c.oldValue);else if(c.action==_$_519c[69])b.removeMerge(c.newValue,!0),b.setMerge(c.oldValue);else if(c.action==_$_519c[70])b.setMerge(c.oldValue);else if(c.action==_$_519c[71])b.setStyle(c.oldValue,null,null,1);else if(c.action==_$_519c[72])b.setStyle(c.oldValue);else if(c.action==_$_519c[73])b.setWidth(c.column,c.oldValue);else if(c.action==
|
|
104
|
+
_$_519c[74])b.setHeight(c.row,c.oldValue);else if(c.action==_$_519c[75])b.setHeader(c.column,c.oldValue);else if(c.action==_$_519c[76])b.setComments(c.oldValue);else if(c.action==_$_519c[77])b.setProperty(c.column,c.oldValue);else if(c.action==_$_519c[78])b.orderBy(c.column,c.direction?0:1,c.oldValue);else if(c.action==_$_519c[79]){for(var d=0;d<c.records.length;d++){var e={x:c.records[d].x,y:c.records[d].y,value:c.records[d].oldValue};c.records[d].oldStyle&&(e.style=c.records[d].oldStyle);a.push(e)}b.setValue(a)}else c.action==
|
|
105
|
+
_$_519c[80]?b.renameWorksheet(c.index,c.oldValue):c.action==_$_519c[81]&&b.moveWorksheet(c.t,c.f);c.selection&&b.updateSelectionFromCoords(c.selection);this.ignoreHistory=!1;B.call(this,_$_519c[82],b,c)}};k.redo=function(){if(this.historyIndex<this.history.length-1)var c=this.history[++this.historyIndex];if(c){this.ignoreHistory=!0;var b=c.worksheet;b.openWorksheet();c.action==_$_519c[63]?b.insertRow(c.numOfRows,c.rowNumber,c.insertBefore,c.data):c.action==_$_519c[64]?b.deleteRow(c.rowNumber,c.numOfRows):
|
|
106
|
+
c.action==_$_519c[65]?b.insertColumn(c.numOfColumns,c.columnNumber,c.insertBefore,c.properties,c.data):c.action==_$_519c[66]?b.deleteColumn(c.columnNumber,c.numOfColumns):c.action==_$_519c[67]?b.moveRow(c.oldValue,c.newValue):c.action==_$_519c[68]?b.moveColumn(c.oldValue,c.newValue):c.action==_$_519c[69]?b.setMerge(c.newValue):c.action==_$_519c[70]?b.removeMerge(c.newValue):c.action==_$_519c[71]?b.setStyle(c.newValue,null,null,1):c.action==_$_519c[72]?b.resetStyle(c.cells):c.action==_$_519c[73]?b.setWidth(c.column,
|
|
107
|
+
c.newValue):c.action==_$_519c[74]?b.setHeight(c.row,c.newValue):c.action==_$_519c[75]?b.setHeader(c.column,c.newValue):c.action==_$_519c[76]?b.setComments(c.newValue):c.action==_$_519c[77]?b.setProperty(c.column,c.newValue):c.action==_$_519c[78]?b.orderBy(c.column,c.direction,c.newValue):c.action==_$_519c[79]?b.setValue(c.records):c.action==_$_519c[80]?b.renameWorksheet(c.index,c.newValue):c.action==_$_519c[81]&&b.moveWorksheet(c.f,c.t);c.selection&&b.updateSelectionFromCoords(c.selection);this.ignoreHistory=
|
|
108
|
+
!1;B.call(this,_$_519c[83],b,c)}};return k}(),ja=function(){var k=function(c){var b=null;if(Array.isArray(c))b=c;else if(typeof c==_$_519c[84]){b=[];var a=Object.keys(c);for(var d=0;d<a.length;d++)b.push({name:a[d],plugin:c[a[d]],options:{}})}if(b&&b.length)for(d=0;d<b.length;d++){if(b[d].name&&b[d].plugin){var e=b[d].name;var f=b[d].plugin;var g=b[d].options}typeof f===_$_519c[85]&&(this.plugins[e]=f.call(t,this,g,this.config),typeof f.license==_$_519c[85]&&t.license&&f.license(t.license))}};k.execute=
|
|
109
|
+
function(c,b){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var d=0;d<a.length;d++)if(typeof this.plugins[a[d]][c]==_$_519c[85]){var e=this.plugins[a[d]][c].apply(this.plugins[a[d]],b);e&&(c==_$_519c[86]&&(b[4]=e),c==_$_519c[87]&&(b[0]=e))}return b}};return k}(),Z=function(){var k=function(c){c.getEditor=k[_$_519c[51]];c.openEditor=k.open;c.closeEditor=k.close};k[_$_519c[51]]=function(c,b){c=Da.getOptions.call(this,c,b);return[c.type&&typeof c.type==_$_519c[84]?c.type:t.editors[c.type],
|
|
110
|
+
c]};k.open=function(c,b,a){if(!N.call(this.parent,this))return!1;if(1!=c.classList.contains(_$_519c[18])){var d=parseInt(c.getAttribute(_$_519c[42])),e=parseInt(c.getAttribute(_$_519c[43]));if(!0===this.options.locked){var f=A.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][d].merged)d-=f[0],e-=f[1],c=this.records[e][d].element;if(!I.attached.call(this,d,e)){if(this.results&&0<this.results.length)return console.error(_$_519c[88]),
|
|
111
|
+
!1;C[_$_519c[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;f.innerText=_$_519c[3];B.call(this.parent,_$_519c[89],this,c,d,e);b=1==b?_$_519c[3]:K.call(this,d,e);var g=k[_$_519c[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_519c[85]&&(!1===g[0].openEditor(c,b,d,e,this,g[1],a)?h=!1:B.call(this.parent,_$_519c[90],this,c,d,e,f,g[1]));h&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_519c[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_519c[49])),
|
|
112
|
+
this.edition=c,f.classList.add(_$_519c[91]),1==this.parent.config.editorFormulas&&M(b)&&(f.classList.add(_$_519c[92]),fa.parse.call(this,f),c=document.createTextNode(_$_519c[3]),f.appendChild(c),jSuites.focus(f)))}};k.close=function(c,b){null===c&&(c=this.edition);this.parent.input.classList.contains(_$_519c[92])&&fa.close.call(this,this.parent.input);var a,d=parseInt(c.getAttribute(_$_519c[42])),e=parseInt(c.getAttribute(_$_519c[43]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&
|
|
113
|
+
a.element.innerText==_$_519c[3]&&(this.records[e][d].element.style.overflow=_$_519c[3]);a=k[_$_519c[51]].call(this,d,e);if(1==b){var f=null;if(typeof a[0].closeEditor==_$_519c[85]){var g=a[0].closeEditor(c,!0,d,e,this,a[1]);void 0!==g&&(f=g)}null!==f&&K.call(this,d,e)!=f&&this.setValue(c,f)}else a[0].closeEditor(c,!1,d,e,this,a[1]);B.call(this.parent,_$_519c[93],this,c,d,e,f,b);a[1]&&typeof a[1].render==_$_519c[85]&&a[1].render.call(this,c,this.records[e][d].v,d,e,this,a[1]);a=this.parent.input;a.onblur&&
|
|
114
|
+
(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);Z.build(this.parent);a.removeAttribute(_$_519c[94]);a.removeAttribute(_$_519c[95]);a.removeAttribute(_$_519c[96]);this.edition=a.mask=null;this.refreshBorders()};k.position=function(c,b){var a=null;if(a=this.records[b][c].element){var d=this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=c;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$_519c[97]:
|
|
115
|
+
(e.setAttribute(_$_519c[98],_$_519c[3]),c=a.top-d.top+1,b=a.left-d.left+1,e.style.top=c+_$_519c[44],e.style.left=b+_$_519c[44],e.style.minWidth=a.width-1+_$_519c[44],e.style.minHeight=a.height-1+_$_519c[44],setTimeout(function(){e.focus()},0))}};k.build=function(c){c.input||(c.input=document.createElement(_$_519c[20]));c.input.className=_$_519c[99];c.input.setAttribute(_$_519c[100],!0);c.input.innerText=_$_519c[3];c.input.oninput=function(b){t.current.parent.config.editorFormulas=!0;M(b.target.innerText)?
|
|
116
|
+
b.target.classList.add(_$_519c[92]):b.target.classList.contains(_$_519c[92])&&fa.close.call(t.current,this)};return c.input};return k}(),B=function(k){if(!this.ignoreEvents){if(typeof this.config.onevent==_$_519c[85])var c=this.config.onevent.apply(this,arguments);typeof this.config[k]==_$_519c[85]&&(c=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)));ja.execute.call(this,_$_519c[101],arguments)}return c},pa=function(){var k=function(c){c.sequence=0;c.getNextSequence=k.next;c.getRowId=
|
|
117
|
+
k.getId;c.setRowId=k.setId;c.getRowById=k.getRowById};k[_$_519c[51]]=function(){return this.sequence};k[_$_519c[11]]=function(c,b){if(c>this.sequence||b)this.sequence=c};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(c){if(this.rows[c]&&this.rows[c].id)return this.rows[c].id;var b=this.getPrimaryKey();if(!1!==b)return K.call(this,b,c)};k.setId=function(c,b){if(void 0!==b&&0<=parseInt(c)){var a={};a[c]=b}else a=c;c=Object.keys(a);
|
|
118
|
+
if(c.length){for(var d=0;d<c.length;d++)b=a[c[d]],this.rows[c[d]].id=b,k[_$_519c[11]].call(this,b);G.call(this,_$_519c[102],[a]);B.call(this.parent,_$_519c[103],this,a)}};k.getRowById=function(c,b){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,a)==c)return!0===b?this.rows[a]:this.options.data[a];return!1};return k}(),Ka=function(){var k=function(b){for(var a=[],d={},e=0;e<b.length;e++){var f=b[e].x,g=b[e].y,h=pa.getId.call(this,g);if(!h)if(d[g])h=d[g];else if(h=pa.next.call(this))d[g]=h;
|
|
119
|
+
a[g]||(a[g]={id:h,row:g,data:{}});f=V.call(this,f);a[g].data[f]=b[e].value}pa.setId.call(this,d);return a.filter(function(l){return null!=l})},c=function(b){var a=b[0];if(0<=[_$_519c[104],_$_519c[105],_$_519c[102],_$_519c[106]].indexOf(a))return!1;var d={};a==_$_519c[79]||a==_$_519c[107]?(a=_$_519c[108],d[a]=k.call(this,b[1].data)):Array.isArray(b[1])&&1==b[1].length?d[a]=b[1][0]:d[a]=b[1];return d};return function(b,a,d,e){var f=this.parent,g=this;d=null;var h=c.call(this,a);if(h)a=h;else if(!1===
|
|
120
|
+
h)return!1;if(h=B.call(f,_$_519c[109],f,g,a))a=h;else if(!1===h)return!1;Ha.call(f,!0);jSuites.ajax({url:b,method:_$_519c[110],dataType:_$_519c[60],data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_519c[111],_$_519c[112]+d)},success:function(l){f.element.classList.contains(_$_519c[113])&&f.element.classList.remove(_$_519c[113]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_519c[114]+l.message):jSuites.notification(l)),
|
|
121
|
+
l.success?typeof e===_$_519c[85]?e(l):l.data&&Array.isArray(l.data)&&I.updateAll.call(g,l.data):l.error&&(alert(_$_519c[115]),window.open(window.location.href,_$_519c[116])));B.call(f,_$_519c[117],f,g,a,l)},error:function(){f.element.classList.add(_$_519c[113])}})}}(),G=function(){return function(){ja.execute.call(this.parent,_$_519c[118],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var c=this.parent.worksheets.indexOf(this);k=this.parent.config.server;
|
|
122
|
+
k=-1==k.indexOf(_$_519c[119])?k+(_$_519c[120]+c):k+(_$_519c[121]+c)}else this.options.persistence&&(k=typeof this.options.persistence==_$_519c[17]?this.options.persistence:this.options.url);k&&Ka.call(this,k,arguments)}}}(),Aa=function(k){if(this.selectedCell){var c=this.selectedCell[0],b=this.selectedCell[1];this.records&&this.records[b]&&this.records[b][c]&&this.records[b][c].element||(this.selectedCell=this.getHighlighted(),c=this.selectedCell[0],b=this.selectedCell[1]);var a=this.getHighlighted(),
|
|
123
|
+
d=a[0],e=a[1],f=a[2];a=a[3];k=k?_$_519c[122]:_$_519c[123];if(this.records[b]&&this.records[b][c]&&this.records[b][c].element)this.records[b][c].element.classList[k](_$_519c[124]);for(c=d;c<=f;c++)if(this.headers[c])this.headers[c].classList[k](_$_519c[125]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[k](_$_519c[125])}},va=function(){var k=function(c){c.resetSelection=k.reset;c.updateSelection=k.fromElements;c.updateSelectionFromCoords=k[_$_519c[11]];c.selectAll=
|
|
124
|
+
k.all;c.isSelected=k.isSelected;c.getHighlighted=k.getHighlighted;c.getRange=k.getRange};k.getHighlighted=function(){var c=this.borders;return(c=c.main)?[c.x1,c.y1,c.x2,c.y2]:null};k.isSelected=function(c,b,a){if(!a&&(a=this.getHighlighted(),!a))return!1;var d=a[0],e=a[1],f=a[2];a=a[3];f||(f=d);a||(a=e);return null==c?b>=e&&b<=a:null==b?c>=d&&c<=f:c>=d&&c<=f&&b>=e&&b<=a};k.reset=function(){if(this.selectedCell)c=1,this.edition&&Z.close.call(this,this.edition,!0),this.resetBorders(_$_519c[126],!0),
|
|
125
|
+
this.resetBorders(_$_519c[127],!0),this.selectedCell=null,1==c&&B.call(this.parent,_$_519c[128],this);else var c=0;return c};k.refresh=function(){this.selectedCell&&k[_$_519c[11]].call(this,this.selectedCell)};k.isValid=function(c,b,a,d){return!(c>=this.options.columns.length||b>=this.rows.length||a>=this.options.columns.length||d>=this.rows.length)};k[_$_519c[11]]=function(c,b,a,d,e,f,g){f||(f=_$_519c[126]);Array.isArray(c)&&(d=c[3],a=c[2],b=c[1],c=c[0]);null==a&&(a=c);null==d&&(d=b);if(!k.isValid.call(this,
|
|
126
|
+
c,b,a,d))return!1;if(null!=c){if(parseInt(c)<parseInt(a))var h=parseInt(c),l=parseInt(a);else h=parseInt(a),l=parseInt(c);if(parseInt(b)<parseInt(d))var n=parseInt(b),p=parseInt(d);else n=parseInt(d),p=parseInt(b);var q;var r={};if(this.options.mergeCells){for(var w=n;w<=p;w++)for(var m=h;m<=l;m++)if(q=this.records[w][m].merged)q=A.getColumnNameFromCoords(m-q[0],w-q[1]),r[q]=!0;w=Object.keys(r);if(w.length)for(m=0;m<w.length;m++)q=A.getCoordsFromColumnName(w[m]),r=this.options.mergeCells[w[m]],q[0]<
|
|
127
|
+
h&&(h=q[0]),q[0]+r[0]-1>l&&(l=q[0]+r[0]-1),q[1]<n&&(n=q[1]),q[1]+r[1]-1>p&&(p=q[1]+r[1]-1)}}f==_$_519c[126]&&(this.selectedCell?(Aa.call(this,!1),q=1):q=0,this.selectedCell=[c,b,a,d],this.records[d][a].element&&C.isVisible.call(this,this.records[d][a].element),Z.position.call(this,c,b),0==q&&B.call(this.parent,_$_519c[129],this));da[_$_519c[11]].call(this,h,n,l,p,f,g);f==_$_519c[126]&&(ja.execute.call(this.parent,_$_519c[130],[this,h,n,l,p,e]),B.call(this.parent,_$_519c[131],this,h,n,l,p,e),ca.update.call(this.parent,
|
|
128
|
+
t.current,this.selectedCell))};k.fromElements=function(c,b,a){var d=c.getAttribute(_$_519c[42]);c=c.getAttribute(_$_519c[43]);if(b){var e=b.getAttribute(_$_519c[42]);b=b.getAttribute(_$_519c[43])}else e=d,b=c;this.updateSelectionFromCoords(d,c,e,b,a)};k.all=function(){k[_$_519c[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};k.getRange=function(){var c=this.selectedCell;if(!c)return _$_519c[3];var b=A.getColumnNameFromCoords(c[0],c[1]);c=A.getColumnNameFromCoords(c[2],c[3]);
|
|
129
|
+
var a=this.options.worksheetName;a=-1!=a.indexOf(_$_519c[132])?_$_519c[133]+a+_$_519c[134]:a+_$_519c[135];return b==c?a+b:a+t.helpers.getRangeFromTokens(t.helpers.getTokensFromRange(b+_$_519c[136]+c))};return k}(),da=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_519c[11]];a.getBorder=k[_$_519c[51]];a.resetBorders=k.reset;a.refreshBorders=k.refresh};k[_$_519c[51]]=function(a){return this.borders[a]};var c=function(a,d,e,f,g,h){g||(g=0);if(!va.isValid.call(this,a,d,e,f))return!1;if(this.borders[g])l=
|
|
130
|
+
this.borders[g];else{var l={};l.element=document.createElement(_$_519c[20]);l.element.classList.add(_$_519c[137]);g==_$_519c[127]||g==_$_519c[138]||g==_$_519c[126]?l.element.classList.add(_$_519c[139]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_519c[140],l.element.style.borderColor=h);this.content.appendChild(l.element)}l.x1=a;l.y1=d;l.x2=e;l.y2=f;h=this.headers[a]?this.headers[a].offsetLeft:0;var n=this.headers[e]?this.headers[e].offsetLeft:0,p=this.rows[d].element?
|
|
131
|
+
this.rows[d].element.offsetTop:0,q=this.rows[f].element?this.rows[f].element.offsetTop:0;l.element.style.top=_$_519c[141];l.element.style.left=_$_519c[141];l.active=0;var r=this.options.freezeColumns||0,w=!1,m=null,v=null,u=null,x=null;this.tbody.firstChild&&(v=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43])),x=parseInt(this.tbody.lastChild.getAttribute(_$_519c[43])));this.thead.lastChild&&(m=parseInt(this.thead.lastChild.children[r+1].getAttribute(_$_519c[42])),u=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_519c[42])),
|
|
132
|
+
this.thead.lastChild.children[1].style.display==_$_519c[40]&&(m=Ia.call(this,m,v)),this.thead.lastChild.lastChild.style.display==_$_519c[40]&&(u=Ja.call(this,u,x)));null==m||e<m&&a>=r||a>u||f<v||d>x||(h?l.element.style.borderLeftColor=l.color?l.color:_$_519c[3]:(h=this.thead.lastChild.children[r+1].offsetLeft,l.element.style.borderLeftColor=g==_$_519c[127]?_$_519c[142]:_$_519c[143]),n?(n+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_519c[3]):(e>u?(n=this.headers[u].offsetLeft+
|
|
133
|
+
this.headers[u].offsetWidth,w=!0):n=this.thead.lastChild.children[r].offsetLeft+this.thead.lastChild.children[r].offsetWidth,l.element.style.borderRightColor=g==_$_519c[127]?_$_519c[142]:_$_519c[143]),n=n-h-1,p?l.element.style.borderTopColor=l.color?l.color:_$_519c[3]:(p=this.tbody.firstChild.offsetTop,l.element.style.borderTopColor=g==_$_519c[127]?_$_519c[142]:_$_519c[143]),q?(q+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_519c[3]):(q=this.rows[x].element.offsetTop+
|
|
134
|
+
this.rows[x].element.offsetHeight,l.element.style.borderBottomColor=g==_$_519c[127]?_$_519c[142]:_$_519c[143],w=!0),q=q-p-1,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_519c[3],l.element.style.borderRightWidth=_$_519c[3],d=0<this.content.scrollLeft?ia.getWidth.call(this):0)&&(a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||!a&&e||(a&&!e?(e=d+this.content.scrollLeft,e>h+n&&(l.element.style.borderRightWidth=_$_519c[144],n+=e-(h+n))):(e=d+this.content.scrollLeft,
|
|
135
|
+
e>h&&(e-=h,e>n?h=p=-2E3:(h=h+e+1,n-=e,l.element.style.borderLeftWidth=_$_519c[144]))))),l.element.style.top=p+_$_519c[44],l.element.style.left=h+_$_519c[44],l.element.style.width=n+_$_519c[44],l.element.style.height=q+_$_519c[44],l.t=p,l.l=h,l.w=n,l.h=q,l.active=1);g==_$_519c[126]&&(l.active&&1!=w?(this.corner.style.top=p+q-2+_$_519c[44],this.corner.style.left=h+n-2+_$_519c[44]):(this.corner.style.top=_$_519c[141],this.corner.style.left=_$_519c[141]));this.borders[g]=l},b=function(a,d){a.element.style.top=
|
|
136
|
+
_$_519c[141];a.element.style.left=_$_519c[141];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_519c[11]]=function(a,d,e,f,g,h){c.call(this,a,d,e,f,g,h);g==_$_519c[126]&&(Aa.call(this,!0),G.call(this,_$_519c[104],{x1:a,y1:d,x2:e,y2:f}))};k.reset=function(a,d){a&&a!=_$_519c[126]||(this.corner.style.top=_$_519c[141],this.corner.style.left=_$_519c[141],Aa.call(this,!1));if(a)this.borders[a]&&b(this.borders[a],d);else{d=Object.keys(this.borders);for(var e=0;e<d.length;e++)b(this.borders[d[e]])}a&&
|
|
137
|
+
a!=_$_519c[126]||G.call(this,_$_519c[105])};k.refresh=function(a){var d=this.borders;if(a)d[a]&&null!=d[a].x1&&c.call(this,d[a].x1,d[a].y1,d[a].x2,d[a].y2,a);else{a=Object.keys(d);for(var e=0;e<a.length;e++)d[a[e]]&&null!=d[a[e]].x1&&c.call(this,d[a[e]].x1,d[a[e]].y1,d[a[e]].x2,d[a[e]].y2,a[e])}this.edition&&(d=this.parent.input,Z.position.call(this,d.x,d.y))};k.destroy=function(a){var d;if(d=this.borders[a])d.element.remove(),delete this.borders[a]};return k}(),Qa=function(){var k=function(c){c.setGroup=
|
|
138
|
+
k[_$_519c[11]];c.unsetGroup=k.unset};k[_$_519c[11]]=function(c,b,a){0==c&&(a=document.createElement(_$_519c[145]),a.classList.add(_$_519c[146]),this.thead.insertBefore(a,this.thead.firstChild),c=document.createElement(_$_519c[147]),c.innerHTML=_$_519c[148],a.appendChild(c),c=document.createElement(_$_519c[147]),a.appendChild(c),b=this.headers[b])&&(b=b.querySelector(_$_519c[149]),b||(b=document.createElement(_$_519c[20]),b.classList.add(_$_519c[150]),b.innerText=_$_519c[151],c.appendChild(b)))};k.unset=
|
|
139
|
+
function(c,b){};return k}(),ta=function(){var k={start:function(c){if(!N.call(this.parent,this))return!1;if(null!==c.target.getAttribute(_$_519c[43])){var b=c.target.getAttribute(_$_519c[43]);k.event={y:parseInt(b),h:c.target.offsetHeight,p:c.pageY}}else null!==c.target.getAttribute(_$_519c[42])&&(b=c.target.getAttribute(_$_519c[42]),k.event={x:parseInt(b),w:c.target.offsetWidth,p:c.pageX})},end:function(c){var b=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var d=
|
|
140
|
+
this.getSelectedRows(!0);c=d.indexOf(parseInt(k.event.y));if(d.length&&-1<c)for(var e=0;e<d.length;e++)b.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==c?(d.push(k.event.y),b.push(k.event.h)):b[c]=k.event.h;this.setHeight(d,a,b)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$_519c[152]));d=this.getSelectedColumns();c=d.indexOf(parseInt(k.event.x));if(d.length&&-1<c)for(e=0;e<d.length;e++)b.push(parseInt(this.options.columns[d[e]].width));else d=[];
|
|
141
|
+
-1==c?(d.push(k.event.x),b.push(k.event.w)):b[c]=k.event.w;this.setWidth(d,a,b)}k.event=null},update:function(c){null!=k.event.y?(c=c.pageY-k.event.p,0<k.event.h+c&&(this.rows[k.event.y].element.style.height=k.event.h+c+_$_519c[44],this.refreshBorders())):null!=k.event.x&&(c=c.pageX-k.event.p,0<k.event.w+c&&(this.colgroup[k.event.x].setAttribute(_$_519c[152],k.event.w+c),this.options.columns[k.event.x].width=k.event.w+c,0<this.options.freezeColumns&&ia.width.call(this),this.refreshBorders()))},cancel:function(){k.end.call(this)}};
|
|
142
|
+
return k}(),La=function(){var k={start:function(c){var b=this.parent.helper;c=parseInt(c.target.getAttribute(_$_519c[42]));if(this.merged.cols[c])console.error(_$_519c[153]);else{k.event={x:c,d:c};this.headers[c].classList.add(_$_519c[154]);for(var a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_519c[43]);this.records[d][c].element.classList.add(_$_519c[154])}a=this.parent.element.getBoundingClientRect();c=this.headers[c].getBoundingClientRect();d=this.content.getBoundingClientRect();
|
|
143
|
+
b.style.display=_$_519c[16];b.style.top=d.top-a.top+_$_519c[44];b.style.left=c.left-d.left+_$_519c[44];b.style.width=_$_519c[155];b.style.height=d.height+_$_519c[44];b.classList.add(_$_519c[156])}},end:function(){this.headers[k.event.x].classList.remove(_$_519c[154]);for(var c=0;c<this.tbody.children.length;c++){var b=this.tbody.children[c].getAttribute(_$_519c[43]);this.records[b][k.event.x].element.classList.remove(_$_519c[154])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,
|
|
144
|
+
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_519c[156]);this.parent.helper.style.display=_$_519c[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(c){var b=c.target.getAttribute(_$_519c[42]);if(null!=b)if(b=parseInt(b),this.merged.cols[b])console.error(_$_519c[153]);else{c=c.target.clientWidth/2>c.offsetX;k.event.d=c?k.event.x<b?parseInt(b)-1:parseInt(b):k.event.x>b?parseInt(b)+1:parseInt(b);b=this.headers[b].getBoundingClientRect();var a=
|
|
145
|
+
this.content.getBoundingClientRect();this.parent.helper.style.left=(c?b.left:b.right)-a.left+_$_519c[44]}}};return k}(),na=function(){var k={start:function(c){if(N.call(this.parent,this)){this.resetSelection();var b=this.parent.helper;if(null!==c.target.getAttribute(_$_519c[43])){var a=parseInt(c.target.getAttribute(_$_519c[43]));this.merged.rows[a]?console.error(_$_519c[157]):this.results?console.error(_$_519c[158]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_519c[154]),c=this.parent.element.getBoundingClientRect(),
|
|
146
|
+
a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$_519c[16],b.style.top=a.top-c.top+_$_519c[44],b.style.left=_$_519c[159],b.style.width=this.content.offsetWidth-50+_$_519c[44],b.style.height=_$_519c[155],b.classList.add(_$_519c[160]))}else if(null!==c.target.getAttribute(_$_519c[42]))if(a=parseInt(c.target.getAttribute(_$_519c[42])),this.merged.cols[a])console.error(_$_519c[153]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_519c[154]);for(c=0;c<this.tbody.children.length;c++){var d=
|
|
147
|
+
this.tbody.children[c].getAttribute(_$_519c[43]);this.records[d][a].element.classList.add(_$_519c[154])}c=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();b.style.display=_$_519c[16];b.style.top=d.top-c.top+_$_519c[44];b.style.left=a.left-d.left+_$_519c[44];b.style.width=_$_519c[155];b.style.height=d.height+_$_519c[44];b.classList.add(_$_519c[156])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_519c[154]),
|
|
148
|
+
null!=k.event.d&&k.event.y!=k.event.d&&(this.moveRow(k.event.y,k.event.d),this.updateSelectionFromCoords(0,k.event.d,this.options.columns.length-1,k.event.d)),this.parent.helper.classList.remove(_$_519c[160]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_519c[154]);for(var c=0;c<this.tbody.children.length;c++){var b=this.tbody.children[c].getAttribute(_$_519c[43]);this.records[b][k.event.x].element.classList.remove(_$_519c[154])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,
|
|
149
|
+
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_519c[156])}this.parent.helper.style.display=_$_519c[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(c){if(null!=k.event.y){var b=c.target.getAttribute(_$_519c[43]);if(null!=b){var a=b=parseInt(b),d=c.target.clientHeight/2>c.offsetY;d?k.event.y<b&&(a=b-1):k.event.y>b&&(a=b+1);c=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(c=!0):this.merged.rows[a+1]&&(c=!0));c||(k.event.d=a,
|
|
150
|
+
a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(d?b.top:b.bottom)-a.top+_$_519c[44])}}else d=c.target.getAttribute(_$_519c[42]),null!=d&&(a=d=parseInt(d),(b=c.target.clientWidth/2>c.offsetX)?k.event.x<d&&(a=d-1):k.event.x>d&&(a=d+1),c=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(c=!0):this.merged.cols[a+1]&&(c=!0)),c||(k.event.d=a,a=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),
|
|
151
|
+
this.parent.helper.style.left=(b?a.left:a.right)-d.left+_$_519c[44]))}};return k}(),X=function(){var k=function(c){c.getMerge=k[_$_519c[51]];c.setMerge=k[_$_519c[11]];c.updateMerge=k.update;c.removeMerge=k.remove;c.destroyMerged=c.destroyMerge=k.destroy};k.getHeight=function(c,b){var a,d=1;if(this.merged.rows[c])for(var e=0;e<this.options.columns.length;e++){var f=A.getColumnNameFromCoords(e,c);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])b&&void 0!==b[f]||(a[1]>d&&(d=a[1]),b&&(b[f]=
|
|
152
|
+
this.records[c][e].element&&!this.records[c][e].merged?!0:!1))}return d-1};k.getWidth=function(c,b){var a,d=1;if(this.merged.cols[c])for(var e=0;e<this.options.data.length;e++){var f=A.getColumnNameFromCoords(c,e);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])b&&void 0!==b[f]||(a[0]>d&&(d=a[0]),b&&(b[f]=this.records[e][c].element&&!this.records[e][c].merged?!0:!1))}return d-1};k[_$_519c[51]]=function(c){return c?this.options.mergeCells[c]:this.options.mergeCells};k[_$_519c[11]]=function(c,
|
|
153
|
+
b,a){if(!N.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},h={},l=!1;typeof c==_$_519c[17]?h[c]=[b,a]:typeof c==_$_519c[84]?h=c:((e=this.getHighlighted())?e=[A.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:z(_$_519c[161])}),e=!1),e&&(h[e[0]]=[e[1],e[2]]));b=Object.keys(h);if(b.length){for(a=0;a<b.length;a++){var n=b[a],p=h[b[a]][0],q=h[b[a]][1];p=parseInt(p);q=parseInt(q);if((!p||2>p)&&(!q||2>
|
|
154
|
+
q))console.log(z(_$_519c[162])+_$_519c[136]+n);else if(this.options.mergeCells[n])g[n]=[p,q],f[n]=this.options.mergeCells[n],k.update.call(this,n,p,q);else{e=A.getCoordsFromColumnName(n);for(var r=e[1];r<e[1]+q;r++)for(var w=e[0];w<e[0]+p;w++)c=A.getColumnNameFromCoords(w,r),(d=this.merged.cells[c])&&this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],k.applyDestroy.call(this,d));g[n]=this.options.mergeCells[n]=[p,q];k.applyCreate.call(this,n);I.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&
|
|
155
|
+
(l&&C[_$_519c[46]].call(this,e[1],e[0]),Q.call(this.parent,{worksheet:this,action:_$_519c[69],newValue:g,oldValue:f}),G.call(this,_$_519c[69],[g]),k.build.call(this),va.refresh.call(this),da.refresh.call(this),B.call(this.parent,_$_519c[163],this,g,f))}};k.update=function(c,b,a){var d=this.options.mergeCells;if(d[c]){var e=d[c][1];if(b!==d[c][0]||e!==a)k.applyDestroy.call(this,c),b&&a&&(d[c]=[b,a],k.applyCreate.call(this,c))}};k.remove=function(c,b){if(!N.call(this.parent,this))return!1;b={};var a=
|
|
156
|
+
{},d={};typeof c==_$_519c[17]?d[c]=!0:typeof c==_$_519c[84]&&(d=c);c=Object.keys(d);for(d=0;d<c.length;d++)this.options.mergeCells[c[d]]&&(b[c[d]]=this.options.mergeCells[c[d]],a[c[d]]=!0,k.applyDestroy.call(this,c[d],!0));Q.call(this.parent,{worksheet:this,action:_$_519c[70],newValue:a,oldValue:b});G.call(this,_$_519c[70],{data:a})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(c,b){var a=this.options.mergeCells;if(a[c]){var d=a[c][0]||1,e=a[c][1]||1;
|
|
157
|
+
c=A.getCoordsFromColumnName(c);if(!this.records[c[1]][c[0]].merged||1==b)if(a=I[_$_519c[51]].call(this,c[0],c[1])){a.style.display=_$_519c[3];1<d?a.setAttribute(_$_519c[52],d):a.removeAttribute(_$_519c[52]);1<e?a.setAttribute(_$_519c[164],e):a.removeAttribute(_$_519c[164]);1==this.options.textOverflow&&(a.style.overflow=_$_519c[49]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){b=c[0]+g;var h=c[1]+f;if(a=this.records[h][b])if(a.merged=[g,f,a.v,a.v],0!=g||0!=f)a.element||I[_$_519c[51]].call(this,b,h),a.element.style.display=
|
|
158
|
+
_$_519c[40],a.merged[3]=a.element.innerText,a.element.innerText=_$_519c[3],K.call(this,b,h,_$_519c[3])}}}};k.applyDestroy=function(c,b){var a=this.options.mergeCells;if(a[c]){var d=A.getCoordsFromColumnName(c),e=d[0];d=d[1];var f=a[c][0],g=a[c][1];delete this.options.mergeCells[c];for(c=0;c<g;c++)for(var h=0;h<f;h++)if(a=this.records[d+c][e+h])a.element&&(0==h&&0==c?(a.element.removeAttribute(_$_519c[52]),a.element.removeAttribute(_$_519c[164])):(a.element.style.display=_$_519c[3],1==b&&(K.call(this,
|
|
159
|
+
e+h,d+c,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(c,b,a,d){if(1==b)var e=[a];else{e=[];for(var f=a;f<a+d;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),l={};for(f=0;f<h.length;f++){a=A.getCoordsFromColumnName(h[f]);for(var n=a[c];n<a[c]+g[h[f]][c];n++)-1!==e.indexOf(n)&&(l[h[f]]||(l[h[f]]=[g[h[f]][0],g[h[f]][1]],1==b&&(l[h[f]][c]+=d)),0==b&&l[h[f]][c]--)}h=Object.keys(l);for(f=0;f<h.length;f++)k.update.call(this,h[f],l[h[f]][0],
|
|
160
|
+
l[h[f]][1]);k.build.call(this)};k.build=function(){var c=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(c)for(var b=Object.keys(c),a=0;a<b.length;a++){for(var d=A.getCoordsFromColumnName(b[a]),e=parseInt(c[b[a]][0]),f=parseInt(c[b[a]][1]),g=0;g<e;g++)this.merged.cols[d[0]+g]=!0;for(var h=0;h<f;h++)this.merged.rows[d[1]+h]=!0;for(h=0;h<f;h++)for(g=0;g<e;g++){var l=A.getColumnNameFromCoords(d[0]+g,d[1]+h);this.merged.cells[l]=b[a]}}};k.batch=function(c){var b=Object.keys(c);if(b.length)for(var a=
|
|
161
|
+
0;a<b.length;a++)!1===c[b[a]]&&k.applyCreate.call(this,b[a])};return k}(),ya=function(){var k=function(c){c.getHeader=k[_$_519c[51]];c.setHeader=k[_$_519c[11]];c.getHeaders=k.all};k[_$_519c[51]]=function(c){var b;if(b=this.options.columns)return b[c].title||A.getColumnName(c)};k.all=function(c){for(var b=[],a=0;a<this.options.columns.length;a++)b.push(k[_$_519c[51]].call(this,a));return c?b:b.join(this.options.csvDelimiter)};k[_$_519c[11]]=function(c,b){if(!N.call(this.parent,this))return!1;var a;
|
|
162
|
+
if(a=this.options.columns[c]){var d=k[_$_519c[51]].call(this,c);if(!b&&(b=prompt(z(_$_519c[165]),d),!b))return!1;a.title=b;if(a=this.headers[c])a.innerHTML=b,a.setAttribute(_$_519c[166],b);Q.call(this.parent,{worksheet:this,action:_$_519c[75],column:c,oldValue:d,newValue:b});G.call(this,_$_519c[75],{column:c,title:b});B.call(this.parent,_$_519c[167],this,c,b,d)}};k.create=function(c){var b=this.options.columns[c],a=b.width||this.options.defaultColWidth,d=b.align||_$_519c[53],e=b.title||A.getColumnName(c),
|
|
163
|
+
f=document.createElement(_$_519c[147]);this.parent.config.stripHTML?f.innerText=e:f.innerHTML=e;f.setAttribute(_$_519c[42],c);f.style.textAlign=d;b.title&&f.setAttribute(_$_519c[166],f.innerText);b.tooltip&&(f.title=b.tooltip);d=this.options.filters;!0===b.filter&&(d=!0);!1===b.filter&&(d=!1);!0===d&&f.classList.add(_$_519c[168]);!1===b.visible&&(a=_$_519c[97]);d=document.createElement(_$_519c[169]);d.setAttribute(_$_519c[152],a);b.type==_$_519c[49]&&(f.style.display=_$_519c[40],d.style.display=_$_519c[40]);
|
|
164
|
+
this.headers[c]=f;this.colgroup[c]=d};return k}(),W=function(){var k=function(b,a,d){var e=this.footers.content,f;e&&e[a]&&e[a][b]&&(f=e[a][b].element)&&(void 0===d&&(e=this.options.footers,d=e[a]&&e[a][b]?e[a][b]:_$_519c[3]),M(d)&&1==this.parent.config.parseFormulas&&(d=S.execute.call(this,d,b,null,!1)),this.options.applyMaskOnFooters&&(e=Z[_$_519c[51]].call(this,b),d=t.editors.general.parseValue(b,a,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_519c[3],f.appendChild(d)):
|
|
165
|
+
1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},c=function(b){b.getFooter=c[_$_519c[51]];b.setFooter=c[_$_519c[11]];b.resetFooter=c.reset;b.refreshFooter=c.refresh;b.getFooterValue=c.value;b.setFooterValue=c.value};c[_$_519c[51]]=function(){return this.options.footers};c[_$_519c[11]]=function(b){if(b){var a=this.options.footers;this.options.footers=b}this.options.footers!=a&&(W.build.call(this),c.render.call(this),C.limited.call(this)&&(this.scrollY.style.display=_$_519c[40],C.resetY.call(this)),
|
|
166
|
+
G.call(this,_$_519c[170],{data:this.options.footers}),B.call(this.parent,_$_519c[171],this,this.options.footers,a))};c.refresh=function(){var b=this.options.footers;if(b&&b.length)for(var a=0;a<b.length;a++)for(var d=0;d<b[a].length;d++)k.call(this,d,a,b[a][d])};c.value=function(b,a,d){if(void 0===d)return this.options.footers[a][b];k.call(this,b,a,d);G.call(this,_$_519c[172],{x:b,y:a,value:d});B.call(this.parent,_$_519c[173],this,b,a,d)};c.reset=function(){var b=this.options.footers;this.options.footers=
|
|
167
|
+
null;this.footers.content=null;this.tfoot.innerHTML=_$_519c[3];G.call(this,_$_519c[174],{});B.call(this.parent,_$_519c[171],this,null,b)};c.create=function(b,a){var d=this.footers.content[a][b];if(d&&d.element)return d.element;d=this.footers.content[a][b]={};var e=this.options.columns[b].align?this.options.columns[b].align:_$_519c[53];d.element=document.createElement(_$_519c[147]);d.element.style.textAlign=e;d.element.setAttribute(_$_519c[42],b);d.element.setAttribute(_$_519c[43],a);k.call(this,b,
|
|
168
|
+
a);this.options.columns[b].type==_$_519c[49]&&(d.element.style.display=_$_519c[40]);return d.element};c.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_519c[3];for(var b=0;b<this.options.footers.length;b++){if(!this.footers.content[b]){this.footers.content[b]=[];var a=document.createElement(_$_519c[145]),d=document.createElement(_$_519c[147]);d.innerHTML=_$_519c[148];a.appendChild(d);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[b][a]||
|
|
169
|
+
(this.options.footers[b][a]=_$_519c[3]),this.footers.content[b][a]||(this.footers.content[b][a]={})}}};c.render=function(){for(var b=this.options.footers,a=0;a<b.length;a++)for(var d=0;d<b[a].length;d++){var e=W.create.call(this,d,a);this.tfoot.children[a].appendChild(e)}};c.adjust=function(b,a,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[b]&&this.headers[b].parentNode)var h=this.headers[b]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var n=
|
|
170
|
+
f[d].splice(b),p=b;p<b+a;p++)f[d][p]=_$_519c[3];f[d]=f[d].concat(n);n=g[d].splice(b);for(p=b;p<b+a;p++)g[d][p]={element:c.create.call(this,p,d)},l&&(1==h?this.tfoot.children[d].appendChild(g[d][p].element):this.tfoot.children[d].insertBefore(g[d][p].element,this.tfoot.children[d].children[b].nextSibling));g[d]=g[d].concat(n)}}else for(d=0;d<f.length;d++){for(p=b;p<b+a;p++)(h=this.footers.content[d][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[d].splice(b,a);e[d]=f[d].splice(b,a)}return e};
|
|
171
|
+
return c}(),la=function(){var k=function(c){c.setNestedCell=k.cell;c.getNestedCell=k.cell;c.setNestedHeaders=k[_$_519c[11]];c.getNestedHeaders=k[_$_519c[51]];c.resetNestedHeaders=k.reset};k[_$_519c[51]]=function(){return this.options.nestedHeaders};k[_$_519c[11]]=function(c){k.reset.call(this);this.options.nestedHeaders=c;k.build.call(this);k.render.call(this);da.refresh.call(this);P.call(this);G.call(this,_$_519c[175],{data:c});B.call(this.parent,_$_519c[176],this,c)};k.reset=function(){var c=[],
|
|
172
|
+
b=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$_519c[177])&&c.push(b[a]);if(c.length)for(;b=c.shift();)b.remove();this.nested=null;da.refresh.call(this);P.call(this);G.call(this,_$_519c[178]);B.call(this.parent,_$_519c[176],this,[])};k.cell=function(c,b,a){if(a){if(!N.call(this.parent,this))return!1;var d=this.options.nestedHeaders[b][c],e=this.nested.content[b][c].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=
|
|
173
|
+
a.tooltip);void 0!==a.colspan&&(d.colspan=a.colspan,e.setAttribute(_$_519c[52],a.colspan),e.style.display=0==d.colspan?_$_519c[40]:_$_519c[3]);G.call(this,_$_519c[179],{x:c,y:b,properties:a});B.call(this.parent,_$_519c[180],this,c,b,a)}else return this.nested.content[b][c].element};k.range=function(c){c=this.options.nestedHeaders[c];for(var b=[],a=0,d=0;d<c.length;d++){var e=parseInt(c[d].colspan);b[d]=[a,a+e-1];a+=e}return b};k.getColumns=function(c){c=this.options.nestedHeaders[c];for(var b=[],
|
|
174
|
+
a=0;a<c.length;a++)for(var d=c[a].colspan,e=0;e<d;e++)b.push(a);return b};k.create=function(c,b){if(this.nested.content[b][c])return this.nested.content[b][c].element;var a=this.options.nestedHeaders[b][c]||{},d=this.nested.content[b][c]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_519c[53]);a.title||(a.title=_$_519c[3]);var e=document.createElement(_$_519c[147]);e.setAttribute(_$_519c[181],c);e.setAttribute(_$_519c[182],b);e.setAttribute(_$_519c[52],a.colspan);e.setAttribute(_$_519c[183],a.align);
|
|
175
|
+
e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return d.element=e};k.build=function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var c=0;c<this.options.nestedHeaders.length;c++){this.nested.content[c]=[];var b=document.createElement(_$_519c[147]);b.innerHTML=_$_519c[148];var a=document.createElement(_$_519c[145]);a.classList.add(_$_519c[177]);a.appendChild(b);this.thead.insertBefore(a,this.thead.lastChild)}};k.render=function(){for(var c,b=this.options.nestedHeaders,
|
|
176
|
+
a=0;a<b.length;a++)for(var d=0;d<this.thead.lastChild.children.length;d++){c=this.thead.lastChild.children[d].getAttribute(_$_519c[42]);var e=k.getColumns.call(this,a);void 0!==e[c]&&k.renderCell.call(this,e[c],a)}};k.renderCell=function(c,b,a){var d=la.create.call(this,c,b);d.parentNode?(c=d.getAttribute(_$_519c[52]),c++,d.setAttribute(_$_519c[52],c)):(d.setAttribute(_$_519c[52],1),a?this.thead.children[b].insertBefore(d,this.thead.children[b].children[a]):this.thead.children[b].appendChild(d),0==
|
|
177
|
+
c&&0<this.options.freezeColumns&&(d.classList.add(_$_519c[50]),d.style.left=ua.call(this)?_$_519c[159]:_$_519c[155]))};k.adjust=function(c,b,a,d){var e=this.options.nestedHeaders;if(e)if(1==a)if(d&&d.nested)for(a=0;a<e.length;a++)for(var f=0;f<e[a].length;f++)k.cell.call(this,f,a,{colspan:d.nested[a][f]});else for(a=0;a<e.length;a++){if(f=k.getColumns.call(this,a)){f=f[c];var g=parseInt(e[a][f].colspan)+b;k.cell.call(this,f,a,{colspan:g})}}else{d=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,
|
|
178
|
+
a)){d[a]=[];for(f=0;f<b;f++){var h=g[c+f];typeof d[a][h]==_$_519c[13]&&(d[a][h]=e[a][h].colspan);e[a][h].colspan--}g=Object.keys(d[a]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],a,{colspan:e[a][g[f]].colspan})}return d}};return k}(),ha=function(){var k=function(c,b){var a=function(p){var q;(q=this.results)?p=q.indexOf(p):q=this.rows;p--;for(var r=p;0<=r;r--)if(p=this.results?q[r]:r,this.rows[p]&&this.rows[p].element)return p;return 0},d=function(p){var q;(q=this.results)?p=q.indexOf(p):q=this.rows;
|
|
179
|
+
p++;for(var r=p;r<q.length;r++)if(p=this.results?q[r]:r,this.rows[p]&&this.rows[p].element)return p;return q[q.length-1]},e=function(p,q){for(;0<=p;p--)if(this.records[q][p].element&&this.records[q][p].element.style.display!=_$_519c[40])return p;return 0},f=function(p,q){for(;p<this.options.columns.length;p++)if(this.records[q][p].element&&this.records[q][p].element.style.display!=_$_519c[40])return p;return this.options.columns-1},g=this.getHighlighted(),h=g[0],l=g[1],n=g[2];g=g[3];c=parseInt(c);
|
|
180
|
+
b=parseInt(b);null!=c&&null!=b&&(0<c-n?(f=f.call(this,parseInt(n)+1,b),c=parseInt(c)):(f=parseInt(c),c=e.call(this,parseInt(h)-1,b)),0<b-g?(d=d.call(this,parseInt(g)),b=parseInt(b)):(d=parseInt(b),b=a.call(this,parseInt(l))),c-f<=b-d?(f=parseInt(h),c=parseInt(n)):(d=parseInt(l),b=parseInt(g)),this.setBorder(f,d,c,b,_$_519c[138]))};k.execute=function(c){if(!N.call(this.parent,this))return!1;var b=this.borders.cloning;if(c)if(b&&b.active){c=b.x1;var a=b.y1,d=b.x2,e=b.y2}else return!1;else if(d=this.getSelected(),
|
|
181
|
+
d.length)c=d[0].x,a=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],n=!1,p=this.getHighlighted(),q=Ba[_$_519c[51]].call(this,p,!1,!1),r=this.getSelected();if(f=this.getStyle(r,!0)){var w=Object.keys(f);if(w.length)for(var m=0;m<w.length;m++)h.push(f[w[m]])}if(p[0]==c)var v=a<p[1]?a-p[1]:1,u=0;else u=c<p[0]?c-p[0]:1,v=0;w=0;c=parseInt(c);d=parseInt(d);a=parseInt(a);e=parseInt(e);for(var x=a;x<=e;x++)if(!this.results||-1!=this.results.indexOf(x)){void 0==
|
|
182
|
+
q[g]&&(g=0);f=0;p[0]!=c&&(u=c<p[0]?c-p[0]:1);for(m=c;m<=d;m++){if(!(0!=n||this.records[x][m].element&&this.records[x][m].element.classList.contains(_$_519c[18]))){if((!b||1!=b.active)&&K.call(this,m,x)){n=!0;continue}void 0==q[g]?f=0:void 0==q[g][f]&&(f=0);var y=q[g][f];y&&!q[1]&&1==this.parent.config.autoIncrement&&(this.options.columns[m].type==_$_519c[56]||this.options.columns[m].type==_$_519c[14]?M(y)?y=S.shiftFormula(y,u,x-p[1]):y==Number(y)&&(y=Number(y)+v):this.options.columns[m].type==_$_519c[184]&&
|
|
183
|
+
(y=new Date(y),y.setDate(y.getDate()+v),y=y.getFullYear()+_$_519c[185]+jSuites.two(parseInt(y.getMonth()+1))+_$_519c[185]+jSuites.two(y.getDate())+_$_519c[132]+_$_519c[186]));y={x:m,y:x,value:y};h&&null!=h[w]&&(y.style=h[w],w++,w>=h.length&&(w=0));l.push(y)}f++;p[0]!=c&&u++}g++;v++}l.length&&(r[0].x<c&&(c=r[0].x),r[0].y<a&&(a=r[0].y),r[r.length-1].x>d&&(d=r[r.length-1].x),r[r.length-1].y>e&&(e=r[r.length-1].y),this.setValue(l),this.resetBorders(_$_519c[138],!0),this.updateSelectionFromCoords(c,a,
|
|
184
|
+
d,e))};k.end=function(c){ha.event=!1;ha.execute.call(this,!0)};k.cancel=function(c){ha.event=!1;this.resetBorders(_$_519c[138],!0)};return k}(),Ba=function(){var k=function(c){c.getData=k[_$_519c[51]];c.getJson=k[_$_519c[51]];c.setData=k[_$_519c[11]];c.loadData=k.load;c.getRowData=k.getRowData;c.setRowData=k.setRowData;c.getColumnData=k.getColumnData;c.setColumnData=k.setColumnData;c.updateData=k.update;c.refresh=k.refresh;c.data=k[_$_519c[51]];c.download=k.download;c.copy=k.copy;c.paste=k.paste;
|
|
185
|
+
c.cut=function(){return c.copy(!0)}};k[_$_519c[51]]=function(c,b,a){!0===c&&(c=this.getHighlighted());for(var d=c?!0:!1,e,f=[],g=this.options.columns.length,h=this.options.data.length,l,n=this.dataType&&typeof a==_$_519c[13]?1:0,p=0;p<h;p++){l=null;e=n?{}:[];for(var q=0;q<g;q++){var r;if(!(r=!d)){r=c[1];var w=c[2],m=c[3];r=q>=c[0]&&q<=w&&p>=r&&p<=m?!0:!1}if(r&&(!d||!this.results||-1!=this.results.indexOf(p))){r=K.call(this,q,p);if(b){if(d&&!1===this.rows[p].visible)continue;l=aa.processed.call(this,
|
|
186
|
+
q,p);void 0!==l&&(r=l)}a&&r.match&&(r.match(a)||r.match(/\n/)||r.match(/"/))&&(r=r.replace(new RegExp(_$_519c[187],_$_519c[188]),_$_519c[189]),r=_$_519c[187]+r+_$_519c[187]);n?jSuites.path.call(e,_$_519c[3]+V.call(this,q),r):e.push(r);l=!0}}l&&(a?f.push(e.join(a)):f.push(e))}return a?f.join(_$_519c[10])+_$_519c[10]:f};k.parse=function(){for(var c,b={},a=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)c=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_519c[84])&&(typeof f[g].id==
|
|
187
|
+
_$_519c[14]&&(c=parseInt(f[g].id)),typeof f[g].row==_$_519c[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>a&&(a=d),c&&(b[d]=c);if(Object.keys(e).length)for(g=0;g<=a;g++)e[g]&&(f[g]=e[g]);a=this.getPrimaryKey();if(!1!==a)for(a=V.call(this,a),g=0;g<f.length;g++)b[g]||!1===a||(c=parseInt(f[g][a]),0<c&&(b[g]=c));return b};k.type=function(){for(var c=this.dataType=0;c<this.options.columns.length;c++)typeof this.options.columns[c].name!==_$_519c[13]&&(this.dataType=1)};k[_$_519c[11]]=function(c){c=k.standardize(c);
|
|
188
|
+
var b={},a=[],d={};var e=Object.keys(c[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=c.length-this.options.data.length;0<f&&this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===c[g]&&(c[g]={row:g,data:[]});for(var h=0;h<this.options.columns.length;h++)c[g].data[h]||(c[g].data[h]=_$_519c[3])}for(h=0;h<this.options.columns.length;h++){var l=V.call(this,h);d[l]=h}for(g=0;g<c.length;g++){f=c[g].row;l=Object.keys(c[g].data);for(h=0;h<l.length;h++)e=null,void 0!==
|
|
189
|
+
d[l[h]]?e=d[l[h]]:-1<l[h]&&(e=parseInt(l[h])),null!==e&&a.push({x:e,y:f,value:c[g].data[l[h]]});c[g].id&&(b[f]=c[g].id)}pa.setId.call(this,b);aa[_$_519c[11]].call(this,a,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var c=k.parse.call(this),b=this.options.data.length;this.options.minDimensions[1]>b&&(b=this.options.minDimensions[1]);for(var a=0;a<b;a++){var d=c[a]?c[a]:null;ka.row.call(this,a,d)}}};k.load=function(c){this.resetBorders();
|
|
190
|
+
this.resetSelection();this.tbody.innerText=_$_519c[3];this.options.data=c;k.build.call(this);C.call(this)};k.refresh=function(c){if(typeof c!==_$_519c[13])for(var b=0;b<this.options.columns.length;b++){var a=this.records[c]&&this.records[c][b].element?this.records[c][b].element:null,d=Z[_$_519c[51]].call(this,b,c);typeof d[0].updateCell==_$_519c[85]&&d[0].updateCell(a,K.call(this,b,c),b,c,this,d[1]);a&&I.applyOverflow.call(this,a,b,c)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&
|
|
191
|
+
jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_519c[59],dataType:_$_519c[60],success:function(f){e.setData(f);jSuites.loading.hide()}})}};k.getRowData=function(c,b){if(typeof this.options.data[c]===_$_519c[13])return!1;if(b){if(this.dataType){b={};for(var a=0;a<this.options.columns.length;a++){var d=_$_519c[3]+V.call(this,a),e=_$_519c[3]+aa.processed.call(this,a,c,!0);jSuites.path.call(b,d,e)}}else for(b=[],a=0;a<this.options.columns.length;a++)b.push(aa.processed.call(this,a,
|
|
192
|
+
c,!0));return b}return JSON.parse(JSON.stringify(this.options.data[c]))};k.setRowData=function(c,b,a){for(var d=[],e=0;e<this.options.columns.length;e++)typeof b[e]===_$_519c[13]&&(b[e]=_$_519c[3]),d.push({x:e,y:c,value:b[e]});d.length&&this.setValue(d,null,a)};k.getColumnData=function(c,b){if(typeof this.options.columns[c]===_$_519c[13])return!1;for(var a=[],d=0;d<this.options.data.length;d++){var e=b?aa.processed.call(this,c,d,!0):K.call(this,c,d);a.push(e)}return a};k.setColumnData=function(c,
|
|
193
|
+
b,a){for(var d=[],e=0;e<this.rows.length;e++)typeof b[e]===_$_519c[13]&&(b[e]=_$_519c[3]),d.push({x:c,y:e,value:b[e]});d.length&&this.setValue(d,null,a)};k.copy=function(c){var b=this,a=this.getHighlighted(),d=function(){b.setBorder(a[0],a[1],a[2],a[3],_$_519c[127]);b.borders.copying.clear=1==c?!0:!1},e=k[_$_519c[51]].call(this,a,!0,_$_519c[190]),f=B.call(this.parent,_$_519c[191],this,a,e);if(f)e=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(d):(this.parent.textarea.value=
|
|
194
|
+
e,this.parent.textarea.select(),document.execCommand(_$_519c[192]),d());return e};k.paste=function(c,b,a){if(!N.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&(d.resetBorders(_$_519c[127],!0),d.borders.copying.clear=!1)},f=a,g=null,h=this.options.style,l=null,n=null,p=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];l=q[0];n=q[1];var r=jSuites.hash(a),w=jSuites.hash(k[_$_519c[51]].call(this,
|
|
195
|
+
q,!0,_$_519c[190]));if(r!=w)e();else{var m=0,v=0;a=k[_$_519c[51]].call(this,q,!1,!1);for(r=q[1];r<=q[3];r++)if(!this.results||-1!=this.results.indexOf(r)){p[v]=[];m=0;for(w=q[0];w<=q[2];w++)g=A.getColumnNameFromCoords(w,r),p[v][m]=h&&h[g]?h[g]:_$_519c[193],m++;v++}}}c=parseInt(c);b=parseInt(b);100<f.length&&!this.options.pagination&&!C.limited.call(this)&&console.log(_$_519c[194]);if(r=B.call(this.parent,_$_519c[195],this,a,c,b,p,f))a=r;else if(!1===r)return!1;if(a){Array.isArray(a)||(a=A.parseCSV(a,
|
|
196
|
+
_$_519c[190]));if(f=this.getHighlighted()){g=[];m=[];v=[];h=[];var u=0,x=0;for(r=f[1];r<=f[3];r++)if(!this.results||-1!=this.results.indexOf(r)){g=[];m=[];for(w=f[0];w<=f[2];w++)g.push(a[x][u]),p&&p[x]&&p[x][u]?m.push(p[x][u]):m.push(_$_519c[3]),u++,u>=a[0].length&&(u=0);v.push(g);h.push(m);x++;x>=a.length&&(x=0)}0==v.length%a.length&&0==v[0].length%a[0].length&&(a=v,p=h)}h=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(r=q[1];r<=q[3];r++)for(w=q[0];w<=q[2];w++)(!this.results||
|
|
197
|
+
this.results&&0<=this.results.indexOf(r))&&f.push({x:w,y:r,value:_$_519c[3],style:_$_519c[3]});e()}r=c+a[0].length-this.options.columns.length;0<r&&this.insertColumn(r);r=b+a.length-this.rows.length;0<r&&this.insertRow(r);m=g=c;u=v=b;x=null;this.results&&(h=this.results.indexOf(b));for(r=0;r<a.length;r++)for(w=0;w<a[r].length;w++){null!==l&&null!==n&&a[r][w][0]==_$_519c[12]&&(a[r][w]=S.shiftFormula(a[r][w],c-l,b-n));m=c+w;u=b+r;this.results&&(u=this.results[h+r]);var y={x:m,y:u,value:a[r][w]};p&&
|
|
198
|
+
p[r]&&p[r][w]&&(y.style=p[r][w]);f.push(y);null===x&&va.isSelected.call(this,m,u,q)&&(x=!0)}x&&e();f.length&&(aa[_$_519c[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),B.call(this.parent,_$_519c[196],this,f),this.updateSelectionFromCoords(g,v,m,u))}};k.download=function(c,b){if(this.parent.config.allowExport){void 0===b&&(b=!0);var a=_$_519c[3];if(1==c||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_519c[132])+_$_519c[10];a+=k[_$_519c[51]].call(this,
|
|
199
|
+
null,b,this.options.csvDelimiter);b=new Blob([_$_519c[198]+a],{type:_$_519c[199]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(b,this.options.csvFileName+_$_519c[200]):(c=document.createElement(_$_519c[201]),b=URL.createObjectURL(b),c.href=b,c.setAttribute(_$_519c[202],this.options.csvFileName+_$_519c[200]),document.body.appendChild(c),c.click(),c.parentNode.removeChild(c))}else console.error(_$_519c[197])};k.standardize=function(c){c||(c=[]);Array.isArray(c)||
|
|
200
|
+
(c=[c]);void 0==c[0]||Array.isArray(c[0])||typeof c[0]==_$_519c[84]||(c=[c]);for(var b=0;b<c.length;b++){var a={};Array.isArray(c[b])||void 0==c[b].data?a.data=c[b]:a=c[b];a.row=void 0==c[b].row?b:c[b].row;c[b]=a}return c};return k}(),Ra=function(){var k=function(c){c.getLabel=k[_$_519c[51]];c.getLabelFromCoords=k[_$_519c[51]]};k[_$_519c[51]]=function(c,b,a){if(typeof c==_$_519c[17]){c=A.getCoordsFromColumnName(c);var d=c[0];b=c[1]}else d=c;return this.getProcessed(d,b,a)};return k}(),Ea=function(){var k=
|
|
201
|
+
function(c){c.getDefinedNames=k[_$_519c[51]];c.setDefinedNames=k[_$_519c[11]]};k[_$_519c[11]]=function(c){var b=Object.keys(c);if(b.length){for(var a=0;a<b.length;a++)this.parent.config.definedNames[b[a]]=c[b[a]];G.call(this,_$_519c[203],[c])}};k[_$_519c[51]]=function(c){var b=this.parent.config.definedNames;return c?b[c]:b};k.updateAll=function(c,b){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var h=S.update.call(this,
|
|
202
|
+
a[e[g]],c,b,f);h!==a[e[g]]&&(d[e[g]]=h)}k[_$_519c[11]].call(this,d)}}};k.updateWorksheetName=function(c,b){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=0;f<e.length;f++){var g=S.updateWorksheetName(a[e[f]],c,b);g!==a[e[f]]&&(d[e[f]]=g)}k[_$_519c[11]].call(this,d)}}};return k}(),fa=function(){var k=[_$_519c[204],_$_519c[205],_$_519c[206],_$_519c[207],_$_519c[208]],c=[_$_519c[185],_$_519c[151],_$_519c[209],_$_519c[210],_$_519c[211],_$_519c[212],_$_519c[1],
|
|
203
|
+
_$_519c[213],_$_519c[25],_$_519c[214],_$_519c[12],_$_519c[215],_$_519c[216]],b=[],a=function(){if(0<b.length){for(var f=0;f<b.length;f++)da.destroy.call(this,b[f]);b=[]}},d=function(f){a.call(this);for(var g=0,h=[],l,n=0;n<f.children.length;n++)if(l=f.children[n].getAttribute(_$_519c[217])){h[l]||(h[l]=k[g++],4<g&&(g=0));f.children[n].style.color=h[l];if(-1===l.indexOf(_$_519c[135])){if(0<=l.indexOf(_$_519c[136])){var p=l.split(_$_519c[136]),q=A.getCoordsFromColumnName(p[0]);p=A.getCoordsFromColumnName(p[1])}else p=
|
|
204
|
+
q=A.getCoordsFromColumnName(l);va[_$_519c[11]].call(this,q[0],q[1],p[0],p[1],null,l,h[l])}b.push(l)}},e=function(f,g){f.classList.add(_$_519c[92]);f.classList.add(_$_519c[218]);f.classList.add(_$_519c[219]);f.classList.add(_$_519c[220]);f.setAttribute(_$_519c[221],!0);f.onclick=function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$_519c[222]))};f.onblur=function(){f.worksheet&&
|
|
205
|
+
(a.call(f.worksheet),typeof f.onchange==_$_519c[85]&&f.onchange.call(f),f.worksheet=null)};f.onchange=g};e.current=null;e.parse=function(f){for(var g=_$_519c[3],h=_$_519c[3],l=window.getSelection(),n=document.createRange(),p=A.getCaretIndex.call(this.parent,f),q=S.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_519c[3])),r=0;r<q.length;r++)q[r]&&S.tokenIdentifier.test(q[r].trim())?(r==q.length-1&&(h=_$_519c[223]),g+=_$_519c[224]+h+_$_519c[225]+q[r].trim().replace(/\$/g,_$_519c[3])+_$_519c[226]+q[r]+
|
|
206
|
+
_$_519c[227]):g+=q[r];f.innerHTML=g;g=null;for(r=0;r<f.childNodes.length&&!(g=f.childNodes[r],h=g.tagName?g.innerText.length:g.length,0>=p-h);r++)p-=h;g&&(g.tagName?n.setStart(g.firstChild,p):n.setStart(g,p),l.removeAllRanges(),l.addRange(n));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$_519c[92]):e.current&&(typeof e.current.onchange==_$_519c[85]&&e.current.onchange.call(e.current),e.current.classList.remove(_$_519c[222]),e.current.worksheet=null,e.current=null)};e.getName=
|
|
207
|
+
function(f,g,h,l,n){f=A.getColumnNameFromCoords(f,g);h=A.getColumnNameFromCoords(h,l);n.ctrlKey&&(f=h);return f!==h?(n=f+_$_519c[136]+h,n=S.getTokensFromRange.call(this,n),S.getRangeFromTokens.call(this,n)):f};e.range=function(f,g,h,l,n){e.current.getAttribute(_$_519c[228])==_$_519c[229]&&(f=h,g=l);f=e.getName.call(this,f,g,h,l,n);g=document.createElement(_$_519c[230]);g.innerText=f;g.setAttribute(_$_519c[217],f);e.current.innerText=_$_519c[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);
|
|
208
|
+
n.preventDefault()};e.update=function(f,g,h,l,n){var p=this,q=jSuites.getNode();if(q){var r=e.getName.call(this,f,g,h,l,n);f=function(w){var m=document.createElement(_$_519c[230]);m.innerText=r;m.setAttribute(_$_519c[217],r);q.parentNode===p.parent.input&&!1===w?q.parentNode.insertBefore(m,q.nextSibling):p.parent.input.appendChild(m);q=m};if(q.getAttribute(_$_519c[217]))n.ctrlKey?(p.parent.input.appendChild(document.createTextNode(_$_519c[25])),f(!0)):(q.innerText=r,q.setAttribute(_$_519c[217],r));
|
|
209
|
+
else{if(q.innerText!==_$_519c[3]&&-1==c.indexOf(q.innerText.slice(-1))||q.nextElementSibling&&q.nextElementSibling.getAttribute(_$_519c[217]))return!1;f(!1)}jSuites.focus(q);d.call(p,p.parent.input);n.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_519c[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),
|
|
210
|
+
document.execCommand(_$_519c[192]))}else if(36==f.which){var g=window.getSelection(),h=document.createRange();h.setStart(f.target,0);g.removeAllRanges();g.addRange(h)}else 35==f.which?jSuites.focus(f.target):187==f.which&&!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_519c[3])&&f.target.getAttribute(_$_519c[94])&&f.target.removeAttribute(_$_519c[94])};return e}(),S=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),c=function(h){h=b(h);for(var l=[_$_519c[185],
|
|
211
|
+
_$_519c[151],_$_519c[209],_$_519c[210],_$_519c[211],_$_519c[231]],n=[_$_519c[212],_$_519c[232],_$_519c[1],_$_519c[2],_$_519c[213],_$_519c[233],_$_519c[25],_$_519c[214],_$_519c[12],_$_519c[215],_$_519c[216]],p=_$_519c[3],q=[],r=0,w=0;w<h.length;w++){if(h[w]==_$_519c[187]||h[w]==_$_519c[133])r=0==r?1:0;0==r&&(-1<l.indexOf(h[w])||-1<n.indexOf(h[w]))?(p&&(q.push(p),p=_$_519c[3]),q.push(h[w])):p+=h[w]}p&&q.push(p);for(w=0;w<q.length;w++)-1==q[w].indexOf(_$_519c[187])&&-1==q[w].indexOf(_$_519c[133])&&(q[w]=
|
|
212
|
+
q[w].replace(/\s/g,_$_519c[3]));return q},b=function(h,l){for(var n=_$_519c[3],p=0,q=[_$_519c[12],_$_519c[135],_$_519c[216],_$_519c[215]],r=0;r<h.length;r++)h[r]==_$_519c[187]&&(p=0==p?1:0),1==p?n+=h[r]:(n+=h[r].toUpperCase(),1==l&&0<r&&h[r]==_$_519c[12]&&-1==q.indexOf(h[r-1])&&-1==q.indexOf(h[r+1])&&(n+=_$_519c[12]));return n},a=function(h){h.setFormula=a[_$_519c[11]];h.executeFormula=a.execute;h.formula=[]};a.run=function(h,l){var n=_$_519c[3],p=Object.keys(l);if(p.length){for(var q={},r=0;r<p.length;r++){var w=
|
|
213
|
+
p[r].replace(/!/g,_$_519c[27]);0<w.indexOf(_$_519c[27])&&(w=w.split(_$_519c[27]),q[w[0]]=!0)}w=Object.keys(q);for(r=0;r<w.length;r++)n+=_$_519c[234]+w[r]+_$_519c[235];for(r=0;r<p.length;r++)w=p[r].replace(/!/g,_$_519c[27]),jSuites.isNumeric(l[p[r]])||(q=l[p[r]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(l[p[r]]=e(q,l[p[r]])),n=0<w.indexOf(_$_519c[27])?n+(w+_$_519c[236]+l[p[r]]+_$_519c[237]):n+(_$_519c[234]+w+_$_519c[236]+l[p[r]]+_$_519c[237])}h=h.replace(/\$/g,
|
|
214
|
+
_$_519c[3]);(q=h.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(h=e(q,h));h=h.replace(/!/g,_$_519c[27]);return(new Function(n+_$_519c[238]+h))()};a[_$_519c[11]]=function(){};var d=function(h){h=b(h,!0);return h.replace(/\$/g,_$_519c[3])},e=function(h,l){for(var n=0;n<h.length;n++){var p=a.getTokensFromRange.call(this,h[n]);l=l.replace(h[n],_$_519c[213]+p.join(_$_519c[25])+_$_519c[233])}return l},f=function(h,l,n){for(var p=this.config.definedNames,q=0;q<h.length;q++)h[q]&&
|
|
215
|
+
p&&p[h[q]]&&(l=l.replace(h[q],p[h[q]]),n&&(n[h[q]]=p[h[q]]));return d(l)},g=function(h,l){var n;if(n=this.records[l][h].a)for(var p=0;p<n.length;p++)for(var q=0;q<n[p].length;q++)n[p][q]&&(n[p][q].innerText=_$_519c[3],this.records[l+p][h+q].v=_$_519c[3]);this.records[l][h].a=[]};a.execute=function(h,l,n,p,q){if(1==this.parent.processing)return null!==l&&null!==n&&this.parent.queue.push([this,l,n]),_$_519c[3];var r=[],w=function(H,L,E,ba){if(void 0!=L&&void 0!=E){var ra=A.getColumnNameFromCoords(L,
|
|
216
|
+
E);E=ba.getWorksheetName()+_$_519c[27]+ra;r[E]||(r[E]=0);r[E]++;if(3<r[E])throw{error:_$_519c[239],message:_$_519c[240],reference:E};}else ra=null;q||(H=d(H));var J=H,U=J.match(/[A-Z_]+[A-Z0-9_\.]*/g);U&&U.length&&(J=f.call(ba.parent,U,J,m));(U=J.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&U.length&&(J=e.call(ba,U,J));U=[];J=c(J);for(var R=0;R<J.length;R++)J[R]&&k.test(J[R])&&U.push(J[R]);if(U){if(-1<U.indexOf(ra))throw{error:_$_519c[241],message:_$_519c[242]};for(J=0;J<
|
|
217
|
+
U.length;J++){R=U[J].split(_$_519c[135]);R[1]?(L=R[1],R=D(R[0]),E=ba.getWorksheetName()+_$_519c[27]+ra):(L=R[0],R=ba,E=ra);if(typeof R==_$_519c[13]||typeof R.formula==_$_519c[13])throw{error:_$_519c[243],message:_$_519c[244]};E&&(R.formula[L]||(R.formula[L]=[]),0>R.formula[L].indexOf(E)&&R.formula[L].push(E));if(!m[U[J]]){E=A.getCoordsFromColumnName(L);L=E[0];E=E[1];var oa=void 0!==R.records[E][L].v?R.records[E][L].v:K.call(R,L,E);m[U[J]]||((_$_519c[3]+oa).substr(0,1)==_$_519c[12]?m[U[J]]=w(oa,L,
|
|
218
|
+
E,R):(oa?oa!=Number(oa)&&(oa=_$_519c[187]+oa+_$_519c[187]):oa=0,m[U[J]]=oa))}}}return H.substr(1)},m={};try{if(h=w(h,l,n,this)){var v=q?a.run(h,m):t.formula(h,m,l,n,this);if(!1!==p&&void 0!=l&&void 0!=n)if(v instanceof Date)this.records[n][l].v=jSuites.calendar.dateToNum(v);else if(Array.isArray(v)){g.call(this,l,n);p=[];for(var u=null,x=0;x<v.length;x++)for(var y=0;y<v[x].length;y++)null===u&&(0<x&&x>y&&this.options.data[n+x][l+y]?u=_$_519c[245]:(this.records[n+x][l+y].v=v[x][y],this.records[n+x][l+
|
|
219
|
+
y].element&&(p[x]||(p[x]=[]),p[x][y]=this.records[n+x][l+y].element,this.records[n+x][l+y].element.innerText=v[x][y])));null===u?(u=v[0][0],this.records[n][l].a=p):g.call(this,l,n);v=this.records[n][l].v=u}else this.records[n][l].v=v;return v}}catch(H){return 1==this.parent.config.debugFormulas&&console.log(h,m,H),H&&H.error?H.error:_$_519c[243]}};a.update=function(h,l,n,p){var q=null,r=null,w=function(u){n&&n[u]&&(u=_$_519c[246]);l[u]&&(u=l[u]);return u};h=b(h,!0);h=c(h);for(var m=0;m<h.length;m++)if(h[m]&&
|
|
220
|
+
k.test(h[m])){if(-1==h[m].indexOf(_$_519c[135])){if(r=h[m],q=_$_519c[3],p)continue}else if(r=h[m].split(_$_519c[135]),q=r[0],r=r[1],p!=q)continue;if(0<=r.indexOf(_$_519c[136])){r=a.getTokensFromRange.call(this,r);for(var v=0;v<r.length;v++)r[v]=w(r[v]);r=a.getRangeFromTokens.call(this,r)}else-1==r.indexOf(_$_519c[247])?r=w(r):(r=w(r.replace(/\$/g,_$_519c[3])),r=_$_519c[247]+r.match(/[A-Z]+/g)+_$_519c[247]+r.match(/[0-9]+/g));q&&(r=q+_$_519c[135]+r);h[m]=r}return h.join(_$_519c[3])};a.getChain=function(h){if(void 0===
|
|
221
|
+
h)return[];var l=[],n=[],p=[],q=function(m){if(0<=m.indexOf(_$_519c[27])){var v=m.split(_$_519c[27]),u=v[0],x=v[1];v=D(v[0])}else v=this,u=v.getWorksheetName(),x=m;if(v.formula[x]&&!p[m]){var y=!1;p[m]=!0;for(m=0;m<v.formula[x].length;m++){var H=v.formula[x][m];-1==H.indexOf(_$_519c[27])&&(H=u+_$_519c[27]+H);if(!n[H]){var L=v.getValue(H);M(L)?l.push([H,L,a.getTokens.call(v,L,u)]):(y=!0,v.formula[x][m]=null);q.call(v,H);n[H]=!0}}1==y&&(v.formula[x]=v.formula[x].filter(function(E){return null!=E}))}},
|
|
222
|
+
r=Object.keys(h);for(h=0;h<r.length;h++)q.call(this,r[h]);r=0;for(h=l.length-1;0<=h;h--){for(var w=0;w<h;w++)if(0<=l[w][2].indexOf(l[h][0])){l.splice(w,0,l.splice(h,1)[0]);h=l.length;break}r++;if(1E6<r){console.error(_$_519c[248]);break}}n=[];for(h=0;h<l.length;h++)n[l[h][0]]=l[h][1];return n};a.updateAll=function(h,l){var n,p;Ea.updateAll.call(this,h,l);var q=Object.keys(this.formula);var r=[];var w=[];for(n=0;n<q.length;n++){var m=q[n];var v=this.formula[m];if(l&&l[m])for(var u=0;u<v.length;u++)h[v[u]]&&
|
|
223
|
+
(v[u]=h[v[u]]),w[v[u]]=!0;else{var x=[];for(u=0;u<v.length;u++)l&&l[v[u]]||(h[v[u]]&&(v[u]=h[v[u]]),w[v[u]]=!0,x.push(v[u]));x.length&&(h[m]&&(m=h[m]),r[m]=x)}}this.formula=r;x=this.getWorksheetName();for(var y=0;y<t.spreadsheet.length;y++)for(var H=t.spreadsheet[y].worksheets,L=0;L<H.length;L++)if(H[L].getWorksheetName()!==x)for(q=Object.keys(H[L].formula),n=0;n<q.length;n++){r=[];v=H[L].formula[q[n]];for(u=0;u<v.length;u++)m=v[u].split(_$_519c[27]),m[0]==x&&m[1]?l&&l[m[1]]||(h[m[1]]&&(m[1]=h[m[1]]),
|
|
224
|
+
r.push(m[0]+_$_519c[27]+m[1])):r.push(v[u]);H[L].formula[q[n]]=r}q=[];m=Object.keys(w);for(u=0;u<m.length;u++)0<=m[u].indexOf(_$_519c[27])?(v=m[u].split(_$_519c[27]),r=D(v[0]),n=v[1],x=this.getWorksheetName(),v=v[0]):(r=this,n=m[u],x=null,v=this.getWorksheetName()),(p=r.getValue(n))&&M(p)&&(r=a.update.call(r,p,h,l,x),r!=p&&(w[m[u]]=r,n=A.getCoordsFromColumnName(n),q[v]||(q[v]=[]),q[v].push({x:n[0],y:n[1],value:r,force:!0})));m=Object.keys(q);for(h=0;h<m.length;h++)r=D(m[h]),q[m[h]]=aa.applyValues.call(r,
|
|
225
|
+
q[m[h]]),aa.setValueChained.call(r,q[m[h]]),G.call(r,_$_519c[107],{data:q[m[h]]})};a.updateWorksheetName=function(h,l,n){for(var p=c(h),q=0;q<p.length;q++)h=p[q].split(_$_519c[135]),h[1]&&(h[0]=h[0].replace(new RegExp(_$_519c[133],_$_519c[188]),_$_519c[3]),h[0].toUpperCase()==l.toUpperCase()&&(h[0]=n,0<=h[0].indexOf(_$_519c[132])&&(h[0]=_$_519c[133]+h[0]+_$_519c[133]),p[q]=h.join(_$_519c[135])));return p.join(_$_519c[3])};a.updateWorksheetNames=function(h,l){for(var n,p,q=0;q<t.spreadsheet.length;q++)for(var r=
|
|
226
|
+
[],w=t.spreadsheet[q].worksheets,m=0;m<w.length;m++){for(var v=0;v<w[m].options.data.length;v++)for(var u=0;u<w[m].options.data[v].length;u++)(n=w[m].options.data[v][u])&&M(n)&&(p=a.updateWorksheetName(n,h,l),p!=n&&r.push({x:u,y:v,value:p,force:!0}));r=aa.applyValues.call(w[m],r);G.call(w[m],_$_519c[107],{data:r})}};a.shiftFormula=function(h,l,n){var p=c(h,!0);h=function(m){if(-1==m.indexOf(_$_519c[135])){m=A.getCoordsFromColumnName(m);var v=_$_519c[3]}else v=p[q].split(_$_519c[135]),m=A.getCoordsFromColumnName(v[1]),
|
|
227
|
+
v=v[0]+_$_519c[135];var u=m[0]+l;m=m[1]+n;return m=0>u||0>m?_$_519c[246]:v+A.getColumnNameFromCoords(u,m)};for(var q=0;q<p.length;q++)if(k.test(p[q])&&-1==p[q].indexOf(_$_519c[247])){var r=-1==p[q].indexOf(_$_519c[135])?[_$_519c[3],p[q]]:p[q].split(_$_519c[135]);if(-1==r[1].indexOf(_$_519c[136]))r[1]=h(r[1]);else{var w=r[1].split(_$_519c[136]);r[1]=h(w[0])+_$_519c[136]+h(w[1])}p[q]=r[0]?r.join(_$_519c[135]):r[1]}return p.join(_$_519c[3])};a.getTokensFromRange=function(h){var l=this,n=_$_519c[3],p=
|
|
228
|
+
_$_519c[3];0<=h.indexOf(_$_519c[27])?p=_$_519c[27]:0<=h.indexOf(_$_519c[135])&&(p=_$_519c[135]);h=h.replace(/\$/g,_$_519c[3]);p&&(n=h.split(p),l=D(n[0]),h=n[1],n=n[0]+p);p=[];h=h.split(_$_519c[136]);var q=A.getCoordsFromColumnName(h[0]),r=A.getCoordsFromColumnName(h[1]);if(q[0]<=r[0]){h=q[0];var w=r[0]}else h=r[0],w=q[0];if(null===q[1]&&null==r[1]){var m=0;q=0;l.options&&l.options.data&&(q=l.options.data.length-1)}else q[1]<=r[1]?(m=q[1],q=r[1]):(m=r[1],q=q[1]);for(l=m;l<=q;l++)for(m=h;m<=w;m++)p.push(n+
|
|
229
|
+
A.getColumnNameFromCoords(m,l));return p};a.getRangeFromTokens=function(h){h=h.filter(function(p){return p!=_$_519c[246]});for(var l=_$_519c[3],n=0;n<h.length;n++)0<=h[n].indexOf(_$_519c[27])&&(l=h[n].split(_$_519c[27]),h[n]=l[1],l=l[0]);l&&(l+=_$_519c[27]);h.sort(function(p,q){p=A.getCoordsFromColumnName(p);q=A.getCoordsFromColumnName(q);return p[1]>q[1]?1:p[1]<q[1]?-1:p[0]>q[0]?1:p[0]<q[0]?-1:0});return h.length?l+(h[0]+_$_519c[136]+h[h.length-1]):_$_519c[246]};a.getTokens=function(h,l){var n=d(h);
|
|
230
|
+
h.replace(/!/g,_$_519c[27]);(h=n.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&h.length&&(n=f.call(this.parent,h,n));(h=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&h.length&&(n=e.call(this,h,n));h=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(n=0;n<h.length;n++)-1==h[n].indexOf(_$_519c[27])&&l&&(h[n]=l+_$_519c[27]+h[n]);return h};a.tokenIdentifier=k;a.tokenize=c;return a}(),aa=function(){var k=function(c){c.name=V;c.value=K;c.getValue=k[_$_519c[51]];c.getValueFromCoords=
|
|
231
|
+
k.getFromCoords;c.setValue=k[_$_519c[11]];c.setValueFromCoords=k.setFromCoords;c.setCheckRadioValue=k.setCheckRadio;c.getProcessed=k.processed};k[_$_519c[51]]=function(c,b){var a=this;if(typeof c==_$_519c[84]){var d=c.x;c=c.y}else 0<=c.indexOf(_$_519c[27])&&(a=c.split(_$_519c[27]),c=a[1],a=D(a[0])),c=A.getCoordsFromColumnName(c),d=c[0],c=c[1];return k.getFromCoords.call(a,d,c,b)};k.getFromCoords=function(c,b,a){var d=null;null!=c&&null!=b&&(d=a?k.processed.call(this,c,b):K.call(this,c,b));return d};
|
|
232
|
+
k[_$_519c[11]]=function(c,b,a){if(!N.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,q){var r=null;typeof p==_$_519c[17]?(f=A.getCoordsFromColumnName(p),d=f[0],e=f[1]):p.tagName?(d=p.getAttribute(_$_519c[42]),e=p.getAttribute(_$_519c[43])):p.element&&p.element.tagName?(d=p.element.getAttribute(_$_519c[42]),e=p.element.getAttribute(_$_519c[43])):(d=p.x,e=p.y,void 0!==p.value&&(q=p.value),void 0!==p.style&&(r=p.style));p={x:d,y:e,value:q,force:a};null!==r&&(p.style=
|
|
233
|
+
r);g.push(p)};if(c&&Array.isArray(c))for(var l=0;l<c.length;l++)h(c[l],b);else if(typeof c==_$_519c[84]&&void 0==c.x&&void 0==c.tagName)for(b=Object.keys(c),l=0;l<b.length;l++)h(b[l],c[b[l]]);else h(c,b);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,g);T.update.call(this,!0);this.refreshBorders();var n=this;setTimeout(function(){da.refresh.call(n)},250);if(g.length){Q.call(this.parent,{worksheet:n,action:_$_519c[79],records:g,selection:this.selectedCell});
|
|
234
|
+
c=this.getPrimaryKey();if(!1!==c)for(l=0;l<g.length;l++)g[l].x===c&&g[l].value&&O.call(this,g[l]);G.call(this,_$_519c[79],{data:g});B.call(this.parent,_$_519c[249],this,g)}}};k.setFromCoords=function(c,b,a,d){var e=[];e.push({x:c,y:b,value:a});k[_$_519c[11]].call(this,e,null,d)};k.setCheckRadio=function(){for(var c=[],b=this.getSelected(),a=0;a<b.length;a++){var d=b[a].x,e=b[a].y;if(!this.options.columns[d].readOnly&&this.options.columns[d].type==_$_519c[250]){var f=K.call(this,d,e)?!1:!0;c.push({x:d,
|
|
235
|
+
y:e,value:f})}}c.length&&k[_$_519c[11]].call(this,c)};k.applyValues=function(c){for(var b,a,d=this.options.style||{},e=[],f={},g=0;g<c.length;g++)if(b=c[g],a=this.updateCell(b.x,b.y,b.value,b.force),void 0!==a.value){if(void 0!==b.style){var h=A.getColumnNameFromCoords(b.x,b.y);a.style=f[h]=b.style;a.oldStyle=d&&d[h]?d[h]:_$_519c[193]}e.push(a)}0<Object.keys(f).length&&Ma.update.call(this,f);return e};k.processed=function(c,b,a){var d=K.call(this,c,b);if(null===d)return null;var e=Z[_$_519c[51]].call(this,
|
|
236
|
+
c,b),f=e[1];f.type!=_$_519c[49]&&f.type!=_$_519c[251]&&f.type!=_$_519c[252]&&f.type!=_$_519c[253]&&f.type!=_$_519c[254]&&0!=f.process&&(!0===a||f.type!=_$_519c[255]&&f.type!=_$_519c[256]&&f.type!=_$_519c[257])&&(f.type==_$_519c[250]?d=e[0][_$_519c[51]](f,d,a):this.records[b][c].element?d=1==this.parent.config.stripHTML?this.records[b][c].element.innerText:this.records[b][c].element.innerHTML:((_$_519c[3]+d).substr(0,1)==_$_519c[12]&&(d=this.executeFormula(d,c,b,!1)),e[0]&&typeof e[0][_$_519c[51]]==
|
|
237
|
+
_$_519c[85]&&(d=e[0][_$_519c[51]](f,d,a))));return d};k.setValueChained=function(c){for(var b,a=[],d,e=0;e<c.length;e++)b=c[e],d=A.getColumnNameFromCoords(b.x,b.y),a[d]=b.value;a=S.getChain.call(this,a);c=Object.keys(a);for(e=0;e<c.length;e++)0<=c[e].indexOf(_$_519c[27])?(b=c[e].split(_$_519c[27]),d=b[1],b=D(b[0])):(d=c[e],b=this),d=A.getCoordsFromColumnName(d),I.update.call(b,d[0],d[1],a[c[e]],!0)};return k}(),I=function(){var k=function(c){c.getCell=k[_$_519c[51]];c.getCellFromCoords=k[_$_519c[51]];
|
|
238
|
+
c.updateCell=k.update;c.updateCells=k.updateAll;c.getSelected=k.selected;c.getCells=k.getCells;c.setCells=k.setCells;c.isAttached=k.attached};k.attached=function(c,b){return this.records[b]&&this.records[b][c]&&this.records[b][c].element&&this.records[b][c].element.parentNode&&this.records[b][c].element.parentNode.parentNode?!0:!1};k[_$_519c[51]]=function(c,b,a){typeof c==_$_519c[17]&&(b=A.getCoordsFromColumnName(c),c=b[0],b=b[1]);c=parseInt(c);b=parseInt(b);if(this.records[b]&&this.records[b][c]&&
|
|
239
|
+
this.records[b][c].element)return this.records[b][c].element;var d=K.call(this,c,b);null===d&&(d=_$_519c[3]);return I.create.call(this,c,b,d,a)};k.getFromCoords=function(c,b,a){if(!c)return null;var d=[],e=c[0],f=c[1],g=c[2];c=c[3];for(a&&(a=this.results?A.invert(this.results):null);f<=c;f++)for(var h=e;h<=g;h++)if(!a||a[f])b?d.push(A.getColumnNameFromCoords(h,f)):d.push(this.records[f][h]);return d};k.selected=function(c,b){return k.getFromCoords.call(this,this.getHighlighted(),c,b)};k.getSelectedColumns=
|
|
240
|
+
function(){var c=[],b=this.getHighlighted();if(b)for(var a=b[0];a<=b[2];a++)c.push(a);return c};k.updateAll=function(c){for(var b=this.getPrimaryKey(),a=[],d=0;d<c.length;d++)void 0!==c[d].id?(O.call(this,c[d]),a.push({id:c[d].id,y:c[d].y}),!1!==b&&k.update.call(this,b,c[d].y,c[d].id,!0)):a.push(k.update.call(this,c[d].x,c[d].y,c[d].value,c[d].force));G.call(this,_$_519c[106],[a])};k.update=function(c,b,a,d){var e=this.records[b];if(e=e&&e[c]?e[c]:null)if(e=e.element,!d&&e&&1==e.classList.contains(_$_519c[18]))d=
|
|
241
|
+
{x:c,y:b};else{d=B.call(this.parent,_$_519c[258],this,e,c,b,a);void 0!==d&&(a=d);d=Z[_$_519c[51]].call(this,c,b);typeof d[0].updateCell==_$_519c[85]&&(d=d[0].updateCell(e,a,c,b,this,d[1]),void 0!==d&&(a=d));d={x:c,y:b};var f=K.call(this,c,b);f!==a&&(a=K.call(this,c,b,a),d.oldValue=f,d.value=a,e&&k.applyOverflow.call(this,e,c,b),B.call(this.parent,_$_519c[259],this,e,c,b,d.value,d.oldValue))}else return!1;return d};k.create=function(c,b,a,d){var e=document.createElement(_$_519c[147]);e.setAttribute(_$_519c[42],
|
|
242
|
+
c);e.setAttribute(_$_519c[43],b);var f=Z[_$_519c[51]].call(this,c,b);f[0]&&typeof f[0].createCell==_$_519c[85]&&(f=f[0].createCell(e,a,c,b,this,f[1]),void 0!==f&&(a=f));K.call(this,c,b,a);this.records[b][c]||ka.cell.call(this,c,b,a);this.records[b][c].element=e;!a&&this.records[b][c].v&&(e.innerText=this.records[b][c].v);k.applyProperties.call(this,e,c,b,d);k.applyOverflow.call(this,e,c,b);B.call(this.parent,_$_519c[260],this,e,c,b,a);return e};k.getAttributes=function(c,b,a){a[c]||(a[c]={});c==_$_519c[261]?
|
|
243
|
+
a[c][b]=this.getValue(b):c==_$_519c[262]?this.merged.cells&&(b=this.merged.cells[b])&&(a[c][b]=this.options.mergeCells[b]):this.options[c]&&this.options[c][b]&&(a[c][b]=this.options[c][b])};k.setAttributes=function(c){c&&c.style&&this.setStyle(c.style);c&&c.comments&&this.setComments(c.comments);c&&c.meta&&this.setMeta(c.meta);c&&c.cells&&this.setCells(c.cells);c&&c.mergeCells&&this.setMerge(c.mergeCells);c&&c.values&&k.batch.call(this,c.values);c&&c.formulas&&k.batch.call(this,c.formulas,!0)};k.applyProperties=
|
|
244
|
+
function(c,b,a,d){if(!d){d=A.getColumnNameFromCoords(b,a);var e=this.options.style,f=this.options.comments,g=this.options.cells,h=this.options.rows;if(e&&e[d]){var l=(l=c.getAttribute(_$_519c[98]))?l+(_$_519c[263]+e[d]):e[d];c.setAttribute(_$_519c[98],l)}f&&f[d]&&c.setAttribute(_$_519c[264],f[d]);g&&g[d]&&(1==g[d].readOnly&&c.classList.add(_$_519c[18]),!1===g[d].locked&&!0===this.options.selectUnLockedCells&&c.classList.add(_$_519c[265]));h&&h[a]&&1==h[a].readOnly&&c.classList.add(_$_519c[18])}f=
|
|
245
|
+
this.options.columns[b];c.style.textAlign||(c.style.textAlign=f.align?f.align:this.options.defaultColAlign);!1===this.records[a][b].readonly||1!=this.records[a][b].readonly&&1!=f.readOnly&&1!=f.readonly||c.classList.add(_$_519c[18])};k.applyOverflow=function(c,b,a){1==this.options.textOverflow&&0<b&&(b==this.options.columns.length-1&&(c.style.overflow=_$_519c[49]),this.records[a][b-1]&&this.records[a][b-1].element&&(this.records[a][b-1].element.style.overflow=!c.innerText&&this.headers[b-1]&&this.headers[b-
|
|
246
|
+
1].offsetWidth?_$_519c[3]:_$_519c[49]))};k.batch=function(c,b){var a=[],d=Object.keys(c);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_519c[27])){var f=d[e].split(_$_519c[27]);var g=D(f[0]);var h=f[1];f=f[0]}else g=this,h=d[e],f=this.getWorksheetName();h=A.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],c[d[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==b&&(d=Object.keys(a),d.length))for(e=0;e<d.length;e++)g=D(d[e]),G.call(g,_$_519c[107],a[d[e]])};k.getCells=function(c){return c?this.options.cells[c]:
|
|
247
|
+
this.options.cells};k.setCells=function(c,b){if(!N.call(this.parent,this))return!1;if(typeof c==_$_519c[17])this.options.cells[c]=b;else{b=Object.keys(c);for(var a=0;a<b.length;a++)this.options.cells[b[a]]=c[b[a]]}};return k}(),wa=function(){var k=function(b,a){Array.isArray(a)||(a=[a]);for(var d,e=b?_$_519c[3]:_$_519c[40],f=Object.keys(a),g=0;g<f.length;g++)if(d=this.rows[a[f[g]]])d.element&&(d.element.style.display=e),d.visible=b;this.resetBorders();C.refresh.call(this)},c=function(b){b.getRow=
|
|
248
|
+
c[_$_519c[51]];b.moveRow=c.move;b.insertRow=c.add;b.deleteRow=c.del;b.getSelectedRows=c.selected;b.showRow=k.bind(b,!0);b.hideRow=k.bind(b,!1)};c[_$_519c[51]]=function(b){return this.rows[b]};c.attached=function(b){return this.rows[b]&&this.rows[b].element&&this.rows[b].element.parentNode?!0:!1};c.selected=function(b){var a=[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)b?a.push(e):a.push(this.rows[e].element);return a};c.create=function(b,a){if(this.rows[b]&&this.rows[b].element)return this.rows[b].element;
|
|
249
|
+
this.rows[b]||ka.row.call(this,b);var d=document.createElement(_$_519c[145]);d.setAttribute(_$_519c[43],b);this.rows[b].element=d;var e=null;this.options.rows[b]&&!a&&(this.options.rows[b].style&&d.setAttribute(_$_519c[98],this.options.rows[b].style),this.options.rows[b].height&&(d.style.height=parseInt(this.options.rows[b].height)+_$_519c[44]),this.options.rows[b].title&&(e=this.options.rows[b].title),0==this.options.rows[b].visible&&(this.rows[b].visible=!1),this.options.rows[b].id&&(this.rows[b].id=
|
|
250
|
+
this.options.rows[b].id));B.call(this.parent,_$_519c[266],this,b,d);0==this.rows[b].visible&&(d.style.display=_$_519c[40]);e||(e=parseInt(b+1));a=document.createElement(_$_519c[147]);a.innerHTML=e;a.setAttribute(_$_519c[43],b);a.className=_$_519c[267];d.appendChild(a);return d};c.move=function(b,a){if(!N.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.rows[a]||!this.rows[b])return console.error(_$_519c[268]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[b]?
|
|
251
|
+
d=!0:this.merged.rows[a]&&(b>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[a].element)?(d=C.renderRow.call(this,b),b>a?this.tbody.insertBefore(d,this.rows[a].element):this.tbody.insertBefore(d,this.rows[a].element.nextSibling)):this.rows[b].element&&(this.tbody.removeChild(this.rows[b].element),C.refresh.call(this));this.rows.splice(a,0,this.rows.splice(b,1)[0]);this.records.splice(a,
|
|
252
|
+
0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);G.call(this,_$_519c[67],{f:b,t:a});T.references.call(this);T.update.call(this);Q.call(this.parent,{worksheet:this,action:_$_519c[67],oldValue:b,newValue:a});B.call(this.parent,_$_519c[269],this,b,a)};c.add=function(b,a,d,e){if(!N.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_519c[270]),
|
|
253
|
+
!1;var f=[];if(0<b)var g=parseInt(b);else g=1,Array.isArray(b)&&!e&&(Array.isArray(b[0])?e=b:(e=[],e.push(b)));e=Ba.standardize(e);d=d?!0:!1;var h=this.options.data?this.options.data.length-1:0;if(void 0==a||a>h||0>a)a=h,d=!1;g||(g=1);if(!1===B.call(this.parent,_$_519c[271],this,a,g,d))return console.log(_$_519c[272]),!1;this.resetBorders();var l=d?a:a+1,n=0;b=[];for(var p=[],q=this.rows.splice(l),r=this.options.data?this.options.data.splice(l):[],w=this.records.splice(l),m=l;m<g+l;m++){var v=e[n]&&
|
|
254
|
+
e[n].id?e[n].id:pa.next.call(this);ka.row.call(this,m,v);var u=this.dataType?{}:[];for(var x=0;x<this.options.columns.length;x++){var y=V.call(this,x);u[y]=_$_519c[3];e&&e[n]&&e[n].data&&(typeof e[n].data[y]!==_$_519c[13]?u[y]=e[n].data[y]:typeof e[n].data[x]!==_$_519c[13]&&(u[y]=e[n].data[x]));f.push({x,y:m,value:u[y],force:!0})}p.push({id:v,data:u});n++}this.rows=this.rows.concat(q);this.records=this.records.concat(w);this.options.data=this.options.data.concat(r);this.results&&0<this.results.length&&
|
|
255
|
+
(h=this.results[this.results.length-1]);e=!1;q[0]?0<=Array.prototype.indexOf.call(this.tbody.children,q[0].element)&&(e=!0):this.rows[h]?this.rows[h].element&&0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[h].element)&&(e=!0):e=!0;for(m=l;m<g+l;m++)this.results&&(this.rows[m].results=!0),1==e&&(h=q[0]?q[0].element:null,y=C.renderRow.call(this,m,null,null,!0),h?this.tbody.insertBefore(y,h):this.tbody.appendChild(y),0<this.options.pagination?Array.prototype.indexOf.call(this.tbody.children,
|
|
256
|
+
y)>=this.options.pagination&&(e=!1):C.limited.call(this)&&(C.isVisible.call(this,y.children[1])||(e=!1))),b.push(this.records[m]);this.merged.rows[l]&&X.updateConfig.call(this,1,1,l-1,g);G.call(this,_$_519c[63],{numOfRows:g,rowNumber:a,insertBefore:d?1:0,data:p});l=this.tbody.firstChild.getAttribute(_$_519c[43]);this.results&&(l=this.results.indexOf(parseInt(l)),this.results=sa.refresh.call(this));T.references.call(this);f.length&&aa.applyValues.call(this,f);0<this.options.pagination?qa[_$_519c[11]].call(this,
|
|
257
|
+
this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$_519c[3],C[_$_519c[46]].call(this,l));T.update.call(this);P.call(this);da.refresh.call(this);Q.call(this.parent,{worksheet:this,action:_$_519c[63],rowNumber:a,numOfRows:g,insertBefore:d,data:p});B.call(this.parent,_$_519c[273],this,a,g,b,d)};c.del=function(b,a){if(!N.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_519c[274]),!1;var d=null,e={},f=[],g=0;void 0==b&&(a=this.getSelectedRows(),
|
|
258
|
+
a[0]?(b=parseInt(a[0].getAttribute(_$_519c[43])),a=a.length):(b=this.options.data.length-1,a=1));var h=this.options.data.length-1;if(void 0==b||b>h||0>b)b=h;a||(a=1);b+a>=this.options.data.length&&(a=this.options.data.length-b,a>=this.options.data.length&&(a=this.options.data.length,this.resetSelection()));if(!1===B.call(this.parent,_$_519c[275],this,b,a))return console.log(_$_519c[276]),!1;if(-1<parseInt(b)&&0<parseInt(a)){h=parseInt(this.thead.lastChild.children[1].getAttribute(_$_519c[42]));var l=
|
|
259
|
+
parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]));this.resetBorders();for(var n=b;n<b+a;n++)for(var p=0;p<this.options.columns.length;p++)d=A.getColumnNameFromCoords(p,n),I.getAttributes.call(this,_$_519c[277],d,e),I.getAttributes.call(this,_$_519c[98],d,e),I.getAttributes.call(this,_$_519c[278],d,e),I.getAttributes.call(this,_$_519c[279],d,e),I.getAttributes.call(this,_$_519c[262],d,e),I.getAttributes.call(this,_$_519c[261],d,e),f[d]=!0;if(d=S.getChain.call(this,e.values))e.formulas=d;for(n=
|
|
260
|
+
b;n<b+a;n++)0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[n].element)&&(this.rows[n].element.parentNode.removeChild(this.rows[n].element),g++);d=[];for(n=b;n<b+a;n++)d.push({id:this.getRowId(n),row:n,data:this.getRowData(n)});this.rows.splice(b,a);n=this.records.splice(b,a);this.options.data.splice(b,a);X.updateConfig.call(this,1,0,b,a);G.call(this,_$_519c[64],{rowNumber:b,numOfRows:a,data:d});T.references.call(this,f);this.results&&(this.results=sa.refresh.call(this));0<this.options.pagination?
|
|
261
|
+
this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var q=this.whichPage(this.options.data.length-1);this.page(q)}}):C.limited.call(this)&&0<g&&(this.tbody.textContent=_$_519c[3],C.call(this),C[_$_519c[46]].call(this,l,h));T.update.call(this,!0);Q.call(this.parent,{worksheet:this,action:_$_519c[64],rowNumber:b,numOfRows:a,insertBefore:1,data:d,attributes:e});B.call(this.parent,_$_519c[280],this,b,a,n,d,e)}};return c}(),Da=function(){var k=function(b,a){Array.isArray(a)||(a=[a]);
|
|
262
|
+
for(var d,e,f=Object.keys(a),g=0;g<f.length;g++)if(d=a[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$_519c[44]:_$_519c[144]),e.visible=b;this.resetBorders();C.refresh.call(this)},c=function(b){b.getColumn=c[_$_519c[51]];b.getColumnIdByName=c.getByName;b.getPrimaryKey=c.getPrimaryKey;b.getSelectedColumns=c.selected;b.getOptions=c.getOptions;b.getColumnOptions=c.getOptions;b.moveColumn=c.move;b.insertColumn=c.add;
|
|
263
|
+
b.deleteColumn=c.del;b.getProperties=c.properties;b.setProperties=c.properties;b.getProperty=c.properties;b.setProperty=c.properties;b.showColumn=k.bind(b,!0);b.hideColumn=k.bind(b,!1)};c[_$_519c[51]]=function(b){return this.options.columns[b]||!1};c.getByName=function(b){for(var a=this.options.columns,d=0;d<a.length;d++)if(a[d].name==b)return d;return!1};c.getPrimaryKey=function(){for(var b=0;b<this.options.columns.length;b++)if(1==this.options.columns[b].primaryKey)return b;return!1};c.getOptions=
|
|
264
|
+
function(b,a){var d=this.options.columns[b];Object.keys(this.options.cells).length&&void 0!==a&&(b=A.getColumnNameFromCoords(b,a),this.options.cells[b]&&(d=this.options.cells[b]));if(!d)d={type:_$_519c[56]};else if(!d.type||typeof d.type==_$_519c[17]&&!t.editors[d.type])d.type=_$_519c[56];return d};c.selected=function(b){b=[];var a=this.getHighlighted();if(a)for(var d=a[0];d<=a[2];d++)b.push(d);return b};c.move=function(b,a){if(!N.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.options.columns[b])return console.error(_$_519c[281]),
|
|
265
|
+
!1;if(!this.options.columns[a])return console.error(_$_519c[282]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.cols[b]?d=!0:this.merged.cols[a]&&(b>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();d=this.options.freezeColumns;0<d&&(b<d||a<d)?ia.reset.call(this):d=null;if(this.headers[a]&&this.headers[a].parentNode){this.headers[b]||ya.create.call(this,b);var e=(b>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[b],
|
|
266
|
+
e);e=(b>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[b],e);for(var f=0;f<this.tbody.children.length;f++){var g=this.tbody.children[f].getAttribute(_$_519c[43]);e=(b>a?this.records[g][a].element:this.records[g][a].element.nextSibling)||null;this.tbody.children[f].insertBefore(I[_$_519c[51]].call(this,b,g),e)}if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(b>a?this.footers.content[f][a].element:this.footers.content[f][a].element.nextSibling)||
|
|
267
|
+
null,this.tfoot.children[f].insertBefore(W.create.call(this,b,f),e)}else if(this.headers[b]&&this.headers[b].parentNode){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_519c[43])),this.tbody.children[f].removeChild(this.records[g][b].element);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][b].element)}this.options.columns.splice(a,
|
|
268
|
+
0,this.options.columns.splice(b,1)[0]);this.headers.splice(a,0,this.headers.splice(b,1)[0]);this.colgroup.splice(a,0,this.colgroup.splice(b,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(a,0,this.options.data[f].splice(b,1)[0]),this.records[f].splice(a,0,this.records[f].splice(b,1)[0]);if(this.options.footers)for(f=0;f<this.options.footers.length;f++)this.options.footers[f].splice(a,0,this.options.footers[f].splice(b,1)[0]),this.footers.content[f].splice(a,0,this.footers.content[f].splice(b,
|
|
269
|
+
1)[0]);G.call(this,_$_519c[68],{f:b,t:a});T.references.call(this);T.update.call(this);0<d&&(b<=d||d<=d)&&ia[_$_519c[11]].call(this,d);Q.call(this.parent,{worksheet:this,action:_$_519c[68],oldValue:b,newValue:a});B.call(this.parent,_$_519c[283],this,b,a)};c.add=function(b,a,d,e,f,g){if(!N.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_519c[284]),!1;var h=[];if(0<b)var l=parseInt(b);else if(l=1,Array.isArray(b)&&!f)if(Array.isArray(b[0]))f=b;else{f=[];for(var n=
|
|
270
|
+
0;n<b.length;n++)f[n]=[b[n]]}f||(f=[]);d=d?!0:!1;b=this.options.columns.length-1;if(void 0==a||a>b||0>a)a=b,d=!1;l||(l=1);if(!1===B.call(this.parent,_$_519c[285],this,a,l,d))return console.log(_$_519c[286]),!1;da.reset.call(this);if(1==this.dataType)var p=parseInt((_$_519c[3]+Date.now()).substr(-8));e||(e=[]);for(n=0;n<l;n++)e[n]||(e[n]={type:_$_519c[56],source:[],options:[],width:this.options.defaultColWidth,align:this.options.defaultColAlign}),1==this.dataType&&typeof e[n].name==_$_519c[13]&&(e[n].name=
|
|
271
|
+
_$_519c[287]+(p+n));var q=d?a:a+1;this.options.columns=A.injectArray(this.options.columns,q,e);p=function(u,x){for(var y=q;y<l+q;y++)ya.create.call(this,y),u?(this.headerContainer.insertBefore(this.headers[y],u),this.colgroupContainer.insertBefore(this.colgroup[y],x)):(this.headerContainer.appendChild(this.headers[y]),this.colgroupContainer.appendChild(this.colgroup[y]))};n=function(u,x){if(x)for(var y=q;y<l+q;y++)this.rows[u].element.insertBefore(I[_$_519c[51]].call(this,y,u),x);else for(y=q;y<l+
|
|
272
|
+
q;y++)this.rows[u].element.appendChild(I[_$_519c[51]].call(this,y,u))};var r=this.headers.splice(q),w=this.colgroup.splice(q);r[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,r[0])&&p.call(this,r[0],w[0]):this.headers[b]&&0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[b])&&p.call(this);this.headers=this.headers.concat(r);this.colgroup=this.colgroup.concat(w);W.adjust.call(this,q,l,1);la.adjust.call(this,a,l,1,g);g=0;w=r=p=null;for(var m=0;m<this.options.data.length;m++){this.dataType||
|
|
273
|
+
(r=this.options.data[m].splice(q));w=this.records[m].splice(q);g=0;for(var v=q;v<l+q;v++)p=f[m]&&f[m][g]?f[m][g]:_$_519c[3],K.call(this,v,m,p),h.push({x:v,y:m,value:p}),ka.cell.call(this,v,m),g++;this.rows[m].element&&this.rows[m].element.parentNode&&(w[0]?0<=Array.prototype.indexOf.call(this.rows[m].element.children,w[0].element)&&n.call(this,m,w[0].element):this.records[m][b].element&&0<=Array.prototype.indexOf.call(this.rows[m].element.children,this.records[m][b].element)&&n.call(this,m));this.dataType||
|
|
274
|
+
(this.options.data[m]=this.options.data[m].concat(r));this.records[m]=this.records[m].concat(w)}this.merged.cols[q]&&X.updateConfig.call(this,0,1,q-1,l);G.call(this,_$_519c[65],{numOfColumns:l,columnNumber:a,insertBefore:d?1:0,properties:e,data:f});T.references.call(this);h.length&&aa.applyValues.call(this,h);T.update.call(this);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_519c[65],columnNumber:a,numOfColumns:l,insertBefore:d,properties:e,data:f});B.call(this.parent,_$_519c[288],
|
|
275
|
+
this,a,l,[],d)};c.del=function(b,a){if(!N.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_519c[289]),!1;var d={},e=[],f=0;if(1<this.options.columns.length){void 0==b&&(a=this.getSelectedColumns(!0),a.length?(b=parseInt(a[0]),a=parseInt(a.length)):(b=this.options.columns.length-1,a=1));var g=this.options.columns.length-1;if(void 0==b||b>g||0>b)b=g;a||(a=1);b+a>=this.options.columns.length&&(a=this.options.columns.length-b,a>=this.options.columns.length&&(a--,
|
|
276
|
+
console.error(_$_519c[290])));if(!1===B.call(this.parent,_$_519c[291],this,b,a))return console.log(_$_519c[292]),!1;if(-1<parseInt(b)&&0<parseInt(a)){g=parseInt(this.thead.lastChild.children[1].getAttribute(_$_519c[42]));var h=parseInt(this.tbody.firstChild.getAttribute(_$_519c[43]));this.resetBorders();var l=null,n=[],p=[],q=[];var r=0;for(var w=b;w<b+a;w++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[w])&&(this.colgroup[w].parentNode.removeChild(this.colgroup[w]),this.headers[w].parentNode.removeChild(this.headers[w]),
|
|
277
|
+
f++),q[r]=this.options.columns[w],r++;for(var m=0;m<this.options.data.length;m++)for(w=b;w<b+a;w++)r=A.getColumnNameFromCoords(w,m),I.getAttributes.call(this,_$_519c[277],r,d),I.getAttributes.call(this,_$_519c[98],r,d),I.getAttributes.call(this,_$_519c[278],r,d),I.getAttributes.call(this,_$_519c[279],r,d),I.getAttributes.call(this,_$_519c[262],r,d),I.getAttributes.call(this,_$_519c[261],r,d),e[r]=!0,this.records[m][w].element&&0<=Array.prototype.indexOf.call(this.rows[m].element.children,this.records[m][w].element)&&
|
|
278
|
+
this.records[m][w].element.parentNode.removeChild(this.records[m][w].element);if(w=S.getChain.call(this,d.values))d.formulas=w;this.options.columns.splice(b,a);this.headers.splice(b,a);this.colgroup.splice(b,a);for(m=0;m<this.options.data.length;m++)this.dataType||(p[m]=this.options.data[m].splice(b,a)),n[m]=this.records[m].splice(b,a);W.adjust.call(this,b,a,0);(w=la.adjust.call(this,b,a,0))&&(l={nested:w});X.updateConfig.call(this,0,0,b,a);G.call(this,_$_519c[66],{columnNumber:b,numOfColumns:a});
|
|
279
|
+
T.references.call(this,e);C.limited.call(this)&&0<f&&(this.tbody.textContent=_$_519c[3],C.call(this),C[_$_519c[46]].call(this,h,g));T.update.call(this,!0);Q.call(this.parent,{worksheet:this,action:_$_519c[66],columnNumber:b,numOfColumns:a,insertBefore:1,data:p,properties:q,attributes:d,extra:l});B.call(this.parent,_$_519c[293],this,b,a,n,q,d)}}};c.properties=function(b,a){if(this.options.columns[b]){if(a){if(!N.call(this.parent,this))return!1;a=typeof a==_$_519c[17]?{type:a}:a;a.type&&t.editors[a.type]||
|
|
280
|
+
(a.type=_$_519c[56]);parseInt(a.width)||(a.width=this.options.defaultColWidth||100);this.edition&&this.closeEditor(this.edition,!1);var d=this.options.columns[b],e=t.editors[d.type],f=t.editors[a.type];if(e&&typeof e.destroyCell==_$_519c[85])for(var g=0;g<this.records.length;g++)this.records[g][b].element&&e.destroyCell(this.records[g][b].element);this.options.columns[b]=a;if(f&&typeof f.createCell==_$_519c[85])for(g=0;g<this.records.length;g++)this.records[g]&&this.records[g][b]&&this.records[g][b].element&&
|
|
281
|
+
(I.applyProperties.call(this,this.records[g][b].element,b,g),f.createCell(this.records[g][b].element,K.call(this,b,g),b,g,this,a));a.width&&this.colgroup[b]&&this.colgroup[b].setAttribute(_$_519c[152],parseInt(a.width));a.title&&(this.headers[b]&&(this.headers[b].innerText=a.title,this.headers[b].setAttribute(_$_519c[166],a.title)),this.options.columns[b].title=a.title);a.tooltip&&(this.headers[b]&&(this.headers[b].title=a.tooltip),this.options.columns[b].tooltip=a.tooltip);this.refreshBorders();
|
|
282
|
+
Q.call(this.parent,{worksheet:this,action:_$_519c[77],column:b,newValue:a,oldValue:d});G.call(this,_$_519c[77],{column:b,options:a});return!0}return this.options.columns[b]}console.error(_$_519c[294])};return c}(),Ma=function(){var k={},c={},b=function(d){if(typeof d==_$_519c[17]){var e=d;d=A.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=A.getColumnNameFromCoords(f,d);if(this.records[d]&&this.records[d][f]&&this.records[d][f].element){c[e]=this.options.style[e];this.records[d][f].element.setAttribute(_$_519c[98],
|
|
283
|
+
_$_519c[3]);var g=this.options.columns[f].align?this.options.columns[f].align:this.options.defaultColAlign;g&&(this.records[d][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$_519c[51]];d.setStyle=a[_$_519c[11]];d.resetStyle=a.reset};a[_$_519c[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_519c[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var h=0;h<g.length;h++){if(typeof d[h]==
|
|
284
|
+
_$_519c[17])var l=e&&e[d[h]]?e[d[h]]:_$_519c[3];else l=A.getColumnNameFromCoords(d[h].x,d[h].y),l=e&&e[l]?e[l]:_$_519c[3];f.push(l)}return f}return this.options.style};a[_$_519c[11]]=function(d,e,f,g){if(!N.call(this.parent,this))return!1;this.options.style||(this.options.style={});var h=this.options.style,l=null,n=[],p=[],q={};p=function(m,v,u){if(!q[m]&&(h[m]?n=h[m].split(_$_519c[263]):(h[m]=_$_519c[3],n=[]),q[m]={},n.length))for(var x=0;x<n.length;x++)n[x]&&n[x].trim()&&(l=n[x].split(_$_519c[136]),
|
|
285
|
+
q[m][l[0].trim()]=l[1].trim());c[m]||(c[m]=[]);k[m]||(k[m]=[]);q[m][v]||(q[m][v]=_$_519c[3]);c[m].push([v+_$_519c[136]+q[m][v]]);q[m][v]=q[m][v]&&q[m][v]==u&&!g?_$_519c[3]:u;k[m].push([v+_$_519c[136]+q[m][v]]);u=A.getCoordsFromColumnName(m);this.records[u[1]]&&this.records[u[1]][u[0]]&&this.records[u[1]][u[0]].element&&(this.records[u[1]][u[0]].element.style[v]=q[m][v]);q[m][v]||delete q[m][v]};k={};c={};if(e)if(typeof d==_$_519c[17])p.call(this,d,e,f);else{if(d&&d.length)for(var r=0;r<d.length;r++){var w=
|
|
286
|
+
A.getColumnNameFromCoords(d[r].x,d[r].y);p.call(this,w,e,f)}}else for(f=Object.keys(d),r=0;r<f.length;r++)if(w=d[f[r]])for(typeof w==_$_519c[17]&&(w=w.split(_$_519c[263])),e=0;e<w.length;e++)w[e]&&(typeof w[e]==_$_519c[17]&&(w[e]=w[e].split(_$_519c[136])),w[e][0].trim()&&p.call(this,f[r],w[e][0].trim(),w[e][1].trim()));n={};p=Object.keys(q);if(p.length){for(r=0;r<p.length;r++){n[p[r]]||(n[p[r]]=[]);d=Object.keys(q[p[r]]);for(e=0;e<d.length;e++)n[p[r]].push(d[e]+_$_519c[114]+q[p[r]][d[e]]);this.options.style[p[r]]=
|
|
287
|
+
n[p[r]].join(_$_519c[295])}p=Object.keys(k);for(r=0;r<p.length;r++)k[p[r]]=k[p[r]].join(_$_519c[263]);p=Object.keys(c);for(r=0;r<p.length;r++)c[p[r]]=c[p[r]].join(_$_519c[263]);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_519c[71],oldValue:c,newValue:k});G.call(this,_$_519c[71],[k]);B.call(this.parent,_$_519c[296],this,k,c)}};a.reset=function(d){if(!N.call(this.parent,this))return!1;if(d){c={};if(Array.isArray(d))for(var e=0;e<d.length;e++)b.call(this,d[e]);else b.call(this,
|
|
288
|
+
d);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_519c[72],cells:d,oldValue:c});G.call(this,_$_519c[72],[d]);B.call(this.parent,_$_519c[298],this,d)}else console.error(_$_519c[297])};a.update=function(d){k={};c={};for(var e=Object.keys(d),f=0;f<e.length;f++){c[e[f]]=this.options.style[e[f]]||_$_519c[3];k[e[f]]=this.options.style[e[f]]=d[e[f]];var g=A.getCoordsFromColumnName(e[f]),h=g[0];g=g[1];this.records[g]&&this.records[g][h]&&this.records[g][h].element&&(this.records[g][h].element.setAttribute(_$_519c[98],
|
|
289
|
+
d[e[f]]),this.records[g][h].element.style.textAlign||(this.records[g][h].element.style.textAlign=this.options.columns[h].align||this.options.defaultColAlign||_$_519c[53]))}G.call(this,_$_519c[72],[e]);G.call(this,_$_519c[71],[k]);B.call(this.parent,_$_519c[296],this,k,c)};return a}(),Sa=function(){var k=function(c){c.getComments=k[_$_519c[51]];c.setComments=k[_$_519c[11]]};k[_$_519c[51]]=function(c){return c&&typeof c==_$_519c[17]?this.options.comments&&this.options.comments[c]?this.options.comments[c]:
|
|
290
|
+
!1:this.options.comments};k[_$_519c[11]]=function(c,b){if(!N.call(this.parent,this))return!1;if(typeof c==_$_519c[17]){var a={};a[c]=b}else a=c;if(b=B.call(this.parent,_$_519c[299],this,a))a=b;else if(!1===b)return!1;this.options.comments||(this.options.comments={});c={};var d=Object.keys(a);if(d.length){for(var e=0;e<d.length;e++){var f=A.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(c[d[e]]=this.options.comments[d[e]]||_$_519c[3],(b=a[d[e]])?this.options.comments[d[e]]=
|
|
291
|
+
b:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&(b?this.records[f[1]][f[0]].element.setAttribute(_$_519c[264],b):this.records[f[1]][f[0]].element.removeAttribute(_$_519c[264])))}Q.call(this.parent,{worksheet:this,action:_$_519c[76],newValue:a,oldValue:c});G.call(this,_$_519c[76],[a]);B.call(this.parent,_$_519c[300],this,a,c)}};return k}(),Ta=function(){var k=function(c){c.getMeta=k[_$_519c[51]];c.setMeta=k[_$_519c[11]];c.resetMeta=k.reset};k[_$_519c[51]]=function(c,b){if(c){if(this.options.meta[c])return b?
|
|
292
|
+
this.options.meta[c][b]:this.options.meta[c]}else return this.options.meta};k[_$_519c[11]]=function(c,b,a){if(!N.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof c==_$_519c[17]&&b){a||(a=_$_519c[3]);var d={};d[c]={};d[c][b]=a;c=d}b=Object.keys(c);if(b.length){a={};for(d=0;d<b.length;d++){this.options.meta[b[d]]||(this.options.meta[b[d]]={});a[b[d]]||(a[b[d]]={});for(var e=Object.keys(c[b[d]]),f=0;f<e.length;f++)this.options.meta[b[d]][e[f]]=c[b[d]][e[f]],a[b[d]][e[f]]=
|
|
293
|
+
c[b[d]][e[f]]}Object.keys(a).length&&(G.call(this,_$_519c[301],[a]),B.call(this.parent,_$_519c[302],this,a))}};k.reset=function(){this.options.meta={};G.call(this,_$_519c[303],{});B.call(this.parent,_$_519c[304],this,{})};return k}(),Ua=function(){var k=function(c){c.orderBy=k.execute};k.handler=function(c,b){return function(a,d){a=a[1];d=d[1];return c?a===_$_519c[3]&&d!==_$_519c[3]?1:a!==_$_519c[3]&&d===_$_519c[3]?-1:a>d?-1:a<d?1:0:a===_$_519c[3]&&d!==_$_519c[3]?1:a!==_$_519c[3]&&d===_$_519c[3]?
|
|
294
|
+
-1:a>d?1:a<d?-1:0}};k.execute=function(c,b,a){if(0<=c){b=null==b?this.headers[c].classList.contains(_$_519c[305])?1:0:b?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Da.getOptions.call(this,c,g),e=this.records[g][c].v,e=d.type==_$_519c[251]||d.type==_$_519c[256]||d.type==_$_519c[257]||d.type==_$_519c[306]||d.type==_$_519c[14]||d.type==_$_519c[307]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=[g,e];g=typeof this.parent.config.sorting===_$_519c[85]?this.parent.config.sorting(b,
|
|
295
|
+
c):k.handler(b,c);f.sort(g);d=a?!0:!1;if(!a)for(a=[],g=0;g<f.length;g++)a[g]=f[g][0];if(g=B.call(this.parent,_$_519c[308],this,c,b,a))a=g;else if(!1===g)return!1;if(d)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(z(_$_519c[309])))this.destroyMerged();else return!1;if(a.length<f.length)for(g=0;g<f.length;g++)-1==a.indexOf(f[g][0])&&a.push(f[g][0]);f=[];for(g=0;g<a.length;g++)f[a[g]]=g;Aa.call(this,!1);da.reset.call(this);G.call(this,_$_519c[78],{column:c,direction:b,
|
|
296
|
+
order:a});k.update.call(this,a);k.arrow.call(this,c,b);da.refresh.call(this);Q.call(this.parent,{worksheet:this,action:_$_519c[78],column:c,newValue:a,oldValue:f,direction:b});B.call(this.parent,_$_519c[310],this,c,b,a);return!0}};k.update=function(c){for(var b=[],a=0;a<c.length;a++)b[a]=this.options.data[c[a]];for(a=0;a<c.length;a++)this.options.data[a]=b[a];b=[];for(a=0;a<c.length;a++)b[a]=this.records[c[a]];this.records=b;b=[];for(a=0;a<c.length;a++)b[a]=this.rows[c[a]];this.rows=b;T.references.call(this);
|
|
297
|
+
this.searchInput&&this.searchInput.value?ma.update.call(this,null):Y.update.call(this)};k.arrow=function(c,b){for(var a=0;a<this.headers.length;a++)this.headers[a].classList.remove(_$_519c[311]),this.headers[a].classList.remove(_$_519c[305]);b?this.headers[c].classList.add(_$_519c[311]):this.headers[c].classList.add(_$_519c[305])};return k}(),qa=function(){var k=function(c){c.whichPage=k.whichPage;c.quantityOfPages=k.quantityOfPages;c.page=k[_$_519c[11]];c.updatePagination=k.update};k.build=function(){this.pageNumber=
|
|
298
|
+
0;var c=document.createElement(_$_519c[20]),b=document.createElement(_$_519c[20]);this.pagination=document.createElement(_$_519c[20]);this.pagination.classList.add(_$_519c[312]);this.pagination.appendChild(c);this.pagination.appendChild(b);this.options.pagination||(this.pagination.style.display=_$_519c[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_519c[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-
|
|
299
|
+
1&&(this.pageNumber++,k[_$_519c[11]].call(this,this.pageNumber))};k.whichPage=function(c){if(0<this.options.pagination)return this.rows[c]?(this.results&&(c=this.results.indexOf(parseInt(c))),Math.ceil((parseInt(c)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_519c[313]);return!1};k.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_519c[313]);return!1};k[_$_519c[11]]=
|
|
300
|
+
function(c,b){var a=this.pageNumber,d=parseInt(this.options.pagination);if(d){if(null==c||-1==c)c=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===B.call(this.parent,_$_519c[315],this,c,a,d))return!1;this.pageNumber=c;C.resetY.call(this);W.refresh.call(this);typeof b==_$_519c[85]&&b.call(this);B.call(this.parent,_$_519c[316],this,c,a,d)}else console.error(_$_519c[314])};k.update=function(){this.pagination.children[0].innerHTML=_$_519c[3];this.pagination.children[1].innerHTML=_$_519c[3];
|
|
301
|
+
if(this.options.pagination){var c=this.results?this.results.length:this.rows.length;if(c){c=Math.ceil(c/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>c?c:10;else 5>c-this.pageNumber?(b=c-9,a=c,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var d=document.createElement(_$_519c[20]);d.className=_$_519c[318];d.innerHTML=_$_519c[215];d.title=1;this.pagination.children[1].appendChild(d)}for(;b<=a;b++)d=document.createElement(_$_519c[20]),d.className=_$_519c[318],d.innerHTML=
|
|
302
|
+
b,this.pagination.children[1].appendChild(d),this.pageNumber==b-1&&d.classList.add(_$_519c[319]);a<c&&(d=document.createElement(_$_519c[20]),d.className=_$_519c[318],d.innerHTML=_$_519c[216],d.title=c,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=z(_$_519c[320],[this.pageNumber+1,c])}else this.pagination.children[0].innerHTML=z(_$_519c[317])}};return k}(),ia=function(){var k=function(c){c.setFreezeColumns=k[_$_519c[11]];c.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);
|
|
303
|
+
for(var c=0;c<this.rows.length;c++)this.rows[c].element&&k.update.call(this,c)}};k.update=function(c){var b,a;if(a=this.options.freezeColumns){var d=ua.call(this)?50:0;if(this.rows[c].element)for(var e=0;e<a;e++){if(b=this.records[c][e].element)b.classList.add(_$_519c[50]),b.style.left=d+1+_$_519c[44];d+=this.options.columns[e].width}}};k.headers=function(){var c=ua.call(this)?50:0,b;if(b=this.options.freezeColumns)for(var a=0;a<b;a++){if(this.headers[a]){this.headers[a].classList.add(_$_519c[50]);
|
|
304
|
+
this.headers[a].style.left=c+1+_$_519c[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_519c[50]),this.footers.content[d][a].element.style.left=c+1+_$_519c[44];c+=this.options.columns[a].width}}else k.reset.call(this)};k[_$_519c[11]]=function(c){k.reset.call(this);this.options.freezeColumns=c;k.width.call(this);C.call(this)};k.reset=function(){C[_$_519c[46]].call(this,null,this.options.freezeColumns);for(var c,b=1;b<=this.options.freezeColumns;b++){if(c=
|
|
305
|
+
this.thead.lastChild)c.children[b].classList.remove(_$_519c[50]),c.children[b].style.left=_$_519c[3];for(var a=0;a<this.rows.length;a++)if(c=this.rows[a].element)c.children[b].classList.remove(_$_519c[50]),c.children[b].style.left=_$_519c[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[b].classList.remove(_$_519c[50]),this.tfoot.children[a].children[b].style.left=_$_519c[3]}this.options.freezeColumns=0};k.getWidth=function(){var c=ua.call(this)?
|
|
306
|
+
50:0;if(0<this.options.freezeColumns)for(var b=0;b<=this.options.freezeColumns;b++)c=this.thead.lastChild.children[b]?c+this.thead.lastChild.children[b].offsetWidth:c+this.options.columns[b].width;return c};return k}(),T=function(){var k=function(a,d){if(this.options[a]){for(var e={},f=Object.keys(this.options[a]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[a][f[g]];this.options[a]=e}},c=function(){if(0<this.options.minSpareRows){for(var a=0,d=this.rows.length-1;0<=d;d--){for(var e=
|
|
307
|
+
!1,f=0;f<this.options.columns.length;f++)K.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareRows-a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)K.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},b=function(){};b.build=function(){var a=this;this.content=document.createElement(_$_519c[20]);this.content.classList.add(_$_519c[321]);
|
|
308
|
+
this.content.addEventListener(_$_519c[322],function(f){if(C.limited.call(a)&&!a.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?C.pageLeft.call(a,1,null,f):C.pageRight.call(a,1,null,f):0>f.deltaY?C.pageUp.call(a,1,null,f):C.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$_519c[323],function(f){if(!a.edition)return f.preventDefault(),!1});this.table=document.createElement(_$_519c[324]);this.thead=document.createElement(_$_519c[325]);
|
|
309
|
+
this.tbody=document.createElement(_$_519c[326]);this.tfoot=document.createElement(_$_519c[327]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_519c[328]);var d=document.createElement(_$_519c[169]);d.setAttribute(_$_519c[152],_$_519c[329]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_519c[145]);d=document.createElement(_$_519c[147]);d.classList.add(_$_519c[330]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);
|
|
310
|
+
this.table.classList.add(_$_519c[331]);this.table.setAttribute(_$_519c[332],_$_519c[97]);this.table.setAttribute(_$_519c[333],_$_519c[97]);this.table.setAttribute(_$_519c[334],_$_519c[335]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.parent.config.wordWrap&&this.table.classList.add(_$_519c[336]);this.options.textOverflow||this.table.classList.add(_$_519c[337]);!1===this.options.selectLockedCells&&
|
|
311
|
+
this.table.classList.add(_$_519c[338]);this.corner=document.createElement(_$_519c[20]);this.corner.className=_$_519c[339];this.corner.setAttribute(_$_519c[334],_$_519c[340]);this.corner.setAttribute(_$_519c[341],_$_519c[342]);0==this.options.selectionCopy&&(this.corner.style.display=_$_519c[40]);this.scrollX=P.build.call(a,_$_519c[45]);this.scrollY=P.build.call(a,_$_519c[343]);d=document.createElement(_$_519c[20]);d.appendChild(this.content);d.appendChild(this.scrollY);d.classList.add(_$_519c[344]);
|
|
312
|
+
var e=document.createElement(_$_519c[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_519c[345]);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(e);1==this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=300),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-8),this.content.style.maxHeight=parseInt(this.options.tableHeight)+_$_519c[44],this.content.style.maxWidth=parseInt(this.options.tableWidth)+
|
|
313
|
+
_$_519c[44],1==this.options.tableOverflowResizable&&(this.content.style.resize=_$_519c[346]));this.options.freezeColumns>this.options.columns.length&&console.error(_$_519c[347]);ma.build.call(this);la.build.call(this);qa.build.call(this);Ba.build.call(this);X.build.call(this);W.build.call(this);C.call(this);Y.onload.call(this);c.call(this)};b.references=function(a){var d=[],e=[],f=null,g=null,h=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])h=g.getAttribute(_$_519c[42]),
|
|
314
|
+
h!=f&&(g.setAttribute(_$_519c[42],f),g.getAttribute(_$_519c[166])||(g.innerHTML=A.getColumnName(f)));for(var n=0;n<this.rows.length;n++)g=this.rows[n],l=g.y,l!=n&&(g.y=n,d[l]=n,g.element&&(g.element.setAttribute(_$_519c[43],n),g.element.children[0].setAttribute(_$_519c[43],n),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:n+1,g.element.children[0].innerHTML=f));var p=function(r,w){g=this.records[w][r];h=g.x;l=g.y;h!=r&&(g.x=r,g.element&&g.element.setAttribute(_$_519c[42],
|
|
315
|
+
r));l!=w&&(g.y=w,g.element&&g.element.setAttribute(_$_519c[43],w));if(h!=r||l!=w){var m=A.getColumnNameFromCoords(h,l);r=A.getColumnNameFromCoords(r,w);e[m]=r}};if(a){n=function(r,w){r&&r[w]&&delete r[w]};var q=Object.keys(a);for(f=0;f<q.length;f++)n(this,q[f]),n(this.options.meta,q[f]),n(this.options.cells,q[f]),n(this.options.style,q[f]),n(this.options.comments,q[f])}for(n=0;n<this.rows.length;n++)for(f=0;f<this.options.columns.length;f++)p.call(this,f,n);k.call(this,_$_519c[348],d);k.call(this,
|
|
316
|
+
_$_519c[277],e);k.call(this,_$_519c[278],e);k.call(this,_$_519c[98],e);k.call(this,_$_519c[279],e);k.call(this,_$_519c[262],e);this.options.mergeCells&&X.build.call(this);S.updateAll.call(this,e,a);return e};b.update=function(a){a&&c.call(this);if(typeof this.parent.config.updateTable==_$_519c[85])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)a=this.records[d][e],this.parent.config.updateTable.call(this,this,a.element,e,d,K.call(this,e,d),a.r?a.r:a.v);P.call(this);
|
|
317
|
+
W.refresh.call(this)};return b}(),ka=function(){var k={spreadsheet:function(c,b){var a={name:null,config:{},el:c,element:c,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};za.spreadsheet.call(a,b);a.config.license&&(t.license=a.config.license);c.spreadsheet=a;c.jspreadsheet=c.jexcel=a.worksheets;t.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$_519c[84]&&
|
|
318
|
+
(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=c.offsetWidth-50+_$_519c[44]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){a.createWorksheet();return!1};d.onclick=function(f,g,h,l,n){0<=h&&a.openWorksheet(h)};d.onchangeposition=function(f,g,h){a.updateWorksheet(g,h)};jSuites.tabs(c,d);c.classList.add(_$_519c[349]);1==b.fullscreen&&c.classList.add(_$_519c[15]);var e=document.createElement(_$_519c[20]);
|
|
319
|
+
a.toolbar=document.createElement(_$_519c[20]);a.toolbar.className=_$_519c[350];e.appendChild(a.toolbar);a.filter=Y.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_519c[20]);a.helper.className=_$_519c[351];e.appendChild(a.helper);a.loading=document.createElement(_$_519c[20]);a.loading.classList.add(_$_519c[352]);e.appendChild(a.loading);e.appendChild(Z.build(a));e.appendChild(Na(a));a.textarea=document.createElement(_$_519c[353]);a.textarea.className=_$_519c[354];a.textarea.tabIndex=
|
|
320
|
+
_$_519c[355];e.appendChild(a.textarea);d.position===_$_519c[356]?c.insertBefore(e,c.children[0]):c.insertBefore(e,c.children[1]);c.appendChild(Fa.call(a,t.license));a.createWorksheet=ea.createWorksheet;a.deleteWorksheet=ea.deleteWorksheet;a.renameWorksheet=ea.renameWorksheet;a.updateWorksheet=ea.updateWorksheet;a.openWorksheet=ea.openWorksheet;a.moveWorksheet=ea.moveWorksheet;a.getWorksheet=ea.getWorksheet;a.getWorksheetActive=ea.getWorksheetActive;a.getWorksheetInstance=ea.getWorksheetInstance;a.getConfig=
|
|
321
|
+
function(){var f=a.config;f.worksheets=[];for(var g=0;g<a.worksheets.length;g++)f.worksheets.push(a.worksheets[g].getConfig());return f};a.fullscreen=Ga;a.progress=Ha;a.undo=Q.undo;a.redo=Q.redo;a.setToolbar=ca[_$_519c[11]];a.getToolbar=ca[_$_519c[51]];a.showToolbar=ca.show;a.hideToolbar=ca.hide;a.tools=e;1!==a.edition&&(c=Object.keys(a.config.definedNames))&&c.length&&(a.config.definedNames={},console.log(_$_519c[357]));b.plugins&&ja.call(a,b.plugins);a.setPlugins=function(f){ja.call(a,f)};c=Object.keys(t.extensions);
|
|
322
|
+
if(c.length)for(d=0;d<c.length;d++)if(typeof t.extensions[c[d]].oninit==_$_519c[85])t.extensions[c[d]].oninit(a,b);return a},worksheet:function(c,b){var a={};c.worksheets.push(a);a.parent=c;za(a);Oa(a);va(a);da(a);Z(a);Ba(a);Qa(a);X(a);Ma(a);Ra(a);aa(a);S(a);I(a);wa(a);Da(a);Ta(a);Sa(a);ya(a);W(a);la(a);ma(a);Y(a);ca(a);pa(a);Va(a);Wa(a);qa(a);ea(a);ia(a);Pa(a);Ua(a);Ea(a);za.worksheet.call(a,b);!t.license&&a.options.license&&(t.license=a.options.license);c.element.jexcel=c.worksheets?c.worksheets:
|
|
323
|
+
a;ja.execute.call(a.parent,_$_519c[358],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_519c[359]+ea.nextName());var d=this.options.worksheetName;D(d)&&console.log(_$_519c[360]+d+_$_519c[361]);D(d,a);this.element=c.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===_$_519c[49]&&(f.style.display=_$_519c[40])});this.element.classList.add(_$_519c[362]);this.element.jexcel=this;T.build.call(this);ja.execute.call(this.parent,
|
|
324
|
+
_$_519c[363],[this]);this.options.data&&500<this.options.data.length&&!C.limited.call(this)&&!this.options.pagination&&console.error(_$_519c[364])};return a},row:function(c,b){this.rows[c]||(this.rows[c]={element:null,y:c});b&&(this.rows[c].id=b,pa[_$_519c[11]].call(this,b));this.options.rows&&this.options.rows[c]&&this.options.rows[c].height&&(this.rows[c].height=this.options.rows[c].height);this.records[c]||(this.records[c]=[]);this.options.data[c]||(this.options.data[c]=this.dataType?{}:[]);for(b=
|
|
325
|
+
0;b<this.options.columns.length;b++)k.cell.call(this,b,c)},cell:function(c,b,a){typeof a==_$_519c[13]&&(a=K.call(this,c,b),null===a||void 0===a)&&(a=_$_519c[3],K.call(this,c,b,a));this.records[b][c]||(this.records[b][c]={element:null,x:c,y:b,v:a})},bind:function(c){for(var b=Object.keys(xa),a=0;a<b.length;a++)(b[a]==_$_519c[365]?window:c).addEventListener(b[a],xa[b[a]],b[a]==_$_519c[366]||b[a]==_$_519c[367]||b[a]==_$_519c[368]?{passive:!1}:{})},unbind:function(c){for(var b=Object.keys(xa),a=0;a<b.length;a++)(b[a]==
|
|
326
|
+
_$_519c[365]?window:c).removeEventListener(b[a],xa[b[a]])}};return k}(),Va=function(){var k=function(c){c.getWidth=k[_$_519c[51]];c.setWidth=k[_$_519c[11]]};k[_$_519c[51]]=function(c){var b=this.options.columns;if(typeof c===_$_519c[13]){c=[];for(var a=0;a<b.length;a++)c.push(b[a].width)}else c=b[c].width;return c};k[_$_519c[11]]=function(c,b,a){if(!N.call(this.parent,this))return!1;if(b){if(Array.isArray(c)){a||(a=[]);for(var d=0;d<c.length;d++){a[d]||(a[d]=this.colgroup[c[d]].getAttribute(_$_519c[152]));
|
|
327
|
+
var e=Array.isArray(b)&&b[d]?b[d]:b;this.colgroup[c[d]].setAttribute(_$_519c[152],e);this.options.columns[c[d]].width=e}}else a||(a=this.colgroup[c].getAttribute(_$_519c[152])),this.colgroup[c].setAttribute(_$_519c[152],b),this.options.columns[c].width=b;this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_519c[73],column:c,oldValue:a,newValue:b});G.call(this,_$_519c[73],{column:c,width:b,oldWidth:a});B.call(this.parent,_$_519c[369],this,c,b,a)}C.refresh.call(this)};return k}(),Wa=function(){var k=
|
|
328
|
+
function(b){b.getHeight=k[_$_519c[51]];b.setHeight=k[_$_519c[11]]};k[_$_519c[51]]=function(b){if(b)b=this.rows[b].element.style.height;else{b=[];for(var a=0;a<this.rows.length;a++){var d=this.rows[a].element.style.height;d&&(b[a]=d)}}return b};var c=function(b,a){a=parseInt(a);var d=this.rows[b].height?this.rows[b].height:this.rows[b].element.offsetHeight||this.options.defaultRowHeight;this.rows[b].element.style.height=a+_$_519c[44];this.options.rows[b]||(this.options.rows[b]={});this.options.rows[b].height=
|
|
329
|
+
a+_$_519c[44];this.rows[b].height=a;return d};k[_$_519c[11]]=function(b,a,d){if(!N.call(this.parent,this))return!1;var e,f=typeof d==_$_519c[13]?!0:!1;if(a){if(Array.isArray(b))for(!0===f&&(d=[]),e=0;e<b.length;e++){var g=Array.isArray(a)&&a[e]?a[e]:a;c.call(this,b[e],g);1==f&&d.push(f)}else e=c.call(this,b,a),1==f&&(d=e);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_519c[74],row:b,oldValue:d,newValue:a});G.call(this,_$_519c[74],{row:b,height:a,oldHeight:d});B.call(this.parent,
|
|
330
|
+
_$_519c[370],this,b,a,d)}C.refresh.call(this)};return k}(),Y=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_519c[371]);g.element.innerHTML=g.value;var l=document.createElement(_$_519c[220]);l.type=_$_519c[250];l.value=h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},c=null,b=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$_519c[11]];g.getFilter=f[_$_519c[51]];g.openFilter=f.open;
|
|
331
|
+
g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return b};f[_$_519c[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_519c[372]),g.filters=h):(l&&l.classList.remove(_$_519c[372]),g.filters=null);f.update.call(this)};f[_$_519c[51]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var h=0;h<this.options.columns.length;h++)g[h]=this.options.columns[h].filters||
|
|
332
|
+
null;return g};f.open=function(g){c=parseInt(g);if(this.headers[c].classList.contains(_$_519c[168])){b=!0;var h=this.parent.element.getBoundingClientRect(),l=this.headers[c].getBoundingClientRect();g=l.left-h.left;l=l.top-h.top+l.height;h=this.parent.filter;h.style.display=_$_519c[16];h.style.top=l+_$_519c[44];h.style.left=g+_$_519c[44];h.children[0].focus();g=h.children[1].selectAll;h.children[1].textContent=_$_519c[3];h.children[1].appendChild(g);this.options.columns[c].filters||(g.children[0].checked=
|
|
333
|
+
!0);g=ma.execute.call(this,null,c);g=A.invert(g);h=[];for(l=0;l<this.rows.length;l++)if(g[l]){var n=_$_519c[3]+K.call(this,c,l),p=_$_519c[3]+aa.processed.call(this,c,l,!0);n.substr(0,1)==_$_519c[12]&&(n=p);h.push([n,p])}h.sort(function(q,r){return q[0]>r[0]?1:q[0]<r[0]?-1:0});a=[];for(l=0;l<h.length;l++)a[h[l][0]]={value:h[l][1],element:null};void 0!==a[_$_519c[3]]&&(delete a[_$_519c[3]],a[_$_519c[3]]={value:_$_519c[212]+z(_$_519c[374])+_$_519c[232],element:null});f.search.call(this,_$_519c[3])}else console.log(_$_519c[373])};
|
|
334
|
+
f.close=function(g){if(g){g=this.parent.filter.children[1];if(1==g.selectAll.firstChild.checked&&e.length==Object.keys(a).length)g=null;else{g=1==g.currentSelection.firstChild.checked?this.options.columns[c].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$_519c[11]].call(this,c,g)}this.parent.filter.style.display=_$_519c[3];this.parent.filter.children[0].value=_$_519c[3];c=null;b=!1;a=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);sa.reset.call(this);
|
|
335
|
+
f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],n=0;n<this.options.data.length;n++){for(var p=!0,q=0;q<h.length;q++)if(h[q].filters&&g!==q){var r=_$_519c[3]+K.call(this,q,n),w=_$_519c[3]+this.getLabelFromCoords(q,n,!0);-1==h[q].filters.indexOf(r)&&-1==h[q].filters.indexOf(w)&&(p=!1)}p&&l.push(n)}return l};f.update=function(){sa.reset.call(this);this.resetSelection();this.resetBorders();var g=ma.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_519c[85]){var h=
|
|
336
|
+
f[_$_519c[51]].call(this),l=B.call(this.parent,_$_519c[375],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&sa[_$_519c[11]].call(this,g);C.resetY.call(this);W.refresh.call(this);B.call(this.parent,_$_519c[376],this,h,g)};f.show=function(g){f.updateDOM.call(this,g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=
|
|
337
|
+
!1;if(g){e=[];g=new RegExp(g,_$_519c[377]);for(var l=Object.keys(a),n=0;n<l.length;n++)(_$_519c[3]+l[n]).match(g)||(_$_519c[3]+a[l[n]]).match(g)?(e.push(l[n]),a[l[n]].selected=!0):a[l[n]].selected=!1;h.firstChild.checked=!0;this.options.columns[c].filters&&h.appendChild(h.currentSelection)}else{e=Object.keys(a);if(g=this.options.columns[c].filters)for(n=0;n<e.length;n++)a[e[n]].selected=!1,0<=g.indexOf(e[n])&&(a[e[n]].selected=!0);else for(n=0;n<e.length;n++)a[e[n]].selected=!0;h.firstChild.checked=
|
|
338
|
+
g?!1:!0}for(n=d=0;n<e.length;n++)200>n&&(g=d++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_519c[20]);g.className=_$_519c[378];g.onclick=function(p){p.target.tagName==_$_519c[379]&&p.target.o&&(p.target.o.selected=p.target.checked);p=!0;for(var q=1;q<this.children.length;q++)this.children[q].children[0].checked||(p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$_519c[220]);h.type=_$_519c[56];h.placeholder=z(_$_519c[380]);h.className=_$_519c[381];
|
|
339
|
+
var l=document.createElement(_$_519c[220]);l.type=_$_519c[382];l.value=_$_519c[383];l.className=_$_519c[384];var n=document.createElement(_$_519c[20]);n.className=_$_519c[385];n.appendChild(h);n.appendChild(g);n.appendChild(l);g.currentSelection=document.createElement(_$_519c[371]);g.currentSelection.innerHTML=_$_519c[386]+z(_$_519c[387]);g.selectAll=document.createElement(_$_519c[371]);g.selectAll.innerHTML=_$_519c[388]+z(_$_519c[389])+_$_519c[232];g.selectAll.onclick=function(){for(var p=this.children[0].checked,
|
|
340
|
+
q=1;q<this.parentNode.children.length;q++)this.parentNode.children[q].children[0].checked=p;if(1==p)for(q=0;q<e.length;q++)a[e[q]].selected=!0;else for(p=Object.keys(a),q=0;q<p.length;q++)a[p[q]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(p){for(p=0;d<e.length-1&&10>p;){var q=d++;g.appendChild(k(q));p++}}});return n};f.updateDOM=function(g,h,l){var n=this.headers,p=function(q){1==h?n[q].classList.add(_$_519c[168]):(this.options.columns[q].filters=null,n[q].classList.remove(_$_519c[372]),
|
|
341
|
+
1==l&&n[q].classList.remove(_$_519c[168]))};if(g)p.call(this,g);else for(g=0;g<n.length;g++)p.call(this,g)};f.onload=function(){var g,h=!1;if(g=this.options.columns)for(var l=0;l<g.length;l++)Array.isArray(g[l].filters)&&0<g[l].filters.length&&this.headers[l]&&(this.headers[l].classList.add(_$_519c[372]),h=!0);1==h&&f.update.call(this)};return f}(),sa=function(){var k={};k[_$_519c[11]]=function(c){for(var b=0;b<c.length;b++)this.rows[c[b]].results=!0;this.results=c};k.reset=function(){for(var c=0;c<
|
|
342
|
+
this.rows.length;c++)!0===this.rows[c].results&&delete this.rows[c].results;this.results=null};k.refresh=function(){for(var c=[],b=0;b<this.rows.length;b++)!0===this.rows[b].results&&c.push(b);return c};return k}(),ma=function(){var k=function(a){var d=document.createElement(_$_519c[20]);if(0<a.options.pagination&&a.options.paginationOptions&&0<a.options.paginationOptions.length){a.paginationDropdown=document.createElement(_$_519c[390]);a.paginationDropdown.classList.add(_$_519c[391]);a.paginationDropdown.onchange=
|
|
343
|
+
function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$_519c[392]);f.value=a.options.paginationOptions[e];f.innerHTML=a.options.paginationOptions[e];a.paginationDropdown.appendChild(f)}a.paginationDropdown.value=a.options.pagination;d.appendChild(document.createTextNode(z(_$_519c[393])));d.appendChild(a.paginationDropdown);d.appendChild(document.createTextNode(z(_$_519c[394])))}return d},c=function(a,d){var e=
|
|
344
|
+
this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)a.push(d++)}else a.push(d)},b=function(a){a.search=b.update;a.resetSearch=b.reset;a.updateSearch=b.refresh;a.showSearch=b.show;a.hideSearch=b.hide};b.execute=function(a,d){null===a?a=this.searchInput.value||_$_519c[3]:a!==this.searchInput.value&&(this.searchInput.value=a);this.pageNumber=0;var e=[],f=null;d=Y.execute.call(this,d);if(a)try{a=new RegExp(a,_$_519c[377]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=d.indexOf(g))for(var h=
|
|
345
|
+
0;h<this.options.columns.length;h++){var l=_$_519c[3]+K.call(this,h,g),n=_$_519c[3]+this.getLabelFromCoords(h,g);if(l.match(a)||n.match(a))f=!0}1==f&&c.call(this,e,g)}}catch(p){}else e=d;if(e.length){for(g=0;g<this.rows.length;g++)!0===this.rows[g].results&&e.push(g);e.sort(function(p,q){return p-q})}return e};b.update=function(a){sa.reset.call(this);this.resetSelection();this.resetBorders();var d=b.execute.call(this,a);if(typeof this.parent.config.onbeforesearch==_$_519c[85]){var e=B.call(this.parent,
|
|
346
|
+
_$_519c[396],this,a,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&sa[_$_519c[11]].call(this,d);C.resetY.call(this);W.refresh.call(this);B.call(this.parent,_$_519c[397],this,a,d)};b.refresh=function(){C.resetY.call(this);W.refresh.call(this)};b.reset=function(){this.searchInput.value=_$_519c[3];sa.reset.call(this);C.resetY.call(this);W.refresh.call(this)};b.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_519c[3]};b.hide=function(){this.options.search=
|
|
347
|
+
!1;this.searchContainer.style.display=_$_519c[40]};b.build=function(){this.searchContainer=document.createElement(_$_519c[20]);this.searchContainer.classList.add(_$_519c[398]);this.searchContainer.appendChild(k(this));var a=this.searchContainer,d=a.appendChild,e=document.createElement(_$_519c[20]);e.innerHTML=z(_$_519c[380])+_$_519c[114];this.searchInput=document.createElement(_$_519c[220]);this.searchInput.classList.add(_$_519c[395]);e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&
|
|
348
|
+
(this.searchContainer.style.display=_$_519c[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return b}(),Na=function(){var k=function(c){c.contextmenu=document.createElement(_$_519c[20]);c.contextmenu.className=_$_519c[399];jSuites.contextmenu(c.contextmenu,{onclick:function(b,a,d){b.close()}});return c.contextmenu};k.open=function(c,b){var a=c.target.getAttribute(_$_519c[42]),d=c.target.getAttribute(_$_519c[43]),e=k[_$_519c[51]](this,a,d,c,b[0],b[1],b[2]);if(typeof this.parent.config.contextMenu==
|
|
349
|
+
_$_519c[85]){var f=this.parent.config.contextMenu(this,a,d,c,e,b[0],b[1],b[2]);if(f)e=f;else if(!1===f)return!1}c.preventDefault();f=ja.execute.call(this.parent,_$_519c[86],[this,a,d,c,e,b[0],b[1],b[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(c,e)};k[_$_519c[51]]=function(c,b,a,d,e,f,g){var h=[],l=c.parent.config,n=-1!=navigator.userAgent.indexOf(_$_519c[400])?_$_519c[401]:_$_519c[402];e==_$_519c[403]&&(1==l.allowRenameWorksheet&&h.push({title:z(_$_519c[404]),onclick:function(){var q=prompt(z(_$_519c[404]),
|
|
350
|
+
d.target.innerText);q&&c.parent.renameWorksheet(f,q)}}),1==l.allowDeleteWorksheet&&h.push({title:z(_$_519c[405]),onclick:function(){confirm(z(_$_519c[406]),d.target.innerText)&&c.parent.deleteWorksheet(f)}}),h.push({type:_$_519c[407]}));e==_$_519c[408]&&(h.push({title:z(_$_519c[409]),onclick:function(){var q=prompt(z(_$_519c[409]),d.target.innerText);c.setNestedCell(f,g,{title:q})}}),h.push({type:_$_519c[407]}));if(e==_$_519c[410]||e==_$_519c[411]||e==_$_519c[412]||e==_$_519c[408])h.push({title:z(_$_519c[413]),
|
|
351
|
+
icon:_$_519c[414],shortcut:n+_$_519c[415],onclick:function(){c.cut()}}),h.push({title:z(_$_519c[416]),icon:_$_519c[417],shortcut:n+_$_519c[418],onclick:function(){c.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:z(_$_519c[419]),icon:_$_519c[420],shortcut:n+_$_519c[421],onclick:function(){c.selectedCell&&navigator.clipboard.readText().then(function(q){q&&c.paste(c.selectedCell[0],c.selectedCell[1],q)})}}),h.push({type:_$_519c[407]});e==_$_519c[410]&&(1==c.options.allowInsertColumn&&
|
|
352
|
+
h.push({title:z(_$_519c[422]),onclick:function(){c.insertColumn(1,parseInt(f),1)}}),1==c.options.allowInsertColumn&&h.push({title:z(_$_519c[423]),onclick:function(){c.insertColumn(1,parseInt(f),0)}}),1==c.options.allowDeleteColumn&&h.push({title:z(_$_519c[424]),onclick:function(){c.deleteColumn(c.getSelectedColumns().length?void 0:parseInt(b))}}),1==c.options.allowRenameColumn&&h.push({title:z(_$_519c[425]),onclick:function(){c.setHeader(f)}}),c.options.data.length||(h.push({type:_$_519c[407]}),h.push({title:z(_$_519c[426]),
|
|
353
|
+
onclick:function(){c.insertRow(0)}})),1==c.options.columnSorting&&(h.push({type:_$_519c[407]}),h.push({title:z(_$_519c[427]),onclick:function(){c.orderBy(f,0)}}),h.push({title:z(_$_519c[428]),onclick:function(){c.orderBy(f,1)}}),h.push({type:_$_519c[407]})));if(e==_$_519c[412]||e==_$_519c[411])1==c.options.allowInsertRow&&(h.push({title:z(_$_519c[429]),onclick:function(){c.insertRow(1,parseInt(a),1)}}),h.push({title:z(_$_519c[430]),onclick:function(){c.insertRow(1,parseInt(a))}})),1==c.options.allowDeleteRow&&
|
|
354
|
+
h.push({title:z(_$_519c[431]),onclick:function(){c.deleteRow(c.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_519c[407]});if(e==_$_519c[412]&&1==c.options.allowComments){var p=c.records[g][f].element.getAttribute(_$_519c[264])||_$_519c[3];h.push({title:p?z(_$_519c[432]):z(_$_519c[433]),icon:_$_519c[434],onclick:function(){var q=A.getColumnNameFromCoords(f,g),r=prompt(z(_$_519c[435]),p);r&&c.setComments(q,r)}});p&&h.push({title:z(_$_519c[436]),onclick:function(){var q=A.getColumnNameFromCoords(f,
|
|
355
|
+
g);c.setComments(q,_$_519c[3])}});h.push({type:_$_519c[407]})}l.allowExport&&h.push({title:z(_$_519c[437]),icon:_$_519c[438],shortcut:n+_$_519c[439],onclick:function(){c.download()}});l.about&&h.push({title:z(_$_519c[440]),icon:_$_519c[441],onclick:function(){!0===l.about?alert(F().print()):alert(l.about)}});return h};return k}(),ca=function(){var k=function(c){c.showToolbar=function(){k.show.call(c.parent)};c.hideToolbar=function(){k.hide.call(c.parent)};c.refreshToolbar=function(){k.update.call(c.parent,
|
|
356
|
+
c)}};k[_$_519c[11]]=function(c){this.toolbar.innerHTML=_$_519c[3];this.config.toolbar=k[_$_519c[51]].call(this,c);k.show.call(this)};k[_$_519c[51]]=function(c){c||(c=this.config.toolbar);c?Array.isArray(c)?c={items:c}:typeof c===_$_519c[85]&&(c=c({items:k.getDefault()})):c={};typeof c!==_$_519c[84]&&(c={});c.items||(c.items=k.getDefault());typeof c.responsive==_$_519c[13]&&(c.responsive=!0,c.bottom=!1,c.maxWidth=this.element.offsetWidth);return c};k.show=function(){this.toolbar.innerHTML||k.build.call(this);
|
|
357
|
+
this.toolbar.style.display=_$_519c[3];this.element.classList.add(_$_519c[442])};k.hide=function(){this.toolbar.style.display=_$_519c[40];this.element.classList.remove(_$_519c[442])};k.update=function(c,b){if(b=this.toolbarInstance)if(b.update(c),b.options.responsive){var a=parseInt(c.content.style.maxWidth);if(!a||this.config.fullscreen)a=c.element.offsetWidth;b.options.maxWidth=a;b.refresh()}};k.build=function(){for(var c=k[_$_519c[51]].call(this),b=0;b<c.items.length;b++)if(c.items[b].type==_$_519c[390]){if(!c.items[b].options&&
|
|
358
|
+
c.items[b].v){c.items[b].options=[];for(var a=0;a<c.items[b].v.length;a++)c.items[b].options.push(c.items[b].v[a]);c.items[b].k&&(c.items[b].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else c.items[b].type==_$_519c[255]?(c.items[b].type=_$_519c[443],c.items[b].onclick=function(d,e,f){f.color||jSuites.color(f,{onchange:function(g,h){t.current.setStyle(t.current.getSelected(),f.k,h)}}).open()}):!c.items[b].onclick&&c.items[b].k&&(c.items[b].onclick=function(){t.current.setStyle(t.current.getSelected(),
|
|
359
|
+
this.k,this.v)});(b=ja.execute.call(this,_$_519c[87],[c]))&&(c=b[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,c);this.toolbarInstance.application=this;c=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[c])};k.getDefault=function(){return[{content:_$_519c[444],onclick:function(){t.current&&t.current.undo()}},{content:_$_519c[445],onclick:function(){t.current&&t.current.redo()}},{content:_$_519c[438],onclick:function(){t.current&&t.current.download()}},{type:_$_519c[446]},
|
|
360
|
+
{type:_$_519c[390],width:_$_519c[447],options:[_$_519c[448],_$_519c[449],_$_519c[450]],render:function(c){return _$_519c[451]+c+_$_519c[226]+c+_$_519c[452]},onchange:function(c,b,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_519c[453],d)}},{type:_$_519c[390],width:_$_519c[454],content:_$_519c[455],options:[_$_519c[456],_$_519c[457],_$_519c[458],_$_519c[459],_$_519c[460]],render:function(c){return _$_519c[461]+c+_$_519c[226]+c+_$_519c[452]},onchange:function(c,b,a,d){t.current&&t.current.setStyle(t.current.getSelected(),
|
|
361
|
+
_$_519c[462],d)}},{type:_$_519c[390],columns:4,options:[_$_519c[463],_$_519c[464],_$_519c[465],_$_519c[466]],render:function(c){return _$_519c[467]+c+_$_519c[468]},onchange:function(c,b,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_519c[469],d.split(_$_519c[470])[2])}},{type:_$_519c[443],content:_$_519c[471],k:_$_519c[472],v:_$_519c[473]},{type:_$_519c[255],content:_$_519c[474],k:_$_519c[255]},{type:_$_519c[255],content:_$_519c[475],k:_$_519c[476]},{type:_$_519c[390],content:_$_519c[477],
|
|
362
|
+
width:_$_519c[478],options:[_$_519c[479],_$_519c[480],_$_519c[481],_$_519c[482]],onchange:function(c,b,a,d,e){c=t.current.table;c.classList.remove(_$_519c[483]);c.classList.remove(_$_519c[484]);c.classList.remove(_$_519c[485]);1==e?c.classList.add(_$_519c[483]):2==e?c.classList.add(_$_519c[484]):3==e&&c.classList.add(_$_519c[485]);t.current.refreshBorders()}},{content:_$_519c[15],onclick:function(c,b,a){a.children[0].innerText==_$_519c[15]?(t.current.fullscreen(!0),a.children[0].innerText=_$_519c[486]):
|
|
363
|
+
(t.current.fullscreen(!1),a.children[0].innerText=_$_519c[15])},tooltip:_$_519c[487],updateState:function(c,b,a,d){a.children[0].innerText=1==d.parent.config.fullscreen?_$_519c[486]:_$_519c[15]}},{type:_$_519c[390],data:[_$_519c[488],_$_519c[489],_$_519c[490],_$_519c[491],_$_519c[492],_$_519c[493],_$_519c[494],_$_519c[495],_$_519c[496],_$_519c[497]],columns:5,render:function(c){return _$_519c[467]+c+_$_519c[468]},right:!0,onchange:function(c,b,a,d,e){if(c=t.current.getHighlighted()){a=b.thickness||
|
|
364
|
+
1;b=b.color||_$_519c[498];e={};for(var f=c[0],g=c[1],h=c[2],l=c[3],n=c[1];n<=c[3];n++)for(var p=c[0];p<=c[2];p++){var q=A.getColumnNameFromCoords(p,n);e[q]||(e[q]=_$_519c[3]);e[q]=d!=_$_519c[493]&&d!=_$_519c[489]||p!=f?(d==_$_519c[490]||d==_$_519c[492])&&p>f?e[q]+(_$_519c[499]+a+_$_519c[500]+b+_$_519c[295]):d==_$_519c[488]?e[q]+(_$_519c[499]+a+_$_519c[500]+b+_$_519c[295]):e[q]+_$_519c[501]:e[q]+(_$_519c[499]+a+_$_519c[500]+b+_$_519c[295]);e[q]=d!=_$_519c[488]&&d!=_$_519c[495]&&d!=_$_519c[489]||p!=
|
|
365
|
+
h?e[q]+_$_519c[503]:e[q]+(_$_519c[502]+a+_$_519c[500]+b+_$_519c[295]);e[q]=d!=_$_519c[494]&&d!=_$_519c[489]||n!=g?(d==_$_519c[490]||d==_$_519c[491])&&n>g?e[q]+(_$_519c[504]+a+_$_519c[500]+b+_$_519c[295]):d==_$_519c[488]?e[q]+(_$_519c[504]+a+_$_519c[500]+b+_$_519c[295]):e[q]+_$_519c[505]:e[q]+(_$_519c[504]+a+_$_519c[500]+b+_$_519c[295]);e[q]=d!=_$_519c[488]&&d!=_$_519c[496]&&d!=_$_519c[489]||n!=l?e[q]+_$_519c[507]:e[q]+(_$_519c[506]+a+_$_519c[500]+b+_$_519c[295])}Object.keys(e)&&t.current.setStyle(e,
|
|
366
|
+
null,null,!0)}},onload:function(c,b){var a=document.createElement(_$_519c[20]),d=document.createElement(_$_519c[20]);a.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=g;b.color=g}});d=document.createElement(_$_519c[443]);d.classList.add(_$_519c[508]);d.innerHTML=_$_519c[509];d.onclick=function(){e.open()};a.appendChild(d);c.children[1].appendChild(a);d=document.createElement(_$_519c[20]);jSuites.picker(d,{type:_$_519c[390],data:[1,
|
|
367
|
+
2,3,4,5],render:function(f){return _$_519c[510]+f+_$_519c[511]},onchange:function(f,g,h,l){b.thickness=l},width:_$_519c[512]});c.children[1].appendChild(d);d=document.createElement(_$_519c[20]);d.style.flex=_$_519c[513];c.children[1].appendChild(d)}},{content:_$_519c[514],onclick:function(c,b,a){a.children[0].innerText==_$_519c[514]?(ma.show.call(t.current),a.children[0].innerText=_$_519c[515]):(ma.hide.call(t.current),a.children[0].innerText=_$_519c[514])},tooltip:_$_519c[516],updateState:function(c,
|
|
368
|
+
b,a,d){a.children[0].innerText=1==d.options.search?_$_519c[515]:_$_519c[514]}}]};return k}(),ea=function(){var k=function(c){c.createWorksheet=function(b){return c.parent.createWorksheet(b)};c.deleteWorksheet=function(b){return c.parent.deleteWorksheet(b)};c.renameWorksheet=function(b,a){return c.parent.renameWorksheet(b,a)};c.moveWorksheet=function(b,a){return c.parent.moveWorksheet(b,a)};c.openWorksheet=function(){return c.parent.openWorksheet(c.parent.getWorksheet(c))};c.getWorksheet=function(b){return c.parent.getWorksheet(b)};
|
|
369
|
+
c.getWorksheetActive=function(){return c.parent.getWorksheetActive()};c.getWorksheetName=function(){return c.options.worksheetName.toUpperCase()}};k.nextName=function(){var c=1,b,a=t.spreadsheet;if(a.length)for(var d=0;d<a.length;d++){var e=a[d].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&(b=e[f].options.worksheetName.match(/(\d+)/))&&(b=parseInt(b[0])+1,b>c&&(c=b))}return c};k.createWorksheet=function(c){if(!N.call(this))return!1;c||(c={});var b=this.worksheets.length,
|
|
370
|
+
a=B.call(this,_$_519c[517],c,b);if(typeof a===_$_519c[84])c=a;else if(!1===a)return!1;c.data||c.minDimensions||(c.minDimensions=[8,8]);c.worksheetId||(c.worksheetId=jSuites.guid().substring(0,8));c.worksheetName||(c.worksheetName=_$_519c[359]+k.nextName());D(c.worksheetName)?jSuites.notification({error:_$_519c[513],message:_$_519c[518]}):(a=ka.worksheet(this,c),a.onload(),G.call(a,_$_519c[519],[c]),B.call(this,_$_519c[520],a,c,b))};k.deleteWorksheet=function(c){var b=this.worksheets[c];if(!N.call(this,
|
|
371
|
+
b))return!1;D(b.options.worksheetName,null);this.element.tabs.deleteElement(c);this.worksheets.splice(c,1);G.call(b,_$_519c[521],[c]);B.call(this,_$_519c[522],b,c)};k.renameWorksheet=function(c,b){var a=this.worksheets[c];if(!N.call(this,a))return!1;var d=a.options.worksheetName;if(d.toLowerCase()==b.toLowerCase())return!1;b=b.replace(/[^0-9A-Za-z_\s^]+/gi,_$_519c[3]);Number(b)==b&&(b=_$_519c[359]+Number(b));D(b)?alert(_$_519c[523]):(D(d,null),this.element.tabs.rename(c,b),a.options.worksheetName=
|
|
372
|
+
b,D(b,a),Q.call(this,{worksheet:a,action:_$_519c[80],index:c,oldValue:d,newValue:b}),G.call(a,_$_519c[80],{worksheet:c,newValue:b}),Ea.updateWorksheetName.call(a,d,b),S.updateWorksheetNames.call(a,d,b),B.call(this,_$_519c[524],a,c,b,d))};k.updateWorksheet=function(c,b){var a=this.worksheets;if(!N.call(this))return!1;this.worksheets.splice(b,0,a.splice(c,1)[0]);Q.call(this,{worksheet:a[b],action:_$_519c[81],f:c,t:b});G.call(a[b],_$_519c[81],{f:c,t:b});B.call(this,_$_519c[525],a[b],c,b)};k.moveWorksheet=
|
|
373
|
+
function(c,b){this.element.tabs.move(c,b)};k.openWorksheet=function(c){var b=this.worksheets[c];!b||t.current&&t.current==b||(this.element.tabs.getActive()!=c?this.element.tabs.open(c):this.element.tabs.setBorder(c),t.current&&t.current.resetSelection(),t.current=b,t.current.refreshBorders(),P.call(t.current),k.state.call(this,c),ca.update.call(this,t.current),B.call(this,_$_519c[526],b,c))};k.getWorksheet=function(c){if(c&&typeof c==_$_519c[84]){if(c=this.worksheets.indexOf(c),0<=c)return c}else for(var b=
|
|
374
|
+
0;b<this.worksheets.length;b++)if(c===this.worksheets[b].options.worksheetId)return b;return!1};k.getWorksheetActive=function(){return this.element.tabs.getActive()};k.getWorksheetInstance=function(c){return c===_$_519c[3]||typeof c==_$_519c[17]?(c=k.getWorksheet.call(this,c),!1===c?!1:this.worksheets[c]):this.worksheets[c]};k.state=function(c){try{if(typeof localStorage!==_$_519c[13]){var b=this.config.cloud?this.config.cloud:this.element.id;if(b)if(typeof c!==_$_519c[13])localStorage.setItem(_$_519c[527]+
|
|
375
|
+
b,c);else{var a=parseInt(localStorage.getItem(_$_519c[527]+b));k.openWorksheet.call(this,a)}}}catch(d){}};return k}(),A=function(){var k={getCaretIndex:function(c){var b=0,a=(this.config.root?this.config.root:window).getSelection();a&&0!==a.rangeCount&&(b=a.getRangeAt(0),a=b.cloneRange(),a.selectNodeContents(c),a.setEnd(b.endContainer,b.endOffset),b=a.toString().length);return b},invert:function(c){for(var b=[],a=Object.keys(c),d=0;d<a.length;d++)b[c[a[d]]]=a[d];return b},getColumnName:function(c){var b=
|
|
376
|
+
_$_519c[3];701<c?(b+=String.fromCharCode(64+parseInt(c/676)),b+=String.fromCharCode(64+parseInt(c%676/26))):25<c&&(b+=String.fromCharCode(64+parseInt(c/26)));return b+=String.fromCharCode(65+c%26)},getColumnNameFromCoords:function(c,b){return k.getColumnName(parseInt(c))+(parseInt(b)+1)},getCoordsFromColumnName:function(c){var b=/^[a-zA-Z]+/.exec(c);if(b){for(var a=0,d=0;d<b[0].length;d++)a+=parseInt(b[0].charCodeAt(d)-64)*Math.pow(26,b[0].length-1-d);a--;0>a&&(a=0);c=parseInt(/[0-9]+$/.exec(c))||
|
|
377
|
+
null;0<c&&c--;return[a,c]}}};k.shiftFormula=S.shiftFormula;k.createFromTable=function(c,b){if(c.tagName!=_$_519c[528])console.log(_$_519c[529]);else{b||(b={});b.columns=[];b.data=[];var a=c.querySelectorAll(_$_519c[530]);if(a.length)for(var d=0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$_519c[152]));e&&(b.columns[d]||(b.columns[d]={}),b.columns[d].width=e)}e=function(u){var x=u.getBoundingClientRect();x=50<x.width?x.width:50;b.columns[d]||(b.columns[d]={});u.getAttribute(_$_519c[531])?
|
|
378
|
+
b.columns[d].type=u.getAttribute(_$_519c[531]):b.columns[d].type=_$_519c[56];b.columns[d].width=x+_$_519c[44];b.columns[d].title=u.innerHTML;b.columns[d].align=u.style.textAlign||(b.defaultColAlign?b.defaultColAlign:_$_519c[53]);u.classList.contains(_$_519c[532])&&(b.columns[d].readOnly=!0);if(x=u.getAttribute(_$_519c[533]))b.columns[d].name=x;if(x=u.getAttribute(_$_519c[534]))b.columns[d].id=x};var f=[],g=c.querySelectorAll(_$_519c[535]);if(g.length){for(a=0;a<g.length-1;a++){var h=[];for(d=0;d<
|
|
379
|
+
g[a].children.length;d++){var l={title:g[a].children[d].innerText,colspan:g[a].children[d].getAttribute(_$_519c[52])||1};h.push(l)}f.push(h)}g=g[g.length-1].children;for(d=0;d<g.length;d++)e(g[d])}l=0;var n={},p={},q={},r={},w=null;h=c.querySelectorAll(_$_519c[536]);for(a=0;a<h.length;a++)if(b.data[l]=[],1!=b.parseTableFirstRowAsHeader||g.length||0!=a){for(d=0;d<h[a].children.length;d++){var m=h[a].children[d].getAttribute(_$_519c[537]);m?m.substr(0,1)!=_$_519c[12]&&(m=_$_519c[12]+m):m=h[a].children[d].innerHTML;
|
|
380
|
+
b.data[l].push(m);m=A.getColumnNameFromCoords(d,a);(w=h[a].children[d].getAttribute(_$_519c[538]))&&(r[m]=w);w=parseInt(h[a].children[d].getAttribute(_$_519c[52]))||0;var v=parseInt(h[a].children[d].getAttribute(_$_519c[164]))||0;if(w||v)n[m]=[w||1,v||1];if(w=h[a].children[d].style&&h[a].children[d].style.display==_$_519c[40])h[a].children[d].style.display=_$_519c[3];(w=h[a].children[d].getAttribute(_$_519c[98]))&&(q[m]=w);h[a].children[d].classList.contains(_$_519c[539])&&(q[m]=q[m]?q[m]+_$_519c[540]:
|
|
381
|
+
_$_519c[541])}h[a].style&&h[a].style.height&&(p[a]={height:h[a].style.height});l++}else for(d=0;d<h[a].children.length;d++)e(h[a].children[d]);0<Object.keys(f).length&&(b.nestedHeaders=f);0<Object.keys(q).length&&(b.style=q);0<Object.keys(n).length&&(b.mergeCells=n);0<Object.keys(p).length&&(b.rows=p);0<Object.keys(r).length&&(b.classes=r);h=c.querySelectorAll(_$_519c[542]);if(h.length){c=[];for(a=0;a<h.length;a++){e=[];for(d=0;d<h[a].children.length;d++)e.push(h[a].children[d].innerText);c.push(e)}0<
|
|
382
|
+
Object.keys(c).length&&(b.footers=c)}if(1==b.parseTableAutoCellType)for(c=[],d=0;d<b.columns.length;d++){f=e=!0;c[d]=[];for(a=0;a<b.data.length;a++)if(m=b.data[a][d],c[d][m]||(c[d][m]=0),c[d][m]++,25<m.length&&(e=!1),10==m.length){if(m.substr(4,1)!=_$_519c[185]||m.substr(7,1)!=_$_519c[185])f=!1}else f=!1;a=Object.keys(c[d]).length;f?b.columns[d].type=_$_519c[184]:1==e&&1<a&&a<=parseInt(.1*b.data.length)&&(b.columns[d].type=_$_519c[58],b.columns[d].source=Object.keys(c[d]))}return b}};k.injectArray=
|
|
383
|
+
function(c,b,a){return c.slice(0,b).concat(a).concat(c.slice(b))};k.parseCSV=function(c,b){b=b||_$_519c[25];for(var a=0,d=0,e=[[]],f=0,g=null,h=!1,l=!1,n=0;n<c.length;n++)if(e[d]||(e[d]=[]),e[d][a]||(e[d][a]=_$_519c[3]),c[n]!=_$_519c[543])if(c[n]!=_$_519c[544]&&c[n]!=b||0!=h&&1!=l&&g){c[n]==_$_519c[187]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&c[n]==_$_519c[187]){c[n+1]==_$_519c[187]?(h=!0,e[d][a]+=c[n],n++):l=!0;continue}e[d][a]+=c[n]}else{g=null;l=h=!1;if(e[d][a][0]==_$_519c[187]){var p=
|
|
384
|
+
e[d][a].trim();p[p.length-1]==_$_519c[187]&&(e[d][a]=p.substr(1,p.length-2))}c[n]==_$_519c[544]?(a=0,d++):(a++,a>f&&(f=a))}for(c=0;c<e.length;c++)for(n=0;n<=f;n++)void 0===e[c][n]&&(e[c][n]=_$_519c[3]);return e};k.getTokensFromRange=S.getTokensFromRange;k.getRangeFromTokens=S.getRangeFromTokens;return k}(),xa=function(){var k={},c=null,b=null,a=null,d=!1,e=null,f=null,g=null,h=function(m){function v(J){J.className&&(J.classList.contains(_$_519c[349])&&(y=J),J.classList.contains(_$_519c[362])&&(H=
|
|
385
|
+
J),J.classList.contains(_$_519c[545])&&(L=J));J.tagName==_$_519c[546]?u=1:J.tagName==_$_519c[547]?u=2:J.tagName==_$_519c[548]&&(u=3);J.parentNode&&!y&&v(J.parentNode)}var u=null,x=null,y=null,H=null,L=null,E=null,ba=null,ra=null;v(m.target);if(null!==L)return!1;if(y)if(m.target.classList.contains(_$_519c[330]))x=_$_519c[549];else if(m.target.classList.contains(_$_519c[339]))x=_$_519c[138];else if(m.target.classList.contains(_$_519c[267]))x=_$_519c[411],E=parseInt(m.target.getAttribute(_$_519c[43]));
|
|
386
|
+
else if(m.target.parentNode&&m.target.parentNode.classList.contains(_$_519c[177]))E=m.target.getAttribute(_$_519c[181]),ba=m.target.getAttribute(_$_519c[182]),null===E?x=_$_519c[549]:(x=_$_519c[408],E=parseInt(E),ba=parseInt(ba));else if(m.target.parentNode&&m.target.parentNode.classList.contains(_$_519c[146]))x=_$_519c[550];else if(m.target.classList.contains(_$_519c[150]))x=_$_519c[550];else if(m.target.parentNode&&m.target.parentNode.classList.contains(_$_519c[551]))x=_$_519c[403],E=Array.prototype.indexOf.call(m.target.parentNode.children,
|
|
387
|
+
m.target);else if(1==u)x=_$_519c[410],E=m.target.clientWidth-m.offsetX,m.target.classList.contains(_$_519c[168])&&3<E&&20>E&&(x=_$_519c[552]),E=m.target.getAttribute(_$_519c[42]);else if(2==u){if(m=l(m,y))x=_$_519c[412],E=m[0],ba=m[1],ra=m[2]}else if(3==u){if(E=m.target.getAttribute(_$_519c[42]),ba=m.target.getAttribute(_$_519c[43]),E||ba)x=_$_519c[553]}else u||jSuites.findElement(m.target,_$_519c[554])&&(x=_$_519c[87]);return[y,H,u,x,E,ba,ra]},l=function(m,v){if(m.changedTouches&&m.changedTouches[0]){var u=
|
|
388
|
+
m.changedTouches[0].clientX;m=m.changedTouches[0].clientY}else u=m.clientX,m=m.clientY;v=(v.spreadsheet.config.root?v.spreadsheet.config.root:document).elementsFromPoint(u,m);for(var x=0;x<v.length;x++)if(u=v[x].getAttribute(_$_519c[42]),m=v[x].getAttribute(_$_519c[43]),null!=u&&null!=m)return u=parseInt(u),m=parseInt(m),[u,m,v[x]];return!1},n=function(m){var v=h(m);if(!1===v)return!1;v[0]?v[1]?t.current!=v[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=v[1].jexcel):(m=v[0].tabs.getActive(),
|
|
389
|
+
0<=m&&(t.current=v[0].spreadsheet.worksheets[m])):t.current&&!jSuites.findElement(m.target,_$_519c[219])&&(t.current.resetSelection(!0),t.current=null);return v};k.input=function(m){if(m.target.tagName==_$_519c[555]&&m.target.classList.contains(_$_519c[92])){var v=null;t.current?v=t.current:m.target.getAttribute(_$_519c[556])&&(v=D(m.target.getAttribute(_$_519c[556])));v&&fa.parse.call(v,m.target)}};k.keydown=function(m){if(t.current){m.target.tagName==_$_519c[555]&&m.target.classList.contains(_$_519c[92])&&
|
|
390
|
+
fa.onkeydown.call(t.current,m);if(27==m.which){if(t.current.edition)return t.current.closeEditor(t.current.edition,!1),m.preventDefault(),!1;if(na.event)return na.cancel.call(t.current,m),m.preventDefault(),!1;if(ha.event)return ha.cancel.call(t.current,m),!1;if(1==Y.isVisible())return Y.close.call(t.current,!1),m.preventDefault(),!1}if(!m.target.classList.contains(_$_519c[219]))if(m.target.classList.contains(_$_519c[381])){var v=m.target;e&&clearTimeout(e);e=setTimeout(function(){Y.search.call(t.current,
|
|
391
|
+
v.value);e=null},500)}else if(m.target.classList.contains(_$_519c[395]))v=m.target,e&&clearTimeout(e),e=setTimeout(function(){t.current.search(v.value);e=null},400);else if(t.current.edition){var u=t.current.edition.getAttribute(_$_519c[42]);13==m.which?t.current.options.columns[u].type==_$_519c[184]?t.current.closeEditor(t.current.edition,!0):t.current.options.columns[u].type!=_$_519c[58]&&t.current.options.columns[u].type!=_$_519c[557]&&t.current.options.columns[u].type!=_$_519c[434]&&(m.altKey?
|
|
392
|
+
t.current.parent.input.classList.contains(_$_519c[558])||document.execCommand(_$_519c[559],!1,_$_519c[560]):(t.current.closeEditor(t.current.edition,!0),t.current.down(),m.preventDefault())):9==m.which&&(t.current.closeEditor(t.current.edition,!0),t.current.right(),m.preventDefault())}else if(t.current.selectedCell)if(33==m.which)0<t.current.options.pagination?qa.pageUp.call(t.current):C.pageUp.call(t.current);else if(34==m.which)0<t.current.options.pagination?qa.pageDown.call(t.current):C.pageDown.call(t.current);
|
|
391
393
|
else if(37==m.which)t.current.left(m.shiftKey,m.ctrlKey),m.preventDefault();else if(39==m.which)t.current.right(m.shiftKey,m.ctrlKey),m.preventDefault();else if(38==m.which)t.current.up(m.shiftKey,m.ctrlKey),m.preventDefault();else if(40==m.which)t.current.down(m.shiftKey,m.ctrlKey),m.preventDefault();else if(36==m.which)t.current.first(m.shiftKey,m.ctrlKey),m.preventDefault();else if(35==m.which)t.current.last(m.shiftKey,m.ctrlKey),m.preventDefault();else if(32==m.which)t.current.setCheckRadioValue(),
|
|
392
|
-
m.preventDefault();else if(46==m.which||8==m.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$
|
|
394
|
+
m.preventDefault();else if(46==m.which||8==m.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$_519c[3]);else if(13==m.which)m.shiftKey?t.current.up():(1==t.current.options.allowManualInsertRow&&t.current.selectedCell[1]==(t.current.results?t.current.results[t.current.results.length-1]:t.current.rows.length-1)&&t.current.insertRow(),t.current.selectedCell&&t.current.down()),m.preventDefault();else if(9==m.which)m.shiftKey?t.current.left():(u=t.current.selectedCell[0],
|
|
393
395
|
t.current.right(),1==t.current.options.allowInsertColumn&&1==t.current.options.allowManualInsertColumn&&t.current.selectedCell[0]==u&&(t.current.insertColumn(),t.current.right())),m.preventDefault();else if((m.ctrlKey||m.metaKey)&&!m.shiftKey)65==m.which?(t.current.selectAll(),m.preventDefault()):83==m.which?(t.current.download(),m.preventDefault()):89==m.which?(t.current.parent.redo(),m.preventDefault()):90==m.which?(t.current.parent.undo(),m.preventDefault()):67==m.which?(t.current.copy(),m.preventDefault()):
|
|
394
|
-
88==m.which?(t.current.cut(),m.preventDefault()):86==m.which?k.paste(m):189==m.which&&(1==t.current.options.allowDeleteRow&&
|
|
395
|
-
_$
|
|
396
|
-
!0);else if(
|
|
397
|
-
_$
|
|
398
|
-
m.offsetX)ta.start.call(t.current,m);else{v=t.current.options.columns.length-1;var x=t.current.options.data.length-1;if(u[3]==_$
|
|
399
|
-
|
|
400
|
-
_$
|
|
401
|
-
ha.end.call(t.current,m):m.target.classList.contains(_$
|
|
402
|
-
fa.close.call(t.current)};k.mousemove=function(m){m=m||window.event;if(t.current){var v=m.target.getAttribute(_$
|
|
403
|
-
(m.clientX-x.left)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$
|
|
404
|
-
_$
|
|
405
|
-
2==u[2]&&(u[3]==_$
|
|
406
|
-
50>H.height-(E-H.top)?C.pageDown.call(t.current,1,null,m):80>E-H.top&&C.pageUp.call(t.current,1,null,m);50>H.width-(L-H.left)?C.pageRight.call(t.current,1,null,m):80>L-H.left&&C.pageLeft.call(t.current,1,null,m);f=null},100):f&&(clearTimeout(f),f=null)};k.dblclick=function(m){if(t.current)if(m.target.classList.contains(_$
|
|
407
|
-
!t.current.edition&&v[6]&&t.current.openEditor(v[6])}};k.paste=function(m){if(t.current&&t.current.selectedCell&&!t.current.edition){var v=m.clipboardData||window.clipboardData;v&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],v.getData(_$
|
|
408
|
-
h(m);v[0]?v[1]&&t.current!=v[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=v[1].jexcel):t.current&&(t.current.resetSelection(),t.current=null);if(t.current&&!t.current.edition){var u=v[4];v=v[5];r=m.touches[0];
|
|
409
|
-
|
|
410
|
-
if(
|
|
411
|
-
K.call(f[0],f[1],f[2]),!0);
|
|
412
|
-
t.license=null;t.setLicense=function(k){t.license=k};t.spreadsheet=[];t.picker=fa;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var
|
|
413
|
-
k.spreadsheet=null,k.jexcel=null,k.innerHTML=_$
|
|
414
|
-
|
|
415
|
-
-f.parent.input.offsetHeight));return
|
|
416
|
-
_$
|
|
417
|
-
f;if(null!==
|
|
418
|
-
|
|
419
|
-
e,f));g instanceof Element||g instanceof HTMLDocument||!l||
|
|
420
|
-
f};return
|
|
421
|
-
e,f,g,h,l);
|
|
422
|
-
f,g,h),
|
|
423
|
-
!0);e.format=!0;e.opened=!0;e.width=
|
|
424
|
-
_$
|
|
425
|
-
[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$
|
|
426
|
-
_$
|
|
427
|
-
{},
|
|
428
|
-
function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$
|
|
429
|
-
|
|
430
|
-
e,d.innerText=e))};
|
|
431
|
-
e;return d.outerHTML};return
|
|
432
|
-
d,e,f,g){d=
|
|
433
|
-
e.setAttribute(_$
|
|
434
|
-
return
|
|
435
|
-
|
|
436
|
-
f.setAttribute(_$
|
|
437
|
-
l){return
|
|
438
|
-
var g=document.createElement(_$
|
|
439
|
-
(e=document.createElement(_$
|
|
440
|
-
_$
|
|
441
|
-
(f.style.maxHeight=parseInt(l.options.height)+_$
|
|
442
|
-
l){if(e&&(d=
|
|
443
|
-
n.focus=!0;n.value=e;n.border=!1;n.height=_$
|
|
444
|
-
k.tags=function(){var
|
|
445
|
-
function(d,e,f,g,h,l){d=
|
|
446
|
-
_$
|
|
447
|
-
e&&(f.value=(_$
|
|
448
|
-
e).split(_$
|
|
449
|
-
{id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,d)),l.push(h)}else console.error(_$
|
|
450
|
-
_$
|
|
396
|
+
88==m.which?(t.current.cut(),m.preventDefault()):86==m.which?k.paste(m):189==m.which&&(1==t.current.options.allowDeleteRow&&a==_$_519c[411]?(t.current.deleteRow(),m.preventDefault()):1==t.current.options.allowDeleteColumn&&a==_$_519c[410]&&(t.current.deleteColumn(),m.preventDefault()));else if(t.current.selectedCell&&t.current.isEditable()){u=t.current.selectedCell[1];var x=t.current.selectedCell[0];t.current.options.columns[x].type!=_$_519c[18]&&(32==m.keyCode?t.current.options.columns[x].type==
|
|
397
|
+
_$_519c[250]||t.current.options.columns[x].type==_$_519c[252]?m.preventDefault():t.current.openEditor(t.current.records[u][x].element,!0,m):113==m.keyCode?t.current.openEditor(t.current.records[u][x].element,!1,m):1!=m.key.length&&m.key!=_$_519c[561]||m.altKey||m.ctrlKey||t.current.records[u]&&t.current.openEditor(t.current.records[u][x].element,!0,m))}}};var p=function(m,v,u,x,y,H){if(1==t.current.parent.input.classList.contains(_$_519c[92])&&fa.update.call(t.current,m,v,u,x,y))return!1;if(t.current.edition)t.current.closeEditor(t.current.edition,
|
|
398
|
+
!0);else if(a&&a!==H)return!1;fa.current?fa.range.call(t.current,m,v,u,x,y):va[_$_519c[11]].call(t.current,m,v,u,x,y)};k.mousedown=function(m){m=m||window.event;var v=m.buttons?m.buttons:m.button?m.button:m.which;if(t.current)if(1==Y.isVisible()&&(jSuites.findElement(m.target,_$_519c[385])||Y.close.call(t.current,!1)),t.current.edition){if(jSuites.findElement(m.target,_$_519c[99]))return!1}else if(jSuites.findElement(m.target,_$_519c[219]))return!1;var u=n(m);if(!1===u)return!1;g=u;if(1<v)if(u[3]==
|
|
399
|
+
_$_519c[410]){if(t.current.isSelected(u[4],null))return!1}else if(u[3]==_$_519c[411]){if(t.current.isSelected(null,u[4]))return!1}else if(u[3]==_$_519c[412]&&t.current.isSelected(u[4],u[5]))return!1;if(t.current){if(u[3]==_$_519c[138])t.current.isEditable()&&(ha.event=!0);else if(u[3]==_$_519c[552])Y.open.call(t.current,u[4]);else{if(1==u[2])if(1==t.current.options.columnDrag&&6>m.target.offsetHeight-m.offsetY)na.start.call(t.current,m);else if(1==t.current.options.columnResize&&6>m.target.offsetWidth-
|
|
400
|
+
m.offsetX)ta.start.call(t.current,m);else{v=t.current.options.columns.length-1;var x=t.current.options.data.length-1;if(u[3]==_$_519c[549])p(0,0,v,x,m,u[3]),b=c=0;else if(u[3]==_$_519c[408]){var y=la.range.call(t.current,u[5])[u[4]];y[1]>v&&(y[1]=v);p(y[0],0,y[1],x,m,u[3]);c=y[0];b=0}else(m.shiftKey||m.ctrlKey)&&null!=c&&null!=b?p(c,0,u[4],x,m,u[3]):(u[3]==_$_519c[410]&&c==u[4]&&1==t.current.options.allowRenameColumn&&(f=setTimeout(function(){t.current.setHeader(u[4])},800)),p(u[4],0,u[4],x,m,u[3]),
|
|
401
|
+
c=u[4],b=0)}if(2==u[2])if(u[3]==_$_519c[411])1==t.current.options.rowDrag&&6>m.target.offsetWidth-m.offsetX?na.start.call(t.current,m):1==t.current.options.rowResize&&6>m.target.offsetHeight-m.offsetY?ta.start.call(t.current,m):(v=t.current.options.columns.length-1,x=parseInt(u[4]),(m.shiftKey||m.ctrlKey)&&null!=c&&null!=b?p(0,b,v,x,m,u[3]):(p(0,x,v,x,m,u[3]),c=0,b=x));else if(u[3]==_$_519c[412]){v=parseInt(u[4]);x=parseInt(u[5]);if(!t.current.edition&&(y=t.current.options.columns[u[4]].type,m.target.tagName==
|
|
402
|
+
_$_519c[562]&&(y==_$_519c[253]||y==_$_519c[254])&&m.target.parentNode.classList.contains(_$_519c[124]))){var H=m.target.innerText;y==_$_519c[253]&&(H=_$_519c[563]+H);window.open(H,_$_519c[564])}(m.shiftKey||m.ctrlKey)&&null!=c&&null!=b?p(c,b,v,x,m,u[3]):(p(v,x,v,x,m,u[3]),c=v,b=x)}}a=u[3];typeof u[3]!==_$_519c[13]&&B.call(t.current.parent,_$_519c[565],t.current,u[3],u[4],u[5]);d=!0}else d=!1};k.mouseup=function(m){t.current&&(na.event?na.end.call(t.current,m):ta.event?ta.end.call(t.current,m):ha.event?
|
|
403
|
+
ha.end.call(t.current,m):m.target.classList.contains(_$_519c[384])?Y.close.call(t.current,!0):t.current.edition&&m.target.classList.contains(_$_519c[566])&&50>m.target.clientWidth-m.offsetX&&50>m.offsetY?Z.close.call(t.current,null,!0):m.target.classList.contains(_$_519c[318])&&(m=m.target.innerText==_$_519c[215]?0:m.target.innerText==_$_519c[216]?m.target.getAttribute(_$_519c[264])-1:m.target.innerText-1,qa[_$_519c[11]].call(t.current,parseInt(m))));f&&(clearTimeout(f),f=null);d=a=!1;fa.current&&
|
|
404
|
+
fa.close.call(t.current)};k.mousemove=function(m){m=m||window.event;if(t.current){var v=m.target.getAttribute(_$_519c[42]),u=m.target.getAttribute(_$_519c[43]);if(1==d)na.event?na.update.call(t.current,m):ta.event?ta.update.call(t.current,m):La.event&&La.update.call(t.current,m);else{var x=m.target.getBoundingClientRect();t.current.cursor&&(t.current.cursor.style.cursor=_$_519c[3],t.current.cursor=null);1==t.current.options.editable&&(v||u)&&(1==t.current.options.rowResize&&m.target&&v&&!u&&5>x.width-
|
|
405
|
+
(m.clientX-x.left)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$_519c[567]):1==t.current.options.columnResize&&m.target&&!v&&u&&5>x.height-(m.clientY-x.top)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$_519c[568]):1==t.current.options.rowDrag&&m.target&&!v&&u&&5>x.width-(m.clientX-x.left)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$_519c[569]):1==t.current.options.columnDrag&&m.target&&v&&!u&&5>x.height-(m.clientY-x.top)&&(t.current.cursor=m.target,t.current.cursor.style.cursor=
|
|
406
|
+
_$_519c[569]))}}};k.mouseover=function(m){m=m||window.event;var v=!1;if(t.current&&1==d){var u=h(m);if(u[0]){if(u[1]&&t.current!=u[1].jexcel&&t.current)return!1;if(!na.event&&!ta.event)if(ha.event){var x=m.target.getAttribute(_$_519c[42]),y=m.target.getAttribute(_$_519c[43]);t.current.isSelected(x,y)||null===x||null===y||(ha.call(t.current,x,y),v=!0)}else null!==c&&null!==b&&(1==u[2]&&(x=c,u[3]==_$_519c[410]&&(x=m.target.getAttribute(_$_519c[42])),y=t.current.options.data.length-1,p(c,0,x,y,m,u[3])),
|
|
407
|
+
2==u[2]&&(u[3]==_$_519c[411]?(x=t.current.options.columns.length-1,y=parseInt(m.target.getAttribute(_$_519c[43])),p(0,b,x,y,m,u[3])):u[3]==_$_519c[412]&&(x=m.target.getAttribute(_$_519c[42]),y=m.target.getAttribute(_$_519c[43]),x&&y&&(p(c,b,x,y,m,u[3]),v=!0))))}}1==v&&!f&&C.limited.call(t.current)?f=setTimeout(function(){var H=t.current.content.getBoundingClientRect();if(m.changedTouches&&m.changedTouches[0])var L=m.changedTouches[0].clientX,E=m.changedTouches[0].clientY;else L=m.clientX,E=m.clientY;
|
|
408
|
+
50>H.height-(E-H.top)?C.pageDown.call(t.current,1,null,m):80>E-H.top&&C.pageUp.call(t.current,1,null,m);50>H.width-(L-H.left)?C.pageRight.call(t.current,1,null,m):80>L-H.left&&C.pageLeft.call(t.current,1,null,m);f=null},100):f&&(clearTimeout(f),f=null)};k.dblclick=function(m){if(t.current)if(m.target.classList.contains(_$_519c[339]))ha.execute.call(t.current,!1);else{var v=h(m);1==v[2]?1==t.current.options.columnSorting&&(m=m.target.getAttribute(_$_519c[42]))&&t.current.orderBy(m):2==v[2]&&t.current.isEditable()&&
|
|
409
|
+
!t.current.edition&&v[6]&&t.current.openEditor(v[6])}};k.paste=function(m){if(t.current&&t.current.selectedCell&&!t.current.edition){var v=m.clipboardData||window.clipboardData;v&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],v.getData(_$_519c[56])),m&&m.preventDefault())}};k.contextmenu=function(m){var v=n(m);!1!==v&&(v[1]||(v=g),t.current&&!t.current.edition&&(v=Array.prototype.slice.call(v,3),Na.open.call(t.current,m,v)))};var q=null,r=null,w=null;k.touchstart=function(m){var v=
|
|
410
|
+
h(m);v[0]?v[1]&&t.current!=v[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=v[1].jexcel):t.current&&(t.current.resetSelection(),t.current=null);if(t.current&&!t.current.edition){var u=v[4];v=v[5];r=m.touches[0];q=m.touches.length;w=[u,v];if(null!==u&&null!==v){t.current.updateSelectionFromCoords(u,v,u,v);var x=m.target;f=setTimeout(function(){t.current.openEditor(x,!1,m);f=null},250)}}};k.touchmove=function(m){f&&(clearTimeout(f),f=null);if(t.current){m=m.changedTouches[0];if(r)if(1<
|
|
411
|
+
q){var v=document.elementFromPoint(m.pageX,m.pageY),u=v.getAttribute(_$_519c[42]);v=v.getAttribute(_$_519c[43]);null!==u&&null!==v&&t.current.updateSelectionFromCoords(w[0],w[1],u,v)}else t.current.scrollY.scrollTop+=-1*(m.clientY-r.clientY),t.current.scrollX.scrollLeft+=-1*(m.clientX-r.clientX);r=m}};k.touchend=function(m){f&&(clearTimeout(f),f=null);w=r=q=null};k.resize=function(){t.current&&1==t.current.parent.config.fullscreen&&C.refresh.call(t.current)};return k}(),t=function(k,c,b){c||(c={});
|
|
412
|
+
if(c.cloud&&!b)typeof c.plugins.cloud==_$_519c[85]?c.plugins.cloud.load(c,function(f){t(k,f,!0)}):console.error(_$_519c[570]);else{if(k.spreadsheet)a=k.spreadsheet,za[_$_519c[11]].call(a,c);else var a=ka.spreadsheet(k,c);a.processing=!0;1==a.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[a.name]=function(){for(var f=0;f<a.worksheets.length;f++)a.worksheets[f].onload();a.processing=!1;if(Array.isArray(a.queue)&&0<a.queue.length)for(;f=a.queue.shift();)f[0].updateCell(f[1],f[2],
|
|
413
|
+
K.call(f[0],f[1],f[2]),!0);a.config.toolbar&&ca.show.call(a);for(f=0;f<a.worksheets.length;f++)W.refresh.call(a.worksheets[f]);if(typeof a.config.onload==_$_519c[85])a.config.onload(a);ea.state.call(a);jSuites.loading.hide()};Array.isArray(c.worksheets)&&(c=c.worksheets);if(Array.isArray(c)){b=null;for(var d=[],e=0;e<c.length;e++)b=ka.worksheet(a,c[e]),d.push(b)}else d=ka.worksheet(a,c);jSuites.ajax.pending(a.name)||(jSuites.ajax.oncomplete[a.name](),jSuites.ajax.oncomplete[a.name]=null);return d}};
|
|
414
|
+
t.license=null;t.setLicense=function(k){t.license=k};t.spreadsheet=[];t.picker=fa;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var c=Object.keys(k),b=0;b<c.length;b++)typeof k[c[b]]===_$_519c[85]&&(t[c[b]]=k[c[b]],t.extensions[c[b]]=k[c[b]],t.license&&typeof t[c[b]].license==_$_519c[85]&&t[c[b]].license.call(t,t.license))};t.destroy=function(k,c){k.spreadsheet&&(c&&ka.unbind(k),c=t.spreadsheet.indexOf(k.spreadsheet),t.spreadsheet.splice(c,1),
|
|
415
|
+
k.spreadsheet=null,k.jexcel=null,k.innerHTML=_$_519c[3],k.classList.remove(_$_519c[571]),k.classList.remove(_$_519c[349]))};t.version=F;t.helpers=A;t.events=xa;typeof formula!==_$_519c[13]&&(t.formula=formula);t.editors=function(){var k={},c=function(b,a){return 1==b[a]||b.options&&1==b.options[a]?!0:b[a]==_$_519c[229]||b.options&&b.options[a]==_$_519c[229]?!0:!1};k.createEditor=function(b,a,d,e){e.parent.input.setAttribute(_$_519c[100],!1);b==_$_519c[220]?(b=document.createElement(_$_519c[220]),
|
|
416
|
+
b.type=_$_519c[56],b.value=d):b=document.createElement(_$_519c[20]);b.style.width=a.offsetWidth-2+_$_519c[44];b.style.height=a.offsetHeight-1+_$_519c[44];e.parent.input.appendChild(b);return b};k.createDialog=function(b,a,d,e,f,g){b=k.createEditor(_$_519c[20],b,a,f);b.classList.add(_$_519c[572]);b.classList.add(_$_519c[566]);800>window.innerWidth?(f.parent.input.style.top=_$_519c[144],f.parent.input.style.left=_$_519c[144]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=
|
|
417
|
+
-f.parent.input.offsetHeight));return b};k.general=function(){var b={},a=function(e){e=(_$_519c[3]+e)[0];return e==_$_519c[12]||e==_$_519c[573]?!0:!1},d=function(e){if(e.format||e.mask||e.locale){var f={};e.mask?f.mask=e.mask:e.format?f.mask=e.format:(f.locale=e.locale,f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};b.updateCell=function(e,f,g,h,l,n){g=parseInt(g);h=parseInt(h);if(e){var p=d(n),q=null;f===_$_519c[3]||a(f)||typeof f===
|
|
418
|
+
_$_519c[14]||(p?(p=jSuites.mask.extract(f,p,!0))&&p.value!==_$_519c[3]&&(q=p.value):1==(!1===l.options.autoCasting||!1===n.autoCasting?!1:!0)&&(n.type==_$_519c[14]||n.type==_$_519c[307]||n.type==_$_519c[306]?(p=jSuites.mask.extract(f,n,!0))&&p.value!==_$_519c[3]&&(q=p.value):jSuites.isNumeric(Number(f))&&(q=Number(f))));null!==q&&(f=q);f=b.parseValue(g,h,f,l,n,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_519c[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=
|
|
419
|
+
f;if(null!==q)return q}};b.createCell=b.updateCell;b.openEditor=function(e,f,g,h,l,n){var p=l.parent.input;p.onblur=function(){p.classList.contains(_$_519c[92])||l.closeEditor(e,!0)};if(n.type==_$_519c[14]||n.type==_$_519c[307]||n.type==_$_519c[306])p.classList.add(_$_519c[558]),a(f)||n.inputmode||(n.inputmode=_$_519c[574]);g=null;a(f)||(n.inputmode&&p.setAttribute(_$_519c[96],n.inputmode),(g=d(n))?(n.disabledMaskOnEdition||(n.mask?(n=n.mask.split(_$_519c[263]),p.setAttribute(_$_519c[94],n[0])):n.locale&&
|
|
420
|
+
p.setAttribute(_$_519c[575],n.locale)),g.input=l.parent.input,l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&n.type==_$_519c[306]&&(f*=100));g||(p.innerText=f,jSuites.focus(l.parent.input))};b.closeEditor=function(e,f,g,h,l,n){e=l.parent.input;f=f?e.innerText:_$_519c[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_519c[3]):n.type==_$_519c[306]&&(f+=_$_519c[576],e.classList.remove(_$_519c[577]));return f};b.parseValue=function(e,f,g,h,l,n){a(g)&&1==h.parent.config.parseFormulas&&(g=h.executeFormula(g,
|
|
421
|
+
e,f));g instanceof Element||g instanceof HTMLDocument||!l||a(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),n&&f.mask&&(f=f.mask.split(_$_519c[263]),f[1]&&(f[1].match(new RegExp(_$_519c[578],_$_519c[377]))&&(0>g?n.classList.add(_$_519c[579]):n.classList.remove(_$_519c[579])),f[1].match(new RegExp(_$_519c[580],_$_519c[377]))&&0>g&&(e=_$_519c[212]+e+_$_519c[232]))),e&&(g=e));return g};b[_$_519c[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_519c[306]?100*parseFloat(f):
|
|
422
|
+
f};return b}();k.text=k.general;k.number=k.general;k.numeric=k.general;k.percent=k.general;k.notes=function(){var b={},a=null;b.updateCell=function(d,e,f,g,h,l){d&&(f=document.createElement(_$_519c[20]),f.classList.add(_$_519c[581]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_519c[3],d.appendChild(f))};b.createCell=b.updateCell;b.openEditor=function(d,e,f,g,h,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_519c[582];n.toolbar=!1;a=k.createDialog(d,
|
|
423
|
+
e,f,g,h,l);a=jSuites.editor(a,n)};b.closeEditor=function(d,e,f,g,h,l){return e?a.getData():_$_519c[3]};return b}();k.dropdown=function(){var b={createCell:function(a,d,e,f,g,h){h.render==_$_519c[583]?a.classList.add(_$_519c[584]):a.classList.add(_$_519c[585]);if(a=b.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_519c[585])},updateCell:function(a,d,e,f,g,h){if(a){var l=b.getItem(a,d,e,f,g,h);l?a.innerHTML=l:d?(d=b.fromLabel(a,d,e,f,g,h),d.length?(l=b.getItem(a,d,e,
|
|
424
|
+
f,g,h),a.innerHTML=l):a.innerHTML=_$_519c[3]):a.innerHTML=_$_519c[3];return d}},openEditor:function(a,d,e,f,g,h){var l=k.createEditor(_$_519c[20],a,d,g),n=h.delimiter||_$_519c[263];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_519c[85]&&(h.source=h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_519c[85]&&(h=h.filterOptions(g,a,e,f,d,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));c(h,_$_519c[586])&&(e.multiple=!0);c(h,_$_519c[57])&&(e.autocomplete=
|
|
425
|
+
!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};c(h,_$_519c[586])?d&&(e.value=(_$_519c[3]+d).split(n)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(a,d,e,f,g,h){for(var l=g.parent.input.children[0],n=h.delimiter||_$_519c[263],p=l.dropdown.getText(!0),q=l.dropdown.getValue(!0),r=0;r<q.length;r++)!1===b.getItem(a,q[r],e,f,g,h)&&h.source.push({id:q[r],name:p[r]});l.dropdown.close(!0);if(d)return q.join(n)},fromLabel:function(a,d,e,f,g,h){a=h.delimiter||
|
|
426
|
+
_$_519c[263];e=[];f=[];Array.isArray(d)||(d=(_$_519c[3]+d).split(a));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);!c(h,_$_519c[586])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<h.source.length;d++)f[h.source[d].name]&&e.push(h.source[d].id);return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$_519c[263];a=[];e=[];Array.isArray(d)||(d=(_$_519c[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!c(h,_$_519c[586])&&1<Object.keys(f).length&&(d=
|
|
427
|
+
[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_519c[84])for(d=0;d<h.source.length;d++)f=h.source[d],h.source[d]={id:f,name:f};for(d=0;d<h.source.length;d++)typeof e[h.source[d].id]!==_$_519c[13]&&a.push(h.render==_$_519c[255]?h.source[d].color:h.render==_$_519c[587]?h.source[d].image:h.source[d].name);if(a.length){if(typeof h.render!==_$_519c[13]){for(d=0;d<a.length;d++)e=d,f=a[d],f=h.render==_$_519c[255]?_$_519c[588]+f+_$_519c[589]:h.render==_$_519c[587]?_$_519c[588]+f+_$_519c[589]:h.render==
|
|
428
|
+
_$_519c[583]?_$_519c[591]+(h.source[d].color||_$_519c[590])+_$_519c[592]+f+_$_519c[593]:void 0,a[e]=f;return a.join(_$_519c[3])}for(d=0;d<a.length;d++)a[d]=(_$_519c[3]+a[d]).replace(_$_519c[215],_$_519c[594]);return a.join(_$_519c[295])}return!1}};b[_$_519c[51]]=function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_519c[255]?a.source[e].color:a.render==_$_519c[587]?a.source[e].image:a.source[e].name};return b}();k.autocomplete=k.dropdown;k.calendar=function(){var b=
|
|
429
|
+
{},a=null;b.updateCell=function(d,e,f,g,h,l){if(d){f=e;l=b.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_519c[3]+e;g.substr(4,1)==_$_519c[185]&&g.substr(7,1)==_$_519c[185]?g=!0:(g=g.split(_$_519c[185]),g=4==g[0].length&&g[0]==Number(g[0])&&2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$_519c[3];return _$_519c[3]}};b.createCell=b.updateCell;b.openEditor=
|
|
430
|
+
function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_519c[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options||{};f.opened=!0;f.onclose=function(n,p){h.closeEditor(d,!0)};typeof l.timepicker!==_$_519c[13]&&(f.time=c(l,_$_519c[595])?!0:!1);typeof f.readonly!==_$_519c[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;a=k.createEditor(_$_519c[220],d,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&a.focus()};b.closeEditor=function(d,e,f,g,h){d=a.calendar.close(!0,
|
|
431
|
+
a.value?!0:!1);d=a.value?d:_$_519c[3];if(e)return d};b.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_519c[596]};b[_$_519c[51]]=function(d,e){d=b.getFormat(d);return jSuites.calendar.getDateString(e,d)};return b}();k.color=function(){var b={},a=null;b.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_519c[597]?(f=document.createElement(_$_519c[20]),f.className=_$_519c[255],f.style.backgroundColor=e,d.innerText=_$_519c[3],d.appendChild(f)):(d.style.color=
|
|
432
|
+
e,d.innerText=e))};b.createCell=b.updateCell;b.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_519c[85]&&(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(n,p){h.closeEditor(d,!0)};a=k.createEditor(_$_519c[220],d,e,h);a=jSuites.color(a,l);a.open()};b.closeEditor=function(d,e,f,g,h,l){d=a.close(!0);if(e)return d};b[_$_519c[51]]=function(d,e){d=document.createElement(_$_519c[20]);d.style.width=_$_519c[598];d.style.height=_$_519c[22];d.style.backgroundColor=
|
|
433
|
+
e;return d.outerHTML};return b}();k.checkbox=function(){var b={createCell:function(a,d,e,f,g,h){d=d&&d!=_$_519c[599]&&d!=_$_519c[600]?!0:!1;e=document.createElement(_$_519c[220]);e.type=_$_519c[250];e.checked=d;e.onclick=function(){g.setValue(a,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_519c[601],_$_519c[601]);a.innerHTML=_$_519c[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_519c[599]&&d!=_$_519c[600]?!0:!1;a&&(a.children[0].checked=d);return d},openEditor:function(a,
|
|
434
|
+
d,e,f,g){d=a.children[0].checked?!1:!0;g.setValue(a,d);return!1},closeEditor:function(a,d){return!1}};b[_$_519c[51]]=function(a,d){return 1==d||1==d||d==_$_519c[229]?jSuites.translate(_$_519c[229]):jSuites.translate(_$_519c[599])};return b}();k.radio=function(){var b={createCell:function(a,d,e,f,g,h){a.getAttribute(_$_519c[42]);e=document.createElement(_$_519c[220]);e.type=_$_519c[252];e.checked=1==d||1==d||d==_$_519c[229]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&
|
|
435
|
+
e.setAttribute(_$_519c[601],_$_519c[601]);a.innerHTML=_$_519c[3];a.appendChild(e)},updateCell:function(a,d,e,f,g){d=1==d||1==d||d==_$_519c[229]||d==_$_519c[602]?!0:!1;a&&(a.children[0].checked=d);if(1==d){a=[];for(var h=0;h<g.options.data.length;h++)f!=h&&g.options.data[h][e]&&a.push({x:e,y:h,value:0});a.length&&g.setValue(a)}return d},openEditor:function(a,d,e,f,g){return!1},closeEditor:function(a,d){return!1}};b[_$_519c[51]]=function(a,d){return 1==d||1==d||d==_$_519c[229]?_$_519c[229]:_$_519c[599]};
|
|
436
|
+
return b}();k.autonumber=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,l){(e=parseInt(e))||0<parseInt(d.innerText)&&(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?b.isValid(e,f,g,h)||(e=_$_519c[243]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_519c[220],d,e,h);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};b.closeEditor=function(d,e,f,g,h){return e?a.value:_$_519c[3]};
|
|
437
|
+
b.isValid=function(d,e,f,g){for(var h,l=0;l<g.options.data.length;l++)if(h=g.value(e,l),h==d&&l!=f)return!1;return!0};return b}();k.progressbar=function(){var b={},a=null;b.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$_519c[555])var f=d.children[0];else f=document.createElement(_$_519c[20]),f.classList.add(_$_519c[256]),d.innerText=_$_519c[3],d.classList.add(_$_519c[603]),d.appendChild(f);f.style.width=parseInt(e)+_$_519c[576];
|
|
438
|
+
f.setAttribute(_$_519c[264],parseInt(e)+_$_519c[576])};b.destroyCell=function(d){d.classList.remove(_$_519c[603])};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_519c[220],d,e,h);a.type=_$_519c[14];a.setAttribute(_$_519c[604],0);a.setAttribute(_$_519c[605],100);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};b.closeEditor=function(d,e,f,g,h){return e?a.value:_$_519c[3]};return b}();k.rating=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,
|
|
439
|
+
l){return b.setCell(d,e,l)};b.destroyCell=function(d){d.classList.remove(_$_519c[606])};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_519c[220],d,e,h);a.type=_$_519c[14];a.setAttribute(_$_519c[604],0);a.setAttribute(_$_519c[605],5);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};b.closeEditor=function(d,e,f,g,h,l){return e?a.value:_$_519c[3]};b.setCell=function(d,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(d){f=f&&f.color?f.color:_$_519c[579];
|
|
440
|
+
var g=document.createElement(_$_519c[20]);g.setAttribute(_$_519c[264],parseInt(e)+_$_519c[607]);g.classList.add(_$_519c[257]);for(var h=0;h<e;h++){var l=document.createElement(_$_519c[443]);l.className=_$_519c[508];l.style.color=f;l.innerHTML=_$_519c[608];g.appendChild(l)}d.innerHTML=_$_519c[3];d.className=_$_519c[606];d.appendChild(g)}return e};return b}();k.email=function(){var b={createCell:function(a,d,e,f,g,h){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_519c[562]?e=a.children[0]:
|
|
441
|
+
(e=document.createElement(_$_519c[201]),a.innerText=_$_519c[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_519c[609],h.options.url)),e.innerText=d)}};b.updateCell=b.createCell;b.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_519c[558]);g.parent.input.onblur=function(){g.closeEditor(a,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};b.closeEditor=function(a,d,e,f,g){g.parent.input.classList.remove(_$_519c[558]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,
|
|
442
|
+
_$_519c[188]),_$_519c[3]):_$_519c[3]};return b}();k.url=k.email;k.image=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,l){d&&(e?d.children&&d.children[0]&&d.children[0].tagName==_$_519c[610]?d.children[0].src=e:(f=document.createElement(_$_519c[37]),l.render==_$_519c[611]&&f.classList.add(_$_519c[611]),l.options&&(f.style.maxWidth=_$_519c[612],l.options.absolute&&(f.style.position=_$_519c[613]),l.options.width&&(f.style.maxWidth=parseInt(l.options.width)+_$_519c[44]),l.options.height&&
|
|
443
|
+
(f.style.maxHeight=parseInt(l.options.height)+_$_519c[44],f.style.marginTop=-1*parseInt(l.options.height)/2+_$_519c[44])),f.src=e,d.innerHTML=_$_519c[3],d.appendChild(f)):d.innerHTML=_$_519c[3])};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_519c[37]),d.src=e,d.classList.add(_$_519c[614]),d.style.width=_$_519c[612],a.appendChild(d));jSuites.image(a,l)};b.closeEditor=function(d,e,f,g,h,
|
|
444
|
+
l){if(e&&(d=a.children[0]))return d.tagName==_$_519c[610]?d.src:_$_519c[3]};b[_$_519c[51]]=function(d,e){return _$_519c[615]+e+_$_519c[616]};return b}();k.html=function(){var b={},a=null;b.createCell=function(d,e){d.classList.add(_$_519c[617]);var f=document.createElement(_$_519c[20]);f.innerHTML=e;d.appendChild(f)};b.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};b.destroyCell=function(d){d.classList.remove(_$_519c[617])};b.openEditor=function(d,e,f,g,h,l){var n=l&&l.options?l.options:{};
|
|
445
|
+
n.focus=!0;n.value=e;n.border=!1;n.height=_$_519c[582];e=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(e,n);a.close=function(){h.closeEditor(d,!0)};jSuites.tracking(a,!0)};b.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return b}();k.hidden=function(){return{createCell:function(b,a,d,e,f){b.style.display=_$_519c[40];b.innerText=a},updateCell:function(b,a,d,e,f){b&&(b.innerText=a)},openEditor:function(b,a,d,e,f){return!1},closeEditor:function(b,a){return!1}}}();
|
|
446
|
+
k.tags=function(){var b={},a=null;b.createCell=function(d,e){d.classList.add(_$_519c[618]);b.updateCell(d,e)};b.updateCell=function(d,e){d&&(d.innerHTML=e)};b.destroyCell=function(d){d.classList.remove(_$_519c[618])};b.openEditor=function(d,e,f,g,h,l){var n=l&&l.options?l.options:{};n.value=e;a=k.createDialog(d,e,f,g,h,l);d=document.createElement(_$_519c[20]);d.style.margin=_$_519c[22];d.style.marginRight=_$_519c[619];a.appendChild(d);a=jSuites.tags(d,n);d.focus();jSuites.focus(d)};b.closeEditor=
|
|
447
|
+
function(d,e,f,g,h,l){d=a.getValue();if(e)return d};return b}();k.record=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,l){d.classList.add(_$_519c[585]);var n;(n=h.parent.getWorksheetInstance(l.worksheetId))?n.rows?b.updateCell(d,e,f,g,h,l):(d.innerText=_$_519c[243],h.parent.queue.push([h,f,g])):(d.innerText=_$_519c[243],h.parent.queue.push([h,f,g]))};b.destroyCell=function(d){d.classList.remove(_$_519c[585])};b.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_519c[13]?d.innerText=
|
|
448
|
+
_$_519c[243]:d.innerHTML=b.getValue(d,e,f,g,h,l))};b.openEditor=function(d,e,f,g,h,l){var n=l.delimiter||_$_519c[263];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_519c[85]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_519c[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;f.data=b.getSource(h,l);c(l,_$_519c[586])&&(f.multiple=!0);c(l,_$_519c[57])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};c(l,_$_519c[586])?
|
|
449
|
+
e&&(f.value=(_$_519c[3]+e).split(n)):f.value=e;a=k.createEditor(_$_519c[20],d,e,h);a=jSuites.dropdown(a,f)};b.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_519c[263];f=a.getValue(!0);a.close(!0);if(e)return f.join(d)};b.getValue=function(d,e,f,g,h,l){d=[];if(typeof l.worksheetId==_$_519c[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_519c[3]||0==e||null==e||void 0==e)return _$_519c[3];e=(_$_519c[3]+
|
|
450
|
+
e).split(_$_519c[263]);for(g=0;g<e.length;g++){var n=e[g].trim();var p=h.name(f);n=h.getRowById(n);p=!1===n?_$_519c[620]:n[p];0<=l.worksheetImage&&(p=_$_519c[621]+p+_$_519c[622]);d.push(p)}return 0<=l.worksheetImage?d.join(_$_519c[3]):d.join(_$_519c[295])}return _$_519c[243]};b.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_519c[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(d=0;d<g.rows.length;d++)if(h=g.value(f,d))h=
|
|
451
|
+
{id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,d)),l.push(h)}else console.error(_$_519c[623]+e.worksheetId);return l};b[_$_519c[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_519c[255]?d.source[f].color:d.render==_$_519c[587]?d.source[f].image:d.source[f].name};return b}();return k}();typeof jQuery!==_$_519c[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(c){var b=k(this)[_$_519c[51]](0);if(b.jspreadsheet){if(typeof arguments[0]==
|
|
452
|
+
_$_519c[14])var a=arguments[0],d=2;else a=0,d=1;return b.jspreadsheet[a][c].apply(b.jspreadsheet[a],Array.prototype.slice.call(arguments,d))}return t(k(this)[_$_519c[51]](0),arguments[0])}}(jQuery);return t});
|