jspreadsheet 9.1.10 → 9.1.11
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 +440 -440
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v9.1.
|
|
2
|
+
* Jspreadsheet v9.1.11
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -22,7 +22,7 @@ $jscomp.polyfill=function(E,J,M,X){J&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
22
22
|
$jscomp.polyfillIsolated=function(E,J,M,X){var W=E.split(".");E=1===W.length;X=W[0];X=!E&&X in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<W.length-1;Z++){var qa=W[Z];if(!(qa in X))return;X=X[qa]}W=W[W.length-1];M=$jscomp.IS_SYMBOL_NATIVE&&"es6"===M?X[W]:null;J=J(M);null!=J&&(E?$jscomp.defineProperty($jscomp.polyfills,W,{configurable:!0,writable:!0,value:J}):J!==M&&(void 0===$jscomp.propertyToPolyfillSymbol[W]&&(M=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[W]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
23
|
$jscomp.global.Symbol(W):$jscomp.POLYFILL_PREFIX+M+"$"+W),$jscomp.defineProperty(X,$jscomp.propertyToPolyfillSymbol[W],{configurable:!0,writable:!0,value:J})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(E){E={next:E};E[Symbol.iterator]=function(){return this};return E};
|
|
24
24
|
$jscomp.iteratorFromArray=function(E,J){E instanceof String&&(E+="");var M=0,X=!1,W={next:function(){if(!X&&M<E.length){var Z=M++;return{value:J(Z,E[Z]),done:!1}}X=!0;return{done:!0,value:void 0}}};W[Symbol.iterator]=function(){return W};return W};$jscomp.polyfill("Array.prototype.values",function(E){return E?E:function(){return $jscomp.iteratorFromArray(this,function(J,M){return M})}},"es8","es3");
|
|
25
|
-
var _$
|
|
25
|
+
var _$_f4f9=["use strict","{","}","","9.1.11","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","&","<","g","<",">",">","=","!",'"',"undefined","number","fullscreen","block","string","readonly","jss_rotate","span","rotate(","deg)","jss_hidden_index","div","right","10px","pointer","/v9",",","localhost",".","v9"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license",
|
|
26
26
|
"Your license is expired. Please renew your certificate.","jspreadsheet","img","/jspreadsheet/","logo.png","none","status","edition","scope","data-x","data-y","get","px","jss_frozen","0px","scroll","wheel","goto","jss_scroll","jss_hidden","jss_content_overflow","onresize","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge",
|
|
27
27
|
"setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","setFreezeColumns","setFreezeRows","orderBy","setValue","setProperty","updateProperty","renameWorksheet","moveWorksheet","setDefinedNames","onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","hidden","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","oninput",
|
|
28
28
|
"setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","onbeforesend","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!",":","jss_border","cloning","jss_border_","15","jss_resize_corner","data-action","ontouchstart","moveLeft",
|
|
@@ -42,450 +42,450 @@ var _$_b699=["use strict","{","}","","9.1.10","Base","https://jspreadsheet.com",
|
|
|
42
42
|
"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","html","jss_nowrap","insertHTML","<br/>\n","Process","move","col-resize","grab","row-resize","A","mailto:","_blank","onclick","jclose","DOM el not found",'<table class="jss"><tbody><tr><td>A</td></tr></tbody></table>',"Cloud extension not loaded.","onload","jtabs","jss_dialog","decimal",
|
|
43
43
|
"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","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex","jpanel","delete","jfile",'<img src="',
|
|
44
44
|
'" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
45
|
-
(function(E,J){typeof exports===_$
|
|
46
|
-
{version:_$
|
|
47
|
-
k=k.replace(new RegExp(_$
|
|
48
|
-
0<=k?qa.call(this,k):k;typeof b===_$
|
|
49
|
-
u.current:null;typeof k===_$
|
|
50
|
-
else return typeof d===_$
|
|
51
|
-
d?(k&&k.classList&&k.classList.contains(_$
|
|
52
|
-
!1:!0;k?b.remove(d):b.add(d);I.call(this,!0)},Na=function(k){if(void 0===k)return this.status;var d=document.createElement(_$
|
|
53
|
-
_$
|
|
54
|
-
1E3),x=M(),
|
|
55
|
-
!sessionStorage.getItem(_$
|
|
45
|
+
(function(E,J){typeof exports===_$_f4f9[103]&&typeof module!==_$_f4f9[21]?module.exports=J():typeof define===_$_f4f9[104]&&define.amd?define(J):E.jspreadsheet=E.jexcel=J()})(this,function(){_$_f4f9[0];var E=function(k,d){k=jSuites.translate(k);if(d&&d.length)for(var b=0;b<d.length;b++)k=k.replace(_$_f4f9[1]+b+_$_f4f9[2],d[b]);return k},J=function(k,d){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_f4f9[3]).toUpperCase();if(void 0===d)return window[k]?window[k]:null;window[k]=d},M=function(){var k=
|
|
46
|
+
{version:_$_f4f9[4],edition:_$_f4f9[5],host:_$_f4f9[6],license:_$_f4f9[7],print:function(){return[_$_f4f9[8]+this.edition+_$_f4f9[9]+this.version+_$_f4f9[10]+this.host+_$_f4f9[10]+this.license]}};return function(){return k}}(),X=function(k){var d=parseInt(k.y);if(k.id)var b=parseInt(k.id);else k.value&&(b=parseInt(k.value));0<b&&(this.rows[d].id=b,ya[_$_f4f9[11]].call(this,b))},W=function(k,d){var b=_$_f4f9[3],a=0;-1!==k.indexOf(_$_f4f9[12])&&(k=k.replace(new RegExp(_$_f4f9[13],_$_f4f9[14]),_$_f4f9[15]),
|
|
47
|
+
k=k.replace(new RegExp(_$_f4f9[16],_$_f4f9[14]),_$_f4f9[17]));for(var c=[_$_f4f9[18],_$_f4f9[19],_$_f4f9[17],_$_f4f9[15]],e=0;e<k.length;e++)k[e]==_$_f4f9[20]&&(a=0==a?1:0),1==a?b+=k[e]:(b+=k[e].toUpperCase(),1==d&&0<e&&k[e]==_$_f4f9[18]&&-1==c.indexOf(k[e-1])&&-1==c.indexOf(k[e+1])&&(b+=_$_f4f9[18]));return b},Z=function(k){return(_$_f4f9[3]+k).substr(0,1)===_$_f4f9[18]},qa=function(k){var d=this.options.columns;return d[k]&&d[k].name?d[k].name:k},Q=function(k,d,b){var a;if(a=this.options.data[d]){var c=
|
|
48
|
+
0<=k?qa.call(this,k):k;typeof b===_$_f4f9[21]?b=typeof c===_$_f4f9[22]?a[k]:jSuites.path.call(a,_$_f4f9[3]+c):(typeof c===_$_f4f9[22]?a[k]=b:jSuites.path.call(a,_$_f4f9[3]+c,b),!Z(b)&&this.records[d][k]&&(this.records[d][k].v=b))}else b=null;return b},R=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Na.call(this))?7<=k?!0:!1:!0},Oa=function(k){var d=_$_f4f9[23];if(this.parent)var b=this.parent.config,a=this.parent.element,c=this;else b=this.config,a=this.element,c=u.current?
|
|
49
|
+
u.current:null;typeof k===_$_f4f9[21]&&(k=!a.classList.contains(d));k?(a.classList.add(d),b.fullscreen=!0):(a.classList.remove(d),b.fullscreen=!1);c&&(I.call(c,!0),ma.update.call(c.parent,c))},Pa=function(k){var d=this.loading;null===k&&(k=d.style.display==_$_f4f9[24]?!0:!1);d.style.display=k?_$_f4f9[24]:_$_f4f9[3];setTimeout(function(){d.style.display=_$_f4f9[3]},1E3)},Ka=function(k,d){if(typeof k===_$_f4f9[25]){var b=G.getCoordsFromColumnName(k);b=this.records[b[1]][b[0]];if(b.element)k=b.element;
|
|
50
|
+
else return typeof d===_$_f4f9[21]?b.readonly:b.readonly=d?!0:!1}b=_$_f4f9[26];k=k.classList;if(typeof d===_$_f4f9[21])return k.contains(b)?!0:!1;d?k.add(b):k.remove(b)},Ua=function(k,d){var b,a=[];if(typeof k===_$_f4f9[25]){var c=G.getCoordsFromColumnName(k);a.push({x:c[0],y:c[1],value:{rotate:d}})}else if(Array.isArray(k))for(b=0;b<k.length;b++)c=G.getCoordsFromColumnName(k[b]),a.push({x:c[0],y:c[1],value:{rotate:d}});for(b=0;b<a.length;b++)(c=this.records[a[b].y][a[b].x])&&c.element&&(k=c.element.firstChild,
|
|
51
|
+
d?(k&&k.classList&&k.classList.contains(_$_f4f9[27])||(k=document.createElement(_$_f4f9[28]),k.classList.add(_$_f4f9[27]),k.innerHTML=c.element.innerHTML,c.element.innerHTML=_$_f4f9[3],c.element.appendChild(k)),k.style.transform=_$_f4f9[29]+parseInt(270-d)+_$_f4f9[30]):k&&k.classList&&k.classList.contains(_$_f4f9[27])&&(k.classList.remove(_$_f4f9[27]),k.style.transform=_$_f4f9[3]));this.updateProperty(a);ba.refresh.call(this)},Ba=function(k){var d=_$_f4f9[31],b=this.table.classList;if(typeof k==_$_f4f9[21])return b.contains(d)?
|
|
52
|
+
!1:!0;k?b.remove(d):b.add(d);I.call(this,!0)},Na=function(k){if(void 0===k)return this.status;var d=document.createElement(_$_f4f9[32]);d.style.textAlign=_$_f4f9[33];d.style.fontSize=_$_f4f9[34];d.style.cursor=_$_f4f9[35];d.onclick=function(){window.location.href=M().host+_$_f4f9[36]};var b=null,a=[],c=[74,50,48,50,48,33].join(_$_f4f9[3]);(function(f){b=1;try{if(f){var g=window.atob(f);g=g.split(_$_f4f9[37]);if(g[1]){g[1]=window.atob(g[1]);var h=g[0];f=c;var l=g[1],n=jSuites.sha512,p=_$_f4f9[3],q=
|
|
53
|
+
_$_f4f9[3];128<f.length&&(f=n(f));for(var v=0;128>v;v++){var w=f[v]?f[v].charCodeAt(0):0;p+=String.fromCharCode(54^w);q+=String.fromCharCode(92^w)}var x=n(q+n(p+l));if(h!=x)b=3;else if(g[1]=JSON.parse(g[1]),g[1].date){var y=window.location.hostname||_$_f4f9[38];h=!1;for(x=0;x<g[1].domain.length;x++)-1===g[1].domain[x].indexOf(_$_f4f9[39])?y===g[1].domain[x]&&(h=!0):y.substr(y.indexOf(g[1].domain[x]))==g[1].domain[x]&&(h=!0);!1===h?b=4:g[1].scope&&0<=g[1].scope.indexOf(_$_f4f9[40])?(y=new Date,h=parseInt(y.getTime()/
|
|
54
|
+
1E3),x=M(),g[1].date<h?(b=g[1].demo||!g[1].plan||g[1].date+2592E3<h?6:7,x.license=g[1].name+_$_f4f9[41]):(b=8,x.license=_$_f4f9[42]+g[1].name,x.edition=3==g[1].plan||6==g[1].plan||31==g[1].plan||33==g[1].plan?_$_f4f9[43]:_$_f4f9[5],a=g[1].scope)):b=5}else b=4}else b=2}}catch(B){}})(k);k=_$_f4f9[3];if(1==b)k=_$_f4f9[44];else if(2==b||3==b||4==b)k=_$_f4f9[45];else if(5==b)k=_$_f4f9[46];else if(6==b||7==b)k=_$_f4f9[47];d.appendChild(document.createTextNode(k));if(8>b)try{if(typeof sessionStorage!==_$_f4f9[21]&&
|
|
55
|
+
!sessionStorage.getItem(_$_f4f9[48])){sessionStorage.setItem(_$_f4f9[48],!0);var e=document.createElement(_$_f4f9[49]);e.src=M().host+_$_f4f9[50]+_$_f4f9[51];e.style.display=_$_f4f9[52];d.appendChild(e)}}catch(f){}Object.defineProperty(this,_$_f4f9[53],{value:b,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_f4f9[54],{value:M().edition===_$_f4f9[43]?1:0,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_f4f9[55],{get:function(){return a},
|
|
56
56
|
configurable:!1,enumerable:!1,extensible:!1});return d},I=function(){var k=function(l){-1==this.indexOf(l)&&this.push(l)},d=function(l,n){if(!l||!n)return!1;var p=l.length;if(p!=n.length)return!1;for(;p--;)if(l[p]!==n[p])return!1;return!0},b=function(l){var n=null,p,q,v=0,w={},x=!1;for(p=0;p<this.options.columns.length;p++)if(-1===l.indexOf(p)){if(ia.attached.call(this,p)){this.headers[p].parentNode.removeChild(this.headers[p]);this.colgroup[p].parentNode.removeChild(this.colgroup[p]);if(this.options.footers)for(q=
|
|
57
57
|
0;q<this.options.footers.length;q++)this.footers.content[q][p].element&&this.footers.content[q][p].element.parentNode&&this.footers.content[q][p].element.parentNode.removeChild(this.footers.content[q][p].element);x=!0}for(q=0;q<this.visibleRows.length;q++){var y=this.records[this.visibleRows[q]][p];y.element&&y.element.parentNode&&y.element.parentNode.removeChild(y.element)}}if(this.options.nestedHeaders)for(q=0;q<this.thead.children.length-1;q++)v+=this.thead.children[q].offsetHeight;for(p=0;p<l.length;p++){var B=
|
|
58
58
|
l[p];var z=Ea.create.call(this,B);if(n){if(!z.parentNode){this.headerContainer.insertBefore(z,this.headerContainer.children[n].nextSibling);this.colgroupContainer.insertBefore(this.colgroup[B],this.colgroupContainer.children[n].nextSibling);if(this.options.footers)for(q=0;q<this.options.footers.length;q++)this.tfoot.children[q].insertBefore(ha.create.call(this,B,q),this.tfoot.children[q].children[n].nextSibling);v&&(z.style.top+=v);x=!0}for(q=0;q<this.visibleRows.length;q++)y=this.visibleRows[q],
|
|
59
|
-
y=S[_$
|
|
60
|
-
0;q<this.visibleRows.length;q++)y=this.visibleRows[q],y=S[_$
|
|
59
|
+
y=S[_$_f4f9[58]].call(this,B,y),y.parentNode||this.tbody.children[q].insertBefore(y,this.tbody.children[q].children[n].nextSibling)}else{if(!z.parentNode){this.headerContainer.insertBefore(z,this.headerContainer.children[1]);this.colgroupContainer.insertBefore(this.colgroup[B],this.colgroupContainer.children[1]);if(this.options.footers)for(q=0;q<this.options.footers.length;q++)this.tfoot.children[q].insertBefore(ha.create.call(this,B,q),this.tfoot.children[q].children[1]);v&&(z.style.top+=v);x=!0}for(q=
|
|
60
|
+
0;q<this.visibleRows.length;q++)y=this.visibleRows[q],y=S[_$_f4f9[58]].call(this,B,y),y.parentNode||this.tbody.children[q].insertBefore(y,this.tbody.children[q].children[1])}if(this.options.mergeCells)for(q=0;q<this.visibleRows.length;q++)y=this.visibleRows[q],n=G.getColumnNameFromCoords(B,y),this.options.mergeCells[n]&&(this.records[y][B].merged||(w[n]=!1));n=Array.prototype.indexOf.call(this.headerContainer.children,z)}v=0;if(this.options.nestedHeaders)for(q=0;q<this.options.nestedHeaders.length;q++){n=
|
|
61
61
|
null;B=[];y=za.getColumns.call(this,q);for(p=0;p<l.length;p++)void 0!==y[l[p]]&&-1==B.indexOf(y[l[p]])&&B.push(y[l[p]]);for(p=0;p<this.options.nestedHeaders[q].length;p++)-1==B.indexOf(p)&&this.nested.content[q][p]&&this.nested.content[q][p].element.offsetHeight&&this.nested.content[q][p].element.remove();for(p=y=0;p<B.length;p++)z=za.create.call(this,B[p],q),z.parentNode||(n?this.thead.children[q].children[n]?this.thead.children[q].insertBefore(z,this.thead.children[q].children[n].nextSibling):this.thead.children[q].appendChild(z):
|
|
62
|
-
this.thead.children[q].insertBefore(z,this.thead.children[q].children[1]),z.style.top=v+_$
|
|
63
|
-
(this.table.style.left=_$
|
|
64
|
-
v=!0),p=n;v?(this.table.style.top=
|
|
62
|
+
this.thead.children[q].insertBefore(z,this.thead.children[q].children[1]),z.style.top=v+_$_f4f9[59],this.options.freezeColumns&&this.options.nestedHeaders[q][B[p]].frozen&&(z.style.left=y+(Ba.call(this)?50:0)+_$_f4f9[59],z.classList.add(_$_f4f9[60]))),y+=z.offsetWidth,n=Array.prototype.indexOf.call(this.thead.children[q].children,z);v+=this.thead.children[q].offsetHeight}1==x?this.table.style.left=f.width.call(this,l[this.options.freezeColumns||0])+_$_f4f9[59]:this.width<parseInt(this.table.style.left)&&
|
|
63
|
+
(this.table.style.left=_$_f4f9[61]);sa.batch.call(this,w);this.visibleCols=l},a=function(l){var n=[],p=null,q,v=!1;for(q=0;q<this.tbody.children.length;q++)n.push(this.tbody.children[q]);for(q=0;q<n.length;q++){var w=parseInt(n[q].getAttribute(_$_f4f9[57]));-1===l.indexOf(w)&&(n[q].parentNode.removeChild(n[q]),v=!0)}for(q=0;q<l.length;q++)n=da.create.call(this,l[q]),n.parentNode||(p?this.tbody.insertBefore(n,p.nextSibling):this.tbody.insertBefore(n,this.tbody.firstChild),this.rows[l[q]].height=n.offsetHeight,
|
|
64
|
+
v=!0),p=n;v?(this.table.style.top=f.height.call(this,l[this.options.freezeRows||0])+_$_f4f9[59],this.visibleCols=null):this.height<parseInt(this.table.style.top)&&(this.table.style.top=_$_f4f9[61]);this.visibleRows=l},c=function(){var l=[],n=0,p=null;if(I.limited.call(this)){var q=p=0;q=this.content.scrollLeft;var v=q+this.content.offsetWidth;p=this.options.columns;var w=null,x=this.options.freezeColumns||0,y=0;x&&(q+=ca.getWidth.call(this,!0));for(n=0;n<p.length;n++)w=ia.isVisible.call(this,n)?parseInt(p[n].width):
|
|
65
65
|
0,(y+w>q&&y<=v||n<x)&&k.call(l,n),y+=w;for(n=0;n<l.length;n++)if(q=sa.getAffected.call(this.merged.cols,l[n]))for(p=0;p<q.length;p++)k.call(l,q[p]);for(n=0;n<l.length;n++)if(q=za.getAffected.call(this,l[n]))for(p=0;p<q.length;p++)this.options.columns[q[p]]&&k.call(l,q[p]);l.sort(function(B,z){return B-z})}else for(p=this.options.columns,n=0;n<p.length;n++)l.push(n);d(l,this.visibleCols)||b.call(this,l)},e=function(){var l=[],n=null,p=0,q=0;p=null;var v=0;if(I.limited.call(this)&&!this.options.pagination){var w=
|
|
66
66
|
this.content.scrollTop,x=w+this.content.offsetHeight,y=0,B=this.options.freezeRows||0,z=0;n=this.results?this.results:this.rows;B&&(w+=ja.getHeight.call(this,!0));for(q=0;q<n.length;q++)p=this.results?n[q]:q,y=da.height.call(this,p),(z+y>w&&z<x||q<B)&&l.push(p),z+=y}else for(n=this.results?this.results:this.rows,this.options.pagination?(p=parseInt(this.options.pagination)*this.pageNumber,v=p+parseInt(this.options.pagination),v>n.length&&(v=n.length)):(p=0,v=n.length),q=p;q<v;q++)p=this.results?n[q]:
|
|
67
|
-
q,l.push(p);if(this.options.mergeCells){for(q=0;q<l.length;q++)if(this.merged.rows[l[q]]&&(v=sa.getAffected.call(this.merged.rows,l[q])))for(p=0;p<v.length;p++)-1===l.indexOf(v[p])&&l.push(v[p]);l.sort(function(F,r){return F-r})}d(l,this.visibleRows)||a.call(this,l)},
|
|
68
|
-
function(q){if(I.limited.call(p)&&!p.options.pagination){var v=Math.abs(q.deltaX),w=Math.abs(q.deltaY);q.shiftKey||v>w?0>q.deltaX||0>q.deltaY?
|
|
69
|
-
100+_$
|
|
70
|
-
l;){l--;var p=this.results?this.results[l]:l;if(!this.rows[p]||!1!==this.rows[p].visible){n=p;break}}p=da.height.call(this,n);l=this.tbody.firstChild.getAttribute(_$
|
|
71
|
-
this.rows.length-1;){var p=this.results?this.results[l]:l;if(!this.rows[p]||!1!==this.rows[p].visible){n=p;break}l++}l=da.height.call(this,n);this.content.scrollTop+=l}};
|
|
72
|
-
this.content.scrollLeft-=n}};
|
|
73
|
-
this.thead.lastChild.children[q].offsetWidth,n>l&&(p+=l,n-=l);return p};
|
|
74
|
-
this.options.columns.length;v++){if(l===v)return q;ia.isVisible.call(this,v)&&(q+=parseInt(p[v].width));if(q>=n)return v}return n?v:q};
|
|
75
|
-
p||2==p){var v=0,w=Ba.call(this)?50:0;this.options.freezeColumns&&(v=ca.getWidth.call(this,!0));n=this.content.scrollLeft+v;v=this.content.scrollLeft+(this.content.offsetWidth-w);w=this.table.offsetLeft+q.offsetLeft-w;var x=q.offsetWidth;0==p?w+x<v&&l>this.options.freezeColumns-1&&w<n&&(q.offsetHeight?(p=this.content.scrollLeft+(w-n),
|
|
76
|
-
p)):
|
|
77
|
-
n)):n>this.options.freezeRows-1&&(w>l?w+x>v&&(q.parentNode?(p=this.content.scrollTop+(w+x-v),
|
|
78
|
-
Qa=function(k,d,b,a){var c=d,e=null;if(this.results&&(d=this.results.indexOf(d),-1==d))return c;for(;0<d;){d--;var
|
|
79
|
-
|
|
80
|
-
if(b)c=k;else return k}
|
|
81
|
-
else e=parseInt(this.selectedCell[0]),
|
|
82
|
-
this.results.indexOf(h);if(-1==h){c=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!==this.rows[q].visible){var v=this.records[q][
|
|
83
|
-
c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=
|
|
84
|
-
this.records[h-this.records[h][
|
|
85
|
-
b,c,e,
|
|
86
|
-
b,!0,!0):d.left.call(this,b,!0,!0))};d.last=function(b,a){Array.isArray(this.selectedCell)&&(a?d.down.call(this,b,!0,!0):d.right.call(this,b,!0,!0))};return d}(),Wa=function(){return function(k){k.save=Sa;k.fullscreen=Oa;k.setReadOnly=Ka;k.getReadOnly=Ka;k.isReadOnly=Ka;k.rotate=Ua;k.setPlugins=function(d){va.call(this.parent,d)};k.showIndex=function(){Ba.call(this,!0)};k.hideIndex=function(){Ba.call(this,!1)};k[_$
|
|
87
|
-
k.isEditable=function(){return R.call(k.parent,k)};k.dispatch=function(){return H.apply(this.parent,arguments)};k.persistence=L;k.setViewport=function(d,b){this.options.tableOverflow=!0;d=parseInt(d);b=parseInt(b);this.content.classList.add(_$
|
|
88
|
-
ma.update.call(this.parent,this);H.call(this.parent,_$
|
|
89
|
-
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:_$
|
|
90
|
-
filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1,gridline:!0},d={application:_$
|
|
67
|
+
q,l.push(p);if(this.options.mergeCells){for(q=0;q<l.length;q++)if(this.merged.rows[l[q]]&&(v=sa.getAffected.call(this.merged.rows,l[q])))for(p=0;p<v.length;p++)-1===l.indexOf(v[p])&&l.push(v[p]);l.sort(function(F,r){return F-r})}d(l,this.visibleRows)||a.call(this,l)},f=function(l,n){n&&(this.visibleCols=this.visibleRows=null);f.calculate.call(this);f.update.call(this);if(!0!==l){var p=this;this.content.addEventListener(_$_f4f9[62],function(){f.ignore||f.update.call(p)});this.content.addEventListener(_$_f4f9[63],
|
|
68
|
+
function(q){if(I.limited.call(p)&&!p.options.pagination){var v=Math.abs(q.deltaX),w=Math.abs(q.deltaY);q.shiftKey||v>w?0>q.deltaX||0>q.deltaY?f.left.call(p):f.right.call(p):0>q.deltaY?f.up.call(p):f.down.call(p);q.preventDefault()}})}};f.calculate=function(){if(I.limited.call(this)){var l=ca.getWidth.call(this),n=ja.getHeight.call(this);this.width=f.width.call(this)+(l?l:1);this.height=f.height.call(this)+(n?n:1);this.scrollX.style.width=this.width+100+_$_f4f9[59];this.scrollY.style.height=this.height+
|
|
69
|
+
100+_$_f4f9[59]}};f.update=function(){e.call(this);c.call(this);Da.update.call(this);ca.refresh.call(this);ja.refresh.call(this);ba.refresh.call(this)};f[_$_f4f9[64]]=function(l,n){null!==l&&(l=f.height.call(this,l),this.content.scrollTop=l);void 0!==n&&null!==n&&(n=f.width.call(this,n),this.content.scrollLeft=n)};f.up=function(l){if(l)this.content.scrollTop=0;else if(this.tbody.firstChild){l=this.tbody.lastChild.getAttribute(_$_f4f9[57]);l=parseInt(l);var n=l;for(this.results&&(l=this.results.indexOf(l));0<
|
|
70
|
+
l;){l--;var p=this.results?this.results[l]:l;if(!this.rows[p]||!1!==this.rows[p].visible){n=p;break}}p=da.height.call(this,n);l=this.tbody.firstChild.getAttribute(_$_f4f9[57]);da.attached.call(this,l)||(p+=this.content.scrollTop-this.table.offsetTop);this.content.scrollTop-=p}};f.down=function(l){if(l)this.content.scrollTop=this.content.scrollHeight;else if(this.tbody.firstChild){l=this.tbody.firstChild.getAttribute(_$_f4f9[57]);l=parseInt(l);var n=l;for(this.results&&(l=this.results.indexOf(l));l<
|
|
71
|
+
this.rows.length-1;){var p=this.results?this.results[l]:l;if(!this.rows[p]||!1!==this.rows[p].visible){n=p;break}l++}l=da.height.call(this,n);this.content.scrollTop+=l}};f.left=function(l){var n=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0;else{for(n=l=this.thead.lastChild.children[1+n].getAttribute(_$_f4f9[56]);0<l;)if(l--,ia.isVisible.call(this,l)){n=l;break}l=n;n=parseInt(this.options.columns[l].width);this.headers[l]&&this.headers[l].parentNode||(n+=this.content.scrollLeft-this.table.offsetLeft);
|
|
72
|
+
this.content.scrollLeft-=n}};f.right=function(l){var n=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+n].offsetWidth};var g=function(){for(var l,n=this.content.offsetHeight-this.thead.offsetHeight-ja.getHeight.call(this),p=0,q=0;q<this.tbody.children.length;q++)l=this.tbody.children[q].offsetHeight,n>l&&(p+=l,n-=l);return p},h=function(){for(var l,n=this.content.offsetWidth-ca.getWidth.call(this),p=0,q=0;q<this.thead.lastChild.children.length;q++)l=
|
|
73
|
+
this.thead.lastChild.children[q].offsetWidth,n>l&&(p+=l,n-=l);return p};f.pageUp=function(){this.content.scrollTop-=g.call(this)};f.pageDown=function(){this.content.scrollTop+=g.call(this)};f.pageLeft=function(){this.content.scrollLeft-=h.call(this)};f.pageRight=function(){this.content.scrollLeft+=h.call(this)};f.build=function(l){var n=document.createElement(_$_f4f9[32]);n.className=_$_f4f9[65]+l;return n};f.width=function(l,n){for(var p=this.options.columns,q=0,v=this.options.freezeColumns||0;v<
|
|
74
|
+
this.options.columns.length;v++){if(l===v)return q;ia.isVisible.call(this,v)&&(q+=parseInt(p[v].width));if(q>=n)return v}return n?v:q};f.height=function(l,n){for(var p=0,q=0,v=this.results?this.results:this.rows,w=this.options.freezeRows||0;w<v.length;w++){q=w;this.results&&(q=v[w]);if(l===q)return p;this.rows[q]&&!1!==this.rows[q].visible&&(p+=da.height.call(this,q));if(p>=n)return q}return n?q:p};f.adjust=function(l,n,p){var q=this.records[n][l].element;if(q){if(!this.records[n][l].merged)if(0==
|
|
75
|
+
p||2==p){var v=0,w=Ba.call(this)?50:0;this.options.freezeColumns&&(v=ca.getWidth.call(this,!0));n=this.content.scrollLeft+v;v=this.content.scrollLeft+(this.content.offsetWidth-w);w=this.table.offsetLeft+q.offsetLeft-w;var x=q.offsetWidth;0==p?w+x<v&&l>this.options.freezeColumns-1&&w<n&&(q.offsetHeight?(p=this.content.scrollLeft+(w-n),f.setX.call(this,p)):f[_$_f4f9[64]].call(this,null,l)):l>this.options.freezeColumns-1&&(w>n?w+x>v&&(q.parentNode?(p=this.content.scrollLeft+(w+x-v+16),f.setX.call(this,
|
|
76
|
+
p)):f[_$_f4f9[64]].call(this,null,l)):f[_$_f4f9[64]].call(this,null,l))}else v=0,this.options.freezeRows&&(v=ja.getHeight.call(this,!0)),l=this.content.scrollTop+v,v=this.content.scrollTop+this.content.offsetHeight-this.thead.offsetHeight-16,w=this.table.offsetTop+q.offsetTop-this.thead.offsetHeight,x=q.offsetHeight,1==p?w+x<v&&n>this.options.freezeRows-1&&(w<l?q.parentNode?0<l-w&&(p=this.content.scrollTop+(w-l),f.setY.call(this,p)):f[_$_f4f9[64]].call(this,n):q.offsetHeight||f[_$_f4f9[64]].call(this,
|
|
77
|
+
n)):n>this.options.freezeRows-1&&(w>l?w+x>v&&(q.parentNode?(p=this.content.scrollTop+(w+x-v),f.setY.call(this,p)):f[_$_f4f9[64]].call(this,n)):q.offsetHeight||f[_$_f4f9[64]].call(this,n))}else 0==p||2==p?f[_$_f4f9[64]].call(this,null,l):f[_$_f4f9[64]].call(this,n)};f.setX=function(l){f.ignore=!0;this.content.scrollLeft=l;f.ignore=!1};f.setY=function(l){f.ignore=!0;this.content.scrollTop=l;f.ignore=!1};f.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};return f}(),
|
|
78
|
+
Qa=function(k,d,b,a){var c=d,e=null;if(this.results&&(d=this.results.indexOf(d),-1==d))return c;for(;0<d;){d--;var f=this.results?this.results[d]:d;if(!1!==this.rows[f].visible){var g=this.records[f][k].v===_$_f4f9[3]?!1:!0;null===e&&(e=g);if(this.records[f][k].element&&this.records[f][k].element.classList.contains(_$_f4f9[66])){if(this.records[f][k].merged){c=f-this.records[f][k].merged[1];if(!b)break;g=!0}}else{if(b&&g!==e&&!a)break;if(b)c=this.records[f][k].merged?f-this.records[f][k].merged[1]:
|
|
79
|
+
f;else return f}e=g}}return c},Ra=function(k,d,b,a){for(var c=k,e,f=null;0<k;)if(k--,ia.isVisible.call(this,k)){e=!1;this.records[d]&&(e=this.records[d][k].merged?this.records[d-this.records[d][k].merged[1]][k-this.records[d][k].merged[0]].v?!0:!1:this.records[d][k].v?!0:!1);null===f&&(f=e);if(this.records[d]&&this.records[d][k].element&&this.records[d][k].element.classList.contains(_$_f4f9[66])){if(this.records[d][k].merged&&(c=k-this.records[d][k].merged[0],!b))break}else{if(b&&e!==f&&!a)break;
|
|
80
|
+
if(b)c=k;else return k}f=e}return c},Va=function(){var k=function(b,a,c,e){1==b||3==b?da.attached.call(this,c)||(0<this.options.pagination?this.page(this.whichPage(c)):1==b?I.up.call(this,e):I.down.call(this,e)):S.attached.call(this,a,c)||(0==b?I.left.call(this,e):I.right.call(this,e))},d=function(b){b.up=d.up;b.down=d.down;b.right=d.right;b.left=d.left;b.last=d.last;b.first=d.first};d.up=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);
|
|
81
|
+
else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);c=Qa.call(this,e,f,a,c);c!=f&&(f=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,1,e,f,a),ka[_$_f4f9[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,1))}};d.down=function(b,a,c){if(Array.isArray(this.selectedCell)){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=
|
|
82
|
+
this.results.indexOf(h);if(-1==h){c=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!==this.rows[q].visible){var v=this.records[q][g].v===_$_f4f9[3]?!1:!0;null===n&&(n=v);if(this.records[q][g].element&&this.records[q][g].element.classList.contains(_$_f4f9[66])){if(this.records[q][g].merged){if(!this.records[q][g].merged[1]&&(l=q,!a))break;v=!0}}else if(a&&v!==n&&!c){c=l;break a}else if(a)l=q;else{c=q;break a}n=v}}c=l}c!=f&&(f=
|
|
83
|
+
c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,3,e,f,a),ka[_$_f4f9[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,3))}};d.right=function(b,a,c){if(Array.isArray(this.selectedCell)){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:{for(var g=e,h=f,l=this.options.columns,n=g,p,q=null;g<l.length-1;)if(g++,ia.isVisible.call(this,g)){p=!1;this.records[h]&&(p=this.records[h][g].merged?
|
|
84
|
+
this.records[h-this.records[h][g].merged[1]][g-this.records[h][g].merged[0]].v?!0:!1:this.records[h][g].v?!0:!1);null===q&&(q=p);if(this.records[h]&&this.records[h][g].element&&this.records[h][g].element.classList.contains(_$_f4f9[66])){if(this.records[h][g].merged&&g==g+this.records[h][g].merged[0]&&(n=g,!a))break}else if(a&&p!==q&&!c){c=n;break a}else if(a)n=g;else{c=g;break a}q=p}c=n}c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,2,e,f,a),ka[_$_f4f9[11]].call(this,
|
|
85
|
+
b,c,e,f),I.adjust.call(this,e,f,2))}};d.left=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);c=Ra.call(this,e,f,a,c);c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,0,e,f,a),ka[_$_f4f9[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,0))}};d.first=function(b,a){Array.isArray(this.selectedCell)&&(a?d.up.call(this,
|
|
86
|
+
b,!0,!0):d.left.call(this,b,!0,!0))};d.last=function(b,a){Array.isArray(this.selectedCell)&&(a?d.down.call(this,b,!0,!0):d.right.call(this,b,!0,!0))};return d}(),Wa=function(){return function(k){k.save=Sa;k.fullscreen=Oa;k.setReadOnly=Ka;k.getReadOnly=Ka;k.isReadOnly=Ka;k.rotate=Ua;k.setPlugins=function(d){va.call(this.parent,d)};k.showIndex=function(){Ba.call(this,!0)};k.hideIndex=function(){Ba.call(this,!1)};k[_$_f4f9[64]]=I[_$_f4f9[64]];k.undo=function(){T.undo.call(k.parent)};k.redo=function(){T.redo.call(k.parent)};
|
|
87
|
+
k.isEditable=function(){return R.call(k.parent,k)};k.dispatch=function(){return H.apply(this.parent,arguments)};k.persistence=L;k.setViewport=function(d,b){this.options.tableOverflow=!0;d=parseInt(d);b=parseInt(b);this.content.classList.add(_$_f4f9[67]);150<d&&(this.options.tableWidth=d+_$_f4f9[59],this.content.style.width=this.options.tableWidth);150<b&&!this.options.pagination&&(this.options.tableHeight=parseInt(b)+_$_f4f9[59],this.content.style.height=this.options.tableHeight);I.call(this,!0);
|
|
88
|
+
ma.update.call(this.parent,this);H.call(this.parent,_$_f4f9[68],d,b)};k.helpers=G}}(),Ga=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:null,minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_f4f9[48],csvHeaders:!0,csvDelimiter:_$_f4f9[37],columnSorting:!0,columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,
|
|
89
|
+
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:_$_f4f9[69],tableWidth:null,resize:null,comments:null,meta:null,style:{},freezeColumns:0,freezeRows:0,freezeColumnControl:!1,freezeRowControl:!1,orderBy:null,worksheetId:_$_f4f9[3],worksheetName:null,worksheetState:null,
|
|
90
|
+
filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1,gridline:!0},d={application:_$_f4f9[70],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,
|
|
91
91
|
allowRenameWorksheet:!0,allowMoveWorksheet:!0,moveDownOnEnter:!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,onresize:null,onresizerow:null,onresizecolumn:null,
|
|
92
92
|
onselection:null,onbeforecomments:null,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,
|
|
93
|
-
onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,onchangereferences:null,onbeforechangereferences:null,onbeforesend:null,onchangedefinednames:null,oninput:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},b=function(e,
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
(this.options.columns[
|
|
97
|
-
e.setConfig=c[_$
|
|
98
|
-
typeof
|
|
99
|
-
e.resize?e.resize:_$
|
|
100
|
-
|
|
101
|
-
1,a.numOfRows);else if(a.action==_$
|
|
102
|
-
else if(a.action==_$
|
|
103
|
-
_$
|
|
104
|
-
a.oldValue);else if(a.action==_$
|
|
105
|
-
a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var b=function(a){var c=a.worksheet;if(a.action==_$
|
|
106
|
-
a.newValue);else if(a.action==_$
|
|
107
|
-
_$
|
|
108
|
-
1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};k.reset=function(){this.historyIndex=-1;this.history=[]};return k}(),va=function(){var k=function(d){var b=null;if(Array.isArray(d))b=d;else if(typeof d==_$
|
|
109
|
-
plugin:d[a[c]],options:{}})}if(b&&b.length)for(c=0;c<b.length;c++){if(b[c].name&&b[c].plugin){var e=b[c].name;var
|
|
110
|
-
(d==_$
|
|
111
|
-
typeof d.type==_$
|
|
112
|
-
c,e)){if(this.results&&0<this.results.length)return console.error(_$
|
|
113
|
-
e,this,
|
|
114
|
-
d&&(d=this.edition);this.parent.input.classList.contains(_$
|
|
115
|
-
null!==
|
|
116
|
-
this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=d;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$
|
|
117
|
-
_$
|
|
118
|
-
_$
|
|
119
|
-
function(d,b){if(d>this.sequence||b)this.sequence=d};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(d){if(this.rows[d]&&this.rows[d].id)return this.rows[d].id;var b=this.getPrimaryKey();if(!1!==b)return Q.call(this,b,d)};k.setId=function(d,b){if(void 0!==b&&0<=parseInt(d)){var a={};a[d]=b}else a=d;d=Object.keys(a);if(d.length){for(var c=0;c<d.length;c++)b=a[d[c]],this.rows[d[c]].id=b,k[_$
|
|
120
|
-
_$
|
|
121
|
-
l})},d=function(b){var a=b[0];if(0<=[_$
|
|
122
|
-
data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){c&&l.setRequestHeader(_$
|
|
123
|
-
window.open(window.location.href,_$
|
|
124
|
-
_$
|
|
125
|
-
this.cursor=k?this.records[b][d].element:null);for(k=c;k<=
|
|
126
|
-
return(d=d.main)?[d.x1,d.y1,d.x2,d.y2]:null};k.isSelected=function(d,b,a){if(!a&&(a=this.getHighlighted(),!a||null===a[0]))return!1;var c=a[0],e=a[1],
|
|
127
|
-
k.refresh=function(){this.selectedCell&&k[_$
|
|
93
|
+
onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,onchangereferences:null,onbeforechangereferences:null,onbeforesend:null,onchangedefinednames:null,oninput:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},b=function(e,f){f=JSON.parse(JSON.stringify(f));
|
|
94
|
+
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==_$_f4f9[25]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_f4f9[21]){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]);
|
|
95
|
+
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=_$_f4f9[71]):this.options.columns[g]={type:_$_f4f9[71]},this.options.columns[g].type==_$_f4f9[72]&&(this.options.columns[g].type=_$_f4f9[73],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||
|
|
96
|
+
(this.options.columns[g].width=parseInt(this.options.defaultColWidth)+_$_f4f9[59]),this.options.columns[g].type!=_$_f4f9[73]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_f4f9[73]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_f4f9[74],dataType:_$_f4f9[75],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},c=function(e){e.getConfig=c[_$_f4f9[58]];
|
|
97
|
+
e.setConfig=c[_$_f4f9[11]]};c.spreadsheet=function(e){this.config=b(e,d);1!=this.config.secureFormulas&&console.log(_$_f4f9[76])};c.worksheet=function(e){var f=this;f.options=b(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_f4f9[74],dataType:_$_f4f9[71],group:f.parent.name,success:function(g){g=G.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:_$_f4f9[71],width:f.options.defaultColWidth}),
|
|
98
|
+
typeof f.options.columns[l].title===_$_f4f9[21]&&(f.options.columns[l].title=h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_f4f9[74],dataType:_$_f4f9[75],group:f.parent.name,success:function(g){a.call(f,g)}}):a.call(f)};c[_$_f4f9[58]]=function(){return this.options};c[_$_f4f9[11]]=function(e){typeof e==_$_f4f9[25]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_f4f9[21]&&(this.options[f[g]]=e[f[g]]);this.content.style.resize=
|
|
99
|
+
e.resize?e.resize:_$_f4f9[3];!0===e.filters?la.show.call(this):!1===e.filters&&la.hide.call(this);!0===e.search?wa.show.call(this):!1===e.search&&wa.hide.call(this);!0===e.toolbar?ma.show.call(this.parent):!1===e.toolbar&&ma.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&(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));L.call(this,_$_f4f9[77],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),
|
|
100
|
+
g=0;g<f.length;g++)typeof d[f[g]]!==_$_f4f9[21]&&(this.config[f[g]]=e[f[g]])};return c}(),T=function(k){k=function(a){if(1!=this.ignoreHistory)if(this.historyCascade)this.history[this.historyIndex].cascade||(this.history[this.historyIndex].cascade=[]),this.history[this.historyIndex].cascade.push(a);else{var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=a}};var d=function(a){var c=a.worksheet;if(a.action==_$_f4f9[78])c.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+
|
|
101
|
+
1,a.numOfRows);else if(a.action==_$_f4f9[79])c.insertRow(a.numOfRows,a.rowNumber,1,a.data),S.setAttributes.call(c,a.attributes);else if(a.action==_$_f4f9[80])c.deleteColumn(a.insertBefore?a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==_$_f4f9[81])c.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,a.data,a.extra),S.setAttributes.call(c,a.attributes);else if(a.action==_$_f4f9[82])c.moveRow(a.newValue,a.oldValue);else if(a.action==_$_f4f9[83])c.moveColumn(a.newValue,a.oldValue);
|
|
102
|
+
else if(a.action==_$_f4f9[84])c.removeMerge(a.newValue,!0),c.setMerge(a.oldValue);else if(a.action==_$_f4f9[85])c.setMerge(a.oldValue);else if(a.action==_$_f4f9[86])c.setStyle(a.oldValue,null,null,1);else if(a.action==_$_f4f9[87])c.setStyle(a.oldValue);else if(a.action==_$_f4f9[88])c.setWidth(a.column,a.oldValue);else if(a.action==_$_f4f9[89])c.setHeight(a.row,a.oldValue);else if(a.action==_$_f4f9[90])c.setHeader(a.column,a.oldValue);else if(a.action==_$_f4f9[91]||a.action==_$_f4f9[92]||a.action==
|
|
103
|
+
_$_f4f9[93])c[a.action](a.oldValue);else if(a.action==_$_f4f9[94])c.orderBy(a.column,a.direction?0:1,a.oldValue,a.previousState);else if(a.action==_$_f4f9[95]||a.action==_$_f4f9[96]||a.action==_$_f4f9[97]){var e=[];for(var f=0;f<a.records.length;f++){var g={x:a.records[f].x,value:a.records[f].oldValue};void 0!==a.records[f].y&&(g.y=a.records[f].y);a.records[f].oldStyle&&(g.style=a.records[f].oldStyle);e.push(g)}a.action==_$_f4f9[95]?c.setValue(e):c.setProperty(e)}else if(a.action==_$_f4f9[98])c.renameWorksheet(a.index,
|
|
104
|
+
a.oldValue);else if(a.action==_$_f4f9[99])c.moveWorksheet(a.t,a.f);else if(a.action==_$_f4f9[100]){e=[];for(f=0;f<a.records.length;f++)e.push({index:a.records[f].index,value:a.records[f].oldValue});c.setDefinedNames(e)}H.call(this,_$_f4f9[101],c,a)};k.undo=function(){if(0<=this.historyIndex)var a=this.history[this.historyIndex--];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();d.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)d.call(this,a.cascade[e]);
|
|
105
|
+
a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var b=function(a){var c=a.worksheet;if(a.action==_$_f4f9[78])c.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data);else if(a.action==_$_f4f9[79])c.deleteRow(a.rowNumber,a.numOfRows);else if(a.action==_$_f4f9[80])c.insertColumn(a.numOfColumns,a.columnNumber,a.insertBefore,a.properties,a.data);else if(a.action==_$_f4f9[81])c.deleteColumn(a.columnNumber,a.numOfColumns);else if(a.action==_$_f4f9[82])c.moveRow(a.oldValue,
|
|
106
|
+
a.newValue);else if(a.action==_$_f4f9[83])c.moveColumn(a.oldValue,a.newValue);else if(a.action==_$_f4f9[84])c.setMerge(a.newValue);else if(a.action==_$_f4f9[85])c.removeMerge(a.newValue);else if(a.action==_$_f4f9[86])c.setStyle(a.newValue,null,null,1);else if(a.action==_$_f4f9[87])c.resetStyle(a.cells);else if(a.action==_$_f4f9[88])c.setWidth(a.column,a.newValue);else if(a.action==_$_f4f9[89])c.setHeight(a.row,a.newValue);else if(a.action==_$_f4f9[90])c.setHeader(a.column,a.newValue);else if(a.action==
|
|
107
|
+
_$_f4f9[91]||a.action==_$_f4f9[92]||a.action==_$_f4f9[93])c[a.action](a.newValue);else if(a.action==_$_f4f9[94])c.orderBy(a.column,a.direction,a.newValue);else if(a.action==_$_f4f9[95]||a.action==_$_f4f9[96]||a.action==_$_f4f9[97])c[a.action](a.records);else a.action==_$_f4f9[98]?c.renameWorksheet(a.index,a.newValue):a.action==_$_f4f9[99]?c.moveWorksheet(a.f,a.t):a.action==_$_f4f9[100]&&c.setDefinedNames(a.records);H.call(this,_$_f4f9[102],c,a)};k.redo=function(){if(this.historyIndex<this.history.length-
|
|
108
|
+
1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};k.reset=function(){this.historyIndex=-1;this.history=[]};return k}(),va=function(){var k=function(d){var b=null;if(Array.isArray(d))b=d;else if(typeof d==_$_f4f9[103]){b=[];var a=Object.keys(d);for(var c=0;c<a.length;c++)b.push({name:a[c],
|
|
109
|
+
plugin:d[a[c]],options:{}})}if(b&&b.length)for(c=0;c<b.length;c++){if(b[c].name&&b[c].plugin){var e=b[c].name;var f=b[c].plugin;var g=b[c].options}typeof f===_$_f4f9[104]&&(this.plugins[e]=f.call(u,this,g,this.config),typeof f.license==_$_f4f9[104]&&u.license&&f.license(u.license))}};k.execute=function(d,b){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var c=0;c<a.length;c++)if(typeof this.plugins[a[c]][d]==_$_f4f9[104]){var e=this.plugins[a[c]][d].apply(this.plugins[a[c]],b);e&&
|
|
110
|
+
(d==_$_f4f9[105]&&(b[4]=e),d==_$_f4f9[106]&&(b[0]=e))}return b}};k.onevent=function(d){return function(){var b,a,c=this.plugins;if(c){var e=Object.keys(c);if(e.length)for(a=0;a<e.length;a++)if(typeof c[e[a]][d]==_$_f4f9[104]){var f=c[e[a]][d].apply(c[e[a]],arguments);typeof f!==_$_f4f9[21]&&(b=f)}}return b}}(_$_f4f9[107]);return k}(),na=function(){var k=function(d){d.getEditor=k[_$_f4f9[58]];d.openEditor=k.open;d.closeEditor=k.close};k[_$_f4f9[58]]=function(d,b){d=La[_$_f4f9[58]].call(this,d,b);return[d.type&&
|
|
111
|
+
typeof d.type==_$_f4f9[103]?d.type:u.editors[d.type],d]};k.open=function(d,b,a){if(!R.call(this.parent,this))return!1;if(1!=d.classList.contains(_$_f4f9[26])){var c=parseInt(d.getAttribute(_$_f4f9[56])),e=parseInt(d.getAttribute(_$_f4f9[57]));if(!0===this.options.locked){var f=G.getColumnNameFromCoords(c,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][c].merged)c-=f[0],e-=f[1],d=this.records[e][c].element;if(!S.attached.call(this,
|
|
112
|
+
c,e)){if(this.results&&0<this.results.length)return console.error(_$_f4f9[108]),!1;var g=f=null;ia.attached.call(this,c)||(f=c);da.attached.call(this,e)||(g=e);I[_$_f4f9[64]].call(this,g,f)}k.position.call(this,c,e);f=this.parent.input;if(113===a.keyCode||a.type!==_$_f4f9[109])f.selected=!0;f.innerText=_$_f4f9[3];H.call(this.parent,_$_f4f9[110],this,d,c,e);b=1==b?_$_f4f9[3]:Q.call(this,c,e);g=k[_$_f4f9[58]].call(this,c,e);var h=!0;typeof g[0].openEditor==_$_f4f9[104]&&(!1===g[0].openEditor(d,b,c,
|
|
113
|
+
e,this,g[1],a)?h=!1:H.call(this.parent,_$_f4f9[111],this,d,c,e,f,g[1]));h&&(1==this.options.textOverflow&&(this.records[e][c].element.style.overflow=_$_f4f9[112],0<c&&this.records[e][c-1].element&&(this.records[e][c-1].element.style.overflow=_$_f4f9[112])),this.edition=d,f.classList.add(_$_f4f9[113]),1==this.parent.config.editorFormulas&&Z(b)&&(f.classList.add(_$_f4f9[114]),ra.parse.call(this,f),d=document.createTextNode(_$_f4f9[3]),f.appendChild(d),jSuites.focus(f)))}};k.close=function(d,b){null===
|
|
114
|
+
d&&(d=this.edition);this.parent.input.classList.contains(_$_f4f9[114])&&ra.close.call(this,this.parent.input);var a,c=parseInt(d.getAttribute(_$_f4f9[56])),e=parseInt(d.getAttribute(_$_f4f9[57]));1==this.options.textOverflow&&(a=this.records[e][c+1])&&a.element&&a.element.innerText==_$_f4f9[3]&&(this.records[e][c].element.style.overflow=_$_f4f9[3]);a=k[_$_f4f9[58]].call(this,c,e);if(1==b){var f=null;typeof a[0].closeEditor==_$_f4f9[104]&&(a=a[0].closeEditor(d,!0,c,e,this,a[1]),void 0!==a&&(f=a));
|
|
115
|
+
null!==f&&Q.call(this,c,e)!=f&&this.setValue(d,f)}else a[0].closeEditor(d,!1,c,e,this,a[1]);H.call(this.parent,_$_f4f9[115],this,d,c,e,f,b);a=this.parent.input;a.selected=!1;a.onblur&&(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);na.build(this.parent);a.removeAttribute(_$_f4f9[116]);a.removeAttribute(_$_f4f9[117]);a.removeAttribute(_$_f4f9[118]);this.edition=a.mask=null;this.refreshBorders()};k.position=function(d,b){var a=null;if(a=this.records[b][d].element){var c=
|
|
116
|
+
this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=d;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$_f4f9[119]:(e.setAttribute(_$_f4f9[120],_$_f4f9[3]),d=a.top-c.top+1,b=a.left-c.left+1,e.style.top=d+_$_f4f9[59],e.style.left=b+_$_f4f9[59],e.style.minWidth=a.width-1+_$_f4f9[59],e.style.minHeight=a.height-1+_$_f4f9[59],setTimeout(function(){e.focus()},0))}};k.build=function(d){d.input||(d.input=document.createElement(_$_f4f9[32]));d.input.className=
|
|
117
|
+
_$_f4f9[121];d.input.setAttribute(_$_f4f9[122],!0);d.input.innerText=_$_f4f9[3];d.input.oninput=function(b){u.current&&(1==u.current.parent.config.editorFormulas&&(Z(b.target.innerText)?(b.target.classList.add(_$_f4f9[114]),b.target.selected=!0):b.target.classList.contains(_$_f4f9[114])&&ra.close.call(u.current,this)),H.call(u.current.parent,_$_f4f9[123],u.current,b))};d.input.onclick=function(){this.selected=!0};return d.input};return k}(),H=function(k){var d;if(!this.ignoreEvents){if(typeof this.config.onevent==
|
|
118
|
+
_$_f4f9[104]){var b=this.config.onevent.apply(this,arguments);typeof b!==_$_f4f9[21]&&(d=b)}typeof this.config[k]==_$_f4f9[104]&&(b=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)),typeof b!==_$_f4f9[21]&&(d=b));b=va.onevent.apply(this,arguments);typeof b!==_$_f4f9[21]&&(d=b)}return d},ya=function(){var k=function(d){d.sequence=0;d.getNextSequence=k.next;d.getRowId=k.getId;d.setRowId=k.setId;d.getRowById=k.getRowById};k[_$_f4f9[58]]=function(){return this.sequence};k[_$_f4f9[11]]=
|
|
119
|
+
function(d,b){if(d>this.sequence||b)this.sequence=d};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(d){if(this.rows[d]&&this.rows[d].id)return this.rows[d].id;var b=this.getPrimaryKey();if(!1!==b)return Q.call(this,b,d)};k.setId=function(d,b){if(void 0!==b&&0<=parseInt(d)){var a={};a[d]=b}else a=d;d=Object.keys(a);if(d.length){for(var c=0;c<d.length;c++)b=a[d[c]],this.rows[d[c]].id=b,k[_$_f4f9[11]].call(this,b);L.call(this,
|
|
120
|
+
_$_f4f9[124],[a]);H.call(this.parent,_$_f4f9[125],this,a)}};k.getRowById=function(d,b){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,a)==d)return!0===b?this.rows[a]:this.options.data[a];return!1};return k}(),Sa=function(){var k=function(b){for(var a=[],c={},e=0;e<b.length;e++){var f=b[e].x,g=b[e].y,h=ya.getId.call(this,g);if(!h)if(c[g])h=c[g];else if(h=ya.next.call(this))c[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=qa.call(this,f);a[g].data[f]=b[e].value}ya.setId.call(this,c);return a.filter(function(l){return null!=
|
|
121
|
+
l})},d=function(b){var a=b[0];if(0<=[_$_f4f9[126],_$_f4f9[127],_$_f4f9[124],_$_f4f9[128]].indexOf(a))return!1;var c={};a==_$_f4f9[95]||a==_$_f4f9[129]?(a=_$_f4f9[130],c[a]=k.call(this,b[1].data)):Array.isArray(b[1])&&1==b[1].length?c[a]=b[1][0]:c[a]=b[1];return c};return function(b,a,c,e){var f=this.parent,g=this,h=d.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=H.call(f,_$_f4f9[131],f,g,a))a=h;else if(!1===h)return!1;Pa.call(f,!0);jSuites.ajax({url:b,method:_$_f4f9[132],dataType:_$_f4f9[75],
|
|
122
|
+
data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){c&&l.setRequestHeader(_$_f4f9[133],_$_f4f9[134]+c);H.call(f,_$_f4f9[135],g,l)},success:function(l){f.element.classList.contains(_$_f4f9[136])&&f.element.classList.remove(_$_f4f9[136]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_f4f9[137]+l.message):jSuites.notification(l)),l.success?typeof e===_$_f4f9[104]?e(l):l.data&&Array.isArray(l.data)&&S.updateAll.call(g,l.data):l.error&&(alert(_$_f4f9[138]),
|
|
123
|
+
window.open(window.location.href,_$_f4f9[139])));H.call(f,_$_f4f9[140],f,g,a,l)},error:function(){f.element.classList.add(_$_f4f9[136])}})}}(),L=function(){return function(){va.execute.call(this.parent,_$_f4f9[141],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var d=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$_f4f9[142])?k+(_$_f4f9[143]+d):k+(_$_f4f9[144]+d)}else this.options.persistence&&(k=typeof this.options.persistence==
|
|
124
|
+
_$_f4f9[25]?this.options.persistence:this.options.url);k&&Sa.call(this,k,arguments)}}}(),Ha=function(k){if(this.selectedCell){var d=this.selectedCell[0],b=this.selectedCell[1];this.records&&this.records[b]&&this.records[b][d]&&this.records[b][d].element||(this.selectedCell=this.getHighlighted(),d=this.selectedCell[0],b=this.selectedCell[1]);var a=this.getHighlighted(),c=a[0],e=a[1],f=a[2];a=a[3];var g=k?_$_f4f9[145]:_$_f4f9[146];this.records[b]&&this.records[b][d]&&this.records[b][d].element&&(this.records[b][d].element.classList[g](_$_f4f9[147]),
|
|
125
|
+
this.cursor=k?this.records[b][d].element:null);for(k=c;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$_f4f9[148]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[g](_$_f4f9[148])}},ka=function(){var k=function(d){d.resetSelection=k.reset;d.updateSelection=k.fromElements;d.updateSelectionFromCoords=k[_$_f4f9[11]];d.selectAll=k.all;d.isSelected=k.isSelected;d.getHighlighted=k.getHighlighted;d.getRange=k.getRange};k.getHighlighted=function(){var d=this.borders;
|
|
126
|
+
return(d=d.main)?[d.x1,d.y1,d.x2,d.y2]:null};k.isSelected=function(d,b,a){if(!a&&(a=this.getHighlighted(),!a||null===a[0]))return!1;var c=a[0],e=a[1],f=a[2];a=a[3];f||(f=c);a||(a=e);return null==d?b>=e&&b<=a:null==b?d>=c&&d<=f:d>=c&&d<=f&&b>=e&&b<=a};k.reset=function(){if(this.selectedCell)d=1,this.edition&&na.close.call(this,this.edition,!0),this.resetBorders(_$_f4f9[149],!0),this.resetBorders(_$_f4f9[150],!0),this.selectedCell=null,1==d&&H.call(this.parent,_$_f4f9[151],this);else var d=0;return d};
|
|
127
|
+
k.refresh=function(){this.selectedCell&&k[_$_f4f9[11]].call(this,this.selectedCell)};k.isValid=function(d,b,a,c){if(!this)return!1;Array.isArray(d)&&(c=d[3],a=d[2],b=d[1],d=d[0]);return!(d>=this.options.columns.length||b>=this.rows.length||a>=this.options.columns.length||c>=this.rows.length)};k[_$_f4f9[11]]=function(d,b,a,c,e,f,g){f||(f=_$_f4f9[149]);Array.isArray(d)&&(c=d[3],a=d[2],b=d[1],d=d[0]);null==a&&(a=d);null==c&&(c=b);if(!k.isValid.call(this,d,b,a,c))return!1;if(null!=d){if(parseInt(d)<parseInt(a))var h=
|
|
128
128
|
parseInt(d),l=parseInt(a);else h=parseInt(a),l=parseInt(d);if(parseInt(b)<parseInt(c))var n=parseInt(b),p=parseInt(c);else n=parseInt(c),p=parseInt(b);var q;var v={};if(this.options.mergeCells){for(var w=n;w<=p;w++)for(var x=h;x<=l;x++)if(q=this.records[w][x].merged)q=G.getColumnNameFromCoords(x-q[0],w-q[1]),v[q]=!0;w=Object.keys(v);if(w.length)for(x=0;x<w.length;x++)q=G.getCoordsFromColumnName(w[x]),v=this.options.mergeCells[w[x]],q[0]<h&&(h=q[0]),q[0]+v[0]-1>l&&(l=q[0]+v[0]-1),q[1]<n&&(n=q[1]),
|
|
129
|
-
q[1]+v[1]-1>p&&(p=q[1]+v[1]-1)}}
|
|
130
|
-
_$
|
|
131
|
-
d[1]);d=G.getColumnNameFromCoords(d[2],d[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$
|
|
132
|
-
a,c,e,
|
|
133
|
-
n[F].classList.add(_$
|
|
134
|
-
_$
|
|
135
|
-
z=this.visibleCols[x];a>this.visibleCols[this.visibleCols.length-1]||c>B||e<z&&a>=x||
|
|
136
|
-
1,p+=this.table.offsetLeft,v=this.rows[c].element&&this.rows[c].element.parentNode?this.rows[c].element.offsetTop:0,this.rows[
|
|
137
|
-
w=0,l=!0,n.element.style.borderBottomWidth=_$
|
|
138
|
-
_$
|
|
139
|
-
w+_$
|
|
140
|
-
a.active=0;c&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$
|
|
141
|
-
k.refresh=function(a){var c=this.borders;if(a)c[a]&&null!=c[a].x1&&d.call(this,c[a].x1,c[a].y1,c[a].x2,c[a].y2,a);else{a=Object.keys(c);for(var e=0;e<a.length;e++)c[a[e]]&&null!=c[a[e]].x1&&d.call(this,c[a[e]].x1,c[a[e]].y1,c[a[e]].x2,c[a[e]].y2,a[e])}this.edition&&(c=this.parent.input,na.position.call(this,c.x,c.y))};k.destroy=function(a){var c;this&&(c=this.borders[a])&&(c.element.remove(),delete this.borders[a])};return k}(),Xa=function(){var k=function(d){d.setGroup=k[_$
|
|
142
|
-
k.unset};k[_$
|
|
143
|
-
Ca=function(){var k={start:function(d){if(!R.call(this.parent,this))return!1;if(null!==d.target.getAttribute(_$
|
|
144
|
-
d=c.indexOf(parseInt(k.event.y));if(c.length&&-1<d)for(var e=0;e<c.length;e++)b.push(parseInt(this.rows[c[e]].element.offsetHeight));else c=[];-1==d?(c.push(k.event.y),b.push(k.event.h)):b[d]=k.event.h;this.setHeight(c,a,b)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$
|
|
145
|
-
b.push(k.event.w)):b[d]=k.event.w;this.setWidth(c,a,b)}k.event=null},update:function(d){null!=k.event.y?(d=d.pageY-k.event.p,0<k.event.h+d&&(this.rows[k.event.y].element.style.height=k.event.h+d+_$
|
|
146
|
-
return k}();(function(){var k={start:function(d){var b=this.parent.helper;d=parseInt(d.target.getAttribute(_$
|
|
147
|
-
b.style.display=_$
|
|
148
|
-
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
149
|
-
this.content.getBoundingClientRect();this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$
|
|
150
|
-
a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$
|
|
151
|
-
this.tbody.children[d].getAttribute(_$
|
|
152
|
-
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(_$
|
|
153
|
-
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
154
|
-
a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(c?b.top:b.bottom)-a.top+_$
|
|
155
|
-
this.parent.helper.style.left=(b?a.left:a.right)-c.left+_$
|
|
156
|
-
this[d]){for(var b=d,a=this[d],c=[];this[b]==a;)c.push(b),b--;for(b=d+1;this[b]==a;)c.push(b),b++;c.sort(function(e,
|
|
157
|
-
e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$
|
|
158
|
-
v),(c=this.merged.cells[d])&&this.options.mergeCells[c]&&(
|
|
159
|
-
k.update=function(d,b,a){var c=this.options.mergeCells;if(c[d]){var e=c[d][1];if(b!==c[d][0]||e!==a)k.applyDestroy.call(this,d),b&&a&&(c[d]=[b,a],k.applyCreate.call(this,d));k.build.call(this)}};k.remove=function(d,b){if(!R.call(this.parent,this))return!1;b={};var a={},c={};typeof d==_$
|
|
160
|
-
T.call(this.parent,{worksheet:this,action:_$
|
|
161
|
-
1<e?a.setAttribute(_$
|
|
162
|
-
e=c[0];c=c[1];var
|
|
163
|
-
h=Object.keys(
|
|
164
|
-
e=parseInt(d[b[a]][0]),
|
|
165
|
-
k.all};k[_$
|
|
166
|
-
b)):(a.innerHTML=G.getColumnName(d),a.removeAttribute(_$
|
|
167
|
-
(b.style.top=this.thead.lastChild.offsetTop+_$
|
|
168
|
-
!0===b.filter&&(e=!0);!1===b.filter&&(e=!1);!0===e&&c.classList.add(_$
|
|
169
|
-
na[_$
|
|
170
|
-
this.options.footers=b}this.options.footers!=a&&(ha.build.call(this),d.render.call(this),L.call(this,_$
|
|
171
|
-
_$
|
|
172
|
-
a);e&&(c.element.style.textAlign=e);k.call(this,b,a);return c.element};d.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$
|
|
173
|
-
(this.options.footers[b][a]=_$
|
|
174
|
-
|
|
175
|
-
return d}(),za=function(){var k=function(d){d.setNestedCell=k.cell;d.getNestedCell=k.cell;d.setNestedHeaders=k[_$
|
|
176
|
-
this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$
|
|
177
|
-
a.colspan&&(c.colspan=a.colspan,e.setAttribute(_$
|
|
178
|
-
d[a].colspan,e=0;e<c;e++)b.push(a);return b};k.getAffected=function(d){var b=[],a=this.options.nestedHeaders;if(a){var c,e,
|
|
179
|
-
a.title||(a.title=_$
|
|
180
|
-
var e=document.createElement(_$
|
|
181
|
-
0;a<e.length;a++)for(var
|
|
182
|
-
return k}(),ea=function(){var k=function(c,e,g
|
|
183
|
-
null,q=[];for(l=0;l<c.length;l++){if(jSuites.isNumeric(c[l])&&(n.push(c[l]),jSuites.isNumeric(c[l+1])))continue;n.length?(p=d(n,c.length,
|
|
184
|
-
return 0},
|
|
185
|
-
1},n=this.getHighlighted(),p=n[0],q=n[1],v=n[2];n=n[3];c=parseInt(c);e=parseInt(e);null!=c&&null!=e&&(0<c-v?(l=l.call(this,parseInt(v)+1,e),h=parseInt(c)):(l=parseInt(c),h=h.call(this,parseInt(p)-1,e)),0<e-n?(
|
|
186
|
-
|
|
187
|
-
var w=Ma.getFromSelection.call(this,e),x=v=0,y=0,B=0,z=[],F=[],r=!0,A=this;if(h)for(
|
|
188
|
-
|
|
189
|
-
a.cancel=function(c){ea.event=!1;a.reset.call(this,c)};a.reset=function(c){this.resetBorders(_$
|
|
190
|
-
b.cut=function(){return b.copy(!0)}};k[_$
|
|
191
|
-
p=oa.processed.call(this,v,n);void 0!==p&&(w=p)}c&&w.match&&(w.match(c)||w.match(/\n/)||w.match(/"/))&&(w=w.replace(new RegExp(_$
|
|
192
|
-
(typeof
|
|
193
|
-
function(b){b=k.standardize(b);var a={},c=[],e={};var
|
|
194
|
-
for(l=0;l<n.length;l++)
|
|
195
|
-
ta.row.call(this,c,e)}}};k.load=function(b){this.resetBorders();this.resetSelection();this.tbody.innerText=_$
|
|
196
|
-
c,a,b)}else if(this.options.url){var
|
|
197
|
-
[],c=0;c<this.options.columns.length;c++)a.push(oa.processed.call(this,c,b,!0));return a}return JSON.parse(JSON.stringify(this.options.data[b]))};k.setRowData=function(b,a,c){for(var e=[],
|
|
198
|
-
b,e,!0):Q.call(this,b,e);c.push(
|
|
199
|
-
navigator.clipboard.writeText(
|
|
200
|
-
n=q[1];var v=jSuites.hash(c),w=jSuites.hash(k[_$
|
|
201
|
-
c.length&&!this.options.pagination&&!I.limited.call(this)&&console.log(_$
|
|
202
|
-
q[1];v<=q[3];v++)for(w=q[0];w<=q[2];w++)(!this.results||this.results&&0<=this.results.indexOf(v))&&
|
|
203
|
-
(z=this.results[h+v]);var r={x:y,y:z,value:c[v][w]};p&&p[v]&&p[v][w]&&(r.style=p[v][w]);
|
|
204
|
-
_$
|
|
205
|
-
k.downloadCSV=function(b,a){d.call(this,b,a)};k.download=function(b,a){u.render?u.render(this.parent):d.call(this,b,a)};k.standardize=function(b){b||(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$
|
|
206
|
-
k[_$
|
|
207
|
-
a=b[
|
|
208
|
-
!0;var a,c=this.getWorksheetName();if(a=this.parent.config.definedNames){var e=[],
|
|
209
|
-
if(e.length){for(var
|
|
210
|
-
this.config.definedNames[a]=c}};return k}(),ra=function(){var k=[_$
|
|
211
|
-
0,l=[],n,p,q,v=0;v<
|
|
212
|
-
typeof this.onchange==_$
|
|
213
|
-
function(l){Z(
|
|
214
|
-
_$
|
|
215
|
-
_$
|
|
216
|
-
|
|
217
|
-
_$
|
|
218
|
-
B.innerText=x;B.setAttribute(_$
|
|
219
|
-
typeof q.onupdate==_$
|
|
220
|
-
h.addRange(l)}else 35==
|
|
221
|
-
0==n)q=
|
|
222
|
-
b.update;
|
|
223
|
-
p.length&&(h[n[q]]=c(p,h[n[q]])),l=0<v.indexOf(_$
|
|
224
|
-
b.getTokensFromRange.call(this,
|
|
225
|
-
n][
|
|
226
|
-
(v[K]=0);v[K]++;if(3<v[K])throw{error:_$
|
|
227
|
-
aa.length;U++){K=aa[U].split(_$
|
|
228
|
-
null===ua||void 0===ua?ua=null:jSuites.isNumeric(ua)||(ua=_$
|
|
229
|
-
z][h+F]!==_$
|
|
230
|
-
this.records[l+z][h+F].element.classList.add(_$
|
|
231
|
-
r=r.split(_$
|
|
232
|
-
q.length;z++)q[z]=w(q[z]);q=b.getRangeFromTokens.call(this,q);q!==_$
|
|
233
|
-
x=J(B)}else x=this,B=x.getWorksheetName(),y=w;if(x.formula[y]&&!n[w]){var z=!1;n[w]=!0;for(w=0;w<x.formula[y].length;w++){var F=x.formula[y][w];-1==F.indexOf(_$
|
|
234
|
-
h[v][2].indexOf(h[
|
|
235
|
-
q,
|
|
236
|
-
B.push(q[v]));B.length&&(
|
|
237
|
-
y[l].split(_$
|
|
238
|
-
_$
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
_$
|
|
243
|
-
l.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&
|
|
244
|
-
Z(
|
|
245
|
-
d=G.getCoordsFromColumnName(d),c=d[0],d=d[1];return k.getFromCoords.call(a,c,d,b)};k.getFromCoords=function(d,b,a){var c=null;null!=d&&null!=b&&(c=a?k.processed.call(this,d,b):Q.call(this,d,b));return c};k[_$
|
|
246
|
-
(c=p.element.getAttribute(_$
|
|
247
|
-
|
|
248
|
-
function(){for(var d=[],b=this.getSelected(),a=0;a<b.length;a++){var c=b[a].x,e=b[a].y;if(!this.options.columns[c].readOnly&&this.options.columns[c].type==_$
|
|
249
|
-
b.style;a.oldStyle=c&&c[h]?c[h]:_$
|
|
250
|
-
c=1==this.parent.config.stripHTML?this.records[b][d].element.innerText:this.records[b][d].element.innerHTML:((_$
|
|
251
|
-
|
|
252
|
-
this.records[b][d]&&this.records[b][d].element&&this.records[b][d].element.parentNode&&this.records[b][d].element.parentNode.parentNode?!0:!1};k[_$
|
|
253
|
-
var c=[],e=d[0],
|
|
254
|
-
(X.call(this,d[c]),a.push({id:d[c].id,y:d[c].y}),!1!==b&&k.update.call(this,b,d[c].y,d[c].id,!0)):a.push(k.update.call(this,d[c].x,d[c].y,d[c].value,d[c].force));L.call(this,_$
|
|
255
|
-
c[0].updateCell(e,a,d,b,this,c[1]);void 0!==
|
|
256
|
-
_$
|
|
257
|
-
d==_$
|
|
258
|
-
b,a){var c=G.getColumnNameFromCoords(b,a),e=this.options.columns,
|
|
259
|
-
this.options.selectUnLockedCells?d.classList.add(_$
|
|
260
|
-
h[c].align?
|
|
261
|
-
_$
|
|
262
|
-
k[_$
|
|
263
|
-
for(var c=0;c<a.length;c++)this.options.cells[a[c]]=b[a[c]]}};k[_$
|
|
264
|
-
_$
|
|
265
|
-
c=0;c<a.length;c++){var
|
|
266
|
-
b,
|
|
267
|
-
this,e);return!0};k.update=function(b,a,c,e){a=typeof b==_$
|
|
268
|
-
k[_$
|
|
269
|
-
a){Array.isArray(a)||(a=[a]);for(var c,e=b?_$
|
|
270
|
-
e[b].height?e[b].height:c[b].element&&c[b].element.offsetHeight?c[b].element.offsetHeight:this.options.defaultRowHeight||u.defaultRowHeight||24);return a};d[_$
|
|
271
|
-
this.rows[b].element)return this.rows[b].element;this.rows[b]||ta.row.call(this,b);var c=document.createElement(_$
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
b.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
this.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
this.table.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
e.appendChild(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
f
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
1==
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
_$
|
|
375
|
-
[
|
|
376
|
-
h.push({title:E(_$
|
|
377
|
-
h.push({
|
|
378
|
-
|
|
379
|
-
1
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
_$
|
|
389
|
-
|
|
390
|
-
e,
|
|
391
|
-
_$
|
|
392
|
-
|
|
393
|
-
g
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
b,d)};k.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
k
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
_$
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
r.which
|
|
424
|
-
r.preventDefault();
|
|
425
|
-
r.
|
|
426
|
-
u.current.
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
u.current.
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
r
|
|
437
|
-
|
|
438
|
-
u.current.options.
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
A[
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
else if(null!==F)
|
|
447
|
-
|
|
448
|
-
k
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
e,g,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
e,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
g.
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
_$
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
b.
|
|
485
|
-
|
|
486
|
-
c.
|
|
487
|
-
|
|
488
|
-
(
|
|
489
|
-
l.
|
|
490
|
-
f
|
|
491
|
-
|
|
129
|
+
q[1]+v[1]-1>p&&(p=q[1]+v[1]-1)}}f==_$_f4f9[149]&&(this.selectedCell?(Ha.call(this,!1),q=1):q=0,this.selectedCell=[d,b,a,c],this.records[c][a].element&&e&&(x=e.target.getAttribute(_$_f4f9[56]),v=e.target.getAttribute(_$_f4f9[57]),null!==x&&null!==v&&(I.adjust.call(this,a,c,3),I.adjust.call(this,a,c,2),I.adjust.call(this,a,c,1),I.adjust.call(this,a,c,0))),na.position.call(this,d,b),0==q&&H.call(this.parent,_$_f4f9[152],this));ba[_$_f4f9[11]].call(this,h,n,l,p,f,g);f==_$_f4f9[149]&&(H.call(this.parent,
|
|
130
|
+
_$_f4f9[153],this,h,n,l,p,e),ma.update.call(this.parent,this,this.selectedCell))};k.fromElements=function(d,b,a){var c=d.getAttribute(_$_f4f9[56]);d=d.getAttribute(_$_f4f9[57]);if(b){var e=b.getAttribute(_$_f4f9[56]);b=b.getAttribute(_$_f4f9[57])}else e=c,b=d;k[_$_f4f9[11]].call(this,c,d,e,b,a)};k.all=function(){k[_$_f4f9[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};k.getRange=function(){var d=this.selectedCell;if(!d)return _$_f4f9[3];var b=G.getColumnNameFromCoords(d[0],
|
|
131
|
+
d[1]);d=G.getColumnNameFromCoords(d[2],d[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_f4f9[154])?_$_f4f9[155]+a+_$_f4f9[156]:a+_$_f4f9[19];return b==d?a+b:a+G.getRangeFromTokens(u.helpers.getTokensFromRange(b+_$_f4f9[157]+d))};return k}(),ba=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_f4f9[11]];a.getBorder=k[_$_f4f9[58]];a.resetBorders=k.reset;a.refreshBorders=k.refresh};k[_$_f4f9[58]]=function(a){return this.borders[a]};var d=function(a,c,e,f,g,h){if(!ka.isValid.call(this,
|
|
132
|
+
a,c,e,f))return!1;var l=!1,n=null,p=null,q=null,v=null,w=null,x=this.options.freezeColumns||0;g||(g=0);this.borders[g]?n=this.borders[g]:(n={},n.element=document.createElement(_$_f4f9[32]),n.element.classList.add(_$_f4f9[158]),g==_$_f4f9[150]||g==_$_f4f9[159]||g==_$_f4f9[149]?n.element.classList.add(_$_f4f9[160]+g):(h=h?h:jSuites.randomColor(!0),n.color=h,n.element.style.backgroundColor=h+_$_f4f9[161],n.element.style.borderColor=h),g==_$_f4f9[149]&&(h=function(F,r){n[F]=document.createElement(_$_f4f9[32]);
|
|
133
|
+
n[F].classList.add(_$_f4f9[162]);n[F].setAttribute(_$_f4f9[163],r);n.element.appendChild(n[F]);!1===_$_f4f9[164]in document.documentElement&&(n[F].style.display=_$_f4f9[52])},h(_$_f4f9[165],0),n.moveLeft.style.left=_$_f4f9[61],n.moveLeft.style.marginTop=_$_f4f9[166],n.moveLeft.style.marginLeft=_$_f4f9[166],h(_$_f4f9[167],1),n.moveTop.style.left=_$_f4f9[61],n.moveTop.style.marginTop=_$_f4f9[166],n.moveTop.style.marginLeft=_$_f4f9[166],h(_$_f4f9[168],2),n.moveRight.style.right=_$_f4f9[61],n.moveRight.style.marginTop=
|
|
134
|
+
_$_f4f9[166],n.moveRight.style.marginRight=_$_f4f9[166],h(_$_f4f9[169],3),n.moveDown.style.bottom=_$_f4f9[61],n.moveDown.style.marginLeft=_$_f4f9[166],n.moveDown.style.marginBottom=_$_f4f9[166]),this.content.appendChild(n.element));n.x1=a;n.y1=c;n.x2=e;n.y2=f;n.element.style.top=_$_f4f9[170];n.element.style.left=_$_f4f9[170];n.active=0;h=[];for(x=a;x<=e;x++)h.push(x);x=this.options.freezeColumns||0;h=this.options.freezeRows||0;var y=this.visibleRows[h],B=this.visibleRows[this.visibleRows.length-1],
|
|
135
|
+
z=this.visibleCols[x];a>this.visibleCols[this.visibleCols.length-1]||c>B||e<z&&a>=x||f<y&&c>=h?l=!0:(p=this.headers[a]&&this.headers[a].parentNode?this.headers[a].offsetLeft:0,this.headers[e]&&this.headers[e].parentNode?(ia.isVisible.call(this,e)||(e=Ra.call(this,e,null)),q=this.headers[e].offsetLeft):(q=this.thead.lastChild.lastChild.getAttribute(_$_f4f9[56]),q=x&&e<q?this.thead.lastChild.children[x].offsetLeft:this.thead.lastChild.lastChild.offsetLeft),q=q-p+parseInt(this.options.columns[e].width)-
|
|
136
|
+
1,p+=this.table.offsetLeft,v=this.rows[c].element&&this.rows[c].element.parentNode?this.rows[c].element.offsetTop:0,this.rows[f].element&&this.rows[f].element.parentNode?(!1===this.rows[f].visible&&(f=Qa.call(this,e,f)),w=this.rows[f].element.offsetTop+this.rows[f].element.offsetHeight,n.element.style.borderBottomWidth=_$_f4f9[3]):(this.tbody.lastChild?(l=this.tbody.lastChild.getAttribute(_$_f4f9[57]),w=h&&f<l?this.tbody.children[h].offsetTop:this.tbody.lastChild.offsetTop+this.tbody.lastChild.offsetHeight):
|
|
137
|
+
w=0,l=!0,n.element.style.borderBottomWidth=_$_f4f9[61]),w=w-v-1,v+=this.table.offsetTop,this.options.freezeColumns&&(n.element.style.borderLeftWidth=_$_f4f9[3],n.element.style.borderRightWidth=_$_f4f9[3],x=ca.getWidth.call(this),a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||(a&&!e?(e=this.content.scrollLeft+x,e>p+q&&(q+=e-(p+q),n.element.style.borderRightWidth=_$_f4f9[61],l=!0)):(e=this.content.scrollLeft+x,e>p&&(e-=p,e>q?p=v=-2E3:(p=p+e+1,q-=e,n.element.style.borderLeftWidth=
|
|
138
|
+
_$_f4f9[61]))))),this.options.freezeRows&&(n.element.style.borderTopWidth=_$_f4f9[3],n.element.style.borderBottomWidth=_$_f4f9[3],x=ja.getHeight.call(this),a=c<h,e=f<h,a&&e||(a&&!e?(c=this.content.scrollTop+x,c>v+w&&(w+=c-(v+w),n.element.style.borderBottomWidth=_$_f4f9[61])):(c=this.content.scrollTop+x,c>v&&(e=c-v,e>w?p=v=-2E3:(v=v+e+1,w-=e,n.element.style.borderTopWidth=_$_f4f9[61]))))),n.element.style.top=v+_$_f4f9[59],n.element.style.left=p+_$_f4f9[59],n.element.style.width=q+_$_f4f9[59],n.element.style.height=
|
|
139
|
+
w+_$_f4f9[59],n.t=v,n.l=p,n.w=q,n.h=w,g==_$_f4f9[149]&&(n.moveLeft.style.top=n.h/2+_$_f4f9[59],n.moveRight.style.top=n.h/2+_$_f4f9[59],n.moveTop.style.left=n.w/2+_$_f4f9[59],n.moveDown.style.left=n.w/2+_$_f4f9[59]),n.active=1);g==_$_f4f9[149]&&(l?(this.corner.style.top=_$_f4f9[170],this.corner.style.left=_$_f4f9[170]):(this.corner.style.top=v+w-2+_$_f4f9[59],this.corner.style.left=p+q-2+_$_f4f9[59]));this.borders[g]=n},b=function(a,c){a.element.style.top=_$_f4f9[170];a.element.style.left=_$_f4f9[170];
|
|
140
|
+
a.active=0;c&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_f4f9[11]]=function(a,c,e,f,g,h){d.call(this,a,c,e,f,g,h);g==_$_f4f9[149]&&(Ha.call(this,!0),L.call(this,_$_f4f9[126],{x1:a,y1:c,x2:e,y2:f}))};k.reset=function(a,c){a&&a!=_$_f4f9[149]||(this.corner.style.top=_$_f4f9[170],this.corner.style.left=_$_f4f9[170],Ha.call(this,!1));if(a)this.borders[a]&&b(this.borders[a],c);else for(var e=Object.keys(this.borders),f=0;f<e.length;f++)b(this.borders[e[f]],c);a&&a!=_$_f4f9[149]||L.call(this,_$_f4f9[127])};
|
|
141
|
+
k.refresh=function(a){var c=this.borders;if(a)c[a]&&null!=c[a].x1&&d.call(this,c[a].x1,c[a].y1,c[a].x2,c[a].y2,a);else{a=Object.keys(c);for(var e=0;e<a.length;e++)c[a[e]]&&null!=c[a[e]].x1&&d.call(this,c[a[e]].x1,c[a[e]].y1,c[a[e]].x2,c[a[e]].y2,a[e])}this.edition&&(c=this.parent.input,na.position.call(this,c.x,c.y))};k.destroy=function(a){var c;this&&(c=this.borders[a])&&(c.element.remove(),delete this.borders[a])};return k}(),Xa=function(){var k=function(d){d.setGroup=k[_$_f4f9[11]];d.unsetGroup=
|
|
142
|
+
k.unset};k[_$_f4f9[11]]=function(d,b,a){0==d&&(a=document.createElement(_$_f4f9[171]),a.classList.add(_$_f4f9[172]),this.thead.insertBefore(a,this.thead.firstChild),d=document.createElement(_$_f4f9[173]),d.innerHTML=_$_f4f9[174],a.appendChild(d),d=document.createElement(_$_f4f9[173]),a.appendChild(d),b=this.headers[b])&&(b=b.querySelector(_$_f4f9[175]),b||(b=document.createElement(_$_f4f9[32]),b.classList.add(_$_f4f9[176]),b.innerText=_$_f4f9[177],d.appendChild(b)))};k.unset=function(d,b){};return k}(),
|
|
143
|
+
Ca=function(){var k={start:function(d){if(!R.call(this.parent,this))return!1;if(null!==d.target.getAttribute(_$_f4f9[57])){var b=d.target.getAttribute(_$_f4f9[57]);k.event={y:parseInt(b),h:d.target.offsetHeight,p:d.pageY}}else null!==d.target.getAttribute(_$_f4f9[56])&&(b=d.target.getAttribute(_$_f4f9[56]),k.event={x:parseInt(b),w:d.target.offsetWidth,p:d.pageX})},end:function(d){var b=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var c=this.getSelectedRows(!0);
|
|
144
|
+
d=c.indexOf(parseInt(k.event.y));if(c.length&&-1<d)for(var e=0;e<c.length;e++)b.push(parseInt(this.rows[c[e]].element.offsetHeight));else c=[];-1==d?(c.push(k.event.y),b.push(k.event.h)):b[d]=k.event.h;this.setHeight(c,a,b)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$_f4f9[178]));c=this.getSelectedColumns();d=c.indexOf(parseInt(k.event.x));if(c.length&&-1<d)for(e=0;e<c.length;e++)b.push(parseInt(this.options.columns[c[e]].width));else c=[];-1==d?(c.push(k.event.x),
|
|
145
|
+
b.push(k.event.w)):b[d]=k.event.w;this.setWidth(c,a,b)}k.event=null},update:function(d){null!=k.event.y?(d=d.pageY-k.event.p,0<k.event.h+d&&(this.rows[k.event.y].element.style.height=k.event.h+d+_$_f4f9[59],this.refreshBorders())):null!=k.event.x&&(d=d.pageX-k.event.p,0<k.event.w+d&&(this.colgroup[k.event.x].setAttribute(_$_f4f9[178],k.event.w+d),this.options.columns[k.event.x].width=k.event.w+d),0<this.options.freezeColumns&&ca.refresh.call(this),this.refreshBorders())},cancel:function(){k.end.call(this)}};
|
|
146
|
+
return k}();(function(){var k={start:function(d){var b=this.parent.helper;d=parseInt(d.target.getAttribute(_$_f4f9[56]));if(this.merged.cols[d])console.error(_$_f4f9[179]);else{k.event={x:d,d};this.headers[d].classList.add(_$_f4f9[180]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_f4f9[57]);this.records[c][d].element.classList.add(_$_f4f9[180])}a=this.parent.element.getBoundingClientRect();d=this.headers[d].getBoundingClientRect();c=this.content.getBoundingClientRect();
|
|
147
|
+
b.style.display=_$_f4f9[24];b.style.top=c.top-a.top+_$_f4f9[59];b.style.left=d.left-c.left+_$_f4f9[59];b.style.width=_$_f4f9[181];b.style.height=c.height+_$_f4f9[59];b.classList.add(_$_f4f9[182])}},end:function(){this.headers[k.event.x].classList.remove(_$_f4f9[180]);for(var d=0;d<this.tbody.children.length;d++){var b=this.tbody.children[d].getAttribute(_$_f4f9[57]);this.records[b][k.event.x].element.classList.remove(_$_f4f9[180])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,
|
|
148
|
+
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_f4f9[182]);this.parent.helper.style.display=_$_f4f9[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(d){var b=d.target.getAttribute(_$_f4f9[56]);if(null!=b)if(b=parseInt(b),this.merged.cols[b])console.error(_$_f4f9[179]);else{d=d.target.clientWidth/2>d.offsetX;k.event.d=d?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=
|
|
149
|
+
this.content.getBoundingClientRect();this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$_f4f9[59]}}};return k})();var xa=function(){var k={start:function(d){if(R.call(this.parent,this)){this.resetSelection();var b=this.parent.helper;if(null!==d.target.getAttribute(_$_f4f9[57])){var a=parseInt(d.target.getAttribute(_$_f4f9[57]));this.merged.rows[a]?console.error(_$_f4f9[183]):this.results?console.error(_$_f4f9[184]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_f4f9[180]),d=this.parent.element.getBoundingClientRect(),
|
|
150
|
+
a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$_f4f9[24],b.style.top=a.top-d.top+_$_f4f9[59],b.style.left=_$_f4f9[185],b.style.width=this.content.offsetWidth-50+_$_f4f9[59],b.style.height=_$_f4f9[181],b.classList.add(_$_f4f9[186]))}else if(null!==d.target.getAttribute(_$_f4f9[56]))if(a=parseInt(d.target.getAttribute(_$_f4f9[56])),this.merged.cols[a])console.error(_$_f4f9[179]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_f4f9[180]);for(d=0;d<this.tbody.children.length;d++){var c=
|
|
151
|
+
this.tbody.children[d].getAttribute(_$_f4f9[57]);this.records[c][a].element.classList.add(_$_f4f9[180])}d=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();c=this.content.getBoundingClientRect();b.style.display=_$_f4f9[24];b.style.top=c.top-d.top+_$_f4f9[59];b.style.left=a.left-c.left+_$_f4f9[59];b.style.width=_$_f4f9[181];b.style.height=c.height+_$_f4f9[59];b.classList.add(_$_f4f9[182])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_f4f9[180]),
|
|
152
|
+
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(_$_f4f9[186]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_f4f9[180]);for(var d=0;d<this.tbody.children.length;d++){var b=this.tbody.children[d].getAttribute(_$_f4f9[57]);this.records[b][k.event.x].element.classList.remove(_$_f4f9[180])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,
|
|
153
|
+
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_f4f9[182])}this.parent.helper.style.display=_$_f4f9[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(d){if(null!=k.event.y){var b=d.target.getAttribute(_$_f4f9[57]);if(null!=b){var a=b=parseInt(b),c=d.target.clientHeight/2>d.offsetY;c?k.event.y<b&&(a=b-1):k.event.y>b&&(a=b+1);d=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d||(k.event.d=a,
|
|
154
|
+
a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(c?b.top:b.bottom)-a.top+_$_f4f9[59])}}else c=d.target.getAttribute(_$_f4f9[56]),null!=c&&(a=c=parseInt(c),(b=d.target.clientWidth/2>d.offsetX)?k.event.x<c&&(a=c-1):k.event.x>c&&(a=c+1),d=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0)),d||(k.event.d=a,a=this.headers[c].getBoundingClientRect(),c=this.content.getBoundingClientRect(),
|
|
155
|
+
this.parent.helper.style.left=(b?a.left:a.right)-c.left+_$_f4f9[59]))}};return k}(),sa=function(){var k=function(d){d.getMerge=k[_$_f4f9[58]];d.setMerge=k[_$_f4f9[11]];d.updateMerge=k.update;d.removeMerge=k.remove;d.destroyMerged=d.destroyMerge=k.destroy};k.isMerged=function(d,b){var a=G.getColumnNameFromCoords(d,b);if(a=this.merged.cells[a])if(i=this.options.mergeCells[a])m&&void 0!==m[a]||(i[1]>t&&(t=i[1]),m&&(m[a]=this.records[b][d].element&&!this.records[b][d].merged?!0:!1))};k.getAffected=function(d){if(void 0!==
|
|
156
|
+
this[d]){for(var b=d,a=this[d],c=[];this[b]==a;)c.push(b),b--;for(b=d+1;this[b]==a;)c.push(b),b++;c.sort(function(e,f){return e-f});return c}return!1};k[_$_f4f9[58]]=function(d){return d?this.options.mergeCells[d]:this.options.mergeCells};k[_$_f4f9[11]]=function(d,b,a){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var c,e=null,f={},g={},h={},l=!1;typeof d==_$_f4f9[25]?h[d]=[b,a]:typeof d==_$_f4f9[103]?h=d:((e=this.getHighlighted())?e=[G.getColumnNameFromCoords(e[0],
|
|
157
|
+
e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$_f4f9[187])}),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>q))console.log(E(_$_f4f9[188])+_$_f4f9[157]+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=G.getCoordsFromColumnName(n);for(var v=e[1];v<e[1]+q;v++)for(var w=e[0];w<e[0]+p;w++)d=G.getColumnNameFromCoords(w,
|
|
158
|
+
v),(c=this.merged.cells[d])&&this.options.mergeCells[c]&&(f[c]=this.options.mergeCells[c],k.applyDestroy.call(this,c));g[n]=this.options.mergeCells[n]=[p,q];k.applyCreate.call(this,n);S.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&I[_$_f4f9[64]].call(this,e[1],e[0]),T.call(this.parent,{worksheet:this,action:_$_f4f9[84],newValue:g,oldValue:f}),L.call(this,_$_f4f9[84],[g]),k.build.call(this),ka.refresh.call(this),ba.refresh.call(this),H.call(this.parent,_$_f4f9[189],this,g,f))}};
|
|
159
|
+
k.update=function(d,b,a){var c=this.options.mergeCells;if(c[d]){var e=c[d][1];if(b!==c[d][0]||e!==a)k.applyDestroy.call(this,d),b&&a&&(c[d]=[b,a],k.applyCreate.call(this,d));k.build.call(this)}};k.remove=function(d,b){if(!R.call(this.parent,this))return!1;b={};var a={},c={};typeof d==_$_f4f9[25]?c[d]=!0:typeof d==_$_f4f9[103]&&(c=d);d=Object.keys(c);for(c=0;c<d.length;c++)this.options.mergeCells[d[c]]&&(b[d[c]]=this.options.mergeCells[d[c]],a[d[c]]=!0,k.applyDestroy.call(this,d[c],!0));k.build.call(this);
|
|
160
|
+
T.call(this.parent,{worksheet:this,action:_$_f4f9[85],newValue:a,oldValue:b});L.call(this,_$_f4f9[85],{data:a})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(d,b){var a=this.options.mergeCells;if(a[d]){var c=a[d][0]||1,e=a[d][1]||1;d=G.getCoordsFromColumnName(d);if(!this.records[d[1]][d[0]].merged||1==b)if(a=S[_$_f4f9[58]].call(this,d[0],d[1])){a.classList.remove(_$_f4f9[66]);a.style.display=_$_f4f9[3];1<c?a.setAttribute(_$_f4f9[190],c):a.removeAttribute(_$_f4f9[190]);
|
|
161
|
+
1<e?a.setAttribute(_$_f4f9[191],e):a.removeAttribute(_$_f4f9[191]);1==this.options.textOverflow&&(a.style.overflow=_$_f4f9[112]);for(var f=0;f<e;f++)for(var g=0;g<c;g++){b=d[0]+g;var h=d[1]+f;if(a=this.records[h][b])if(a.merged=[g,f,a.v,c,e],0!=g||0!=f)a.element||S[_$_f4f9[58]].call(this,b,h),a.element.classList.add(_$_f4f9[66]),a.merged[3]=a.element.innerText,a.element.innerText=_$_f4f9[3],Q.call(this,b,h,_$_f4f9[3])}}}};k.applyDestroy=function(d,b){var a=this.options.mergeCells;if(a[d]){var c=G.getCoordsFromColumnName(d),
|
|
162
|
+
e=c[0];c=c[1];var f=a[d][0],g=a[d][1];delete this.options.mergeCells[d];for(d=0;d<g;d++)for(var h=0;h<f;h++)if(a=this.records[c+d][e+h])a.element&&(0==h&&0==d?(a.element.removeAttribute(_$_f4f9[190]),a.element.removeAttribute(_$_f4f9[191])):(a.element.classList.remove(_$_f4f9[66]),1==b&&(Q.call(this,e+h,c+d,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(d,b,a,c){if(1==b)var e=[a];else{e=[];for(var f=a;f<a+c;f++)e.push(f)}var g=this.options.mergeCells,
|
|
163
|
+
h=Object.keys(g),l={};for(f=0;f<h.length;f++){a=G.getCoordsFromColumnName(h[f]);for(var n=a[d];n<a[d]+g[h[f]][d];n++)-1!==e.indexOf(n)&&(l[h[f]]||(l[h[f]]=[g[h[f]][0],g[h[f]][1]],1==b&&(l[h[f]][d]+=c)),0==b&&l[h[f]][d]--)}h=Object.keys(l);for(f=0;f<h.length;f++)k.update.call(this,h[f],l[h[f]][0],l[h[f]][1]);k.build.call(this)};k.build=function(){var d=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(d)for(var b=Object.keys(d),a=0;a<b.length;a++){var c=G.getCoordsFromColumnName(b[a]),
|
|
164
|
+
e=parseInt(d[b[a]][0]),f=parseInt(d[b[a]][1]);if(1<e)for(var g=0;g<e;g++)this.merged.cols[c[0]+g]=!0;if(1<f)for(var h=0;h<f;h++)this.merged.rows[c[1]+h]=!0;for(h=0;h<f;h++)for(g=0;g<e;g++){var l=G.getColumnNameFromCoords(c[0]+g,c[1]+h);this.merged.cells[l]=b[a]}}};k.batch=function(d){var b=Object.keys(d);if(b.length)for(var a=0;a<b.length;a++)!1===d[b[a]]&&k.applyCreate.call(this,b[a])};return k}(),Ea=function(){var k=function(d){d.getHeader=k[_$_f4f9[58]];d.setHeader=k[_$_f4f9[11]];d.getHeaders=
|
|
165
|
+
k.all};k[_$_f4f9[58]]=function(d){var b;if(b=this.options.columns)return b[d].title||G.getColumnName(d)};k.all=function(d){for(var b=[],a=0;a<this.options.columns.length;a++)b.push(k[_$_f4f9[58]].call(this,a));return d?b:b.join(this.options.csvDelimiter)};k[_$_f4f9[11]]=function(d,b){if(!R.call(this.parent,this))return!1;var a;if(a=this.options.columns[d]){var c=k[_$_f4f9[58]].call(this,d);if(void 0===b&&(b=prompt(E(_$_f4f9[192]),c),!b))return!1;a.title=b;if(a=this.headers[d])b?(a.innerHTML=b,a.setAttribute(_$_f4f9[193],
|
|
166
|
+
b)):(a.innerHTML=G.getColumnName(d),a.removeAttribute(_$_f4f9[193]));T.call(this.parent,{worksheet:this,action:_$_f4f9[90],column:d,oldValue:c,newValue:b});L.call(this,_$_f4f9[90],{column:d,title:b});H.call(this.parent,_$_f4f9[194],this,d,b,c)}};k.create=function(d){if(this.headers[d])return this.headers[d];var b=document.createElement(_$_f4f9[173]);b.classList.add(_$_f4f9[195]);b.setAttribute(_$_f4f9[56],d);var a=document.createElement(_$_f4f9[196]);this.headers[d]=b;this.colgroup[d]=a;this.options.nestedHeaders&&
|
|
167
|
+
(b.style.top=this.thead.lastChild.offsetTop+_$_f4f9[59]);k.applyProperties.call(this,d);H.call(this.parent,_$_f4f9[197],this,d,b,this.options.columns[d]);return b};k.applyProperties=function(d){var b=this.options.columns[d],a=b.width||this.options.defaultColWidth,c=this.headers[d];b.align&&(c.style.textAlign=b.align);b.title?(c.innerText=b.title,c.setAttribute(_$_f4f9[193],b.title)):(c.innerText=G.getColumnName(d),c.removeAttribute(_$_f4f9[193]));b.tooltip&&(c.title=b.tooltip);var e=this.options.filters;
|
|
168
|
+
!0===b.filter&&(e=!0);!1===b.filter&&(e=!1);!0===e&&c.classList.add(_$_f4f9[198]);if(!1===b.visible||b.type==_$_f4f9[112])a=_$_f4f9[119],b.visible=!1;this.colgroup[d].setAttribute(_$_f4f9[178],a)};return k}(),ha=function(){var k=function(b,a,c){var e=this.footers.content,f;e&&e[a]&&e[a][b]&&(f=e[a][b].element)&&(void 0===c&&(e=this.options.footers,c=e[a]&&e[a][b]?e[a][b]:_$_f4f9[3]),Z(c)&&1==this.parent.config.parseFormulas&&(c=Y.execute.call(this,c,b,null,!1)),this.options.applyMaskOnFooters&&(e=
|
|
169
|
+
na[_$_f4f9[58]].call(this,b),c=u.editors.general.parseValue(b,a,c,this,e[1],f)),c instanceof Element||c instanceof HTMLDocument?(f.innerHTML=_$_f4f9[3],f.appendChild(c)):1==this.parent.config.stripHTML?f.innerText=c:f.innerHTML=c)},d=function(b){b.getFooter=d[_$_f4f9[58]];b.setFooter=d[_$_f4f9[11]];b.resetFooter=d.reset;b.refreshFooter=d.refresh;b.getFooterValue=d.value;b.setFooterValue=d.value};d[_$_f4f9[58]]=function(){return this.options.footers};d[_$_f4f9[11]]=function(b){if(b){var a=this.options.footers;
|
|
170
|
+
this.options.footers=b}this.options.footers!=a&&(ha.build.call(this),d.render.call(this),L.call(this,_$_f4f9[199],{data:this.options.footers}),H.call(this.parent,_$_f4f9[200],this,this.options.footers,a))};d.refresh=function(){var b=this.options.footers;if(b&&b.length)for(var a=0;a<b.length;a++)for(var c=0;c<b[a].length;c++)k.call(this,c,a,b[a][c])};d.value=function(b,a,c){if(void 0===c)return this.options.footers[a][b];k.call(this,b,a,c);L.call(this,_$_f4f9[201],{x:b,y:a,value:c});H.call(this.parent,
|
|
171
|
+
_$_f4f9[202],this,b,a,c)};d.reset=function(){var b=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_f4f9[3];L.call(this,_$_f4f9[203],{});H.call(this.parent,_$_f4f9[200],this,null,b)};d.create=function(b,a){var c=this.footers.content[a][b];if(c&&c.element)return c.element;c=this.footers.content[a][b]={};var e=this.options.columns[b].align;c.element=document.createElement(_$_f4f9[173]);c.element.setAttribute(_$_f4f9[56],b);c.element.setAttribute(_$_f4f9[57],
|
|
172
|
+
a);e&&(c.element.style.textAlign=e);k.call(this,b,a);return c.element};d.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_f4f9[3];for(var b=0;b<this.options.footers.length;b++){if(!this.footers.content[b]){this.footers.content[b]=[];var a=document.createElement(_$_f4f9[171]),c=document.createElement(_$_f4f9[173]);c.innerHTML=_$_f4f9[174];a.appendChild(c);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[b][a]||
|
|
173
|
+
(this.options.footers[b][a]=_$_f4f9[3]),this.footers.content[b][a]||(this.footers.content[b][a]={})}}};d.render=function(){for(var b=this.options.footers,a=0;a<b.length;a++)for(var c=0;c<b[a].length;c++){var e=ha.create.call(this,c,a);this.tfoot.children[a].appendChild(e)}};d.adjust=function(b,a,c){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==c){if(this.headers[b]&&this.headers[b].parentNode)var h=this.headers[b]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(c=0;c<f.length;c++){for(var n=
|
|
174
|
+
f[c].splice(b),p=b;p<b+a;p++)f[c][p]=_$_f4f9[3];f[c]=f[c].concat(n);n=g[c].splice(b);for(p=b;p<b+a;p++)g[c][p]={element:d.create.call(this,p,c)},l&&(1==h?this.tfoot.children[c].appendChild(g[c][p].element):this.tfoot.children[c].insertBefore(g[c][p].element,this.tfoot.children[c].children[b].nextSibling));g[c]=g[c].concat(n)}}else for(c=0;c<f.length;c++){for(p=b;p<b+a;p++)(h=this.footers.content[c][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[c].splice(b,a);e[c]=f[c].splice(b,a)}return e};
|
|
175
|
+
return d}(),za=function(){var k=function(d){d.setNestedCell=k.cell;d.getNestedCell=k.cell;d.setNestedHeaders=k[_$_f4f9[11]];d.getNestedHeaders=k[_$_f4f9[58]];d.resetNestedHeaders=k.reset};k[_$_f4f9[58]]=function(){return this.options.nestedHeaders};k[_$_f4f9[11]]=function(d){k.reset.call(this);this.options.nestedHeaders=d;k.build.call(this);I.call(this,!0,!0);ba.refresh.call(this);L.call(this,_$_f4f9[204],{data:d});H.call(this.parent,_$_f4f9[205],this,d)};k.reset=function(){var d=[],b=this.thead.children;
|
|
176
|
+
this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$_f4f9[206])&&d.push(b[a]);if(d.length)for(;b=d.shift();)b.remove();this.nested=null;I.call(this,!0,!0);ba.refresh.call(this);L.call(this,_$_f4f9[207]);H.call(this.parent,_$_f4f9[205],this,[])};k.cell=function(d,b,a){if(a){if(!R.call(this.parent,this))return!1;var c=this.options.nestedHeaders[b][d],e=this.nested.content[b][d].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==
|
|
177
|
+
a.colspan&&(c.colspan=a.colspan,e.setAttribute(_$_f4f9[190],a.colspan),e.style.display=0==c.colspan?_$_f4f9[52]:_$_f4f9[3]);L.call(this,_$_f4f9[208],{x:d,y:b,properties:a});H.call(this.parent,_$_f4f9[209],this,d,b,a)}else return this.nested.content[b][d].element};k.range=function(d){d=this.options.nestedHeaders[d];for(var b=[],a=0,c=0;c<d.length;c++){var e=parseInt(d[c].colspan);b[c]=[a,a+e-1];a+=e}return b};k.getColumns=function(d){d=this.options.nestedHeaders[d];for(var b=[],a=0;a<d.length;a++)for(var c=
|
|
178
|
+
d[a].colspan,e=0;e<c;e++)b.push(a);return b};k.getAffected=function(d){var b=[],a=this.options.nestedHeaders;if(a){var c,e,f;for(e=0;e<a.length;e++)if((c=k.getColumns.call(this,e))&&void 0!==c[d]){var g=k.range.call(this,e);for(f=g[c[d]][0];f<=g[c[d]][1];f++)b.push(f)}}return b};k.create=function(d,b){if(this.nested.content[b][d])return this.nested.content[b][d].element;var a=this.options.nestedHeaders[b][d]||{},c=this.nested.content[b][d]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_f4f9[210]);
|
|
179
|
+
a.title||(a.title=_$_f4f9[3]);var e=document.createElement(_$_f4f9[173]);e.setAttribute(_$_f4f9[211],d);e.setAttribute(_$_f4f9[212],b);e.setAttribute(_$_f4f9[190],a.colspan);e.setAttribute(_$_f4f9[213],a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return c.element=e};k.build=function(){this.nested||(this.nested={content:[]});var d,b,a=0;if(d=this.options.nestedHeaders){for(b=0;b<d.length;b++){this.nested.content[b]=[];var c=document.createElement(_$_f4f9[173]);c.innerHTML=_$_f4f9[174];
|
|
180
|
+
var e=document.createElement(_$_f4f9[171]);e.classList.add(_$_f4f9[206]);e.appendChild(c);this.thead.insertBefore(e,this.thead.lastChild)}for(b=0;b<this.thead.children.length;b++)this.thead.children[b].firstChild.style.top=a+_$_f4f9[59],a+=this.thead.children[b].offsetHeight;a=this.thead.offsetHeight-this.thead.lastChild.offsetHeight;for(b=0;b<this.headers.length;b++)this.headers[b].style.top=a+_$_f4f9[59]}};k.adjust=function(d,b,a,c){var e=this.options.nestedHeaders;if(e)if(1==a)if(c&&c.nested)for(a=
|
|
181
|
+
0;a<e.length;a++)for(var f=0;f<e[a].length;f++)k.cell.call(this,f,a,{colspan:c.nested[a][f]});else for(a=0;a<e.length;a++){if((f=k.getColumns.call(this,a))&&e[a][f]){f=f[d];var g=parseInt(e[a][f].colspan)+b;k.cell.call(this,f,a,{colspan:g})}}else{c=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){c[a]=[];for(f=0;f<b;f++){var h=g[d+f];void 0!==h&&(typeof c[a][h]==_$_f4f9[21]&&(c[a][h]=e[a][h].colspan),e[a][h].colspan--)}g=Object.keys(c[a]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],a,{colspan:e[a][g[f]].colspan})}return c}};
|
|
182
|
+
return k}(),ea=function(){var k=function(c,e,f,g){Z(c)?c=Y.shiftFormula(c,e,f):g&&(c=jSuites.calendar.dateToNum(c),0>e||0>f?c--:c++,c=jSuites.calendar.numToDate(c));return c},d=function(c,e,f){if(1===c.length){if(1<e||u.formula&&typeof u.formula.TREND!==_$_f4f9[104])f?c[0]--:c[0]++;return c}e=1;f=[];for(var g=[],h=0;h<c.length;h++)g.push(e++);for(h=0;h<c.length;h++)f.push(e++);return u.formula&&typeof u.formula.TREND==_$_f4f9[104]?u.formula.TREND(c,g,f):c},b=function(c,e,f,g,h){var l=null,n=[],p=
|
|
183
|
+
null,q=[];for(l=0;l<c.length;l++){if(jSuites.isNumeric(c[l])&&(n.push(c[l]),jSuites.isNumeric(c[l+1])))continue;n.length?(p=d(n,c.length,g),Array.isArray(p)?(p.forEach(function(v){q.push(v)}),n=[]):q.push(p)):(p=void 0!==h&&this.options.columns[h].type===_$_f4f9[214]?!0:!1,g&&(e*=-1,f*=-1),p=k(c[l],e*c.length,f*c.length,p),q.push(p))}return q},a=function(c,e){var f=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w--;for(var y=w;0<=y;y--)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;
|
|
184
|
+
return 0},g=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w++;for(var y=w;y<x.length;y++)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return x[x.length-1]},h=function(w,x){for(;0<=w;w--)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_f4f9[66]))return w;return 0},l=function(w,x){for(;w<this.options.columns.length;w++)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_f4f9[66]))return w;return this.options.columns-
|
|
185
|
+
1},n=this.getHighlighted(),p=n[0],q=n[1],v=n[2];n=n[3];c=parseInt(c);e=parseInt(e);null!=c&&null!=e&&(0<c-v?(l=l.call(this,parseInt(v)+1,e),h=parseInt(c)):(l=parseInt(c),h=h.call(this,parseInt(p)-1,e)),0<e-n?(g=g.call(this,parseInt(n)),f=parseInt(e)):(g=parseInt(e),f=f.call(this,parseInt(q))),Math.abs(c-v)>Math.abs(e-n)?(g=parseInt(q),f=parseInt(n)):(l=parseInt(p),h=parseInt(v)),this.setBorder(l,g,h,f,_$_f4f9[159]))};a.execute=function(c){if(!R.call(this.parent,this))return!1;var e=this.getHighlighted(),
|
|
186
|
+
f=Ia[_$_f4f9[58]].call(this,e,!1,!1),g=!0,h=!1,l=!1,n=this.borders.cloning;if(c)if(n&&n.active){c=n.x1;var p=n.y1,q=n.x2;n=n.y2;e[0]==c?(h=!0,e[1]>p&&(l=!0)):e[0]>c&&(l=!0)}else return!1;else if(n=this.getSelected(),n.length)for(h=!0,c=n[0].x,q=n[n.length-1].x,p=parseInt(n[n.length-1].y)+1,n=parseInt(n[n.length-1].y);1==g;){if(this.options.data[n+1]){this.options.data[n+1][c-1]||this.options.data[n+1][q+1]||(g=!1);for(var v=c;v<=q;v++)this.options.data[n+1][v]&&(g=!1)}else g=!1;g&&n++}else return!1;
|
|
187
|
+
var w=Ma.getFromSelection.call(this,e),x=v=0,y=0,B=0,z=[],F=[],r=!0,A=this;if(h)for(g=function(){F.push({x:v,y:x,value:z[B],style:w[B][y]});B++;void 0==f[B]&&(B=0,r&&(z=b.call(A,z,0,1,l,v)))},v=c;v<=q;v++){r=void 0!==this.options.columns[v].autoIncrement?this.options.columns[v].autoIncrement:this.parent.config.autoIncrement;B=0;z=[];for(x=0;x<f.length;x++)z.push(f[x][y]);l&&z.reverse();r&&(z=b.call(A,z,0,1,l,v));if(l)for(x=n;x>=p;x--)g();else for(x=p;x<=n;x++)g();y++}else for(r=this.parent.config.autoIncrement,
|
|
188
|
+
g=function(){F.push({x:v,y:x,value:z[y],style:w[B][y]});y++;void 0==f[B][y]&&(y=0,r&&(z=b(z,1,0,l)))},x=p;x<=n;x++){y=0;z=[];for(v=0;v<f[B].length;v++)z.push(f[B][v]);l&&z.reverse();r&&(z=b(z,1,0,l));if(l)for(v=q;v>=c;v--)g();else for(v=c;v<=q;v++)g();B++}F.length&&this.setValue(F);e[0]<c&&(c=e[0]);e[1]<p&&(p=e[1]);e[2]>q&&(q=e[2]);e[3]>n&&(n=e[3]);this.resetBorders(_$_f4f9[159],!0);this.updateSelectionFromCoords(c,p,q,n)};a.end=function(c){ea.event=!1;ea.execute.call(this,!0);ca.refresh.call(this)};
|
|
189
|
+
a.cancel=function(c){ea.event=!1;a.reset.call(this,c)};a.reset=function(c){this.resetBorders(_$_f4f9[159],!0)};return a}(),Ia=function(){var k=function(b){b.getData=k[_$_f4f9[58]];b.getJson=k[_$_f4f9[58]];b.setData=k[_$_f4f9[11]];b.loadData=k.load;b.getRowData=k.getRowData;b.setRowData=k.setRowData;b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$_f4f9[58]];b.download=k.download;b.downloadCSV=k.downloadCSV;b.copy=k.copy;b.paste=k.paste;
|
|
190
|
+
b.cut=function(){return b.copy(!0)}};k[_$_f4f9[58]]=function(b,a,c,e){!0===b&&(b=this.getHighlighted());var f=b?!0:!1,g=[],h=this.options.columns.length,l=this.options.data.length;void 0===e&&(e=this.dataType&&typeof c==_$_f4f9[21]?1:0);for(var n=0;n<l;n++){var p=null;var q=e?{}:[];for(var v=0;v<h;v++){var w;if(!(w=!f)){w=b[1];var x=b[2],y=b[3];w=v>=b[0]&&v<=x&&n>=w&&n<=y?!0:!1}if(w&&(!f||!this.results||-1!=this.results.indexOf(n))){w=Q.call(this,v,n);if(a){if(f&&!1===this.rows[n].visible)continue;
|
|
191
|
+
p=oa.processed.call(this,v,n);void 0!==p&&(w=p)}c&&w.match&&(w.match(c)||w.match(/\n/)||w.match(/"/))&&(w=w.replace(new RegExp(_$_f4f9[20],_$_f4f9[14]),_$_f4f9[215]),w=_$_f4f9[20]+w+_$_f4f9[20]);e?jSuites.path.call(q,_$_f4f9[3]+qa.call(this,v),w):q.push(w);p=!0}}p&&(c?g.push(q.join(c)):g.push(q))}return c?g.join(_$_f4f9[10])+_$_f4f9[10]:g};k.parse=function(){for(var b,a={},c=0,e,f=[],g=this.options.data,h=0;h<g.length;h++)b=null,e=h,g[h].data&&(Array.isArray(g[h].data)||typeof g[h].data==_$_f4f9[103])&&
|
|
192
|
+
(typeof g[h].id!==_$_f4f9[21]&&(b=parseInt(g[h].id)),typeof g[h].row!==_$_f4f9[21]&&(e=g[h].row),f[e]=g[h].data,g[h]=[]),e>c&&(c=e),b&&(a[e]=b);if(Object.keys(f).length)for(h=0;h<=c;h++)f[h]&&(g[h]=f[h]);c=this.getPrimaryKey();if(!1!==c)for(c=qa.call(this,c),h=0;h<g.length;h++)a[h]||!1===c||(b=parseInt(g[h][c]),0<b&&(a[h]=b));return a};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$_f4f9[21]&&(this.dataType=1)};k[_$_f4f9[11]]=
|
|
193
|
+
function(b){b=k.standardize(b);var a={},c=[],e={};var f=Object.keys(b[0]).length-this.options.columns.length;0<f&&this.insertRow(f);var g=b.length-this.options.data.length;0<g&&this.insertRow(g);for(var h=0;h<this.options.data.length;h++){void 0===b[h]&&(b[h]={row:h,data:[]});for(var l=0;l<this.options.columns.length;l++)void 0===b[h].data[l]&&(b[h].data[l]=_$_f4f9[3])}for(l=0;l<this.options.columns.length;l++){var n=qa.call(this,l);e[n]=l}for(h=0;h<b.length;h++){g=b[h].row;n=Object.keys(b[h].data);
|
|
194
|
+
for(l=0;l<n.length;l++)f=null,void 0!==e[n[l]]?f=e[n[l]]:-1<n[l]&&(f=parseInt(n[l])),null!==f&&c.push({x:f,y:g,value:b[h].data[n[l]]});b[h].id&&(a[g]=b[h].id)}ya.setId.call(this,a);oa[_$_f4f9[11]].call(this,c,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var b=k.parse.call(this),a=this.options.data.length;this.options.minDimensions[1]>a&&(a=this.options.minDimensions[1]);for(var c=0;c<a;c++){var e=b[c]?b[c]:null;
|
|
195
|
+
ta.row.call(this,c,e)}}};k.load=function(b){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_f4f9[3];this.options.data=b;k.build.call(this);I.call(this,!0,!0);fa.update.call(this)};k.refresh=function(b){if(typeof b!==_$_f4f9[21])for(var a=0;a<this.options.columns.length;a++){var c=this.records[b]&&this.records[b][a].element?this.records[b][a].element:null,e=na[_$_f4f9[58]].call(this,a,b);typeof e[0].updateCell==_$_f4f9[104]&&e[0].updateCell(c,Q.call(this,a,b),a,b,this,e[1]);c&&S.applyOverflow.call(this,
|
|
196
|
+
c,a,b)}else if(this.options.url){var f=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_f4f9[74],dataType:_$_f4f9[75],success:function(g){f.setData(g);jSuites.loading.hide()}})}};k.getRowData=function(b,a){if(typeof this.options.data[b]===_$_f4f9[21])return!1;if(a){if(this.dataType){a={};for(var c=0;c<this.options.columns.length;c++){var e=_$_f4f9[3]+qa.call(this,c),f=_$_f4f9[3]+oa.processed.call(this,c,b,!0);jSuites.path.call(a,e,f)}}else for(a=
|
|
197
|
+
[],c=0;c<this.options.columns.length;c++)a.push(oa.processed.call(this,c,b,!0));return a}return JSON.parse(JSON.stringify(this.options.data[b]))};k.setRowData=function(b,a,c){for(var e=[],f=0;f<this.options.columns.length;f++)typeof a[f]===_$_f4f9[21]&&(a[f]=_$_f4f9[3]),e.push({x:f,y:b,value:a[f]});e.length&&this.setValue(e,null,c)};k.getColumnData=function(b,a){if(typeof this.options.columns[b]===_$_f4f9[21])return!1;for(var c=[],e=0;e<this.options.data.length;e++){var f=a?oa.processed.call(this,
|
|
198
|
+
b,e,!0):Q.call(this,b,e);c.push(f)}return c};k.setColumnData=function(b,a,c){for(var e=[],f=0;f<this.rows.length;f++)typeof a[f]===_$_f4f9[21]&&(a[f]=_$_f4f9[3]),e.push({x:b,y:f,value:a[f]});e.length&&this.setValue(e,null,c)};k.copy=function(b){var a=this,c=this.getHighlighted(),e=function(){a.setBorder(c[0],c[1],c[2],c[3],_$_f4f9[150]);a.borders.copying.clear=1==b?!0:!1},f=k[_$_f4f9[58]].call(this,c,!0,_$_f4f9[216]),g=H.call(this.parent,_$_f4f9[217],this,c,f);if(g)f=g;else if(!1===g)return!1;navigator.clipboard?
|
|
199
|
+
navigator.clipboard.writeText(f).then(e):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_f4f9[218]),e());return f};k.paste=function(b,a,c){if(!R.call(this.parent,this))return!1;var e=this,f=function(){e.borders.copying&&(e.resetBorders(_$_f4f9[150],!0),e.borders.copying.clear=!1)},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];
|
|
200
|
+
n=q[1];var v=jSuites.hash(c),w=jSuites.hash(k[_$_f4f9[58]].call(this,q,!0,_$_f4f9[216]));if(v!=w)f();else{var x=0,y=0;c=k[_$_f4f9[58]].call(this,q,!1,!1);for(v=q[1];v<=q[3];v++)if(!this.results||-1!=this.results.indexOf(v)){p[y]=[];x=0;for(w=q[0];w<=q[2];w++)g=G.getColumnNameFromCoords(w,v),p[y][x]=h&&h[g]?h[g]:_$_f4f9[219],x++;y++}}}b=parseInt(b);a=parseInt(a);if(c){Array.isArray(c)||(c=G.parseCSV(c,_$_f4f9[216]));if(v=H.call(this.parent,_$_f4f9[220],this,c,b,a,p))c=v;else if(!1===v)return!1;100<
|
|
201
|
+
c.length&&!this.options.pagination&&!I.limited.call(this)&&console.log(_$_f4f9[221]);if(g=this.getHighlighted()){x=[];y=[];var B=[];h=[];var z=0,F=0;for(v=g[1];v<=g[3];v++)if(!this.results||-1!=this.results.indexOf(v)){x=[];y=[];for(w=g[0];w<=g[2];w++)x.push(c[F][z]),p&&p[F]&&p[F][z]?y.push(p[F][z]):y.push(_$_f4f9[3]),z++,z>=c[0].length&&(z=0);B.push(x);h.push(y);F++;F>=c.length&&(F=0)}0==B.length%c.length&&0==B[0].length%c[0].length&&(c=B,p=h)}h=null;g=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(v=
|
|
202
|
+
q[1];v<=q[3];v++)for(w=q[0];w<=q[2];w++)(!this.results||this.results&&0<=this.results.indexOf(v))&&g.push({x:w,y:v,value:_$_f4f9[3],style:_$_f4f9[3]});f()}v=b+c[0].length-this.options.columns.length;0<v&&this.insertColumn(v);v=a+c.length-this.rows.length;0<v&&this.insertRow(v);y=x=b;z=B=a;F=null;this.results&&(h=this.results.indexOf(a));for(v=0;v<c.length;v++)for(w=0;w<c[v].length;w++){null!==l&&null!==n&&c[v][w][0]==_$_f4f9[18]&&(c[v][w]=Y.shiftFormula(c[v][w],b-l,a-n));y=b+w;z=a+v;this.results&&
|
|
203
|
+
(z=this.results[h+v]);var r={x:y,y:z,value:c[v][w]};p&&p[v]&&p[v][w]&&(r.style=p[v][w]);g.push(r);null===F&&ka.isSelected.call(this,y,z,q)&&(F=!0)}F&&f();g.length&&(oa[_$_f4f9[11]].call(this,g,null,this.parent.config.forceUpdateOnPaste?!0:!1),H.call(this.parent,_$_f4f9[222],this,g),this.updateSelectionFromCoords(x,B,y,z))}};var d=function(b,a){if(this.parent.config.allowExport){void 0===a&&(a=!0);var c=_$_f4f9[3];if(1==b||1==this.parent.config.includeHeadersOnDownload)c+=this.getHeaders().replace(/\s+/gm,
|
|
204
|
+
_$_f4f9[154])+_$_f4f9[10];c+=k[_$_f4f9[58]].call(this,null,a,this.options.csvDelimiter);a=new Blob([_$_f4f9[224]+c],{type:_$_f4f9[225]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(a,this.options.csvFileName+_$_f4f9[226]):(b=document.createElement(_$_f4f9[227]),a=URL.createObjectURL(a),b.href=a,b.setAttribute(_$_f4f9[228],this.options.csvFileName+_$_f4f9[226]),document.body.appendChild(b),b.click(),b.parentNode.removeChild(b))}else console.error(_$_f4f9[223])};
|
|
205
|
+
k.downloadCSV=function(b,a){d.call(this,b,a)};k.download=function(b,a){u.render?u.render(this.parent):d.call(this,b,a)};k.standardize=function(b){b||(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$_f4f9[103]||(b=[b]);for(var a=[],c=0;c<b.length;c++){var e={};Array.isArray(b[c])||void 0==b[c].data?e.data=b[c]:e=b[c];e.row=void 0==b[c].row?c:b[c].row;a[e.row]=e}for(c=0;c<a.length;c++)b[c]=a[c]||{row:c,data:[]};return b};return k}(),Ya=function(){var k=function(d){d.getLabel=
|
|
206
|
+
k[_$_f4f9[58]];d.getLabelFromCoords=k[_$_f4f9[58]]};k[_$_f4f9[58]]=function(d,b,a){if(typeof d==_$_f4f9[25]){d=G.getCoordsFromColumnName(d);var c=d[0];b=d[1]}else c=d;return this.getProcessed(c,b,a)};return k}(),Ja=function(){var k=function(d){d.getDefinedNames=k[_$_f4f9[58]];d.setDefinedNames=k[_$_f4f9[11]]};k[_$_f4f9[11]]=function(d){if(d.length)if(1!==this.parent.edition)console.log(_$_f4f9[229]);else{for(var b=this.parent.config.definedNames,a,c=[],e=0;e<d.length;e++){var f=d[e].index.toUpperCase();
|
|
207
|
+
a=b[f]?b[f]:null;d[e].value?(d[e].value=W(d[e].value),this.parent.config.definedNames[f]=d[e].value):b[f]&&delete this.parent.config.definedNames[f];c.push({index:f,value:d[e].value,oldValue:a})}T.call(this.parent,{worksheet:this,action:_$_f4f9[100],records:c});L.call(this,_$_f4f9[100],{data:c});H.call(this.parent,_$_f4f9[230],this,c)}};k[_$_f4f9[58]]=function(d){var b=this.parent.config.definedNames;return d?b[d]:b};k.updateAll=function(d,b){if(!this.parent.ignoreHistory){this.parent.historyCascade=
|
|
208
|
+
!0;var a,c=this.getWorksheetName();if(a=this.parent.config.definedNames){var e=[],f=Object.keys(a);if(f.length){for(var g=0;g<f.length;g++){var h=Y.update.call(this,a[f[g]],d,b,c);h!==a[f[g]]&&(-1!==h.indexOf(_$_f4f9[231])&&(h=null),e.push({index:f[g],value:h}))}e.length&&k[_$_f4f9[11]].call(this,e)}}this.parent.historyCascade=!1}};k.updateWorksheetName=function(d,b){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a;if(a=this.parent.config.definedNames){var c=[],e=Object.keys(a);
|
|
209
|
+
if(e.length){for(var f=0;f<e.length;f++){var g=Y.updateWorksheetName(a[e[f]],d,b);g!==a[e[f]]&&c.push({index:e[f],value:g})}c.length&&k[_$_f4f9[11]].call(this,c)}}this.parent.historyCascade=!1}};k.build=function(){var d=Object.keys(this.config.definedNames);if(d&&d.length)if(1!==this.edition)this.config.definedNames={},console.log(_$_f4f9[229]);else for(var b=0;b<d.length;b++){var a=(_$_f4f9[3]+d[b]).toUpperCase(),c=W(this.config.definedNames[d[b]]);a!=d[b]&&delete this.config.definedNames[d[b]];
|
|
210
|
+
this.config.definedNames[a]=c}};return k}(),ra=function(){var k=[_$_f4f9[232],_$_f4f9[233],_$_f4f9[234],_$_f4f9[235],_$_f4f9[236]],d=[_$_f4f9[237],_$_f4f9[177],_$_f4f9[238],_$_f4f9[239],_$_f4f9[240],_$_f4f9[241],_$_f4f9[1],_$_f4f9[242],_$_f4f9[37],_$_f4f9[243],_$_f4f9[18],_$_f4f9[15],_$_f4f9[17],_$_f4f9[244]],b=[],a=function(){if(0<b.length){for(var g,h=0;h<b.length;h++)g=-1===b[h].indexOf(_$_f4f9[19])?this:J(b[h].split(_$_f4f9[19])[0]),ba.destroy.call(g,b[h]);b=[]}},c=function(g){a.call(this);for(var h=
|
|
211
|
+
0,l=[],n,p,q,v=0;v<g.children.length;v++)if(n=g.children[v].getAttribute(_$_f4f9[245])){l[n]||(l[n]=k[h++],4<h&&(h=0));g.children[v].style.color=l[n];-1===n.indexOf(_$_f4f9[19])?(p=this,q=n):(p=n.split(_$_f4f9[19]),q=p[1],p=J(p[0]));if(0<=q.indexOf(_$_f4f9[157])){var w=q.split(_$_f4f9[157]);q=G.getCoordsFromColumnName(w[0]);w=G.getCoordsFromColumnName(w[1])}else w=q=G.getCoordsFromColumnName(q);ka[_$_f4f9[11]].call(p,q[0],q[1],w[0],w[1],null,n,l[n]);b.push(n)}},e=function(g){this.worksheet&&(a.call(this.worksheet),
|
|
212
|
+
typeof this.onchange==_$_f4f9[104]&&this.onchange.call(this,this.innerText,g),this.worksheet=null)},f=function(g,h){h&&typeof h!=_$_f4f9[104]||(h={type:_$_f4f9[246],onchange:h});h.type===_$_f4f9[246]?(g.classList.add(_$_f4f9[247]),g.addEventListener(_$_f4f9[248],function(l){l=l.changedTouches&&l.changedTouches[0]?l.changedTouches[0].clientX:l.clientX;var n=this.getBoundingClientRect();24>n.width-(l-n.left)&&(f.current=g,g.classList.add(_$_f4f9[249]),g.classList.add(_$_f4f9[114]))})):(g.addEventListener(_$_f4f9[250],
|
|
213
|
+
function(l){Z(g.innerText)&&(g.classList.add(_$_f4f9[114]),u.current&&setTimeout(function(){g.worksheet=u.current;f.parse.call(u.current,g);var n=document.createTextNode(_$_f4f9[3]);g.appendChild(n);jSuites.focus(g)}))}),g.addEventListener(_$_f4f9[251],function(l){Z(g.innerText)?g.classList.add(_$_f4f9[114]):g.classList.contains(_$_f4f9[114])&&(g.classList.remove(_$_f4f9[114]),g.worksheet&&a.call(g.worksheet));l.preventDefault()}),g.addEventListener(_$_f4f9[109],function(l){27==l.which&&(g.innerText=
|
|
214
|
+
_$_f4f9[3],e.call(g,!1))}));g.classList.add(_$_f4f9[252]);g.classList.add(_$_f4f9[251]);g.setAttribute(_$_f4f9[253],!0);g.addEventListener(_$_f4f9[254],function(l){e.call(g,!0)});g.val=function(l){if(void 0===l)return g.innerText;g.innerText=l};h.onchange&&(g.onchange=h.onchange);h.onupdate&&(g.onupdate=h.onupdate)};f.current=null;f.parse=function(g){for(var h=_$_f4f9[3],l=_$_f4f9[3],n=window.getSelection(),p=document.createRange(),q=G.getCaretIndex.call(this.parent,g),v=Y.tokenize(g.innerText.replace(/(\r\n|\n|\r)/gm,
|
|
215
|
+
_$_f4f9[3])),w=0;w<v.length;w++)v[w]&&Y.tokenIdentifier.test(v[w].trim())?(w==v.length-1&&(l=_$_f4f9[255]),h+=_$_f4f9[256]+l+_$_f4f9[257]+v[w].trim().replace(/\$/g,_$_f4f9[3])+_$_f4f9[258]+v[w]+_$_f4f9[259]):h+=v[w];g.innerHTML=h;h=null;for(w=0;w<g.childNodes.length&&!(h=g.childNodes[w],l=h.tagName?h.innerText.length:h.length,0>=q-l);w++)q-=l;h&&(h.tagName?p.setStart(h.firstChild,q):(q>h.length&&(q=h.length),p.setStart(h,q)),n.removeAllRanges(),n.addRange(p));c.call(this,g)};f.close=function(g){a.call(this);
|
|
216
|
+
g?g.classList.remove(_$_f4f9[114]):f.current&&(typeof f.current.onchange==_$_f4f9[104]&&f.current.onchange.call(f.current),f.current.classList.remove(_$_f4f9[249]),f.current.classList.remove(_$_f4f9[114]),f.current.worksheet=null,f.current=null)};f.getName=function(g,h,l,n,p){g=G.getColumnNameFromCoords(g,h);l=G.getColumnNameFromCoords(l,n);p.ctrlKey&&(g=l);return g!==l?(p=g+_$_f4f9[157]+l,p=Y.getTokensFromRange.call(this,p),Y.getRangeFromTokens.call(this,p)):g};f.range=function(g,h,l,n,p){f.current.getAttribute(_$_f4f9[260])==
|
|
217
|
+
_$_f4f9[261]&&(g=l,h=n);g=f.getName.call(this,g,h,l,n,p);h=document.createElement(_$_f4f9[262]);h.innerText=g;h.setAttribute(_$_f4f9[245],g);f.current.innerText=_$_f4f9[3];f.current.appendChild(h);c.call(this,f.current);jSuites.focus(h);p.preventDefault()};f.update=function(g,h,l,n,p,q,v){q.getAttribute(_$_f4f9[260])==_$_f4f9[261]&&(g=l,h=n);var w=jSuites.getNode();if(w){var x=f.getName.call(this,g,h,l,n,p);this!==v&&(x=v.getWorksheetName()+_$_f4f9[19]+x);g=function(y){var B=document.createElement(_$_f4f9[262]);
|
|
218
|
+
B.innerText=x;B.setAttribute(_$_f4f9[245],x);w.parentNode===q&&!1===y?w.parentNode.insertBefore(B,w.nextSibling):q.appendChild(B);w=B};if(w.getAttribute(_$_f4f9[245]))p.ctrlKey?(q.appendChild(document.createTextNode(_$_f4f9[37])),g(!0)):(w.innerText=x,w.setAttribute(_$_f4f9[245],x));else{if(!w.innerText||w.innerText!==_$_f4f9[3]&&-1==d.indexOf(w.innerText.slice(-1))||w.nextElementSibling&&w.nextElementSibling.getAttribute(_$_f4f9[245]))return!1;g(!1)}jSuites.focus(w);c.call(this,q);p.preventDefault();
|
|
219
|
+
typeof q.onupdate==_$_f4f9[104]&&q.onupdate.call(q,q.innerText);return!0}return!1};f.onkeydown=function(g){g.target.worksheet=this;if(g.ctrlKey){if(67==g.which||88==g.which)g=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_f4f9[3]),navigator.clipboard?navigator.clipboard.writeText(g):(this.parent.textarea.value=g,this.parent.textarea.select(),document.execCommand(_$_f4f9[218]))}else if(36==g.which){var h=window.getSelection(),l=document.createRange();l.setStart(g.target,0);h.removeAllRanges();
|
|
220
|
+
h.addRange(l)}else 35==g.which?jSuites.focus(g.target):187==g.which?!g.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_f4f9[3])&&g.target.getAttribute(_$_f4f9[116])&&g.target.removeAttribute(_$_f4f9[116]):13==g.which&&g.target.blur()};f.palette=function(g){k=g};return f}(),Y=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),d=function(g){g=W(g);for(var h=_$_f4f9[3],l=[],n=0,p=0;p<g.length;p++){if(g[p]==_$_f4f9[20]||g[p]==_$_f4f9[155])n=0==n?1:0;var q;if(q=
|
|
221
|
+
0==n)q=g[p],(q=q==_$_f4f9[237]||q==_$_f4f9[177]||q==_$_f4f9[238]||q==_$_f4f9[239]||q==_$_f4f9[240]||q==_$_f4f9[12])||(q=g[p],q=q==_$_f4f9[241]||q==_$_f4f9[263]||q==_$_f4f9[1]||q==_$_f4f9[2]||q==_$_f4f9[242]||q==_$_f4f9[264]||q==_$_f4f9[37]||q==_$_f4f9[243]||q==_$_f4f9[18]||q==_$_f4f9[15]||q==_$_f4f9[17]||q==_$_f4f9[244]);q?(h&&(l.push(h),h=_$_f4f9[3]),l.push(g[p])):h+=g[p]}h&&l.push(h);for(p=0;p<l.length;p++)0==n&&(l[p]=l[p].trim());return l},b=function(g){g.setFormula=b[_$_f4f9[11]];g.updateFormula=
|
|
222
|
+
b.update;g.executeFormula=b.execute;g.resetArray=b.resetArray;g.formula=[];g.tracking=[]};b.run=function(g,h){var l=_$_f4f9[3],n=Object.keys(h);if(n.length){for(var p={},q=0;q<n.length;q++){var v=n[q].replace(/!/g,_$_f4f9[39]);0<v.indexOf(_$_f4f9[39])&&(v=v.split(_$_f4f9[39]),p[v[0]]=!0)}v=Object.keys(p);for(q=0;q<v.length;q++)l+=_$_f4f9[265]+v[q]+_$_f4f9[266];for(q=0;q<n.length;q++)v=n[q].replace(/!/g,_$_f4f9[39]),null===h[n[q]]||jSuites.isNumeric(h[n[q]])||(p=h[n[q]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&
|
|
223
|
+
p.length&&(h[n[q]]=c(p,h[n[q]])),l=0<v.indexOf(_$_f4f9[39])?l+(v+_$_f4f9[267]+h[n[q]]+_$_f4f9[268]):l+(_$_f4f9[265]+v+_$_f4f9[267]+h[n[q]]+_$_f4f9[268])}g=g.replace(/\$/g,_$_f4f9[3]);(p=g.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(g=c(p,g));g=g.replace(/!/g,_$_f4f9[39]);g=(new Function(l+_$_f4f9[269]+g))();null===g&&(g=0);return g};b[_$_f4f9[11]]=function(){};var a=function(g){g=W(g,!0);return g.replace(/\$/g,_$_f4f9[3])},c=function(g,h){for(var l=0;l<g.length;l++){var n=
|
|
224
|
+
b.getTokensFromRange.call(this,g[l]);h=h.replace(g[l],_$_f4f9[242]+n.join(_$_f4f9[37])+_$_f4f9[264])}return h},e=function(g,h,l){var n=this.config.definedNames;if(n&&0<Object.keys(n).length){for(var p=0;p<g.length;p++)g[p]&&n&&n[g[p]]&&(h=h.replace(g[p],n[g[p]]),l&&(l[g[p]]=n[g[p]]));return a(h)}return h};b.resetArray=function(g,h){var l;if(l=this.records[h][g].a){for(var n=0;n<l.length;n++)for(var p=0;p<l[n].length;p++)this.options.data[h+n][g+p]||(this.records[h+n][g+p].v=_$_f4f9[3],this.records[h+
|
|
225
|
+
n][g+p].element&&(this.records[h+n][g+p].element.innerText=_$_f4f9[3]));this.records[h][g].a=null}};b.execute=function(g,h,l,n,p){if(1==this.parent.processing)return null!==h&&null!==l&&this.parent.queue.push([this,h,l]),_$_f4f9[3];if(typeof this.parent.config.onbeforeformula==_$_f4f9[104]){var q=H.call(this.parent,_$_f4f9[270],this,g,h,l);if(!1===q)return g;q&&(g=q)}var v=[],w=function(D,K,N,V){if(void 0!=K&&void 0!=N){var O=G.getColumnNameFromCoords(K,N);K=V.getWorksheetName()+_$_f4f9[39]+O;v[K]||
|
|
226
|
+
(v[K]=0);v[K]++;if(3<v[K])throw{error:_$_f4f9[271],message:_$_f4f9[272],reference:K};}else K=O=null;p||(D=a(D));var U=D,aa=U.match(/[A-Z_]+[A-Z0-9_\.]*/g);aa&&aa.length&&(U=e.call(V.parent,aa,U,x));(aa=U.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&aa.length&&(U=c.call(V,aa,U));aa=[];U=d(U);for(var P=0;P<U.length;P++)U[P]&&k.test(U[P])&&aa.push(U[P]);if(aa){if(K&&-1<aa.indexOf(K.replace(_$_f4f9[39],_$_f4f9[19])))throw{error:_$_f4f9[273],message:_$_f4f9[274]};for(U=0;U<
|
|
227
|
+
aa.length;U++){K=aa[U].split(_$_f4f9[19]);K[1]?(N=K[1],P=J(K[0]),K=V.getWorksheetName()+_$_f4f9[39]+O):(N=K[0],P=V,K=O);if(typeof P==_$_f4f9[21]||typeof P.formula==_$_f4f9[21])throw{error:_$_f4f9[275],message:_$_f4f9[276]};K&&(P.formula[N]||(P.formula[N]=[]),0>P.formula[N].indexOf(K)&&P.formula[N].push(K));if(!x[aa[U]]){N=G.getCoordsFromColumnName(N);K=N[0];N=N[1];var ua=P.records[N]&&void 0!==P.records[N][K].v?P.records[N][K].v:Q.call(P,K,N);x[aa[U]]||(Z(ua)?x[aa[U]]=w(ua,K,N,P):(ua===_$_f4f9[3]||
|
|
228
|
+
null===ua||void 0===ua?ua=null:jSuites.isNumeric(ua)||(ua=_$_f4f9[20]+ua+_$_f4f9[20],y[aa[U]]=_$_f4f9[71]),x[aa[U]]=ua))}}}return D.substr(1)},x={},y={};try{g=w(g,h,l,this);if(g==_$_f4f9[3])return _$_f4f9[3];0==g.indexOf(_$_f4f9[277])&&(p=!0);var B=p?b.run(g,x):u.formula(g,x,h,l,this,y);if(!1!==n&&void 0!=h&&void 0!=l)if(B instanceof Date)this.records[l][h].v=jSuites.calendar.dateToNum(B);else if(Array.isArray(B)){n=[];q=null;for(var z=0;z<B.length;z++)for(var F=0;F<B[z].length;F++){(0<F||0<z)&&this.options.data[l+
|
|
229
|
+
z][h+F]!==_$_f4f9[3]&&(q=_$_f4f9[278]);var r=G.getColumnNameFromCoords(h+F,l+z);n.push(r)}if(!q){r=G.getColumnNameFromCoords(h,l);var A=Object.keys(this.formula);for(z=0;z<A.length;z++){var C=this.formula[A[z]].indexOf(r);if(0<=C)for(F=0;F<n.length;F++)C=this.formula[A[z]].indexOf(n[F]),-1==C&&this.formula[A[z]].push(n[F])}for(z=0;z<B.length;z++)for(F=0;F<B[z].length;F++)this.records[l+z][h+F].v=B[z][F],this.records[l+z][h+F].element&&(this.records[l+z][h+F].element.innerText=B[z][F],jSuites.isNumeric(B[z][F])?
|
|
230
|
+
this.records[l+z][h+F].element.classList.add(_$_f4f9[279]):this.records[l+z][h+F].element.classList.remove(_$_f4f9[279]));this.records[l][h].a=B;q=B[0][0];this.records[l][h].v=q}B=q}else this.records[l][h].v=B;return B}catch(D){return 1==this.parent.config.debugFormulas&&console.log(g,x,D),D&&D.error?D.error:_$_f4f9[275]}};b.update=function(g,h,l,n){var p=null,q=null,v=this.getWorksheetName(),w=function(F){l&&l[F]&&(F=_$_f4f9[231]);h[F]&&(F=h[F]);return F},x=function(F,r){if(-1===r.indexOf(_$_f4f9[280]))return F;
|
|
231
|
+
r=r.split(_$_f4f9[280]);if(3===r.length){r=_$_f4f9[280];var A=_$_f4f9[280]}else r[0]===_$_f4f9[3]?(r=_$_f4f9[280],A=_$_f4f9[3]):(r=_$_f4f9[3],A=_$_f4f9[280]);return r+F.match(/[A-Z]+/g)+A+F.match(/[0-9]+/g)};g=W(g,!0);g=d(g);for(var y=0;y<g.length;y++)if(g[y]&&k.test(g[y])){if(-1==g[y].indexOf(_$_f4f9[19])){if(q=g[y],p=_$_f4f9[3],n&&n!=v)continue}else if(q=g[y].split(_$_f4f9[19]),p=q[0],q=q[1],n&&n!=p)continue;var B=q;if(0<=q.indexOf(_$_f4f9[157])){q=b.getTokensFromRange.call(this,q);for(var z=0;z<
|
|
232
|
+
q.length;z++)q[z]=w(q[z]);q=b.getRangeFromTokens.call(this,q);q!==_$_f4f9[231]&&-1!==B.indexOf(_$_f4f9[280])&&(B=B.split(_$_f4f9[157]),q=q.split(_$_f4f9[157]),q=x(q[0],B[0])+_$_f4f9[157]+x(q[1],B[1]))}else-1!==B.indexOf(_$_f4f9[280])?(q=w(q.replace(/\$/g,_$_f4f9[3])),q=x(q,B)):q=w(q);p&&(q=p+_$_f4f9[19]+q);g[y]=q}return g.join(_$_f4f9[3])};b.getChain=function(g){if(void 0===g)return[];var h=[],l=[],n=[],p=function(w){if(0<=w.indexOf(_$_f4f9[39])){var x=w.split(_$_f4f9[39]),y=x.pop(),B=x.join(_$_f4f9[39]);
|
|
233
|
+
x=J(B)}else x=this,B=x.getWorksheetName(),y=w;if(x.formula[y]&&!n[w]){var z=!1;n[w]=!0;for(w=0;w<x.formula[y].length;w++){var F=x.formula[y][w];-1==F.indexOf(_$_f4f9[39])&&(F=B+_$_f4f9[39]+F);if(!l[F]){var r=x.getValue(F);Z(r)?h.push([F,r,b.getTokens.call(x,r,B)]):(z=!0,x.formula[y][w]=null);p.call(x,F);l[F]=!0}}1==z&&(x.formula[y]=x.formula[y].filter(function(A){return null!=A}))}},q=Object.keys(g);for(g=0;g<q.length;g++)p.call(this,q[g]);q=0;for(g=h.length-1;0<=g;g--){for(var v=0;v<g;v++)if(0<=
|
|
234
|
+
h[v][2].indexOf(h[g][0])){h.splice(v,0,h.splice(g,1)[0]);g=h.length;break}q++;if(1E6<q){console.error(_$_f4f9[281]);break}}l=[];for(g=0;g<h.length;g++)l[h[g][0]]=h[g][1];return l};b.updateAll=function(g,h){var l,n,p,q,v,w={},x=this.getWorksheetName();for(v=0;v<u.spreadsheet.length;v++){var y=u.spreadsheet[v].worksheets;for(p=0;p<y.length;p++){var B=y[p].getWorksheetName();for(n=0;n<y[p].options.data.length;n++)for(l=0;l<y[p].options.data[n].length;l++)if((q=y[p].options.data[n][l])&&Z(q)){var z=b.update.call(y[p],
|
|
235
|
+
q,g,h,x);z!=q&&(w[B]||(w[B]=[]),w[B].push({x:l,y:n,value:z,force:!0}))}}}y=Object.keys(w);for(l=0;l<y.length;l++)if(w[y[l]].length){p=J(y[l]);for(n=0;n<w[y[l]].length;n++)Q.call(p,w[y[l]][n].x,w[y[l]][n].y,w[y[l]][n].value);L.call(p,_$_f4f9[129],{data:w[y[l]]})}w=[];l=Object.keys(this.formula);y=[];n=[];for(p=0;p<l.length;p++)if(z=l[p],q=this.formula[z],h&&h[z])for(v=0;v<q.length;v++)g[q[v]]&&(q[v]=g[q[v]]),n[q[v]]=!0;else{B=[];for(v=0;v<q.length;v++)h&&h[q[v]]||(g[q[v]]&&(q[v]=g[q[v]]),n[q[v]]=!0,
|
|
236
|
+
B.push(q[v]));B.length&&(g[z]&&(z=g[z]),y[z]=B)}this.formula=y;B=this.getWorksheetName();for(var F=0;F<u.spreadsheet.length;F++)for(var r=u.spreadsheet[F].worksheets,A=0;A<r.length;A++)if(r[A].getWorksheetName()!==B)for(l=Object.keys(r[A].formula),p=0;p<l.length;p++){y=[];q=r[A].formula[l[p]];for(v=0;v<q.length;v++)z=q[v].split(_$_f4f9[39]),z[0]==B&&z[1]?h&&h[z[1]]||(g[z[1]]&&(z[1]=g[z[1]]),y.push(z[0]+_$_f4f9[39]+z[1])):y.push(q[v]);r[A].formula[l[p]]=y}y=Object.keys(n);for(l=0;l<y.length;l++)z=
|
|
237
|
+
y[l].split(_$_f4f9[39]),z[1]?(q=z[1],g=J(z[0]),h=z[0]):(q=z[0],g=this,h=x),z=G.getCoordsFromColumnName(q),n=z[0],p=z[1],q=g.options.data[p][n],z=Y.execute.call(g,q,n,p,!1),z!==g.records[p][n].v&&(w[h]||(w[h]=[]),w[h].push({x:n,y:p,value:q,force:!0}));y=Object.keys(w);if(y.length)for(l=0;l<y.length;l++)p=J(y[l]),w[y[l]]=oa.applyValues.call(p,w[y[l]]),oa.setValueChained.call(p,w[y[l]])};b.updateWorksheetName=function(g,h,l){for(var n=d(g),p=0;p<n.length;p++)g=n[p].split(_$_f4f9[19]),g[1]&&(g[0]=g[0].replace(new RegExp(_$_f4f9[155],
|
|
238
|
+
_$_f4f9[14]),_$_f4f9[3]),g[0].toUpperCase()==h.toUpperCase()&&(g[0]=l,0<=g[0].indexOf(_$_f4f9[154])&&(g[0]=_$_f4f9[155]+g[0]+_$_f4f9[155]),n[p]=g.join(_$_f4f9[19])));return n.join(_$_f4f9[3])};b.updateWorksheetNames=function(g,h){var l,n;for(n=0;n<u.spreadsheet.length;n++){var p=u.spreadsheet[n].worksheets;for(var q=0;q<p.length;q++){var v=[];for(var w=0;w<p[q].options.data.length;w++)for(var x=0;x<p[q].options.data[w].length;x++)if((l=p[q].options.data[w][x])&&Z(l)){var y=b.updateWorksheetName(l,
|
|
239
|
+
g,h);y!=l&&(v.push({x,y:w,value:y,force:!0}),Q.call(p[q],x,w,y))}v.length&&L.call(p[q],_$_f4f9[129],{data:v})}}};var f=function(g,h,l){var n=_$_f4f9[3],p=_$_f4f9[3],q=g.split(_$_f4f9[280]);if(3===q.length)return g;2===q.length&&(q[0]?(l=0,p=_$_f4f9[280]):(h=0,n=_$_f4f9[280]),g=q.join(_$_f4f9[3]));g=G.getCoordsFromColumnName(g);h=g[0]+h;g=g[1]+l;return g=0>h||0>g?_$_f4f9[231]:n+G.getColumnName(h)+p+(g+1)};b.shiftFormula=function(g,h,l){g=d(g,!0);for(var n,p,q=0;q<g.length;q++)k.test(g[q])&&(p=-1==
|
|
240
|
+
g[q].indexOf(_$_f4f9[19])?[_$_f4f9[3],g[q]]:g[q].split(_$_f4f9[19]),-1==p[1].indexOf(_$_f4f9[157])?p[1]=f(p[1],h,l):(n=p[1].split(_$_f4f9[157]),p[1]=f(n[0],h,l)+_$_f4f9[157]+f(n[1],h,l)),g[q]=p[0]?p.join(_$_f4f9[19]):p[1]);return g.join(_$_f4f9[3])};b.getTokensFromRange=function(g){var h=this,l=_$_f4f9[3],n=_$_f4f9[3];0<=g.indexOf(_$_f4f9[19])?n=_$_f4f9[19]:0<=g.indexOf(_$_f4f9[39])&&(n=_$_f4f9[39]);g=g.replace(/\$/g,_$_f4f9[3]);n&&(l=g.split(n),g=l.pop(),l=l.join(_$_f4f9[39]),h=J(l),l+=n);if(-1==
|
|
241
|
+
g.indexOf(_$_f4f9[157]))return[l+g];n=[];g=g.split(_$_f4f9[157]);var p=G.getCoordsFromColumnName(g[0]),q=G.getCoordsFromColumnName(g[1]);if(p[0]<=q[0]){g=p[0];var v=q[0]}else g=q[0],v=p[0];if(null===p[1]&&null==q[1]){var w=0;p=0;h.options&&h.options.data&&(p=h.options.data.length-1)}else p[1]<=q[1]?(w=p[1],p=q[1]):(w=q[1],p=p[1]);for(h=w;h<=p;h++)for(w=g;w<=v;w++)n.push(l+G.getColumnNameFromCoords(w,h));return n};b.getRangeFromTokens=function(g){g=g.filter(function(n){return n!=_$_f4f9[231]});for(var h=
|
|
242
|
+
_$_f4f9[3],l=0;l<g.length;l++)0<=g[l].indexOf(_$_f4f9[19])?(h=g[l].split(_$_f4f9[19]),g[l]=h.pop(),h=h[0]+_$_f4f9[19]):0<=g[l].indexOf(_$_f4f9[39])&&(h=g[l].split(_$_f4f9[39]),g[l]=h.pop(),h=h.join(_$_f4f9[39])+_$_f4f9[39]);g.sort(function(n,p){n=G.getCoordsFromColumnName(n);p=G.getCoordsFromColumnName(p);return n[1]>p[1]?1:n[1]<p[1]?-1:n[0]>p[0]?1:n[0]<p[0]?-1:0});return g.length?h+(g[0]+_$_f4f9[157]+g[g.length-1]):_$_f4f9[231]};b.getTokens=function(g,h){var l=a(g);g.replace(/!/g,_$_f4f9[39]);(g=
|
|
243
|
+
l.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&g.length&&(l=e.call(this.parent,g,l));(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&g.length&&(l=c.call(this,g,l));if(g=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(l=0;l<g.length;l++)-1==g[l].indexOf(_$_f4f9[39])&&h&&(g[l]=h+_$_f4f9[39]+g[l]);return g};b.tracking=function(g,h){for(var l=this.tracking,n=[],p=0;p<l.length;p++)h&&h[l[p]]||(g[l[p]]?n.push(g[l[p]]):n.push(l[p]));for(p=0;p<n.length;p++)(g=this.getValue(n[p]))&&
|
|
244
|
+
Z(g)?this.setValue(n[p],g):n.splice(p,1);this.tracking=n};b.tokenIdentifier=k;b.tokenize=d;return b}(),oa=function(){var k=function(d){d.name=qa;d.value=Q;d.getValue=k[_$_f4f9[58]];d.getValueFromCoords=k.getFromCoords;d.setValue=k[_$_f4f9[11]];d.setValueFromCoords=k.setFromCoords;d.setCheckRadioValue=k.setCheckRadio;d.getProcessed=k.processed};k[_$_f4f9[58]]=function(d,b){var a=this;if(typeof d==_$_f4f9[103]){var c=d.x;d=d.y}else 0<=d.indexOf(_$_f4f9[39])&&(a=d.split(_$_f4f9[39]),d=a.pop(),a=J(a.join(_$_f4f9[39]))),
|
|
245
|
+
d=G.getCoordsFromColumnName(d),c=d[0],d=d[1];return k.getFromCoords.call(a,c,d,b)};k.getFromCoords=function(d,b,a){var c=null;null!=d&&null!=b&&(c=a?k.processed.call(this,d,b):Q.call(this,d,b));return c};k[_$_f4f9[11]]=function(d,b,a){if(!R.call(this.parent,this))return!1;var c=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,q){var v=null;typeof p==_$_f4f9[25]?(f=G.getCoordsFromColumnName(p),c=f[0],e=f[1]):p.tagName?(c=p.getAttribute(_$_f4f9[56]),e=p.getAttribute(_$_f4f9[57])):p.element&&p.element.tagName?
|
|
246
|
+
(c=p.element.getAttribute(_$_f4f9[56]),e=p.element.getAttribute(_$_f4f9[57])):(c=p.x,e=p.y,void 0!==p.value&&(q=p.value),void 0!==p.style&&(v=p.style));p={x:c,y:e,value:q,force:a};null!==v&&(p.style=v);g.push(p)};if(d&&Array.isArray(d))for(var l=0;l<d.length;l++)h(d[l],b);else if(typeof d==_$_f4f9[103]&&void 0==d.x&&void 0==d.tagName)for(b=Object.keys(d),l=0;l<b.length;l++)h(b[l],d[b[l]]);else h(d,b);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,
|
|
247
|
+
g);this.refreshBorders();var n=this;setTimeout(function(){ba.refresh.call(n)},250);if(g.length){T.call(this.parent,{worksheet:n,action:_$_f4f9[95],records:g,selection:this.selectedCell});d=this.getPrimaryKey();if(!1!==d)for(l=0;l<g.length;l++)g[l].x===d&&g[l].value&&X.call(this,g[l]);L.call(this,_$_f4f9[95],{data:g});fa.update.call(this,!0);H.call(this.parent,_$_f4f9[282],this,g)}}};k.setFromCoords=function(d,b,a,c){var e=[];e.push({x:d,y:b,value:a});k[_$_f4f9[11]].call(this,e,null,c)};k.setCheckRadio=
|
|
248
|
+
function(){for(var d=[],b=this.getSelected(),a=0;a<b.length;a++){var c=b[a].x,e=b[a].y;if(!this.options.columns[c].readOnly&&this.options.columns[c].type==_$_f4f9[283]){var f=Q.call(this,c,e)?!1:!0;d.push({x:c,y:e,value:f})}}d.length&&k[_$_f4f9[11]].call(this,d)};k.applyValues=function(d){for(var b,a,c=this.options.style||{},e=[],f={},g=0;g<d.length;g++)if(b=d[g],a=this.updateCell(b.x,b.y,b.value,b.force),void 0!==a.value){if(void 0!==b.style){var h=G.getColumnNameFromCoords(b.x,b.y);a.style=f[h]=
|
|
249
|
+
b.style;a.oldStyle=c&&c[h]?c[h]:_$_f4f9[219]}e.push(a)}0<Object.keys(f).length&&Ma.update.call(this,f);return e};k.processed=function(d,b,a){var c=Q.call(this,d,b);if(null===c)return null;var e=na[_$_f4f9[58]].call(this,d,b),f=e[1];f.type!=_$_f4f9[112]&&f.type!=_$_f4f9[284]&&f.type!=_$_f4f9[285]&&f.type!=_$_f4f9[286]&&f.type!=_$_f4f9[287]&&0!=f.process&&(!0===a||f.type!=_$_f4f9[288]&&f.type!=_$_f4f9[289]&&f.type!=_$_f4f9[290])&&(f.type==_$_f4f9[283]?c=e[0][_$_f4f9[58]](f,c,a):this.records[b][d].element?
|
|
250
|
+
c=1==this.parent.config.stripHTML?this.records[b][d].element.innerText:this.records[b][d].element.innerHTML:((_$_f4f9[3]+c).substr(0,1)==_$_f4f9[18]&&(c=this.executeFormula(c,d,b,!1)),e[0]&&typeof e[0][_$_f4f9[58]]==_$_f4f9[104]&&(c=e[0][_$_f4f9[58]](f,c,a))));return c};k.setValueChained=function(d){for(var b,a=[],c,e=0;e<d.length;e++)b=d[e],c=G.getColumnNameFromCoords(b.x,b.y),a[c]=b.value;a=Y.getChain.call(this,a);var f=[],g=Object.keys(a);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$_f4f9[39])?(b=
|
|
251
|
+
g[e].split(_$_f4f9[39]),c=b.pop(),b=J(b.join(_$_f4f9[39]))):(c=g[e],b=this),c=G.getCoordsFromColumnName(c),d=S.update.call(b,c[0],c[1],a[g[e]],!0),d.w=b,d.value=d.v=b.records[c[1]][c[0]].v,d.cell=g[e],d.f=a[g[e]],f.push(d);f.length&&H.call(this.parent,_$_f4f9[291],this,f)};return k}(),S=function(){var k=function(d){d.getCell=k[_$_f4f9[58]];d.getCellFromCoords=k[_$_f4f9[58]];d.updateCell=k.update;d.updateCells=k.updateAll;d.getSelected=k.selected;d.isAttached=k.attached};k.attached=function(d,b){return this.records[b]&&
|
|
252
|
+
this.records[b][d]&&this.records[b][d].element&&this.records[b][d].element.parentNode&&this.records[b][d].element.parentNode.parentNode?!0:!1};k[_$_f4f9[58]]=function(d,b){typeof d==_$_f4f9[25]&&(b=G.getCoordsFromColumnName(d),d=b[0],b=b[1]);d=parseInt(d);b=parseInt(b);if(this.records[b]&&this.records[b][d]&&this.records[b][d].element)return this.records[b][d].element;var a=Q.call(this,d,b);null===a&&(a=_$_f4f9[3]);return S.create.call(this,d,b,a)};k.getFromCoords=function(d,b,a){if(!d||null===d[0])return null;
|
|
253
|
+
var c=[],e=d[0],f=d[1],g=d[2];d=d[3];for(a&&(a=this.results?G.invert(this.results):null);f<=d;f++)for(var h=e;h<=g;h++)if(!a||a[f])b?c.push(G.getColumnNameFromCoords(h,f)):c.push(this.records[f][h]);return c};k.selected=function(d,b){return k.getFromCoords.call(this,this.getHighlighted(),d,b)};k.getSelectedColumns=function(){var d=[],b=this.getHighlighted();if(b)for(var a=b[0];a<=b[2];a++)d.push(a);return d};k.updateAll=function(d){for(var b=this.getPrimaryKey(),a=[],c=0;c<d.length;c++)void 0!==d[c].id?
|
|
254
|
+
(X.call(this,d[c]),a.push({id:d[c].id,y:d[c].y}),!1!==b&&k.update.call(this,b,d[c].y,d[c].id,!0)):a.push(k.update.call(this,d[c].x,d[c].y,d[c].value,d[c].force));L.call(this,_$_f4f9[128],[a])};k.update=function(d,b,a,c){var e=this.records[b];if(e=e&&e[d]?e[d]:null){e=e.element;var f={x:d,y:b};if(c||!e||1!=e.classList.contains(_$_f4f9[26])){if(c=H.call(this.parent,_$_f4f9[292],this,e,d,b,a))a=c;else if(!1===c)return f;c=na[_$_f4f9[58]].call(this,d,b);if(typeof c[0].updateCell==_$_f4f9[104]){var g=
|
|
255
|
+
c[0].updateCell(e,a,d,b,this,c[1]);void 0!==g&&(a=g)}g=Q.call(this,d,b);if(g!==a){var h=Q.call(this,d,b,a);f.oldValue=g;f.value=h;e&&k.applyOverflow.call(this,e,d,b);c[1]&&typeof c[1].render==_$_f4f9[104]&&c[1].render(e,a,d,b,this,c[1]);H.call(this.parent,_$_f4f9[293],this,e,d,b,f.value,f.oldValue)}}}else return!1;return f};k.create=function(d,b,a){var c=document.createElement(_$_f4f9[173]);c.setAttribute(_$_f4f9[56],d);c.setAttribute(_$_f4f9[57],b);var e=na[_$_f4f9[58]].call(this,d,b);if(e[0]&&typeof e[0].createCell==
|
|
256
|
+
_$_f4f9[104]){var f=e[0].createCell(c,a,d,b,this,e[1]);void 0!==f&&(a=f)}Q.call(this,d,b,a);this.records[b][d]||ta.cell.call(this,d,b,a);this.records[b][d].element=c;!a&&this.records[b][d].v&&(c.innerText=this.records[b][d].v);e[1]&&typeof e[1].render==_$_f4f9[104]&&e[1].render(c,a,d,b,this,e[1]);k.applyProperties.call(this,c,d,b);k.applyOverflow.call(this,c,d,b);H.call(this.parent,_$_f4f9[294],this,c,d,b,a);return c};k.getAttributes=function(d,b,a){a[d]||(a[d]={});d==_$_f4f9[295]?a[d][b]=this.getValue(b):
|
|
257
|
+
d==_$_f4f9[296]?this.merged.cells&&(b=this.merged.cells[b])&&(a[d][b]=this.options.mergeCells[b]):this.options[d]&&this.options[d][b]&&(a[d][b]=this.options[d][b])};k.setAttributes=function(d){d&&d.style&&this.setStyle(d.style);d&&d.comments&&this.setComments(d.comments);d&&d.meta&&this.setMeta(d.meta);d&&d.cells&&this.setProperty(d.cells);d&&d.mergeCells&&this.setMerge(d.mergeCells);d&&d.values&&k.batch.call(this,d.values);d&&d.formulas&&k.batch.call(this,d.formulas,!0)};k.applyProperties=function(d,
|
|
258
|
+
b,a){var c=G.getColumnNameFromCoords(b,a),e=this.options.columns,f=this.options.style,g=this.options.comments,h=this.options.cells,l=this.options.rows,n=null,p=!1;e[b]&&(e[b].readonly||e[b].readOnly)&&(p=!0);l&&l[a]&&(l[a].readonly||l[a].readOnly)&&(p=!0);if(f&&f[c]){var q=(q=d.getAttribute(_$_f4f9[120]))?q+(_$_f4f9[244]+f[c]):f[c];d.setAttribute(_$_f4f9[120],q)}g&&g[c]&&(typeof g[c]===_$_f4f9[25]?d.setAttribute(_$_f4f9[297],g[c]):d.classList.add(_$_f4f9[298]));if(h&&h[c])if(!1===h[c].locked&&!0===
|
|
259
|
+
this.options.selectUnLockedCells?d.classList.add(_$_f4f9[299]):d.classList.remove(_$_f4f9[299]),h[c].zebra?d.classList.add(_$_f4f9[300]):d.classList.remove(_$_f4f9[300]),typeof h[c].wrap!==_$_f4f9[21]&&((n=h[c].wrap)?d.classList.add(_$_f4f9[301]):d.classList.remove(_$_f4f9[301])),!0===h[c].readonly||!0===h[c].readOnly)p=!0;else if(!1===h[c].readonly||!1===h[c].readOnly)p=!1;null===n&&(e[b]&&e[b].wrap?d.classList.add(_$_f4f9[301]):d.classList.remove(_$_f4f9[301]));d.style.textAlign||(f=null,h&&h[c]&&
|
|
260
|
+
h[c].align?f=h[c].align:e&&e[b].align&&(f=e[b].align),f&&(d.style.textAlign=f));p?d.classList.add(_$_f4f9[26]):d.classList.remove(_$_f4f9[26]);this.records[a][b].readonly=p};k.applyOverflow=function(d,b,a){1==this.options.textOverflow&&0<b&&(b==this.options.columns.length-1&&(d.style.overflow=_$_f4f9[112]),this.records[a][b-1]&&this.records[a][b-1].element&&(this.records[a][b-1].element.style.overflow=this.options.data[a][b]==_$_f4f9[3]&&this.headers[b-1]&&this.headers[b-1].offsetWidth?_$_f4f9[3]:
|
|
261
|
+
_$_f4f9[112]))};k.batch=function(d,b){var a=[],c=Object.keys(d);if(c.length)for(var e=0;e<c.length;e++){if(0<=c[e].indexOf(_$_f4f9[39])){var f=c[e].split(_$_f4f9[39]);var g=J(f[0]);var h=f[1];f=f[0]}else g=this,h=c[e],f=this.getWorksheetName();h=G.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],d[c[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==b&&(c=Object.keys(a),c.length))for(e=0;e<c.length;e++)g=J(c[e]),L.call(g,_$_f4f9[129],a[c[e]])};return k}(),La=function(){var k=function(b){b.getColumnOptions=
|
|
262
|
+
k[_$_f4f9[58]];b.setColumnOptions=k[_$_f4f9[11]];b.getCells=k.getCells;b.setCells=k.setCells;b.getProperties=k[_$_f4f9[58]];b.setProperties=k[_$_f4f9[11]];b.getProperty=k[_$_f4f9[58]];b.setProperty=k[_$_f4f9[11]];b.resetProperty=k[_$_f4f9[11]];b.updateProperty=k.update;b.getOptions=k[_$_f4f9[58]]};k.getCells=function(b){return b?this.options.cells[b]:this.options.cells};k.setCells=function(b,a){if(!R.call(this.parent,this))return!1;if(typeof b==_$_f4f9[25])this.options.cells[b]=a;else{a=Object.keys(b);
|
|
263
|
+
for(var c=0;c<a.length;c++)this.options.cells[a[c]]=b[a[c]]}};k[_$_f4f9[58]]=function(b,a){var c=null;void 0!==a&&(a=G.getColumnNameFromCoords(b,a),this.options.cells.hasOwnProperty(a)&&(c=this.options.cells[a]));c||(c=this.options.columns[b]);if(!c)c={type:_$_f4f9[71]};else if(!c.type||typeof c.type==_$_f4f9[25]&&!u.editors[c.type])c.type=_$_f4f9[71];return c};var d=function(b,a,c,e,f){var g=this.records[a][b].element;g&&(e&&typeof e.destroyCell==_$_f4f9[104]&&e.destroyCell(g,b,a,this),c&&typeof c.createCell==
|
|
264
|
+
_$_f4f9[104]&&(e=Q.call(this,b,a),e=c.createCell(g,e,b,a,this,f),void 0!==e&&Q.call(this,b,a,e),S.applyProperties.call(this,g,b,a)))};k[_$_f4f9[11]]=function(b,a,c){if(!R.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var e=[];if(Array.isArray(b))e=b;else if(jSuites.isNumeric(b)&&jSuites.isNumeric(a))b={x:b,y:a},typeof c==_$_f4f9[103]&&(b.value=c),e.push(b);else if(typeof a===_$_f4f9[103])b={x:b,value:a},e.push(b);else if(typeof b==_$_f4f9[103]&&void 0===a)for(a=Object.keys(b),
|
|
265
|
+
c=0;c<a.length;c++){var f=G.getCoordsFromColumnName(a[c]);e.push({x:f[0],y:f[1],value:b[a[c]]})}if(Array.isArray(e))for(c=0;c<e.length;c++){var g=e[c];b=g.x;var h=g.y,l=k[_$_f4f9[58]].call(this,b,h);a=g.value;f=u.editors[l.type];var n=null;a&&a.type&&(n=u.editors[a.type]);if(typeof h===_$_f4f9[21])for(g.oldValue=l,parseInt(a.width)||(a.width=this.options.defaultColWidth||100),a.type&&u.editors[a.type]||(a.type=_$_f4f9[71]),this.options.columns[b]=a,Ea.applyProperties.call(this,b),g=0;g<this.records.length;g++)d.call(this,
|
|
266
|
+
b,g,n,f,a);else l=G.getColumnNameFromCoords(b,h),g.oldValue=this.options.cells&&this.options.cells[l]?this.options.cells[l]:_$_f4f9[3],a?(this.options.cells||(this.options.cells={}),this.options.cells[l]=a):(delete this.options.cells[l],a=k[_$_f4f9[58]].call(this,b,h),n=u.editors[a.type]),d.call(this,b,h,n,f,a)}else return console.error(_$_f4f9[281]),!1;this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_f4f9[96],records:e});L.call(this,_$_f4f9[96],{data:e});H.call(this.parent,_$_f4f9[302],
|
|
267
|
+
this,e);return!0};k.update=function(b,a,c,e){a=typeof b==_$_f4f9[25]||typeof b==_$_f4f9[22]?[{x:b,y:a,value:c}]:b;c=JSON.parse(JSON.stringify(a));if(Array.isArray(a))for(var f=0;f<a.length;f++){var g=a[f].x,h=a[f].y,l=a[f],n=e,p=G.getColumnNameFromCoords(g,h);(b=this.options.cells[p])?l.oldValue=Object.assign({},b):(l.oldValue=null,b=this.options.cells[p]=Object.assign({},this.options.columns[g]));p=Object.keys(l.value);for(var q=0;q<p.length;q++)b[p[q]]=l.value[p[q]];n||typeof h===_$_f4f9[21]||(n=
|
|
268
|
+
k[_$_f4f9[58]].call(this,g,h),n=u.editors[n.type],l.value.type?(l=l.value,p=null,l&&l.type&&(p=u.editors[l.type]),d.call(this,g,h,p,n,b)):(l=this.records[h][g].element)&&typeof n.updateCell==_$_f4f9[104]&&(p=Q.call(this,g,h),p=n.updateCell(l,p,g,h,this,b),void 0!==p&&Q.call(this,g,h,p),S.applyProperties.call(this,l,g,h)))}T.call(this.parent,{worksheet:this,action:_$_f4f9[97],records:a});L.call(this,_$_f4f9[97],{data:c});H.call(this.parent,_$_f4f9[302],this,a)};return k}(),da=function(){var k=function(b,
|
|
269
|
+
a){Array.isArray(a)||(a=[a]);for(var c,e=b?_$_f4f9[3]:_$_f4f9[52],f=Object.keys(a),g=0;g<f.length;g++)if(c=this.rows[a[f[g]]])c.element&&(c.element.style.display=e),c.visible=b;I.call(this,!0);this.resetBorders()},d=function(b){b.getRow=d[_$_f4f9[58]];b.moveRow=d.move;b.insertRow=d.add;b.deleteRow=d.del;b.getSelectedRows=d.selected;b.showRow=k.bind(b,!0);b.hideRow=k.bind(b,!1)};d.height=function(b){var a=0,c=this.rows,e=this.options.rows||{};c[b]&&!1!==c[b].visible&&(a=c[b].height?c[b].height:e[b]&&
|
|
270
|
+
e[b].height?parseInt(e[b].height):c[b].element&&c[b].element.offsetHeight?c[b].element.offsetHeight:this.options.defaultRowHeight||u.defaultRowHeight||24);return a};d[_$_f4f9[58]]=function(b){return this.rows[b]};d.attached=function(b){return this.rows[b]&&this.rows[b].element&&this.rows[b].element.parentNode?!0:!1};d.selected=function(b){var a=[],c=this.getHighlighted();if(c)for(var e=c[1];e<=c[3];e++)this.rows[e]&&(b?a.push(e):a.push(this.rows[e].element));return a};d.create=function(b,a){if(this.rows[b]&&
|
|
271
|
+
this.rows[b].element)return this.rows[b].element;this.rows[b]||ta.row.call(this,b);var c=document.createElement(_$_f4f9[171]);c.setAttribute(_$_f4f9[57],b);this.rows[b].element=c;var e=null,f=this.options.rows;f[b]&&!a&&(f[b].style&&c.setAttribute(_$_f4f9[120],f[b].style),f[b].height&&(c.style.height=parseInt(f[b].height)+_$_f4f9[59]),f[b].title&&(e=f[b].title),0==f[b].visible&&(this.rows[b].visible=!1),f[b].id&&(this.rows[b].id=f[b].id));0==this.rows[b].visible&&(c.style.display=_$_f4f9[52]);e||
|
|
272
|
+
(e=parseInt(b+1));a=document.createElement(_$_f4f9[173]);a.innerHTML=e;a.setAttribute(_$_f4f9[57],b);a.className=_$_f4f9[303];c.appendChild(a);H.call(this.parent,_$_f4f9[304],this,b,c);return c};d.move=function(b,a){if(!R.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.rows[a]||!this.rows[b])return console.error(_$_f4f9[305]),!1;if(0<Object.keys(this.getMerge()).length){var c=null;this.merged.rows[b]?c=!0:this.merged.rows[a]&&(b>a?this.merged.rows[a-1]&&(c=!0):this.merged.rows[a+
|
|
273
|
+
1]&&(c=!0));c&&this.destroyMerged()}this.resetBorders();da.attached.call(this,a)?(c=da.create.call(this,b),b>a?this.tbody.insertBefore(c,this.rows[a].element):this.tbody.insertBefore(c,this.rows[a].element.nextSibling)):da.attached.call(this,b)&&this.tbody.removeChild(this.rows[b].element);this.rows.splice(a,0,this.rows.splice(b,1)[0]);this.records.splice(a,0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);L.call(this,_$_f4f9[82],{f:b,t:a});T.call(this.parent,
|
|
274
|
+
{worksheet:this,action:_$_f4f9[82],oldValue:b,newValue:a});fa.references.call(this);I.call(this,!0,!0);fa.update.call(this);H.call(this.parent,_$_f4f9[306],this,b,a)};d.add=function(b,a,c,e,f){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_f4f9[307]),!1;var g=[];if(0<b)var h=parseInt(b);else h=1,Array.isArray(b)&&!e&&(Array.isArray(b[0])?e=b:(e=[],e.push(b)));e=Ia.standardize(e);c=c?!0:!1;b=this.options.data?this.options.data.length-1:0;if(void 0==a||
|
|
275
|
+
a>b||0>a)a=b,c=!1;h||(h=1);if(!1===H.call(this.parent,_$_f4f9[308],this,a,h,c))return console.log(_$_f4f9[309]),!1;ba.reset.call(this);b=c?a:a+1;for(var l,n,p=0,q=[],v=[],w=this.rows.splice(b),x=this.options.data?this.options.data.splice(b):[],y=this.records.splice(b),B=b;B<h+b;B++){var z=e[p]&&e[p].id?e[p].id:ya.next.call(this);ta.row.call(this,B,z);n=this.dataType?{}:[];for(var F=0;F<this.options.columns.length;F++)l=qa.call(this,F),n[l]=_$_f4f9[3],e&&e[p]&&e[p].data&&(typeof e[p].data[l]!==_$_f4f9[21]?
|
|
276
|
+
n[l]=e[p].data[l]:typeof e[p].data[F]!==_$_f4f9[21]&&(n[l]=e[p].data[F])),g.push({x:F,y:B,value:n[l],force:!0});v.push({id:z,data:n});p++}this.rows=this.rows.concat(w);this.records=this.records.concat(y);Array.prototype.push.apply(this.options.data,x);for(B=b;B<h+b;B++)this.results&&(this.rows[B].results=!0),q.push(this.records[B]);this.merged.rows[b]&&sa.updateConfig.call(this,1,1,b-1,h);L.call(this,_$_f4f9[78],{numOfRows:h,rowNumber:a,insertBefore:c?1:0,data:v});this.results&&(this.results=Aa.refresh.call(this));
|
|
277
|
+
T.call(this.parent,{worksheet:this,action:_$_f4f9[78],rowNumber:a,numOfRows:h,insertBefore:c,data:v});fa.references.call(this);f||ka[_$_f4f9[11]].call(this,0,b,this.options.columns.length-1,h+b-1);I.call(this,!0,!0);g.length&&oa.applyValues.call(this,g);fa.update.call(this);H.call(this.parent,_$_f4f9[310],this,a,h,q,c)};d.del=function(b,a){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_f4f9[311]),!1;var c={},e=[];void 0==b&&(a=this.getSelectedRows(),
|
|
278
|
+
a[0]?(b=parseInt(a[0].getAttribute(_$_f4f9[57])),a=a.length):(b=this.options.data.length-1,a=1));var f=this.options.data.length-1;if(void 0==b||b>f||0>b)b=f;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===H.call(this.parent,_$_f4f9[312],this,b,a))return console.log(_$_f4f9[313]),!1;if(-1<parseInt(b)&&0<parseInt(a)){ba.reset.call(this);for(var g=b;g<b+a;g++)for(var h=0;h<this.options.columns.length;h++)f=
|
|
279
|
+
G.getColumnNameFromCoords(h,g),S.getAttributes.call(this,_$_f4f9[314],f,c),S.getAttributes.call(this,_$_f4f9[120],f,c),S.getAttributes.call(this,_$_f4f9[315],f,c),S.getAttributes.call(this,_$_f4f9[316],f,c),S.getAttributes.call(this,_$_f4f9[296],f,c),S.getAttributes.call(this,_$_f4f9[295],f,c),e[f]=!0;if(f=Y.getChain.call(this,c.values))c.formulas=f;for(g=b;g<b+a;g++)da.attached.call(this,g)&&this.rows[g].element.remove(),this.options.rows&&this.options.rows[g]&&(this.options.rows[g]=null);f=[];for(g=
|
|
280
|
+
b;g<b+a;g++)f.push({id:this.getRowId(g),row:g,data:this.getRowData(g)});this.rows.splice(b,a);g=this.records.splice(b,a);this.options.data.splice(b,a);sa.updateConfig.call(this,1,0,b,a);this.results&&(this.results=Aa.refresh.call(this));L.call(this,_$_f4f9[79],{rowNumber:b,numOfRows:a,data:f});T.call(this.parent,{worksheet:this,action:_$_f4f9[79],rowNumber:b,numOfRows:a,insertBefore:1,data:f,attributes:c});fa.references.call(this,e);I.call(this,!0,!0);fa.update.call(this,!0);H.call(this.parent,_$_f4f9[317],
|
|
281
|
+
this,b,a,g,f,c)}};return d}(),ia=function(){var k=function(b,a){Array.isArray(a)||(a=[a]);for(var c,e,f=Object.keys(a),g=0;g<f.length;g++)if(c=a[f[g]],e=this.options.columns[c])this.colgroup[c]&&(this.colgroup[c].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$_f4f9[59]:_$_f4f9[61]),e.visible=b;I.call(this,!0);this.resetBorders()},d=function(b){b.getColumn=d[_$_f4f9[58]];b.getColumnIdByName=d.getByName;b.getPrimaryKey=d.getPrimaryKey;b.getSelectedColumns=d.selected;b.moveColumn=d.move;
|
|
282
|
+
b.insertColumn=d.add;b.deleteColumn=d.del;b.showColumn=k.bind(b,!0);b.hideColumn=k.bind(b,!1)};d[_$_f4f9[58]]=function(b){return this.options.columns[b]||!1};d.attached=function(b){return this.headers[b]&&this.headers[b].parentNode?!0:!1};d.getByName=function(b){for(var a=this.options.columns,c=0;c<a.length;c++)if(a[c].name==b)return c;return!1};d.getPrimaryKey=function(){for(var b=0;b<this.options.columns.length;b++)if(1==this.options.columns[b].primaryKey)return b;return!1};d.selected=function(){var b=
|
|
283
|
+
[],a=this.getHighlighted();if(a)for(var c=a[0];c<=a[2];c++)b.push(c);return b};d.move=function(b,a){if(!R.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.options.columns[b])return console.error(_$_f4f9[318]),!1;if(!this.options.columns[a])return console.error(_$_f4f9[319]),!1;if(0<Object.keys(this.getMerge()).length){var c=null;this.merged.cols[b]?c=!0:this.merged.cols[a]&&(b>a?this.merged.cols[a-1]&&(c=!0):this.merged.cols[a+1]&&(c=!0));c&&this.destroyMerged()}ba.reset.call(this);
|
|
284
|
+
this.options.freezeColumns&&ca.applyReset.call(this);if(ia.attached.call(this,a)){Ea.create.call(this,b);var e=(b>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[b],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++)c=this.tbody.children[f].getAttribute(_$_f4f9[57]),e=(b>a?this.records[c][a].element:this.records[c][a].element.nextSibling)||
|
|
285
|
+
null,this.tbody.children[f].insertBefore(S[_$_f4f9[58]].call(this,b,c),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)||null,this.tfoot.children[f].insertBefore(ha.create.call(this,b,f),e)}else if(ia.attached.call(this,b)){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(f=0;f<this.tbody.children.length;f++)c=parseInt(this.tbody.children[f].getAttribute(_$_f4f9[57])),
|
|
286
|
+
this.tbody.children[f].removeChild(this.records[c][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,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,
|
|
287
|
+
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,1)[0]);L.call(this,_$_f4f9[83],{f:b,t:a});T.call(this.parent,{worksheet:this,action:_$_f4f9[83],oldValue:b,newValue:a});fa.references.call(this);I.call(this,!0,!0);fa.update.call(this);H.call(this.parent,_$_f4f9[320],this,b,a)};d.add=function(b,a,c,e,f,g,h){if(!R.call(this.parent,
|
|
288
|
+
this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_f4f9[321]),!1;var l=[];if(0<b)var n=parseInt(b);else if(n=1,Array.isArray(b)&&!f)if(Array.isArray(b[0]))f=b;else{f=[];for(var p=0;p<b.length;p++)f[p]=[b[p]]}f||(f=[]);c=c?!0:!1;b=this.options.columns.length-1;if(void 0==a||a>b||0>a)a=b,c=!1;n||(n=1);if(!1===H.call(this.parent,_$_f4f9[322],this,a,n,c))return console.log(_$_f4f9[323]),!1;ba.reset.call(this);this.options.freezeColumns&&ca.applyReset.call(this);if(1==this.dataType)var q=
|
|
289
|
+
parseInt((_$_f4f9[3]+Date.now()).substr(-8));e||(e=[]);for(p=0;p<n;p++)e[p]||(e[p]={}),e[p].type||(e[p].type=_$_f4f9[71]),e[p].width||(e[p].width=this.options.defaultColWidth),e[p].type!=_$_f4f9[73]&&e[p].type!=_$_f4f9[324]||e[p].source||(e[p].source=[]),1==this.dataType&&typeof e[p].name==_$_f4f9[21]&&(e[p].name=_$_f4f9[325]+(q+p));q=c?a:a+1;this.options.columns=G.injectArray(this.options.columns,q,e);p=this.headers.splice(q);var v=this.colgroup.splice(q);for(b=q;b<n+q;b++)Ea.create.call(this,b);
|
|
290
|
+
this.headers=this.headers.concat(p);this.colgroup=this.colgroup.concat(v);ha.adjust.call(this,q,n,1);za.adjust.call(this,a,n,1,g);v=null;for(var w,x=0;x<this.options.data.length;x++){this.dataType||(v=this.options.data[x].splice(q));w=this.records[x].splice(q);g=0;for(b=q;b<n+q;b++)p=f[x]&&f[x][g]?f[x][g]:_$_f4f9[3],Q.call(this,b,x,p),l.push({x:b,y:x,value:p}),ta.cell.call(this,b,x),g++;this.dataType||(this.options.data[x]=this.options.data[x].concat(v));this.records[x]=this.records[x].concat(w)}this.merged.cols[q]&&
|
|
291
|
+
sa.updateConfig.call(this,0,1,q-1,n);L.call(this,_$_f4f9[80],{numOfColumns:n,columnNumber:a,insertBefore:c?1:0,properties:e,data:f});T.call(this.parent,{worksheet:this,action:_$_f4f9[80],columnNumber:a,numOfColumns:n,insertBefore:c,properties:e,data:f});fa.references.call(this);h||ka[_$_f4f9[11]].call(this,q,0,n+q-1,this.rows.length-1);I.call(this,!0,!0);l.length&&oa.applyValues.call(this,l);fa.update.call(this);H.call(this.parent,_$_f4f9[326],this,a,n,[],c)};d.del=function(b,a){if(!R.call(this.parent,
|
|
292
|
+
this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_f4f9[327]),!1;var c={},e=[];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 f=this.options.columns.length-1;if(void 0==b||b>f||0>b)b=f;a||(a=1);b+a>=this.options.columns.length&&(a=this.options.columns.length-b,a>=this.options.columns.length&&(a--,console.error(_$_f4f9[328])));if(!1===H.call(this.parent,_$_f4f9[329],
|
|
293
|
+
this,b,a))return console.log(_$_f4f9[330]),!1;if(-1<parseInt(b)&&0<parseInt(a)){ba.reset.call(this);f=null;var g=[],h=[],l=[];var n=0;for(var p=b;p<b+a;p++)ia.attached.call(this,p)&&(this.colgroup[p].parentNode.removeChild(this.colgroup[p]),this.headers[p].parentNode.removeChild(this.headers[p])),l[n]=this.options.columns[p],n++;for(var q=0;q<this.options.data.length;q++)for(p=b;p<b+a;p++)n=G.getColumnNameFromCoords(p,q),S.getAttributes.call(this,_$_f4f9[314],n,c),S.getAttributes.call(this,_$_f4f9[120],
|
|
294
|
+
n,c),S.getAttributes.call(this,_$_f4f9[315],n,c),S.getAttributes.call(this,_$_f4f9[316],n,c),S.getAttributes.call(this,_$_f4f9[296],n,c),S.getAttributes.call(this,_$_f4f9[295],n,c),e[n]=!0,this.records[q][p].element&&0<=Array.prototype.indexOf.call(this.rows[q].element.children,this.records[q][p].element)&&this.records[q][p].element.parentNode.removeChild(this.records[q][p].element);if(p=Y.getChain.call(this,c.values))c.formulas=p;this.options.columns.splice(b,a);this.headers.splice(b,a);this.colgroup.splice(b,
|
|
295
|
+
a);for(q=0;q<this.options.data.length;q++)this.dataType||(h[q]=this.options.data[q].splice(b,a)),g[q]=this.records[q].splice(b,a);ha.adjust.call(this,b,a,0);(p=za.adjust.call(this,b,a,0))&&(f={nested:p});sa.updateConfig.call(this,0,0,b,a);L.call(this,_$_f4f9[81],{columnNumber:b,numOfColumns:a});T.call(this.parent,{worksheet:this,action:_$_f4f9[81],columnNumber:b,numOfColumns:a,insertBefore:1,data:h,properties:l,attributes:c,extra:f});fa.references.call(this,e);I.call(this,!0,!0);fa.update.call(this,
|
|
296
|
+
!0);H.call(this.parent,_$_f4f9[331],this,b,a,g,l,c)}}};d.isVisible=function(b){var a=this.options.columns;return!1===a[b].visible||a[b].type===_$_f4f9[112]||a[b].width===_$_f4f9[61]||a[b].width===_$_f4f9[119]?!1:!0};return d}(),Ma=function(){var k={},d={},b=function(c){if(typeof c==_$_f4f9[25]){var e=c;c=G.getCoordsFromColumnName(c);var f=c[0];c=c[1]}else f=c.x,c=c.y,e=G.getColumnNameFromCoords(f,c);if(this.records[c]&&this.records[c][f]&&this.records[c][f].element){d[e]=this.options.style[e];this.records[c][f].element.setAttribute(_$_f4f9[120],
|
|
297
|
+
_$_f4f9[3]);if(this.options.cells&&this.options.cells[e]&&this.options.cells[e].align)var g=this.options.cells[e].align;else this.options.columns[f].align&&(g=this.options.columns[f].align);g&&(this.records[c][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(c){c.getStyle=a[_$_f4f9[58]];c.setStyle=a[_$_f4f9[11]];c.resetStyle=a.reset};a[_$_f4f9[58]]=function(c){var e=this.options.style;if(!e)return!1;if(c){if(typeof c==_$_f4f9[25])return e[c];
|
|
298
|
+
var f=[],g=Object.keys(c);if(0<g.length)for(var h=0;h<g.length;h++){if(typeof c[h]==_$_f4f9[25])var l=e&&e[c[h]]?e[c[h]]:_$_f4f9[3];else l=G.getColumnNameFromCoords(c[h].x,c[h].y),l=e&&e[l]?e[l]:_$_f4f9[3];f.push(l)}return f}return this.options.style};a.getFromSelection=function(c){var e,f,g=this.options.style,h=0,l=[];for(f=c[1];f<=c[3];f++){var n=0;l[h]=[];for(e=c[0];e<=c[2];e++){var p=G.getColumnNameFromCoords(e,f);l[h][n++]=g&&g[p]?g[p]:_$_f4f9[3]}h++}return l};a[_$_f4f9[11]]=function(c,e,f,g){if(!R.call(this.parent,
|
|
299
|
+
this))return!1;this.options.style||(this.options.style={});var h=this.options.style,l=null,n=[],p=[],q={};p=function(x,y,B){if(!q[x]&&(h[x]?n=h[x].split(_$_f4f9[244]):(h[x]=_$_f4f9[3],n=[]),q[x]={},n.length))for(var z=0;z<n.length;z++)n[z]&&n[z].trim()&&(l=n[z].split(_$_f4f9[157]),q[x][l[0].trim()]=l[1].trim());d[x]||(d[x]=[]);k[x]||(k[x]=[]);q[x][y]||(q[x][y]=_$_f4f9[3]);d[x].push([y+_$_f4f9[157]+q[x][y]]);q[x][y]=q[x][y]&&q[x][y]==B&&!g?_$_f4f9[3]:B;k[x].push([y+_$_f4f9[157]+q[x][y]]);B=G.getCoordsFromColumnName(x);
|
|
300
|
+
this.records[B[1]]&&this.records[B[1]][B[0]]&&this.records[B[1]][B[0]].element&&(this.records[B[1]][B[0]].element.style[y]=q[x][y]);q[x][y]||delete q[x][y]};k={};d={};if(e)if(typeof c==_$_f4f9[25])p.call(this,c,e,f);else{if(c&&c.length)for(var v=0;v<c.length;v++){var w=G.getColumnNameFromCoords(c[v].x,c[v].y);p.call(this,w,e,f)}}else for(f=Object.keys(c),v=0;v<f.length;v++)if(w=c[f[v]])for(typeof w==_$_f4f9[25]&&(w=w.split(_$_f4f9[244])),e=0;e<w.length;e++)w[e]&&(typeof w[e]==_$_f4f9[25]&&(w[e]=w[e].split(_$_f4f9[157])),
|
|
301
|
+
w[e][0].trim()&&p.call(this,f[v],w[e][0].trim(),w[e][1].trim()));n={};p=Object.keys(q);if(p.length){for(v=0;v<p.length;v++){n[p[v]]||(n[p[v]]=[]);c=Object.keys(q[p[v]]);for(e=0;e<c.length;e++)n[p[v]].push(c[e]+_$_f4f9[137]+q[p[v]][c[e]]);this.options.style[p[v]]=n[p[v]].join(_$_f4f9[332])}p=Object.keys(k);for(v=0;v<p.length;v++)k[p[v]]=k[p[v]].join(_$_f4f9[244]);p=Object.keys(d);for(v=0;v<p.length;v++)d[p[v]]=d[p[v]].join(_$_f4f9[244]);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_f4f9[86],
|
|
302
|
+
oldValue:d,newValue:k});L.call(this,_$_f4f9[86],[k]);H.call(this.parent,_$_f4f9[333],this,k,d)}};a.reset=function(c){if(!R.call(this.parent,this))return!1;if(c){d={};if(Array.isArray(c))for(var e=0;e<c.length;e++)b.call(this,c[e]);else b.call(this,c);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_f4f9[87],cells:c,oldValue:d});L.call(this,_$_f4f9[87],[c]);H.call(this.parent,_$_f4f9[335],this,c)}else console.error(_$_f4f9[334])};a.update=function(c){k={};d={};for(var e=Object.keys(c),
|
|
303
|
+
f=0;f<e.length;f++){d[e[f]]=this.options.style[e[f]]||_$_f4f9[3];k[e[f]]=this.options.style[e[f]]=c[e[f]];var g=G.getCoordsFromColumnName(e[f]),h=g[0];g=g[1];if(this.records[g]&&this.records[g][h]&&this.records[g][h].element&&(this.records[g][h].element.setAttribute(_$_f4f9[120],c[e[f]]),!this.records[g][h].element.style.textAlign)){var l=null;this.options.cells&&this.options.cells[e[f]]&&this.options.cells[e[f]].align?l=this.options.cells[e[f]].align:this.options.columns[h].align&&(l=this.options.columns[h].align);
|
|
304
|
+
l&&(this.records[g][h].element.style.textAlign=l)}}L.call(this,_$_f4f9[87],[e]);L.call(this,_$_f4f9[86],[k]);H.call(this.parent,_$_f4f9[333],this,k,d)};return a}(),Za=function(){var k=function(d){d.getComments=k[_$_f4f9[58]];d.setComments=k[_$_f4f9[11]]};k[_$_f4f9[58]]=function(d){return d&&typeof d==_$_f4f9[25]?this.options.comments&&this.options.comments[d]?this.options.comments[d]:!1:this.options.comments};k[_$_f4f9[11]]=function(d,b){if(!R.call(this.parent,this))return!1;if(typeof d==_$_f4f9[25]){var a=
|
|
305
|
+
{};a[d]=b}else a=d;if(b=H.call(this.parent,_$_f4f9[336],this,a))a=b;else if(!1===b)return!1;this.options.comments||(this.options.comments={});d={};var c=Object.keys(a);if(c.length){for(var e=0;e<c.length;e++){var f=G.getCoordsFromColumnName(c[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(d[c[e]]=this.options.comments[c[e]]||_$_f4f9[3],(b=a[c[e]])?this.options.comments[c[e]]=b:delete this.options.comments[c[e]],this.records[f[1]][f[0]].element&&(b?this.records[f[1]][f[0]].element.setAttribute(_$_f4f9[297],
|
|
306
|
+
b):this.records[f[1]][f[0]].element.removeAttribute(_$_f4f9[297])))}T.call(this.parent,{worksheet:this,action:_$_f4f9[91],newValue:a,oldValue:d});L.call(this,_$_f4f9[91],[a]);H.call(this.parent,_$_f4f9[337],this,a,d)}};return k}(),$a=function(){var k=function(d){d.getMeta=k[_$_f4f9[58]];d.setMeta=k[_$_f4f9[11]];d.resetMeta=k.reset};k[_$_f4f9[58]]=function(d,b){if(d){if(this.options.meta[d])return b?this.options.meta[d][b]:this.options.meta[d]}else return this.options.meta};k[_$_f4f9[11]]=function(d,
|
|
307
|
+
b,a){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof d==_$_f4f9[25]&&b){a||(a=_$_f4f9[3]);var c={};c[d]={};c[d][b]=a;d=c}b=Object.keys(d);if(b.length){a={};for(c=0;c<b.length;c++){this.options.meta[b[c]]||(this.options.meta[b[c]]={});a[b[c]]||(a[b[c]]={});for(var e=Object.keys(d[b[c]]),f=0;f<e.length;f++)this.options.meta[b[c]][e[f]]=d[b[c]][e[f]],a[b[c]][e[f]]=d[b[c]][e[f]]}Object.keys(a).length&&(L.call(this,_$_f4f9[338],[a]),H.call(this.parent,_$_f4f9[339],
|
|
308
|
+
this,a))}};k.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){if(this.options.meta){typeof d==_$_f4f9[25]&&(d=[d]);for(var b=0;b<d.length;b++)this.options.meta[d[b]]&&delete this.options.meta[d[b]]}}else d={},this.options.meta=d;L.call(this,_$_f4f9[340],d);H.call(this.parent,_$_f4f9[341],this,d)};return k}(),ab=function(){var k=function(d){d.orderBy=k.execute};k.handler=function(d,b){return function(a,c){a=a[1];c=c[1];return d?a===_$_f4f9[3]&&c!==_$_f4f9[3]?1:a!==_$_f4f9[3]&&c===_$_f4f9[3]?
|
|
309
|
+
-1:a>c?-1:a<c?1:0:a===_$_f4f9[3]&&c!==_$_f4f9[3]?1:a!==_$_f4f9[3]&&c===_$_f4f9[3]?-1:a>c?1:a<c?-1:0}};k.execute=function(d,b,a,c){if(0<=d){b=null==b?this.headers[d].classList.contains(_$_f4f9[342])?1:0:b?1:0;for(var e,f,g=[],h=0;h<this.options.data.length;h++)e=La[_$_f4f9[58]].call(this,d,h),f=this.records[h][d].v,f=e.type==_$_f4f9[284]||e.type==_$_f4f9[289]||e.type==_$_f4f9[290]||e.type==_$_f4f9[343]||e.type==_$_f4f9[22]||e.type==_$_f4f9[344]?Number(f):jSuites.isNumeric(f)?Number(f):f.toLowerCase(),
|
|
310
|
+
g[h]=[h,f];h=typeof this.parent.config.sorting===_$_f4f9[104]?this.parent.config.sorting(b,d):k.handler(b,d);g.sort(h);e=a?!0:!1;if(!a)for(a=[],h=0;h<g.length;h++)a[h]=g[h][0];if(h=H.call(this.parent,_$_f4f9[345],this,d,b,a))a=h;else if(!1===h)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(E(_$_f4f9[346])))this.destroyMerged();else return!1;if(a.length<g.length)for(h=0;h<g.length;h++)-1==a.indexOf(g[h][0])&&a.push(g[h][0]);g=[];for(h=0;h<a.length;h++)g[a[h]]=
|
|
311
|
+
h;Ha.call(this,!1);ba.reset.call(this);L.call(this,_$_f4f9[94],{column:d,direction:b,order:a});T.call(this.parent,{worksheet:this,action:_$_f4f9[94],column:d,newValue:a,oldValue:g,direction:b,previousState:k.getState.call(this)});k.update.call(this,a);k.arrow.call(this,d,b,c);ba.refresh.call(this);H.call(this.parent,_$_f4f9[347],this,d,b,a);return!0}};k.update=function(d){for(var b=[],a=0;a<d.length;a++)b[a]=this.options.data[d[a]];for(a=0;a<d.length;a++)this.options.data[a]=b[a];b=[];for(a=0;a<d.length;a++)b[a]=
|
|
312
|
+
this.records[d[a]];this.records=b;b=[];for(a=0;a<d.length;a++)b[a]=this.rows[d[a]];this.rows=b;fa.references.call(this);this.tbody.innerHTML=_$_f4f9[3];I.call(this,!0,!0);this.searchInput&&this.searchInput.value?wa.update.call(this,null):la.update.call(this)};k.arrow=function(d,b,a){for(var c=0;c<this.headers.length;c++)this.headers[c].classList.remove(_$_f4f9[348]),this.headers[c].classList.remove(_$_f4f9[342]);void 0===a?this.headers[d].classList.add(b?_$_f4f9[348]:_$_f4f9[342]):Array.isArray(a)&&
|
|
313
|
+
this.headers[a[0]].classList.add(a[1]?_$_f4f9[348]:_$_f4f9[342])};k.getState=function(){for(var d=0;d<this.headers.length;d++){if(this.headers[d].classList.contains(_$_f4f9[348]))return[d,1];if(this.headers[d].classList.contains(_$_f4f9[342]))return[d,0]}return null};return k}(),Da=function(){var k=function(d){d.whichPage=k.whichPage;d.quantityOfPages=k.quantityOfPages;d.page=k[_$_f4f9[11]];d.updatePagination=k.update};k.build=function(){this.pageNumber=0;var d=document.createElement(_$_f4f9[32]),
|
|
314
|
+
b=document.createElement(_$_f4f9[32]);this.pagination=document.createElement(_$_f4f9[32]);this.pagination.classList.add(_$_f4f9[349]);this.pagination.appendChild(d);this.pagination.appendChild(b);this.options.pagination||(this.pagination.style.display=_$_f4f9[52]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_f4f9[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_f4f9[11]].call(this,
|
|
315
|
+
this.pageNumber))};k.whichPage=function(d){if(0<this.options.pagination)return this.rows[d]?(this.results&&(d=this.results.indexOf(parseInt(d))),Math.ceil((parseInt(d)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_f4f9[350]);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(_$_f4f9[350]);return!1};k[_$_f4f9[11]]=function(d,b){var a=this.pageNumber,c=
|
|
316
|
+
parseInt(this.options.pagination);if(c){if(null==d||-1==d)d=Math.ceil((this.results?this.results:this.rows).length/c)-1;if(!1===H.call(this.parent,_$_f4f9[352],this,d,a,c))return!1;this.pageNumber=d;I.update.call(this);ha.refresh.call(this);typeof b==_$_f4f9[104]&&b.call(this);H.call(this.parent,_$_f4f9[353],this,d,a,c)}else console.error(_$_f4f9[351])};k.update=function(){this.pagination.children[0].innerHTML=_$_f4f9[3];this.pagination.children[1].innerHTML=_$_f4f9[3];if(this.options.pagination){var d=
|
|
317
|
+
this.results?this.results.length:this.rows.length;if(d){d=Math.ceil(d/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>d?d:10;else 5>d-this.pageNumber?(b=d-9,a=d,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var c=document.createElement(_$_f4f9[32]);c.className=_$_f4f9[355];c.innerHTML=_$_f4f9[15];c.title=1;this.pagination.children[1].appendChild(c)}for(;b<=a;b++)c=document.createElement(_$_f4f9[32]),c.className=_$_f4f9[355],c.innerHTML=b,this.pagination.children[1].appendChild(c),
|
|
318
|
+
this.pageNumber==b-1&&c.classList.add(_$_f4f9[356]);a<d&&(c=document.createElement(_$_f4f9[32]),c.className=_$_f4f9[355],c.innerHTML=_$_f4f9[17],c.title=d,this.pagination.children[1].appendChild(c));this.pagination.children[0].innerHTML=E(_$_f4f9[357],[this.pageNumber+1,d])}else this.pagination.children[0].innerHTML=E(_$_f4f9[354]);this.options.tableOverflow&&(this.content.style.height=this.table.offsetHeight+16+_$_f4f9[59],this.table.style.top=0)}};return k}(),ja=function(){var k=function(d){d.setFreezeRows=
|
|
319
|
+
k[_$_f4f9[11]];d.resetFreezeRows=k.reset};k.update=function(d){var b,a;if(a=this.options.freezeRows)for(var c=this.thead.offsetHeight,e=0;e<a;e++){if(b=this.records[e][d].element)b.classList.add(_$_f4f9[358]),b.style.top=c+_$_f4f9[59];c+=parseInt(this.rows[e].element.offsetHeight)}};k.headers=function(){var d=this.thead.offsetHeight,b;if(b=this.options.freezeRows)for(var a=0;a<b;a++)this.rows[a]&&this.rows[a].element&&(this.rows[a].element.firstChild.classList.add(_$_f4f9[358]),this.rows[a].element.firstChild.style.top=
|
|
320
|
+
d+_$_f4f9[59],d+=parseInt(this.rows[a].element.offsetHeight));else k.reset.call(this)};k.refresh=function(){if(0<this.options.freezeRows){k.headers.call(this);for(var d=0;d<this.visibleCols.length;d++)k.update.call(this,this.visibleCols[d])}};k[_$_f4f9[11]]=function(d){k.applyReset.call(this);var b=this.options.freezeRows;this.options.freezeRows=d;this.options.freezeRowControl&&!d?this.thead.lastChild.firstChild.classList.add(_$_f4f9[359]):this.thead.lastChild.firstChild.classList.remove(_$_f4f9[359]);
|
|
321
|
+
k.refresh.call(this);I.call(this,!0);ba.refresh.call(this);T.call(this.parent,{worksheet:this,action:_$_f4f9[93],newValue:d,oldValue:b});L.call(this,_$_f4f9[93],{row:d})};k.reset=function(){k[_$_f4f9[11]].call(this,0)};k.getHeight=function(d){d=d?0:this.thead.offsetHeight;if(0<this.options.freezeRows)for(var b=0;b<this.options.freezeRows;b++)d+=parseInt(da.height.call(this,b));return d};k.applyReset=function(){for(var d,b=0;b<this.options.freezeRows;b++)if(this.rows[b].element){this.rows[b].element.firstChild.classList.remove(_$_f4f9[358]);
|
|
322
|
+
this.rows[b].element.firstChild.style.top=_$_f4f9[3];for(var a=0;a<this.options.columns.length;a++)if(d=this.records[b][a].element)d.classList.remove(_$_f4f9[358]),d.style.top=_$_f4f9[3]}};k.start=function(d,b){d=this.parent.helper;k.event={y:b,d:b};this.content.scrollTop=0;b=this.content.offsetTop+k.getHeight.call(this);d.style.display=_$_f4f9[24];d.style.top=b+_$_f4f9[59];d.style.left=_$_f4f9[61];d.style.width=this.content.offsetWidth+_$_f4f9[59];d.style.height=_$_f4f9[181]};k.end=function(d){d=
|
|
323
|
+
k.event;null!==d.d&&this.setFreezeRows(d.d);this.parent.helper.style.display=_$_f4f9[3];k.event=null};k.cancel=function(){k.event.d=null;k.end.call(this,!1)};k.move=function(d){var b=d.target.getAttribute(_$_f4f9[57]);if(null!=b){b=parseInt(b);var a=(d=d.target.clientHeight/2>d.offsetY)?b:b+1;this.merged.rows[a]&&0<a||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(d?b.top:b.bottom)-a.top+_$_f4f9[59])}};return k}(),
|
|
324
|
+
ca=function(){var k=function(d){d.setFreezeColumns=k[_$_f4f9[11]];d.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);for(var d=0;d<this.rows.length;d++)this.rows[d].element&&k.update.call(this,d)}};k.update=function(d){var b,a;if(a=this.options.freezeColumns){var c=Ba.call(this)?50:0;if(this.rows[d].element)for(var e=0;e<a;e++){if(b=this.records[d][e].element)b.classList.add(_$_f4f9[60]),b.style.left=c+_$_f4f9[59];ia.isVisible.call(this,e)&&(c+=parseInt(this.options.columns[e].width))}}};
|
|
325
|
+
k.headers=function(){var d=Ba.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(_$_f4f9[60]);this.headers[a].style.left=d+_$_f4f9[59];if(this.options.footers)for(var c=0;c<this.options.footers.length;c++)this.footers.content[c][a].element.classList.add(_$_f4f9[60]),this.footers.content[c][a].element.style.left=d+_$_f4f9[59];!1!==this.options.columns[a].visible&&(d+=parseInt(this.options.columns[a].width))}}else k.reset.call(this)};
|
|
326
|
+
k.refresh=function(){if(0<this.options.freezeColumns){k.headers.call(this);for(var d=0;d<this.visibleRows.length;d++)k.update.call(this,this.visibleRows[d])}};k[_$_f4f9[11]]=function(d){k.applyReset.call(this);var b=this.options.freezeColumns;this.options.freezeColumns=d;this.options.freezeColumnControl&&!d?this.thead.lastChild.firstChild.classList.add(_$_f4f9[360]):this.thead.lastChild.firstChild.classList.remove(_$_f4f9[360]);k.width.call(this);I.call(this,!0);ba.refresh.call(this);T.call(this.parent,
|
|
327
|
+
{worksheet:this,action:_$_f4f9[92],newValue:d,oldValue:b});L.call(this,_$_f4f9[92],{column:d})};k.reset=function(){k[_$_f4f9[11]].call(this,0)};k.applyReset=function(){for(var d,b=1;b<=this.options.freezeColumns;b++){if(d=this.thead.lastChild)d.children[b].classList.remove(_$_f4f9[60]),d.children[b].style.left=_$_f4f9[3];for(var a=0;a<this.rows.length;a++)if(d=this.rows[a].element)d.children[b].classList.remove(_$_f4f9[60]),d.children[b].style.left=_$_f4f9[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[b].classList.remove(_$_f4f9[60]),
|
|
328
|
+
this.tfoot.children[a].children[b].style.left=_$_f4f9[3]}};k.getWidth=function(d){d=d?0:Ba.call(this)?50:0;if(0<this.options.freezeColumns)for(var b=0;b<this.options.freezeColumns;b++)ia.isVisible.call(this,b)&&(d+=parseInt(this.options.columns[b].width));return d};k.start=function(d,b){d=this.parent.helper;k.event={x:b,d:b};this.content.scrollLeft=0;b=k.getWidth.call(this);d.style.display=_$_f4f9[24];d.style.top=this.content.offsetTop+_$_f4f9[59];d.style.left=b+_$_f4f9[59];d.style.width=_$_f4f9[181];
|
|
329
|
+
d.style.height=this.content.offsetHeight+_$_f4f9[59];this.thead.lastChild.firstChild.classList.remove(_$_f4f9[360])};k.end=function(d){d=k.event;null!==d.d&&this.setFreezeColumns(d.d);this.parent.helper.style.display=_$_f4f9[3];k.event=null};k.cancel=function(){k.event.d=null;k.end.call(this,!1)};k.move=function(d){var b=d.target.getAttribute(_$_f4f9[56]);if(null!=b){b=parseInt(b);var a=(d=d.target.clientWidth/2>d.offsetX)?b:b+1;this.merged.cols[a]&&0<a||(k.event.d=a,b=this.headers[b].getBoundingClientRect(),
|
|
330
|
+
a=this.content.getBoundingClientRect(),this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$_f4f9[59])}};return k}(),fa=function(){var k=function(a,c){if(this.options[a]){for(var e={},f=Object.keys(this.options[a]),g=0;g<f.length;g++)e[c&&void 0!=c[f[g]]?c[f[g]]:f[g]]=this.options[a][f[g]];this.options[a]=e}},d=function(){if(0<this.options.minSpareRows){for(var a=0,c=this.rows.length-1;0<=c;c--){for(var e=!1,f=0;f<this.options.columns.length;f++)Q.call(this,f,c)&&(e=!0);if(e)break;else a++}0<
|
|
331
|
+
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(c=0;c<this.rows.length;c++)Q.call(this,f,c)&&(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(_$_f4f9[32]);this.content.classList.add(_$_f4f9[361]);this.content.addEventListener(_$_f4f9[362],function(e){if(!a.edition)return e.preventDefault(),
|
|
332
|
+
!1});this.table=document.createElement(_$_f4f9[363]);this.thead=document.createElement(_$_f4f9[364]);this.tbody=document.createElement(_$_f4f9[365]);this.tfoot=document.createElement(_$_f4f9[366]);!1===this.options.gridline&&this.table.classList.add(_$_f4f9[367]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_f4f9[368]);var c=document.createElement(_$_f4f9[196]);c.setAttribute(_$_f4f9[178],_$_f4f9[369]);this.colgroupContainer.appendChild(c);this.headerContainer=
|
|
333
|
+
document.createElement(_$_f4f9[171]);c=document.createElement(_$_f4f9[173]);c.classList.add(_$_f4f9[370]);if(1==this.parent.edition)this.options.freezeRowControl&&!this.options.freezeRows&&c.classList.add(_$_f4f9[359]),this.options.freezeColumnControl&&!this.options.freezeColumns&&c.classList.add(_$_f4f9[360]);else if(this.options.freezeRowControl||this.options.freezeColumnControl)this.options.freezeRowControl=!1,this.options.freezeColumnControl=!1,console.log(_$_f4f9[371]);this.headerContainer.appendChild(c);
|
|
334
|
+
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_f4f9[372]);this.table.setAttribute(_$_f4f9[373],_$_f4f9[119]);this.table.setAttribute(_$_f4f9[374],_$_f4f9[119]);this.table.setAttribute(_$_f4f9[375],_$_f4f9[376]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.defaultColAlign&&this.table.classList.add(_$_f4f9[377]+this.options.defaultColAlign);this.options.textOverflow||
|
|
335
|
+
this.table.classList.add(_$_f4f9[378]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_f4f9[379]);this.corner=document.createElement(_$_f4f9[32]);this.corner.className=_$_f4f9[380];this.corner.setAttribute(_$_f4f9[375],_$_f4f9[381]);this.corner.setAttribute(_$_f4f9[382],_$_f4f9[383]);0==this.options.selectionCopy&&(this.corner.style.display=_$_f4f9[52]);this.scrollX=I.build.call(a,_$_f4f9[384]);this.scrollY=I.build.call(a,_$_f4f9[385]);this.content.appendChild(this.scrollX);this.content.appendChild(this.scrollY);
|
|
336
|
+
this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$_f4f9[67]),this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.width=parseInt(this.options.tableWidth)+_$_f4f9[59],this.options.pagination?this.content.classList.add(_$_f4f9[386]):this.content.style.height=
|
|
337
|
+
parseInt(this.options.tableHeight)+_$_f4f9[59]);this.options.resize&&(this.content.style.resize=this.options.resize);this.options.freezeColumns>this.options.columns.length&&console.error(_$_f4f9[387]);wa.build.call(this);za.build.call(this);Da.build.call(this);Ia.build.call(this);sa.build.call(this);ha.build.call(this);la.onload.call(this);d.call(this);I.call(this)};b.references=function(a){var c=[],e=[],f=null,g=null,h=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])h=
|
|
338
|
+
g.getAttribute(_$_f4f9[56]),h!=f&&(g.setAttribute(_$_f4f9[56],f),g.getAttribute(_$_f4f9[193])||(g.innerHTML=G.getColumnName(f)));for(var n=0;n<this.rows.length;n++)g=this.rows[n],l=g.y,l!=n&&(g.y=n,c[l]=n,g.element&&(g.element.setAttribute(_$_f4f9[57],n),g.element.children[0].setAttribute(_$_f4f9[57],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(v,w){g=this.records[w][v];h=g.x;l=g.y;h!=v&&
|
|
339
|
+
(g.x=v,g.element&&g.element.setAttribute(_$_f4f9[56],v));l!=w&&(g.y=w,g.element&&g.element.setAttribute(_$_f4f9[57],w));if(h!=v||l!=w){var x=G.getColumnNameFromCoords(h,l);v=G.getColumnNameFromCoords(v,w);e[x]=v}};if(a){n=function(v,w){v&&v[w]&&delete v[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,
|
|
340
|
+
f,n);k.call(this,_$_f4f9[388],c);k.call(this,_$_f4f9[314],e);k.call(this,_$_f4f9[315],e);k.call(this,_$_f4f9[120],e);k.call(this,_$_f4f9[316],e);k.call(this,_$_f4f9[296],e);this.options.mergeCells&&sa.build.call(this);H.call(this.parent,_$_f4f9[389],this,e,a);Y.tracking.call(this,e,a);Y.updateAll.call(this,e,a);Ja.updateAll.call(this,e,a);H.call(this.parent,_$_f4f9[390],this,e,a);return e};b.update=function(a){a&&d.call(this);if(typeof this.parent.config.updateTable==_$_f4f9[104])for(var c=0;c<this.rows.length;c++)for(var e=
|
|
341
|
+
0;e<this.options.columns.length;e++)a=this.records[c][e],this.parent.config.updateTable.call(this,this,a.element,e,c,Q.call(this,e,c),a.r?a.r:a.v);ha.refresh.call(this)};return b}(),ta=function(){var k={spreadsheet:function(d,b){var a={name:null,config:{},el:d,element:d,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Ga.spreadsheet.call(a,b);a.config.license&&(u.license=a.config.license);d.spreadsheet=a;d.jspreadsheet=d.jexcel=a.worksheets;
|
|
342
|
+
u.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var c=a.config.tabs;typeof c!==_$_f4f9[103]&&(c={allowCreate:c?!0:!1,hideHeaders:c?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});c.maxWidth||(c.maxWidth=d.offsetWidth-50+_$_f4f9[59]);c.animation=void 0==c.animation?!0:c.animation;c.onbeforecreate=function(){a.createWorksheet();return!1};c.onclick=function(f,g,h,l,n){0<=h&&a.openWorksheet(h,!0)};c.onchangeposition=function(f,g,h){a.updateWorksheet(g,
|
|
343
|
+
h)};jSuites.tabs(d,c);d.classList.add(_$_f4f9[391]);1==b.fullscreen&&d.classList.add(_$_f4f9[23]);var e=document.createElement(_$_f4f9[32]);a.toolbar=document.createElement(_$_f4f9[32]);a.toolbar.className=_$_f4f9[392];e.appendChild(a.toolbar);a.filter=la.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_f4f9[32]);a.helper.className=_$_f4f9[393];e.appendChild(a.helper);a.loading=document.createElement(_$_f4f9[32]);a.loading.classList.add(_$_f4f9[394]);e.appendChild(a.loading);
|
|
344
|
+
e.appendChild(na.build(a));e.appendChild(Ta(a));a.textarea=document.createElement(_$_f4f9[395]);a.textarea.className=_$_f4f9[396];a.textarea.tabIndex=_$_f4f9[397];e.appendChild(a.textarea);c.position===_$_f4f9[398]?d.insertBefore(e,d.children[0]):d.insertBefore(e,d.children[1]);d.appendChild(Na.call(a,u.license));a.createWorksheet=pa.createWorksheet;a.deleteWorksheet=pa.deleteWorksheet;a.renameWorksheet=pa.renameWorksheet;a.updateWorksheet=pa.updateWorksheet;a.openWorksheet=pa.openWorksheet;a.moveWorksheet=
|
|
345
|
+
pa.moveWorksheet;a.getWorksheet=pa.getWorksheet;a.getWorksheetActive=pa.getWorksheetActive;a.getWorksheetInstance=pa.getWorksheetInstance;a.getConfig=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=Oa;a.progress=Pa;a.dispatch=H;a.setHistory=T;a.resetHistory=T.reset;a.undo=T.undo;a.redo=T.redo;a.setToolbar=ma[_$_f4f9[11]];a.getToolbar=ma[_$_f4f9[58]];a.showToolbar=ma.show;a.hideToolbar=ma.hide;a.tools=
|
|
346
|
+
e;Ja.build.call(a);b.plugins&&va.call(a,b.plugins);a.setPlugins=function(f){va.call(a,f)};d=Object.keys(u.extensions);if(d.length)for(c=0;c<d.length;c++)if(typeof u.extensions[d[c]].oninit==_$_f4f9[104])u.extensions[d[c]].oninit(a,b);return a},worksheet:function(d,b){var a={};d.worksheets.push(a);a.parent=d;Ga(a);Va(a);ka(a);ba(a);na(a);Ia(a);Xa(a);sa(a);Ma(a);Ya(a);oa(a);Y(a);S(a);da(a);ia(a);$a(a);Za(a);Ea(a);ha(a);za(a);wa(a);la(a);ma(a);ya(a);bb(a);cb(a);Da(a);pa(a);ca(a);ja(a);Wa(a);ab(a);Ja(a);
|
|
347
|
+
La(a);Ga.worksheet.call(a,b);!u.license&&a.options.license&&(u.license=a.options.license);d.element.jexcel=d.element.jexcel?d.worksheets:a;va.execute.call(a.parent,_$_f4f9[399],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_f4f9[400]+pa.nextName());var c=this.options.worksheetName;J(c)&&console.log(_$_f4f9[401]+c+_$_f4f9[402]);J(c,a);this.element=d.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===_$_f4f9[112]&&(f.style.display=
|
|
348
|
+
_$_f4f9[52])});this.element.classList.add(_$_f4f9[403]);this.element.jexcel=this;fa.build.call(this);va.execute.call(this.parent,_$_f4f9[404],[this]);this.options.data&&500<this.options.data.length&&!I.limited.call(this)&&!this.options.pagination&&console.error(_$_f4f9[405])};return a},row:function(d,b){this.rows[d]||(this.rows[d]={element:null,y:d});b&&(this.rows[d].id=b,ya[_$_f4f9[11]].call(this,b));this.options.rows&&this.options.rows[d]&&this.options.rows[d].height&&(this.rows[d].height=parseInt(this.options.rows[d].height));
|
|
349
|
+
this.records[d]||(this.records[d]=[]);this.options.data[d]||(this.options.data[d]=this.dataType?{}:[]);for(b=0;b<this.options.columns.length;b++)k.cell.call(this,b,d)},cell:function(d,b,a){typeof a==_$_f4f9[21]&&(a=Q.call(this,d,b),null===a||void 0===a)&&(a=_$_f4f9[3],Q.call(this,d,b,a));this.records[b][d]||(this.records[b][d]={element:null,x:d,y:b},Z(a)||(this.records[b][d].v=a))},bind:function(d){for(var b=Object.keys(Fa),a=0;a<b.length;a++)(b[a]==_$_f4f9[406]?window:d).addEventListener(b[a],Fa[b[a]],
|
|
350
|
+
b[a]==_$_f4f9[407]||b[a]==_$_f4f9[408]||b[a]==_$_f4f9[409]?{passive:!1}:{})},unbind:function(d){for(var b=Object.keys(Fa),a=0;a<b.length;a++)(b[a]==_$_f4f9[406]?window:d).removeEventListener(b[a],Fa[b[a]])}};return k}(),bb=function(){var k=function(d){d.getWidth=k[_$_f4f9[58]];d.setWidth=k[_$_f4f9[11]]};k[_$_f4f9[58]]=function(d){var b=this.options.columns;if(typeof d===_$_f4f9[21]){d=[];for(var a=0;a<b.length;a++)d.push(b[a].width)}else d=b[d].width;return d};k[_$_f4f9[11]]=function(d,b,a){if(!R.call(this.parent,
|
|
351
|
+
this))return!1;if(b){if(Array.isArray(d)){a||(a=[]);for(var c=0;c<d.length;c++){a[c]||(a[c]=this.options.columns[d[c]].width);var e=Array.isArray(b)&&b[c]?b[c]:b;this.options.columns[d[c]].width=e;this.colgroup[d[c]]&&this.colgroup[d[c]].setAttribute(_$_f4f9[178],e)}}else a||(a=this.options.columns[d].width),this.options.columns[d].width=b,this.colgroup[d]&&this.colgroup[d].setAttribute(_$_f4f9[178],b);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_f4f9[88],column:d,oldValue:a,
|
|
352
|
+
newValue:b});L.call(this,_$_f4f9[88],{column:d,width:b,oldWidth:a});H.call(this.parent,_$_f4f9[410],this,d,b,a);I.call(this,!0)}};return k}(),cb=function(){var k=function(b){b.getHeight=k[_$_f4f9[58]];b.setHeight=k[_$_f4f9[11]]};k[_$_f4f9[58]]=function(b){if(void 0===b){b=[];for(var a=0;a<this.rows.length;a++){var c=da.height.call(this,a);c&&(b[a]=c)}}else b=da.height.call(this,b);return b};var d=function(b,a){a=parseInt(a);var c=da.height.call(this,b);this.rows[b].element&&(this.rows[b].element.style.height=
|
|
353
|
+
a+_$_f4f9[59]);this.options.rows[b]||(this.options.rows[b]={});this.options.rows[b].height=a;this.rows[b].height=a;return c};k[_$_f4f9[11]]=function(b,a,c){if(!R.call(this.parent,this))return!1;var e,f=typeof c==_$_f4f9[21]?!0:!1;if(a){if(Array.isArray(b))for(!0===f&&(c=[]),e=0;e<b.length;e++){var g=Array.isArray(a)&&a[e]?a[e]:a;d.call(this,b[e],g);1==f&&c.push(f)}else e=d.call(this,b,a),1==f&&(c=e);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_f4f9[89],row:b,oldValue:c,newValue:a});
|
|
354
|
+
L.call(this,_$_f4f9[89],{row:b,height:a,oldHeight:c});H.call(this.parent,_$_f4f9[411],this,b,a,c);I.call(this,!0)}};return k}(),la=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_f4f9[412]);g.element.innerHTML=g.value;var l=document.createElement(_$_f4f9[251]);l.type=_$_f4f9[283];l.value=h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},d=null,b=null,a=[],c=0,e=null,f=function(g){g.setFilter=
|
|
355
|
+
f[_$_f4f9[11]];g.getFilter=f[_$_f4f9[58]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return b};f[_$_f4f9[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_f4f9[413]),g.filters=h):(l&&l.classList.remove(_$_f4f9[413]),g.filters=null);f.update.call(this)};f[_$_f4f9[58]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var h=0;h<
|
|
356
|
+
this.options.columns.length;h++)g[h]=this.options.columns[h].filters||null;return g};f.open=function(g){d=parseInt(g);if(this.headers[d].classList.contains(_$_f4f9[198])){b=!0;var h=this.parent.element.getBoundingClientRect(),l=this.headers[d].getBoundingClientRect();g=l.left-h.left;var n=l.top-h.top+l.height;l=this.parent.filter;h=h.left+h.width;l.style.display=_$_f4f9[24];g+l.offsetWidth>h&&(g=h-(l.offsetWidth+18));l.style.top=n+_$_f4f9[59];l.style.left=g+_$_f4f9[59];l.children[0].focus();g=l.children[1].selectAll;
|
|
357
|
+
l.children[1].textContent=_$_f4f9[3];l.children[1].appendChild(g);g.children[0].checked=this.options.columns[d].filters?!1:!0;g=wa.execute.call(this,null,d);g=G.invert(g);l=[];for(h=0;h<this.rows.length;h++)if(g[h]){n=_$_f4f9[3]+Q.call(this,d,h);var p=_$_f4f9[3]+oa.processed.call(this,d,h,!0);n.substr(0,1)==_$_f4f9[18]&&(n=p);l.push([n,p])}l.sort(function(q,v){return q[0]>v[0]?1:q[0]<v[0]?-1:0});a=[];for(h=0;h<l.length;h++)a[l[h][0]]={value:l[h][1],element:null};(g=H.call(this.parent,_$_f4f9[415],
|
|
358
|
+
this,d,a))&&(a=g);void 0!==a[_$_f4f9[3]]&&(delete a[_$_f4f9[3]],a[_$_f4f9[3]]={value:_$_f4f9[241]+E(_$_f4f9[416])+_$_f4f9[263],element:null});f.search.call(this,_$_f4f9[3])}else console.log(_$_f4f9[414])};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[d].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$_f4f9[11]].call(this,
|
|
359
|
+
d,g)}this.parent.filter.style.display=_$_f4f9[3];this.parent.filter.children[0].value=_$_f4f9[3];d=null;b=!1;a=null;c=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);Aa.reset.call(this);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 v=_$_f4f9[3]+Q.call(this,q,n),w=_$_f4f9[3]+this.getLabelFromCoords(q,n,!0);-1==h[q].filters.indexOf(v)&&-1==h[q].filters.indexOf(w)&&
|
|
360
|
+
(p=!1)}p&&l.push(n)}return l};f.update=function(){Aa.reset.call(this);this.resetSelection();this.resetBorders();var g=wa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_f4f9[104]){var h=f[_$_f4f9[58]].call(this),l=H.call(this.parent,_$_f4f9[417],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&Aa[_$_f4f9[11]].call(this,g);ha.refresh.call(this);I.call(this,!0);H.call(this.parent,_$_f4f9[418],this,h,g)};f.show=function(g){f.updateDOM.call(this,
|
|
361
|
+
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=!1;if(g){e=[];g=new RegExp(g,_$_f4f9[419]);for(var l=Object.keys(a),n=0;n<l.length;n++)a[l[n]]&&(_$_f4f9[3]+a[l[n]].value).match(g)?(e.push(l[n]),a[l[n]].selected=!0):a[l[n]].selected=!1;e.length&&this.options.columns[d].filters&&(h.firstChild.checked=!0,h.appendChild(h.currentSelection))}else{e=
|
|
362
|
+
Object.keys(a);if(g=this.options.columns[d].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=g?!1:!0}for(n=c=0;n<e.length;n++)200>n&&(g=c++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_f4f9[32]);g.className=_$_f4f9[420];g.onclick=function(p){p.target.tagName==_$_f4f9[421]&&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||
|
|
363
|
+
(p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$_f4f9[251]);h.type=_$_f4f9[71];h.placeholder=E(_$_f4f9[422]);h.classList.add(_$_f4f9[423]);h.classList.add(_$_f4f9[252]);var l=document.createElement(_$_f4f9[251]);l.type=_$_f4f9[424];l.value=_$_f4f9[425];l.className=_$_f4f9[426];var n=document.createElement(_$_f4f9[32]);n.className=_$_f4f9[427];n.appendChild(h);n.appendChild(g);n.appendChild(l);g.currentSelection=document.createElement(_$_f4f9[412]);g.currentSelection.innerHTML=
|
|
364
|
+
_$_f4f9[428]+E(_$_f4f9[429]);g.selectAll=document.createElement(_$_f4f9[412]);g.selectAll.innerHTML=_$_f4f9[430]+E(_$_f4f9[431])+_$_f4f9[263];g.selectAll.onclick=function(){for(var p=this.children[0].checked,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;c<e.length-1&&10>p;){var q=c++;g.appendChild(k(q));
|
|
365
|
+
p++}}});return n};f.updateDOM=function(g,h,l){var n=this.headers,p=function(q){1==h?n[q].classList.add(_$_f4f9[198]):(this.options.columns[q].filters=null,n[q].classList.remove(_$_f4f9[413]),1==l&&n[q].classList.remove(_$_f4f9[198]))};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(_$_f4f9[413]),h=!0);
|
|
366
|
+
1==h&&f.update.call(this)};return f}(),Aa=function(){var k={};k[_$_f4f9[11]]=function(d){for(var b=0;b<d.length;b++)this.rows[d[b]].results=!0;this.results=d};k.reset=function(){for(var d=0;d<this.rows.length;d++)!0===this.rows[d].results&&delete this.rows[d].results;this.results=null};k.refresh=function(){for(var d=[],b=0;b<this.rows.length;b++)!0===this.rows[b].results&&d.push(b);return d};return k}(),wa=function(){var k=function(c){var e=document.createElement(_$_f4f9[32]);if(0<c.options.pagination&&
|
|
367
|
+
c.options.paginationOptions&&0<c.options.paginationOptions.length){c.paginationDropdown=document.createElement(_$_f4f9[432]);c.paginationDropdown.classList.add(_$_f4f9[433]);c.paginationDropdown.onchange=function(){c.options.pagination=parseInt(this.value);c.page(0)};for(var f=0;f<c.options.paginationOptions.length;f++){var g=document.createElement(_$_f4f9[434]);g.value=c.options.paginationOptions[f];g.innerHTML=c.options.paginationOptions[f];c.paginationDropdown.appendChild(g)}c.paginationDropdown.value=
|
|
368
|
+
c.options.pagination;e.appendChild(document.createTextNode(E(_$_f4f9[435])));e.appendChild(c.paginationDropdown);e.appendChild(document.createTextNode(E(_$_f4f9[436])))}return e},d=function(c){var e=document.createElement(_$_f4f9[32]);e.innerHTML=E(_$_f4f9[422])+_$_f4f9[137];c.searchInput=document.createElement(_$_f4f9[251]);c.searchInput.classList.add(_$_f4f9[437]);c.searchInput.classList.add(_$_f4f9[252]);c.searchInput.oninput=function(){this.parentNode.classList.add(_$_f4f9[438])};e.appendChild(c.searchInput);
|
|
369
|
+
return e},b=function(c,e){var f=this.merged.rows;if(f[e]){for(;0<e&&f[e-1];)e--;for(;f[e];)c.push(e++)}else c.push(e)},a=function(c){c.search=a.update;c.resetSearch=a.reset;c.updateSearch=a.refresh;c.showSearch=a.show;c.hideSearch=a.hide};a.execute=function(c,e){null===c?c=this.searchInput.value||_$_f4f9[3]:c!==this.searchInput.value&&(this.searchInput.value=c);this.pageNumber=0;var f=[],g=null,h=null,l=null,n=null,p=null;e=la.execute.call(this,e);if(c)try{c=new RegExp(c,_$_f4f9[419]);if(e&&e.length){var q=
|
|
370
|
+
{};for(h=0;h<e.length;h++)q[e[h]]=!0}else q=null;for(h=0;h<this.rows.length;h++){p=!1;if(!q||q[h])for(g=0;g<this.options.columns.length;g++){l=_$_f4f9[3]+Q.call(this,g,h);if(l.match(c)){p=!0;break}n=_$_f4f9[3]+this.getLabelFromCoords(g,h);if(n.match(c)){p=!0;break}}1==p&&b.call(this,f,h)}}catch(v){}else f=e;if(f.length){for(h=0;h<this.rows.length;h++)!0===this.rows[h].results&&f.push(h);f.sort(function(v,w){return v-w})}return f};a.update=function(c){Aa.reset.call(this);this.resetSelection();this.resetBorders();
|
|
371
|
+
var e=a.execute.call(this,c);if(typeof this.parent.config.onbeforesearch==_$_f4f9[104]){var f=H.call(this.parent,_$_f4f9[439],this,c,e);if(f)e=f;else if(!1===f)return!1}this.pageNumber=0;e&&e.length<this.rows.length&&Aa[_$_f4f9[11]].call(this,e);ha.refresh.call(this);I.call(this,!0);H.call(this.parent,_$_f4f9[440],this,c,e);this.searchInput.parentNode.classList.remove(_$_f4f9[438])};a.refresh=function(){I.update.call(this);ha.refresh.call(this)};a.reset=function(){this.searchInput.value=_$_f4f9[3];
|
|
372
|
+
Aa.reset.call(this);I.update.call(this);ha.refresh.call(this)};a.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_f4f9[3]};a.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_f4f9[52]};a.build=function(){this.searchContainer=document.createElement(_$_f4f9[32]);this.searchContainer.classList.add(_$_f4f9[441]);this.searchContainer.appendChild(k(this));this.searchContainer.appendChild(d(this));0==this.options.search&&(this.searchContainer.style.display=
|
|
373
|
+
_$_f4f9[52]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return a}(),Ta=function(){var k=function(d){d.contextmenu=document.createElement(_$_f4f9[32]);d.contextmenu.className=_$_f4f9[442];jSuites.contextmenu(d.contextmenu,{onclick:function(b,a,c){b.close()}});return d.contextmenu};k.open=function(d,b){if(b[0]===_$_f4f9[443])var a=b[1],c=b[2];else b[0]===_$_f4f9[444]?(a=null,c=b[1]):b[0]===_$_f4f9[445]&&(a=b[1],c=null);var e=k[_$_f4f9[58]](this,a,c,d,b[0],b[1],b[2]);if(typeof this.parent.config.contextMenu==
|
|
374
|
+
_$_f4f9[104]){var f=this.parent.config.contextMenu(this,a,c,d,e,b[0],b[1],b[2]);if(f)e=f;else if(!1===f)return!1}d.preventDefault();f=va.execute.call(this.parent,_$_f4f9[105],[this,a,c,d,e,b[0],b[1],b[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(d,e)};k.isOpened=function(){return this.parent.contextmenu.contextmenu.isOpened()};k[_$_f4f9[58]]=function(d,b,a,c,e,f,g){var h=[],l=d.parent.config,n=-1!=navigator.userAgent.indexOf(_$_f4f9[446])?_$_f4f9[447]:_$_f4f9[448];e==_$_f4f9[449]&&(1==l.allowRenameWorksheet&&
|
|
375
|
+
h.push({title:E(_$_f4f9[450]),onclick:function(){var q=prompt(E(_$_f4f9[450]),c.target.innerText);q&&d.parent.renameWorksheet(f,q)}}),1==l.allowDeleteWorksheet&&h.push({title:E(_$_f4f9[451]),onclick:function(){confirm(E(_$_f4f9[452]),c.target.innerText)&&d.parent.deleteWorksheet(f)}}),h.push({type:_$_f4f9[453]}));e==_$_f4f9[454]&&(h.push({title:E(_$_f4f9[455]),onclick:function(){var q=prompt(E(_$_f4f9[455]),c.target.innerText);d.setNestedCell(f,g,{title:q})}}),h.push({type:_$_f4f9[453]}));if(e==_$_f4f9[445]||
|
|
376
|
+
e==_$_f4f9[444]||e==_$_f4f9[443]||e==_$_f4f9[454])h.push({title:E(_$_f4f9[456]),icon:_$_f4f9[457],shortcut:n+_$_f4f9[458],onclick:function(){d.cut()}}),h.push({title:E(_$_f4f9[459]),icon:_$_f4f9[460],shortcut:n+_$_f4f9[461],onclick:function(){d.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:E(_$_f4f9[462]),icon:_$_f4f9[463],shortcut:n+_$_f4f9[464],onclick:function(){d.selectedCell&&navigator.clipboard.readText().then(function(q){q&&d.paste(d.selectedCell[0],
|
|
377
|
+
d.selectedCell[1],q)})}}),h.push({type:_$_f4f9[453]});e==_$_f4f9[445]&&(1==d.options.allowInsertColumn&&h.push({title:E(_$_f4f9[465]),onclick:function(){d.insertColumn(1,parseInt(f),1)}}),1==d.options.allowInsertColumn&&h.push({title:E(_$_f4f9[466]),onclick:function(){d.insertColumn(1,parseInt(f),0)}}),1==d.options.allowDeleteColumn&&h.push({title:E(_$_f4f9[467]),onclick:function(){d.deleteColumn(d.getSelectedColumns().length?void 0:parseInt(b))}}),1==d.options.allowRenameColumn&&h.push({title:E(_$_f4f9[468]),
|
|
378
|
+
onclick:function(){d.setHeader(f)}}),d.options.data.length||(h.push({type:_$_f4f9[453]}),h.push({title:E(_$_f4f9[469]),onclick:function(){d.insertRow(0)}})),1==d.options.columnSorting&&(h.push({type:_$_f4f9[453]}),h.push({title:E(_$_f4f9[470]),onclick:function(){d.orderBy(f,0)}}),h.push({title:E(_$_f4f9[471]),onclick:function(){d.orderBy(f,1)}}),h.push({type:_$_f4f9[453]})));if(e==_$_f4f9[443]||e==_$_f4f9[444])1==d.options.allowInsertRow&&(h.push({title:E(_$_f4f9[472]),onclick:function(){d.insertRow(1,
|
|
379
|
+
parseInt(a),1)}}),h.push({title:E(_$_f4f9[473]),onclick:function(){d.insertRow(1,parseInt(a))}})),1==d.options.allowDeleteRow&&h.push({title:E(_$_f4f9[474]),onclick:function(){d.deleteRow(d.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_f4f9[453]});if(e==_$_f4f9[443]&&1==d.options.allowComments){var p=d.records[g][f].element.getAttribute(_$_f4f9[297])||_$_f4f9[3];h.push({title:p?E(_$_f4f9[475]):E(_$_f4f9[476]),icon:_$_f4f9[477],onclick:function(){var q=G.getColumnNameFromCoords(f,
|
|
380
|
+
g),v=prompt(E(_$_f4f9[478]),p);v&&d.setComments(q,v)}});p&&h.push({title:E(_$_f4f9[479]),onclick:function(){var q=G.getColumnNameFromCoords(f,g);d.setComments(q,_$_f4f9[3])}});h.push({type:_$_f4f9[453]})}l.allowExport&&h.push({title:E(_$_f4f9[480]),icon:_$_f4f9[481],shortcut:n+_$_f4f9[482],onclick:function(){d.download()}});l.about&&h.push({title:E(_$_f4f9[483]),icon:_$_f4f9[484],onclick:function(){!0===l.about?alert(M().print()):alert(l.about)}});return h};return k}(),ma=function(){var k=function(d){d.showToolbar=
|
|
381
|
+
function(){k.show.call(d.parent)};d.hideToolbar=function(){k.hide.call(d.parent)};d.refreshToolbar=function(){k.update.call(d.parent,d,d.selectedCell)}};k[_$_f4f9[11]]=function(d){this.toolbar.innerHTML=_$_f4f9[3];this.config.toolbar=k[_$_f4f9[58]].call(this,d);k.show.call(this)};k[_$_f4f9[58]]=function(d){d||(d=this.config.toolbar);var b=k.getDefault(d);d?Array.isArray(d)?d={items:d}:typeof d===_$_f4f9[104]&&(d=d({items:b})):d={};typeof d!==_$_f4f9[103]&&(d={});d.items||(d.items=b);typeof d.responsive==
|
|
382
|
+
_$_f4f9[21]&&(d.responsive=!0,d.bottom=!1,d.maxWidth=this.element.offsetWidth);return d};k.show=function(){this.toolbar.innerHTML||k.build.call(this);this.toolbar.style.display=_$_f4f9[3];this.element.classList.add(_$_f4f9[485])};k.hide=function(){this.toolbar.style.display=_$_f4f9[52];this.element.classList.remove(_$_f4f9[485])};k.update=function(d,b){var a=this.toolbarInstance;a&&(a.options.responsive&&(b=this.config.fullscreen?d.element.offsetWidth:d.options.tableWidth?parseInt(d.options.tableWidth):
|
|
383
|
+
null,a.options.maxWidth=b,a.refresh()),a.update(d))};k.build=function(){for(var d=k[_$_f4f9[58]].call(this),b=0;b<d.items.length;b++)if(d.items[b].type==_$_f4f9[432]){if(!d.items[b].options&&d.items[b].v){d.items[b].options=[];for(var a=0;a<d.items[b].v.length;a++)d.items[b].options.push(d.items[b].v[a]);d.items[b].k&&(d.items[b].onchange=function(c,e,f,g){u.current.setStyle(u.current.getSelected(!1,!0),f.k,g)})}}else d.items[b].type==_$_f4f9[288]?(d.items[b].type=_$_f4f9[486],d.items[b].onclick=
|
|
384
|
+
function(c,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(h,l){(g=u.current.getSelected(!1,!0))&&u.current.setStyle(g,f.k,l)},onopen:function(h){var l;u.current.cursor?(l=u.current.cursor.style[f.k])?h.color.select(h.color.toHex(l)):h.color.select(_$_f4f9[3]):h.color.select(_$_f4f9[3])}});f.color.open()}}):!d.items[b].onclick&&d.items[b].k&&(d.items[b].onclick=function(){var c=u.current.getSelected(!1,!0);c&&c.length&&u.current.setStyle(c,this.k,this.v)});(b=va.execute.call(this,
|
|
385
|
+
_$_f4f9[106],[d]))&&(d=b[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,d);this.toolbarInstance.application=this;d=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[d])};k.getDefault=function(d){var b=[];b.push({content:_$_f4f9[487],onclick:function(){u.current&&u.current.undo()}});b.push({content:_$_f4f9[488],onclick:function(){u.current&&u.current.redo()}});b.push({content:_$_f4f9[481],onclick:function(){u.current&&u.current.download()}});b.push({type:_$_f4f9[489]});
|
|
386
|
+
b.push({type:_$_f4f9[432],width:_$_f4f9[490],options:[_$_f4f9[491],_$_f4f9[492],_$_f4f9[493]],render:function(c){return _$_f4f9[494]+c+_$_f4f9[258]+c+_$_f4f9[495]},onchange:function(c,e,f,g){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_f4f9[496],g)}});b.push({type:_$_f4f9[432],width:_$_f4f9[497],content:_$_f4f9[498],options:[_$_f4f9[499],_$_f4f9[500],_$_f4f9[501],_$_f4f9[502],_$_f4f9[503]],render:function(c){return _$_f4f9[504]+c+_$_f4f9[258]+c+_$_f4f9[495]},onchange:function(c,e,
|
|
387
|
+
f,g){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_f4f9[505],g)}});b.push({type:_$_f4f9[432],options:[_$_f4f9[506],_$_f4f9[507],_$_f4f9[508],_$_f4f9[509]],render:function(c){return _$_f4f9[510]+c+_$_f4f9[511]},onchange:function(c,e,f,g){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_f4f9[512],g.split(_$_f4f9[513])[2])},updateState:function(c,e,f,g){(c=g.selectedCell)&&c.length&&g.records[c[1]][c[0]].element&&(g=this.picker.options.data.indexOf(_$_f4f9[514]+(g.records[c[1]][c[0]].element.style.textAlign||
|
|
388
|
+
g.options.defaultColAlign||_$_f4f9[210])),f.picker.setValue(g))}});b.push({type:_$_f4f9[486],content:_$_f4f9[515],k:_$_f4f9[516],v:_$_f4f9[517]});b.push({type:_$_f4f9[288],content:_$_f4f9[518],k:_$_f4f9[288]});b.push({type:_$_f4f9[288],content:_$_f4f9[519],k:_$_f4f9[520]});if(d===_$_f4f9[521]||typeof d===_$_f4f9[104]){var a=[_$_f4f9[522],_$_f4f9[523],_$_f4f9[398]];b.push({type:_$_f4f9[432],options:[_$_f4f9[524],_$_f4f9[525],_$_f4f9[526]],render:function(c){return _$_f4f9[510]+c+_$_f4f9[511]},value:1,
|
|
389
|
+
onchange:function(c,e,f,g,h){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_f4f9[527],a[h])},updateState:function(c,e,f,g){(c=g.selectedCell)&&c.length&&g.records[c[1]][c[0]].element&&(g=a.indexOf(g.records[c[1]][c[0]].element.style.verticalAlign||_$_f4f9[523]),f.picker.setValue(g))}});b.push({content:_$_f4f9[528],onclick:function(c,e,f){u.current&&(c=u.current.getHighlighted())&&c.length&&(e=u.helpers.getColumnNameFromCoords(c[0],c[1]),u.current.records[c[1]][c[0]].merged?u.current.removeMerge(e):
|
|
390
|
+
u.current.setMerge(e,c[2]-c[0]+1,c[3]-c[1]+1))},tooltip:E(_$_f4f9[529])})}b.push({type:_$_f4f9[432],data:[_$_f4f9[530],_$_f4f9[531],_$_f4f9[532],_$_f4f9[533],_$_f4f9[534],_$_f4f9[535],_$_f4f9[536],_$_f4f9[537],_$_f4f9[538],_$_f4f9[539]],columns:5,render:function(c){return _$_f4f9[510]+c+_$_f4f9[511]},right:!0,onchange:function(c,e,f,g,h){if(c=u.current.getHighlighted()){f=e.thickness||1;e=e.color||_$_f4f9[540];h={};for(var l=c[0],n=c[1],p=c[2],q=c[3],v=c[1];v<=c[3];v++)for(var w=c[0];w<=c[2];w++){var x=
|
|
391
|
+
G.getColumnNameFromCoords(w,v);h[x]||(h[x]=_$_f4f9[3]);h[x]=g!=_$_f4f9[535]&&g!=_$_f4f9[531]||w!=l?(g==_$_f4f9[532]||g==_$_f4f9[534])&&w>l?h[x]+(_$_f4f9[541]+f+_$_f4f9[542]+e+_$_f4f9[332]):g==_$_f4f9[530]?h[x]+(_$_f4f9[541]+f+_$_f4f9[542]+e+_$_f4f9[332]):h[x]+_$_f4f9[543]:h[x]+(_$_f4f9[541]+f+_$_f4f9[542]+e+_$_f4f9[332]);h[x]=g!=_$_f4f9[530]&&g!=_$_f4f9[537]&&g!=_$_f4f9[531]||w!=p?h[x]+_$_f4f9[545]:h[x]+(_$_f4f9[544]+f+_$_f4f9[542]+e+_$_f4f9[332]);h[x]=g!=_$_f4f9[536]&&g!=_$_f4f9[531]||v!=n?(g==_$_f4f9[532]||
|
|
392
|
+
g==_$_f4f9[533])&&v>n?h[x]+(_$_f4f9[546]+f+_$_f4f9[542]+e+_$_f4f9[332]):g==_$_f4f9[530]?h[x]+(_$_f4f9[546]+f+_$_f4f9[542]+e+_$_f4f9[332]):h[x]+_$_f4f9[547]:h[x]+(_$_f4f9[546]+f+_$_f4f9[542]+e+_$_f4f9[332]);h[x]=g!=_$_f4f9[530]&&g!=_$_f4f9[538]&&g!=_$_f4f9[531]||v!=q?h[x]+_$_f4f9[549]:h[x]+(_$_f4f9[548]+f+_$_f4f9[542]+e+_$_f4f9[332])}Object.keys(h)&&u.current.setStyle(h,null,null,!0)}},onload:function(c,e){var f=document.createElement(_$_f4f9[32]),g=document.createElement(_$_f4f9[32]);f.appendChild(g);
|
|
393
|
+
var h=jSuites.color(g,{closeOnChange:!1,onchange:function(l,n){l.parentNode.children[1].style.color=n;e.color=n}});g=document.createElement(_$_f4f9[486]);g.classList.add(_$_f4f9[550]);g.innerHTML=_$_f4f9[551];g.onclick=function(){h.open()};f.appendChild(g);c.children[1].appendChild(f);g=document.createElement(_$_f4f9[32]);jSuites.picker(g,{type:_$_f4f9[432],data:[1,2,3,4,5],render:function(l){return _$_f4f9[552]+l+_$_f4f9[553]},onchange:function(l,n,p,q){e.thickness=q},width:_$_f4f9[554]});c.children[1].appendChild(g);
|
|
394
|
+
g=document.createElement(_$_f4f9[32]);g.style.flex=_$_f4f9[555];c.children[1].appendChild(g)}});b.push({type:_$_f4f9[489]});b.push({content:_$_f4f9[23],onclick:function(c,e,f){f.children[0].innerText==_$_f4f9[23]?(u.current.fullscreen(!0),f.children[0].innerText=_$_f4f9[556]):(u.current.fullscreen(!1),f.children[0].innerText=_$_f4f9[23])},tooltip:_$_f4f9[557],updateState:function(c,e,f,g){f.children[0].innerText=1==g.parent.config.fullscreen?_$_f4f9[556]:_$_f4f9[23]}});b.push({content:_$_f4f9[558],
|
|
395
|
+
onclick:function(c,e,f){u.current&&u.current.parent.tools.search?u.current.parent.tools.search.open(!0):f.children[0].innerText==_$_f4f9[558]?(wa.show.call(u.current),f.children[0].innerText=_$_f4f9[559]):(wa.hide.call(u.current),f.children[0].innerText=_$_f4f9[558])},tooltip:_$_f4f9[560],updateState:function(c,e,f,g){f.children[0].innerText=1==g.options.search?_$_f4f9[559]:_$_f4f9[558]}});return b};return k}(),pa=function(){var k=function(d){d.createWorksheet=function(b){return d.parent.createWorksheet(b)};
|
|
396
|
+
d.deleteWorksheet=function(b){return d.parent.deleteWorksheet(b)};d.renameWorksheet=function(b,a){return d.parent.renameWorksheet(b,a)};d.moveWorksheet=function(b,a){return d.parent.moveWorksheet(b,a)};d.openWorksheet=function(){return d.parent.openWorksheet(d.parent.getWorksheet(d))};d.getWorksheet=function(b){return d.parent.getWorksheet(b)};d.getWorksheetActive=function(){return d.parent.getWorksheetActive()};d.getWorksheetName=function(){return d.options.worksheetName.toUpperCase()}};k.nextName=
|
|
397
|
+
function(){var d=1,b,a=u.spreadsheet;if(a.length)for(var c=0;c<a.length;c++){var e=a[c].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>d&&(d=b))}return d};k.createWorksheet=function(d){if(!R.call(this))return!1;d||(d={});var b=this.worksheets.length,a=H.call(this,_$_f4f9[561],d,b);if(typeof a===_$_f4f9[103])d=a;else if(!1===a)return!1;d.data||d.minDimensions||(d.minDimensions=[8,8]);d.worksheetId||
|
|
398
|
+
(d.worksheetId=jSuites.guid().substring(0,8));d.worksheetName||(d.worksheetName=_$_f4f9[400]+k.nextName());if(J(d.worksheetName))jSuites.notification({error:_$_f4f9[555],message:_$_f4f9[562]});else return a=ta.worksheet(this,d),a.onload(),u.current&&u.current.resetSelection(),u.current=a,L.call(a,_$_f4f9[563],[d]),ma.update.call(this,u.current),H.call(this,_$_f4f9[564],a,d,b),a};k.deleteWorksheet=function(d){var b=this.worksheets[d];if(!R.call(this,b))return!1;J(b.options.worksheetName,null);this.element.tabs.deleteElement(d);
|
|
399
|
+
this.worksheets.splice(d,1);L.call(b,_$_f4f9[565],[d]);H.call(this,_$_f4f9[566],b,d)};k.renameWorksheet=function(d,b){var a=this.worksheets[d];if(!R.call(this,a))return!1;var c=a.options.worksheetName;if(c.toLowerCase()==b.toLowerCase())return!1;b=b.replace(/[^0-9A-Za-z_\s^]+/gi,_$_f4f9[3]);Number(b)==b&&(b=_$_f4f9[400]+Number(b));J(b)?alert(_$_f4f9[567]):(J(c,null),this.element.tabs.rename(d,b),a.options.worksheetName=b,J(b,a),T.call(this,{worksheet:a,action:_$_f4f9[98],index:d,oldValue:c,newValue:b}),
|
|
400
|
+
L.call(a,_$_f4f9[98],{worksheet:d,newValue:b}),Ja.updateWorksheetName.call(a,c,b),Y.updateWorksheetNames.call(a,c,b),H.call(this,_$_f4f9[568],a,d,b,c))};k.updateWorksheet=function(d,b){var a=this.worksheets;if(!R.call(this))return!1;this.worksheets.splice(b,0,a.splice(d,1)[0]);T.call(this,{worksheet:a[b],action:_$_f4f9[99],f:d,t:b});L.call(a[b],_$_f4f9[99],{f:d,t:b});H.call(this,_$_f4f9[569],a[b],d,b)};k.moveWorksheet=function(d,b){this.element.tabs.move(d,b)};k.openWorksheet=function(d){var b=this.worksheets[d];
|
|
401
|
+
!b||u.current&&u.current==b||(this.element.tabs.getActive()!=d?this.element.tabs.open(d):this.element.tabs.setBorder(d),u.current&&u.current.resetSelection(),u.current=b,u.current.refreshBorders(),k.state.call(this,d),ma.update.call(this,u.current),H.call(this,_$_f4f9[570],b,d))};k.getWorksheet=function(d){if(d&&typeof d==_$_f4f9[103]){if(d=this.worksheets.indexOf(d),0<=d)return d}else for(var b=0;b<this.worksheets.length;b++)if(d===this.worksheets[b].options.worksheetId)return b;return!1};k.getWorksheetActive=
|
|
402
|
+
function(){return this.element.tabs.getActive()};k.getWorksheetInstance=function(d){return d===_$_f4f9[3]||typeof d==_$_f4f9[25]?(d=k.getWorksheet.call(this,d),!1===d?!1:this.worksheets[d]):this.worksheets[d]};k.state=function(d){try{if(typeof localStorage!==_$_f4f9[21]){var b=this.config.cloud?this.config.cloud:this.element.id;if(b)if(typeof d!==_$_f4f9[21])localStorage.setItem(_$_f4f9[377]+b,d);else{var a=parseInt(localStorage.getItem(_$_f4f9[377]+b));k.openWorksheet.call(this,a)}}}catch(c){}};
|
|
403
|
+
return k}(),G=function(){var k={getCaretIndex:function(d){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(d),a.setEnd(b.endContainer,b.endOffset),b=a.toString().length);return b},invert:function(d){for(var b=[],a=Object.keys(d),c=0;c<a.length;c++)b[d[a[c]]]=a[c];return b},getColumnName:function(d){var b=_$_f4f9[3];701<d?(b+=String.fromCharCode(64+parseInt(d/676)),b+=String.fromCharCode(64+parseInt(d%
|
|
404
|
+
676/26))):25<d&&(b+=String.fromCharCode(64+parseInt(d/26)));return b+=String.fromCharCode(65+d%26)},getColumnNameFromCoords:function(d,b){return k.getColumnName(parseInt(d))+(parseInt(b)+1)},getCoordsFromColumnName:function(d){if(!d)return[];d=(_$_f4f9[3]+d).replace(new RegExp(/\$/),_$_f4f9[3]);var b=/^[a-zA-Z]+/.exec(d);if(b){for(var a=0,c=0;c<b[0].length;c++)a+=parseInt(b[0].charCodeAt(c)-64)*Math.pow(26,b[0].length-1-c);a--;0>a&&(a=0);d=parseInt(/[0-9]+$/.exec(d))||null;0<d&&d--;return[a,d]}}};
|
|
405
|
+
k.shiftFormula=Y.shiftFormula;k.updateWorksheetName=Y.updateWorksheetName;k.createFromTable=function(d,b){if(d.tagName!=_$_f4f9[571])console.log(_$_f4f9[572]);else{b||(b={});b.columns=[];b.data=[];var a=d.querySelectorAll(_$_f4f9[573]);if(a.length)for(var c=0;c<a.length;c++){var e=a[c].style.width;e||(e=a[c].getAttribute(_$_f4f9[178]));e&&(b.columns[c]||(b.columns[c]={}),b.columns[c].width=e)}e=function(B){var z=B.getBoundingClientRect();z=50<z.width?z.width:50;b.columns[c]||(b.columns[c]={});B.getAttribute(_$_f4f9[574])?
|
|
406
|
+
b.columns[c].type=B.getAttribute(_$_f4f9[574]):b.columns[c].type=_$_f4f9[71];b.columns[c].width=z+_$_f4f9[59];b.columns[c].title=B.innerHTML;B.style.textAlign&&(b.columns[c].align=B.style.textAlign);B.classList.contains(_$_f4f9[575])&&(b.columns[c].readOnly=!0);if(z=B.getAttribute(_$_f4f9[576]))b.columns[c].name=z;if(z=B.getAttribute(_$_f4f9[577]))b.columns[c].id=z};var f=[],g=d.querySelectorAll(_$_f4f9[578]);if(g.length){for(a=0;a<g.length-1;a++){var h=[];for(c=0;c<g[a].children.length;c++){var l=
|
|
407
|
+
{title:g[a].children[c].innerText,colspan:g[a].children[c].getAttribute(_$_f4f9[190])||1};h.push(l)}f.push(h)}g=g[g.length-1].children;for(c=0;c<g.length;c++)e(g[c])}l=0;var n={},p={},q={},v={},w=null;h=d.querySelectorAll(_$_f4f9[579]);for(a=0;a<h.length;a++)if(b.data[l]=[],1!=b.parseTableFirstRowAsHeader||g.length||0!=a){for(c=0;c<h[a].children.length;c++){var x=h[a].children[c].getAttribute(_$_f4f9[580]);x?x.substr(0,1)!=_$_f4f9[18]&&(x=_$_f4f9[18]+x):x=h[a].children[c].innerHTML;b.data[l].push(x);
|
|
408
|
+
x=G.getColumnNameFromCoords(c,a);(w=h[a].children[c].getAttribute(_$_f4f9[581]))&&(v[x]=w);w=parseInt(h[a].children[c].getAttribute(_$_f4f9[190]))||0;var y=parseInt(h[a].children[c].getAttribute(_$_f4f9[191]))||0;if(w||y)n[x]=[w||1,y||1];if(w=h[a].children[c].style&&h[a].children[c].style.display==_$_f4f9[52])h[a].children[c].style.display=_$_f4f9[3];(w=h[a].children[c].getAttribute(_$_f4f9[120]))&&(q[x]=w);h[a].children[c].classList.contains(_$_f4f9[582])&&(q[x]=q[x]?q[x]+_$_f4f9[583]:_$_f4f9[584])}h[a].style&&
|
|
409
|
+
h[a].style.height&&(p[a]={height:h[a].style.height});l++}else for(c=0;c<h[a].children.length;c++)e(h[a].children[c]);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(v).length&&(b.classes=v);h=d.querySelectorAll(_$_f4f9[585]);if(h.length){d=[];for(a=0;a<h.length;a++){e=[];for(c=0;c<h[a].children.length;c++)e.push(h[a].children[c].innerText);d.push(e)}0<Object.keys(d).length&&
|
|
410
|
+
(b.footers=d)}if(1==b.parseTableAutoCellType)for(d=[],c=0;c<b.columns.length;c++){f=e=!0;d[c]=[];for(a=0;a<b.data.length;a++)if(x=b.data[a][c],d[c][x]||(d[c][x]=0),d[c][x]++,25<x.length&&(e=!1),10==x.length){if(x.substr(4,1)!=_$_f4f9[237]||x.substr(7,1)!=_$_f4f9[237])f=!1}else f=!1;a=Object.keys(d[c]).length;f?b.columns[c].type=_$_f4f9[214]:1==e&&1<a&&a<=parseInt(.1*b.data.length)&&(b.columns[c].type=_$_f4f9[73],b.columns[c].source=Object.keys(d[c]))}return b}};k.injectArray=function(d,b,a){return d.slice(0,
|
|
411
|
+
b).concat(a).concat(d.slice(b))};k.parseCSV=function(d,b){b=b||_$_f4f9[37];for(var a=0,c=0,e=[[]],f=0,g=null,h=!1,l=!1,n=0;n<d.length;n++)if(e[c]||(e[c]=[]),e[c][a]||(e[c][a]=_$_f4f9[3]),d[n]!=_$_f4f9[586])if(d[n]!=_$_f4f9[587]&&d[n]!=b||0!=h&&1!=l&&g){d[n]==_$_f4f9[20]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&d[n]==_$_f4f9[20]){d[n+1]==_$_f4f9[20]?(h=!0,e[c][a]+=d[n],n++):l=!0;continue}e[c][a]+=d[n]}else{g=null;l=h=!1;if(e[c][a][0]==_$_f4f9[20]){var p=e[c][a].trim();p[p.length-
|
|
412
|
+
1]==_$_f4f9[20]&&(e[c][a]=p.substr(1,p.length-2))}d[n]==_$_f4f9[587]?(a=0,c++):(a++,a>f&&(f=a))}for(d=0;d<e.length;d++)for(n=0;n<=f;n++)void 0===e[d][n]&&(e[d][n]=_$_f4f9[3]);return e};k.getTokensFromRange=Y.getTokensFromRange;k.getRangeFromTokens=Y.getRangeFromTokens;k.getCoordsFromRange=function(d){-1!==d.indexOf(_$_f4f9[19])&&(d=d.split(_$_f4f9[19]),d=d[1]);d=d.split(_$_f4f9[157]);d[1]||(d[1]=d[0]);var b=G.getCoordsFromColumnName(d[0]);d=G.getCoordsFromColumnName(d[1]);return[b[0],b[1],d[0],d[1]]};
|
|
413
|
+
return k}(),Fa=function(){var k={},d=null,b=null,a=null,c=null,e=!1,f=null,g=null,h=null,l=function(r){function A(P){P.className&&(P.classList.contains(_$_f4f9[391])&&(K=P),P.classList.contains(_$_f4f9[403])&&(N=P),P.classList.contains(_$_f4f9[588])&&(V=P));P.parentNode&&P.parentNode.classList&&P.parentNode.classList.contains(_$_f4f9[372])&&(P.tagName==_$_f4f9[589]?C=1:P.tagName==_$_f4f9[590]?C=2:P.tagName==_$_f4f9[591]&&(C=3));P.parentNode&&!K&&A(P.parentNode)}var C=null,D=null,K=null,N=null,V=null,
|
|
414
|
+
O=null,U=null,aa=null;A(r.target);if(null!==V)return!1;if(K)if(r.target.classList.contains(_$_f4f9[370]))D=_$_f4f9[592];else if(r.target.classList.contains(_$_f4f9[380]))D=_$_f4f9[159];else if(r.target.classList.contains(_$_f4f9[303]))D=_$_f4f9[444],O=parseInt(r.target.getAttribute(_$_f4f9[57]));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_f4f9[206]))O=r.target.getAttribute(_$_f4f9[211]),U=r.target.getAttribute(_$_f4f9[212]),null===O?D=_$_f4f9[592]:
|
|
415
|
+
(D=_$_f4f9[454],O=parseInt(O),U=parseInt(U));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_f4f9[172]))D=_$_f4f9[593];else if(r.target.classList.contains(_$_f4f9[176]))D=_$_f4f9[593];else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_f4f9[594]))D=_$_f4f9[449],O=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==C)D=_$_f4f9[445],O=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_f4f9[198])&&
|
|
416
|
+
3<O&&20>O&&(D=_$_f4f9[595]),O=r.target.getAttribute(_$_f4f9[56]);else if(2==C){if(r=n(r,K))D=_$_f4f9[443],O=r[0],U=r[1],aa=r[2]}else if(3==C){if(O=r.target.getAttribute(_$_f4f9[56]),U=r.target.getAttribute(_$_f4f9[57]),O||U)D=_$_f4f9[596]}else C||jSuites.findElement(r.target,_$_f4f9[597])&&(D=_$_f4f9[106]);return[K,N,C,D,O,U,aa]},n=function(r,A){if(r.changedTouches&&r.changedTouches[0]){var C=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else C=r.clientX,r=r.clientY;A=A.spreadsheet.config.root?
|
|
417
|
+
A.spreadsheet.config.root:document;if(A.elementsFromPoint)var D=A.elementsFromPoint(C,r);else A.msElementsFromPoint&&(D=A.msElementsFromPoint(C,r));for(A=0;A<D.length;A++)if(C=D[A].getAttribute(_$_f4f9[56]),r=D[A].getAttribute(_$_f4f9[57]),null!=C&&null!=r)return C=parseInt(C),r=parseInt(r),[C,r,D[A]];return!1},p=function(r){var A=l(r);if(!1===A)return!1;A[0]?A[1]?u.current&&document.activeElement.classList.contains(_$_f4f9[114])?document.activeElement.worksheet||(document.activeElement.worksheet=
|
|
418
|
+
A[1].jexcel):u.current!=A[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=A[1].jexcel):u.current||(r=A[0].tabs.getActive(),0<=r&&(u.current=A[0].spreadsheet.worksheets[r])):u.current&&!jSuites.findElement(r.target,_$_f4f9[252])&&(u.current.resetSelection(!0),u.current=null);return A};k.input=function(r){if(r.target.tagName==_$_f4f9[598]&&r.target.classList.contains(_$_f4f9[114])){var A=null;r.target.worksheet?A=r.target.worksheet:u.current&&(A=u.current);A&&ra.parse.call(A,r.target)}};
|
|
419
|
+
k.keydown=function(r){if(u.current){r.target.tagName==_$_f4f9[598]&&r.target.classList.contains(_$_f4f9[114])&&ra.onkeydown.call(u.current,r);if(27==r.which){if(u.current.edition){u.current.closeEditor(u.current.edition,!1);r.preventDefault();return}if(xa.event){xa.cancel.call(u.current,r);r.preventDefault();return}if(ea.event){ea.cancel.call(u.current,r);return}if(1==la.isVisible()){la.close.call(u.current,!1);r.preventDefault();return}}if(r.target.classList.contains(_$_f4f9[423])){var A=r.target;
|
|
420
|
+
f&&clearTimeout(f);f=setTimeout(function(){la.search.call(u.current,A.value);f=null},500)}else if(r.target.classList.contains(_$_f4f9[437]))A=r.target,f&&clearTimeout(f),f=setTimeout(function(){u.current.search(A.value);f=null},400);else if(!r.target.classList.contains(_$_f4f9[252]))if(u.current.edition){var C=u.current.edition.getAttribute(_$_f4f9[56]);13==r.which?u.current.options.columns[C].type==_$_f4f9[214]?u.current.closeEditor(u.current.edition,!0):u.current.options.columns[C].type!=_$_f4f9[73]&&
|
|
421
|
+
u.current.options.columns[C].type!=_$_f4f9[599]&&u.current.options.columns[C].type!=_$_f4f9[477]&&(r.altKey?u.current.parent.input.classList.contains(_$_f4f9[600])||document.execCommand(_$_f4f9[601],!1,_$_f4f9[602]):(u.current.closeEditor(u.current.edition,!0),u.current.parent.config.moveDownOnEnter&&u.current.down(),r.preventDefault())):9==r.which?(u.current.closeEditor(u.current.edition,!0),u.current.right(),r.preventDefault()):39!=r.which&&37!=r.which&&38!=r.which&&40!=r.which||u.current.parent.input.selected||
|
|
422
|
+
(u.current.closeEditor(u.current.edition,!0),37==r.which?u.current.left(r.shiftKey,r.ctrlKey):39==r.which?u.current.right(r.shiftKey,r.ctrlKey):38==r.which?u.current.up(r.shiftKey,r.ctrlKey):40==r.which&&u.current.down(r.shiftKey,r.ctrlKey),r.preventDefault())}else{if((r.ctrlKey||r.metaKey)&&!r.shiftKey){if(65==r.which){u.current.selectAll();r.preventDefault();return}if(83==r.which){u.current.download();r.preventDefault();return}if(89==r.which){u.current.parent.redo();r.preventDefault();return}if(90==
|
|
423
|
+
r.which){u.current.parent.undo();r.preventDefault();return}if(70==r.which&&u.current.parent.tools.search){u.current.parent.tools.search.open(!0);r.preventDefault();return}}if(u.current.selectedCell)if(33==r.which)0<u.current.options.pagination?Da.pageUp.call(u.current):r.altKey?I.pageLeft.call(u.current):I.pageUp.call(u.current);else if(34==r.which)0<u.current.options.pagination?Da.pageDown.call(u.current):r.altKey?I.pageRight.call(u.current):I.pageDown.call(u.current);else if(37==r.which)u.current.left(r.shiftKey,
|
|
424
|
+
r.ctrlKey),r.preventDefault();else if(39==r.which)u.current.right(r.shiftKey,r.ctrlKey),r.preventDefault();else if(38==r.which)u.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)u.current.down(r.shiftKey,r.ctrlKey),r.preventDefault();else if(36==r.which)u.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)u.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)u.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||
|
|
425
|
+
8==r.which)u.current.isEditable()&&u.current.setValue(u.current.getSelected(!1,!0),_$_f4f9[3]);else if(13==r.which)r.shiftKey?u.current.up():(1==u.current.options.allowManualInsertRow&&u.current.selectedCell[1]==(u.current.results?u.current.results[u.current.results.length-1]:u.current.rows.length-1)&&u.current.insertRow(null,null,null,null,r),u.current.selectedCell&&u.current.down()),r.preventDefault();else if(9==r.which)r.shiftKey?u.current.left():(C=u.current.selectedCell[0],u.current.right(),
|
|
426
|
+
1==u.current.options.allowInsertColumn&&1==u.current.options.allowManualInsertColumn&&u.current.selectedCell[0]==C&&(u.current.insertColumn(null,null,null,null,null,null,r),u.current.right())),r.preventDefault();else if((r.ctrlKey||r.metaKey)&&!r.shiftKey)67==r.which?(u.current.copy(),r.preventDefault()):88==r.which?(u.current.cut(),r.preventDefault()):86==r.which?r.target.classList.contains(_$_f4f9[252])||k.paste(r):189==r.which&&(1==u.current.options.allowDeleteRow&&h[3]==_$_f4f9[444]?(ka.isValid.call(u.current,
|
|
427
|
+
u.current.selectedCell)&&u.current.deleteRow(),r.preventDefault()):1==u.current.options.allowDeleteColumn&&h[3]==_$_f4f9[445]&&(ka.isValid.call(u.current,u.current.selectedCell)&&u.current.deleteColumn(),r.preventDefault()));else if(u.current.isEditable()){C=u.current.selectedCell[1];var D=u.current.selectedCell[0];u.current.options.columns[D].type!=_$_f4f9[26]&&(32==r.keyCode?u.current.options.columns[D].type==_$_f4f9[283]||u.current.options.columns[D].type==_$_f4f9[285]?r.preventDefault():u.current.openEditor(u.current.records[C][D].element,
|
|
428
|
+
!0,r):113==r.keyCode?u.current.openEditor(u.current.records[C][D].element,!1,r):1!=r.key.length&&r.key!=_$_f4f9[603]||r.altKey||r.ctrlKey||u.current.records[C]&&u.current.openEditor(u.current.records[C][D].element,!0,r))}}}};var q=[0,0],v=function(r){e&&I.limited.call(u.current)&&(g&&(clearTimeout(g),g=null),g=setTimeout(function(){if(e){var A=q[0],C=q[1],D=u.current.content.getBoundingClientRect();50>D.height-(C-D.top)?I.down.call(u.current):80>C-D.top&&I.up.call(u.current);50>D.width-(A-D.left)?
|
|
429
|
+
I.right.call(u.current):80>A-D.left&&I.left.call(u.current);v(r)}g=null},100))},w=function(r,A,C,D,K,N,V){if(document.activeElement.classList.contains(_$_f4f9[114])&&ra.update.call(u.current,r,A,C,D,K,document.activeElement,V))return!1;if(u.current.edition)u.current.closeEditor(u.current.edition,!0);else if(c&&c!==N)return!1;u.current!==V&&(u.current.resetSelection(),u.current=V);ra.current?ra.range.call(u.current,r,A,C,D,K):ka[_$_f4f9[11]].call(u.current,r,A,C,D,K)};k.mousedown=function(r){r=r||
|
|
430
|
+
window.event;var A=r.buttons?r.buttons:r.button?r.button:r.which;if(u.current)if(1==la.isVisible()&&(jSuites.findElement(r.target,_$_f4f9[427])||la.close.call(u.current,!1)),u.current.edition){if(jSuites.findElement(r.target,_$_f4f9[121]))return!1}else if(jSuites.findElement(r.target,_$_f4f9[252]))return!1;var C=p(r);if(!1===C)return!1;h=C;if(1<A)if(C[3]==_$_f4f9[443]){if(u.current.isSelected(C[4],C[5]))return!1}else if(C[3]==_$_f4f9[444]){if(u.current.isSelected(0,C[4]))return!1}else if(C[3]==_$_f4f9[445]&&
|
|
431
|
+
u.current.isSelected(C[4],0))return!1;if(u.current){if(C[3]==_$_f4f9[159])u.current.isEditable()&&(ea.event=!0);else if(C[3]==_$_f4f9[595])la.open.call(u.current,C[4]);else{if(1==C[2])if(d)d.style.cursor==_$_f4f9[604]?xa.start.call(u.current,r):d.style.cursor==_$_f4f9[605]?Ca.start.call(u.current,r):d.style.cursor==_$_f4f9[606]&&(!0===d.column?ca.start.call(u.current,r,0):!1===d.column?ja.start.call(u.current,r,0):ca.start.call(u.current,r,parseInt(C[4])+1));else{A=u.current.options.columns.length-
|
|
432
|
+
1;var D=u.current.options.data.length-1;if(C[3]==_$_f4f9[592])w(0,0,A,D,r,C[3],C[1].jexcel),a=b=0;else if(C[3]==_$_f4f9[454]){var K=za.range.call(u.current,C[5])[C[4]];K[1]>A&&(K[1]=A);w(K[0],0,K[1],D,r,C[3],C[1].jexcel);b=K[0];a=0}else C[4]&&((r.shiftKey||r.ctrlKey)&&null!=b&&null!=a?w(b,0,C[4],D,r,C[3],C[1].jexcel):(C[3]==_$_f4f9[445]&&b==C[4]&&1==u.current.options.allowRenameColumn&&(g=setTimeout(function(){u.current.setHeader(C[4])},800)),w(C[4],0,C[4],D,r,C[3],C[1].jexcel),b=C[4],a=0))}if(2==
|
|
433
|
+
C[2])if(C[3]==_$_f4f9[444])d?d.style.cursor==_$_f4f9[604]?xa.start.call(u.current,r):d.style.cursor==_$_f4f9[607]?Ca.start.call(u.current,r):d.style.cursor==_$_f4f9[606]&&ja.start.call(u.current,r,parseInt(C[4])+1):(A=u.current.options.columns.length-1,D=parseInt(C[4]),(r.shiftKey||r.ctrlKey)&&null!=b&&null!=a?w(0,a,A,D,r,C[3],C[1].jexcel):(w(0,D,A,D,r,C[3],C[1].jexcel),b=0,a=D));else if(C[3]==_$_f4f9[443]){A=parseInt(C[4]);D=parseInt(C[5]);if(!u.current.edition&&(K=u.current.options.columns[C[4]].type,
|
|
434
|
+
r.target.tagName==_$_f4f9[608]&&(K==_$_f4f9[286]||K==_$_f4f9[287])&&r.target.parentNode.classList.contains(_$_f4f9[147]))){var N=r.target.innerText;K==_$_f4f9[286]&&(N=_$_f4f9[609]+N);window.open(N,_$_f4f9[610])}(r.shiftKey||r.ctrlKey)&&u.current.selectedCell?w(u.current.selectedCell[0],u.current.selectedCell[1],A,D,r,C[3],C[1].jexcel):(w(A,D,A,D,r,C[3],C[1].jexcel),b=A,a=D)}}c=C[3];typeof C[3]!==_$_f4f9[21]&&H.call(u.current.parent,_$_f4f9[611],u.current,C[3],C[4],C[5],r);e=!0;C[3]!==_$_f4f9[443]&&
|
|
435
|
+
C[3]!==_$_f4f9[159]||v(r)}else e=!1};k.mouseup=function(r){u.current&&(xa.event?xa.end.call(u.current,r):Ca.event?Ca.end.call(u.current,r):ca.event?ca.end.call(u.current,r):ja.event?ja.end.call(u.current,r):ea.event?ea.end.call(u.current,r):r.target.classList.contains(_$_f4f9[426])?la.close.call(u.current,!0):u.current.edition&&r.target.classList.contains(_$_f4f9[612])&&50>r.target.clientWidth-r.offsetX&&50>r.offsetY?na.close.call(u.current,null,!0):r.target.classList.contains(_$_f4f9[355])&&(r=r.target.innerText==
|
|
436
|
+
_$_f4f9[15]?0:r.target.innerText==_$_f4f9[17]?r.target.getAttribute(_$_f4f9[297])-1:r.target.innerText-1,Da[_$_f4f9[11]].call(u.current,parseInt(r))));g&&(clearTimeout(g),g=null);e=c=!1;ra.current&&ra.close.call(u.current)};k.mousemove=function(r){r=r||window.event;if(r.changedTouches&&r.changedTouches[0]){var A=r.changedTouches[0].clientX;var C=r.changedTouches[0].clientY}else A=r.clientX,C=r.clientY;q=[A,C];if(u.current)if(A=r.target.getAttribute(_$_f4f9[56]),C=r.target.getAttribute(_$_f4f9[57]),
|
|
437
|
+
1==e)xa.event?xa.update.call(u.current,r):Ca.event?Ca.update.call(u.current,r):ca.event?ca.move.call(u.current,r):ja.event?ja.move.call(u.current,r):u.current.options.tableOverflow&&(r=u.current.content,(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&u.current.setViewport(r.offsetWidth,r.offsetHeight),r.w=r.offsetWidth,r.h=r.offsetHeight);else{var D=r.target.getBoundingClientRect();d&&(d.style.cursor=_$_f4f9[3],d=null);1==u.current.options.editable&&r.target&&(r.target.classList.contains(_$_f4f9[370])?
|
|
438
|
+
u.current.options.freezeRowControl&&!u.current.options.freezeRows&&5>D.height-(r.clientY-D.top)?(d=r.target,d.style.cursor=_$_f4f9[606],d.column=!1):u.current.options.freezeColumnControl&&!u.current.options.freezeColumns&&5>D.width-(r.clientX-D.left)&&(d=r.target,d.style.cursor=_$_f4f9[606],d.column=!0):r.target.classList.contains(_$_f4f9[303])?u.current.options.freezeRowControl&&u.current.options.freezeRows==parseInt(C)+1&&5>D.height-(r.clientY-D.top)?(d=r.target,d.style.cursor=_$_f4f9[606]):6>D.width-
|
|
439
|
+
(r.clientX-D.left)?(d=r.target,d.style.cursor=_$_f4f9[604]):6>D.height-(r.clientY-D.top)&&(d=r.target,d.style.cursor=_$_f4f9[607]):r.target.classList.contains(_$_f4f9[195])&&(u.current.options.freezeColumnControl&&u.current.options.freezeColumns==parseInt(A)+1&&5>D.width-(r.clientX-D.left)?(d=r.target,d.style.cursor=_$_f4f9[606]):1==u.current.options.rowResize&&6>D.width-(r.clientX-D.left)?(d=r.target,d.style.cursor=_$_f4f9[605]):1==u.current.options.columnDrag&&6>D.height-(r.clientY-D.top)&&(d=r.target,
|
|
440
|
+
d.style.cursor=_$_f4f9[604])))}};k.mouseover=function(r){r=r||window.event;if(u.current&&1==e){var A=l(r);if(A[0]){if(!document.activeElement.classList.contains(_$_f4f9[114])&&A[1]&&u.current!=A[1].jexcel&&u.current)return!1;if(!(xa.event||Ca.event||ca.event||ja.event))if(ea.event){var C=r.target.getAttribute(_$_f4f9[56]),D=r.target.getAttribute(_$_f4f9[57]);u.current.borders.cloning&&(u.current.borders.cloning.active=0);u.current.isSelected(C,D)?ea.reset.call(u.current):null!==C&&null!==D&&ea.call(u.current,
|
|
441
|
+
C,D)}else null!==b&&null!==a&&(1==A[2]&&(C=b,A[3]==_$_f4f9[445]&&(C=r.target.getAttribute(_$_f4f9[56])),D=u.current.options.data.length-1,w(b,0,C,D,r,A[3],A[1].jexcel),g&&(clearTimeout(g),g=null)),2==A[2]&&(A[3]==_$_f4f9[444]?(C=u.current.options.columns.length-1,D=parseInt(r.target.getAttribute(_$_f4f9[57])),w(0,a,C,D,r,A[3],A[1].jexcel)):A[3]==_$_f4f9[443]&&(C=A[4],D=A[5],w(b,a,C,D,r,A[3],A[1].jexcel))))}}};k.dblclick=function(r){if(u.current)if(r.target.classList.contains(_$_f4f9[380]))ea.execute.call(u.current,
|
|
442
|
+
!1);else{var A=l(r);1==A[2]?1==u.current.options.columnSorting&&(r=r.target.getAttribute(_$_f4f9[56]))&&u.current.orderBy(r):2==A[2]&&u.current.isEditable()&&!u.current.edition&&A[6]&&u.current.openEditor(A[6],null,r)}};k.paste=function(r){if(!r.target.classList.contains(_$_f4f9[252])&&u.current&&u.current.selectedCell&&!u.current.edition){var A=r.clipboardData||window.clipboardData;A&&(u.current.paste(u.current.selectedCell[0],u.current.selectedCell[1],A.getData(_$_f4f9[71])),r&&r.preventDefault())}};
|
|
443
|
+
k.contextmenu=function(r){var A=p(r);!1!==A&&(A[1]||(A=h),u.current&&!u.current.edition&&(A=Array.prototype.slice.call(A,3),Ta.open.call(u.current,r,A)))};var x=null,y=null,B=null,z=null,F=null;k.touchstart=function(r){var A=l(r);A[0]?A[1]&&u.current!=A[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=A[1].jexcel):u.current&&(u.current.resetSelection(),u.current=null);u.current&&!u.current.edition?A[3]==_$_f4f9[159]?u.current.isEditable()&&(ea.event=!0):r.target&&r.target.classList.contains(_$_f4f9[162])?
|
|
444
|
+
F=parseInt(r.target.getAttribute(_$_f4f9[163])):A[3]==_$_f4f9[443]?(z=A,x===r.target&&y?u.current.openEditor(r.target,!1,r):(y=setTimeout(function(){x=y=z=null},400),B=setTimeout(function(){k.contextmenu(r);B=null},800)),x=r.target):z=null:z=null};k.touchmove=function(r){if(u.current){var A=null,C=null,D=null,K=null;if(r.changedTouches&&r.changedTouches[0]){var N=r.changedTouches[0].clientX;var V=r.changedTouches[0].clientY}else N=r.clientX,V=r.clientY;if(V=document.elementFromPoint(N,V))if(N=V.getAttribute(_$_f4f9[56]),
|
|
445
|
+
V=V.getAttribute(_$_f4f9[57]),null!==N&&null!==V&&ea.event)u.current.isSelected(N,V)||(ea.call(u.current,N,V),v(r)),r.preventDefault();else if(null!==F){N=parseInt(N);V=parseInt(V);var O=u.current.selectedCell;0==F?N<=O[2]&&(A=N,D=O[2],C=O[1],K=O[3]):2==F?N>=O[0]&&(A=O[0],C=O[1],D=N,K=O[3]):1==F?V<=O[3]&&(A=O[0],C=V,D=O[2],K=O[3]):3==F&&V>=O[1]&&(A=O[0],C=O[1],D=O[2],K=V);null!==A&&u.current.updateSelectionFromCoords(A,C,D,K);r.preventDefault()}else z=null;B&&clearInterval(B)}};k.touchend=function(r){if(ea.event)ea.end.call(u.current,
|
|
446
|
+
r);else if(null!==F)F=null;else if(z){r=null;if(z[3]===_$_f4f9[443]){var A=z[4];var C=z[5];var D=A;r=C}else z[3]===_$_f4f9[444]?(A=0,C=z[4],D=u.current.options.columns.length-1,r=C):z[3]===_$_f4f9[445]&&(A=z[4],C=0,D=A,r=u.current.rows.length-1);null!=A&&u.current.updateSelectionFromCoords(A,C,D,r)}B&&clearInterval(B)};k.resize=function(){u.current&&1==u.current.parent.config.fullscreen&&I.call(u.current,!0)};return k}(),u=function(k,d,b){if(k){if(k.tagName==_$_f4f9[571]){d=u.helpers.createFromTable(k,
|
|
447
|
+
d);var a=document.createElement(_$_f4f9[32]);k.parentNode.insertBefore(a,k);k.parentNode.removeChild(k);k=a}d||(d={});u.defaultRowHeight||(a=document.createElement(_$_f4f9[32]),a.innerHTML=_$_f4f9[614],document.body.appendChild(a),u.defaultRowHeight=a.querySelector(_$_f4f9[173]).offsetHeight,a.parentNode.removeChild(a));var c=[];if(d.cloud&&!b)return typeof u.cloud==_$_f4f9[104]?u.cloud.load(d,function(f){if((f=u(k,f,!0))&&f.length)for(var g=0;g<f.length;g++)c.push(f[g])}):console.error(_$_f4f9[615]),
|
|
448
|
+
c;if(k.spreadsheet)e=k.spreadsheet,Ga[_$_f4f9[11]].call(e,d);else var e=ta.spreadsheet(k,d);e.processing=!0;1==e.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[e.name]=function(){for(var f=0;f<e.worksheets.length;f++)typeof e.worksheets[f].onload==_$_f4f9[104]&&(e.worksheets[f].onload(),e.worksheets[f].onload=null);e.processing=!1;if(Array.isArray(e.queue)&&0<e.queue.length)for(;f=e.queue.shift();)f[0].updateCell(f[1],f[2],Q.call(f[0],f[1],f[2]),!0);e.config.toolbar&&ma.show.call(e);
|
|
449
|
+
for(f=0;f<e.worksheets.length;f++)ha.refresh.call(e.worksheets[f]);H.call(e,_$_f4f9[616],e);pa.state.call(e);for(f=0;f<e.worksheets.length;f++)fa.update.call(e.worksheets[f]);jSuites.loading.hide()};Array.isArray(d.worksheets)&&(d=d.worksheets);if(Array.isArray(d)){for(b=0;b<d.length;b++)ta.worksheet(e,d[b]);c=e.worksheets}else c=ta.worksheet(e,d);jSuites.ajax.pending(e.name)||(jSuites.ajax.oncomplete[e.name](),jSuites.ajax.oncomplete[e.name]=null);return c}console.error(_$_f4f9[613])};u.defaultRowHeight=
|
|
450
|
+
null;u.license=null;u.setLicense=function(k){u.license=k};u.spreadsheet=[];u.picker=ra;u.setDictionary=function(k){jSuites.setDictionary(k)};u.extensions={};u.setExtensions=function(k){for(var d=Object.keys(k),b=0;b<d.length;b++)typeof k[d[b]]===_$_f4f9[104]&&(u[d[b]]=k[d[b]],u.extensions[d[b]]=k[d[b]],u.license&&typeof u[d[b]].license==_$_f4f9[104]&&u[d[b]].license.call(u,u.license))};u.destroy=function(k,d){if(k.spreadsheet){d&&ta.unbind(k);d=u.spreadsheet.indexOf(k.spreadsheet);u.spreadsheet.splice(d,
|
|
451
|
+
1);for(d=0;d<k.spreadsheet.worksheets.length;d++)J(k.spreadsheet.worksheets[d].options.worksheetName,null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$_f4f9[3];k.classList.remove(_$_f4f9[617]);k.classList.remove(_$_f4f9[391])}};u.version=M;u.helpers=G;u.events=Fa;typeof formula!==_$_f4f9[21]&&(u.formula=formula);u.editors=function(){var k={},d=function(b,a){return 1==b[a]||b.options&&1==b.options[a]?!0:b[a]==_$_f4f9[261]||b.options&&b.options[a]==_$_f4f9[261]?!0:!1};k.createEditor=function(b,a,
|
|
452
|
+
c,e){e.parent.input.setAttribute(_$_f4f9[122],!1);b==_$_f4f9[251]?(b=document.createElement(_$_f4f9[251]),b.type=_$_f4f9[71],b.value=c):b=document.createElement(_$_f4f9[32]);b.style.width=a.offsetWidth-2+_$_f4f9[59];b.style.height=a.offsetHeight-1+_$_f4f9[59];e.parent.input.appendChild(b);return b};k.createDialog=function(b,a,c,e,f,g){b=k.createEditor(_$_f4f9[32],b,a,f);b.classList.add(_$_f4f9[618]);b.classList.add(_$_f4f9[612]);800>window.innerWidth?(f.parent.input.style.top=_$_f4f9[61],f.parent.input.style.left=
|
|
453
|
+
_$_f4f9[61]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=-f.parent.input.offsetHeight));return b};k.general=function(){var b={},a=function(e){return(_$_f4f9[3]+e)[0]==_$_f4f9[18]?!0:!1},c=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;e.options&&(f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};b.createCell=function(e,
|
|
454
|
+
f,g,h,l,n){return b.updateCell(e,f,g,h,l,n)};b.updateCell=function(e,f,g,h,l,n){g=parseInt(g);h=parseInt(h);if(e){var p=c(n),q=null;f===_$_f4f9[3]||a(f)||typeof f===_$_f4f9[22]||f.trim()===_$_f4f9[3]||(p?(p=jSuites.mask.extract(f,p,!0))&&p.value!==_$_f4f9[3]&&(q=p.value):1==(!1===l.parent.config.autoCasting||!1===n.autoCasting?!1:!0)&&(n.type==_$_f4f9[22]||n.type==_$_f4f9[344]||n.type==_$_f4f9[343]?(p=jSuites.mask.extract(f,n,!0))&&p.value!==_$_f4f9[3]&&(q=p.value):jSuites.isNumeric(Number(f))&&(q=
|
|
455
|
+
Number(f))));null!==q&&(f=q);f=b.parseValue(g,h,f,l,n,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_f4f9[3],e.appendChild(f)):n.rotate?(e.firstChild&&e.firstChild.classList.contains(_$_f4f9[27])?l=e.firstChild:(l=document.createElement(_$_f4f9[28]),l.classList.add(_$_f4f9[27])),l.style.transform=_$_f4f9[29]+parseInt(270-n.rotate)+_$_f4f9[30],l.innerHTML=f,e.appendChild(l)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==q)return q}};b.openEditor=function(e,
|
|
456
|
+
f,g,h,l,n){var p=l.parent.input;p.onblur=function(){p.classList.contains(_$_f4f9[114])||l.closeEditor(e,!0)};if(n.type==_$_f4f9[22]||n.type==_$_f4f9[344]||n.type==_$_f4f9[343])p.classList.add(_$_f4f9[600]),a(f)||n.inputmode||(n.inputmode=_$_f4f9[619]);g=null;a(f)||(n.inputmode&&p.setAttribute(_$_f4f9[118],n.inputmode),(g=c(n))?n.disabledMaskOnEdition||(n.mask?(h=n.mask.split(_$_f4f9[244]),p.setAttribute(_$_f4f9[116],h[0])):n.locale&&p.setAttribute(_$_f4f9[620],n.locale),g.input=p,p.mask=g,jSuites.mask.render(f,
|
|
457
|
+
g,!1)):f&&n.type==_$_f4f9[343]&&(f*=100));if(!g||n.disabledMaskOnEdition)l.parent.config.stripHTML?p.innerText=f:p.innerHTML=f,jSuites.focus(p)};b.closeEditor=function(e,f,g,h,l,n){e=l.parent.input;f=f?e.innerText:_$_f4f9[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_f4f9[3]):n.type==_$_f4f9[343]&&(f+=_$_f4f9[621],e.classList.remove(_$_f4f9[622]));return f};b.parseValue=function(e,f,g,h,l,n){1==h.parent.config.parseFormulas&&(h.resetArray(e,f),a(g)&&(g=h.executeFormula(g,e,f)));g instanceof Element||g instanceof
|
|
458
|
+
HTMLDocument||(n&&(!l.rotate&&jSuites.isNumeric(g)?n.classList.add(_$_f4f9[279]):n.classList.remove(_$_f4f9[279])),l&&!a(g)&&(e=c(l))&&(e.mask?(f=e.mask.split(_$_f4f9[244]),0>g&&f[1]?(n&&-1!==f[1].indexOf(_$_f4f9[623])&&n.classList.add(_$_f4f9[624]),n=-1===f[1].indexOf(_$_f4f9[237])?jSuites.mask.render(-1*g,e,!0):jSuites.mask.render(g,e,!0)):(e.mask=f[0],n&&n.classList.remove(_$_f4f9[624]),n=jSuites.mask.render(g,e,!0))):n=jSuites.mask.render(g,e,!0),n&&(g=n)));return g};b[_$_f4f9[58]]=function(e,
|
|
459
|
+
f){var g;return(g=c(e))?jSuites.mask.render(f,g,!0):e.type==_$_f4f9[343]?100*parseFloat(f):f};b.destroyCell=function(e){e.classList.remove(_$_f4f9[279])};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(c,e,f,g,h,l){c&&(f=document.createElement(_$_f4f9[32]),f.classList.add(_$_f4f9[625]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,c.innerHTML=_$_f4f9[3],c.appendChild(f))};b.createCell=b.updateCell;
|
|
460
|
+
b.openEditor=function(c,e,f,g,h,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_f4f9[626];n.toolbar=!1;a=k.createDialog(c,e,f,g,h,l);a=jSuites.editor(a,n)};b.closeEditor=function(c,e,f,g,h,l){return e?a.getData():_$_f4f9[3]};return b}();k.dropdown=function(){var b={createCell:function(a,c,e,f,g,h){h.render==_$_f4f9[627]?a.classList.add(_$_f4f9[628]):a.classList.add(_$_f4f9[629]);if(a=b.updateCell(a,c,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_f4f9[629])},
|
|
461
|
+
updateCell:function(a,c,e,f,g,h){if(a){var l=b.getItem(a,c,e,f,g,h);l?a.innerHTML=l:c?(c=b.fromLabel(a,c,e,f,g,h),c.length?(l=b.getItem(a,c,e,f,g,h),a.innerHTML=l):a.innerHTML=_$_f4f9[3]):a.innerHTML=_$_f4f9[3];return c}},openEditor:function(a,c,e,f,g,h){var l=k.createEditor(_$_f4f9[32],a,c,g),n=h.delimiter||_$_f4f9[244];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_f4f9[104]&&(h.source=h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_f4f9[104]&&(h=h.filterOptions(g,a,
|
|
462
|
+
e,f,c,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));d(h,_$_f4f9[630])&&(e.multiple=!0);d(h,_$_f4f9[72])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};d(h,_$_f4f9[630])?c&&(e.value=(_$_f4f9[3]+c).split(n)):e.value=c;jSuites.dropdown(l,e)},closeEditor:function(a,c,e,f,g,h){for(var l=g.parent.input.children[0],n=h.delimiter||_$_f4f9[244],p=l.dropdown.getText(!0),q=l.dropdown.getValue(!0),v=0;v<q.length;v++)!1===
|
|
463
|
+
b.getItem(a,q[v],e,f,g,h)&&h.source.push({id:q[v],name:p[v]});l.dropdown.close(!0);if(c)return q.join(n)},fromLabel:function(a,c,e,f,g,h){a=h.delimiter||_$_f4f9[244];e=[];f=[];Array.isArray(c)||(c=(_$_f4f9[3]+c).split(a));for(g=0;g<c.length;g++)f[c[g].trim()]=!0;c=Object.keys(f);!d(h,_$_f4f9[630])&&1<Object.keys(c).length&&(f=[],f[c[0]]=!0);for(c=0;c<h.source.length;c++)f[h.source[c].name]&&e.push(h.source[c].id);return e.join(a)},getItem:function(a,c,e,f,g,h){f=h.delimiter||_$_f4f9[244];a=[];e=[];
|
|
464
|
+
Array.isArray(c)||(c=(_$_f4f9[3]+c).split(f));for(f=0;f<c.length;f++)e[c[f].trim()]=!0;f=Object.keys(e);!d(h,_$_f4f9[630])&&1<Object.keys(f).length&&(c=[],c[f[0]]=!0,e=c);if(h.source&&typeof h.source[0]!==_$_f4f9[103])for(c=0;c<h.source.length;c++)f=h.source[c],h.source[c]={id:f,name:f};for(c=0;c<h.source.length;c++)typeof e[h.source[c].id]!==_$_f4f9[21]&&a.push(h.render==_$_f4f9[288]?h.source[c].color:h.render==_$_f4f9[631]?h.source[c].image:h.source[c].name);if(a.length){if(typeof h.render!==_$_f4f9[21]){for(c=
|
|
465
|
+
0;c<a.length;c++)e=c,f=a[c],f=h.render==_$_f4f9[288]?_$_f4f9[632]+f+_$_f4f9[633]:h.render==_$_f4f9[631]?_$_f4f9[632]+f+_$_f4f9[633]:h.render==_$_f4f9[627]?_$_f4f9[635]+(h.source[c].color||_$_f4f9[634])+_$_f4f9[636]+f+_$_f4f9[637]:void 0,a[e]=f;return a.join(_$_f4f9[3])}for(c=0;c<a.length;c++)a[c]=(_$_f4f9[3]+a[c]).replace(_$_f4f9[15],_$_f4f9[13]);return a.join(_$_f4f9[332])}return!1}};b[_$_f4f9[58]]=function(a,c){for(var e=0;e<a.source.length;e++)if(a.source[e].id==c)return a.render==_$_f4f9[288]?
|
|
466
|
+
a.source[e].color:a.render==_$_f4f9[631]?a.source[e].image:a.source[e].name};return b}();k.autocomplete=k.dropdown;k.calendar=function(){var b={},a=null;b.updateCell=function(c,e,f,g,h,l){if(c){f=e;l=b.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_f4f9[3]+e;g.substr(4,1)==_$_f4f9[237]&&g.substr(7,1)==_$_f4f9[237]?g=!0:(g=g.split(_$_f4f9[237]),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))&&
|
|
467
|
+
(f=g);if(f=jSuites.calendar.getDateString(f,l))return c.innerText=f,e;c.innerText=_$_f4f9[3];return _$_f4f9[3]}};b.createCell=b.updateCell;b.openEditor=function(c,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_f4f9[104]&&(l=l.filterOptions(h,c,f,g,e,l));f=l.options||{};f.opened=!0;f.onclose=function(n,p){h.closeEditor(c,!0)};typeof l.timepicker!==_$_f4f9[21]&&(f.time=d(l,_$_f4f9[638])?!0:!1);typeof f.readonly!==_$_f4f9[21]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;
|
|
468
|
+
a=k.createEditor(_$_f4f9[251],c,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&a.focus()};b.closeEditor=function(c,e,f,g,h){c=a.calendar.close(!0,a.value?!0:!1);c=a.value?c:_$_f4f9[3];if(e)return c};b.getFormat=function(c){return c&&c.format?c.format:c&&c.options&&c.options.format?c.options.format:_$_f4f9[639]};b[_$_f4f9[58]]=function(c,e){c=b.getFormat(c);return jSuites.calendar.getDateString(e,c)};return b}();k.color=function(){var b={},a=null;b.updateCell=function(c,e,f,g,h,l){c&&
|
|
469
|
+
(l.render==_$_f4f9[640]?(f=document.createElement(_$_f4f9[32]),f.className=_$_f4f9[288],f.style.backgroundColor=e,c.innerText=_$_f4f9[3],c.appendChild(f)):(c.style.color=e,c.innerText=e))};b.createCell=b.updateCell;b.openEditor=function(c,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_f4f9[104]&&(l=l.filterOptions(h,c,f,g,e,l));f=l.options||{};f.value=e;f.onclose=function(n,p){h.closeEditor(c,!0)};a=k.createEditor(_$_f4f9[251],c,e,h);a=jSuites.color(a,f);a.open()};b.closeEditor=function(c,
|
|
470
|
+
e,f,g,h,l){c=a.close(!0);if(e)return c};b[_$_f4f9[58]]=function(c,e){c=document.createElement(_$_f4f9[32]);c.style.width=_$_f4f9[641];c.style.height=_$_f4f9[34];c.style.backgroundColor=e;return c.outerHTML};return b}();k.checkbox=function(){var b={createCell:function(a,c,e,f,g,h){c=c&&c!=_$_f4f9[642]&&c!=_$_f4f9[643]?!0:!1;e=document.createElement(_$_f4f9[251]);e.type=_$_f4f9[283];e.checked=c;e.onclick=function(){g.setValue(a,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_f4f9[644],
|
|
471
|
+
_$_f4f9[644]);a.innerHTML=_$_f4f9[3];a.appendChild(e);return c},updateCell:function(a,c){c=c&&c!=_$_f4f9[642]&&c!=_$_f4f9[643]?!0:!1;a&&(a.children[0].checked=c);return c},openEditor:function(a,c,e,f,g){c=a.children[0].checked?!1:!0;g.setValue(a,c);return!1},closeEditor:function(a,c){return!1}};b[_$_f4f9[58]]=function(a,c){return 1==c||1==c||c==_$_f4f9[261]?jSuites.translate(_$_f4f9[261]):jSuites.translate(_$_f4f9[642])};return b}();k.radio=function(){var b={createCell:function(a,c,e,f,g,h){a.getAttribute(_$_f4f9[56]);
|
|
472
|
+
e=document.createElement(_$_f4f9[251]);e.type=_$_f4f9[285];e.checked=1==c||1==c||c==_$_f4f9[261]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_f4f9[644],_$_f4f9[644]);a.innerHTML=_$_f4f9[3];a.appendChild(e)},updateCell:function(a,c,e,f,g){c=1==c||1==c||c==_$_f4f9[261]||c==_$_f4f9[645]?!0:!1;a&&(a.children[0].checked=c);if(1==c){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 c},
|
|
473
|
+
openEditor:function(a,c,e,f,g){return!1},closeEditor:function(a,c){return!1}};b[_$_f4f9[58]]=function(a,c){return 1==c||1==c||c==_$_f4f9[261]?_$_f4f9[261]:_$_f4f9[642]};return b}();k.autonumber=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,l){(e=parseInt(e))||0<parseInt(c.innerText)&&(e=parseInt(c.innerText));l.sequence||(l.sequence=0);e?b.isValid(e,f,g,h)||(e=_$_f4f9[275]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return c.innerText=e};b.updateCell=b.createCell;b.openEditor=function(c,
|
|
474
|
+
e,f,g,h,l){a=k.createEditor(_$_f4f9[251],c,e,h);a.onblur=function(){h.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=function(c,e,f,g,h){return e?a.value:_$_f4f9[3]};b.isValid=function(c,e,f,g){for(var h,l=0;l<g.options.data.length;l++)if(h=g.value(e,l),h==c&&l!=f)return!1;return!0};return b}();k.progressbar=function(){var b={},a=null;b.createCell=function(c,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(c.children[0]&&c.children[0].tagName==_$_f4f9[598])var f=c.children[0];else f=
|
|
475
|
+
document.createElement(_$_f4f9[32]),f.classList.add(_$_f4f9[289]),c.innerText=_$_f4f9[3],c.classList.add(_$_f4f9[646]),c.appendChild(f);f.style.width=parseInt(e)+_$_f4f9[621];f.setAttribute(_$_f4f9[297],parseInt(e)+_$_f4f9[621])};b.destroyCell=function(c){c.classList.remove(_$_f4f9[646])};b.updateCell=b.createCell;b.openEditor=function(c,e,f,g,h,l){a=k.createEditor(_$_f4f9[251],c,e,h);a.type=_$_f4f9[22];a.setAttribute(_$_f4f9[647],0);a.setAttribute(_$_f4f9[648],100);a.onblur=function(){h.closeEditor(c,
|
|
476
|
+
!0)};a.focus();a.value=e};b.closeEditor=function(c,e,f,g,h){return e?a.value:_$_f4f9[3]};return b}();k.rating=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,l){return b.setCell(c,e,l)};b.destroyCell=function(c){c.classList.remove(_$_f4f9[649])};b.updateCell=b.createCell;b.openEditor=function(c,e,f,g,h,l){a=k.createEditor(_$_f4f9[251],c,e,h);a.type=_$_f4f9[22];a.setAttribute(_$_f4f9[647],0);a.setAttribute(_$_f4f9[648],5);a.onblur=function(){h.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=
|
|
477
|
+
function(c,e,f,g,h,l){return e?a.value:_$_f4f9[3]};b.setCell=function(c,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(c){f=f&&f.color?f.color:_$_f4f9[624];var g=document.createElement(_$_f4f9[32]);g.setAttribute(_$_f4f9[297],parseInt(e)+_$_f4f9[650]);g.classList.add(_$_f4f9[290]);for(var h=0;h<e;h++){var l=document.createElement(_$_f4f9[486]);l.className=_$_f4f9[550];l.style.color=f;l.innerHTML=_$_f4f9[651];g.appendChild(l)}c.innerHTML=_$_f4f9[3];c.className=_$_f4f9[649];c.appendChild(g)}return e};
|
|
478
|
+
return b}();k.email=function(){var b={createCell:function(a,c,e,f,g,h){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_f4f9[608]?e=a.children[0]:(e=document.createElement(_$_f4f9[227]),a.innerText=_$_f4f9[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_f4f9[652],h.options.url)),e.innerText=c)}};b.updateCell=b.createCell;b.openEditor=function(a,c,e,f,g,h){g.parent.input.classList.add(_$_f4f9[600]);g.parent.input.onblur=function(){g.closeEditor(a,!0)};g.parent.input.innerText=
|
|
479
|
+
c;jSuites.focus(g.parent.input)};b.closeEditor=function(a,c,e,f,g){g.parent.input.classList.remove(_$_f4f9[600]);return c?g.parent.input.innerText.replace(new RegExp(/\n/,_$_f4f9[14]),_$_f4f9[3]):_$_f4f9[3]};return b}();k.url=k.email;k.image=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,l){if(c)if(e)if(c.children&&c.children[0]&&c.children[0].tagName==_$_f4f9[653])c.children[0].src=e;else{var n=document.createElement(_$_f4f9[49]);l.render==_$_f4f9[654]&&n.classList.add(_$_f4f9[654]);
|
|
480
|
+
l.options&&(n.style.maxWidth=_$_f4f9[655],l.options.absolute&&(c.classList.add(_$_f4f9[656]),n.setAttribute(_$_f4f9[657],-1),n.classList.add(_$_f4f9[252]),n.classList.add(_$_f4f9[658]),n.settings=function(){h.openEditor(c,e,f,g,h,l)},n.dblclick=function(){h.openEditor(c,!0)},n[_$_f4f9[659]]=function(){h.setValueFromCoords(f,g,_$_f4f9[3])},n.refresh=function(p){if(!p){p=parseInt(n.style.top)||0;var q=parseInt(n.style.left)||0,v=parseInt(n.style.width)||40,w=parseInt(n.style.height)||40,x=c.getAttribute(_$_f4f9[56]),
|
|
481
|
+
y=c.getAttribute(_$_f4f9[57]);h.updateProperty([{x,y,value:{top:p,left:q,width:v,height:w}}],null,null,!0)}}),l.options.width&&(n.style.width=parseInt(l.options.width)+_$_f4f9[59]),l.options.height&&(n.style.height=parseInt(l.options.height)+_$_f4f9[59]),l.top&&(n.style.top=parseInt(l.top)+_$_f4f9[59]),l.left&&(n.style.left=parseInt(l.left)+_$_f4f9[59]),l.width&&(n.style.width=parseInt(l.width)+_$_f4f9[59]),l.height&&(n.style.height=parseInt(l.height)+_$_f4f9[59]));n.src=e;c.innerHTML=_$_f4f9[3];
|
|
482
|
+
c.appendChild(n)}else c.innerHTML=_$_f4f9[3]};b.updateCell=b.createCell;b.openEditor=function(c,e,f,g,h,l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(c,e,f,g,h,l);e&&(c=document.createElement(_$_f4f9[49]),c.src=e,c.classList.add(_$_f4f9[660]),c.style.width=_$_f4f9[655],a.appendChild(c));jSuites.image(a,l)};b.closeEditor=function(c,e,f,g,h,l){if(e&&(c=a.children[0]))return c.tagName==_$_f4f9[653]?c.src:_$_f4f9[3]};b[_$_f4f9[58]]=function(c,e){return _$_f4f9[661]+e+_$_f4f9[662]};return b}();
|
|
483
|
+
k.html=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$_f4f9[663]);var f=document.createElement(_$_f4f9[32]);f.innerHTML=e;c.appendChild(f)};b.updateCell=function(c,e){c&&(c.firstChild.innerHTML=e)};b.destroyCell=function(c){c.classList.remove(_$_f4f9[663])};b.openEditor=function(c,e,f,g,h,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_f4f9[626];e=k.createDialog(c,e,f,g,h,l);a=jSuites.editor(e,n);a.close=function(){h.closeEditor(c,!0)};jSuites.tracking(a,
|
|
484
|
+
!0)};b.closeEditor=function(c,e,f,g,h,l){jSuites.tracking(a,!1);c=a.getData();if(e)return c};return b}();k.hidden=function(){return{createCell:function(b,a,c,e,f){b.innerText=a},updateCell:function(b,a,c,e,f){b&&(b.innerText=a)},openEditor:function(b,a,c,e,f){return!1},closeEditor:function(b,a){return!1}}}();k.tags=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$_f4f9[664]);b.updateCell(c,e)};b.updateCell=function(c,e){c&&(c.innerHTML=e)};b.destroyCell=function(c){c.classList.remove(_$_f4f9[664])};
|
|
485
|
+
b.openEditor=function(c,e,f,g,h,l){var n=l&&l.options?l.options:{};n.value=e;a=k.createDialog(c,e,f,g,h,l);c=document.createElement(_$_f4f9[32]);c.style.margin=_$_f4f9[34];c.style.marginRight=_$_f4f9[665];a.appendChild(c);a=jSuites.tags(c,n);c.focus();jSuites.focus(c)};b.closeEditor=function(c,e,f,g,h,l){c=a.getValue();if(e)return c};return b}();k.record=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,l){c.classList.add(_$_f4f9[629]);var n;(n=h.parent.getWorksheetInstance(l.worksheetId))?
|
|
486
|
+
n.rows?b.updateCell(c,e,f,g,h,l):(c.innerText=_$_f4f9[275],h.parent.queue.push([h,f,g])):(c.innerText=_$_f4f9[275],h.parent.queue.push([h,f,g]))};b.destroyCell=function(c){c.classList.remove(_$_f4f9[629])};b.updateCell=function(c,e,f,g,h,l){c&&(typeof l.worksheetId==_$_f4f9[21]?c.innerText=_$_f4f9[275]:c.innerHTML=b.getValue(c,e,f,g,h,l))};b.openEditor=function(c,e,f,g,h,l){var n=l.delimiter||_$_f4f9[244];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_f4f9[104]&&(l.source=l.filter(h.el,
|
|
487
|
+
c,f,g,l.source));typeof l.filterOptions==_$_f4f9[104]&&(l=l.filterOptions(h,c,f,g,e,l));f=l.options;f.data=b.getSource(h,l);d(l,_$_f4f9[630])&&(f.multiple=!0);d(l,_$_f4f9[72])&&(f.autocomplete=!0);f.format=!0;f.opened=!0;f.width=c.offsetWidth-2;f.onclose=function(){h.closeEditor(c,!0)};d(l,_$_f4f9[630])?e&&(f.value=(_$_f4f9[3]+e).split(n)):f.value=e;a=k.createEditor(_$_f4f9[32],c,e,h);a=jSuites.dropdown(a,f)};b.closeEditor=function(c,e,f,g,h,l){c=l.delimiter||_$_f4f9[244];f=a.getValue(!0);a.close(!0);
|
|
488
|
+
if(e)return f.join(c)};b.getValue=function(c,e,f,g,h,l){c=[];if(typeof l.worksheetId==_$_f4f9[25]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_f4f9[3]||0==e||null==e||void 0==e)return _$_f4f9[3];e=(_$_f4f9[3]+e).split(_$_f4f9[244]);for(g=0;g<e.length;g++){var n=e[g].trim();var p=h.name(f);n=h.getRowById(n);p=!1===n?_$_f4f9[666]:n[p];0<=l.worksheetImage&&(p=_$_f4f9[667]+p+_$_f4f9[668]);c.push(p)}return 0<=
|
|
489
|
+
l.worksheetImage?c.join(_$_f4f9[3]):c.join(_$_f4f9[332])}return _$_f4f9[275]};b.getSource=function(c,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_f4f9[25]&&(g=c.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(c=0;c<g.rows.length;c++)if(h=g.value(f,c))h={id:g.getRowId(c),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,c)),l.push(h)}else console.error(_$_f4f9[669]+e.worksheetId);return l};b[_$_f4f9[58]]=function(c,e){for(var f=0;f<
|
|
490
|
+
c.source.length;f++)if(c.source[f].id==e)return c.render==_$_f4f9[288]?c.source[f].color:c.render==_$_f4f9[631]?c.source[f].image:c.source[f].name};return b}();return k}();typeof jQuery!==_$_f4f9[21]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(d){var b=k(this)[_$_f4f9[58]](0);if(b.jspreadsheet){if(typeof arguments[0]==_$_f4f9[22])var a=arguments[0],c=2;else a=0,c=1;return b.jspreadsheet[a][d].apply(b.jspreadsheet[a],Array.prototype.slice.call(arguments,c))}return u(k(this)[_$_f4f9[58]](0),
|
|
491
|
+
arguments[0])}}(jQuery);return u});
|