jspreadsheet 8.4.0 → 8.4.1
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.d.ts +2 -0
- package/dist/index.js +400 -400
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v8.4.
|
|
2
|
+
* Jspreadsheet v8.4.1
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -22,7 +22,7 @@ $jscomp.polyfill=function(B,I,J,T){I&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
22
22
|
$jscomp.polyfillIsolated=function(B,I,J,T){var O=B.split(".");B=1===O.length;T=O[0];T=!B&&T in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<O.length-1;Z++){var L=O[Z];if(!(L in T))return;T=T[L]}O=O[O.length-1];J=$jscomp.IS_SYMBOL_NATIVE&&"es6"===J?T[O]:null;I=I(J);null!=I&&(B?$jscomp.defineProperty($jscomp.polyfills,O,{configurable:!0,writable:!0,value:I}):I!==J&&(void 0===$jscomp.propertyToPolyfillSymbol[O]&&(J=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[O]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
23
|
$jscomp.global.Symbol(O):$jscomp.POLYFILL_PREFIX+J+"$"+O),$jscomp.defineProperty(T,$jscomp.propertyToPolyfillSymbol[O],{configurable:!0,writable:!0,value:I})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(B){B={next:B};B[Symbol.iterator]=function(){return this};return B};
|
|
24
24
|
$jscomp.iteratorFromArray=function(B,I){B instanceof String&&(B+="");var J=0,T=!1,O={next:function(){if(!T&&J<B.length){var Z=J++;return{value:I(Z,B[Z]),done:!1}}T=!0;return{done:!0,value:void 0}}};O[Symbol.iterator]=function(){return O};return O};$jscomp.polyfill("Array.prototype.values",function(B){return B?B:function(){return $jscomp.iteratorFromArray(this,function(I,J){return J})}},"es8","es3");
|
|
25
|
-
var _$
|
|
25
|
+
var _$_7134=["use strict","{","}","","8.4.1","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
|
|
26
26
|
"none","status","data-x","data-y","px","X","goto","jss_scroll","jss_control","hidden","jss_freezed","get","colspan","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","orderBy","setValue","setProperty","renameWorksheet","moveWorksheet","onundo",
|
|
27
27
|
"onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave",
|
|
28
28
|
"persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","-2000px","#ccc","transparent","0px","tr","jss_group_container","td"," ",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.","jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action",
|
|
@@ -40,424 +40,424 @@ var _$_ead3=["use strict","{","}","","8.4.0","Base","https://jspreadsheet.com","
|
|
|
40
40
|
"ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","TABLE","Element is not a table","colgroup > col","data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV",
|
|
41
41
|
"data-current","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","TD","Cloud plugin not loaded.","jtabs","jss_dialog","jss_number","decimal","data-locale","%","jss_percent","\\[Red\\]","red","\\(","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>",
|
|
42
42
|
"<","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="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
43
|
-
(function(B,I){typeof exports===_$
|
|
44
|
-
{version:_$
|
|
45
|
-
b[k].name:k},L=function(k,b,c){var a;if(a=this.options.data[b]){var d=0<=k?Z.call(this,k):k;typeof c===_$
|
|
46
|
-
a=this.parent.element,d=this;else c=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$
|
|
47
|
-
b){if(typeof k===_$
|
|
48
|
-
this.refreshBorders()},Ja=function(k){if(void 0===k)return this.status;var b=document.createElement(_$
|
|
49
|
-
l(e));for(var n=0;128>n;n++){var r=e[n]?e[n].charCodeAt(0):0;m+=String.fromCharCode(54^r);p+=String.fromCharCode(92^r)}var v=l(p+l(m+h));if(g!=v)c=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var u=window.location.hostname||_$
|
|
50
|
-
new Date;y=parseInt(u.getTime()/1E3);var w=J();f[1].date<y?(c=f[1].date+2592E3<y&&!f[1].plan||f[1].date+15552E3<y?6:7,w.license=f[1].name+_$
|
|
51
|
-
_$
|
|
52
|
-
da.position.call(this,d,e)}},b=function(){this.scrollX.scrollWidth<this.scrollX.scrollLeft+this.scrollX.offsetWidth+25?(this.content.scrollLeft=this.content.scrollWidth,0<this.options.freezeColumns&&ha.refresh.call(this)):this.content.scrollLeft=0;k.call(this)},c=function(){var d=this.tbody.lastChild.getAttribute(_$
|
|
43
|
+
(function(B,I){typeof exports===_$_7134[83]&&typeof module!==_$_7134[13]?module.exports=I():typeof define===_$_7134[84]&&define.amd?define(I):B.jspreadsheet=B.jexcel=I()})(this,function(){_$_7134[0];var B=function(k,b){k=jSuites.translate(k);if(b&&b.length)for(var c=0;c<b.length;c++)k=k.replace(_$_7134[1]+c+_$_7134[2],b[c]);return k},I=function(k,b){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_7134[3]).toUpperCase();if(void 0===b)return window[k]?window[k]:null;window[k]=b},J=function(){var k=
|
|
44
|
+
{version:_$_7134[4],edition:_$_7134[5],host:_$_7134[6],license:_$_7134[7],print:function(){return[_$_7134[8]+this.edition+_$_7134[9]+this.version+_$_7134[10]+this.host+_$_7134[10]+this.license]}};return function(){return k}}(),T=function(k){var b=parseInt(k.y);if(k.id)var c=parseInt(k.id);else k.value&&(c=parseInt(k.value));0<c&&(this.rows[b].id=c,sa[_$_7134[11]].call(this,c))},O=function(k){return(_$_7134[3]+k).substr(0,1)===_$_7134[12]},Z=function(k){var b=this.options.columns;return b[k]&&b[k].name?
|
|
45
|
+
b[k].name:k},L=function(k,b,c){var a;if(a=this.options.data[b]){var d=0<=k?Z.call(this,k):k;typeof c===_$_7134[13]?c=typeof d===_$_7134[14]?a[k]:jSuites.path.call(a,_$_7134[3]+d):(typeof d===_$_7134[14]?a[k]=c:jSuites.path.call(a,_$_7134[3]+d,c),!O(c)&&this.records[b][k]&&(this.records[b][k].v=c))}else c=null;return c},R=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Ja.call(this))?7<=k?!0:!1:!0},Ka=function(k){var b=_$_7134[15];if(this.parent)var c=this.parent.config,
|
|
46
|
+
a=this.parent.element,d=this;else c=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$_7134[13]&&(k=!a.classList.contains(b));k?(a.classList.add(b),c.fullscreen=!0):(a.classList.remove(b),c.fullscreen=!1);d&&(d.tbody.innerHTML=_$_7134[3],H.call(d),U.refresh.call(d),fa.update.call(d.parent,d))},La=function(k){var b=this.loading;null===k&&(k=b.style.display==_$_7134[16]?!0:!1);b.style.display=k?_$_7134[16]:_$_7134[3];setTimeout(function(){b.style.display=_$_7134[3]},1E3)},Ga=function(k,
|
|
47
|
+
b){if(typeof k===_$_7134[17]){var c=E.getCoordsFromColumnName(k);c=this.records[c[1]][c[0]];if(c.element)k=c.element;else return typeof b===_$_7134[13]?c.readonly:c.readonly=b?!0:!1}c=_$_7134[18];k=k.classList;if(typeof b===_$_7134[13])return k.contains(c)?!0:!1;b?k.add(c):k.remove(c)},xa=function(k){var b=_$_7134[19],c=this.table.classList;if(typeof k==_$_7134[13])return c.contains(b)?!1:!0;k?c.remove(b):c.add(b);0<this.options.freezeColumns&&ka[_$_7134[11]].call(this,this.options.freezeColumns);
|
|
48
|
+
this.refreshBorders()},Ja=function(k){if(void 0===k)return this.status;var b=document.createElement(_$_7134[20]);b.style.textAlign=_$_7134[21];b.style.fontSize=_$_7134[22];b.style.cursor=_$_7134[23];b.onclick=function(){window.location.href=J().host+_$_7134[24]};var c=null,a=[74,50,48,50,48,33].join(_$_7134[3]);(function(e){c=1;try{if(e){var f=window.atob(e);f=f.split(_$_7134[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=a;var h=f[1],l=jSuites.sha512,m=_$_7134[3],p=_$_7134[3];128<e.length&&(e=
|
|
49
|
+
l(e));for(var n=0;128>n;n++){var r=e[n]?e[n].charCodeAt(0):0;m+=String.fromCharCode(54^r);p+=String.fromCharCode(92^r)}var v=l(p+l(m+h));if(g!=v)c=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var u=window.location.hostname||_$_7134[26],y=u.split(_$_7134[27]);u=u.split(_$_7134[27]);2<u.length&&!jSuites.isNumeric(u[u.length-1])&&y.shift();y=y.join(_$_7134[27]);u=u.join(_$_7134[27]);if(-1==f[1].domain.indexOf(y)&&-1==f[1].domain.indexOf(u))c=4;else if(f[1].scope&&0<=f[1].scope.indexOf(_$_7134[28])){u=
|
|
50
|
+
new Date;y=parseInt(u.getTime()/1E3);var w=J();f[1].date<y?(c=f[1].date+2592E3<y&&!f[1].plan||f[1].date+15552E3<y?6:7,w.license=f[1].name+_$_7134[29]):(c=8,w.license=_$_7134[30]+f[1].name,w.edition=3==f[1].plan||6==f[1].plan?_$_7134[31]:_$_7134[5])}else c=5}else c=4}else c=2}}catch(C){}})(k);k=_$_7134[3];if(1==c)k=_$_7134[32];else if(2==c||3==c||4==c)k=_$_7134[33];else if(5==c)k=_$_7134[34];else if(6==c||7==c)k=_$_7134[35];b.appendChild(document.createTextNode(k));if(8>c)try{if(typeof sessionStorage!==
|
|
51
|
+
_$_7134[13]&&!sessionStorage.getItem(_$_7134[36])){sessionStorage.setItem(_$_7134[36],!0);var d=document.createElement(_$_7134[37]);d.src=J().host+_$_7134[38]+_$_7134[39];d.style.display=_$_7134[40];b.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_7134[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});J().edition===_$_7134[31]&&(this.edition=1);return b},U=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_7134[42]),e=this.edition.getAttribute(_$_7134[43]);
|
|
52
|
+
da.position.call(this,d,e)}},b=function(){this.scrollX.scrollWidth<this.scrollX.scrollLeft+this.scrollX.offsetWidth+25?(this.content.scrollLeft=this.content.scrollWidth,0<this.options.freezeColumns&&ha.refresh.call(this)):this.content.scrollLeft=0;k.call(this)},c=function(){var d=this.tbody.lastChild.getAttribute(_$_7134[43]),e=this.scrollY.scrollHeight-this.content.offsetHeight-this.scrollY.scrollTop;this.content.scrollTop=d!=(this.results?this.rows[this.results[this.results.length-1]].y:this.rows[this.rows.length-
|
|
53
53
|
1].y)&&e?0:this.content.scrollHeight;k.call(this)},a=function(){if(H.limited.call(this)){var d=ka.getWidth.call(this);if(1==this.parent.config.fullscreen)var e=this.content.offsetWidth,f=this.content.offsetHeight;else 1==this.options.tableOverflow&&(e=parseInt(this.options.tableWidth),f=this.options.pagination?this.table.offsetHeight:parseInt(this.options.tableHeight));this.width=a.width.call(this)+(d?d:1);this.height=a.height.call(this);this.tfoot.offsetHeight&&(this.height+=this.tfoot.offsetHeight+
|
|
54
|
-
26);this.scrollX.firstChild.style.width=this.width+_$
|
|
55
|
-
0;a.call(this)};a.updateX=function(){if(a.event)return!1;var d=parseInt(this.thead.lastChild.children[(this.options.freezeColumns||0)+1].getAttribute(_$
|
|
56
|
-
d};a.update=function(d,e){e==_$
|
|
57
|
-
f.className=_$
|
|
54
|
+
26);this.scrollX.firstChild.style.width=this.width+_$_7134[44];this.scrollY.firstChild.style.height=this.height+_$_7134[44];this.scrollX.style.width=e+_$_7134[44];this.scrollY.style.height=f+_$_7134[44];this.scrollX.style.display=this.width>e?_$_7134[3]:_$_7134[40];this.scrollY.style.display=this.height>f&&!this.options.pagination?_$_7134[3]:_$_7134[40]}else this.scrollX.style.display=_$_7134[40],this.scrollY.style.display=_$_7134[40]};a.refresh=function(){this.scrollY.scrollTop=0;this.scrollX.scrollLeft=
|
|
55
|
+
0;a.call(this)};a.updateX=function(){if(a.event)return!1;var d=parseInt(this.thead.lastChild.children[(this.options.freezeColumns||0)+1].getAttribute(_$_7134[42]));a.setX.call(this,a.width.call(this,d));b.call(this)};a.updateY=function(){if(a.event)return!1;if(this.tbody.firstChild){var d=parseInt(this.tbody.firstChild.getAttribute(_$_7134[43]));a.setY.call(this,a.height.call(this,d));c.call(this)}};a.setX=function(d){a.ignore=!0;this.scrollX.scrollLeft=d};a.setY=function(d){a.ignore=!0;this.scrollY.scrollTop=
|
|
56
|
+
d};a.update=function(d,e){e==_$_7134[45]?(d=a.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),H.reset.call(this),H[_$_7134[46]].call(this,null,d),b.call(this)):(d=a.height.call(this,null,d.target.scrollTop/(d.target.scrollHeight-this.content.offsetHeight)*(this.height-(this.tbody.offsetHeight-5))),this.tbody.textContent=_$_7134[3],H[_$_7134[46]].call(this,d),c.call(this))};a.build=function(d){var e=this,f=document.createElement(_$_7134[20]),g=document.createElement(_$_7134[20]);
|
|
57
|
+
f.className=_$_7134[47]+d;g.className=_$_7134[48]+d;f.appendChild(g);d==_$_7134[45]?f.style.height=_$_7134[22]:f.style.width=_$_7134[22];f.onscroll=function(h){if(a.ignore)return a.ignore=!1;a.event=!0;a.update.call(e,h,d);a.event=!1};return f};a.width=function(d,e){for(var f=this.options.columns,g=0,h=this.options.freezeColumns||0;h<this.options.columns.length;h++){if(d===h)return g;!1!==f[h].visible&&f[h].type!==_$_7134[49]&&(g+=parseInt(f[h].width));if(g>=e)return h}return e?h:g};a.height=function(d,
|
|
58
58
|
e){var f=0,g=0;this.options.defaultRowHeight||(this.options.defaultRowHeight=23);for(var h=this.results?this.results:this.rows,l=0;l<h.length;l++){g=l;this.results&&(g=h[l]);if(d===g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):this.rows[g].element&&this.rows[g].element.offsetHeight?f+parseInt(this.rows[g].element.offsetHeight):f+parseInt(this.options.defaultRowHeight));if(f>=e)return g}return e?g:f};return a}(),H=function(){var k=function(c,
|
|
59
|
-
a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=c.getAttribute(_$
|
|
60
|
-
(this.content.scrollTop+=h-r+3,U.ignore=!0,this.scrollY.scrollTop+=h-r+3):(this.content.scrollTop=c.offsetTop-d,U.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!m||!c.classList.contains(_$
|
|
61
|
-
a-this.content.scrollLeft)),!1;return!0},b=function(){var c=0;this.results&&(c=this.results[0]);b.reset.call(this,!0);b.renderX.call(this,0);b.renderY.call(this,c);ka.headers.call(this);0<this.options.pagination&&ta.update.call(this);this.refreshBorders();U.call(this)};b.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};b.refresh=function(){if(!this.tbody.lastChild)return!1;var c=parseInt(this.thead.lastChild.lastChild.getAttribute(_$
|
|
59
|
+
a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=c.getAttribute(_$_7134[42]),h=c.getAttribute(_$_7134[43]);var l=this.records[h][g];l.merged&&(g-=l.merged[0],h-=l.merged[1],c=this.records[h][g].element);h=this.content.getBoundingClientRect();l=c.getBoundingClientRect();var m=ka.getWidth.call(this),p=h.left+m,n=h.left+h.width;g=h.top+d;var r=h.top+h.height;var v=0;h=l.top;h>=g&&h<=r||(v++,e=!0);h=l.top+l.height;h>=g&&h<=r||v++;if(v>=a)return 2>a&&(a=this.content.scrollTop,0==e?r-g>l.height&&
|
|
60
|
+
(this.content.scrollTop+=h-r+3,U.ignore=!0,this.scrollY.scrollTop+=h-r+3):(this.content.scrollTop=c.offsetTop-d,U.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!m||!c.classList.contains(_$_7134[50]))if(v=0,g=l.left,g>=p&&g<=n||(v++,f=!0),g=l.left+l.width,g>=p&&g<n||v++,v>=a)return 2>a&&(a=this.content.scrollLeft,0==f?n-p>l.width&&(this.content.scrollLeft+=g-n+3,U.ignore=!0,this.scrollX.scrollLeft+=g-n+3):(this.content.scrollLeft=c.offsetLeft-p-50,U.ignore=!0,this.scrollX.scrollLeft-=
|
|
61
|
+
a-this.content.scrollLeft)),!1;return!0},b=function(){var c=0;this.results&&(c=this.results[0]);b.reset.call(this,!0);b.renderX.call(this,0);b.renderY.call(this,c);ka.headers.call(this);0<this.options.pagination&&ta.update.call(this);this.refreshBorders();U.call(this)};b.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};b.refresh=function(){if(!this.tbody.lastChild)return!1;var c=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_7134[42]))+1,a=parseInt(this.tbody.lastChild.getAttribute(_$_7134[43]));
|
|
62
62
|
this.results?(a=this.results.indexOf(a),a<this.results.length-1&&a++,a=this.results[a]):a++;b.renderX.call(this,c);b.renderY.call(this,a);this.content.scrollTop=0;this.content.scrollLeft=0;b.adjustX.call(this,!1,!0);b.adjustY.call(this,!1,!0);U.call(this)};b.renderX=function(c,a,d){var e=this.options.columns,f=0,g=[],h=(this.options.freezeColumns||0)+1;1==this.parent.config.fullscreen?f=this.content.offsetWidth:1==this.options.tableOverflow&&(f=parseInt(this.options.tableWidth));var l=this.headerContainer.offsetWidth||
|
|
63
|
-
0;for(d||(d=0);e[c]&&(!f||l<f||0<d);){!1!==e[c].visible&&e[c].type!==_$
|
|
64
|
-
(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$
|
|
63
|
+
0;for(d||(d=0);e[c]&&(!f||l<f||0<d);){!1!==e[c].visible&&e[c].type!==_$_7134[49]&&(l+=parseInt(e[c].width));0<d&&d--;var m=ba.getWidth.call(this,c,g);m>d&&(d=m);a?(b.renderColumn.call(this,c,h),c--):(b.renderColumn.call(this,c),c++)}ba.batch.call(this,g)};b.renderY=function(c,a,d){var e=0,f=[];1==this.parent.config.fullscreen?e=this.content.offsetHeight:1==this.options.tableOverflow&&(e=0<this.options.pagination?0:parseInt(this.options.tableHeight));e&&(e-=this.thead.offsetHeight+4,this.tfoot.offsetHeight&&
|
|
64
|
+
(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$_7134[42]));h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$_7134[42])):l;var m=this.results?this.results.indexOf(c):c,p=parseInt(this.options.pagination)||0,n=this.tbody.children.length||0,r=!1;for(d||(d=0);this.options.data&&this.options.data[c]&&(!p||n<p||0<d)&&(!e||g<=e||0<d);){var v=b.renderRow.call(this,
|
|
65
65
|
c,h,l);a?(this.tbody.insertBefore(v,this.tbody.firstChild),m--):(this.tbody.appendChild(v),m++);this.rows[c].height?(v.offsetHeight!==this.rows[c].height&&(this.rows[c].height=v.offsetHeight,r=!0),g+=this.rows[c].height):(g=(r=v.offsetHeight)?g+(this.rows[c].height=r):g+(this.options.defaultRowHeight||23),r=!0);0<d&&d--;c=ba.getHeight.call(this,c,f);c>d&&(d=c);c=this.results?this.results[m]:m;n++}ba.batch.call(this,f);r&&U.call(this)};b.renderColumn=function(c,a,d){this.headers[c]||Ca.create.call(this,
|
|
66
66
|
c);if(this.options.nestedHeaders)for(d=0;d<this.options.nestedHeaders.length;d++){var e=oa.getColumns.call(this,d);void 0!==e[c]&&oa.renderCell.call(this,e[c],d,a)}if(this.options.footers)for(d=0;d<this.options.footers.length;d++)e=aa.create.call(this,c,d),null===a?this.tfoot.children[d].appendChild(e):this.tfoot.children[d].insertBefore(e,this.tfoot.children[d].children[a]);null===a?(this.headerContainer.appendChild(this.headers[c]),this.colgroupContainer.appendChild(this.colgroup[c])):(this.headerContainer.insertBefore(this.headers[c],
|
|
67
|
-
this.headerContainer.children[a]),this.colgroupContainer.insertBefore(this.colgroup[c],this.colgroupContainer.children[a]));if(this.tbody.children.length)for(d=0;d<this.tbody.children.length;d++)e=parseInt(this.tbody.children[d].getAttribute(_$
|
|
68
|
-
1].getAttribute(_$
|
|
69
|
-
this.pageNumber}else c=0;var a=0;if(this.merged.rows[c]){for(a=this.options.pagination;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$
|
|
70
|
-
1),!Aa.attached.call(this,c)){if(this.merged.rows[c]){for(;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$
|
|
71
|
-
(c=this.records[d][a].merged[0]);a-=c}b.reset.call(this);b.renderX.call(this,a);0<a&&b.renderX.call(this,a-1,!0);U.updateX.call(this)}this.refreshBorders()};b.pageUp=function(c,a,d){var e=parseInt(this.tbody.firstChild.getAttribute(_$
|
|
72
|
-
e+=ba.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.lastChild)}b.renderY.call(this,f,!a,c);b.adjustY.call(this,!1);d&&d.preventDefault();U.updateY.call(this)}this.refreshBorders()};b.pageDown=function(c,a,d){var e=parseInt(this.tbody.lastChild.getAttribute(_$
|
|
73
|
-
1&&f++);if(f>e){if(null==c)this.tbody.textContent=_$
|
|
74
|
-
else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<c;g++){var h=ba.getWidth.call(this,f);h>e&&(e=h);null===a?f--:f++}c+=e}c>=this.headerContainer.children.length&&(c=this.headerContainer.children.length-1);if((e=this.options.nestedHeaders)&&e.length)for(f=0;f<e.length;f++)for(h=oa.getColumns.call(this,f),g=0;g<c;g++)if(void 0!==h[d+g]&&this.nested.content[f][h[d+g]]){var l=this.nested.content[f][h[d+g]].element,m=l.getAttribute(_$
|
|
67
|
+
this.headerContainer.children[a]),this.colgroupContainer.insertBefore(this.colgroup[c],this.colgroupContainer.children[a]));if(this.tbody.children.length)for(d=0;d<this.tbody.children.length;d++)e=parseInt(this.tbody.children[d].getAttribute(_$_7134[43])),(e=M[_$_7134[51]].call(this,c,e))&&(null===a?this.tbody.children[d].appendChild(e):this.tbody.children[d].insertBefore(e,this.tbody.children[d].children[a]))};b.renderRow=function(c,a,d,e){var f=this.options.freezeColumns||0;null==a&&(a=parseInt(this.headerContainer.children[f+
|
|
68
|
+
1].getAttribute(_$_7134[42])));null==d&&(d=parseInt(this.headerContainer.lastChild.getAttribute(_$_7134[42])));var g=Aa.create.call(this,c,e);if(g.children.length)for(;g.children[f+1];)g.removeChild(g.lastChild);if(0<f){for(var h=0;h<f;h++)g.appendChild(M[_$_7134[51]].call(this,h,c));ka.update.call(this,c)}for(h=a;h<=d;h++)a=M[_$_7134[51]].call(this,h,c,e),g.appendChild(a);return g};b.resetY=function(){if(this.options.pagination){this.pageNumber||(this.pageNumber=0);var c=this.options.pagination*
|
|
69
|
+
this.pageNumber}else c=0;var a=0;if(this.merged.rows[c]){for(a=this.options.pagination;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$_7134[3];this.results&&this.results.length&&(c=this.results[c]);(!this.results||0<this.results.length)&&H.renderY.call(this,c,0,a);0<this.options.pagination&&ta.update.call(this);U.call(this);this.refreshBorders()};b[_$_7134[46]]=function(c,a){if(null!==c&&0<=c)if(0<this.options.pagination)this.page(this.whichPage(c));else if(this.rows[c]||(c=this.options.data.length-
|
|
70
|
+
1),!Aa.attached.call(this,c)){if(this.merged.rows[c]){for(;this.merged.rows[c]&&0<=c;)c--;c++}this.tbody.textContent=_$_7134[3];b.renderY.call(this,c);var d=this.results?this.results.indexOf(c):c;0<d&&(this.results?d=this.results[d-1]:d--,b.renderY.call(this,d,!0));U.updateY.call(this)}if(null!==a&&0<=a&&(this.options.columns[a]||(a=this.options.columns.length-1),c||(c=b.getY.call(this)),!M.attached.call(this,a,c))){if(this.merged.cols[a]){for(d=c=0;d<this.rows.length;d++)this.records[d][a].merged&&
|
|
71
|
+
(c=this.records[d][a].merged[0]);a-=c}b.reset.call(this);b.renderX.call(this,a);0<a&&b.renderX.call(this,a-1,!0);U.updateX.call(this)}this.refreshBorders()};b.pageUp=function(c,a,d){var e=parseInt(this.tbody.firstChild.getAttribute(_$_7134[43]));if(a){c=null;var f=this.results?this.results[0]:0}else this.results?(f=this.results.indexOf(e),0<f&&f--,f=this.results[f]):(f=e,0<f&&f--);if(f<e){if(null==c)this.tbody.textContent=_$_7134[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.lastChild.getAttribute(_$_7134[43]));
|
|
72
|
+
e+=ba.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.lastChild)}b.renderY.call(this,f,!a,c);b.adjustY.call(this,!1);d&&d.preventDefault();U.updateY.call(this)}this.refreshBorders()};b.pageDown=function(c,a,d){var e=parseInt(this.tbody.lastChild.getAttribute(_$_7134[43]));if(a){c=null;var f=this.results?this.results[this.results.length-1]:this.rows.length-1}else this.results?(f=this.results.indexOf(e),f<this.results.length-1&&f++,f=this.results[f]):(f=e,e<this.options.data.length-
|
|
73
|
+
1&&f++);if(f>e){if(null==c)this.tbody.textContent=_$_7134[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.firstChild.getAttribute(_$_7134[43]));e+=ba.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.firstChild)}b.renderY.call(this,f,a,c);b.adjustY.call(this,!0);d&&d.preventDefault();U.updateY.call(this)}this.refreshBorders()};b.removeColumns=function(c,a){var d=null===a?this.headerContainer.lastChild:this.headerContainer.children[a];if(d)d=parseInt(d.getAttribute(_$_7134[42]));
|
|
74
|
+
else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<c;g++){var h=ba.getWidth.call(this,f);h>e&&(e=h);null===a?f--:f++}c+=e}c>=this.headerContainer.children.length&&(c=this.headerContainer.children.length-1);if((e=this.options.nestedHeaders)&&e.length)for(f=0;f<e.length;f++)for(h=oa.getColumns.call(this,f),g=0;g<c;g++)if(void 0!==h[d+g]&&this.nested.content[f][h[d+g]]){var l=this.nested.content[f][h[d+g]].element,m=l.getAttribute(_$_7134[52]);0<m&&m--;0<m?l.setAttribute(_$_7134[52],m):
|
|
75
75
|
l.parentNode&&this.thead.children[f].removeChild(l)}for(g=0;g<c;g++)null===a?(this.headerContainer.removeChild(this.headerContainer.lastChild),this.colgroupContainer.removeChild(this.colgroupContainer.lastChild)):this.headerContainer.children[a]&&(this.headerContainer.removeChild(this.headerContainer.children[a]),this.colgroupContainer.removeChild(this.colgroupContainer.children[a]));for(f=0;f<this.tbody.children.length;f++)for(g=0;g<c;g++)null===a?this.tbody.children[f].removeChild(this.tbody.children[f].lastChild):
|
|
76
|
-
this.tbody.children[f].children[a]&&this.tbody.children[f].removeChild(this.tbody.children[f].children[a]);for(f=0;f<this.tfoot.children.length;f++)for(g=0;g<c;g++)null===a?this.tfoot.children[f].removeChild(this.tfoot.children[f].lastChild):this.tfoot.children[f].removeChild(this.tfoot.children[f].children[a])};b.pageLeft=function(c,a){var d=this.options.freezeColumns||0;if(a){c=null;var e=d}else e=parseInt(this.thead.lastChild.children[d+1].getAttribute(_$
|
|
77
|
-
b.removeColumns.call(this,c,null),b.renderX.call(this,e,!a,c),b.adjustX.call(this,!1),U.updateX.call(this));this.refreshBorders()};b.pageRight=function(c,a){var d=this.options.freezeColumns||0;if(a){c=null;var e=this.options.columns.length-1}else e=parseInt(this.thead.lastChild.lastChild.getAttribute(_$
|
|
78
|
-
b.reset=function(c){1<this.headerContainer.children.length&&(c=c?0:this.options.freezeColumns||0,b.removeColumns.call(this,this.headerContainer.children.length-(c+1),c+1))};b.getX=function(){if(this.thead.lastChild)return parseInt(this.thead.lastChild.children[1].getAttribute(_$
|
|
79
|
-
_$
|
|
80
|
-
b.adjustY=function(c,a){if(!0===a){a=[];for(var d=0;d<this.tbody.children.length;d++)this.tbody.children[d].style.display!==_$
|
|
81
|
-
a=c?this.results[a-1]:this.results[a+1]):c?a--:a++;b.renderY.call(this,a,c)};b.isVisible=k;return b}(),Ma=function(k,b,c,a){for(var d=this.options.columns,e=k,f,g=null;k<d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$
|
|
82
|
-
f!==g&&!a)break;if(c)e=k;else return k}g=f}return e},Na=function(k,b,c,a){for(var d=this.options.columns,e=k,f,g=null;0<k;)if(k--,!1!==d[k].visible&&d[k].type!==_$
|
|
83
|
-
function(c,a,d,e){1==c||3==c?Aa.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):(1==c?H.pageUp.call(this,1,e):H.pageDown.call(this,1,e),Aa.attached.call(this,d)||H[_$
|
|
84
|
-
f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,m=null;if(this.results&&(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var p=this.results?this.results[h]:h;if(!1!==this.rows[p].visible){var n=this.records[p][g].v===_$
|
|
76
|
+
this.tbody.children[f].children[a]&&this.tbody.children[f].removeChild(this.tbody.children[f].children[a]);for(f=0;f<this.tfoot.children.length;f++)for(g=0;g<c;g++)null===a?this.tfoot.children[f].removeChild(this.tfoot.children[f].lastChild):this.tfoot.children[f].removeChild(this.tfoot.children[f].children[a])};b.pageLeft=function(c,a){var d=this.options.freezeColumns||0;if(a){c=null;var e=d}else e=parseInt(this.thead.lastChild.children[d+1].getAttribute(_$_7134[42]))-1;e>=d&&(null==c?b.reset.call(this):
|
|
77
|
+
b.removeColumns.call(this,c,null),b.renderX.call(this,e,!a,c),b.adjustX.call(this,!1),U.updateX.call(this));this.refreshBorders()};b.pageRight=function(c,a){var d=this.options.freezeColumns||0;if(a){c=null;var e=this.options.columns.length-1}else e=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_7134[42]))+1;e<this.options.columns.length&&(null==c?b.reset.call(this):b.removeColumns.call(this,c,d+1),b.renderX.call(this,e,a,c),b.adjustX.call(this,!0),U.updateX.call(this));this.refreshBorders()};
|
|
78
|
+
b.reset=function(c){1<this.headerContainer.children.length&&(c=c?0:this.options.freezeColumns||0,b.removeColumns.call(this,this.headerContainer.children.length-(c+1),c+1))};b.getX=function(){if(this.thead.lastChild)return parseInt(this.thead.lastChild.children[1].getAttribute(_$_7134[42]))};b.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_7134[43]))};b.adjustX=function(c,a){var d=this.options.freezeColumns||0;if(!0===a){for(var e=a=0;e<this.tbody.children.length;e++)if(this.tbody.children[e].style.display!==
|
|
79
|
+
_$_7134[40]&&this.tbody.children[e].children[1]&&k.call(this,this.tbody.children[e].children[1],2)){a=e;break}e=[];for(var f=d+1;f<this.thead.lastChild.children.length;f++)this.tbody.children[a].children[f]&&(k.call(this,this.tbody.children[a].children[f],2)||e.push(f));e.length&&b.removeColumns.call(this,e.length,e[0])}d=c?parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_7134[42])):parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_7134[42]));c?d--:d++;b.renderX.call(this,d,c)};
|
|
80
|
+
b.adjustY=function(c,a){if(!0===a){a=[];for(var d=0;d<this.tbody.children.length;d++)this.tbody.children[d].style.display!==_$_7134[40]&&this.tbody.children[d].children[1]&&(k.call(this,this.tbody.children[d].children[1],2)||a.push(this.tbody.children[d].firstChild.getAttribute(_$_7134[43])));if(a.length)for(d=0;d<a.length;d++)this.rows[a[d]].element.remove()}a=c?parseInt(this.tbody.firstChild.getAttribute(_$_7134[43])):parseInt(this.tbody.lastChild.getAttribute(_$_7134[43]));this.results?(a=this.results.indexOf(a),
|
|
81
|
+
a=c?this.results[a-1]:this.results[a+1]):c?a--:a++;b.renderY.call(this,a,c)};b.isVisible=k;return b}(),Ma=function(k,b,c,a){for(var d=this.options.columns,e=k,f,g=null;k<d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$_7134[49]){f=this.records[b]&&this.records[b][k].v===_$_7134[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_7134[40]){if(this.records[b][k].merged){if(k==k+this.records[b][k].merged[0]&&(e=k,!c))break;f=!1}}else{if(c&&
|
|
82
|
+
f!==g&&!a)break;if(c)e=k;else return k}g=f}return e},Na=function(k,b,c,a){for(var d=this.options.columns,e=k,f,g=null;0<k;)if(k--,!1!==d[k].visible&&d[k].type!==_$_7134[49]){f=this.records[b]&&this.records[b][k].v===_$_7134[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_7134[40]){if(this.records[b][k].merged){e=k-this.records[b][k].merged[0];if(!c)break;f=!0}}else{if(c&&f!==g&&!a)break;if(c)e=k;else return k}g=f}return e},Ta=function(){var k=
|
|
83
|
+
function(c,a,d,e){1==c||3==c?Aa.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):(1==c?H.pageUp.call(this,1,e):H.pageDown.call(this,1,e),Aa.attached.call(this,d)||H[_$_7134[46]].call(this,d))):M.attached.call(this,a,d)||(0==c?H.pageLeft.call(this,1,e):H.pageRight.call(this,1,e),M.attached.call(this,a,d)||H[_$_7134[46]].call(this,d,a))},b=function(c){c.up=b.up;c.down=b.down;c.right=b.right;c.left=b.left;c.last=b.last;c.first=b.first};b.up=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),
|
|
84
|
+
f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{var g=e,h=f,l=h,m=null;if(this.results&&(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var p=this.results?this.results[h]:h;if(!1!==this.rows[p].visible){var n=this.records[p][g].v===_$_7134[3]?!1:!0;null===m&&(m=n);if(this.records[p][g].element&&this.records[p][g].element.style.display==_$_7134[40]){if(this.records[p][g].merged){l=p-this.records[p][g].merged[1];if(!a)break;n=
|
|
85
85
|
!0}}else if(a&&n!==m&&!d){d=l;break a}else if(a)l=this.records[p][g].merged?p-this.records[p][g].merged[1]:p;else{d=p;break a}m=n}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,1,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.down=function(c,a,d){if(c)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,m=null;if(this.results){h=this.results.indexOf(h);
|
|
86
|
-
if(-1==h){d=l;break a}var p=this.results.length-1}else p=this.rows.length-1;for(;h<p;){h++;var n=this.results?this.results[h]:h;if(!1!==this.rows[n].visible){var r=this.records[n][g].v===_$
|
|
86
|
+
if(-1==h){d=l;break a}var p=this.results.length-1}else p=this.rows.length-1;for(;h<p;){h++;var n=this.results?this.results[h]:h;if(!1!==this.rows[n].visible){var r=this.records[n][g].v===_$_7134[3]?!1:!0;null===m&&(m=r);if(this.records[n][g].element&&this.records[n][g].element.style.display==_$_7134[40]){if(this.records[n][g].merged){if(!this.records[n][g].merged[1]&&(l=n,!a))break;r=!0}}else if(a&&r!==m&&!d){d=l;break a}else if(a)l=n;else{d=n;break a}m=r}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],
|
|
87
87
|
d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,3,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.right=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ma.call(this,e,f,a,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,2,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.left=function(c,a,d){if(c)var e=parseInt(this.selectedCell[2]),
|
|
88
88
|
f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Na.call(this,e,f,a,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,0,e,f,a),this.updateSelectionFromCoords(c,d,e,f))};b.first=function(c,a){a?b.up.call(this,c,!0,!0):b.left.call(this,c,!0,!0)};b.last=function(c,a){a?b.down.call(this,c,!0,!0):b.right.call(this,c,!0,!0)};return b}(),Ua=function(){return function(k){k.save=Oa;k.fullscreen=Ka;k.setReadOnly=
|
|
89
|
-
Ga;k.getReadOnly=Ga;k.isReadOnly=Ga;k.setPlugins=function(b){pa.call(this.parent,b)};k.showIndex=function(){xa.call(this,!0)};k.hideIndex=function(){xa.call(this,!1)};k[_$
|
|
90
|
-
_$
|
|
91
|
-
minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$
|
|
92
|
-
tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$
|
|
97
|
-
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=_$
|
|
98
|
-
this.options.columns[g].type!=_$
|
|
99
|
-
b);1!=this.config.secureFormulas&&console.log(_$
|
|
100
|
-
h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$
|
|
101
|
-
!1===e.search&&qa.hide.call(this);!0===e.toolbar?fa.show.call(this.parent):!1===e.toolbar&&fa.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));K.call(this,_$
|
|
102
|
-
this.ignoreHistory){var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=b}};k.undo=function(){if(0<=this.historyIndex)var b=this.history[this.historyIndex--];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$
|
|
103
|
-
b.columnNumber:b.columnNumber+1,b.numOfColumns);else if(b.action==_$
|
|
104
|
-
null,null,1);else if(b.action==_$
|
|
105
|
-
value:b.records[d].oldValue};void 0!==b.records[d].y&&(e.y=b.records[d].y);b.records[d].oldStyle&&(e.style=b.records[d].oldStyle);a.push(e)}c[b.action](a)}else b.action==_$
|
|
106
|
-
!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$
|
|
107
|
-
else if(b.action==_$
|
|
108
|
-
b.direction,b.newValue);else if(b.action==_$
|
|
109
|
-
plugin:b[a[d]],options:{}})}if(c&&c.length)for(d=0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var f=c[d].plugin;var g=c[d].options}typeof f===_$
|
|
110
|
-
_$
|
|
111
|
-
typeof b.type==_$
|
|
112
|
-
e)){if(this.results&&0<this.results.length)return console.error(_$
|
|
113
|
-
(this.records[e][d].element.style.overflow=_$
|
|
114
|
-
e=parseInt(b.getAttribute(_$
|
|
115
|
-
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);da.build(this.parent);a.removeAttribute(_$
|
|
116
|
-
e.style.opacity=_$
|
|
117
|
-
(O(c.target.innerText)?(c.target.classList.add(_$
|
|
118
|
-
_$
|
|
119
|
-
var c=this.getPrimaryKey();if(!1!==c)return L.call(this,c,b)};k.setId=function(b,c){if(void 0!==c&&0<=parseInt(b)){var a={};a[b]=c}else a=b;b=Object.keys(a);if(b.length){for(var d=0;d<b.length;d++)c=a[b[d]],this.rows[b[d]].id=c,k[_$
|
|
120
|
-
function(c){for(var a=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,h=sa.getId.call(this,g);if(!h)if(d[g])h=d[g];else if(h=sa.next.call(this))d[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=Z.call(this,f);a[g].data[f]=c[e].value}sa.setId.call(this,d);return a.filter(function(l){return null!=l})},b=function(c){var a=c[0];if(0<=[_$
|
|
121
|
-
1==c[1].length?d[a]=c[1][0]:d[a]=c[1];return d};return function(c,a,d,e){var f=this.parent,g=this;d=null;var h=b.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=F.call(f,_$
|
|
122
|
-
l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$
|
|
123
|
-
arguments[1]]);if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var b=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$
|
|
124
|
-
this.records[c][b]&&this.records[c][b].element||(this.selectedCell=this.getHighlighted(),b=this.selectedCell[0],c=this.selectedCell[1]);var a=this.getHighlighted(),d=a[0],e=a[1],f=a[2];a=a[3];var g=k?_$
|
|
125
|
-
this.rows[e].element)this.rows[e].element.classList[g](_$
|
|
126
|
-
f||(f=d);a||(a=e);return null==b?c>=e&&c<=a:null==c?b>=d&&b<=f:b>=d&&b<=f&&c>=e&&c<=a};k.reset=function(){if(this.selectedCell)b=1,this.edition&&da.close.call(this,this.edition,!0),this.resetBorders(_$
|
|
127
|
-
a>=this.options.columns.length||d>=this.rows.length)};k[_$
|
|
128
|
-
h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),r[n]=!0;v=Object.keys(r);if(v.length)for(u=0;u<v.length;u++)n=E.getCoordsFromColumnName(v[u]),r=this.options.mergeCells[v[u]],n[0]<h&&(h=n[0]),n[0]+r[0]-1>l&&(l=n[0]+r[0]-1),n[1]<m&&(m=n[1]),n[1]+r[1]-1>p&&(p=n[1]+r[1]-1)}}f==_$
|
|
129
|
-
c),0==n&&F.call(this.parent,_$
|
|
130
|
-
1,this.records.length-1)};k.getRange=function(){var b=this.selectedCell;if(!b)return _$
|
|
131
|
-
k.reset;a.refreshBorders=k.refresh};k[_$
|
|
132
|
-
h);this.content.appendChild(l.element)}l.x1=a;l.y1=d;l.x2=e;l.y2=f;h=this.headers[a]?this.headers[a].offsetLeft:0;var m=this.headers[e]?this.headers[e].offsetLeft:0,p=this.rows[d].element?this.rows[d].element.offsetTop:0,n=this.rows[f].element?this.rows[f].element.offsetTop:0;l.element.style.top=_$
|
|
133
|
-
C=parseInt(this.tbody.lastChild.getAttribute(_$
|
|
134
|
-
1].offsetLeft,l.element.style.borderLeftColor=g==_$
|
|
135
|
-
l.element.style.borderTopColor=g==_$
|
|
136
|
-
0)&&(a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||!a&&e||(a&&!e?(e=d+this.content.scrollLeft,e>h+m&&(l.element.style.borderRightWidth=_$
|
|
137
|
-
1!=v?(this.corner.style.top=p+n-2+_$
|
|
138
|
-
(this.corner.style.top=_$
|
|
139
|
-
a[e])}this.edition&&(d=this.parent.input,da.position.call(this,d.x,d.y))};k.destroy=function(a){var d;if(d=this.borders[a])d.element.remove(),delete this.borders[a]};return k}(),Va=function(){var k=function(b){b.setGroup=k[_$
|
|
140
|
-
a.appendChild(b),c=this.headers[c])&&(c=c.querySelector(_$
|
|
141
|
-
k.event={x:parseInt(c),w:b.target.offsetWidth,p:b.pageX})},end:function(b){var c=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);b=d.indexOf(parseInt(k.event.y));if(d.length&&-1<b)for(var e=0;e<d.length;e++)c.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==b?(d.push(k.event.y),c.push(k.event.h)):c[b]=k.event.h;this.setHeight(d,a,c)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$
|
|
142
|
-
d=this.getSelectedColumns();b=d.indexOf(parseInt(k.event.x));if(d.length&&-1<b)for(e=0;e<d.length;e++)c.push(parseInt(this.options.columns[d[e]].width));else d=[];-1==b?(d.push(k.event.x),c.push(k.event.w)):c[b]=k.event.w;this.setWidth(d,a,c)}k.event=null},update:function(b){null!=k.event.y?(b=b.pageY-k.event.p,0<k.event.h+b&&(this.rows[k.event.y].element.style.height=k.event.h+b+_$
|
|
143
|
-
k.event.w+b),this.options.columns[k.event.x].width=k.event.w+b,0<this.options.freezeColumns&&ka.width.call(this),this.refreshBorders()))},cancel:function(){k.end.call(this)}};return k}(),Pa=function(){var k={start:function(b){var c=this.parent.helper;b=parseInt(b.target.getAttribute(_$
|
|
144
|
-
this.records[d][b].element.classList.add(_$
|
|
145
|
-
this.tbody.children[b].getAttribute(_$
|
|
146
|
-
else{b=b.target.clientWidth/2>b.offsetX;k.event.d=b?k.event.x<c?parseInt(c)-1:parseInt(c):k.event.x>c?parseInt(c)+1:parseInt(c);c=this.headers[c].getBoundingClientRect();var a=this.content.getBoundingClientRect();this.parent.helper.style.left=(b?c.left:c.right)-a.left+_$
|
|
147
|
-
this.merged.rows[a]?console.error(_$
|
|
148
|
-
parseInt(b.target.getAttribute(_$
|
|
149
|
-
c.style.left=a.left-d.left+_$
|
|
150
|
-
for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$
|
|
151
|
-
if(null!=c){var a=c=parseInt(c),d=b.target.clientHeight/2>b.offsetY;d?k.event.y<c&&(a=c-1):k.event.y>c&&(a=c+1);b=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(b=!0):this.merged.rows[a+1]&&(b=!0));b||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-a.top+_$
|
|
152
|
-
d&&(a=d-1):k.event.x>d&&(a=d+1),b=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(b=!0):this.merged.cols[a+1]&&(b=!0)),b||(k.event.d=a,a=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?a.left:a.right)-d.left+_$
|
|
89
|
+
Ga;k.getReadOnly=Ga;k.isReadOnly=Ga;k.setPlugins=function(b){pa.call(this.parent,b)};k.showIndex=function(){xa.call(this,!0)};k.hideIndex=function(){xa.call(this,!1)};k[_$_7134[46]]=H[_$_7134[46]];k.undo=function(){V.undo.call(k.parent)};k.redo=function(){V.redo.call(k.parent)};k.isEditable=function(){return R.call(k.parent,k)};k.dispatch=function(){return F.apply(this.parent,arguments)};k.setViewport=function(b,c){this.options.tableOverflow=!0;b=parseInt(b);c=parseInt(c);this.content.style.overflow=
|
|
90
|
+
_$_7134[49];100<b&&(this.options.tableWidth=b+_$_7134[44],this.content.style.maxWidth=this.options.tableWidth);100<c&&(this.options.tableHeight=parseInt(c)+_$_7134[44],this.content.style.maxHeight=this.options.tableHeight);H.refresh.call(this);fa.update.call(this.parent,this)}}}(),Da=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,
|
|
91
|
+
minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_7134[36],csvHeaders:!0,csvDelimiter:_$_7134[25],columnSorting:!0,columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$_7134[53],
|
|
92
|
+
tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_7134[3],worksheetName:null,worksheetState:null,filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1},b={application:_$_7134[54],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,
|
|
93
|
+
parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,allowMoveWorksheet:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,
|
|
94
|
+
ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresizerow:null,onresizecolumn:null,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,
|
|
95
|
+
onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,onbeforeformula:null,onformulachain:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},c=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&
|
|
96
|
+
e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$_7134[17]&&(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]!==_$_7134[13]){var f=this.options.data[0].data&&0<Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>
|
|
97
|
+
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=_$_7134[55]):this.options.columns[g]={type:_$_7134[55]},this.options.columns[g].type==_$_7134[56]&&(this.options.columns[g].type=_$_7134[57],this.options.columns[g].autocomplete=!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=f[g]),this.options.columns[g].width||(this.options.columns[g].width=this.options.defaultColWidth),
|
|
98
|
+
this.options.columns[g].type!=_$_7134[57]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_7134[57]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_7134[58],dataType:_$_7134[59],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=d[_$_7134[51]];e.setConfig=d[_$_7134[11]]};d.spreadsheet=function(e){this.config=c(e,
|
|
99
|
+
b);1!=this.config.secureFormulas&&console.log(_$_7134[60])};d.worksheet=function(e){var f=this;f.options=c(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_7134[58],dataType:_$_7134[55],group:f.parent.name,success:function(g){g=E.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:_$_7134[55],width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_7134[13]&&(f.options.columns[l].title=
|
|
100
|
+
h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_7134[58],dataType:_$_7134[59],group:f.parent.name,success:function(g){a.call(f,g)}}):a.call(f)};d[_$_7134[51]]=function(){return this.options};d[_$_7134[11]]=function(e){typeof e==_$_7134[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_7134[13]&&(this.options[f[g]]=e[f[g]]);!0===e.filters?ca.show.call(this):!1===e.filters&&ca.hide.call(this);!0===e.search?qa.show.call(this):
|
|
101
|
+
!1===e.search&&qa.hide.call(this);!0===e.toolbar?fa.show.call(this.parent):!1===e.toolbar&&fa.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));K.call(this,_$_7134[61],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof b[f[g]]!==_$_7134[13]&&(this.config[f[g]]=e[f[g]])};return d}(),V=function(k){k=function(b){if(1!=
|
|
102
|
+
this.ignoreHistory){var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=b}};k.undo=function(){if(0<=this.historyIndex)var b=this.history[this.historyIndex--];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_7134[62])c.deleteRow(b.insertBefore?b.rowNumber:b.rowNumber+1,b.numOfRows);else if(b.action==_$_7134[63])c.insertRow(b.numOfRows,b.rowNumber,1,b.data),M.setAttributes.call(c,b.attributes);else if(b.action==_$_7134[64])c.deleteColumn(b.insertBefore?
|
|
103
|
+
b.columnNumber:b.columnNumber+1,b.numOfColumns);else if(b.action==_$_7134[65])c.insertColumn(b.numOfColumns,b.columnNumber,1,b.properties,b.data,b.extra),M.setAttributes.call(c,b.attributes);else if(b.action==_$_7134[66])c.moveRow(b.newValue,b.oldValue);else if(b.action==_$_7134[67])c.moveColumn(b.newValue,b.oldValue);else if(b.action==_$_7134[68])c.removeMerge(b.newValue,!0),c.setMerge(b.oldValue);else if(b.action==_$_7134[69])c.setMerge(b.oldValue);else if(b.action==_$_7134[70])c.setStyle(b.oldValue,
|
|
104
|
+
null,null,1);else if(b.action==_$_7134[71])c.setStyle(b.oldValue);else if(b.action==_$_7134[72])c.setWidth(b.column,b.oldValue);else if(b.action==_$_7134[73])c.setHeight(b.row,b.oldValue);else if(b.action==_$_7134[74])c.setHeader(b.column,b.oldValue);else if(b.action==_$_7134[75])c.setComments(b.oldValue);else if(b.action==_$_7134[76])c.orderBy(b.column,b.direction?0:1,b.oldValue);else if(b.action==_$_7134[77]||b.action==_$_7134[78]){var a=[];for(var d=0;d<b.records.length;d++){var e={x:b.records[d].x,
|
|
105
|
+
value:b.records[d].oldValue};void 0!==b.records[d].y&&(e.y=b.records[d].y);b.records[d].oldStyle&&(e.style=b.records[d].oldStyle);a.push(e)}c[b.action](a)}else b.action==_$_7134[79]?c.renameWorksheet(b.index,b.oldValue):b.action==_$_7134[80]&&c.moveWorksheet(b.t,b.f);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_7134[81],c,b)}};k.redo=function(){if(this.historyIndex<this.history.length-1)var b=this.history[++this.historyIndex];if(b){this.ignoreHistory=
|
|
106
|
+
!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_7134[62])c.insertRow(b.numOfRows,b.rowNumber,b.insertBefore,b.data);else if(b.action==_$_7134[63])c.deleteRow(b.rowNumber,b.numOfRows);else if(b.action==_$_7134[64])c.insertColumn(b.numOfColumns,b.columnNumber,b.insertBefore,b.properties,b.data);else if(b.action==_$_7134[65])c.deleteColumn(b.columnNumber,b.numOfColumns);else if(b.action==_$_7134[66])c.moveRow(b.oldValue,b.newValue);else if(b.action==_$_7134[67])c.moveColumn(b.oldValue,b.newValue);
|
|
107
|
+
else if(b.action==_$_7134[68])c.setMerge(b.newValue);else if(b.action==_$_7134[69])c.removeMerge(b.newValue);else if(b.action==_$_7134[70])c.setStyle(b.newValue,null,null,1);else if(b.action==_$_7134[71])c.resetStyle(b.cells);else if(b.action==_$_7134[72])c.setWidth(b.column,b.newValue);else if(b.action==_$_7134[73])c.setHeight(b.row,b.newValue);else if(b.action==_$_7134[74])c.setHeader(b.column,b.newValue);else if(b.action==_$_7134[75])c.setComments(b.newValue);else if(b.action==_$_7134[76])c.orderBy(b.column,
|
|
108
|
+
b.direction,b.newValue);else if(b.action==_$_7134[77]||b.action==_$_7134[78])c[b.action](b.records);else b.action==_$_7134[79]?c.renameWorksheet(b.index,b.newValue):b.action==_$_7134[80]&&c.moveWorksheet(b.f,b.t);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_7134[82],c,b)}};return k}(),pa=function(){var k=function(b){var c=null;if(Array.isArray(b))c=b;else if(typeof b==_$_7134[83]){c=[];var a=Object.keys(b);for(var d=0;d<a.length;d++)c.push({name:a[d],
|
|
109
|
+
plugin:b[a[d]],options:{}})}if(c&&c.length)for(d=0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var f=c[d].plugin;var g=c[d].options}typeof f===_$_7134[84]&&(this.plugins[e]=f.call(t,this,g,this.config),typeof f.license==_$_7134[84]&&t.license&&f.license(t.license))}};k.execute=function(b,c){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var d=0;d<a.length;d++)if(typeof this.plugins[a[d]][b]==_$_7134[84]){var e=this.plugins[a[d]][b].apply(this.plugins[a[d]],c);e&&(b==
|
|
110
|
+
_$_7134[85]&&(c[4]=e),b==_$_7134[86]&&(c[0]=e))}return c}};k.onevent=function(b){return function(){var c,a,d=this.plugins;if(d){var e=Object.keys(d);if(e.length)for(a=0;a<e.length;a++)if(typeof d[e[a]][b]==_$_7134[84]){var f=d[e[a]][b].apply(d[e[a]],arguments);typeof f!==_$_7134[13]&&(c=f)}}return c}}(_$_7134[87]);return k}(),da=function(){var k=function(b){b.getEditor=k[_$_7134[51]];b.openEditor=k.open;b.closeEditor=k.close};k[_$_7134[51]]=function(b,c){b=Ha[_$_7134[51]].call(this,b,c);return[b.type&&
|
|
111
|
+
typeof b.type==_$_7134[83]?b.type:t.editors[b.type],b]};k.open=function(b,c,a){if(!R.call(this.parent,this))return!1;if(1!=b.classList.contains(_$_7134[18])){var d=parseInt(b.getAttribute(_$_7134[42])),e=parseInt(b.getAttribute(_$_7134[43]));if(!0===this.options.locked){var f=E.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][d].merged)d-=f[0],e-=f[1],b=this.records[e][d].element;if(!M.attached.call(this,d,
|
|
112
|
+
e)){if(this.results&&0<this.results.length)return console.error(_$_7134[88]),!1;H[_$_7134[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;if(113===a.keyCode||a.type!==_$_7134[89])f.selected=!0;f.innerText=_$_7134[3];F.call(this.parent,_$_7134[90],this,b,d,e);c=1==c?_$_7134[3]:L.call(this,d,e);var g=k[_$_7134[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_7134[84]&&(!1===g[0].openEditor(b,c,d,e,this,g[1],a)?h=!1:F.call(this.parent,_$_7134[91],this,b,d,e,f,g[1]));h&&(1==this.options.textOverflow&&
|
|
113
|
+
(this.records[e][d].element.style.overflow=_$_7134[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_7134[49])),this.edition=b,f.classList.add(_$_7134[92]),1==this.parent.config.editorFormulas&&O(c)&&(f.classList.add(_$_7134[93]),la.parse.call(this,f),b=document.createTextNode(_$_7134[3]),f.appendChild(b),jSuites.focus(f)))}};k.close=function(b,c){null===b&&(b=this.edition);this.parent.input.classList.contains(_$_7134[93])&&la.close.call(this,this.parent.input);var a,d=parseInt(b.getAttribute(_$_7134[42])),
|
|
114
|
+
e=parseInt(b.getAttribute(_$_7134[43]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&a.element.innerText==_$_7134[3]&&(this.records[e][d].element.style.overflow=_$_7134[3]);a=k[_$_7134[51]].call(this,d,e);if(1==c){var f=null;typeof a[0].closeEditor==_$_7134[84]&&(a=a[0].closeEditor(b,!0,d,e,this,a[1]),void 0!==a&&(f=a));null!==f&&L.call(this,d,e)!=f&&this.setValue(b,f)}else a[0].closeEditor(b,!1,d,e,this,a[1]);F.call(this.parent,_$_7134[94],this,b,d,e,f,c);a=this.parent.input;
|
|
115
|
+
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);da.build(this.parent);a.removeAttribute(_$_7134[95]);a.removeAttribute(_$_7134[96]);a.removeAttribute(_$_7134[97]);this.edition=a.mask=null;this.refreshBorders()};k.position=function(b,c){var a=null;if(a=this.records[c][b].element){var d=this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=b;e.y=c;0==a.width&&0==a.height?
|
|
116
|
+
e.style.opacity=_$_7134[98]:(e.setAttribute(_$_7134[99],_$_7134[3]),b=a.top-d.top+1,c=a.left-d.left+1,e.style.top=b+_$_7134[44],e.style.left=c+_$_7134[44],e.style.minWidth=a.width-1+_$_7134[44],e.style.minHeight=a.height-1+_$_7134[44],setTimeout(function(){e.focus()},0))}};k.build=function(b){b.input||(b.input=document.createElement(_$_7134[20]));b.input.className=_$_7134[100];b.input.setAttribute(_$_7134[101],!0);b.input.innerText=_$_7134[3];b.input.oninput=function(c){1==t.current.parent.config.editorFormulas&&
|
|
117
|
+
(O(c.target.innerText)?(c.target.classList.add(_$_7134[93]),c.target.selected=!0):c.target.classList.contains(_$_7134[93])&&la.close.call(t.current,this))};b.input.onclick=function(){this.selected=!0};return b.input};return k}(),F=function(k){var b;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_7134[84]){var c=this.config.onevent.apply(this,arguments);typeof c!==_$_7134[13]&&(b=c)}typeof this.config[k]==_$_7134[84]&&(c=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==
|
|
118
|
+
_$_7134[13]&&(b=c));c=pa.onevent.apply(this,arguments);typeof c!==_$_7134[13]&&(b=c)}return b},sa=function(){var k=function(b){b.sequence=0;b.getNextSequence=k.next;b.getRowId=k.getId;b.setRowId=k.setId;b.getRowById=k.getRowById};k[_$_7134[51]]=function(){return this.sequence};k[_$_7134[11]]=function(b,c){if(b>this.sequence||c)this.sequence=b};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(b){if(this.rows[b]&&this.rows[b].id)return this.rows[b].id;
|
|
119
|
+
var c=this.getPrimaryKey();if(!1!==c)return L.call(this,c,b)};k.setId=function(b,c){if(void 0!==c&&0<=parseInt(b)){var a={};a[b]=c}else a=b;b=Object.keys(a);if(b.length){for(var d=0;d<b.length;d++)c=a[b[d]],this.rows[b[d]].id=c,k[_$_7134[11]].call(this,c);K.call(this,_$_7134[102],[a]);F.call(this.parent,_$_7134[103],this,a)}};k.getRowById=function(b,c){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,a)==b)return!0===c?this.rows[a]:this.options.data[a];return!1};return k}(),Oa=function(){var k=
|
|
120
|
+
function(c){for(var a=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,h=sa.getId.call(this,g);if(!h)if(d[g])h=d[g];else if(h=sa.next.call(this))d[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=Z.call(this,f);a[g].data[f]=c[e].value}sa.setId.call(this,d);return a.filter(function(l){return null!=l})},b=function(c){var a=c[0];if(0<=[_$_7134[104],_$_7134[105],_$_7134[102],_$_7134[106]].indexOf(a))return!1;var d={};a==_$_7134[77]||a==_$_7134[107]?(a=_$_7134[108],d[a]=k.call(this,c[1].data)):Array.isArray(c[1])&&
|
|
121
|
+
1==c[1].length?d[a]=c[1][0]:d[a]=c[1];return d};return function(c,a,d,e){var f=this.parent,g=this;d=null;var h=b.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=F.call(f,_$_7134[109],f,g,a))a=h;else if(!1===h)return!1;La.call(f,!0);jSuites.ajax({url:c,method:_$_7134[110],dataType:_$_7134[59],data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_7134[111],_$_7134[112]+d)},success:function(l){f.element.classList.contains(_$_7134[113])&&f.element.classList.remove(_$_7134[113]);
|
|
122
|
+
l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_7134[114]+l.message):jSuites.notification(l)),l.success?typeof e===_$_7134[84]?e(l):l.data&&Array.isArray(l.data)&&M.updateAll.call(g,l.data):l.error&&(alert(_$_7134[115]),window.open(window.location.href,_$_7134[116])));F.call(f,_$_7134[117],f,g,a,l)},error:function(){f.element.classList.add(_$_7134[113])}})}}(),K=function(){return function(){pa.execute.call(this.parent,_$_7134[118],[this,arguments[0],
|
|
123
|
+
arguments[1]]);if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var b=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$_7134[119])?k+(_$_7134[120]+b):k+(_$_7134[121]+b)}else this.options.persistence&&(k=typeof this.options.persistence==_$_7134[17]?this.options.persistence:this.options.url);k&&Oa.call(this,k,arguments)}}}(),Ea=function(k){if(this.selectedCell){var b=this.selectedCell[0],c=this.selectedCell[1];this.records&&this.records[c]&&
|
|
124
|
+
this.records[c][b]&&this.records[c][b].element||(this.selectedCell=this.getHighlighted(),b=this.selectedCell[0],c=this.selectedCell[1]);var a=this.getHighlighted(),d=a[0],e=a[1],f=a[2];a=a[3];var g=k?_$_7134[122]:_$_7134[123];this.records[c]&&this.records[c][b]&&this.records[c][b].element&&(this.records[c][b].element.classList[g](_$_7134[124]),this.cursor=k?this.records[c][b].element:null);for(k=d;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$_7134[125]);for(;e<=a;e++)if(this.rows[e]&&
|
|
125
|
+
this.rows[e].element)this.rows[e].element.classList[g](_$_7134[125])}},ya=function(){var k=function(b){b.resetSelection=k.reset;b.updateSelection=k.fromElements;b.updateSelectionFromCoords=k[_$_7134[11]];b.selectAll=k.all;b.isSelected=k.isSelected;b.getHighlighted=k.getHighlighted;b.getRange=k.getRange};k.getHighlighted=function(){var b=this.borders;return(b=b.main)?[b.x1,b.y1,b.x2,b.y2]:null};k.isSelected=function(b,c,a){if(!a&&(a=this.getHighlighted(),!a))return!1;var d=a[0],e=a[1],f=a[2];a=a[3];
|
|
126
|
+
f||(f=d);a||(a=e);return null==b?c>=e&&c<=a:null==c?b>=d&&b<=f:b>=d&&b<=f&&c>=e&&c<=a};k.reset=function(){if(this.selectedCell)b=1,this.edition&&da.close.call(this,this.edition,!0),this.resetBorders(_$_7134[126],!0),this.resetBorders(_$_7134[127],!0),this.selectedCell=null,1==b&&F.call(this.parent,_$_7134[128],this);else var b=0;return b};k.refresh=function(){this.selectedCell&&k[_$_7134[11]].call(this,this.selectedCell)};k.isValid=function(b,c,a,d){return!(b>=this.options.columns.length||c>=this.rows.length||
|
|
127
|
+
a>=this.options.columns.length||d>=this.rows.length)};k[_$_7134[11]]=function(b,c,a,d,e,f,g){f||(f=_$_7134[126]);Array.isArray(b)&&(d=b[3],a=b[2],c=b[1],b=b[0]);null==a&&(a=b);null==d&&(d=c);if(!k.isValid.call(this,b,c,a,d))return!1;if(null!=b){if(parseInt(b)<parseInt(a))var h=parseInt(b),l=parseInt(a);else h=parseInt(a),l=parseInt(b);if(parseInt(c)<parseInt(d))var m=parseInt(c),p=parseInt(d);else m=parseInt(d),p=parseInt(c);var n;var r={};if(this.options.mergeCells){for(var v=m;v<=p;v++)for(var u=
|
|
128
|
+
h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),r[n]=!0;v=Object.keys(r);if(v.length)for(u=0;u<v.length;u++)n=E.getCoordsFromColumnName(v[u]),r=this.options.mergeCells[v[u]],n[0]<h&&(h=n[0]),n[0]+r[0]-1>l&&(l=n[0]+r[0]-1),n[1]<m&&(m=n[1]),n[1]+r[1]-1>p&&(p=n[1]+r[1]-1)}}f==_$_7134[126]&&(this.selectedCell?(Ea.call(this,!1),n=1):n=0,this.selectedCell=[b,c,a,d],this.records[d][a].element&&H.isVisible.call(this,this.records[d][a].element),da.position.call(this,b,
|
|
129
|
+
c),0==n&&F.call(this.parent,_$_7134[129],this));ha[_$_7134[11]].call(this,h,m,l,p,f,g);f==_$_7134[126]&&(F.call(this.parent,_$_7134[130],this,h,m,l,p,e),fa.update.call(this.parent,t.current,this.selectedCell))};k.fromElements=function(b,c,a){var d=b.getAttribute(_$_7134[42]);b=b.getAttribute(_$_7134[43]);if(c){var e=c.getAttribute(_$_7134[42]);c=c.getAttribute(_$_7134[43])}else e=d,c=b;this.updateSelectionFromCoords(d,b,e,c,a)};k.all=function(){k[_$_7134[11]].call(this,0,0,this.options.columns.length-
|
|
130
|
+
1,this.records.length-1)};k.getRange=function(){var b=this.selectedCell;if(!b)return _$_7134[3];var c=E.getColumnNameFromCoords(b[0],b[1]);b=E.getColumnNameFromCoords(b[2],b[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_7134[131])?_$_7134[132]+a+_$_7134[133]:a+_$_7134[134];return c==b?a+c:a+t.helpers.getRangeFromTokens(t.helpers.getTokensFromRange(c+_$_7134[135]+b))};return k}(),ha=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_7134[11]];a.getBorder=k[_$_7134[51]];a.resetBorders=
|
|
131
|
+
k.reset;a.refreshBorders=k.refresh};k[_$_7134[51]]=function(a){return this.borders[a]};var b=function(a,d,e,f,g,h){g||(g=0);if(!ya.isValid.call(this,a,d,e,f))return!1;if(this.borders[g])l=this.borders[g];else{var l={};l.element=document.createElement(_$_7134[20]);l.element.classList.add(_$_7134[136]);g==_$_7134[127]||g==_$_7134[137]||g==_$_7134[126]?l.element.classList.add(_$_7134[138]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_7134[139],l.element.style.borderColor=
|
|
132
|
+
h);this.content.appendChild(l.element)}l.x1=a;l.y1=d;l.x2=e;l.y2=f;h=this.headers[a]?this.headers[a].offsetLeft:0;var m=this.headers[e]?this.headers[e].offsetLeft:0,p=this.rows[d].element?this.rows[d].element.offsetTop:0,n=this.rows[f].element?this.rows[f].element.offsetTop:0;l.element.style.top=_$_7134[140];l.element.style.left=_$_7134[140];l.active=0;var r=this.options.freezeColumns||0,v=!1,u=null,y=null,w=null,C=null;this.tbody.firstChild&&(y=parseInt(this.tbody.firstChild.getAttribute(_$_7134[43])),
|
|
133
|
+
C=parseInt(this.tbody.lastChild.getAttribute(_$_7134[43])));this.thead.lastChild&&(u=parseInt(this.thead.lastChild.children[r+1].getAttribute(_$_7134[42])),w=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_7134[42])),this.thead.lastChild.children[1].style.display==_$_7134[40]&&(u=Ma.call(this,u,y)),this.thead.lastChild.lastChild.style.display==_$_7134[40]&&(w=Na.call(this,w,C)));null==u||e<u&&a>=r||a>w||f<y||d>C||(h?l.element.style.borderLeftColor=l.color?l.color:_$_7134[3]:(h=this.thead.lastChild.children[r+
|
|
134
|
+
1].offsetLeft,l.element.style.borderLeftColor=g==_$_7134[127]?_$_7134[141]:_$_7134[142]),m?(m+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_7134[3]):(e>w?(m=this.headers[w].offsetLeft+this.headers[w].offsetWidth,v=!0):m=this.thead.lastChild.children[r].offsetLeft+this.thead.lastChild.children[r].offsetWidth,l.element.style.borderRightColor=g==_$_7134[127]?_$_7134[141]:_$_7134[142]),m=m-h-1,p?l.element.style.borderTopColor=l.color?l.color:_$_7134[3]:(p=this.tbody.firstChild.offsetTop,
|
|
135
|
+
l.element.style.borderTopColor=g==_$_7134[127]?_$_7134[141]:_$_7134[142]),n?(n+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_7134[3]):(n=this.rows[C].element.offsetTop+this.rows[C].element.offsetHeight,l.element.style.borderBottomColor=g==_$_7134[127]?_$_7134[141]:_$_7134[142],v=!0),n=n-p-1,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_7134[3],l.element.style.borderRightWidth=_$_7134[3],d=0<this.content.scrollLeft?ka.getWidth.call(this):
|
|
136
|
+
0)&&(a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||!a&&e||(a&&!e?(e=d+this.content.scrollLeft,e>h+m&&(l.element.style.borderRightWidth=_$_7134[143],m+=e-(h+m))):(e=d+this.content.scrollLeft,e>h&&(e-=h,e>m?h=p=-2E3:(h=h+e+1,m-=e,l.element.style.borderLeftWidth=_$_7134[143]))))),l.element.style.top=p+_$_7134[44],l.element.style.left=h+_$_7134[44],l.element.style.width=m+_$_7134[44],l.element.style.height=n+_$_7134[44],l.t=p,l.l=h,l.w=m,l.h=n,l.active=1);g==_$_7134[126]&&(l.active&&
|
|
137
|
+
1!=v?(this.corner.style.top=p+n-2+_$_7134[44],this.corner.style.left=h+m-2+_$_7134[44]):(this.corner.style.top=_$_7134[140],this.corner.style.left=_$_7134[140]));this.borders[g]=l},c=function(a,d){a.element.style.top=_$_7134[140];a.element.style.left=_$_7134[140];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_7134[11]]=function(a,d,e,f,g,h){b.call(this,a,d,e,f,g,h);g==_$_7134[126]&&(Ea.call(this,!0),K.call(this,_$_7134[104],{x1:a,y1:d,x2:e,y2:f}))};k.reset=function(a,d){a&&a!=_$_7134[126]||
|
|
138
|
+
(this.corner.style.top=_$_7134[140],this.corner.style.left=_$_7134[140],Ea.call(this,!1));if(a)this.borders[a]&&c(this.borders[a],d);else{d=Object.keys(this.borders);for(var e=0;e<d.length;e++)c(this.borders[d[e]])}a&&a!=_$_7134[126]||K.call(this,_$_7134[105])};k.refresh=function(a){var d=this.borders;if(a)d[a]&&null!=d[a].x1&&b.call(this,d[a].x1,d[a].y1,d[a].x2,d[a].y2,a);else{a=Object.keys(d);for(var e=0;e<a.length;e++)d[a[e]]&&null!=d[a[e]].x1&&b.call(this,d[a[e]].x1,d[a[e]].y1,d[a[e]].x2,d[a[e]].y2,
|
|
139
|
+
a[e])}this.edition&&(d=this.parent.input,da.position.call(this,d.x,d.y))};k.destroy=function(a){var d;if(d=this.borders[a])d.element.remove(),delete this.borders[a]};return k}(),Va=function(){var k=function(b){b.setGroup=k[_$_7134[11]];b.unsetGroup=k.unset};k[_$_7134[11]]=function(b,c,a){0==b&&(a=document.createElement(_$_7134[144]),a.classList.add(_$_7134[145]),this.thead.insertBefore(a,this.thead.firstChild),b=document.createElement(_$_7134[146]),b.innerHTML=_$_7134[147],a.appendChild(b),b=document.createElement(_$_7134[146]),
|
|
140
|
+
a.appendChild(b),c=this.headers[c])&&(c=c.querySelector(_$_7134[148]),c||(c=document.createElement(_$_7134[20]),c.classList.add(_$_7134[149]),c.innerText=_$_7134[150],b.appendChild(c)))};k.unset=function(b,c){};return k}(),va=function(){var k={start:function(b){if(!R.call(this.parent,this))return!1;if(null!==b.target.getAttribute(_$_7134[43])){var c=b.target.getAttribute(_$_7134[43]);k.event={y:parseInt(c),h:b.target.offsetHeight,p:b.pageY}}else null!==b.target.getAttribute(_$_7134[42])&&(c=b.target.getAttribute(_$_7134[42]),
|
|
141
|
+
k.event={x:parseInt(c),w:b.target.offsetWidth,p:b.pageX})},end:function(b){var c=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);b=d.indexOf(parseInt(k.event.y));if(d.length&&-1<b)for(var e=0;e<d.length;e++)c.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==b?(d.push(k.event.y),c.push(k.event.h)):c[b]=k.event.h;this.setHeight(d,a,c)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$_7134[151]));
|
|
142
|
+
d=this.getSelectedColumns();b=d.indexOf(parseInt(k.event.x));if(d.length&&-1<b)for(e=0;e<d.length;e++)c.push(parseInt(this.options.columns[d[e]].width));else d=[];-1==b?(d.push(k.event.x),c.push(k.event.w)):c[b]=k.event.w;this.setWidth(d,a,c)}k.event=null},update:function(b){null!=k.event.y?(b=b.pageY-k.event.p,0<k.event.h+b&&(this.rows[k.event.y].element.style.height=k.event.h+b+_$_7134[44],this.refreshBorders())):null!=k.event.x&&(b=b.pageX-k.event.p,0<k.event.w+b&&(this.colgroup[k.event.x].setAttribute(_$_7134[151],
|
|
143
|
+
k.event.w+b),this.options.columns[k.event.x].width=k.event.w+b,0<this.options.freezeColumns&&ka.width.call(this),this.refreshBorders()))},cancel:function(){k.end.call(this)}};return k}(),Pa=function(){var k={start:function(b){var c=this.parent.helper;b=parseInt(b.target.getAttribute(_$_7134[42]));if(this.merged.cols[b])console.error(_$_7134[152]);else{k.event={x:b,d:b};this.headers[b].classList.add(_$_7134[153]);for(var a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_7134[43]);
|
|
144
|
+
this.records[d][b].element.classList.add(_$_7134[153])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_7134[16];c.style.top=d.top-a.top+_$_7134[44];c.style.left=b.left-d.left+_$_7134[44];c.style.width=_$_7134[154];c.style.height=d.height+_$_7134[44];c.classList.add(_$_7134[155])}},end:function(){this.headers[k.event.x].classList.remove(_$_7134[153]);for(var b=0;b<this.tbody.children.length;b++){var c=
|
|
145
|
+
this.tbody.children[b].getAttribute(_$_7134[43]);this.records[c][k.event.x].element.classList.remove(_$_7134[153])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_7134[155]);this.parent.helper.style.display=_$_7134[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(b){var c=b.target.getAttribute(_$_7134[42]);if(null!=c)if(c=parseInt(c),this.merged.cols[c])console.error(_$_7134[152]);
|
|
146
|
+
else{b=b.target.clientWidth/2>b.offsetX;k.event.d=b?k.event.x<c?parseInt(c)-1:parseInt(c):k.event.x>c?parseInt(c)+1:parseInt(c);c=this.headers[c].getBoundingClientRect();var a=this.content.getBoundingClientRect();this.parent.helper.style.left=(b?c.left:c.right)-a.left+_$_7134[44]}}};return k}(),ra=function(){var k={start:function(b){if(R.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==b.target.getAttribute(_$_7134[43])){var a=parseInt(b.target.getAttribute(_$_7134[43]));
|
|
147
|
+
this.merged.rows[a]?console.error(_$_7134[156]):this.results?console.error(_$_7134[157]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_7134[153]),b=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),c.style.display=_$_7134[16],c.style.top=a.top-b.top+_$_7134[44],c.style.left=_$_7134[158],c.style.width=this.content.offsetWidth-50+_$_7134[44],c.style.height=_$_7134[154],c.classList.add(_$_7134[159]))}else if(null!==b.target.getAttribute(_$_7134[42]))if(a=
|
|
148
|
+
parseInt(b.target.getAttribute(_$_7134[42])),this.merged.cols[a])console.error(_$_7134[152]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_7134[153]);for(b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_7134[43]);this.records[d][a].element.classList.add(_$_7134[153])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_7134[16];c.style.top=d.top-b.top+_$_7134[44];
|
|
149
|
+
c.style.left=a.left-d.left+_$_7134[44];c.style.width=_$_7134[154];c.style.height=d.height+_$_7134[44];c.classList.add(_$_7134[155])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_7134[153]),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(_$_7134[159]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_7134[153]);
|
|
150
|
+
for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$_7134[43]);this.records[c][k.event.x].element.classList.remove(_$_7134[153])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_7134[155])}this.parent.helper.style.display=_$_7134[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(b){if(null!=k.event.y){var c=b.target.getAttribute(_$_7134[43]);
|
|
151
|
+
if(null!=c){var a=c=parseInt(c),d=b.target.clientHeight/2>b.offsetY;d?k.event.y<c&&(a=c-1):k.event.y>c&&(a=c+1);b=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(b=!0):this.merged.rows[a+1]&&(b=!0));b||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-a.top+_$_7134[44])}}else d=b.target.getAttribute(_$_7134[42]),null!=d&&(a=d=parseInt(d),(c=b.target.clientWidth/2>b.offsetX)?k.event.x<
|
|
152
|
+
d&&(a=d-1):k.event.x>d&&(a=d+1),b=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(b=!0):this.merged.cols[a+1]&&(b=!0)),b||(k.event.d=a,a=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?a.left:a.right)-d.left+_$_7134[44]))}};return k}(),ba=function(){var k=function(b){b.getMerge=k[_$_7134[51]];b.setMerge=k[_$_7134[11]];b.updateMerge=k.update;b.removeMerge=k.remove;b.destroyMerged=b.destroyMerge=k.destroy};k.getHeight=function(b,
|
|
153
153
|
c){var a,d=1;if(this.merged.rows[b])for(var e=0;e<this.options.columns.length;e++){var f=E.getColumnNameFromCoords(e,b);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])c&&void 0!==c[f]||(a[1]>d&&(d=a[1]),c&&(c[f]=this.records[b][e].element&&!this.records[b][e].merged?!0:!1))}return d-1};k.getWidth=function(b,c){var a,d=1;if(this.merged.cols[b])for(var e=0;e<this.options.data.length;e++){var f=E.getColumnNameFromCoords(b,e);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])c&&void 0!==
|
|
154
|
-
c[f]||(a[0]>d&&(d=a[0]),c&&(c[f]=this.records[e][b].element&&!this.records[e][b].merged?!0:!1))}return d-1};k[_$
|
|
155
|
-
(jSuites.notification({message:B(_$
|
|
156
|
-
this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],k.applyDestroy.call(this,d));g[m]=this.options.mergeCells[m]=[p,n];k.applyCreate.call(this,m);M.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&H[_$
|
|
157
|
-
this.options.mergeCells;if(d[b]){var e=d[b][1];if(c!==d[b][0]||e!==a)k.applyDestroy.call(this,b),c&&a&&(d[b]=[c,a],k.applyCreate.call(this,b))}};k.remove=function(b,c){if(!R.call(this.parent,this))return!1;c={};var a={},d={};typeof b==_$
|
|
158
|
-
oldValue:c});K.call(this,_$
|
|
159
|
-
(a.style.overflow=_$
|
|
160
|
-
for(b=0;b<g;b++)for(var h=0;h<f;h++)if(a=this.records[d+b][e+h])a.element&&(0==h&&0==b?(a.element.removeAttribute(_$
|
|
154
|
+
c[f]||(a[0]>d&&(d=a[0]),c&&(c[f]=this.records[e][b].element&&!this.records[e][b].merged?!0:!1))}return d-1};k[_$_7134[51]]=function(b){return b?this.options.mergeCells[b]:this.options.mergeCells};k[_$_7134[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},h={},l=!1;typeof b==_$_7134[17]?h[b]=[c,a]:typeof b==_$_7134[83]?h=b:((e=this.getHighlighted())?e=[E.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:
|
|
155
|
+
(jSuites.notification({message:B(_$_7134[160])}),e=!1),e&&(h[e[0]]=[e[1],e[2]]));c=Object.keys(h);if(c.length){for(a=0;a<c.length;a++){var m=c[a],p=h[c[a]][0],n=h[c[a]][1];p=parseInt(p);n=parseInt(n);if((!p||2>p)&&(!n||2>n))console.log(B(_$_7134[161])+_$_7134[135]+m);else if(this.options.mergeCells[m])g[m]=[p,n],f[m]=this.options.mergeCells[m],k.update.call(this,m,p,n);else{e=E.getCoordsFromColumnName(m);for(var r=e[1];r<e[1]+n;r++)for(var v=e[0];v<e[0]+p;v++)b=E.getColumnNameFromCoords(v,r),(d=this.merged.cells[b])&&
|
|
156
|
+
this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],k.applyDestroy.call(this,d));g[m]=this.options.mergeCells[m]=[p,n];k.applyCreate.call(this,m);M.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&H[_$_7134[46]].call(this,e[1],e[0]),V.call(this.parent,{worksheet:this,action:_$_7134[68],newValue:g,oldValue:f}),K.call(this,_$_7134[68],[g]),k.build.call(this),ya.refresh.call(this),ha.refresh.call(this),F.call(this.parent,_$_7134[162],this,g,f))}};k.update=function(b,c,a){var d=
|
|
157
|
+
this.options.mergeCells;if(d[b]){var e=d[b][1];if(c!==d[b][0]||e!==a)k.applyDestroy.call(this,b),c&&a&&(d[b]=[c,a],k.applyCreate.call(this,b))}};k.remove=function(b,c){if(!R.call(this.parent,this))return!1;c={};var a={},d={};typeof b==_$_7134[17]?d[b]=!0:typeof b==_$_7134[83]&&(d=b);b=Object.keys(d);for(d=0;d<b.length;d++)this.options.mergeCells[b[d]]&&(c[b[d]]=this.options.mergeCells[b[d]],a[b[d]]=!0,k.applyDestroy.call(this,b[d],!0));V.call(this.parent,{worksheet:this,action:_$_7134[69],newValue:a,
|
|
158
|
+
oldValue:c});K.call(this,_$_7134[69],{data:a})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=a[b][0]||1,e=a[b][1]||1;b=E.getCoordsFromColumnName(b);if(!this.records[b[1]][b[0]].merged||1==c)if(a=M[_$_7134[51]].call(this,b[0],b[1])){a.style.display=_$_7134[3];1<d?a.setAttribute(_$_7134[52],d):a.removeAttribute(_$_7134[52]);1<e?a.setAttribute(_$_7134[163],e):a.removeAttribute(_$_7134[163]);1==this.options.textOverflow&&
|
|
159
|
+
(a.style.overflow=_$_7134[49]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){c=b[0]+g;var h=b[1]+f;if(a=this.records[h][c])if(a.merged=[g,f,a.v,a.v],0!=g||0!=f)a.element||M[_$_7134[51]].call(this,c,h),a.element.style.display=_$_7134[40],a.merged[3]=a.element.innerText,a.element.innerText=_$_7134[3],L.call(this,c,h,_$_7134[3])}}}};k.applyDestroy=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=E.getCoordsFromColumnName(b),e=d[0];d=d[1];var f=a[b][0],g=a[b][1];delete this.options.mergeCells[b];
|
|
160
|
+
for(b=0;b<g;b++)for(var h=0;h<f;h++)if(a=this.records[d+b][e+h])a.element&&(0==h&&0==b?(a.element.removeAttribute(_$_7134[52]),a.element.removeAttribute(_$_7134[163])):(a.element.style.display=_$_7134[3],1==c&&(L.call(this,e+h,d+b,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(b,c,a,d){if(1==c)var e=[a];else{e=[];for(var f=a;f<a+d;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),l={};for(f=0;f<h.length;f++){a=E.getCoordsFromColumnName(h[f]);
|
|
161
161
|
for(var m=a[b];m<a[b]+g[h[f]][b];m++)-1!==e.indexOf(m)&&(l[h[f]]||(l[h[f]]=[g[h[f]][0],g[h[f]][1]],1==c&&(l[h[f]][b]+=d)),0==c&&l[h[f]][b]--)}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 b=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(b)for(var c=Object.keys(b),a=0;a<c.length;a++){for(var d=E.getCoordsFromColumnName(c[a]),e=parseInt(b[c[a]][0]),f=parseInt(b[c[a]][1]),g=0;g<e;g++)this.merged.cols[d[0]+
|
|
162
|
-
g]=!0;for(var h=0;h<f;h++)this.merged.rows[d[1]+h]=!0;for(h=0;h<f;h++)for(g=0;g<e;g++){var l=E.getColumnNameFromCoords(d[0]+g,d[1]+h);this.merged.cells[l]=c[a]}}};k.batch=function(b){var c=Object.keys(b);if(c.length)for(var a=0;a<c.length;a++)!1===b[c[a]]&&k.applyCreate.call(this,c[a])};return k}(),Ca=function(){var k=function(b){b.getHeader=k[_$
|
|
163
|
-
k.all=function(b){for(var c=[],a=0;a<this.options.columns.length;a++)c.push(k[_$
|
|
164
|
-
_$
|
|
165
|
-
(d=!1);!0===d&&e.classList.add(_$
|
|
166
|
-
d,c,null,!1)),this.options.applyMaskOnFooters&&(e=da[_$
|
|
167
|
-
b[_$
|
|
168
|
-
function(c,a,d){if(void 0===d)return this.options.footers[a][c];k.call(this,c,a,d);K.call(this,_$
|
|
169
|
-
this.options.columns[c].align;d.element=document.createElement(_$
|
|
170
|
-
[];var a=document.createElement(_$
|
|
171
|
-
b.adjust=function(c,a,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var h=this.headers[c]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var m=f[d].splice(c),p=c;p<c+a;p++)f[d][p]=_$
|
|
172
|
-
g[d]=g[d].concat(m)}}else for(d=0;d<f.length;d++){for(p=c;p<c+a;p++)(h=this.footers.content[d][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[d].splice(c,a);e[d]=f[d].splice(c,a)}return e};return b}(),oa=function(){var k=function(b){b.setNestedCell=k.cell;b.getNestedCell=k.cell;b.setNestedHeaders=k[_$
|
|
173
|
-
b;k.build.call(this);k.render.call(this);ha.refresh.call(this);U.call(this);K.call(this,_$
|
|
174
|
-
this))return!1;var d=this.options.nestedHeaders[c][b],e=this.nested.content[c][b].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==a.colspan&&(d.colspan=a.colspan,e.setAttribute(_$
|
|
175
|
-
[],a=0,d=0;d<b.length;d++){var e=parseInt(b[d].colspan);c[d]=[a,a+e-1];a+=e}return c};k.getColumns=function(b){b=this.options.nestedHeaders[b];for(var c=[],a=0;a<b.length;a++)for(var d=b[a].colspan,e=0;e<d;e++)c.push(a);return c};k.create=function(b,c){if(this.nested.content[c][b])return this.nested.content[c][b].element;var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$
|
|
176
|
-
e.setAttribute(_$
|
|
177
|
-
a.appendChild(c);this.thead.insertBefore(a,this.thead.lastChild)}};k.render=function(){for(var b,c=this.options.nestedHeaders,a=0;a<c.length;a++)for(var d=0;d<this.thead.lastChild.children.length;d++){b=this.thead.lastChild.children[d].getAttribute(_$
|
|
178
|
-
1),a?this.thead.children[c].insertBefore(d,this.thead.children[c].children[a]):this.thead.children[c].appendChild(d),0==b&&0<this.options.freezeColumns&&(d.classList.add(_$
|
|
179
|
-
parseInt(e[a][f].colspan)+c;k.cell.call(this,f,a,{colspan:g})}}else{d=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){d[a]=[];for(f=0;f<c;f++){var h=g[b+f];typeof d[a][h]==_$
|
|
180
|
-
n[r]:r,this.rows[p]&&this.rows[p].element)return p;return 0},d=function(p){var n;(n=this.results)?p=n.indexOf(p):n=this.rows;p++;for(var r=p;r<n.length;r++)if(p=this.results?n[r]:r,this.rows[p]&&this.rows[p].element)return p;return n[n.length-1]},e=function(p,n){for(;0<=p;p--)if(this.records[n][p].element&&this.records[n][p].element.style.display!=_$
|
|
181
|
-
_$
|
|
182
|
-
var c=this.borders.cloning;if(b)if(c&&c.active){b=c.x1;var a=c.y1,d=c.x2,e=c.y2}else return!1;else if(d=this.getSelected(),d.length)b=d[0].x,a=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],m=!1,p=this.getHighlighted(),n=Fa[_$
|
|
183
|
-
y=0;v=0;b=parseInt(b);d=parseInt(d);a=parseInt(a);e=parseInt(e);for(var C=a;C<=e;C++)if(!this.results||-1!=this.results.indexOf(C)){void 0==n[g]&&(g=0);f=0;p[0]!=b&&(w=b<p[0]?b-p[0]:1);for(u=b;u<=d;u++){if(!(0!=m||this.records[C][u].element&&this.records[C][u].element.classList.contains(_$
|
|
184
|
-
this.options.columns[u].type==_$
|
|
185
|
-
r[0].y<a&&(a=r[0].y),r[r.length-1].x>d&&(d=r[r.length-1].x),r[r.length-1].y>e&&(e=r[r.length-1].y),this.setValue(l),this.resetBorders(_$
|
|
186
|
-
b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$
|
|
187
|
-
b[1];var v=b[2],u=b[3];r=n>=b[0]&&n<=v&&l>=r&&l<=u?!0:!1}if(r&&(!e||!this.results||-1!=this.results.indexOf(l))){r=L.call(this,n,l);if(c){if(e&&!1===this.rows[l].visible)continue;m=ea.processed.call(this,n,l);void 0!==m&&(r=m)}a&&r.match&&(r.match(a)||r.match(/\n/)||r.match(/"/))&&(r=r.replace(new RegExp(_$
|
|
188
|
-
_$
|
|
189
|
-
b));return c};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$
|
|
190
|
-
(b[g].data[h]=_$
|
|
191
|
-
k.parse.call(this),c=this.options.data.length;this.options.minDimensions[1]>c&&(c=this.options.minDimensions[1]);for(var a=0;a<c;a++){var d=b[a]?b[a]:null;na.row.call(this,a,d)}}};k.load=function(b){this.resetBorders();this.resetSelection();this.tbody.innerText=_$
|
|
192
|
-
null,d=da[_$
|
|
193
|
-
for(var a=0;a<this.options.columns.length;a++){var d=_$
|
|
194
|
-
function(b,c){if(typeof this.options.columns[b]===_$
|
|
195
|
-
1==b?!0:!1},e=k[_$
|
|
196
|
-
h=null,l=null,m=[];if(this.borders.copying){var p=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];h=p[0];l=p[1];var n=jSuites.hash(a),r=jSuites.hash(k[_$
|
|
197
|
-
c=parseInt(c);if(a){Array.isArray(a)||(a=E.parseCSV(a,_$
|
|
198
|
-
g.push(u);C++;C>=a.length&&(C=0)}0==y.length%a.length&&0==y[0].length%a[0].length&&(a=y,m=g)}g=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(n=p[1];n<=p[3];n++)for(r=p[0];r<=p[2];r++)(!this.results||this.results&&0<=this.results.indexOf(n))&&f.push({x:r,y:n,value:_$
|
|
199
|
-
for(n=0;n<a.length;n++)for(r=0;r<a[n].length;r++){null!==h&&null!==l&&a[n][r][0]==_$
|
|
200
|
-
c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var a=_$
|
|
201
|
-
c,b.setAttribute(_$
|
|
202
|
-
k[_$
|
|
203
|
-
this.parent.config.definedNames;return b?c[b]:c};k.updateAll=function(b,c){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var h=W.update.call(this,a[e[g]],b,c,f);h!==a[e[g]]&&(d[e[g]]=h)}k[_$
|
|
204
|
-
(d[e[f]]=g)}k[_$
|
|
205
|
-
(h[l]=k[g++],4<g&&(g=0));f.children[m].style.color=h[l];if(-1===l.indexOf(_$
|
|
206
|
-
function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$
|
|
207
|
-
p=E.getCaretIndex.call(this.parent,f),n=W.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$
|
|
208
|
-
l.addRange(m));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$
|
|
209
|
-
g,h,l,m){e.current.getAttribute(_$
|
|
210
|
-
r);n.parentNode===p.parent.input&&!1===v?n.parentNode.insertBefore(u,n.nextSibling):p.parent.input.appendChild(u);n=u};if(n.getAttribute(_$
|
|
211
|
-
e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$
|
|
212
|
-
_$
|
|
213
|
-
_$
|
|
214
|
-
-1==n.indexOf(h[r-1])&&-1==n.indexOf(h[r+1])&&(m+=_$
|
|
215
|
-
(n=l[p[r]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&n.length&&(l[p[r]]=e(n,l[p[r]])),m=0<v.indexOf(_$
|
|
216
|
-
_$
|
|
217
|
-
this.records[l][h].a=[]};a.execute=function(h,l,m,p,n){if(1==this.parent.processing)return null!==l&&null!==m&&this.parent.queue.push([this,l,m]),_$
|
|
218
|
-
}else z=null;n||(N=d(N));var x=N,D=x.match(/[A-Z_]+[A-Z0-9_\.]*/g);D&&D.length&&(x=f.call(q.parent,D,x,y));(D=x.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&D.length&&(x=e.call(q,D,x));D=[];x=b(x);for(var G=0;G<x.length;G++)x[G]&&k.test(x[G])&&D.push(x[G]);if(D){if(-1<D.indexOf(z))throw{error:_$
|
|
219
|
-
typeof G.formula==_$
|
|
220
|
-
0==h.indexOf(_$
|
|
221
|
-
w[C][A])));null===r?(r=w[0][0],this.records[m][l].a=p):g.call(this,l,m);w=this.records[m][l].v=r}else this.records[m][l].v=w;return w}catch(N){return 1==this.parent.config.debugFormulas&&console.log(h,y,N),N&&N.error?N.error:_$
|
|
222
|
-
n=r[0],r=r[1],p!=n)continue;if(0<=r.indexOf(_$
|
|
223
|
-
w=y[0],C=y[1];y=I(y[0])}else y=this,w=y.getWorksheetName(),C=u;if(y.formula[C]&&!p[u]){var A=!1;p[u]=!0;for(u=0;u<y.formula[C].length;u++){var N=y.formula[C][u];-1==N.indexOf(_$
|
|
224
|
-
0;v<h;v++)if(0<=l[v][2].indexOf(l[h][0])){l.splice(v,0,l.splice(h,1)[0]);h=l.length;break}r++;if(1E6<r){console.error(_$
|
|
225
|
-
h[y[w]]),v[y[w]]=!0,C.push(y[w]));C.length&&(h[u]&&(u=h[u]),r[u]=C)}}this.formula=r;C=this.getWorksheetName();for(var A=0;A<t.spreadsheet.length;A++)for(var N=t.spreadsheet[A].worksheets,S=0;S<N.length;S++)if(N[S].getWorksheetName()!==C)for(n=Object.keys(N[S].formula),m=0;m<n.length;m++){r=[];y=N[S].formula[n[m]];for(w=0;w<y.length;w++)u=y[w].split(_$
|
|
226
|
-
for(w=0;w<u.length;w++)0<=u[w].indexOf(_$
|
|
227
|
-
a.updateWorksheetName=function(h,l,m){for(var p=b(h),n=0;n<p.length;n++)h=p[n].split(_$
|
|
228
|
-
0;w<v[u].options.data[y].length;w++)(m=v[u].options.data[y][w])&&O(m)&&(p=a.updateWorksheetName(m,h,l),p!=m&&r.push({x:w,y,value:p,force:!0}));r.length&&(r=ea.applyValues.call(v[u],r),K.call(v[u],_$
|
|
229
|
-
E.getColumnNameFromCoords(w,u)};for(var n=0;n<p.length;n++)if(k.test(p[n])&&-1==p[n].indexOf(_$
|
|
230
|
-
(p=_$
|
|
231
|
-
h.filter(function(p){return p!=_$
|
|
232
|
-
(m=f.call(this.parent,h,m));(h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&h.length&&(m=e.call(this,h,m));h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(m=0;m<h.length;m++)-1==h[m].indexOf(_$
|
|
233
|
-
k.setFromCoords;b.setCheckRadioValue=k.setCheckRadio;b.getProcessed=k.processed};k[_$
|
|
234
|
-
var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,n){var r=null;typeof p==_$
|
|
235
|
-
c);else if(typeof b==_$
|
|
236
|
-
b&&g[l].value&&T.call(this,g[l]);K.call(this,_$
|
|
237
|
-
function(b){for(var c,a,d=this.options.style||{},e=[],f={},g=0;g<b.length;g++)if(c=b[g],a=this.updateCell(c.x,c.y,c.value,c.force),void 0!==a.value){if(void 0!==c.style){var h=E.getColumnNameFromCoords(c.x,c.y);a.style=f[h]=c.style;a.oldStyle=d&&d[h]?d[h]:_$
|
|
238
|
-
_$
|
|
239
|
-
function(b){for(var c,a=[],d,e=0;e<b.length;e++)c=b[e],d=E.getColumnNameFromCoords(c.x,c.y),a[d]=c.value;a=W.getChain.call(this,a);var f=[],g=Object.keys(a);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$
|
|
240
|
-
function(){var k=function(b){b.getCell=k[_$
|
|
241
|
-
if(this.records[c]&&this.records[c][b]&&this.records[c][b].element)return this.records[c][b].element;var d=L.call(this,b,c);null===d&&(d=_$
|
|
242
|
-
this.getHighlighted(),b,c)};k.getSelectedColumns=function(){var b=[],c=this.getHighlighted();if(c)for(var a=c[0];a<=c[2];a++)b.push(a);return b};k.updateAll=function(b){for(var c=this.getPrimaryKey(),a=[],d=0;d<b.length;d++)void 0!==b[d].id?(T.call(this,b[d]),a.push({id:b[d].id,y:b[d].y}),!1!==c&&k.update.call(this,c,b[d].y,b[d].id,!0)):a.push(k.update.call(this,b[d].x,b[d].y,b[d].value,b[d].force));K.call(this,_$
|
|
243
|
-
null){e=e.element;var f={x:b,y:c};if(d||!e||1!=e.classList.contains(_$
|
|
244
|
-
b,c,f.value,f.oldValue)}}}else return!1;return f};k.create=function(b,c,a,d){var e=document.createElement(_$
|
|
245
|
-
b,c,d);k.applyOverflow.call(this,e,b,c);F.call(this.parent,_$
|
|
246
|
-
this.setCells(b.cells);b&&b.mergeCells&&this.setMerge(b.mergeCells);b&&b.values&&k.batch.call(this,b.values);b&&b.formulas&&k.batch.call(this,b.formulas,!0)};k.applyProperties=function(b,c,a,d){if(!d){var e=E.getColumnNameFromCoords(c,a),f=this.options.style;d=this.options.comments;var g=this.options.cells,h=this.options.rows;if(f&&f[e]){var l=(l=b.getAttribute(_$
|
|
247
|
-
d&&d[e]&&b.setAttribute(_$
|
|
248
|
-
b.classList.add(_$
|
|
249
|
-
I(f[0]);var h=f[1];f=f[0]}else g=this,h=d[e],f=this.getWorksheetName();h=E.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],b[d[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==c&&(d=Object.keys(a),d.length))for(e=0;e<d.length;e++)g=I(d[e]),K.call(g,_$
|
|
250
|
-
k[_$
|
|
251
|
-
(a=this.options.cells[c]));null===a&&(a=this.options.columns[b]);if(!a)a={type:_$
|
|
252
|
-
0;a<d.length;a++){var e=d[a];b=e.x;c=e.y;var f=k[_$
|
|
253
|
-
parseInt(g.width));typeof g.title!==_$
|
|
254
|
-
L.call(this,b,c),b,c,this,g))}else f=E.getColumnNameFromCoords(b,c),e.oldValue=this.options.cells&&this.options.cells[f]?this.options.cells[f]:_$
|
|
255
|
-
this.records[c][b].element,e=L.call(this,b,c),M.applyProperties.call(this,h,b,c,this),g=l.createCell(h,e,b,c,this,g),void 0!==g&&L.call(this,b,c,g))}else return console.error(_$
|
|
256
|
-
(d.element.style.display=e),d.visible=c;this.resetBorders();H.refresh.call(this)},b=function(c){c.getRow=b[_$
|
|
257
|
-
a.push(this.rows[e].element);return a};b.create=function(c,a){if(this.rows[c]&&this.rows[c].element)return this.rows[c].element;this.rows[c]||na.row.call(this,c);var d=document.createElement(_$
|
|
258
|
-
(e=this.options.rows[c].title),0==this.options.rows[c].visible&&(this.rows[c].visible=!1),this.options.rows[c].id&&(this.rows[c].id=this.options.rows[c].id));F.call(this.parent,_$
|
|
259
|
-
!this.rows[c])return console.error(_$
|
|
260
|
-
H.refresh.call(this));this.rows.splice(a,0,this.rows.splice(c,1)[0]);this.records.splice(a,0,this.records.splice(c,1)[0]);this.options.data.splice(a,0,this.options.data.splice(c,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);K.call(this,_$
|
|
261
|
-
a,d,e){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$
|
|
262
|
-
r=this.options.data?this.options.data.splice(l):[],v=this.records.splice(l),u=l;u<g+l;u++){var y=e[m]&&e[m].id?e[m].id:sa.next.call(this);na.row.call(this,u,y);var w=this.dataType?{}:[];for(var C=0;C<this.options.columns.length;C++){var A=Z.call(this,C);w[A]=_$
|
|
162
|
+
g]=!0;for(var h=0;h<f;h++)this.merged.rows[d[1]+h]=!0;for(h=0;h<f;h++)for(g=0;g<e;g++){var l=E.getColumnNameFromCoords(d[0]+g,d[1]+h);this.merged.cells[l]=c[a]}}};k.batch=function(b){var c=Object.keys(b);if(c.length)for(var a=0;a<c.length;a++)!1===b[c[a]]&&k.applyCreate.call(this,c[a])};return k}(),Ca=function(){var k=function(b){b.getHeader=k[_$_7134[51]];b.setHeader=k[_$_7134[11]];b.getHeaders=k.all};k[_$_7134[51]]=function(b){var c;if(c=this.options.columns)return c[b].title||E.getColumnName(b)};
|
|
163
|
+
k.all=function(b){for(var c=[],a=0;a<this.options.columns.length;a++)c.push(k[_$_7134[51]].call(this,a));return b?c:c.join(this.options.csvDelimiter)};k[_$_7134[11]]=function(b,c){if(!R.call(this.parent,this))return!1;var a;if(a=this.options.columns[b]){var d=k[_$_7134[51]].call(this,b);if(!c&&(c=prompt(B(_$_7134[164]),d),!c))return!1;a.title=c;if(a=this.headers[b])a.innerHTML=c,a.setAttribute(_$_7134[165],c);V.call(this.parent,{worksheet:this,action:_$_7134[74],column:b,oldValue:d,newValue:c});K.call(this,
|
|
164
|
+
_$_7134[74],{column:b,title:c});F.call(this.parent,_$_7134[166],this,b,c,d)}};k.create=function(b){var c=this.options.columns[b],a=c.width||this.options.defaultColWidth,d=c.title||E.getColumnName(b),e=document.createElement(_$_7134[146]);this.parent.config.stripHTML?e.innerText=d:e.innerHTML=d;e.setAttribute(_$_7134[42],b);c.align&&(e.style.textAlign=c.align);c.title&&e.setAttribute(_$_7134[165],e.innerText);c.tooltip&&(e.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&
|
|
165
|
+
(d=!1);!0===d&&e.classList.add(_$_7134[167]);!1===c.visible&&(a=_$_7134[98]);d=document.createElement(_$_7134[168]);d.setAttribute(_$_7134[151],a);c.type==_$_7134[49]&&(e.style.display=_$_7134[40],d.style.display=_$_7134[40]);this.headers[b]=e;this.colgroup[b]=d};return k}(),aa=function(){var k=function(c,a,d){var e=this.footers.content,f;e&&e[a]&&e[a][c]&&(f=e[a][c].element)&&(void 0===d&&(e=this.options.footers,d=e[a]&&e[a][c]?e[a][c]:_$_7134[3]),O(d)&&1==this.parent.config.parseFormulas&&(d=W.execute.call(this,
|
|
166
|
+
d,c,null,!1)),this.options.applyMaskOnFooters&&(e=da[_$_7134[51]].call(this,c),d=t.editors.general.parseValue(c,a,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_7134[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},b=function(c){c.getFooter=b[_$_7134[51]];c.setFooter=b[_$_7134[11]];c.resetFooter=b.reset;c.refreshFooter=b.refresh;c.getFooterValue=b.value;c.setFooterValue=b.value};b[_$_7134[51]]=function(){return this.options.footers};
|
|
167
|
+
b[_$_7134[11]]=function(c){if(c){var a=this.options.footers;this.options.footers=c}this.options.footers!=a&&(aa.build.call(this),b.render.call(this),H.limited.call(this)&&(this.scrollY.style.display=_$_7134[40],H.resetY.call(this)),K.call(this,_$_7134[169],{data:this.options.footers}),F.call(this.parent,_$_7134[170],this,this.options.footers,a))};b.refresh=function(){var c=this.options.footers;if(c&&c.length)for(var a=0;a<c.length;a++)for(var d=0;d<c[a].length;d++)k.call(this,d,a,c[a][d])};b.value=
|
|
168
|
+
function(c,a,d){if(void 0===d)return this.options.footers[a][c];k.call(this,c,a,d);K.call(this,_$_7134[171],{x:c,y:a,value:d});F.call(this.parent,_$_7134[172],this,c,a,d)};b.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_7134[3];K.call(this,_$_7134[173],{});F.call(this.parent,_$_7134[170],this,null,c)};b.create=function(c,a){var d=this.footers.content[a][c];if(d&&d.element)return d.element;d=this.footers.content[a][c]={};var e=
|
|
169
|
+
this.options.columns[c].align;d.element=document.createElement(_$_7134[146]);d.element.setAttribute(_$_7134[42],c);d.element.setAttribute(_$_7134[43],a);e&&(d.element.style.textAlign=e);k.call(this,c,a);this.options.columns[c].type==_$_7134[49]&&(d.element.style.display=_$_7134[40]);return d.element};b.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_7134[3];for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=
|
|
170
|
+
[];var a=document.createElement(_$_7134[144]),d=document.createElement(_$_7134[146]);d.innerHTML=_$_7134[147];a.appendChild(d);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[c][a]||(this.options.footers[c][a]=_$_7134[3]),this.footers.content[c][a]||(this.footers.content[c][a]={})}}};b.render=function(){for(var c=this.options.footers,a=0;a<c.length;a++)for(var d=0;d<c[a].length;d++){var e=aa.create.call(this,d,a);this.tfoot.children[a].appendChild(e)}};
|
|
171
|
+
b.adjust=function(c,a,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var h=this.headers[c]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var m=f[d].splice(c),p=c;p<c+a;p++)f[d][p]=_$_7134[3];f[d]=f[d].concat(m);m=g[d].splice(c);for(p=c;p<c+a;p++)g[d][p]={element:b.create.call(this,p,d)},l&&(1==h?this.tfoot.children[d].appendChild(g[d][p].element):this.tfoot.children[d].insertBefore(g[d][p].element,this.tfoot.children[d].children[c].nextSibling));
|
|
172
|
+
g[d]=g[d].concat(m)}}else for(d=0;d<f.length;d++){for(p=c;p<c+a;p++)(h=this.footers.content[d][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[d].splice(c,a);e[d]=f[d].splice(c,a)}return e};return b}(),oa=function(){var k=function(b){b.setNestedCell=k.cell;b.getNestedCell=k.cell;b.setNestedHeaders=k[_$_7134[11]];b.getNestedHeaders=k[_$_7134[51]];b.resetNestedHeaders=k.reset};k[_$_7134[51]]=function(){return this.options.nestedHeaders};k[_$_7134[11]]=function(b){k.reset.call(this);this.options.nestedHeaders=
|
|
173
|
+
b;k.build.call(this);k.render.call(this);ha.refresh.call(this);U.call(this);K.call(this,_$_7134[174],{data:b});F.call(this.parent,_$_7134[175],this,b)};k.reset=function(){var b=[],c=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<c.length;a++)c[a].classList.contains(_$_7134[176])&&b.push(c[a]);if(b.length)for(;c=b.shift();)c.remove();this.nested=null;ha.refresh.call(this);U.call(this);K.call(this,_$_7134[177]);F.call(this.parent,_$_7134[175],this,[])};k.cell=function(b,c,a){if(a){if(!R.call(this.parent,
|
|
174
|
+
this))return!1;var d=this.options.nestedHeaders[c][b],e=this.nested.content[c][b].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==a.colspan&&(d.colspan=a.colspan,e.setAttribute(_$_7134[52],a.colspan),e.style.display=0==d.colspan?_$_7134[40]:_$_7134[3]);K.call(this,_$_7134[178],{x:b,y:c,properties:a});F.call(this.parent,_$_7134[179],this,b,c,a)}else return this.nested.content[c][b].element};k.range=function(b){b=this.options.nestedHeaders[b];for(var c=
|
|
175
|
+
[],a=0,d=0;d<b.length;d++){var e=parseInt(b[d].colspan);c[d]=[a,a+e-1];a+=e}return c};k.getColumns=function(b){b=this.options.nestedHeaders[b];for(var c=[],a=0;a<b.length;a++)for(var d=b[a].colspan,e=0;e<d;e++)c.push(a);return c};k.create=function(b,c){if(this.nested.content[c][b])return this.nested.content[c][b].element;var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_7134[180]);a.title||(a.title=_$_7134[3]);var e=document.createElement(_$_7134[146]);
|
|
176
|
+
e.setAttribute(_$_7134[181],b);e.setAttribute(_$_7134[182],c);e.setAttribute(_$_7134[52],a.colspan);e.setAttribute(_$_7134[183],a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return d.element=e};k.build=function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var b=0;b<this.options.nestedHeaders.length;b++){this.nested.content[b]=[];var c=document.createElement(_$_7134[146]);c.innerHTML=_$_7134[147];var a=document.createElement(_$_7134[144]);a.classList.add(_$_7134[176]);
|
|
177
|
+
a.appendChild(c);this.thead.insertBefore(a,this.thead.lastChild)}};k.render=function(){for(var b,c=this.options.nestedHeaders,a=0;a<c.length;a++)for(var d=0;d<this.thead.lastChild.children.length;d++){b=this.thead.lastChild.children[d].getAttribute(_$_7134[42]);var e=k.getColumns.call(this,a);void 0!==e[b]&&k.renderCell.call(this,e[b],a)}};k.renderCell=function(b,c,a){var d=oa.create.call(this,b,c);d.parentNode?(b=d.getAttribute(_$_7134[52]),b++,d.setAttribute(_$_7134[52],b)):(d.setAttribute(_$_7134[52],
|
|
178
|
+
1),a?this.thead.children[c].insertBefore(d,this.thead.children[c].children[a]):this.thead.children[c].appendChild(d),0==b&&0<this.options.freezeColumns&&(d.classList.add(_$_7134[50]),d.style.left=xa.call(this)?_$_7134[158]:_$_7134[154]))};k.adjust=function(b,c,a,d){var e=this.options.nestedHeaders;if(e)if(1==a)if(d&&d.nested)for(a=0;a<e.length;a++)for(var f=0;f<e[a].length;f++)k.cell.call(this,f,a,{colspan:d.nested[a][f]});else for(a=0;a<e.length;a++){if(f=k.getColumns.call(this,a)){f=f[b];var g=
|
|
179
|
+
parseInt(e[a][f].colspan)+c;k.cell.call(this,f,a,{colspan:g})}}else{d=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){d[a]=[];for(f=0;f<c;f++){var h=g[b+f];typeof d[a][h]==_$_7134[13]&&(d[a][h]=e[a][h].colspan);e[a][h].colspan--}g=Object.keys(d[a]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],a,{colspan:e[a][g[f]].colspan})}return d}};return k}(),ma=function(){var k=function(b,c){var a=function(p){var n;(n=this.results)?p=n.indexOf(p):n=this.rows;p--;for(var r=p;0<=r;r--)if(p=this.results?
|
|
180
|
+
n[r]:r,this.rows[p]&&this.rows[p].element)return p;return 0},d=function(p){var n;(n=this.results)?p=n.indexOf(p):n=this.rows;p++;for(var r=p;r<n.length;r++)if(p=this.results?n[r]:r,this.rows[p]&&this.rows[p].element)return p;return n[n.length-1]},e=function(p,n){for(;0<=p;p--)if(this.records[n][p].element&&this.records[n][p].element.style.display!=_$_7134[40])return p;return 0},f=function(p,n){for(;p<this.options.columns.length;p++)if(this.records[n][p].element&&this.records[n][p].element.style.display!=
|
|
181
|
+
_$_7134[40])return p;return this.options.columns-1},g=this.getHighlighted(),h=g[0],l=g[1],m=g[2];g=g[3];b=parseInt(b);c=parseInt(c);null!=b&&null!=c&&(0<b-m?(f=f.call(this,parseInt(m)+1,c),b=parseInt(b)):(f=parseInt(b),b=e.call(this,parseInt(h)-1,c)),0<c-g?(d=d.call(this,parseInt(g)),c=parseInt(c)):(d=parseInt(c),c=a.call(this,parseInt(l))),b-f<=c-d?(f=parseInt(h),b=parseInt(m)):(d=parseInt(l),c=parseInt(g)),this.setBorder(f,d,b,c,_$_7134[137]))};k.execute=function(b){if(!R.call(this.parent,this))return!1;
|
|
182
|
+
var c=this.borders.cloning;if(b)if(c&&c.active){b=c.x1;var a=c.y1,d=c.x2,e=c.y2}else return!1;else if(d=this.getSelected(),d.length)b=d[0].x,a=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],m=!1,p=this.getHighlighted(),n=Fa[_$_7134[51]].call(this,p,!1,!1),r=this.getSelected();if(f=this.getStyle(r,!0)){var v=Object.keys(f);if(v.length)for(var u=0;u<v.length;u++)h.push(f[v[u]])}if(p[0]==b)var y=a<p[1]?a-p[1]:1,w=0;else w=b<p[0]?b-p[0]:1,
|
|
183
|
+
y=0;v=0;b=parseInt(b);d=parseInt(d);a=parseInt(a);e=parseInt(e);for(var C=a;C<=e;C++)if(!this.results||-1!=this.results.indexOf(C)){void 0==n[g]&&(g=0);f=0;p[0]!=b&&(w=b<p[0]?b-p[0]:1);for(u=b;u<=d;u++){if(!(0!=m||this.records[C][u].element&&this.records[C][u].element.classList.contains(_$_7134[18]))){if((!c||1!=c.active)&&L.call(this,u,C)){m=!0;continue}void 0==n[g]?f=0:void 0==n[g][f]&&(f=0);var A=n[g][f];A&&!n[1]&&1==this.parent.config.autoIncrement&&(this.options.columns[u].type==_$_7134[55]||
|
|
184
|
+
this.options.columns[u].type==_$_7134[14]||1==this.options.columns[u].shiftFormulas?O(A)?A=W.shiftFormula(A,w,C-p[1]):A==Number(A)&&(A=Number(A)+y):this.options.columns[u].type==_$_7134[184]&&(A=new Date(A),A.setDate(A.getDate()+y),A=A.getFullYear()+_$_7134[185]+jSuites.two(parseInt(A.getMonth()+1))+_$_7134[185]+jSuites.two(A.getDate())+_$_7134[131]+_$_7134[186]));A={x:u,y:C,value:A};h&&null!=h[v]&&(A.style=h[v],v++,v>=h.length&&(v=0));l.push(A)}f++;p[0]!=b&&w++}g++;y++}l.length&&(r[0].x<b&&(b=r[0].x),
|
|
185
|
+
r[0].y<a&&(a=r[0].y),r[r.length-1].x>d&&(d=r[r.length-1].x),r[r.length-1].y>e&&(e=r[r.length-1].y),this.setValue(l),this.resetBorders(_$_7134[137],!0),this.updateSelectionFromCoords(b,a,d,e))};k.end=function(b){ma.event=!1;ma.execute.call(this,!0)};k.cancel=function(b){ma.event=!1;this.resetBorders(_$_7134[137],!0)};return k}(),Fa=function(){var k=function(b){b.getData=k[_$_7134[51]];b.getJson=k[_$_7134[51]];b.setData=k[_$_7134[11]];b.loadData=k.load;b.getRowData=k.getRowData;b.setRowData=k.setRowData;
|
|
186
|
+
b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$_7134[51]];b.download=k.download;b.copy=k.copy;b.paste=k.paste;b.cut=function(){return b.copy(!0)}};k[_$_7134[51]]=function(b,c,a,d){!0===b&&(b=this.getHighlighted());var e=b?!0:!1,f=[],g=this.options.columns.length,h=this.options.data.length;void 0===d&&(d=this.dataType&&typeof a==_$_7134[13]?1:0);for(var l=0;l<h;l++){var m=null;var p=d?{}:[];for(var n=0;n<g;n++){var r;if(!(r=!e)){r=
|
|
187
|
+
b[1];var v=b[2],u=b[3];r=n>=b[0]&&n<=v&&l>=r&&l<=u?!0:!1}if(r&&(!e||!this.results||-1!=this.results.indexOf(l))){r=L.call(this,n,l);if(c){if(e&&!1===this.rows[l].visible)continue;m=ea.processed.call(this,n,l);void 0!==m&&(r=m)}a&&r.match&&(r.match(a)||r.match(/\n/)||r.match(/"/))&&(r=r.replace(new RegExp(_$_7134[187],_$_7134[188]),_$_7134[189]),r=_$_7134[187]+r+_$_7134[187]);d?jSuites.path.call(p,_$_7134[3]+Z.call(this,n),r):p.push(r);m=!0}}m&&(a?f.push(p.join(a)):f.push(p))}return a?f.join(_$_7134[10])+
|
|
188
|
+
_$_7134[10]:f};k.parse=function(){for(var b,c={},a=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)b=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_7134[83])&&(typeof f[g].id==_$_7134[14]&&(b=parseInt(f[g].id)),typeof f[g].row==_$_7134[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>a&&(a=d),b&&(c[d]=b);if(Object.keys(e).length)for(g=0;g<=a;g++)e[g]&&(f[g]=e[g]);a=this.getPrimaryKey();if(!1!==a)for(a=Z.call(this,a),g=0;g<f.length;g++)c[g]||!1===a||(b=parseInt(f[g][a]),0<b&&(c[g]=
|
|
189
|
+
b));return c};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$_7134[13]&&(this.dataType=1)};k[_$_7134[11]]=function(b){b=k.standardize(b);var c={},a=[],d={};var e=Object.keys(b[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=b.length-this.options.data.length;0<f&&this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===b[g]&&(b[g]={row:g,data:[]});for(var h=0;h<this.options.columns.length;h++)b[g].data[h]||
|
|
190
|
+
(b[g].data[h]=_$_7134[3])}for(h=0;h<this.options.columns.length;h++){var l=Z.call(this,h);d[l]=h}for(g=0;g<b.length;g++){f=b[g].row;l=Object.keys(b[g].data);for(h=0;h<l.length;h++)e=null,void 0!==d[l[h]]?e=d[l[h]]:-1<l[h]&&(e=parseInt(l[h])),null!==e&&a.push({x:e,y:f,value:b[g].data[l[h]]});b[g].id&&(c[f]=b[g].id)}sa.setId.call(this,c);ea[_$_7134[11]].call(this,a,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var b=
|
|
191
|
+
k.parse.call(this),c=this.options.data.length;this.options.minDimensions[1]>c&&(c=this.options.minDimensions[1]);for(var a=0;a<c;a++){var d=b[a]?b[a]:null;na.row.call(this,a,d)}}};k.load=function(b){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_7134[3];this.options.data=b;k.build.call(this);H.call(this);Y.update.call(this)};k.refresh=function(b){if(typeof b!==_$_7134[13])for(var c=0;c<this.options.columns.length;c++){var a=this.records[b]&&this.records[b][c].element?this.records[b][c].element:
|
|
192
|
+
null,d=da[_$_7134[51]].call(this,c,b);typeof d[0].updateCell==_$_7134[84]&&d[0].updateCell(a,L.call(this,c,b),c,b,this,d[1]);a&&M.applyOverflow.call(this,a,c,b)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_7134[58],dataType:_$_7134[59],success:function(f){e.setData(f);jSuites.loading.hide()}})}};k.getRowData=function(b,c){if(typeof this.options.data[b]===_$_7134[13])return!1;if(c){if(this.dataType){c={};
|
|
193
|
+
for(var a=0;a<this.options.columns.length;a++){var d=_$_7134[3]+Z.call(this,a),e=_$_7134[3]+ea.processed.call(this,a,b,!0);jSuites.path.call(c,d,e)}}else for(c=[],a=0;a<this.options.columns.length;a++)c.push(ea.processed.call(this,a,b,!0));return c}return JSON.parse(JSON.stringify(this.options.data[b]))};k.setRowData=function(b,c,a){for(var d=[],e=0;e<this.options.columns.length;e++)typeof c[e]===_$_7134[13]&&(c[e]=_$_7134[3]),d.push({x:e,y:b,value:c[e]});d.length&&this.setValue(d,null,a)};k.getColumnData=
|
|
194
|
+
function(b,c){if(typeof this.options.columns[b]===_$_7134[13])return!1;for(var a=[],d=0;d<this.options.data.length;d++){var e=c?ea.processed.call(this,b,d,!0):L.call(this,b,d);a.push(e)}return a};k.setColumnData=function(b,c,a){for(var d=[],e=0;e<this.rows.length;e++)typeof c[e]===_$_7134[13]&&(c[e]=_$_7134[3]),d.push({x:b,y:e,value:c[e]});d.length&&this.setValue(d,null,a)};k.copy=function(b){var c=this,a=this.getHighlighted(),d=function(){c.setBorder(a[0],a[1],a[2],a[3],_$_7134[127]);c.borders.copying.clear=
|
|
195
|
+
1==b?!0:!1},e=k[_$_7134[51]].call(this,a,!0,_$_7134[190]),f=F.call(this.parent,_$_7134[191],this,a,e);if(f)e=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(d):(this.parent.textarea.value=e,this.parent.textarea.select(),document.execCommand(_$_7134[192]),d());return e};k.paste=function(b,c,a){if(!R.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&(d.resetBorders(_$_7134[127],!0),d.borders.copying.clear=!1)},f=null,g=this.options.style,
|
|
196
|
+
h=null,l=null,m=[];if(this.borders.copying){var p=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];h=p[0];l=p[1];var n=jSuites.hash(a),r=jSuites.hash(k[_$_7134[51]].call(this,p,!0,_$_7134[190]));if(n!=r)e();else{var v=0,u=0;a=k[_$_7134[51]].call(this,p,!1,!1);for(n=p[1];n<=p[3];n++)if(!this.results||-1!=this.results.indexOf(n)){m[u]=[];v=0;for(r=p[0];r<=p[2];r++)f=E.getColumnNameFromCoords(r,n),m[u][v]=g&&g[f]?g[f]:_$_7134[193],v++;u++}}}b=parseInt(b);
|
|
197
|
+
c=parseInt(c);if(a){Array.isArray(a)||(a=E.parseCSV(a,_$_7134[190]));if(n=F.call(this.parent,_$_7134[194],this,a,b,c,m))a=n;else if(!1===n)return!1;100<a.length&&!this.options.pagination&&!H.limited.call(this)&&console.log(_$_7134[195]);if(f=this.getHighlighted()){v=[];u=[];var y=[];g=[];var w=0,C=0;for(n=f[1];n<=f[3];n++)if(!this.results||-1!=this.results.indexOf(n)){v=[];u=[];for(r=f[0];r<=f[2];r++)v.push(a[C][w]),m&&m[C]&&m[C][w]?u.push(m[C][w]):u.push(_$_7134[3]),w++,w>=a[0].length&&(w=0);y.push(v);
|
|
198
|
+
g.push(u);C++;C>=a.length&&(C=0)}0==y.length%a.length&&0==y[0].length%a[0].length&&(a=y,m=g)}g=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(n=p[1];n<=p[3];n++)for(r=p[0];r<=p[2];r++)(!this.results||this.results&&0<=this.results.indexOf(n))&&f.push({x:r,y:n,value:_$_7134[3],style:_$_7134[3]});e()}n=b+a[0].length-this.options.columns.length;0<n&&this.insertColumn(n);n=c+a.length-this.rows.length;0<n&&this.insertRow(n);u=v=b;w=y=c;C=null;this.results&&(g=this.results.indexOf(c));
|
|
199
|
+
for(n=0;n<a.length;n++)for(r=0;r<a[n].length;r++){null!==h&&null!==l&&a[n][r][0]==_$_7134[12]&&(a[n][r]=W.shiftFormula(a[n][r],b-h,c-l));u=b+r;w=c+n;this.results&&(w=this.results[g+n]);var A={x:u,y:w,value:a[n][r]};m&&m[n]&&m[n][r]&&(A.style=m[n][r]);f.push(A);null===C&&ya.isSelected.call(this,u,w,p)&&(C=!0)}C&&e();f.length&&(ea[_$_7134[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),F.call(this.parent,_$_7134[196],this,f),this.updateSelectionFromCoords(v,y,u,w))}};k.download=function(b,
|
|
200
|
+
c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var a=_$_7134[3];if(1==b||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_7134[131])+_$_7134[10];a+=k[_$_7134[51]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_7134[198]+a],{type:_$_7134[199]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+_$_7134[200]):(b=document.createElement(_$_7134[201]),c=URL.createObjectURL(c),b.href=
|
|
201
|
+
c,b.setAttribute(_$_7134[202],this.options.csvFileName+_$_7134[200]),document.body.appendChild(b),b.click(),b.parentNode.removeChild(b))}else console.error(_$_7134[197])};k.standardize=function(b){b||(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$_7134[83]||(b=[b]);for(var c=0;c<b.length;c++){var a={};Array.isArray(b[c])||void 0==b[c].data?a.data=b[c]:a=b[c];a.row=void 0==b[c].row?c:b[c].row;b[c]=a}return b};return k}(),Wa=function(){var k=function(b){b.getLabel=
|
|
202
|
+
k[_$_7134[51]];b.getLabelFromCoords=k[_$_7134[51]]};k[_$_7134[51]]=function(b,c,a){if(typeof b==_$_7134[17]){b=E.getCoordsFromColumnName(b);var d=b[0];c=b[1]}else d=b;return this.getProcessed(d,c,a)};return k}(),Ia=function(){var k=function(b){b.getDefinedNames=k[_$_7134[51]];b.setDefinedNames=k[_$_7134[11]]};k[_$_7134[11]]=function(b){var c=Object.keys(b);if(c.length){for(var a=0;a<c.length;a++)this.parent.config.definedNames[c[a]]=b[c[a]];K.call(this,_$_7134[203],[b])}};k[_$_7134[51]]=function(b){var c=
|
|
203
|
+
this.parent.config.definedNames;return b?c[b]:c};k.updateAll=function(b,c){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var h=W.update.call(this,a[e[g]],b,c,f);h!==a[e[g]]&&(d[e[g]]=h)}k[_$_7134[11]].call(this,d)}}};k.updateWorksheetName=function(b,c){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=0;f<e.length;f++){var g=W.updateWorksheetName(a[e[f]],b,c);g!==a[e[f]]&&
|
|
204
|
+
(d[e[f]]=g)}k[_$_7134[11]].call(this,d)}}};return k}(),la=function(){var k=[_$_7134[204],_$_7134[205],_$_7134[206],_$_7134[207],_$_7134[208]],b=[_$_7134[185],_$_7134[150],_$_7134[209],_$_7134[210],_$_7134[211],_$_7134[212],_$_7134[1],_$_7134[213],_$_7134[25],_$_7134[214],_$_7134[12],_$_7134[215],_$_7134[216],_$_7134[217]],c=[],a=function(){if(0<c.length){for(var f=0;f<c.length;f++)ha.destroy.call(this,c[f]);c=[]}},d=function(f){a.call(this);for(var g=0,h=[],l,m=0;m<f.children.length;m++)if(l=f.children[m].getAttribute(_$_7134[218])){h[l]||
|
|
205
|
+
(h[l]=k[g++],4<g&&(g=0));f.children[m].style.color=h[l];if(-1===l.indexOf(_$_7134[134])){if(0<=l.indexOf(_$_7134[135])){var p=l.split(_$_7134[135]),n=E.getCoordsFromColumnName(p[0]);p=E.getCoordsFromColumnName(p[1])}else p=n=E.getCoordsFromColumnName(l);ya[_$_7134[11]].call(this,n[0],n[1],p[0],p[1],null,l,h[l])}c.push(l)}},e=function(f,g){f.classList.add(_$_7134[93]);f.classList.add(_$_7134[219]);f.classList.add(_$_7134[220]);f.classList.add(_$_7134[221]);f.setAttribute(_$_7134[222],!0);f.onclick=
|
|
206
|
+
function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$_7134[223]))};f.onblur=function(){f.worksheet&&(a.call(f.worksheet),typeof f.onchange==_$_7134[84]&&f.onchange.call(f),f.worksheet=null)};f.val=function(h){if(void 0===h)return f.innerText;f.innerText=h};f.onchange=g};e.current=null;e.parse=function(f){for(var g=_$_7134[3],h=_$_7134[3],l=window.getSelection(),m=document.createRange(),
|
|
207
|
+
p=E.getCaretIndex.call(this.parent,f),n=W.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_7134[3])),r=0;r<n.length;r++)n[r]&&W.tokenIdentifier.test(n[r].trim())?(r==n.length-1&&(h=_$_7134[224]),g+=_$_7134[225]+h+_$_7134[226]+n[r].trim().replace(/\$/g,_$_7134[3])+_$_7134[227]+n[r]+_$_7134[228]):g+=n[r];f.innerHTML=g;g=null;for(r=0;r<f.childNodes.length&&!(g=f.childNodes[r],h=g.tagName?g.innerText.length:g.length,0>=p-h);r++)p-=h;g&&(g.tagName?m.setStart(g.firstChild,p):m.setStart(g,p),l.removeAllRanges(),
|
|
208
|
+
l.addRange(m));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$_7134[93]):e.current&&(typeof e.current.onchange==_$_7134[84]&&e.current.onchange.call(e.current),e.current.classList.remove(_$_7134[223]),e.current.worksheet=null,e.current=null)};e.getName=function(f,g,h,l,m){f=E.getColumnNameFromCoords(f,g);h=E.getColumnNameFromCoords(h,l);m.ctrlKey&&(f=h);return f!==h?(m=f+_$_7134[135]+h,m=W.getTokensFromRange.call(this,m),W.getRangeFromTokens.call(this,m)):f};e.range=function(f,
|
|
209
|
+
g,h,l,m){e.current.getAttribute(_$_7134[229])==_$_7134[230]&&(f=h,g=l);f=e.getName.call(this,f,g,h,l,m);g=document.createElement(_$_7134[231]);g.innerText=f;g.setAttribute(_$_7134[218],f);e.current.innerText=_$_7134[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);m.preventDefault()};e.update=function(f,g,h,l,m){var p=this,n=jSuites.getNode();if(n){var r=e.getName.call(this,f,g,h,l,m);f=function(v){var u=document.createElement(_$_7134[231]);u.innerText=r;u.setAttribute(_$_7134[218],
|
|
210
|
+
r);n.parentNode===p.parent.input&&!1===v?n.parentNode.insertBefore(u,n.nextSibling):p.parent.input.appendChild(u);n=u};if(n.getAttribute(_$_7134[218]))m.ctrlKey?(p.parent.input.appendChild(document.createTextNode(_$_7134[25])),f(!0)):(n.innerText=r,n.setAttribute(_$_7134[218],r));else{if(n.innerText!==_$_7134[3]&&-1==b.indexOf(n.innerText.slice(-1))||n.nextElementSibling&&n.nextElementSibling.getAttribute(_$_7134[218]))return!1;f(!1)}jSuites.focus(n);d.call(p,p.parent.input);m.preventDefault();return!0}return!1};
|
|
211
|
+
e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_7134[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_7134[192]))}else if(36==f.which){var g=window.getSelection(),h=document.createRange();h.setStart(f.target,0);g.removeAllRanges();g.addRange(h)}else 35==f.which?jSuites.focus(f.target):187==f.which&&!f.target.innerText.replace(/(\r\n|\n|\r)/gm,
|
|
212
|
+
_$_7134[3])&&f.target.getAttribute(_$_7134[95])&&f.target.removeAttribute(_$_7134[95])};return e}(),W=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),b=function(h){h=c(h);for(var l=[_$_7134[185],_$_7134[150],_$_7134[209],_$_7134[210],_$_7134[211],_$_7134[232]],m=[_$_7134[212],_$_7134[233],_$_7134[1],_$_7134[2],_$_7134[213],_$_7134[234],_$_7134[25],_$_7134[214],_$_7134[12],_$_7134[215],_$_7134[216],_$_7134[217]],p=_$_7134[3],n=[],r=0,v=0;v<h.length;v++){if(h[v]==
|
|
213
|
+
_$_7134[187]||h[v]==_$_7134[132])r=0==r?1:0;0==r&&(-1<l.indexOf(h[v])||-1<m.indexOf(h[v]))?(p&&(n.push(p),p=_$_7134[3]),n.push(h[v])):p+=h[v]}p&&n.push(p);for(v=0;v<n.length;v++)-1==n[v].indexOf(_$_7134[187])&&-1==n[v].indexOf(_$_7134[132])&&(n[v]=n[v].replace(/\s/g,_$_7134[3]));return n},c=function(h,l){for(var m=_$_7134[3],p=0,n=[_$_7134[12],_$_7134[134],_$_7134[216],_$_7134[215]],r=0;r<h.length;r++)h[r]==_$_7134[187]&&(p=0==p?1:0),1==p?m+=h[r]:(m+=h[r].toUpperCase(),1==l&&0<r&&h[r]==_$_7134[12]&&
|
|
214
|
+
-1==n.indexOf(h[r-1])&&-1==n.indexOf(h[r+1])&&(m+=_$_7134[12]));return m},a=function(h){h.setFormula=a[_$_7134[11]];h.executeFormula=a.execute;h.formula=[]};a.run=function(h,l){var m=_$_7134[3],p=Object.keys(l);if(p.length){for(var n={},r=0;r<p.length;r++){var v=p[r].replace(/!/g,_$_7134[27]);0<v.indexOf(_$_7134[27])&&(v=v.split(_$_7134[27]),n[v[0]]=!0)}v=Object.keys(n);for(r=0;r<v.length;r++)m+=_$_7134[235]+v[r]+_$_7134[236];for(r=0;r<p.length;r++)v=p[r].replace(/!/g,_$_7134[27]),jSuites.isNumeric(l[p[r]])||
|
|
215
|
+
(n=l[p[r]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&n.length&&(l[p[r]]=e(n,l[p[r]])),m=0<v.indexOf(_$_7134[27])?m+(v+_$_7134[237]+l[p[r]]+_$_7134[238]):m+(_$_7134[235]+v+_$_7134[237]+l[p[r]]+_$_7134[238])}h=h.replace(/\$/g,_$_7134[3]);(n=h.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&n.length&&(h=e(n,h));h=h.replace(/!/g,_$_7134[27]);return(new Function(m+_$_7134[239]+h))()};a[_$_7134[11]]=function(){};var d=function(h){h=c(h,!0);return h.replace(/\$/g,
|
|
216
|
+
_$_7134[3])},e=function(h,l){for(var m=0;m<h.length;m++){var p=a.getTokensFromRange.call(this,h[m]);l=l.replace(h[m],_$_7134[213]+p.join(_$_7134[25])+_$_7134[234])}return l},f=function(h,l,m){for(var p=this.config.definedNames,n=0;n<h.length;n++)h[n]&&p&&p[h[n]]&&(l=l.replace(h[n],p[h[n]]),m&&(m[h[n]]=p[h[n]]));return d(l)},g=function(h,l){var m;if(m=this.records[l][h].a)for(var p=0;p<m.length;p++)for(var n=0;n<m[p].length;n++)m[p][n]&&(m[p][n].innerText=_$_7134[3],this.records[l+p][h+n].v=_$_7134[3]);
|
|
217
|
+
this.records[l][h].a=[]};a.execute=function(h,l,m,p,n){if(1==this.parent.processing)return null!==l&&null!==m&&this.parent.queue.push([this,l,m]),_$_7134[3];if(typeof this.parent.config.onbeforeformula==_$_7134[84]){var r=F.call(this.parent,_$_7134[240],this,h,l,m);if(!1===r)return h;r&&(h=r)}var v=[],u=function(N,S,P,q){if(void 0!=S&&void 0!=P){var z=E.getColumnNameFromCoords(S,P);P=q.getWorksheetName()+_$_7134[27]+z;v[P]||(v[P]=0);v[P]++;if(3<v[P])throw{error:_$_7134[241],message:_$_7134[242],reference:P};
|
|
218
|
+
}else z=null;n||(N=d(N));var x=N,D=x.match(/[A-Z_]+[A-Z0-9_\.]*/g);D&&D.length&&(x=f.call(q.parent,D,x,y));(D=x.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&D.length&&(x=e.call(q,D,x));D=[];x=b(x);for(var G=0;G<x.length;G++)x[G]&&k.test(x[G])&&D.push(x[G]);if(D){if(-1<D.indexOf(z))throw{error:_$_7134[243],message:_$_7134[244]};for(x=0;x<D.length;x++){G=D[x].split(_$_7134[134]);G[1]?(S=G[1],G=I(G[0]),P=q.getWorksheetName()+_$_7134[27]+z):(S=G[0],G=q,P=z);if(typeof G==_$_7134[13]||
|
|
219
|
+
typeof G.formula==_$_7134[13])throw{error:_$_7134[245],message:_$_7134[246]};P&&(G.formula[S]||(G.formula[S]=[]),0>G.formula[S].indexOf(P)&&G.formula[S].push(P));if(!y[D[x]]){P=E.getCoordsFromColumnName(S);S=P[0];P=P[1];var Q=void 0!==G.records[P][S].v?G.records[P][S].v:L.call(G,S,P);y[D[x]]||((_$_7134[3]+Q).substr(0,1)==_$_7134[12]?y[D[x]]=u(Q,S,P,G):(Q?Q!=Number(Q)&&(Q=_$_7134[187]+Q+_$_7134[187]):Q=0,y[D[x]]=Q))}}}return N.substr(1)},y={};try{h=u(h,l,m,this);if(h==_$_7134[3])return _$_7134[3];
|
|
220
|
+
0==h.indexOf(_$_7134[247])&&(n=!0);var w=n?a.run(h,y):t.formula(h,y,l,m,this);if(!1!==p&&void 0!=l&&void 0!=m)if(w instanceof Date)this.records[m][l].v=jSuites.calendar.dateToNum(w);else if(Array.isArray(w)){g.call(this,l,m);p=[];r=null;for(var C=0;C<w.length;C++)for(var A=0;A<w[C].length;A++)null===r&&(0<C&&C>A&&this.options.data[m+C][l+A]?r=_$_7134[248]:(this.records[m+C][l+A].v=w[C][A],this.records[m+C][l+A].element&&(p[C]||(p[C]=[]),p[C][A]=this.records[m+C][l+A].element,this.records[m+C][l+A].element.innerText=
|
|
221
|
+
w[C][A])));null===r?(r=w[0][0],this.records[m][l].a=p):g.call(this,l,m);w=this.records[m][l].v=r}else this.records[m][l].v=w;return w}catch(N){return 1==this.parent.config.debugFormulas&&console.log(h,y,N),N&&N.error?N.error:_$_7134[245]}};a.update=function(h,l,m,p){var n=null,r=null,v=function(w){m&&m[w]&&(w=_$_7134[249]);l[w]&&(w=l[w]);return w};h=c(h,!0);h=b(h);for(var u=0;u<h.length;u++)if(h[u]&&k.test(h[u])){if(-1==h[u].indexOf(_$_7134[134])){if(r=h[u],n=_$_7134[3],p)continue}else if(r=h[u].split(_$_7134[134]),
|
|
222
|
+
n=r[0],r=r[1],p!=n)continue;if(0<=r.indexOf(_$_7134[135])){r=a.getTokensFromRange.call(this,r);for(var y=0;y<r.length;y++)r[y]=v(r[y]);r=a.getRangeFromTokens.call(this,r)}else-1==r.indexOf(_$_7134[250])?r=v(r):(r=v(r.replace(/\$/g,_$_7134[3])),r=_$_7134[250]+r.match(/[A-Z]+/g)+_$_7134[250]+r.match(/[0-9]+/g));n&&(r=n+_$_7134[134]+r);h[u]=r}return h.join(_$_7134[3])};a.getChain=function(h){if(void 0===h)return[];var l=[],m=[],p=[],n=function(u){if(0<=u.indexOf(_$_7134[27])){var y=u.split(_$_7134[27]),
|
|
223
|
+
w=y[0],C=y[1];y=I(y[0])}else y=this,w=y.getWorksheetName(),C=u;if(y.formula[C]&&!p[u]){var A=!1;p[u]=!0;for(u=0;u<y.formula[C].length;u++){var N=y.formula[C][u];-1==N.indexOf(_$_7134[27])&&(N=w+_$_7134[27]+N);if(!m[N]){var S=y.getValue(N);O(S)?l.push([N,S,a.getTokens.call(y,S,w)]):(A=!0,y.formula[C][u]=null);n.call(y,N);m[N]=!0}}1==A&&(y.formula[C]=y.formula[C].filter(function(P){return null!=P}))}},r=Object.keys(h);for(h=0;h<r.length;h++)n.call(this,r[h]);r=0;for(h=l.length-1;0<=h;h--){for(var v=
|
|
224
|
+
0;v<h;v++)if(0<=l[v][2].indexOf(l[h][0])){l.splice(v,0,l.splice(h,1)[0]);h=l.length;break}r++;if(1E6<r){console.error(_$_7134[251]);break}}m=[];for(h=0;h<l.length;h++)m[l[h][0]]=l[h][1];return m};a.updateAll=function(h,l){var m,p;Ia.updateAll.call(this,h,l);var n=Object.keys(this.formula);var r=[];var v=[];for(m=0;m<n.length;m++){var u=n[m];var y=this.formula[u];if(l&&l[u])for(var w=0;w<y.length;w++)h[y[w]]&&(y[w]=h[y[w]]),v[y[w]]=!0;else{var C=[];for(w=0;w<y.length;w++)l&&l[y[w]]||(h[y[w]]&&(y[w]=
|
|
225
|
+
h[y[w]]),v[y[w]]=!0,C.push(y[w]));C.length&&(h[u]&&(u=h[u]),r[u]=C)}}this.formula=r;C=this.getWorksheetName();for(var A=0;A<t.spreadsheet.length;A++)for(var N=t.spreadsheet[A].worksheets,S=0;S<N.length;S++)if(N[S].getWorksheetName()!==C)for(n=Object.keys(N[S].formula),m=0;m<n.length;m++){r=[];y=N[S].formula[n[m]];for(w=0;w<y.length;w++)u=y[w].split(_$_7134[27]),u[0]==C&&u[1]?l&&l[u[1]]||(h[u[1]]&&(u[1]=h[u[1]]),r.push(u[0]+_$_7134[27]+u[1])):r.push(y[w]);N[S].formula[n[m]]=r}n=[];u=Object.keys(v);
|
|
226
|
+
for(w=0;w<u.length;w++)0<=u[w].indexOf(_$_7134[27])?(y=u[w].split(_$_7134[27]),r=I(y[0]),m=y[1],C=this.getWorksheetName(),y=y[0]):(r=this,m=u[w],C=null,y=this.getWorksheetName()),(p=r.getValue(m))&&O(p)&&(r=a.update.call(r,p,h,l,C),r!=p&&(v[u[w]]=r,m=E.getCoordsFromColumnName(m),n[y]||(n[y]=[]),n[y].push({x:m[0],y:m[1],value:r,force:!0})));u=Object.keys(n);for(h=0;h<u.length;h++)r=I(u[h]),n[u[h]]=ea.applyValues.call(r,n[u[h]]),ea.setValueChained.call(r,n[u[h]]),K.call(r,_$_7134[107],{data:n[u[h]]})};
|
|
227
|
+
a.updateWorksheetName=function(h,l,m){for(var p=b(h),n=0;n<p.length;n++)h=p[n].split(_$_7134[134]),h[1]&&(h[0]=h[0].replace(new RegExp(_$_7134[132],_$_7134[188]),_$_7134[3]),h[0].toUpperCase()==l.toUpperCase()&&(h[0]=m,0<=h[0].indexOf(_$_7134[131])&&(h[0]=_$_7134[132]+h[0]+_$_7134[132]),p[n]=h.join(_$_7134[134])));return p.join(_$_7134[3])};a.updateWorksheetNames=function(h,l){for(var m,p,n=0;n<t.spreadsheet.length;n++)for(var r=[],v=t.spreadsheet[n].worksheets,u=0;u<v.length;u++){for(var y=0;y<v[u].options.data.length;y++)for(var w=
|
|
228
|
+
0;w<v[u].options.data[y].length;w++)(m=v[u].options.data[y][w])&&O(m)&&(p=a.updateWorksheetName(m,h,l),p!=m&&r.push({x:w,y,value:p,force:!0}));r.length&&(r=ea.applyValues.call(v[u],r),K.call(v[u],_$_7134[107],{data:r}))}};a.shiftFormula=function(h,l,m){var p=b(h,!0);h=function(u){if(-1==u.indexOf(_$_7134[134])){u=E.getCoordsFromColumnName(u);var y=_$_7134[3]}else y=p[n].split(_$_7134[134]),u=E.getCoordsFromColumnName(y[1]),y=y[0]+_$_7134[134];var w=u[0]+l;u=u[1]+m;return u=0>w||0>u?_$_7134[249]:y+
|
|
229
|
+
E.getColumnNameFromCoords(w,u)};for(var n=0;n<p.length;n++)if(k.test(p[n])&&-1==p[n].indexOf(_$_7134[250])){var r=-1==p[n].indexOf(_$_7134[134])?[_$_7134[3],p[n]]:p[n].split(_$_7134[134]);if(-1==r[1].indexOf(_$_7134[135]))r[1]=h(r[1]);else{var v=r[1].split(_$_7134[135]);r[1]=h(v[0])+_$_7134[135]+h(v[1])}p[n]=r[0]?r.join(_$_7134[134]):r[1]}return p.join(_$_7134[3])};a.getTokensFromRange=function(h){var l=this,m=_$_7134[3],p=_$_7134[3];0<=h.indexOf(_$_7134[27])?p=_$_7134[27]:0<=h.indexOf(_$_7134[134])&&
|
|
230
|
+
(p=_$_7134[134]);h=h.replace(/\$/g,_$_7134[3]);p&&(m=h.split(p),l=I(m[0]),h=m[1],m=m[0]+p);p=[];h=h.split(_$_7134[135]);var n=E.getCoordsFromColumnName(h[0]),r=E.getCoordsFromColumnName(h[1]);if(n[0]<=r[0]){h=n[0];var v=r[0]}else h=r[0],v=n[0];if(null===n[1]&&null==r[1]){var u=0;n=0;l.options&&l.options.data&&(n=l.options.data.length-1)}else n[1]<=r[1]?(u=n[1],n=r[1]):(u=r[1],n=n[1]);for(l=u;l<=n;l++)for(u=h;u<=v;u++)p.push(m+E.getColumnNameFromCoords(u,l));return p};a.getRangeFromTokens=function(h){h=
|
|
231
|
+
h.filter(function(p){return p!=_$_7134[249]});for(var l=_$_7134[3],m=0;m<h.length;m++)0<=h[m].indexOf(_$_7134[27])&&(l=h[m].split(_$_7134[27]),h[m]=l[1],l=l[0]);l&&(l+=_$_7134[27]);h.sort(function(p,n){p=E.getCoordsFromColumnName(p);n=E.getCoordsFromColumnName(n);return p[1]>n[1]?1:p[1]<n[1]?-1:p[0]>n[0]?1:p[0]<n[0]?-1:0});return h.length?l+(h[0]+_$_7134[135]+h[h.length-1]):_$_7134[249]};a.getTokens=function(h,l){var m=d(h);h.replace(/!/g,_$_7134[27]);(h=m.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&h.length&&
|
|
232
|
+
(m=f.call(this.parent,h,m));(h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&h.length&&(m=e.call(this,h,m));h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(m=0;m<h.length;m++)-1==h[m].indexOf(_$_7134[27])&&l&&(h[m]=l+_$_7134[27]+h[m]);return h};a.tokenIdentifier=k;a.tokenize=b;return a}(),ea=function(){var k=function(b){b.name=Z;b.value=L;b.getValue=k[_$_7134[51]];b.getValueFromCoords=k.getFromCoords;b.setValue=k[_$_7134[11]];b.setValueFromCoords=
|
|
233
|
+
k.setFromCoords;b.setCheckRadioValue=k.setCheckRadio;b.getProcessed=k.processed};k[_$_7134[51]]=function(b,c){var a=this;if(typeof b==_$_7134[83]){var d=b.x;b=b.y}else 0<=b.indexOf(_$_7134[27])&&(a=b.split(_$_7134[27]),b=a[1],a=I(a[0])),b=E.getCoordsFromColumnName(b),d=b[0],b=b[1];return k.getFromCoords.call(a,d,b,c)};k.getFromCoords=function(b,c,a){var d=null;null!=b&&null!=c&&(d=a?k.processed.call(this,b,c):L.call(this,b,c));return d};k[_$_7134[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;
|
|
234
|
+
var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,n){var r=null;typeof p==_$_7134[17]?(f=E.getCoordsFromColumnName(p),d=f[0],e=f[1]):p.tagName?(d=p.getAttribute(_$_7134[42]),e=p.getAttribute(_$_7134[43])):p.element&&p.element.tagName?(d=p.element.getAttribute(_$_7134[42]),e=p.element.getAttribute(_$_7134[43])):(d=p.x,e=p.y,void 0!==p.value&&(n=p.value),void 0!==p.style&&(r=p.style));p={x:d,y:e,value:n,force:a};null!==r&&(p.style=r);g.push(p)};if(b&&Array.isArray(b))for(var l=0;l<b.length;l++)h(b[l],
|
|
235
|
+
c);else if(typeof b==_$_7134[83]&&void 0==b.x&&void 0==b.tagName)for(c=Object.keys(b),l=0;l<c.length;l++)h(c[l],b[c[l]]);else h(b,c);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,g);Y.update.call(this,!0);this.refreshBorders();var m=this;setTimeout(function(){ha.refresh.call(m)},250);if(g.length){V.call(this.parent,{worksheet:m,action:_$_7134[77],records:g,selection:this.selectedCell});b=this.getPrimaryKey();if(!1!==b)for(l=0;l<g.length;l++)g[l].x===
|
|
236
|
+
b&&g[l].value&&T.call(this,g[l]);K.call(this,_$_7134[77],{data:g});F.call(this.parent,_$_7134[252],this,g)}}};k.setFromCoords=function(b,c,a,d){var e=[];e.push({x:b,y:c,value:a});k[_$_7134[11]].call(this,e,null,d)};k.setCheckRadio=function(){for(var b=[],c=this.getSelected(),a=0;a<c.length;a++){var d=c[a].x,e=c[a].y;if(!this.options.columns[d].readOnly&&this.options.columns[d].type==_$_7134[253]){var f=L.call(this,d,e)?!1:!0;b.push({x:d,y:e,value:f})}}b.length&&k[_$_7134[11]].call(this,b)};k.applyValues=
|
|
237
|
+
function(b){for(var c,a,d=this.options.style||{},e=[],f={},g=0;g<b.length;g++)if(c=b[g],a=this.updateCell(c.x,c.y,c.value,c.force),void 0!==a.value){if(void 0!==c.style){var h=E.getColumnNameFromCoords(c.x,c.y);a.style=f[h]=c.style;a.oldStyle=d&&d[h]?d[h]:_$_7134[193]}e.push(a)}0<Object.keys(f).length&&Qa.update.call(this,f);return e};k.processed=function(b,c,a){var d=L.call(this,b,c);if(null===d)return null;var e=da[_$_7134[51]].call(this,b,c),f=e[1];f.type!=_$_7134[49]&&f.type!=_$_7134[254]&&f.type!=
|
|
238
|
+
_$_7134[255]&&f.type!=_$_7134[256]&&f.type!=_$_7134[257]&&0!=f.process&&(!0===a||f.type!=_$_7134[258]&&f.type!=_$_7134[259]&&f.type!=_$_7134[260])&&(f.type==_$_7134[253]?d=e[0][_$_7134[51]](f,d,a):this.records[c][b].element?d=1==this.parent.config.stripHTML?this.records[c][b].element.innerText:this.records[c][b].element.innerHTML:((_$_7134[3]+d).substr(0,1)==_$_7134[12]&&(d=this.executeFormula(d,b,c,!1)),e[0]&&typeof e[0][_$_7134[51]]==_$_7134[84]&&(d=e[0][_$_7134[51]](f,d,a))));return d};k.setValueChained=
|
|
239
|
+
function(b){for(var c,a=[],d,e=0;e<b.length;e++)c=b[e],d=E.getColumnNameFromCoords(c.x,c.y),a[d]=c.value;a=W.getChain.call(this,a);var f=[],g=Object.keys(a);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$_7134[27])?(c=g[e].split(_$_7134[27]),d=c[1],c=I(c[0])):(d=g[e],c=this),d=E.getCoordsFromColumnName(d),b=M.update.call(c,d[0],d[1],a[g[e]],!0),this.parent.config.onformulachain&&(b.w=c,b.v=c.records[d[1]][d[0]].v,b.cell=g[e],b.f=a[g[e]],f.push(b));F.call(this.parent,_$_7134[261],this,f)};return k}(),M=
|
|
240
|
+
function(){var k=function(b){b.getCell=k[_$_7134[51]];b.getCellFromCoords=k[_$_7134[51]];b.updateCell=k.update;b.updateCells=k.updateAll;b.getSelected=k.selected;b.isAttached=k.attached};k.attached=function(b,c){return this.records[c]&&this.records[c][b]&&this.records[c][b].element&&this.records[c][b].element.parentNode&&this.records[c][b].element.parentNode.parentNode?!0:!1};k[_$_7134[51]]=function(b,c,a){typeof b==_$_7134[17]&&(c=E.getCoordsFromColumnName(b),b=c[0],c=c[1]);b=parseInt(b);c=parseInt(c);
|
|
241
|
+
if(this.records[c]&&this.records[c][b]&&this.records[c][b].element)return this.records[c][b].element;var d=L.call(this,b,c);null===d&&(d=_$_7134[3]);return M.create.call(this,b,c,d,a)};k.getFromCoords=function(b,c,a){if(!b)return null;var d=[],e=b[0],f=b[1],g=b[2];b=b[3];for(a&&(a=this.results?E.invert(this.results):null);f<=b;f++)for(var h=e;h<=g;h++)if(!a||a[f])c?d.push(E.getColumnNameFromCoords(h,f)):d.push(this.records[f][h]);return d};k.selected=function(b,c){return k.getFromCoords.call(this,
|
|
242
|
+
this.getHighlighted(),b,c)};k.getSelectedColumns=function(){var b=[],c=this.getHighlighted();if(c)for(var a=c[0];a<=c[2];a++)b.push(a);return b};k.updateAll=function(b){for(var c=this.getPrimaryKey(),a=[],d=0;d<b.length;d++)void 0!==b[d].id?(T.call(this,b[d]),a.push({id:b[d].id,y:b[d].y}),!1!==c&&k.update.call(this,c,b[d].y,b[d].id,!0)):a.push(k.update.call(this,b[d].x,b[d].y,b[d].value,b[d].force));K.call(this,_$_7134[106],[a])};k.update=function(b,c,a,d){var e=this.records[c];if(e=e&&e[b]?e[b]:
|
|
243
|
+
null){e=e.element;var f={x:b,y:c};if(d||!e||1!=e.classList.contains(_$_7134[18])){var g=F.call(this.parent,_$_7134[262],this,e,b,c,a);void 0!==g&&(a=g);d=da[_$_7134[51]].call(this,b,c);typeof d[0].updateCell==_$_7134[84]&&(g=d[0].updateCell(e,a,b,c,this,d[1]),void 0!==g&&(a=g));g=L.call(this,b,c);if(g!==a){var h=L.call(this,b,c,a);f.oldValue=g;f.value=h;e&&k.applyOverflow.call(this,e,b,c);d[1]&&typeof d[1].render==_$_7134[84]&&d[1].render(e,a,b,c,this,d[1]);F.call(this.parent,_$_7134[263],this,e,
|
|
244
|
+
b,c,f.value,f.oldValue)}}}else return!1;return f};k.create=function(b,c,a,d){var e=document.createElement(_$_7134[146]);e.setAttribute(_$_7134[42],b);e.setAttribute(_$_7134[43],c);var f=da[_$_7134[51]].call(this,b,c);f[0]&&typeof f[0].createCell==_$_7134[84]&&(f=f[0].createCell(e,a,b,c,this,f[1]),void 0!==f&&(a=f));L.call(this,b,c,a);this.records[c][b]||na.cell.call(this,b,c,a);this.records[c][b].element=e;!a&&this.records[c][b].v&&(e.innerText=this.records[c][b].v);k.applyProperties.call(this,e,
|
|
245
|
+
b,c,d);k.applyOverflow.call(this,e,b,c);F.call(this.parent,_$_7134[264],this,e,b,c,a);return e};k.getAttributes=function(b,c,a){a[b]||(a[b]={});b==_$_7134[265]?a[b][c]=this.getValue(c):b==_$_7134[266]?this.merged.cells&&(c=this.merged.cells[c])&&(a[b][c]=this.options.mergeCells[c]):this.options[b]&&this.options[b][c]&&(a[b][c]=this.options[b][c])};k.setAttributes=function(b){b&&b.style&&this.setStyle(b.style);b&&b.comments&&this.setComments(b.comments);b&&b.meta&&this.setMeta(b.meta);b&&b.cells&&
|
|
246
|
+
this.setCells(b.cells);b&&b.mergeCells&&this.setMerge(b.mergeCells);b&&b.values&&k.batch.call(this,b.values);b&&b.formulas&&k.batch.call(this,b.formulas,!0)};k.applyProperties=function(b,c,a,d){if(!d){var e=E.getColumnNameFromCoords(c,a),f=this.options.style;d=this.options.comments;var g=this.options.cells,h=this.options.rows;if(f&&f[e]){var l=(l=b.getAttribute(_$_7134[99]))?l+(_$_7134[217]+f[e]):f[e];b.setAttribute(_$_7134[99],l)}this.options.columns[c]&&this.options.columns[c].wrap&&b.classList.add(_$_7134[267]);
|
|
247
|
+
d&&d[e]&&b.setAttribute(_$_7134[268],d[e]);g&&g[e]&&(1==g[e].readOnly&&b.classList.add(_$_7134[18]),!1===g[e].locked&&!0===this.options.selectUnLockedCells&&b.classList.add(_$_7134[269]),1==g[e].wrap&&b.classList.add(_$_7134[267]));h&&h[a]&&1==h[a].readOnly&&b.classList.add(_$_7134[18])}d=this.options.columns[c];!b.style.textAlign&&(l=d.align?d.align:this.options.defaultColAlign)&&(b.style.textAlign=l);!1===this.records[a][c].readonly||1!=this.records[a][c].readonly&&1!=d.readOnly&&1!=d.readonly||
|
|
248
|
+
b.classList.add(_$_7134[18])};k.applyOverflow=function(b,c,a){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(b.style.overflow=_$_7134[49]),this.records[a][c-1]&&this.records[a][c-1].element&&(this.records[a][c-1].element.style.overflow=!b.innerText&&this.headers[c-1]&&this.headers[c-1].offsetWidth?_$_7134[3]:_$_7134[49]))};k.batch=function(b,c){var a=[],d=Object.keys(b);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_7134[27])){var f=d[e].split(_$_7134[27]);var g=
|
|
249
|
+
I(f[0]);var h=f[1];f=f[0]}else g=this,h=d[e],f=this.getWorksheetName();h=E.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],b[d[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==c&&(d=Object.keys(a),d.length))for(e=0;e<d.length;e++)g=I(d[e]),K.call(g,_$_7134[107],a[d[e]])};return k}(),Ha=function(){var k=function(b){b.getColumnOptions=k[_$_7134[51]];b.setColumnOptions=k[_$_7134[11]];b.getCells=k.getCells;b.setCells=k.setCells;b.getProperties=k[_$_7134[51]];b.setProperties=k[_$_7134[11]];b.getProperty=
|
|
250
|
+
k[_$_7134[51]];b.setProperty=k[_$_7134[11]];b.resetProperty=k[_$_7134[11]];b.getOptions=k[_$_7134[51]]};k.getCells=function(b){return b?this.options.cells[b]:this.options.cells};k.setCells=function(b,c){if(!R.call(this.parent,this))return!1;if(typeof b==_$_7134[17])this.options.cells[b]=c;else{c=Object.keys(b);for(var a=0;a<c.length;a++)this.options.cells[c[a]]=b[c[a]]}};k[_$_7134[51]]=function(b,c){var a=null;void 0!==c&&(c=E.getColumnNameFromCoords(b,c),this.options.cells&&this.options.cells[c]&&
|
|
251
|
+
(a=this.options.cells[c]));null===a&&(a=this.options.columns[b]);if(!a)a={type:_$_7134[55]};else if(!a.type||typeof a.type==_$_7134[17]&&!t.editors[a.type])a.type=_$_7134[55];return a};k[_$_7134[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var d=[];Array.isArray(b)?d=b:jSuites.isNumeric(b)&&jSuites.isNumeric(c)?(b={x:b,y:c},typeof a==_$_7134[83]&&(b.value=a),d.push(b)):typeof c===_$_7134[83]&&(b={x:b,value:c},d.push(b));if(Array.isArray(d))for(a=
|
|
252
|
+
0;a<d.length;a++){var e=d[a];b=e.x;c=e.y;var f=k[_$_7134[51]].call(this,b,c),g=e.value,h=t.editors[f.type],l=null;g&&g.type&&(l=t.editors[g.type]);if(typeof c===_$_7134[13]){e.oldValue=f;if(h&&typeof h.destroyCell==_$_7134[84])for(c=0;c<this.records.length;c++)this.records[c][b].element&&h.destroyCell(this.records[c][b].element,b,c);parseInt(g.width)||(g.width=this.options.defaultColWidth||100);g.type&&t.editors[g.type]||(g.type=_$_7134[55]);this.options.columns[b]=g;g.width&&this.colgroup[b]&&this.colgroup[b].setAttribute(_$_7134[151],
|
|
253
|
+
parseInt(g.width));typeof g.title!==_$_7134[13]&&this.headers[b]&&(g.title?(this.headers[b].innerText=g.title,this.headers[b].setAttribute(_$_7134[165],g.title)):(this.headers[b].innerText=E.getColumnName(b),this.headers[b].removeAttribute(_$_7134[165])));g.tooltip&&this.headers[b]&&(this.headers[b].title=g.tooltip);if(l&&typeof l.createCell==_$_7134[84])for(c=0;c<this.records.length;c++)this.records[c]&&this.records[c][b]&&(M.applyProperties.call(this,this.records[c][b].element,b,c),l.createCell(this.records[c][b].element,
|
|
254
|
+
L.call(this,b,c),b,c,this,g))}else f=E.getColumnNameFromCoords(b,c),e.oldValue=this.options.cells&&this.options.cells[f]?this.options.cells[f]:_$_7134[3],h&&typeof h.destroyCell==_$_7134[84]&&this.records[c][b].element&&h.destroyCell(this.records[c][b].element,b,c,this),g?(this.options.cells||(this.options.cells={}),this.options.cells[f]=g):(delete this.options.cells[f],g=k[_$_7134[51]].call(this,b,c),l=t.editors[g.type]),l&&typeof l.createCell==_$_7134[84]&&this.records[c]&&this.records[c][b]&&(h=
|
|
255
|
+
this.records[c][b].element,e=L.call(this,b,c),M.applyProperties.call(this,h,b,c,this),g=l.createCell(h,e,b,c,this,g),void 0!==g&&L.call(this,b,c,g))}else return console.error(_$_7134[251]),!1;this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_7134[78],records:d});K.call(this,_$_7134[78],{data:d});return!0};return k}(),Aa=function(){var k=function(c,a){Array.isArray(a)||(a=[a]);for(var d,e=c?_$_7134[3]:_$_7134[40],f=Object.keys(a),g=0;g<f.length;g++)if(d=this.rows[a[f[g]]])d.element&&
|
|
256
|
+
(d.element.style.display=e),d.visible=c;this.resetBorders();H.refresh.call(this)},b=function(c){c.getRow=b[_$_7134[51]];c.moveRow=b.move;c.insertRow=b.add;c.deleteRow=b.del;c.getSelectedRows=b.selected;c.showRow=k.bind(c,!0);c.hideRow=k.bind(c,!1)};b[_$_7134[51]]=function(c){return this.rows[c]};b.attached=function(c){return this.rows[c]&&this.rows[c].element&&this.rows[c].element.parentNode?!0:!1};b.selected=function(c){var a=[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)c?a.push(e):
|
|
257
|
+
a.push(this.rows[e].element);return a};b.create=function(c,a){if(this.rows[c]&&this.rows[c].element)return this.rows[c].element;this.rows[c]||na.row.call(this,c);var d=document.createElement(_$_7134[144]);d.setAttribute(_$_7134[43],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!a&&(this.options.rows[c].style&&d.setAttribute(_$_7134[99],this.options.rows[c].style),this.options.rows[c].height&&(d.style.height=parseInt(this.options.rows[c].height)+_$_7134[44]),this.options.rows[c].title&&
|
|
258
|
+
(e=this.options.rows[c].title),0==this.options.rows[c].visible&&(this.rows[c].visible=!1),this.options.rows[c].id&&(this.rows[c].id=this.options.rows[c].id));F.call(this.parent,_$_7134[270],this,c,d);0==this.rows[c].visible&&(d.style.display=_$_7134[40]);e||(e=parseInt(c+1));a=document.createElement(_$_7134[146]);a.innerHTML=e;a.setAttribute(_$_7134[43],c);a.className=_$_7134[271];d.appendChild(a);return d};b.move=function(c,a){if(!R.call(this.parent,this))return!1;c=parseInt(c);a=parseInt(a);if(!this.rows[a]||
|
|
259
|
+
!this.rows[c])return console.error(_$_7134[272]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[c]?d=!0:this.merged.rows[a]&&(c>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[a].element)?(d=H.renderRow.call(this,c),c>a?this.tbody.insertBefore(d,this.rows[a].element):this.tbody.insertBefore(d,this.rows[a].element.nextSibling)):this.rows[c].element&&(this.tbody.removeChild(this.rows[c].element),
|
|
260
|
+
H.refresh.call(this));this.rows.splice(a,0,this.rows.splice(c,1)[0]);this.records.splice(a,0,this.records.splice(c,1)[0]);this.options.data.splice(a,0,this.options.data.splice(c,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);K.call(this,_$_7134[66],{f:c,t:a});Y.references.call(this);Y.update.call(this);V.call(this.parent,{worksheet:this,action:_$_7134[66],oldValue:c,newValue:a});F.call(this.parent,_$_7134[273],this,c,a)};b.add=function(c,
|
|
261
|
+
a,d,e){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_7134[274]),!1;var f=[];if(0<c)var g=parseInt(c);else g=1,Array.isArray(c)&&!e&&(Array.isArray(c[0])?e=c:(e=[],e.push(c)));e=Fa.standardize(e);d=d?!0:!1;var h=this.options.data?this.options.data.length-1:0;if(void 0==a||a>h||0>a)a=h,d=!1;g||(g=1);if(!1===F.call(this.parent,_$_7134[275],this,a,g,d))return console.log(_$_7134[276]),!1;this.resetBorders();var l=d?a:a+1,m=0;c=[];for(var p=[],n=this.rows.splice(l),
|
|
262
|
+
r=this.options.data?this.options.data.splice(l):[],v=this.records.splice(l),u=l;u<g+l;u++){var y=e[m]&&e[m].id?e[m].id:sa.next.call(this);na.row.call(this,u,y);var w=this.dataType?{}:[];for(var C=0;C<this.options.columns.length;C++){var A=Z.call(this,C);w[A]=_$_7134[3];e&&e[m]&&e[m].data&&(typeof e[m].data[A]!==_$_7134[13]?w[A]=e[m].data[A]:typeof e[m].data[C]!==_$_7134[13]&&(w[A]=e[m].data[C]));f.push({x:C,y:u,value:w[A],force:!0})}p.push({id:y,data:w});m++}this.rows=this.rows.concat(n);this.records=
|
|
263
263
|
this.records.concat(v);Array.prototype.push.apply(this.options.data,r);this.results&&0<this.results.length&&(h=this.results[this.results.length-1]);e=!1;n[0]?0<=Array.prototype.indexOf.call(this.tbody.children,n[0].element)&&(e=!0):this.rows[h]?this.rows[h].element&&0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[h].element)&&(e=!0):e=!0;for(u=l;u<g+l;u++)this.results&&(this.rows[u].results=!0),1==e&&(h=n[0]?n[0].element:null,A=H.renderRow.call(this,u,null,null,!0),h?this.tbody.insertBefore(A,
|
|
264
|
-
h):this.tbody.appendChild(A),0<this.options.pagination?Array.prototype.indexOf.call(this.tbody.children,A)>=this.options.pagination&&(e=!1):H.limited.call(this)&&(H.isVisible.call(this,A.children[1])||(e=!1))),c.push(this.records[u]);this.merged.rows[l]&&ba.updateConfig.call(this,1,1,l-1,g);K.call(this,_$
|
|
265
|
-
Y.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ta[_$
|
|
266
|
-
!1;var d=null,e={},f=[],g=0;void 0==c&&(a=this.getSelectedRows(),a[0]?(c=parseInt(a[0].getAttribute(_$
|
|
267
|
-
var l=parseInt(this.tbody.firstChild.getAttribute(_$
|
|
268
|
-
d;for(m=c;m<c+a;m++)0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[m].element)&&(this.rows[m].element.parentNode.removeChild(this.rows[m].element),g++);d=[];for(m=c;m<c+a;m++)d.push({id:this.getRowId(m),row:m,data:this.getRowData(m)});this.rows.splice(c,a);m=this.records.splice(c,a);this.options.data.splice(c,a);ba.updateConfig.call(this,1,0,c,a);K.call(this,_$
|
|
269
|
-
this.options.pagination?this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var n=this.whichPage(this.options.data.length-1);this.page(n)}}):H.limited.call(this)&&0<g&&(this.tbody.textContent=_$
|
|
270
|
-
(a=[a]);for(var d,e,f=Object.keys(a),g=0;g<f.length;g++)if(d=a[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$
|
|
271
|
-
b.move;c.insertColumn=b.add;c.deleteColumn=b.del;c.showColumn=k.bind(c,!0);c.hideColumn=k.bind(c,!1)};b[_$
|
|
272
|
-
return c};b.move=function(c,a){if(!R.call(this.parent,this))return!1;c=parseInt(c);a=parseInt(a);if(!this.options.columns[c])return console.error(_$
|
|
273
|
-
d=null;if(this.headers[a]&&this.headers[a].parentNode){this.headers[c]||Ca.create.call(this,c);var e=(c>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[c],e);e=(c>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[c],e);for(var f=0;f<this.tbody.children.length;f++){var g=this.tbody.children[f].getAttribute(_$
|
|
274
|
-
null;this.tbody.children[f].insertBefore(M[_$
|
|
264
|
+
h):this.tbody.appendChild(A),0<this.options.pagination?Array.prototype.indexOf.call(this.tbody.children,A)>=this.options.pagination&&(e=!1):H.limited.call(this)&&(H.isVisible.call(this,A.children[1])||(e=!1))),c.push(this.records[u]);this.merged.rows[l]&&ba.updateConfig.call(this,1,1,l-1,g);K.call(this,_$_7134[62],{numOfRows:g,rowNumber:a,insertBefore:d?1:0,data:p});l=this.tbody.firstChild.getAttribute(_$_7134[43]);this.results&&(l=this.results.indexOf(parseInt(l)),this.results=ua.refresh.call(this));
|
|
265
|
+
Y.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ta[_$_7134[11]].call(this,this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$_7134[3],H[_$_7134[46]].call(this,l));Y.update.call(this);U.call(this);ha.refresh.call(this);V.call(this.parent,{worksheet:this,action:_$_7134[62],rowNumber:a,numOfRows:g,insertBefore:d,data:p});F.call(this.parent,_$_7134[277],this,a,g,c,d)};b.del=function(c,a){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_7134[278]),
|
|
266
|
+
!1;var d=null,e={},f=[],g=0;void 0==c&&(a=this.getSelectedRows(),a[0]?(c=parseInt(a[0].getAttribute(_$_7134[43])),a=a.length):(c=this.options.data.length-1,a=1));var h=this.options.data.length-1;if(void 0==c||c>h||0>c)c=h;a||(a=1);c+a>=this.options.data.length&&(a=this.options.data.length-c,a>=this.options.data.length&&(a=this.options.data.length,this.resetSelection()));if(!1===F.call(this.parent,_$_7134[279],this,c,a))return console.log(_$_7134[280]),!1;if(-1<parseInt(c)&&0<parseInt(a)){h=parseInt(this.thead.lastChild.children[1].getAttribute(_$_7134[42]));
|
|
267
|
+
var l=parseInt(this.tbody.firstChild.getAttribute(_$_7134[43]));this.resetBorders();for(var m=c;m<c+a;m++)for(var p=0;p<this.options.columns.length;p++)d=E.getColumnNameFromCoords(p,m),M.getAttributes.call(this,_$_7134[281],d,e),M.getAttributes.call(this,_$_7134[99],d,e),M.getAttributes.call(this,_$_7134[282],d,e),M.getAttributes.call(this,_$_7134[283],d,e),M.getAttributes.call(this,_$_7134[266],d,e),M.getAttributes.call(this,_$_7134[265],d,e),f[d]=!0;if(d=W.getChain.call(this,e.values))e.formulas=
|
|
268
|
+
d;for(m=c;m<c+a;m++)0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[m].element)&&(this.rows[m].element.parentNode.removeChild(this.rows[m].element),g++);d=[];for(m=c;m<c+a;m++)d.push({id:this.getRowId(m),row:m,data:this.getRowData(m)});this.rows.splice(c,a);m=this.records.splice(c,a);this.options.data.splice(c,a);ba.updateConfig.call(this,1,0,c,a);K.call(this,_$_7134[63],{rowNumber:c,numOfRows:a,data:d});Y.references.call(this,f);this.results&&(this.results=ua.refresh.call(this));0<
|
|
269
|
+
this.options.pagination?this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var n=this.whichPage(this.options.data.length-1);this.page(n)}}):H.limited.call(this)&&0<g&&(this.tbody.textContent=_$_7134[3],H.call(this),H[_$_7134[46]].call(this,l,h));Y.update.call(this,!0);V.call(this.parent,{worksheet:this,action:_$_7134[63],rowNumber:c,numOfRows:a,insertBefore:1,data:d,attributes:e});F.call(this.parent,_$_7134[284],this,c,a,m,d,e)}};return b}(),Xa=function(){var k=function(c,a){Array.isArray(a)||
|
|
270
|
+
(a=[a]);for(var d,e,f=Object.keys(a),g=0;g<f.length;g++)if(d=a[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$_7134[44]:_$_7134[143]),e.visible=c;H.refresh.call(this);0<this.options.freezeColumns&&ka[_$_7134[11]].call(this,this.options.freezeColumns);this.resetBorders()},b=function(c){c.getColumn=b[_$_7134[51]];c.getColumnIdByName=b.getByName;c.getPrimaryKey=b.getPrimaryKey;c.getSelectedColumns=b.selected;c.moveColumn=
|
|
271
|
+
b.move;c.insertColumn=b.add;c.deleteColumn=b.del;c.showColumn=k.bind(c,!0);c.hideColumn=k.bind(c,!1)};b[_$_7134[51]]=function(c){return this.options.columns[c]||!1};b.getByName=function(c){for(var a=this.options.columns,d=0;d<a.length;d++)if(a[d].name==c)return d;return!1};b.getPrimaryKey=function(){for(var c=0;c<this.options.columns.length;c++)if(1==this.options.columns[c].primaryKey)return c;return!1};b.selected=function(c){c=[];var a=this.getHighlighted();if(a)for(var d=a[0];d<=a[2];d++)c.push(d);
|
|
272
|
+
return c};b.move=function(c,a){if(!R.call(this.parent,this))return!1;c=parseInt(c);a=parseInt(a);if(!this.options.columns[c])return console.error(_$_7134[285]),!1;if(!this.options.columns[a])return console.error(_$_7134[286]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.cols[c]?d=!0:this.merged.cols[a]&&(c>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();d=this.options.freezeColumns;0<d&&(c<d||a<d)?ka.reset.call(this):
|
|
273
|
+
d=null;if(this.headers[a]&&this.headers[a].parentNode){this.headers[c]||Ca.create.call(this,c);var e=(c>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[c],e);e=(c>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[c],e);for(var f=0;f<this.tbody.children.length;f++){var g=this.tbody.children[f].getAttribute(_$_7134[43]);e=(c>a?this.records[g][a].element:this.records[g][a].element.nextSibling)||
|
|
274
|
+
null;this.tbody.children[f].insertBefore(M[_$_7134[51]].call(this,c,g),e)}if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(c>a?this.footers.content[f][a].element:this.footers.content[f][a].element.nextSibling)||null,this.tfoot.children[f].insertBefore(aa.create.call(this,c,f),e)}else if(this.headers[c]&&this.headers[c].parentNode){this.headerContainer.removeChild(this.headers[c]);this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_7134[43])),
|
|
275
275
|
this.tbody.children[f].removeChild(this.records[g][c].element);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][c].element)}this.options.columns.splice(a,0,this.options.columns.splice(c,1)[0]);this.headers.splice(a,0,this.headers.splice(c,1)[0]);this.colgroup.splice(a,0,this.colgroup.splice(c,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(a,0,this.options.data[f].splice(c,1)[0]),this.records[f].splice(a,
|
|
276
|
-
0,this.records[f].splice(c,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(c,1)[0]),this.footers.content[f].splice(a,0,this.footers.content[f].splice(c,1)[0]);K.call(this,_$
|
|
277
|
-
function(c,a,d,e,f,g){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$
|
|
278
|
-
parseInt((_$
|
|
279
|
-
this.colgroupContainer.appendChild(this.colgroup[A]))};m=function(w,C){if(C)for(var A=n;A<l+n;A++)this.rows[w].element.insertBefore(M[_$
|
|
280
|
-
p.call(this);this.headers=this.headers.concat(r);this.colgroup=this.colgroup.concat(v);aa.adjust.call(this,n,l,1);oa.adjust.call(this,a,l,1,g);g=0;v=r=p=null;for(var u=0;u<this.options.data.length;u++){this.dataType||(r=this.options.data[u].splice(n));v=this.records[u].splice(n);g=0;for(var y=n;y<l+n;y++)p=f[u]&&f[u][g]?f[u][g]:_$
|
|
281
|
-
v[0].element)&&m.call(this,u,v[0].element):this.records[u][c].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][c].element)&&m.call(this,u));this.dataType||(this.options.data[u]=this.options.data[u].concat(r));this.records[u]=this.records[u].concat(v)}this.merged.cols[n]&&ba.updateConfig.call(this,0,1,n-1,l);K.call(this,_$
|
|
282
|
-
h);Y.update.call(this);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$
|
|
283
|
-
1,a=1));var g=this.options.columns.length-1;if(void 0==c||c>g||0>c)c=g;a||(a=1);c+a>=this.options.columns.length&&(a=this.options.columns.length-c,a>=this.options.columns.length&&(a--,console.error(_$
|
|
284
|
-
var l=null,m=[],p=[],n=[];var r=0;for(var v=c;v<c+a;v++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[v])&&(this.colgroup[v].parentNode.removeChild(this.colgroup[v]),this.headers[v].parentNode.removeChild(this.headers[v]),f++),n[r]=this.options.columns[v],r++;for(var u=0;u<this.options.data.length;u++)for(v=c;v<c+a;v++)r=E.getColumnNameFromCoords(v,u),M.getAttributes.call(this,_$
|
|
285
|
-
r,d),M.getAttributes.call(this,_$
|
|
286
|
-
(p[u]=this.options.data[u].splice(c,a)),m[u]=this.records[u].splice(c,a);aa.adjust.call(this,c,a,0);(v=oa.adjust.call(this,c,a,0))&&(l={nested:v});ba.updateConfig.call(this,0,0,c,a);K.call(this,_$
|
|
287
|
-
attributes:d,extra:l});F.call(this.parent,_$
|
|
288
|
-
a[_$
|
|
289
|
-
(this.options.style={});var h=this.options.style,l=null,m=[],p=[],n={};p=function(u,y,w){if(!n[u]&&(h[u]?m=h[u].split(_$
|
|
290
|
-
this.records[w[1]][w[0]]&&this.records[w[1]][w[0]].element&&(this.records[w[1]][w[0]].element.style[y]=n[u][y]);n[u][y]||delete n[u][y]};k={};b={};if(e)if(typeof d==_$
|
|
291
|
-
v[e][0].trim()&&p.call(this,f[r],v[e][0].trim(),v[e][1].trim()));m={};p=Object.keys(n);if(p.length){for(r=0;r<p.length;r++){m[p[r]]||(m[p[r]]=[]);d=Object.keys(n[p[r]]);for(e=0;e<d.length;e++)m[p[r]].push(d[e]+_$
|
|
292
|
-
oldValue:b,newValue:k});K.call(this,_$
|
|
293
|
-
g=0;g<f.length;g++){b[f[g]]=this.options.style[f[g]]||_$
|
|
294
|
-
K.call(this,_$
|
|
295
|
-
c)return!1;this.options.comments||(this.options.comments={});b={};var d=Object.keys(a);if(d.length){for(var e=0;e<d.length;e++){var f=E.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(b[d[e]]=this.options.comments[d[e]]||_$
|
|
296
|
-
{worksheet:this,action:_$
|
|
297
|
-
if(typeof b==_$
|
|
298
|
-
F.call(this.parent,_$
|
|
299
|
-
b,g),e=this.records[g][b].v,e=d.type==_$
|
|
300
|
-
Object.keys(this.getMerge()).length)if(confirm(B(_$
|
|
301
|
-
this,b,c,a);return!0}};k.update=function(b){for(var c=[],a=0;a<b.length;a++)c[a]=this.options.data[b[a]];for(a=0;a<b.length;a++)this.options.data[a]=c[a];c=[];for(a=0;a<b.length;a++)c[a]=this.records[b[a]];this.records=c;c=[];for(a=0;a<b.length;a++)c[a]=this.rows[b[a]];this.rows=c;Y.references.call(this);this.searchInput&&this.searchInput.value?qa.update.call(this,null):ca.update.call(this)};k.arrow=function(b,c){for(var a=0;a<this.headers.length;a++)this.headers[a].classList.remove(_$
|
|
302
|
-
this.headers[a].classList.remove(_$
|
|
303
|
-
this.pagination.appendChild(b);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$
|
|
304
|
-
Math.ceil((parseInt(b)+1)/parseInt(this.options.pagination))-1):null;console.log(_$
|
|
305
|
-
_$
|
|
306
|
-
b-this.pageNumber?(c=b-9,a=b,1>c&&(c=1)):(c=this.pageNumber-4,a=this.pageNumber+5);if(1<c){var d=document.createElement(_$
|
|
307
|
-
_$
|
|
308
|
-
xa.call(this)?50:0;if(this.rows[b].element)for(var e=0;e<a;e++){if(c=this.records[b][e].element)c.classList.add(_$
|
|
309
|
-
this.footers.content[d][a].element.style.left=b+1+_$
|
|
310
|
-
_$
|
|
276
|
+
0,this.records[f].splice(c,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(c,1)[0]),this.footers.content[f].splice(a,0,this.footers.content[f].splice(c,1)[0]);K.call(this,_$_7134[67],{f:c,t:a});Y.references.call(this);Y.update.call(this);0<d&&(c<=d||d<=d)&&ka[_$_7134[11]].call(this,d);V.call(this.parent,{worksheet:this,action:_$_7134[67],oldValue:c,newValue:a});F.call(this.parent,_$_7134[287],this,c,a)};b.add=
|
|
277
|
+
function(c,a,d,e,f,g){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_7134[288]),!1;var h=[];if(0<c)var l=parseInt(c);else if(l=1,Array.isArray(c)&&!f)if(Array.isArray(c[0]))f=c;else{f=[];for(var m=0;m<c.length;m++)f[m]=[c[m]]}f||(f=[]);d=d?!0:!1;c=this.options.columns.length-1;if(void 0==a||a>c||0>a)a=c,d=!1;l||(l=1);if(!1===F.call(this.parent,_$_7134[289],this,a,l,d))return console.log(_$_7134[290]),!1;ha.reset.call(this);if(1==this.dataType)var p=
|
|
278
|
+
parseInt((_$_7134[3]+Date.now()).substr(-8));e||(e=[]);for(m=0;m<l;m++)e[m]||(e[m]={type:_$_7134[55],source:[],options:[],width:this.options.defaultColWidth}),1==this.dataType&&typeof e[m].name==_$_7134[13]&&(e[m].name=_$_7134[291]+(p+m));var n=d?a:a+1;this.options.columns=E.injectArray(this.options.columns,n,e);p=function(w,C){for(var A=n;A<l+n;A++)Ca.create.call(this,A),w?(this.headerContainer.insertBefore(this.headers[A],w),this.colgroupContainer.insertBefore(this.colgroup[A],C)):(this.headerContainer.appendChild(this.headers[A]),
|
|
279
|
+
this.colgroupContainer.appendChild(this.colgroup[A]))};m=function(w,C){if(C)for(var A=n;A<l+n;A++)this.rows[w].element.insertBefore(M[_$_7134[51]].call(this,A,w,!0),C);else for(A=n;A<l+n;A++)this.rows[w].element.appendChild(M[_$_7134[51]].call(this,A,w,!0))};var r=this.headers.splice(n),v=this.colgroup.splice(n);r[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,r[0])&&p.call(this,r[0],v[0]):this.headers[c]&&0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[c])&&
|
|
280
|
+
p.call(this);this.headers=this.headers.concat(r);this.colgroup=this.colgroup.concat(v);aa.adjust.call(this,n,l,1);oa.adjust.call(this,a,l,1,g);g=0;v=r=p=null;for(var u=0;u<this.options.data.length;u++){this.dataType||(r=this.options.data[u].splice(n));v=this.records[u].splice(n);g=0;for(var y=n;y<l+n;y++)p=f[u]&&f[u][g]?f[u][g]:_$_7134[3],L.call(this,y,u,p),h.push({x:y,y:u,value:p}),na.cell.call(this,y,u),g++;this.rows[u].element&&this.rows[u].element.parentNode&&(v[0]?0<=Array.prototype.indexOf.call(this.rows[u].element.children,
|
|
281
|
+
v[0].element)&&m.call(this,u,v[0].element):this.records[u][c].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][c].element)&&m.call(this,u));this.dataType||(this.options.data[u]=this.options.data[u].concat(r));this.records[u]=this.records[u].concat(v)}this.merged.cols[n]&&ba.updateConfig.call(this,0,1,n-1,l);K.call(this,_$_7134[64],{numOfColumns:l,columnNumber:a,insertBefore:d?1:0,properties:e,data:f});Y.references.call(this);h.length&&ea.applyValues.call(this,
|
|
282
|
+
h);Y.update.call(this);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_7134[64],columnNumber:a,numOfColumns:l,insertBefore:d,properties:e,data:f});F.call(this.parent,_$_7134[292],this,a,l,[],d)};b.del=function(c,a){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_7134[293]),!1;var d={},e=[],f=0;if(1<this.options.columns.length){void 0==c&&(a=this.getSelectedColumns(!0),a.length?(c=parseInt(a[0]),a=parseInt(a.length)):(c=this.options.columns.length-
|
|
283
|
+
1,a=1));var g=this.options.columns.length-1;if(void 0==c||c>g||0>c)c=g;a||(a=1);c+a>=this.options.columns.length&&(a=this.options.columns.length-c,a>=this.options.columns.length&&(a--,console.error(_$_7134[294])));if(!1===F.call(this.parent,_$_7134[295],this,c,a))return console.log(_$_7134[296]),!1;if(-1<parseInt(c)&&0<parseInt(a)){g=parseInt(this.thead.lastChild.children[1].getAttribute(_$_7134[42]));var h=0;this.tbody.firstChild&&(h=parseInt(this.tbody.firstChild.getAttribute(_$_7134[43])));this.resetBorders();
|
|
284
|
+
var l=null,m=[],p=[],n=[];var r=0;for(var v=c;v<c+a;v++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[v])&&(this.colgroup[v].parentNode.removeChild(this.colgroup[v]),this.headers[v].parentNode.removeChild(this.headers[v]),f++),n[r]=this.options.columns[v],r++;for(var u=0;u<this.options.data.length;u++)for(v=c;v<c+a;v++)r=E.getColumnNameFromCoords(v,u),M.getAttributes.call(this,_$_7134[281],r,d),M.getAttributes.call(this,_$_7134[99],r,d),M.getAttributes.call(this,_$_7134[282],
|
|
285
|
+
r,d),M.getAttributes.call(this,_$_7134[283],r,d),M.getAttributes.call(this,_$_7134[266],r,d),M.getAttributes.call(this,_$_7134[265],r,d),e[r]=!0,this.records[u][v].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][v].element)&&this.records[u][v].element.parentNode.removeChild(this.records[u][v].element);if(v=W.getChain.call(this,d.values))d.formulas=v;this.options.columns.splice(c,a);this.headers.splice(c,a);this.colgroup.splice(c,a);for(u=0;u<this.options.data.length;u++)this.dataType||
|
|
286
|
+
(p[u]=this.options.data[u].splice(c,a)),m[u]=this.records[u].splice(c,a);aa.adjust.call(this,c,a,0);(v=oa.adjust.call(this,c,a,0))&&(l={nested:v});ba.updateConfig.call(this,0,0,c,a);K.call(this,_$_7134[65],{columnNumber:c,numOfColumns:a});Y.references.call(this,e);H.limited.call(this)&&0<f&&(this.tbody.textContent=_$_7134[3],H.call(this),H[_$_7134[46]].call(this,h,g));Y.update.call(this,!0);V.call(this.parent,{worksheet:this,action:_$_7134[65],columnNumber:c,numOfColumns:a,insertBefore:1,data:p,properties:n,
|
|
287
|
+
attributes:d,extra:l});F.call(this.parent,_$_7134[297],this,c,a,m,n,d)}}};return b}(),Qa=function(){var k={},b={},c=function(d){if(typeof d==_$_7134[17]){var e=d;d=E.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=E.getColumnNameFromCoords(f,d);this.records[d]&&this.records[d][f]&&this.records[d][f].element&&(b[e]=this.options.style[e],this.records[d][f].element.setAttribute(_$_7134[99],_$_7134[3]));this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=
|
|
288
|
+
a[_$_7134[51]];d.setStyle=a[_$_7134[11]];d.resetStyle=a.reset};a[_$_7134[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_7134[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var h=0;h<g.length;h++){if(typeof d[h]==_$_7134[17])var l=e&&e[d[h]]?e[d[h]]:_$_7134[3];else l=E.getColumnNameFromCoords(d[h].x,d[h].y),l=e&&e[l]?e[l]:_$_7134[3];f.push(l)}return f}return this.options.style};a[_$_7134[11]]=function(d,e,f,g){if(!R.call(this.parent,this))return!1;this.options.style||
|
|
289
|
+
(this.options.style={});var h=this.options.style,l=null,m=[],p=[],n={};p=function(u,y,w){if(!n[u]&&(h[u]?m=h[u].split(_$_7134[217]):(h[u]=_$_7134[3],m=[]),n[u]={},m.length))for(var C=0;C<m.length;C++)m[C]&&m[C].trim()&&(l=m[C].split(_$_7134[135]),n[u][l[0].trim()]=l[1].trim());b[u]||(b[u]=[]);k[u]||(k[u]=[]);n[u][y]||(n[u][y]=_$_7134[3]);b[u].push([y+_$_7134[135]+n[u][y]]);n[u][y]=n[u][y]&&n[u][y]==w&&!g?_$_7134[3]:w;k[u].push([y+_$_7134[135]+n[u][y]]);w=E.getCoordsFromColumnName(u);this.records[w[1]]&&
|
|
290
|
+
this.records[w[1]][w[0]]&&this.records[w[1]][w[0]].element&&(this.records[w[1]][w[0]].element.style[y]=n[u][y]);n[u][y]||delete n[u][y]};k={};b={};if(e)if(typeof d==_$_7134[17])p.call(this,d,e,f);else{if(d&&d.length)for(var r=0;r<d.length;r++){var v=E.getColumnNameFromCoords(d[r].x,d[r].y);p.call(this,v,e,f)}}else for(f=Object.keys(d),r=0;r<f.length;r++)if(v=d[f[r]])for(typeof v==_$_7134[17]&&(v=v.split(_$_7134[217])),e=0;e<v.length;e++)v[e]&&(typeof v[e]==_$_7134[17]&&(v[e]=v[e].split(_$_7134[135])),
|
|
291
|
+
v[e][0].trim()&&p.call(this,f[r],v[e][0].trim(),v[e][1].trim()));m={};p=Object.keys(n);if(p.length){for(r=0;r<p.length;r++){m[p[r]]||(m[p[r]]=[]);d=Object.keys(n[p[r]]);for(e=0;e<d.length;e++)m[p[r]].push(d[e]+_$_7134[114]+n[p[r]][d[e]]);this.options.style[p[r]]=m[p[r]].join(_$_7134[298])}p=Object.keys(k);for(r=0;r<p.length;r++)k[p[r]]=k[p[r]].join(_$_7134[217]);p=Object.keys(b);for(r=0;r<p.length;r++)b[p[r]]=b[p[r]].join(_$_7134[217]);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_7134[70],
|
|
292
|
+
oldValue:b,newValue:k});K.call(this,_$_7134[70],[k]);F.call(this.parent,_$_7134[299],this,k,b)}};a.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){b={};if(Array.isArray(d))for(var e=0;e<d.length;e++)c.call(this,d[e]);else c.call(this,d);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_7134[71],cells:d,oldValue:b});K.call(this,_$_7134[71],[d]);F.call(this.parent,_$_7134[301],this,d)}else console.error(_$_7134[300])};a.update=function(d){k={};b={};for(var e,f=Object.keys(d),
|
|
293
|
+
g=0;g<f.length;g++){b[f[g]]=this.options.style[f[g]]||_$_7134[3];k[f[g]]=this.options.style[f[g]]=d[f[g]];e=E.getCoordsFromColumnName(f[g]);var h=e[0],l=e[1];this.records[l]&&this.records[l][h]&&this.records[l][h].element&&(this.records[l][h].element.setAttribute(_$_7134[99],d[f[g]]),!this.records[l][h].element.style.textAlign&&(e=this.options.columns[h].align?this.options.columns[h].align:this.options.defaultColAlign))&&(this.records[l][h].element.style.textAlign=e)}K.call(this,_$_7134[71],[f]);
|
|
294
|
+
K.call(this,_$_7134[70],[k]);F.call(this.parent,_$_7134[299],this,k,b)};return a}(),Ya=function(){var k=function(b){b.getComments=k[_$_7134[51]];b.setComments=k[_$_7134[11]]};k[_$_7134[51]]=function(b){return b&&typeof b==_$_7134[17]?this.options.comments&&this.options.comments[b]?this.options.comments[b]:!1:this.options.comments};k[_$_7134[11]]=function(b,c){if(!R.call(this.parent,this))return!1;if(typeof b==_$_7134[17]){var a={};a[b]=c}else a=b;if(c=F.call(this.parent,_$_7134[302],this,a))a=c;else if(!1===
|
|
295
|
+
c)return!1;this.options.comments||(this.options.comments={});b={};var d=Object.keys(a);if(d.length){for(var e=0;e<d.length;e++){var f=E.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(b[d[e]]=this.options.comments[d[e]]||_$_7134[3],(c=a[d[e]])?this.options.comments[d[e]]=c:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&(c?this.records[f[1]][f[0]].element.setAttribute(_$_7134[268],c):this.records[f[1]][f[0]].element.removeAttribute(_$_7134[268])))}V.call(this.parent,
|
|
296
|
+
{worksheet:this,action:_$_7134[75],newValue:a,oldValue:b});K.call(this,_$_7134[75],[a]);F.call(this.parent,_$_7134[303],this,a,b)}};return k}(),Za=function(){var k=function(b){b.getMeta=k[_$_7134[51]];b.setMeta=k[_$_7134[11]];b.resetMeta=k.reset};k[_$_7134[51]]=function(b,c){if(b){if(this.options.meta[b])return c?this.options.meta[b][c]:this.options.meta[b]}else return this.options.meta};k[_$_7134[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});
|
|
297
|
+
if(typeof b==_$_7134[17]&&c){a||(a=_$_7134[3]);var d={};d[b]={};d[b][c]=a;b=d}c=Object.keys(b);if(c.length){a={};for(d=0;d<c.length;d++){this.options.meta[c[d]]||(this.options.meta[c[d]]={});a[c[d]]||(a[c[d]]={});for(var e=Object.keys(b[c[d]]),f=0;f<e.length;f++)this.options.meta[c[d]][e[f]]=b[c[d]][e[f]],a[c[d]][e[f]]=b[c[d]][e[f]]}Object.keys(a).length&&(K.call(this,_$_7134[304],[a]),F.call(this.parent,_$_7134[305],this,a))}};k.reset=function(){this.options.meta={};K.call(this,_$_7134[306],{});
|
|
298
|
+
F.call(this.parent,_$_7134[307],this,{})};return k}(),$a=function(){var k=function(b){b.orderBy=k.execute};k.handler=function(b,c){return function(a,d){a=a[1];d=d[1];return b?a===_$_7134[3]&&d!==_$_7134[3]?1:a!==_$_7134[3]&&d===_$_7134[3]?-1:a>d?-1:a<d?1:0:a===_$_7134[3]&&d!==_$_7134[3]?1:a!==_$_7134[3]&&d===_$_7134[3]?-1:a>d?1:a<d?-1:0}};k.execute=function(b,c,a){if(0<=b){c=null==c?this.headers[b].classList.contains(_$_7134[308])?1:0:c?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Ha[_$_7134[51]].call(this,
|
|
299
|
+
b,g),e=this.records[g][b].v,e=d.type==_$_7134[254]||d.type==_$_7134[259]||d.type==_$_7134[260]||d.type==_$_7134[309]||d.type==_$_7134[14]||d.type==_$_7134[310]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=[g,e];g=typeof this.parent.config.sorting===_$_7134[84]?this.parent.config.sorting(c,b):k.handler(c,b);f.sort(g);d=a?!0:!1;if(!a)for(a=[],g=0;g<f.length;g++)a[g]=f[g][0];if(g=F.call(this.parent,_$_7134[311],this,b,c,a))a=g;else if(!1===g)return!1;if(d)this.destroyMerged();else if(0<
|
|
300
|
+
Object.keys(this.getMerge()).length)if(confirm(B(_$_7134[312])))this.destroyMerged();else return!1;if(a.length<f.length)for(g=0;g<f.length;g++)-1==a.indexOf(f[g][0])&&a.push(f[g][0]);f=[];for(g=0;g<a.length;g++)f[a[g]]=g;Ea.call(this,!1);ha.reset.call(this);K.call(this,_$_7134[76],{column:b,direction:c,order:a});k.update.call(this,a);k.arrow.call(this,b,c);ha.refresh.call(this);V.call(this.parent,{worksheet:this,action:_$_7134[76],column:b,newValue:a,oldValue:f,direction:c});F.call(this.parent,_$_7134[313],
|
|
301
|
+
this,b,c,a);return!0}};k.update=function(b){for(var c=[],a=0;a<b.length;a++)c[a]=this.options.data[b[a]];for(a=0;a<b.length;a++)this.options.data[a]=c[a];c=[];for(a=0;a<b.length;a++)c[a]=this.records[b[a]];this.records=c;c=[];for(a=0;a<b.length;a++)c[a]=this.rows[b[a]];this.rows=c;Y.references.call(this);this.searchInput&&this.searchInput.value?qa.update.call(this,null):ca.update.call(this)};k.arrow=function(b,c){for(var a=0;a<this.headers.length;a++)this.headers[a].classList.remove(_$_7134[314]),
|
|
302
|
+
this.headers[a].classList.remove(_$_7134[308]);c?this.headers[b].classList.add(_$_7134[314]):this.headers[b].classList.add(_$_7134[308])};return k}(),ta=function(){var k=function(b){b.whichPage=k.whichPage;b.quantityOfPages=k.quantityOfPages;b.page=k[_$_7134[11]];b.updatePagination=k.update};k.build=function(){this.pageNumber=0;var b=document.createElement(_$_7134[20]),c=document.createElement(_$_7134[20]);this.pagination=document.createElement(_$_7134[20]);this.pagination.classList.add(_$_7134[315]);
|
|
303
|
+
this.pagination.appendChild(b);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_7134[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_7134[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_7134[11]].call(this,this.pageNumber))};k.whichPage=function(b){if(0<this.options.pagination)return this.rows[b]?(this.results&&(b=this.results.indexOf(parseInt(b))),
|
|
304
|
+
Math.ceil((parseInt(b)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_7134[316]);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(_$_7134[316]);return!1};k[_$_7134[11]]=function(b,c){var a=this.pageNumber,d=parseInt(this.options.pagination);if(d){if(null==b||-1==b)b=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===F.call(this.parent,
|
|
305
|
+
_$_7134[318],this,b,a,d))return!1;this.pageNumber=b;H.resetY.call(this);aa.refresh.call(this);typeof c==_$_7134[84]&&c.call(this);F.call(this.parent,_$_7134[319],this,b,a,d)}else console.error(_$_7134[317])};k.update=function(){this.pagination.children[0].innerHTML=_$_7134[3];this.pagination.children[1].innerHTML=_$_7134[3];if(this.options.pagination){var b=this.results?this.results.length:this.rows.length;if(b){b=Math.ceil(b/this.options.pagination);if(6>this.pageNumber)var c=1,a=10>b?b:10;else 5>
|
|
306
|
+
b-this.pageNumber?(c=b-9,a=b,1>c&&(c=1)):(c=this.pageNumber-4,a=this.pageNumber+5);if(1<c){var d=document.createElement(_$_7134[20]);d.className=_$_7134[321];d.innerHTML=_$_7134[215];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=a;c++)d=document.createElement(_$_7134[20]),d.className=_$_7134[321],d.innerHTML=c,this.pagination.children[1].appendChild(d),this.pageNumber==c-1&&d.classList.add(_$_7134[322]);a<b&&(d=document.createElement(_$_7134[20]),d.className=_$_7134[321],d.innerHTML=
|
|
307
|
+
_$_7134[216],d.title=b,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=B(_$_7134[323],[this.pageNumber+1,b])}else this.pagination.children[0].innerHTML=B(_$_7134[320])}};return k}(),ka=function(){var k=function(b){b.setFreezeColumns=k[_$_7134[11]];b.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);for(var b=0;b<this.rows.length;b++)this.rows[b].element&&k.update.call(this,b)}};k.update=function(b){var c,a;if(a=this.options.freezeColumns){var d=
|
|
308
|
+
xa.call(this)?50:0;if(this.rows[b].element)for(var e=0;e<a;e++){if(c=this.records[b][e].element)c.classList.add(_$_7134[50]),c.style.left=d+1+_$_7134[44];!1!==this.options.columns[e].visible&&(d+=this.options.columns[e].width)}}};k.headers=function(){var b=xa.call(this)?50:0,c;if(c=this.options.freezeColumns)for(var a=0;a<c;a++){if(this.headers[a]){this.headers[a].classList.add(_$_7134[50]);this.headers[a].style.left=b+1+_$_7134[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_7134[50]),
|
|
309
|
+
this.footers.content[d][a].element.style.left=b+1+_$_7134[44];!1!==this.options.columns[a].visible&&(b+=this.options.columns[a].width)}}else k.reset.call(this)};k[_$_7134[11]]=function(b){k.reset.call(this);this.options.freezeColumns=b;k.width.call(this);H.limited.call(this)&&U.call(this)};k.reset=function(){H[_$_7134[46]].call(this,null,this.options.freezeColumns);for(var b,c=1;c<=this.options.freezeColumns;c++){if(b=this.thead.lastChild)b.children[c].classList.remove(_$_7134[50]),b.children[c].style.left=
|
|
310
|
+
_$_7134[3];for(var a=0;a<this.rows.length;a++)if(b=this.rows[a].element)b.children[c].classList.remove(_$_7134[50]),b.children[c].style.left=_$_7134[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[c].classList.remove(_$_7134[50]),this.tfoot.children[a].children[c].style.left=_$_7134[3]}this.options.freezeColumns=0};k.getWidth=function(){var b=xa.call(this)?50:0;if(0<this.options.freezeColumns)for(var c=0;c<=this.options.freezeColumns;c++)b=this.thead.lastChild.children[c]?
|
|
311
311
|
b+this.thead.lastChild.children[c].offsetWidth:b+this.options.columns[c].width;return b};return k}(),Y=function(){var k=function(a,d){if(this.options[a]){for(var e={},f=Object.keys(this.options[a]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[a][f[g]];this.options[a]=e}},b=function(){if(0<this.options.minSpareRows){for(var a=0,d=this.rows.length-1;0<=d;d--){for(var e=!1,f=0;f<this.options.columns.length;f++)L.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareRows-
|
|
312
|
-
a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)L.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},c=function(){};c.build=function(){var a=this;this.content=document.createElement(_$
|
|
313
|
-
!a.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?H.pageLeft.call(a,1,null,f):H.pageRight.call(a,1,null,f):0>f.deltaY?H.pageUp.call(a,1,null,f):H.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$
|
|
314
|
-
this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$
|
|
315
|
-
this.table.setAttribute(_$
|
|
316
|
-
_$
|
|
317
|
-
this.element.appendChild(e);1==this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.overflow=_$
|
|
318
|
-
qa.build.call(this);oa.build.call(this);ta.build.call(this);Fa.build.call(this);ba.build.call(this);aa.build.call(this);H.call(this);ca.onload.call(this);b.call(this)};c.references=function(a){var d=[],e=[],f=null,g=null,h=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])h=g.getAttribute(_$
|
|
319
|
-
m,g.element&&(g.element.setAttribute(_$
|
|
320
|
-
e[u]=r}};if(a){m=function(r,v){r&&r[v]&&delete r[v]};var n=Object.keys(a);for(f=0;f<n.length;f++)m(this,n[f]),m(this.options.meta,n[f]),m(this.options.cells,n[f]),m(this.options.style,n[f]),m(this.options.comments,n[f])}for(m=0;m<this.rows.length;m++)for(f=0;f<this.options.columns.length;f++)p.call(this,f,m);k.call(this,_$
|
|
321
|
-
ba.build.call(this);W.updateAll.call(this,e,a);return e};c.update=function(a){a&&b.call(this);if(typeof this.parent.config.updateTable==_$
|
|
322
|
-
history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Da.spreadsheet.call(a,c);a.config.license&&(t.license=a.config.license);b.spreadsheet=a;b.jspreadsheet=b.jexcel=a.worksheets;t.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$
|
|
323
|
-
d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){a.createWorksheet();return!1};d.onclick=function(f,g,h,l,m){0<=h&&a.openWorksheet(h)};d.onchangeposition=function(f,g,h){a.updateWorksheet(g,h)};jSuites.tabs(b,d);b.classList.add(_$
|
|
324
|
-
a.helper=document.createElement(_$
|
|
312
|
+
a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)L.call(this,f,d)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},c=function(){};c.build=function(){var a=this;this.content=document.createElement(_$_7134[20]);this.content.classList.add(_$_7134[324]);this.content.addEventListener(_$_7134[325],function(f){if(H.limited.call(a)&&
|
|
313
|
+
!a.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?H.pageLeft.call(a,1,null,f):H.pageRight.call(a,1,null,f):0>f.deltaY?H.pageUp.call(a,1,null,f):H.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$_7134[326],function(f){if(!a.edition)return f.preventDefault(),!1});this.table=document.createElement(_$_7134[327]);this.thead=document.createElement(_$_7134[328]);this.tbody=document.createElement(_$_7134[329]);this.tfoot=document.createElement(_$_7134[330]);
|
|
314
|
+
this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_7134[331]);var d=document.createElement(_$_7134[168]);d.setAttribute(_$_7134[151],_$_7134[332]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_7134[144]);d=document.createElement(_$_7134[146]);d.classList.add(_$_7134[333]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_7134[334]);this.table.setAttribute(_$_7134[335],_$_7134[98]);
|
|
315
|
+
this.table.setAttribute(_$_7134[336],_$_7134[98]);this.table.setAttribute(_$_7134[337],_$_7134[338]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$_7134[339]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_7134[340]);this.corner=document.createElement(_$_7134[20]);this.corner.className=_$_7134[341];this.corner.setAttribute(_$_7134[337],
|
|
316
|
+
_$_7134[342]);this.corner.setAttribute(_$_7134[343],_$_7134[344]);0==this.options.selectionCopy&&(this.corner.style.display=_$_7134[40]);this.scrollX=U.build.call(a,_$_7134[45]);this.scrollY=U.build.call(a,_$_7134[345]);d=document.createElement(_$_7134[20]);d.appendChild(this.content);d.appendChild(this.scrollY);d.classList.add(_$_7134[346]);var e=document.createElement(_$_7134[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_7134[347]);this.content.appendChild(this.table);this.content.appendChild(this.corner);
|
|
317
|
+
this.element.appendChild(e);1==this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.overflow=_$_7134[49],this.content.style.maxWidth=parseInt(this.options.tableWidth)+_$_7134[44],this.options.pagination||(this.content.style.maxHeight=parseInt(this.options.tableHeight)+_$_7134[44]));this.options.freezeColumns>this.options.columns.length&&console.error(_$_7134[348]);
|
|
318
|
+
qa.build.call(this);oa.build.call(this);ta.build.call(this);Fa.build.call(this);ba.build.call(this);aa.build.call(this);H.call(this);ca.onload.call(this);b.call(this)};c.references=function(a){var d=[],e=[],f=null,g=null,h=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])h=g.getAttribute(_$_7134[42]),h!=f&&(g.setAttribute(_$_7134[42],f),g.getAttribute(_$_7134[165])||(g.innerHTML=E.getColumnName(f)));for(var m=0;m<this.rows.length;m++)g=this.rows[m],l=g.y,l!=m&&(g.y=m,d[l]=
|
|
319
|
+
m,g.element&&(g.element.setAttribute(_$_7134[43],m),g.element.children[0].setAttribute(_$_7134[43],m),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:m+1,g.element.children[0].innerHTML=f));var p=function(r,v){g=this.records[v][r];h=g.x;l=g.y;h!=r&&(g.x=r,g.element&&g.element.setAttribute(_$_7134[42],r));l!=v&&(g.y=v,g.element&&g.element.setAttribute(_$_7134[43],v));if(h!=r||l!=v){var u=E.getColumnNameFromCoords(h,l);r=E.getColumnNameFromCoords(r,v);
|
|
320
|
+
e[u]=r}};if(a){m=function(r,v){r&&r[v]&&delete r[v]};var n=Object.keys(a);for(f=0;f<n.length;f++)m(this,n[f]),m(this.options.meta,n[f]),m(this.options.cells,n[f]),m(this.options.style,n[f]),m(this.options.comments,n[f])}for(m=0;m<this.rows.length;m++)for(f=0;f<this.options.columns.length;f++)p.call(this,f,m);k.call(this,_$_7134[349],d);k.call(this,_$_7134[281],e);k.call(this,_$_7134[282],e);k.call(this,_$_7134[99],e);k.call(this,_$_7134[283],e);k.call(this,_$_7134[266],e);this.options.mergeCells&&
|
|
321
|
+
ba.build.call(this);W.updateAll.call(this,e,a);return e};c.update=function(a){a&&b.call(this);if(typeof this.parent.config.updateTable==_$_7134[84])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)a=this.records[d][e],this.parent.config.updateTable.call(this,this,a.element,e,d,L.call(this,e,d),a.r?a.r:a.v);U.call(this);aa.refresh.call(this)};return c}(),na=function(){var k={spreadsheet:function(b,c){var a={name:null,config:{},el:b,element:b,plugins:[],worksheets:[],
|
|
322
|
+
history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Da.spreadsheet.call(a,c);a.config.license&&(t.license=a.config.license);b.spreadsheet=a;b.jspreadsheet=b.jexcel=a.worksheets;t.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$_7134[83]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=b.offsetWidth-50+_$_7134[44]);
|
|
323
|
+
d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){a.createWorksheet();return!1};d.onclick=function(f,g,h,l,m){0<=h&&a.openWorksheet(h)};d.onchangeposition=function(f,g,h){a.updateWorksheet(g,h)};jSuites.tabs(b,d);b.classList.add(_$_7134[350]);1==c.fullscreen&&b.classList.add(_$_7134[15]);var e=document.createElement(_$_7134[20]);a.toolbar=document.createElement(_$_7134[20]);a.toolbar.className=_$_7134[351];e.appendChild(a.toolbar);a.filter=ca.build.call(a);e.appendChild(a.filter);
|
|
324
|
+
a.helper=document.createElement(_$_7134[20]);a.helper.className=_$_7134[352];e.appendChild(a.helper);a.loading=document.createElement(_$_7134[20]);a.loading.classList.add(_$_7134[353]);e.appendChild(a.loading);e.appendChild(da.build(a));e.appendChild(Ra(a));a.textarea=document.createElement(_$_7134[354]);a.textarea.className=_$_7134[355];a.textarea.tabIndex=_$_7134[356];e.appendChild(a.textarea);d.position===_$_7134[357]?b.insertBefore(e,b.children[0]):b.insertBefore(e,b.children[1]);b.appendChild(Ja.call(a,
|
|
325
325
|
t.license));a.createWorksheet=ia.createWorksheet;a.deleteWorksheet=ia.deleteWorksheet;a.renameWorksheet=ia.renameWorksheet;a.updateWorksheet=ia.updateWorksheet;a.openWorksheet=ia.openWorksheet;a.moveWorksheet=ia.moveWorksheet;a.getWorksheet=ia.getWorksheet;a.getWorksheetActive=ia.getWorksheetActive;a.getWorksheetInstance=ia.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=
|
|
326
|
-
Ka;a.progress=La;a.undo=V.undo;a.redo=V.redo;a.setToolbar=fa[_$
|
|
327
|
-
c){var a={};b.worksheets.push(a);a.parent=b;Da(a);Ta(a);ya(a);ha(a);da(a);Fa(a);Va(a);ba(a);Qa(a);Wa(a);ea(a);W(a);M(a);Aa(a);Xa(a);Za(a);Ya(a);Ca(a);aa(a);oa(a);qa(a);ca(a);fa(a);sa(a);ab(a);bb(a);ta(a);ia(a);ka(a);Ua(a);$a(a);Ia(a);Ha(a);Da.worksheet.call(a,c);!t.license&&a.options.license&&(t.license=a.options.license);b.element.jexcel=b.element.jexcel?b.worksheets:a;pa.execute.call(a.parent,_$
|
|
328
|
-
ia.nextName());var d=this.options.worksheetName;I(d)&&console.log(_$
|
|
329
|
-
return a},row:function(b,c){this.rows[b]||(this.rows[b]={element:null,y:b});c&&(this.rows[b].id=c,sa[_$
|
|
330
|
-
(a=_$
|
|
331
|
-
b.setWidth=k[_$
|
|
332
|
-
e)}}else a||(a=this.options.columns[b].width),this.options.columns[b].width=c,this.colgroup[b]&&this.colgroup[b].setAttribute(_$
|
|
333
|
-
this.rows[c].element.style.height;else{c=[];for(var a=0;a<this.rows.length;a++){var d=this.rows[a].element.style.height;d&&(c[a]=d)}}return c};var b=function(c,a){a=parseInt(a);var d=this.rows[c].height?this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=a+_$
|
|
334
|
-
this))return!1;var e,f=typeof d==_$
|
|
335
|
-
g=a[e[g]];if(!g.element){g.element=document.createElement(_$
|
|
336
|
-
f[_$
|
|
337
|
-
this.parent.element.getBoundingClientRect(),l=this.headers[b].getBoundingClientRect();g=l.left-h.left;var m=l.top-h.top+l.height;l=this.parent.filter;h=h.left+h.width;l.style.display=_$
|
|
338
|
-
l=[];for(h=0;h<this.rows.length;h++)if(g[h]){m=_$
|
|
339
|
-
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[b].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$
|
|
340
|
-
f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],m=0;m<this.options.data.length;m++){for(var p=!0,n=0;n<h.length;n++)if(h[n].filters&&g!==n){var r=_$
|
|
341
|
-
f[_$
|
|
342
|
-
!1;if(g){e=[];g=new RegExp(g,_$
|
|
343
|
-
g?!1:!0}for(m=d=0;m<e.length;m++)200>m&&(g=d++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$
|
|
344
|
-
var l=document.createElement(_$
|
|
345
|
-
n=1;n<this.parentNode.children.length;n++)this.parentNode.children[n].children[0].checked=p;if(1==p)for(n=0;n<e.length;n++)a[e[n]].selected=!0;else for(p=Object.keys(a),n=0;n<p.length;n++)a[p[n]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(p){for(p=0;d<e.length-1&&10>p;){var n=d++;g.appendChild(k(n));p++}}});return m};f.updateDOM=function(g,h,l){var m=this.headers,p=function(n){1==h?m[n].classList.add(_$
|
|
346
|
-
1==l&&m[n].classList.remove(_$
|
|
347
|
-
this.rows.length;b++)!0===this.rows[b].results&&delete this.rows[b].results;this.results=null};k.refresh=function(){for(var b=[],c=0;c<this.rows.length;c++)!0===this.rows[c].results&&b.push(c);return b};return k}(),qa=function(){var k=function(a){var d=document.createElement(_$
|
|
348
|
-
function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$
|
|
349
|
-
this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)a.push(d++)}else a.push(d)},c=function(a){a.search=c.update;a.resetSearch=c.reset;a.updateSearch=c.refresh;a.showSearch=c.show;a.hideSearch=c.hide};c.execute=function(a,d){null===a?a=this.searchInput.value||_$
|
|
350
|
-
0;h<this.options.columns.length;h++){var l=_$
|
|
351
|
-
_$
|
|
352
|
-
!1;this.searchContainer.style.display=_$
|
|
353
|
-
(this.searchContainer.style.display=_$
|
|
354
|
-
_$
|
|
355
|
-
d.target.innerText);n&&b.parent.renameWorksheet(f,n)}}),1==l.allowDeleteWorksheet&&h.push({title:B(_$
|
|
356
|
-
icon:_$
|
|
357
|
-
h.push({title:B(_$
|
|
358
|
-
onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(h.push({type:_$
|
|
359
|
-
h.push({title:B(_$
|
|
360
|
-
g);b.setComments(n,_$
|
|
361
|
-
b)}};k[_$
|
|
362
|
-
this.toolbar.style.display=_$
|
|
363
|
-
b.items[c].v){b.items[c].options=[];for(var a=0;a<b.items[c].v.length;a++)b.items[c].options.push(b.items[c].v[a]);b.items[c].k&&(b.items[c].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else b.items[c].type==_$
|
|
364
|
-
h.color.select(h.color.toHex(l)):h.color.select(_$
|
|
365
|
-
onclick:function(){t.current&&t.current.undo()}},{content:_$
|
|
366
|
-
content:_$
|
|
367
|
-
{type:_$
|
|
368
|
-
3==e&&b.classList.add(_$
|
|
369
|
-
_$
|
|
370
|
-
d==_$
|
|
371
|
-
_$
|
|
372
|
-
d.innerHTML=_$
|
|
373
|
-
_$
|
|
326
|
+
Ka;a.progress=La;a.undo=V.undo;a.redo=V.redo;a.setToolbar=fa[_$_7134[11]];a.getToolbar=fa[_$_7134[51]];a.showToolbar=fa.show;a.hideToolbar=fa.hide;a.tools=e;1!==a.edition&&(b=Object.keys(a.config.definedNames))&&b.length&&(a.config.definedNames={},console.log(_$_7134[358]));c.plugins&&pa.call(a,c.plugins);a.setPlugins=function(f){pa.call(a,f)};b=Object.keys(t.extensions);if(b.length)for(d=0;d<b.length;d++)if(typeof t.extensions[b[d]].oninit==_$_7134[84])t.extensions[b[d]].oninit(a,c);return a},worksheet:function(b,
|
|
327
|
+
c){var a={};b.worksheets.push(a);a.parent=b;Da(a);Ta(a);ya(a);ha(a);da(a);Fa(a);Va(a);ba(a);Qa(a);Wa(a);ea(a);W(a);M(a);Aa(a);Xa(a);Za(a);Ya(a);Ca(a);aa(a);oa(a);qa(a);ca(a);fa(a);sa(a);ab(a);bb(a);ta(a);ia(a);ka(a);Ua(a);$a(a);Ia(a);Ha(a);Da.worksheet.call(a,c);!t.license&&a.options.license&&(t.license=a.options.license);b.element.jexcel=b.element.jexcel?b.worksheets:a;pa.execute.call(a.parent,_$_7134[359],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_7134[360]+
|
|
328
|
+
ia.nextName());var d=this.options.worksheetName;I(d)&&console.log(_$_7134[361]+d+_$_7134[362]);I(d,a);this.element=b.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===_$_7134[49]&&(f.style.display=_$_7134[40])});this.element.classList.add(_$_7134[363]);this.element.jexcel=this;Y.build.call(this);pa.execute.call(this.parent,_$_7134[364],[this]);this.options.data&&500<this.options.data.length&&!H.limited.call(this)&&!this.options.pagination&&console.error(_$_7134[365])};
|
|
329
|
+
return a},row:function(b,c){this.rows[b]||(this.rows[b]={element:null,y:b});c&&(this.rows[b].id=c,sa[_$_7134[11]].call(this,c));this.options.rows&&this.options.rows[b]&&this.options.rows[b].height&&(this.rows[b].height=this.options.rows[b].height);this.records[b]||(this.records[b]=[]);this.options.data[b]||(this.options.data[b]=this.dataType?{}:[]);for(c=0;c<this.options.columns.length;c++)k.cell.call(this,c,b)},cell:function(b,c,a){typeof a==_$_7134[13]&&(a=L.call(this,b,c),null===a||void 0===a)&&
|
|
330
|
+
(a=_$_7134[3],L.call(this,b,c,a));this.records[c][b]||(this.records[c][b]={element:null,x:b,y:c,v:a})},bind:function(b){for(var c=Object.keys(Ba),a=0;a<c.length;a++)(c[a]==_$_7134[366]?window:b).addEventListener(c[a],Ba[c[a]],c[a]==_$_7134[367]||c[a]==_$_7134[368]||c[a]==_$_7134[369]?{passive:!1}:{})},unbind:function(b){for(var c=Object.keys(Ba),a=0;a<c.length;a++)(c[a]==_$_7134[366]?window:b).removeEventListener(c[a],Ba[c[a]])}};return k}(),ab=function(){var k=function(b){b.getWidth=k[_$_7134[51]];
|
|
331
|
+
b.setWidth=k[_$_7134[11]]};k[_$_7134[51]]=function(b){var c=this.options.columns;if(typeof b===_$_7134[13]){b=[];for(var a=0;a<c.length;a++)b.push(c[a].width)}else b=c[b].width;return b};k[_$_7134[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;if(c){if(Array.isArray(b)){a||(a=[]);for(var d=0;d<b.length;d++){a[d]||(a[d]=this.options.columns[b[d]].width);var e=Array.isArray(c)&&c[d]?c[d]:c;this.options.columns[b[d]].width=e;this.colgroup[b[d]]&&this.colgroup[b[d]].setAttribute(_$_7134[151],
|
|
332
|
+
e)}}else a||(a=this.options.columns[b].width),this.options.columns[b].width=c,this.colgroup[b]&&this.colgroup[b].setAttribute(_$_7134[151],c);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_7134[72],column:b,oldValue:a,newValue:c});K.call(this,_$_7134[72],{column:b,width:c,oldWidth:a});F.call(this.parent,_$_7134[370],this,b,c,a)}H.refresh.call(this)};return k}(),bb=function(){var k=function(c){c.getHeight=k[_$_7134[51]];c.setHeight=k[_$_7134[11]]};k[_$_7134[51]]=function(c){if(c)c=
|
|
333
|
+
this.rows[c].element.style.height;else{c=[];for(var a=0;a<this.rows.length;a++){var d=this.rows[a].element.style.height;d&&(c[a]=d)}}return c};var b=function(c,a){a=parseInt(a);var d=this.rows[c].height?this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=a+_$_7134[44];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=a+_$_7134[44];this.rows[c].height=a;return d};k[_$_7134[11]]=function(c,a,d){if(!R.call(this.parent,
|
|
334
|
+
this))return!1;var e,f=typeof d==_$_7134[13]?!0:!1;if(a){if(Array.isArray(c))for(!0===f&&(d=[]),e=0;e<c.length;e++){var g=Array.isArray(a)&&a[e]?a[e]:a;b.call(this,c[e],g);1==f&&d.push(f)}else e=b.call(this,c,a),1==f&&(d=e);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_7134[73],row:c,oldValue:d,newValue:a});K.call(this,_$_7134[73],{row:c,height:a,oldHeight:d});F.call(this.parent,_$_7134[371],this,c,a,d)}H.refresh.call(this)};return k}(),ca=function(){var k=function(g){var h=e[g];
|
|
335
|
+
g=a[e[g]];if(!g.element){g.element=document.createElement(_$_7134[372]);g.element.innerHTML=g.value;var l=document.createElement(_$_7134[221]);l.type=_$_7134[253];l.value=h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},b=null,c=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$_7134[11]];g.getFilter=f[_$_7134[51]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return c};
|
|
336
|
+
f[_$_7134[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_7134[373]),g.filters=h):(l&&l.classList.remove(_$_7134[373]),g.filters=null);f.update.call(this)};f[_$_7134[51]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var h=0;h<this.options.columns.length;h++)g[h]=this.options.columns[h].filters||null;return g};f.open=function(g){b=parseInt(g);if(this.headers[b].classList.contains(_$_7134[167])){c=!0;var h=
|
|
337
|
+
this.parent.element.getBoundingClientRect(),l=this.headers[b].getBoundingClientRect();g=l.left-h.left;var m=l.top-h.top+l.height;l=this.parent.filter;h=h.left+h.width;l.style.display=_$_7134[16];g+l.offsetWidth>h&&(g=h-(l.offsetWidth+18));l.style.top=m+_$_7134[44];l.style.left=g+_$_7134[44];l.children[0].focus();g=l.children[1].selectAll;l.children[1].textContent=_$_7134[3];l.children[1].appendChild(g);g.children[0].checked=this.options.columns[b].filters?!1:!0;g=qa.execute.call(this,null,b);g=E.invert(g);
|
|
338
|
+
l=[];for(h=0;h<this.rows.length;h++)if(g[h]){m=_$_7134[3]+L.call(this,b,h);var p=_$_7134[3]+ea.processed.call(this,b,h,!0);m.substr(0,1)==_$_7134[12]&&(m=p);l.push([m,p])}l.sort(function(n,r){return n[0]>r[0]?1:n[0]<r[0]?-1:0});a=[];for(h=0;h<l.length;h++)a[l[h][0]]={value:l[h][1],element:null};(g=F.call(this.parent,_$_7134[375],this,b,a))&&(a=g);void 0!==a[_$_7134[3]]&&(delete a[_$_7134[3]],a[_$_7134[3]]={value:_$_7134[212]+B(_$_7134[376])+_$_7134[233],element:null});f.search.call(this,_$_7134[3])}else console.log(_$_7134[374])};
|
|
339
|
+
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[b].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$_7134[11]].call(this,b,g)}this.parent.filter.style.display=_$_7134[3];this.parent.filter.children[0].value=_$_7134[3];b=null;c=!1;a=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);ua.reset.call(this);
|
|
340
|
+
f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],m=0;m<this.options.data.length;m++){for(var p=!0,n=0;n<h.length;n++)if(h[n].filters&&g!==n){var r=_$_7134[3]+L.call(this,n,m),v=_$_7134[3]+this.getLabelFromCoords(n,m,!0);-1==h[n].filters.indexOf(r)&&-1==h[n].filters.indexOf(v)&&(p=!1)}p&&l.push(m)}return l};f.update=function(){ua.reset.call(this);this.resetSelection();this.resetBorders();var g=qa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_7134[84]){var h=
|
|
341
|
+
f[_$_7134[51]].call(this),l=F.call(this.parent,_$_7134[377],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&ua[_$_7134[11]].call(this,g);H.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_7134[378],this,h,g)};f.show=function(g){f.updateDOM.call(this,g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=
|
|
342
|
+
!1;if(g){e=[];g=new RegExp(g,_$_7134[379]);for(var l=Object.keys(a),m=0;m<l.length;m++)(_$_7134[3]+l[m]).match(g)||(_$_7134[3]+a[l[m]]).match(g)?(e.push(l[m]),a[l[m]].selected=!0):a[l[m]].selected=!1;h.firstChild.checked=!0;this.options.columns[b].filters&&h.appendChild(h.currentSelection)}else{e=Object.keys(a);if(g=this.options.columns[b].filters)for(m=0;m<e.length;m++)a[e[m]].selected=!1,0<=g.indexOf(e[m])&&(a[e[m]].selected=!0);else for(m=0;m<e.length;m++)a[e[m]].selected=!0;h.firstChild.checked=
|
|
343
|
+
g?!1:!0}for(m=d=0;m<e.length;m++)200>m&&(g=d++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_7134[20]);g.className=_$_7134[380];g.onclick=function(p){p.target.tagName==_$_7134[381]&&p.target.o&&(p.target.o.selected=p.target.checked);p=!0;for(var n=1;n<this.children.length;n++)this.children[n].children[0].checked||(p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$_7134[221]);h.type=_$_7134[55];h.placeholder=B(_$_7134[382]);h.className=_$_7134[383];
|
|
344
|
+
var l=document.createElement(_$_7134[221]);l.type=_$_7134[384];l.value=_$_7134[385];l.className=_$_7134[386];var m=document.createElement(_$_7134[20]);m.className=_$_7134[387];m.appendChild(h);m.appendChild(g);m.appendChild(l);g.currentSelection=document.createElement(_$_7134[372]);g.currentSelection.innerHTML=_$_7134[388]+B(_$_7134[389]);g.selectAll=document.createElement(_$_7134[372]);g.selectAll.innerHTML=_$_7134[390]+B(_$_7134[391])+_$_7134[233];g.selectAll.onclick=function(){for(var p=this.children[0].checked,
|
|
345
|
+
n=1;n<this.parentNode.children.length;n++)this.parentNode.children[n].children[0].checked=p;if(1==p)for(n=0;n<e.length;n++)a[e[n]].selected=!0;else for(p=Object.keys(a),n=0;n<p.length;n++)a[p[n]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(p){for(p=0;d<e.length-1&&10>p;){var n=d++;g.appendChild(k(n));p++}}});return m};f.updateDOM=function(g,h,l){var m=this.headers,p=function(n){1==h?m[n].classList.add(_$_7134[167]):(this.options.columns[n].filters=null,m[n].classList.remove(_$_7134[373]),
|
|
346
|
+
1==l&&m[n].classList.remove(_$_7134[167]))};if(g)p.call(this,g);else for(g=0;g<m.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(_$_7134[373]),h=!0);1==h&&f.update.call(this)};return f}(),ua=function(){var k={};k[_$_7134[11]]=function(b){for(var c=0;c<b.length;c++)this.rows[b[c]].results=!0;this.results=b};k.reset=function(){for(var b=0;b<
|
|
347
|
+
this.rows.length;b++)!0===this.rows[b].results&&delete this.rows[b].results;this.results=null};k.refresh=function(){for(var b=[],c=0;c<this.rows.length;c++)!0===this.rows[c].results&&b.push(c);return b};return k}(),qa=function(){var k=function(a){var d=document.createElement(_$_7134[20]);if(0<a.options.pagination&&a.options.paginationOptions&&0<a.options.paginationOptions.length){a.paginationDropdown=document.createElement(_$_7134[392]);a.paginationDropdown.classList.add(_$_7134[393]);a.paginationDropdown.onchange=
|
|
348
|
+
function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$_7134[394]);f.value=a.options.paginationOptions[e];f.innerHTML=a.options.paginationOptions[e];a.paginationDropdown.appendChild(f)}a.paginationDropdown.value=a.options.pagination;d.appendChild(document.createTextNode(B(_$_7134[395])));d.appendChild(a.paginationDropdown);d.appendChild(document.createTextNode(B(_$_7134[396])))}return d},b=function(a,d){var e=
|
|
349
|
+
this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)a.push(d++)}else a.push(d)},c=function(a){a.search=c.update;a.resetSearch=c.reset;a.updateSearch=c.refresh;a.showSearch=c.show;a.hideSearch=c.hide};c.execute=function(a,d){null===a?a=this.searchInput.value||_$_7134[3]:a!==this.searchInput.value&&(this.searchInput.value=a);this.pageNumber=0;var e=[],f=null;d=ca.execute.call(this,d);if(a)try{a=new RegExp(a,_$_7134[379]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=d.indexOf(g))for(var h=
|
|
350
|
+
0;h<this.options.columns.length;h++){var l=_$_7134[3]+L.call(this,h,g),m=_$_7134[3]+this.getLabelFromCoords(h,g);if(l.match(a)||m.match(a))f=!0}1==f&&b.call(this,e,g)}}catch(p){}else e=d;if(e.length){for(g=0;g<this.rows.length;g++)!0===this.rows[g].results&&e.push(g);e.sort(function(p,n){return p-n})}return e};c.update=function(a){ua.reset.call(this);this.resetSelection();this.resetBorders();var d=c.execute.call(this,a);if(typeof this.parent.config.onbeforesearch==_$_7134[84]){var e=F.call(this.parent,
|
|
351
|
+
_$_7134[398],this,a,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&ua[_$_7134[11]].call(this,d);H.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_7134[399],this,a,d)};c.refresh=function(){H.resetY.call(this);aa.refresh.call(this)};c.reset=function(){this.searchInput.value=_$_7134[3];ua.reset.call(this);H.resetY.call(this);aa.refresh.call(this)};c.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_7134[3]};c.hide=function(){this.options.search=
|
|
352
|
+
!1;this.searchContainer.style.display=_$_7134[40]};c.build=function(){this.searchContainer=document.createElement(_$_7134[20]);this.searchContainer.classList.add(_$_7134[400]);this.searchContainer.appendChild(k(this));var a=this.searchContainer,d=a.appendChild,e=document.createElement(_$_7134[20]);e.innerHTML=B(_$_7134[382])+_$_7134[114];this.searchInput=document.createElement(_$_7134[221]);this.searchInput.classList.add(_$_7134[397]);e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&
|
|
353
|
+
(this.searchContainer.style.display=_$_7134[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return c}(),Ra=function(){var k=function(b){b.contextmenu=document.createElement(_$_7134[20]);b.contextmenu.className=_$_7134[401];jSuites.contextmenu(b.contextmenu,{onclick:function(c,a,d){c.close()}});return b.contextmenu};k.open=function(b,c){var a=b.target.getAttribute(_$_7134[42]),d=b.target.getAttribute(_$_7134[43]),e=k[_$_7134[51]](this,a,d,b,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==
|
|
354
|
+
_$_7134[84]){var f=this.parent.config.contextMenu(this,a,d,b,e,c[0],c[1],c[2]);if(f)e=f;else if(!1===f)return!1}b.preventDefault();f=pa.execute.call(this.parent,_$_7134[85],[this,a,d,b,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(b,e)};k[_$_7134[51]]=function(b,c,a,d,e,f,g){var h=[],l=b.parent.config,m=-1!=navigator.userAgent.indexOf(_$_7134[402])?_$_7134[403]:_$_7134[404];e==_$_7134[405]&&(1==l.allowRenameWorksheet&&h.push({title:B(_$_7134[406]),onclick:function(){var n=prompt(B(_$_7134[406]),
|
|
355
|
+
d.target.innerText);n&&b.parent.renameWorksheet(f,n)}}),1==l.allowDeleteWorksheet&&h.push({title:B(_$_7134[407]),onclick:function(){confirm(B(_$_7134[408]),d.target.innerText)&&b.parent.deleteWorksheet(f)}}),h.push({type:_$_7134[409]}));e==_$_7134[410]&&(h.push({title:B(_$_7134[411]),onclick:function(){var n=prompt(B(_$_7134[411]),d.target.innerText);b.setNestedCell(f,g,{title:n})}}),h.push({type:_$_7134[409]}));if(e==_$_7134[412]||e==_$_7134[413]||e==_$_7134[414]||e==_$_7134[410])h.push({title:B(_$_7134[415]),
|
|
356
|
+
icon:_$_7134[416],shortcut:m+_$_7134[417],onclick:function(){b.cut()}}),h.push({title:B(_$_7134[418]),icon:_$_7134[419],shortcut:m+_$_7134[420],onclick:function(){b.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:B(_$_7134[421]),icon:_$_7134[422],shortcut:m+_$_7134[423],onclick:function(){b.selectedCell&&navigator.clipboard.readText().then(function(n){n&&b.paste(b.selectedCell[0],b.selectedCell[1],n)})}}),h.push({type:_$_7134[409]});e==_$_7134[412]&&(1==b.options.allowInsertColumn&&
|
|
357
|
+
h.push({title:B(_$_7134[424]),onclick:function(){b.insertColumn(1,parseInt(f),1)}}),1==b.options.allowInsertColumn&&h.push({title:B(_$_7134[425]),onclick:function(){b.insertColumn(1,parseInt(f),0)}}),1==b.options.allowDeleteColumn&&h.push({title:B(_$_7134[426]),onclick:function(){b.deleteColumn(b.getSelectedColumns().length?void 0:parseInt(c))}}),1==b.options.allowRenameColumn&&h.push({title:B(_$_7134[427]),onclick:function(){b.setHeader(f)}}),b.options.data.length||(h.push({type:_$_7134[409]}),h.push({title:B(_$_7134[428]),
|
|
358
|
+
onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(h.push({type:_$_7134[409]}),h.push({title:B(_$_7134[429]),onclick:function(){b.orderBy(f,0)}}),h.push({title:B(_$_7134[430]),onclick:function(){b.orderBy(f,1)}}),h.push({type:_$_7134[409]})));if(e==_$_7134[414]||e==_$_7134[413])1==b.options.allowInsertRow&&(h.push({title:B(_$_7134[431]),onclick:function(){b.insertRow(1,parseInt(a),1)}}),h.push({title:B(_$_7134[432]),onclick:function(){b.insertRow(1,parseInt(a))}})),1==b.options.allowDeleteRow&&
|
|
359
|
+
h.push({title:B(_$_7134[433]),onclick:function(){b.deleteRow(b.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_7134[409]});if(e==_$_7134[414]&&1==b.options.allowComments){var p=b.records[g][f].element.getAttribute(_$_7134[268])||_$_7134[3];h.push({title:p?B(_$_7134[434]):B(_$_7134[435]),icon:_$_7134[436],onclick:function(){var n=E.getColumnNameFromCoords(f,g),r=prompt(B(_$_7134[437]),p);r&&b.setComments(n,r)}});p&&h.push({title:B(_$_7134[438]),onclick:function(){var n=E.getColumnNameFromCoords(f,
|
|
360
|
+
g);b.setComments(n,_$_7134[3])}});h.push({type:_$_7134[409]})}l.allowExport&&h.push({title:B(_$_7134[439]),icon:_$_7134[440],shortcut:m+_$_7134[441],onclick:function(){b.download()}});l.about&&h.push({title:B(_$_7134[442]),icon:_$_7134[443],onclick:function(){!0===l.about?alert(J().print()):alert(l.about)}});return h};return k}(),fa=function(){var k=function(b){b.showToolbar=function(){k.show.call(b.parent)};b.hideToolbar=function(){k.hide.call(b.parent)};b.refreshToolbar=function(){k.update.call(b.parent,
|
|
361
|
+
b)}};k[_$_7134[11]]=function(b){this.toolbar.innerHTML=_$_7134[3];this.config.toolbar=k[_$_7134[51]].call(this,b);k.show.call(this)};k[_$_7134[51]]=function(b){b||(b=this.config.toolbar);b?Array.isArray(b)?b={items:b}:typeof b===_$_7134[84]&&(b=b({items:k.getDefault()})):b={};typeof b!==_$_7134[83]&&(b={});b.items||(b.items=k.getDefault());typeof b.responsive==_$_7134[13]&&(b.responsive=!0,b.bottom=!1,b.maxWidth=this.element.offsetWidth);return b};k.show=function(){this.toolbar.innerHTML||k.build.call(this);
|
|
362
|
+
this.toolbar.style.display=_$_7134[3];this.element.classList.add(_$_7134[444])};k.hide=function(){this.toolbar.style.display=_$_7134[40];this.element.classList.remove(_$_7134[444])};k.update=function(b,c){if(c=this.toolbarInstance)if(c.update(b),c.options.responsive){var a=parseInt(b.content.style.maxWidth);if(!a||this.config.fullscreen)a=b.element.offsetWidth;c.options.maxWidth=a;c.refresh()}};k.build=function(){for(var b=k[_$_7134[51]].call(this),c=0;c<b.items.length;c++)if(b.items[c].type==_$_7134[392]){if(!b.items[c].options&&
|
|
363
|
+
b.items[c].v){b.items[c].options=[];for(var a=0;a<b.items[c].v.length;a++)b.items[c].options.push(b.items[c].v[a]);b.items[c].k&&(b.items[c].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else b.items[c].type==_$_7134[258]?(b.items[c].type=_$_7134[445],b.items[c].onclick=function(d,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(h,l){(g=t.current.getSelected())&&t.current.setStyle(g,f.k,l)},onopen:function(h){var l;t.current.cursor?(l=t.current.cursor.style[f.k])?
|
|
364
|
+
h.color.select(h.color.toHex(l)):h.color.select(_$_7134[3]):h.color.select(_$_7134[3])}});f.color.open()}}):!b.items[c].onclick&&b.items[c].k&&(b.items[c].onclick=function(){t.current.setStyle(t.current.getSelected(),this.k,this.v)});(c=pa.execute.call(this,_$_7134[86],[b]))&&(b=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,b);this.toolbarInstance.application=this;b=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[b])};k.getDefault=function(){return[{content:_$_7134[446],
|
|
365
|
+
onclick:function(){t.current&&t.current.undo()}},{content:_$_7134[447],onclick:function(){t.current&&t.current.redo()}},{content:_$_7134[440],onclick:function(){t.current&&t.current.download()}},{type:_$_7134[448]},{type:_$_7134[392],width:_$_7134[449],options:[_$_7134[450],_$_7134[451],_$_7134[452]],render:function(b){return _$_7134[453]+b+_$_7134[227]+b+_$_7134[454]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_7134[455],d)}},{type:_$_7134[392],width:_$_7134[456],
|
|
366
|
+
content:_$_7134[457],options:[_$_7134[458],_$_7134[459],_$_7134[460],_$_7134[461],_$_7134[462]],render:function(b){return _$_7134[463]+b+_$_7134[227]+b+_$_7134[454]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_7134[464],d)}},{type:_$_7134[392],options:[_$_7134[465],_$_7134[466],_$_7134[467],_$_7134[468]],render:function(b){return _$_7134[469]+b+_$_7134[470]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_7134[471],d.split(_$_7134[472])[2])}},
|
|
367
|
+
{type:_$_7134[445],content:_$_7134[473],k:_$_7134[474],v:_$_7134[475]},{type:_$_7134[258],content:_$_7134[476],k:_$_7134[258]},{type:_$_7134[258],content:_$_7134[477],k:_$_7134[478]},{type:_$_7134[392],content:_$_7134[479],width:_$_7134[480],options:[_$_7134[481],_$_7134[482],_$_7134[483],_$_7134[484]],onchange:function(b,c,a,d,e){b=t.current.table;b.classList.remove(_$_7134[485]);b.classList.remove(_$_7134[486]);b.classList.remove(_$_7134[487]);1==e?b.classList.add(_$_7134[485]):2==e?b.classList.add(_$_7134[486]):
|
|
368
|
+
3==e&&b.classList.add(_$_7134[487]);t.current.refreshBorders()}},{content:_$_7134[15],onclick:function(b,c,a){a.children[0].innerText==_$_7134[15]?(t.current.fullscreen(!0),a.children[0].innerText=_$_7134[488]):(t.current.fullscreen(!1),a.children[0].innerText=_$_7134[15])},tooltip:_$_7134[489],updateState:function(b,c,a,d){a.children[0].innerText=1==d.parent.config.fullscreen?_$_7134[488]:_$_7134[15]}},{type:_$_7134[392],data:[_$_7134[490],_$_7134[491],_$_7134[492],_$_7134[493],_$_7134[494],_$_7134[495],
|
|
369
|
+
_$_7134[496],_$_7134[497],_$_7134[498],_$_7134[499]],columns:5,render:function(b){return _$_7134[469]+b+_$_7134[470]},right:!0,onchange:function(b,c,a,d,e){if(b=t.current.getHighlighted()){a=c.thickness||1;c=c.color||_$_7134[500];e={};for(var f=b[0],g=b[1],h=b[2],l=b[3],m=b[1];m<=b[3];m++)for(var p=b[0];p<=b[2];p++){var n=E.getColumnNameFromCoords(p,m);e[n]||(e[n]=_$_7134[3]);e[n]=d!=_$_7134[495]&&d!=_$_7134[491]||p!=f?(d==_$_7134[492]||d==_$_7134[494])&&p>f?e[n]+(_$_7134[501]+a+_$_7134[502]+c+_$_7134[298]):
|
|
370
|
+
d==_$_7134[490]?e[n]+(_$_7134[501]+a+_$_7134[502]+c+_$_7134[298]):e[n]+_$_7134[503]:e[n]+(_$_7134[501]+a+_$_7134[502]+c+_$_7134[298]);e[n]=d!=_$_7134[490]&&d!=_$_7134[497]&&d!=_$_7134[491]||p!=h?e[n]+_$_7134[505]:e[n]+(_$_7134[504]+a+_$_7134[502]+c+_$_7134[298]);e[n]=d!=_$_7134[496]&&d!=_$_7134[491]||m!=g?(d==_$_7134[492]||d==_$_7134[493])&&m>g?e[n]+(_$_7134[506]+a+_$_7134[502]+c+_$_7134[298]):d==_$_7134[490]?e[n]+(_$_7134[506]+a+_$_7134[502]+c+_$_7134[298]):e[n]+_$_7134[507]:e[n]+(_$_7134[506]+a+
|
|
371
|
+
_$_7134[502]+c+_$_7134[298]);e[n]=d!=_$_7134[490]&&d!=_$_7134[498]&&d!=_$_7134[491]||m!=l?e[n]+_$_7134[509]:e[n]+(_$_7134[508]+a+_$_7134[502]+c+_$_7134[298])}Object.keys(e)&&t.current.setStyle(e,null,null,!0)}},onload:function(b,c){var a=document.createElement(_$_7134[20]),d=document.createElement(_$_7134[20]);a.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=g;c.color=g}});d=document.createElement(_$_7134[445]);d.classList.add(_$_7134[510]);
|
|
372
|
+
d.innerHTML=_$_7134[511];d.onclick=function(){e.open()};a.appendChild(d);b.children[1].appendChild(a);d=document.createElement(_$_7134[20]);jSuites.picker(d,{type:_$_7134[392],data:[1,2,3,4,5],render:function(f){return _$_7134[512]+f+_$_7134[513]},onchange:function(f,g,h,l){c.thickness=l},width:_$_7134[514]});b.children[1].appendChild(d);d=document.createElement(_$_7134[20]);d.style.flex=_$_7134[515];b.children[1].appendChild(d)}},{content:_$_7134[516],onclick:function(b,c,a){a.children[0].innerText==
|
|
373
|
+
_$_7134[516]?(qa.show.call(t.current),a.children[0].innerText=_$_7134[517]):(qa.hide.call(t.current),a.children[0].innerText=_$_7134[516])},tooltip:_$_7134[518],updateState:function(b,c,a,d){a.children[0].innerText=1==d.options.search?_$_7134[517]:_$_7134[516]}}]};return k}(),ia=function(){var k=function(b){b.createWorksheet=function(c){return b.parent.createWorksheet(c)};b.deleteWorksheet=function(c){return b.parent.deleteWorksheet(c)};b.renameWorksheet=function(c,a){return b.parent.renameWorksheet(c,
|
|
374
374
|
a)};b.moveWorksheet=function(c,a){return b.parent.moveWorksheet(c,a)};b.openWorksheet=function(){return b.parent.openWorksheet(b.parent.getWorksheet(b))};b.getWorksheet=function(c){return b.parent.getWorksheet(c)};b.getWorksheetActive=function(){return b.parent.getWorksheetActive()};b.getWorksheetName=function(){return b.options.worksheetName.toUpperCase()}};k.nextName=function(){var b=1,c,a=t.spreadsheet;if(a.length)for(var d=0;d<a.length;d++){var e=a[d].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&
|
|
375
|
-
(c=e[f].options.worksheetName.match(/(\d+)/))&&(c=parseInt(c[0])+1,c>b&&(b=c))}return b};k.createWorksheet=function(b){if(!R.call(this))return!1;b||(b={});var c=this.worksheets.length,a=F.call(this,_$
|
|
376
|
-
message:_$
|
|
377
|
-
var d=a.options.worksheetName;if(d.toLowerCase()==c.toLowerCase())return!1;c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$
|
|
378
|
-
function(b,c){var a=this.worksheets;if(!R.call(this))return!1;this.worksheets.splice(c,0,a.splice(b,1)[0]);V.call(this,{worksheet:a[c],action:_$
|
|
379
|
-
t.current=c,t.current.refreshBorders(),U.call(t.current),k.state.call(this,b),fa.update.call(this,t.current),F.call(this,_$
|
|
380
|
-
(b=k.getWorksheet.call(this,b),!1===b?!1:this.worksheets[b]):this.worksheets[b]};k.state=function(b){try{if(typeof localStorage!==_$
|
|
381
|
-
0!==a.rangeCount&&(c=a.getRangeAt(0),a=c.cloneRange(),a.selectNodeContents(b),a.setEnd(c.endContainer,c.endOffset),c=a.toString().length);return c},invert:function(b){for(var c=[],a=Object.keys(b),d=0;d<a.length;d++)c[b[a[d]]]=a[d];return c},getColumnName:function(b){var c=_$
|
|
382
|
-
c){return k.getColumnName(parseInt(b))+(parseInt(c)+1)},getCoordsFromColumnName:function(b){var c=/^[a-zA-Z]+/.exec(b);if(c){for(var a=0,d=0;d<c[0].length;d++)a+=parseInt(c[0].charCodeAt(d)-64)*Math.pow(26,c[0].length-1-d);a--;0>a&&(a=0);b=parseInt(/[0-9]+$/.exec(b))||null;0<b&&b--;return[a,b]}}};k.shiftFormula=W.shiftFormula;k.createFromTable=function(b,c){if(b.tagName!=_$
|
|
383
|
-
0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$
|
|
384
|
-
(c.columns[d].readOnly=!0);if(C=w.getAttribute(_$
|
|
385
|
-
for(a=0;a<h.length;a++)if(c.data[l]=[],1!=c.parseTableFirstRowAsHeader||g.length||0!=a){for(d=0;d<h[a].children.length;d++){var u=h[a].children[d].getAttribute(_$
|
|
386
|
-
1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$
|
|
387
|
-
(c.mergeCells=m);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(r).length&&(c.classes=r);h=b.querySelectorAll(_$
|
|
388
|
-
1)!=_$
|
|
389
|
-
_$
|
|
390
|
-
k.getRangeFromTokens=W.getRangeFromTokens;return k}(),Ba=function(){function k(q){return t.current&&t.current.options.tableOverflow&&q.target.tagName==_$
|
|
375
|
+
(c=e[f].options.worksheetName.match(/(\d+)/))&&(c=parseInt(c[0])+1,c>b&&(b=c))}return b};k.createWorksheet=function(b){if(!R.call(this))return!1;b||(b={});var c=this.worksheets.length,a=F.call(this,_$_7134[519],b,c);if(typeof a===_$_7134[83])b=a;else if(!1===a)return!1;b.data||b.minDimensions||(b.minDimensions=[8,8]);b.worksheetId||(b.worksheetId=jSuites.guid().substring(0,8));b.worksheetName||(b.worksheetName=_$_7134[360]+k.nextName());if(I(b.worksheetName))jSuites.notification({error:_$_7134[515],
|
|
376
|
+
message:_$_7134[520]});else return a=na.worksheet(this,b),a.onload(),t.current&&t.current.resetSelection(),t.current=a,K.call(a,_$_7134[521],[b]),F.call(this,_$_7134[522],a,b,c),a};k.deleteWorksheet=function(b){var c=this.worksheets[b];if(!R.call(this,c))return!1;I(c.options.worksheetName,null);this.element.tabs.deleteElement(b);this.worksheets.splice(b,1);K.call(c,_$_7134[523],[b]);F.call(this,_$_7134[524],c,b)};k.renameWorksheet=function(b,c){var a=this.worksheets[b];if(!R.call(this,a))return!1;
|
|
377
|
+
var d=a.options.worksheetName;if(d.toLowerCase()==c.toLowerCase())return!1;c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_7134[3]);Number(c)==c&&(c=_$_7134[360]+Number(c));I(c)?alert(_$_7134[525]):(I(d,null),this.element.tabs.rename(b,c),a.options.worksheetName=c,I(c,a),V.call(this,{worksheet:a,action:_$_7134[79],index:b,oldValue:d,newValue:c}),K.call(a,_$_7134[79],{worksheet:b,newValue:c}),Ia.updateWorksheetName.call(a,d,c),W.updateWorksheetNames.call(a,d,c),F.call(this,_$_7134[526],a,b,c,d))};k.updateWorksheet=
|
|
378
|
+
function(b,c){var a=this.worksheets;if(!R.call(this))return!1;this.worksheets.splice(c,0,a.splice(b,1)[0]);V.call(this,{worksheet:a[c],action:_$_7134[80],f:b,t:c});K.call(a[c],_$_7134[80],{f:b,t:c});F.call(this,_$_7134[527],a[c],b,c)};k.moveWorksheet=function(b,c){this.element.tabs.move(b,c)};k.openWorksheet=function(b){var c=this.worksheets[b];!c||t.current&&t.current==c||(this.element.tabs.getActive()!=b?this.element.tabs.open(b):this.element.tabs.setBorder(b),t.current&&t.current.resetSelection(),
|
|
379
|
+
t.current=c,t.current.refreshBorders(),U.call(t.current),k.state.call(this,b),fa.update.call(this,t.current),F.call(this,_$_7134[528],c,b))};k.getWorksheet=function(b){if(b&&typeof b==_$_7134[83]){if(b=this.worksheets.indexOf(b),0<=b)return b}else for(var c=0;c<this.worksheets.length;c++)if(b===this.worksheets[c].options.worksheetId)return c;return!1};k.getWorksheetActive=function(){return this.element.tabs.getActive()};k.getWorksheetInstance=function(b){return b===_$_7134[3]||typeof b==_$_7134[17]?
|
|
380
|
+
(b=k.getWorksheet.call(this,b),!1===b?!1:this.worksheets[b]):this.worksheets[b]};k.state=function(b){try{if(typeof localStorage!==_$_7134[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof b!==_$_7134[13])localStorage.setItem(_$_7134[529]+c,b);else{var a=parseInt(localStorage.getItem(_$_7134[529]+c));k.openWorksheet.call(this,a)}}}catch(d){}};return k}(),E=function(){var k={getCaretIndex:function(b){var c=0,a=(this.config.root?this.config.root:window).getSelection();a&&
|
|
381
|
+
0!==a.rangeCount&&(c=a.getRangeAt(0),a=c.cloneRange(),a.selectNodeContents(b),a.setEnd(c.endContainer,c.endOffset),c=a.toString().length);return c},invert:function(b){for(var c=[],a=Object.keys(b),d=0;d<a.length;d++)c[b[a[d]]]=a[d];return c},getColumnName:function(b){var c=_$_7134[3];701<b?(c+=String.fromCharCode(64+parseInt(b/676)),c+=String.fromCharCode(64+parseInt(b%676/26))):25<b&&(c+=String.fromCharCode(64+parseInt(b/26)));return c+=String.fromCharCode(65+b%26)},getColumnNameFromCoords:function(b,
|
|
382
|
+
c){return k.getColumnName(parseInt(b))+(parseInt(c)+1)},getCoordsFromColumnName:function(b){var c=/^[a-zA-Z]+/.exec(b);if(c){for(var a=0,d=0;d<c[0].length;d++)a+=parseInt(c[0].charCodeAt(d)-64)*Math.pow(26,c[0].length-1-d);a--;0>a&&(a=0);b=parseInt(/[0-9]+$/.exec(b))||null;0<b&&b--;return[a,b]}}};k.shiftFormula=W.shiftFormula;k.createFromTable=function(b,c){if(b.tagName!=_$_7134[530])console.log(_$_7134[531]);else{c||(c={});c.columns=[];c.data=[];var a=b.querySelectorAll(_$_7134[532]);if(a.length)for(var d=
|
|
383
|
+
0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$_7134[151]));e&&(c.columns[d]||(c.columns[d]={}),c.columns[d].width=e)}e=function(w){var C=w.getBoundingClientRect();C=50<C.width?C.width:50;c.columns[d]||(c.columns[d]={});w.getAttribute(_$_7134[533])?c.columns[d].type=w.getAttribute(_$_7134[533]):c.columns[d].type=_$_7134[55];c.columns[d].width=C+_$_7134[44];c.columns[d].title=w.innerHTML;w.style.textAlign&&(c.columns[d].align=w.style.textAlign);w.classList.contains(_$_7134[534])&&
|
|
384
|
+
(c.columns[d].readOnly=!0);if(C=w.getAttribute(_$_7134[535]))c.columns[d].name=C;if(C=w.getAttribute(_$_7134[536]))c.columns[d].id=C};var f=[],g=b.querySelectorAll(_$_7134[537]);if(g.length){for(a=0;a<g.length-1;a++){var h=[];for(d=0;d<g[a].children.length;d++){var l={title:g[a].children[d].innerText,colspan:g[a].children[d].getAttribute(_$_7134[52])||1};h.push(l)}f.push(h)}g=g[g.length-1].children;for(d=0;d<g.length;d++)e(g[d])}l=0;var m={},p={},n={},r={},v=null;h=b.querySelectorAll(_$_7134[538]);
|
|
385
|
+
for(a=0;a<h.length;a++)if(c.data[l]=[],1!=c.parseTableFirstRowAsHeader||g.length||0!=a){for(d=0;d<h[a].children.length;d++){var u=h[a].children[d].getAttribute(_$_7134[539]);u?u.substr(0,1)!=_$_7134[12]&&(u=_$_7134[12]+u):u=h[a].children[d].innerHTML;c.data[l].push(u);u=E.getColumnNameFromCoords(d,a);(v=h[a].children[d].getAttribute(_$_7134[540]))&&(r[u]=v);v=parseInt(h[a].children[d].getAttribute(_$_7134[52]))||0;var y=parseInt(h[a].children[d].getAttribute(_$_7134[163]))||0;if(v||y)m[u]=[v||1,y||
|
|
386
|
+
1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$_7134[40])h[a].children[d].style.display=_$_7134[3];(v=h[a].children[d].getAttribute(_$_7134[99]))&&(n[u]=v);h[a].children[d].classList.contains(_$_7134[541])&&(n[u]=n[u]?n[u]+_$_7134[542]:_$_7134[543])}h[a].style&&h[a].style.height&&(p[a]={height:h[a].style.height});l++}else for(d=0;d<h[a].children.length;d++)e(h[a].children[d]);0<Object.keys(f).length&&(c.nestedHeaders=f);0<Object.keys(n).length&&(c.style=n);0<Object.keys(m).length&&
|
|
387
|
+
(c.mergeCells=m);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(r).length&&(c.classes=r);h=b.querySelectorAll(_$_7134[544]);if(h.length){b=[];for(a=0;a<h.length;a++){e=[];for(d=0;d<h[a].children.length;d++)e.push(h[a].children[d].innerText);b.push(e)}0<Object.keys(b).length&&(c.footers=b)}if(1==c.parseTableAutoCellType)for(b=[],d=0;d<c.columns.length;d++){f=e=!0;b[d]=[];for(a=0;a<c.data.length;a++)if(u=c.data[a][d],b[d][u]||(b[d][u]=0),b[d][u]++,25<u.length&&(e=!1),10==u.length){if(u.substr(4,
|
|
388
|
+
1)!=_$_7134[185]||u.substr(7,1)!=_$_7134[185])f=!1}else f=!1;a=Object.keys(b[d]).length;f?c.columns[d].type=_$_7134[184]:1==e&&1<a&&a<=parseInt(.1*c.data.length)&&(c.columns[d].type=_$_7134[57],c.columns[d].source=Object.keys(b[d]))}return c}};k.injectArray=function(b,c,a){return b.slice(0,c).concat(a).concat(b.slice(c))};k.parseCSV=function(b,c){c=c||_$_7134[25];for(var a=0,d=0,e=[[]],f=0,g=null,h=!1,l=!1,m=0;m<b.length;m++)if(e[d]||(e[d]=[]),e[d][a]||(e[d][a]=_$_7134[3]),b[m]!=_$_7134[545])if(b[m]!=
|
|
389
|
+
_$_7134[546]&&b[m]!=c||0!=h&&1!=l&&g){b[m]==_$_7134[187]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&b[m]==_$_7134[187]){b[m+1]==_$_7134[187]?(h=!0,e[d][a]+=b[m],m++):l=!0;continue}e[d][a]+=b[m]}else{g=null;l=h=!1;if(e[d][a][0]==_$_7134[187]){var p=e[d][a].trim();p[p.length-1]==_$_7134[187]&&(e[d][a]=p.substr(1,p.length-2))}b[m]==_$_7134[546]?(a=0,d++):(a++,a>f&&(f=a))}for(b=0;b<e.length;b++)for(m=0;m<=f;m++)void 0===e[b][m]&&(e[b][m]=_$_7134[3]);return e};k.getTokensFromRange=W.getTokensFromRange;
|
|
390
|
+
k.getRangeFromTokens=W.getRangeFromTokens;return k}(),Ba=function(){function k(q){return t.current&&t.current.options.tableOverflow&&q.target.tagName==_$_7134[572]&&q.target.hasAttribute(_$_7134[42])}function b(){A.x1=A.x2;A.y1=A.y2;N=null}function c(q,z){z||(z=1);z*=.1;return 0>q?Math.min(0,Math.ceil(q/(1+z))+1):Math.max(0,Math.ceil(q/(1+z))-1)}function a(){0<Math.abs(A.speeds.vertical)&&(A.speeds.vertical=c(A.speeds.vertical,1),t.current.scrollY.scrollTop+=d(A.speeds.vertical),0==t.current.scrollY.scrollTop||
|
|
391
391
|
t.current.scrollY.scrollHeight-t.current.scrollY.scrollTop===t.current.scrollY.clientHeight)&&(A.speeds.vertical=0);0<Math.abs(A.speeds.horizontal)&&(A.speeds.horizontal=c(A.speeds.horizontal,1),t.current.scrollX.scrollLeft+=d(A.speeds.horizontal),0==t.current.scrollX.scrollLeft||t.current.scrollX.scrollWidth-t.current.scrollX.scrollLeft===t.current.scrollX.clientWidth)&&(A.speeds.horizontal=0);0>=Math.abs(A.speeds.vertical)&&0>=Math.abs(A.speeds.horizontal)||requestAnimationFrame(a)}function d(q,
|
|
392
|
-
z){z||(z=100);return Math.ceil(z/1E3*q)}var e={},f=null,g=null,h=null,l=null,m=!1,p=null,n=null,r=null,v=function(q){function z(ja){ja.className&&(ja.classList.contains(_$
|
|
393
|
-
if(G)if(q.target.classList.contains(_$
|
|
394
|
-
else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$
|
|
395
|
-
X&&(D=_$
|
|
396
|
-
z.spreadsheet.config.root:document).elementsFromPoint(x,q);for(var D=0;D<z.length;D++)if(x=z[D].getAttribute(_$
|
|
397
|
-
t.current=null);return z};e.input=function(q){if(q.target.tagName==_$
|
|
398
|
-
!1;if(ra.event)return ra.cancel.call(t.current,q),q.preventDefault(),!1;if(ma.event)return ma.cancel.call(t.current,q),!1;if(1==ca.isVisible())return ca.close.call(t.current,!1),q.preventDefault(),!1}if(!q.target.classList.contains(_$
|
|
399
|
-
p=null},400);else if(t.current.edition){var x=t.current.edition.getAttribute(_$
|
|
392
|
+
z){z||(z=100);return Math.ceil(z/1E3*q)}var e={},f=null,g=null,h=null,l=null,m=!1,p=null,n=null,r=null,v=function(q){function z(ja){ja.className&&(ja.classList.contains(_$_7134[350])&&(G=ja),ja.classList.contains(_$_7134[363])&&(Q=ja),ja.classList.contains(_$_7134[547])&&(za=ja));ja.tagName==_$_7134[548]?x=1:ja.tagName==_$_7134[549]?x=2:ja.tagName==_$_7134[550]&&(x=3);ja.parentNode&&!G&&z(ja.parentNode)}var x=null,D=null,G=null,Q=null,za=null,X=null,wa=null,Sa=null;z(q.target);if(null!==za)return!1;
|
|
393
|
+
if(G)if(q.target.classList.contains(_$_7134[333]))D=_$_7134[551];else if(q.target.classList.contains(_$_7134[341]))D=_$_7134[137];else if(q.target.classList.contains(_$_7134[271]))D=_$_7134[413],X=parseInt(q.target.getAttribute(_$_7134[43]));else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$_7134[176]))X=q.target.getAttribute(_$_7134[181]),wa=q.target.getAttribute(_$_7134[182]),null===X?D=_$_7134[551]:(D=_$_7134[410],X=parseInt(X),wa=parseInt(wa));
|
|
394
|
+
else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$_7134[145]))D=_$_7134[552];else if(q.target.classList.contains(_$_7134[149]))D=_$_7134[552];else if(q.target.parentNode&&q.target.parentNode.classList&&q.target.parentNode.classList.contains(_$_7134[553]))D=_$_7134[405],X=Array.prototype.indexOf.call(q.target.parentNode.children,q.target);else if(1==x)D=_$_7134[412],X=q.target.clientWidth-q.offsetX,q.target.classList.contains(_$_7134[167])&&3<X&&20>
|
|
395
|
+
X&&(D=_$_7134[554]),X=q.target.getAttribute(_$_7134[42]);else if(2==x){if(q=u(q,G))D=_$_7134[414],X=q[0],wa=q[1],Sa=q[2]}else if(3==x){if(X=q.target.getAttribute(_$_7134[42]),wa=q.target.getAttribute(_$_7134[43]),X||wa)D=_$_7134[555]}else x||jSuites.findElement(q.target,_$_7134[556])&&(D=_$_7134[86]);return[G,Q,x,D,X,wa,Sa]},u=function(q,z){if(q.changedTouches&&q.changedTouches[0]){var x=q.changedTouches[0].clientX;q=q.changedTouches[0].clientY}else x=q.clientX,q=q.clientY;z=(z.spreadsheet.config.root?
|
|
396
|
+
z.spreadsheet.config.root:document).elementsFromPoint(x,q);for(var D=0;D<z.length;D++)if(x=z[D].getAttribute(_$_7134[42]),q=z[D].getAttribute(_$_7134[43]),null!=x&&null!=q)return x=parseInt(x),q=parseInt(q),[x,q,z[D]];return!1},y=function(q){var z=v(q);if(!1===z)return!1;z[0]?z[1]?t.current!=z[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=z[1].jexcel):(q=z[0].tabs.getActive(),0<=q&&(t.current=z[0].spreadsheet.worksheets[q])):t.current&&!jSuites.findElement(q.target,_$_7134[220])&&(t.current.resetSelection(!0),
|
|
397
|
+
t.current=null);return z};e.input=function(q){if(q.target.tagName==_$_7134[557]&&q.target.classList.contains(_$_7134[93])){var z=null;t.current?z=t.current:q.target.getAttribute(_$_7134[558])&&(z=I(q.target.getAttribute(_$_7134[558])));z&&la.parse.call(z,q.target)}};e.keydown=function(q){if(t.current){q.target.tagName==_$_7134[557]&&q.target.classList.contains(_$_7134[93])&&la.onkeydown.call(t.current,q);if(27==q.which){if(t.current.edition)return t.current.closeEditor(t.current.edition,!1),q.preventDefault(),
|
|
398
|
+
!1;if(ra.event)return ra.cancel.call(t.current,q),q.preventDefault(),!1;if(ma.event)return ma.cancel.call(t.current,q),!1;if(1==ca.isVisible())return ca.close.call(t.current,!1),q.preventDefault(),!1}if(!q.target.classList.contains(_$_7134[220]))if(q.target.classList.contains(_$_7134[383])){var z=q.target;p&&clearTimeout(p);p=setTimeout(function(){ca.search.call(t.current,z.value);p=null},500)}else if(q.target.classList.contains(_$_7134[397]))z=q.target,p&&clearTimeout(p),p=setTimeout(function(){t.current.search(z.value);
|
|
399
|
+
p=null},400);else if(t.current.edition){var x=t.current.edition.getAttribute(_$_7134[42]);13==q.which?t.current.options.columns[x].type==_$_7134[184]?t.current.closeEditor(t.current.edition,!0):t.current.options.columns[x].type!=_$_7134[57]&&t.current.options.columns[x].type!=_$_7134[559]&&t.current.options.columns[x].type!=_$_7134[436]&&(q.altKey?t.current.parent.input.classList.contains(_$_7134[560])||document.execCommand(_$_7134[561],!1,_$_7134[562]):(t.current.closeEditor(t.current.edition,!0),
|
|
400
400
|
t.current.down(),q.preventDefault())):9==q.which?(t.current.closeEditor(t.current.edition,!0),t.current.right(),q.preventDefault()):39!=q.which&&37!=q.which&&38!=q.which&&40!=q.which||t.current.parent.input.selected||(t.current.closeEditor(t.current.edition,!0),37==q.which?t.current.left(q.shiftKey,q.ctrlKey):39==q.which?t.current.right(q.shiftKey,q.ctrlKey):38==q.which?t.current.up(q.shiftKey,q.ctrlKey):40==q.which&&t.current.down(q.shiftKey,q.ctrlKey),q.preventDefault())}else if(t.current.selectedCell)if(33==
|
|
401
401
|
q.which)0<t.current.options.pagination?ta.pageUp.call(t.current):H.pageUp.call(t.current);else if(34==q.which)0<t.current.options.pagination?ta.pageDown.call(t.current):H.pageDown.call(t.current);else if(37==q.which)t.current.left(q.shiftKey,q.ctrlKey),q.preventDefault();else if(39==q.which)t.current.right(q.shiftKey,q.ctrlKey),q.preventDefault();else if(38==q.which)t.current.up(q.shiftKey,q.ctrlKey),q.preventDefault();else if(40==q.which)t.current.down(q.shiftKey,q.ctrlKey),q.preventDefault();else if(36==
|
|
402
|
-
q.which)t.current.first(q.shiftKey,q.ctrlKey),q.preventDefault();else if(35==q.which)t.current.last(q.shiftKey,q.ctrlKey),q.preventDefault();else if(32==q.which)t.current.setCheckRadioValue(),q.preventDefault();else if(46==q.which||8==q.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$
|
|
402
|
+
q.which)t.current.first(q.shiftKey,q.ctrlKey),q.preventDefault();else if(35==q.which)t.current.last(q.shiftKey,q.ctrlKey),q.preventDefault();else if(32==q.which)t.current.setCheckRadioValue(),q.preventDefault();else if(46==q.which||8==q.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$_7134[3]);else if(13==q.which)q.shiftKey?t.current.up():(1==t.current.options.allowManualInsertRow&&t.current.selectedCell[1]==(t.current.results?t.current.results[t.current.results.length-
|
|
403
403
|
1]:t.current.rows.length-1)&&t.current.insertRow(),t.current.selectedCell&&t.current.down()),q.preventDefault();else if(9==q.which)q.shiftKey?t.current.left():(x=t.current.selectedCell[0],t.current.right(),1==t.current.options.allowInsertColumn&&1==t.current.options.allowManualInsertColumn&&t.current.selectedCell[0]==x&&(t.current.insertColumn(),t.current.right())),q.preventDefault();else if((q.ctrlKey||q.metaKey)&&!q.shiftKey)65==q.which?(t.current.selectAll(),q.preventDefault()):83==q.which?(t.current.download(),
|
|
404
|
-
q.preventDefault()):89==q.which?(t.current.parent.redo(),q.preventDefault()):90==q.which?(t.current.parent.undo(),q.preventDefault()):67==q.which?(t.current.copy(),q.preventDefault()):88==q.which?(t.current.cut(),q.preventDefault()):86==q.which?e.paste(q):189==q.which&&(1==t.current.options.allowDeleteRow&&l==_$
|
|
405
|
-
t.current.isEditable()){x=t.current.selectedCell[1];var D=t.current.selectedCell[0];t.current.options.columns[D].type!=_$
|
|
406
|
-
!0,q))}}};var w=function(q,z,x,D,G,Q){if(1==t.current.parent.input.classList.contains(_$
|
|
407
|
-
!1)),t.current.edition){if(jSuites.findElement(q.target,_$
|
|
408
|
-
x[4]);else{if(1==x[2])if(1==t.current.options.columnDrag&&6>q.target.offsetHeight-q.offsetY)ra.start.call(t.current,q);else if(1==t.current.options.columnResize&&6>q.target.offsetWidth-q.offsetX)va.start.call(t.current,q);else{z=t.current.options.columns.length-1;var D=t.current.options.data.length-1;if(x[3]==_$
|
|
409
|
-
g&&null!=h?w(g,0,x[4],D,q,x[3]):(x[3]==_$
|
|
410
|
-
null!=h?w(0,h,z,D,q,x[3]):(w(0,D,z,D,q,x[3]),g=0,h=D));else if(x[3]==_$
|
|
411
|
-
z,h=D)}}l=x[3];typeof x[3]!==_$
|
|
412
|
-
(q=q.target.innerText==_$
|
|
413
|
-
else{var D=q.target.getBoundingClientRect();f&&(f.style.cursor=_$
|
|
414
|
-
q.target&&z&&!x&&5>D.height-(q.clientY-D.top)&&(f=q.target,f.style.cursor=_$
|
|
415
|
-
G=t.current.options.data.length-1,w(g,0,D,G,q,x[3])),2==x[2]&&(x[3]==_$
|
|
416
|
-
q.changedTouches[0].clientY;else za=q.clientX,X=q.clientY;50>Q.height-(X-Q.top)?H.pageDown.call(t.current,1,null,q):80>X-Q.top&&H.pageUp.call(t.current,1,null,q);50>Q.width-(za-Q.left)?H.pageRight.call(t.current,1,null,q):80>za-Q.left&&H.pageLeft.call(t.current,1,null,q);n=null},100):n&&(clearTimeout(n),n=null)};e.dblclick=function(q){if(t.current)if(q.target.classList.contains(_$
|
|
417
|
-
t.current.orderBy(q):2==z[2]&&t.current.isEditable()&&!t.current.edition&&z[6]&&t.current.openEditor(z[6],null,q)}};e.paste=function(q){if(t.current&&t.current.selectedCell&&!t.current.edition){var z=q.clipboardData||window.clipboardData;z&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],z.getData(_$
|
|
404
|
+
q.preventDefault()):89==q.which?(t.current.parent.redo(),q.preventDefault()):90==q.which?(t.current.parent.undo(),q.preventDefault()):67==q.which?(t.current.copy(),q.preventDefault()):88==q.which?(t.current.cut(),q.preventDefault()):86==q.which?e.paste(q):189==q.which&&(1==t.current.options.allowDeleteRow&&l==_$_7134[413]?(t.current.deleteRow(),q.preventDefault()):1==t.current.options.allowDeleteColumn&&l==_$_7134[412]&&(t.current.deleteColumn(),q.preventDefault()));else if(t.current.selectedCell&&
|
|
405
|
+
t.current.isEditable()){x=t.current.selectedCell[1];var D=t.current.selectedCell[0];t.current.options.columns[D].type!=_$_7134[18]&&(32==q.keyCode?t.current.options.columns[D].type==_$_7134[253]||t.current.options.columns[D].type==_$_7134[255]?q.preventDefault():t.current.openEditor(t.current.records[x][D].element,!0,q):113==q.keyCode?t.current.openEditor(t.current.records[x][D].element,!1,q):1!=q.key.length&&q.key!=_$_7134[563]||q.altKey||q.ctrlKey||t.current.records[x]&&t.current.openEditor(t.current.records[x][D].element,
|
|
406
|
+
!0,q))}}};var w=function(q,z,x,D,G,Q){if(1==t.current.parent.input.classList.contains(_$_7134[93])&&la.update.call(t.current,q,z,x,D,G))return!1;if(t.current.edition)t.current.closeEditor(t.current.edition,!0);else if(l&&l!==Q)return!1;la.current?la.range.call(t.current,q,z,x,D,G):ya[_$_7134[11]].call(t.current,q,z,x,D,G)};e.mousedown=function(q){q=q||window.event;var z=q.buttons?q.buttons:q.button?q.button:q.which;if(t.current)if(1==ca.isVisible()&&(jSuites.findElement(q.target,_$_7134[387])||ca.close.call(t.current,
|
|
407
|
+
!1)),t.current.edition){if(jSuites.findElement(q.target,_$_7134[100]))return!1}else if(jSuites.findElement(q.target,_$_7134[220]))return!1;var x=y(q);if(!1===x)return!1;r=x;if(1<z)if(x[3]==_$_7134[412]){if(t.current.isSelected(x[4],null))return!1}else if(x[3]==_$_7134[413]){if(t.current.isSelected(null,x[4]))return!1}else if(x[3]==_$_7134[414]&&t.current.isSelected(x[4],x[5]))return!1;if(t.current){if(x[3]==_$_7134[137])t.current.isEditable()&&(ma.event=!0);else if(x[3]==_$_7134[554])ca.open.call(t.current,
|
|
408
|
+
x[4]);else{if(1==x[2])if(1==t.current.options.columnDrag&&6>q.target.offsetHeight-q.offsetY)ra.start.call(t.current,q);else if(1==t.current.options.columnResize&&6>q.target.offsetWidth-q.offsetX)va.start.call(t.current,q);else{z=t.current.options.columns.length-1;var D=t.current.options.data.length-1;if(x[3]==_$_7134[551])w(0,0,z,D,q,x[3]),h=g=0;else if(x[3]==_$_7134[410]){var G=oa.range.call(t.current,x[5])[x[4]];G[1]>z&&(G[1]=z);w(G[0],0,G[1],D,q,x[3]);g=G[0];h=0}else(q.shiftKey||q.ctrlKey)&&null!=
|
|
409
|
+
g&&null!=h?w(g,0,x[4],D,q,x[3]):(x[3]==_$_7134[412]&&g==x[4]&&1==t.current.options.allowRenameColumn&&(n=setTimeout(function(){t.current.setHeader(x[4])},800)),w(x[4],0,x[4],D,q,x[3]),g=x[4],h=0)}if(2==x[2])if(x[3]==_$_7134[413])1==t.current.options.rowDrag&&6>q.target.offsetWidth-q.offsetX?ra.start.call(t.current,q):1==t.current.options.rowResize&&6>q.target.offsetHeight-q.offsetY?va.start.call(t.current,q):(z=t.current.options.columns.length-1,D=parseInt(x[4]),(q.shiftKey||q.ctrlKey)&&null!=g&&
|
|
410
|
+
null!=h?w(0,h,z,D,q,x[3]):(w(0,D,z,D,q,x[3]),g=0,h=D));else if(x[3]==_$_7134[414]){z=parseInt(x[4]);D=parseInt(x[5]);if(!t.current.edition&&(G=t.current.options.columns[x[4]].type,q.target.tagName==_$_7134[564]&&(G==_$_7134[256]||G==_$_7134[257])&&q.target.parentNode.classList.contains(_$_7134[124]))){var Q=q.target.innerText;G==_$_7134[256]&&(Q=_$_7134[565]+Q);window.open(Q,_$_7134[566])}q.shiftKey||q.ctrlKey?w(t.current.selectedCell[0],t.current.selectedCell[1],z,D,q,x[3]):(w(z,D,z,D,q,x[3]),g=
|
|
411
|
+
z,h=D)}}l=x[3];typeof x[3]!==_$_7134[13]&&F.call(t.current.parent,_$_7134[567],t.current,x[3],x[4],x[5]);m=!0}else m=!1};e.mouseup=function(q){t.current&&(ra.event?ra.end.call(t.current,q):va.event?va.end.call(t.current,q):ma.event?ma.end.call(t.current,q):q.target.classList.contains(_$_7134[386])?ca.close.call(t.current,!0):t.current.edition&&q.target.classList.contains(_$_7134[568])&&50>q.target.clientWidth-q.offsetX&&50>q.offsetY?da.close.call(t.current,null,!0):q.target.classList.contains(_$_7134[321])&&
|
|
412
|
+
(q=q.target.innerText==_$_7134[215]?0:q.target.innerText==_$_7134[216]?q.target.getAttribute(_$_7134[268])-1:q.target.innerText-1,ta[_$_7134[11]].call(t.current,parseInt(q))));n&&(clearTimeout(n),n=null);m=l=!1;la.current&&la.close.call(t.current)};e.mousemove=function(q){q=q||window.event;if(t.current){var z=q.target.getAttribute(_$_7134[42]),x=q.target.getAttribute(_$_7134[43]);if(1==m)ra.event?ra.update.call(t.current,q):va.event?va.update.call(t.current,q):Pa.event&&Pa.update.call(t.current,q);
|
|
413
|
+
else{var D=q.target.getBoundingClientRect();f&&(f.style.cursor=_$_7134[3],f=null);1==t.current.options.editable&&(z||x)&&(1==t.current.options.rowResize&&q.target&&z&&!x&&5>D.width-(q.clientX-D.left)?(f=q.target,f.style.cursor=_$_7134[569]):1==t.current.options.columnResize&&q.target&&!z&&x&&5>D.height-(q.clientY-D.top)?(f=q.target,f.style.cursor=_$_7134[570]):1==t.current.options.rowDrag&&q.target&&!z&&x&&5>D.width-(q.clientX-D.left)?(f=q.target,f.style.cursor=_$_7134[571]):1==t.current.options.columnDrag&&
|
|
414
|
+
q.target&&z&&!x&&5>D.height-(q.clientY-D.top)&&(f=q.target,f.style.cursor=_$_7134[571]))}}};e.mouseover=function(q){q=q||window.event;var z=!1;if(t.current&&1==m){var x=v(q);if(x[0]){if(x[1]&&t.current!=x[1].jexcel&&t.current)return!1;if(!ra.event&&!va.event)if(ma.event){var D=q.target.getAttribute(_$_7134[42]),G=q.target.getAttribute(_$_7134[43]);t.current.isSelected(D,G)||null===D||null===G||(ma.call(t.current,D,G),z=!0)}else null!==g&&null!==h&&(1==x[2]&&(D=g,x[3]==_$_7134[412]&&(D=q.target.getAttribute(_$_7134[42])),
|
|
415
|
+
G=t.current.options.data.length-1,w(g,0,D,G,q,x[3])),2==x[2]&&(x[3]==_$_7134[413]?(D=t.current.options.columns.length-1,G=parseInt(q.target.getAttribute(_$_7134[43])),w(0,h,D,G,q,x[3])):x[3]==_$_7134[414]&&(D=q.target.getAttribute(_$_7134[42]),G=q.target.getAttribute(_$_7134[43]),D&&G&&(w(g,h,D,G,q,x[3]),z=!0))))}}1==z&&!n&&H.limited.call(t.current)?n=setTimeout(function(){var Q=t.current.content.getBoundingClientRect();if(q.changedTouches&&q.changedTouches[0])var za=q.changedTouches[0].clientX,X=
|
|
416
|
+
q.changedTouches[0].clientY;else za=q.clientX,X=q.clientY;50>Q.height-(X-Q.top)?H.pageDown.call(t.current,1,null,q):80>X-Q.top&&H.pageUp.call(t.current,1,null,q);50>Q.width-(za-Q.left)?H.pageRight.call(t.current,1,null,q):80>za-Q.left&&H.pageLeft.call(t.current,1,null,q);n=null},100):n&&(clearTimeout(n),n=null)};e.dblclick=function(q){if(t.current)if(q.target.classList.contains(_$_7134[341]))ma.execute.call(t.current,!1);else{var z=v(q);1==z[2]?1==t.current.options.columnSorting&&(q=q.target.getAttribute(_$_7134[42]))&&
|
|
417
|
+
t.current.orderBy(q):2==z[2]&&t.current.isEditable()&&!t.current.edition&&z[6]&&t.current.openEditor(z[6],null,q)}};e.paste=function(q){if(t.current&&t.current.selectedCell&&!t.current.edition){var z=q.clipboardData||window.clipboardData;z&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],z.getData(_$_7134[55])),q&&q.preventDefault())}};e.contextmenu=function(q){var z=y(q);!1!==z&&(z[1]||(z=r),t.current&&!t.current.edition&&(z=Array.prototype.slice.call(z,3),Ra.open.call(t.current,
|
|
418
418
|
q,z)))};var C=Date.now(),A={},N=null,S=null,P=null;e.touchstart=function(q){var z=v(q);z[0]?z[1]&&t.current!=z[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=z[1].jexcel):t.current&&(t.current.resetSelection(),t.current=null);if(t.current&&!t.current.edition){var x=z[4];z=z[5];k(q)&&(P=q.touches[0],S=q.touches.length,C=Date.now(),A.x1=q.touches[0].screenX,A.y1=q.touches[0].screenY,A.x2=q.touches[0].screenX,A.y2=q.touches[0].screenY,N=setTimeout(b,250),null!=A.speeds&&(A.speeds.vertical=
|
|
419
419
|
0,A.speeds.horizontal=0));if(null!==x&&null!==z){t.current.updateSelectionFromCoords(x,z,x,z);var D=q.target;n=setTimeout(function(){t.current.openEditor(D,!1,q);n=null;q.preventDefault();q.stopPropagation();q.stopImmediatePropagation()},750)}}};e.touchmove=function(q){n&&(clearTimeout(n),n=null);if(k(q)&&1==S){var z=q.changedTouches[0];P&&(t.current.scrollY.scrollTop+=-1*(z.clientY-P.clientY),t.current.scrollX.scrollLeft+=-1*(z.clientX-P.clientX));P=z;A.x2=q.touches[0].screenX;A.y2=q.touches[0].screenY;
|
|
420
420
|
null!=A.speeds&&(A.speeds.vertical=0,A.speeds.horizontal=0);null==N&&(N=setTimeout(b,250));q.cancelable&&t.current.options.tableOverflow&&q.preventDefault()}};e.touchend=function(q){n&&(clearTimeout(n),n=null);N&&(clearTimeout(N),N=null);P=S=null;if(k(q)){q=Date.now()-C;var z=A.x1,x=A.y1,D=A.x2,G=A.y2,Q=z==z&&x==G?0:Math.sqrt(Math.pow(z-z,2)+Math.pow(x-G,2));G>x&&(Q=-Q);10>Math.abs(G-x)&&(Q=0);G=0>=q?-1:Math.ceil(Q/(q/1E3));x=z==D&&x==x?0:Math.sqrt(Math.pow(z-D,2)+Math.pow(x-x,2));D>z&&(x=-x);10>
|
|
421
|
-
Math.abs(D-z)&&(x=0);A.speeds={vertical:G,horizontal:0>=q?-1:Math.ceil(x/(q/1E3))};(250>q&&200<Math.abs(A.speeds.vertical)||250>q&&200<Math.abs(A.speeds.horizontal))&&requestAnimationFrame(a)}};e.resize=function(){t.current&&1==t.current.parent.config.fullscreen&&H.refresh.call(t.current)};return e}(),t=function(k,b,c){b||(b={});if(b.cloud&&!c)typeof b.plugins.cloud==_$
|
|
422
|
-
b);else var a=na.spreadsheet(k,b);a.processing=!0;1==a.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[a.name]=function(){for(var d=0;d<a.worksheets.length;d++)typeof a.worksheets[d].onload==_$
|
|
423
|
-
if(typeof a.config.onload==_$
|
|
424
|
-
la;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var b=Object.keys(k),c=0;c<b.length;c++)typeof k[b[c]]===_$
|
|
425
|
-
null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$
|
|
426
|
-
c.type=_$
|
|
427
|
-
-f.parent.input.offsetHeight));return c};k.general=function(){var c={},a=function(e){return(_$
|
|
428
|
-
f,g,h,l,m)};c.updateCell=function(e,f,g,h,l,m){g=parseInt(g);h=parseInt(h);if(e){var p=d(m),n=null;f===_$
|
|
429
|
-
e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$
|
|
430
|
-
m.inputmode),(g=d(m))?(m.disabledMaskOnEdition||(m.mask?(m=m.mask.split(_$
|
|
431
|
-
_$
|
|
432
|
-
_$
|
|
433
|
-
f.innerText=e:f.innerHTML=e,d.innerHTML=_$
|
|
434
|
-
if(a=c.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$
|
|
435
|
-
h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$
|
|
436
|
-
_$
|
|
437
|
-
return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$
|
|
438
|
-
_$
|
|
439
|
-
function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$
|
|
440
|
-
2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$
|
|
441
|
-
_$
|
|
442
|
-
k.color=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$
|
|
443
|
-
h);a=jSuites.color(a,l);a.open()};c.closeEditor=function(d,e,f,g,h,l){d=a.close(!0);if(e)return d};c[_$
|
|
444
|
-
(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$
|
|
445
|
-
k.radio=function(){var c={createCell:function(a,d,e,f,g,h){a.getAttribute(_$
|
|
446
|
-
h&&g.options.data[h][e]&&a.push({x:e,y:h,value:0});a.length&&g.setValue(a)}return d},openEditor:function(a,d,e,f,g){return!1},closeEditor:function(a,d){return!1}};c[_$
|
|
447
|
-
(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$
|
|
448
|
-
e)e=0;if(d.children[0]&&d.children[0].tagName==_$
|
|
449
|
-
0);a.setAttribute(_$
|
|
450
|
-
5);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h,l){return e?a.value:_$
|
|
451
|
-
_$
|
|
452
|
-
function(){g.closeEditor(a,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(a,d,e,f,g){g.parent.input.classList.remove(_$
|
|
453
|
-
l.render==_$
|
|
454
|
-
parseInt(l.options.height)+_$
|
|
455
|
-
function(d,e){return _$
|
|
456
|
-
m);a.close=function(){h.closeEditor(d,!0)};jSuites.tracking(a,!0)};c.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return c}();k.hidden=function(){return{createCell:function(c,a,d,e,f){c.style.display=_$
|
|
457
|
-
e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$
|
|
458
|
-
function(d,e,f,g,h,l){d.classList.add(_$
|
|
459
|
-
_$
|
|
460
|
-
f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$
|
|
461
|
-
p=!1===m?_$
|
|
462
|
-
e.worksheetId);return l};c[_$
|
|
463
|
-
d))}return t(k(this)[_$
|
|
421
|
+
Math.abs(D-z)&&(x=0);A.speeds={vertical:G,horizontal:0>=q?-1:Math.ceil(x/(q/1E3))};(250>q&&200<Math.abs(A.speeds.vertical)||250>q&&200<Math.abs(A.speeds.horizontal))&&requestAnimationFrame(a)}};e.resize=function(){t.current&&1==t.current.parent.config.fullscreen&&H.refresh.call(t.current)};return e}(),t=function(k,b,c){b||(b={});if(b.cloud&&!c)typeof b.plugins.cloud==_$_7134[84]?b.plugins.cloud.load(b,function(d){t(k,d,!0)}):console.error(_$_7134[573]);else{if(k.spreadsheet)a=k.spreadsheet,Da[_$_7134[11]].call(a,
|
|
422
|
+
b);else var a=na.spreadsheet(k,b);a.processing=!0;1==a.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[a.name]=function(){for(var d=0;d<a.worksheets.length;d++)typeof a.worksheets[d].onload==_$_7134[84]&&(a.worksheets[d].onload(),a.worksheets[d].onload=null);a.processing=!1;if(Array.isArray(a.queue)&&0<a.queue.length)for(;d=a.queue.shift();)d[0].updateCell(d[1],d[2],L.call(d[0],d[1],d[2]),!0);a.config.toolbar&&fa.show.call(a);for(d=0;d<a.worksheets.length;d++)aa.refresh.call(a.worksheets[d]);
|
|
423
|
+
if(typeof a.config.onload==_$_7134[84])a.config.onload(a);ia.state.call(a);for(d=0;d<a.worksheets.length;d++)Y.update.call(a.worksheets[d]);jSuites.loading.hide()};Array.isArray(b.worksheets)&&(b=b.worksheets);if(Array.isArray(b)){for(c=0;c<b.length;c++)na.worksheet(a,b[c]);b=a.worksheets}else b=na.worksheet(a,b);jSuites.ajax.pending(a.name)||(jSuites.ajax.oncomplete[a.name](),jSuites.ajax.oncomplete[a.name]=null);return b}};t.license=null;t.setLicense=function(k){t.license=k};t.spreadsheet=[];t.picker=
|
|
424
|
+
la;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var b=Object.keys(k),c=0;c<b.length;c++)typeof k[b[c]]===_$_7134[84]&&(t[b[c]]=k[b[c]],t.extensions[b[c]]=k[b[c]],t.license&&typeof t[b[c]].license==_$_7134[84]&&t[b[c]].license.call(t,t.license))};t.destroy=function(k,b){if(k.spreadsheet){b&&na.unbind(k);b=t.spreadsheet.indexOf(k.spreadsheet);t.spreadsheet.splice(b,1);for(b=0;b<k.spreadsheet.worksheets.length;b++)I(k.spreadsheet.worksheets[b].options.worksheetName,
|
|
425
|
+
null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$_7134[3];k.classList.remove(_$_7134[574]);k.classList.remove(_$_7134[350])}};t.version=J;t.helpers=E;t.events=Ba;typeof formula!==_$_7134[13]&&(t.formula=formula);t.editors=function(){var k={},b=function(c,a){return 1==c[a]||c.options&&1==c.options[a]?!0:c[a]==_$_7134[230]||c.options&&c.options[a]==_$_7134[230]?!0:!1};k.createEditor=function(c,a,d,e){e.parent.input.setAttribute(_$_7134[101],!1);c==_$_7134[221]?(c=document.createElement(_$_7134[221]),
|
|
426
|
+
c.type=_$_7134[55],c.value=d):c=document.createElement(_$_7134[20]);c.style.width=a.offsetWidth-2+_$_7134[44];c.style.height=a.offsetHeight-1+_$_7134[44];e.parent.input.appendChild(c);return c};k.createDialog=function(c,a,d,e,f,g){c=k.createEditor(_$_7134[20],c,a,f);c.classList.add(_$_7134[575]);c.classList.add(_$_7134[568]);800>window.innerWidth?(f.parent.input.style.top=_$_7134[143],f.parent.input.style.left=_$_7134[143]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=
|
|
427
|
+
-f.parent.input.offsetHeight));return c};k.general=function(){var c={},a=function(e){return(_$_7134[3]+e)[0]==_$_7134[12]?!0:!1},d=function(e){if(e.format||e.mask||e.locale){var f={};e.mask?f.mask=e.mask:e.format?f.mask=e.format:(f.locale=e.locale,f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};c.createCell=function(e,f,g,h,l,m){m.type!=_$_7134[14]&&m.type!=_$_7134[310]&&m.type!=_$_7134[309]||e.classList.add(_$_7134[576]);return c.updateCell(e,
|
|
428
|
+
f,g,h,l,m)};c.updateCell=function(e,f,g,h,l,m){g=parseInt(g);h=parseInt(h);if(e){var p=d(m),n=null;f===_$_7134[3]||a(f)||typeof f===_$_7134[14]||(p?(p=jSuites.mask.extract(f,p,!0))&&p.value!==_$_7134[3]&&(n=p.value):1==(!1===l.parent.config.autoCasting||!1===m.autoCasting?!1:!0)&&(m.type==_$_7134[14]||m.type==_$_7134[310]||m.type==_$_7134[309]?(p=jSuites.mask.extract(f,m,!0))&&p.value!==_$_7134[3]&&(n=p.value):jSuites.isNumeric(Number(f))&&(n=Number(f))));null!==n&&(f=n);f=c.parseValue(g,h,f,l,m,
|
|
429
|
+
e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_7134[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==n)return n}};c.openEditor=function(e,f,g,h,l,m){var p=l.parent.input;p.onblur=function(){p.classList.contains(_$_7134[93])||l.closeEditor(e,!0)};if(m.type==_$_7134[14]||m.type==_$_7134[310]||m.type==_$_7134[309])p.classList.add(_$_7134[560]),a(f)||m.inputmode||(m.inputmode=_$_7134[577]);g=null;a(f)||(m.inputmode&&p.setAttribute(_$_7134[97],
|
|
430
|
+
m.inputmode),(g=d(m))?(m.disabledMaskOnEdition||(m.mask?(m=m.mask.split(_$_7134[217]),p.setAttribute(_$_7134[95],m[0])):m.locale&&p.setAttribute(_$_7134[578],m.locale)),g.input=l.parent.input,l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&m.type==_$_7134[309]&&(f*=100));g||(l.parent.config.stripHTML?p.innerText=f:p.innerHTML=f,jSuites.focus(l.parent.input))};c.closeEditor=function(e,f,g,h,l,m){e=l.parent.input;f=f&&e.innerText.trim().length?e.innerText:_$_7134[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,
|
|
431
|
+
_$_7134[3]):m.type==_$_7134[309]&&(f+=_$_7134[579],e.classList.remove(_$_7134[580]));return f};c.parseValue=function(e,f,g,h,l,m){a(g)&&1==h.parent.config.parseFormulas&&(g=h.executeFormula(g,e,f));g instanceof Element||g instanceof HTMLDocument||!l||a(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),m&&f.mask&&(f=f.mask.split(_$_7134[217]),f[1]&&(f[1].match(new RegExp(_$_7134[581],_$_7134[379]))&&(0>g?m.classList.add(_$_7134[582]):m.classList.remove(_$_7134[582])),f[1].match(new RegExp(_$_7134[583],
|
|
432
|
+
_$_7134[379]))&&0>g&&(e=_$_7134[212]+e+_$_7134[233]))),e&&(g=e));return g};c[_$_7134[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_7134[309]?100*parseFloat(f):f};c.destroyCell=function(e){e.classList.remove(_$_7134[576])};return c}();k.text=k.general;k.number=k.general;k.numeric=k.general;k.percent=k.general;k.notes=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(f=document.createElement(_$_7134[20]),f.classList.add(_$_7134[584]),1==h.parent.config.stripHTML?
|
|
433
|
+
f.innerText=e:f.innerHTML=e,d.innerHTML=_$_7134[3],d.appendChild(f))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_7134[585];m.toolbar=!1;a=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(a,m)};c.closeEditor=function(d,e,f,g,h,l){return e?a.getData():_$_7134[3]};return c}();k.dropdown=function(){var c={createCell:function(a,d,e,f,g,h){h.render==_$_7134[586]?a.classList.add(_$_7134[587]):a.classList.add(_$_7134[588]);
|
|
434
|
+
if(a=c.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_7134[588])},updateCell:function(a,d,e,f,g,h){if(a){var l=c.getItem(a,d,e,f,g,h);l?a.innerHTML=l:d?(d=c.fromLabel(a,d,e,f,g,h),d.length?(l=c.getItem(a,d,e,f,g,h),a.innerHTML=l):a.innerHTML=_$_7134[3]):a.innerHTML=_$_7134[3];return d}},openEditor:function(a,d,e,f,g,h){var l=k.createEditor(_$_7134[20],a,d,g),m=h.delimiter||_$_7134[217];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_7134[84]&&(h.source=
|
|
435
|
+
h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_7134[84]&&(h=h.filterOptions(g,a,e,f,d,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));b(h,_$_7134[589])&&(e.multiple=!0);b(h,_$_7134[56])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};b(h,_$_7134[589])?d&&(e.value=(_$_7134[3]+d).split(m)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(a,d,e,f,g,h){for(var l=g.parent.input.children[0],m=h.delimiter||
|
|
436
|
+
_$_7134[217],p=l.dropdown.getText(!0),n=l.dropdown.getValue(!0),r=0;r<n.length;r++)!1===c.getItem(a,n[r],e,f,g,h)&&h.source.push({id:n[r],name:p[r]});l.dropdown.close(!0);if(d)return n.join(m)},fromLabel:function(a,d,e,f,g,h){a=h.delimiter||_$_7134[217];e=[];f=[];Array.isArray(d)||(d=(_$_7134[3]+d).split(a));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);!b(h,_$_7134[589])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<h.source.length;d++)f[h.source[d].name]&&e.push(h.source[d].id);
|
|
437
|
+
return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$_7134[217];a=[];e=[];Array.isArray(d)||(d=(_$_7134[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!b(h,_$_7134[589])&&1<Object.keys(f).length&&(d=[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_7134[83])for(d=0;d<h.source.length;d++)f=h.source[d],h.source[d]={id:f,name:f};for(d=0;d<h.source.length;d++)typeof e[h.source[d].id]!==_$_7134[13]&&a.push(h.render==_$_7134[258]?h.source[d].color:h.render==
|
|
438
|
+
_$_7134[590]?h.source[d].image:h.source[d].name);if(a.length){if(typeof h.render!==_$_7134[13]){for(d=0;d<a.length;d++)e=d,f=a[d],f=h.render==_$_7134[258]?_$_7134[591]+f+_$_7134[592]:h.render==_$_7134[590]?_$_7134[591]+f+_$_7134[592]:h.render==_$_7134[586]?_$_7134[594]+(h.source[d].color||_$_7134[593])+_$_7134[595]+f+_$_7134[596]:void 0,a[e]=f;return a.join(_$_7134[3])}for(d=0;d<a.length;d++)a[d]=(_$_7134[3]+a[d]).replace(_$_7134[215],_$_7134[597]);return a.join(_$_7134[298])}return!1}};c[_$_7134[51]]=
|
|
439
|
+
function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_7134[258]?a.source[e].color:a.render==_$_7134[590]?a.source[e].image:a.source[e].name};return c}();k.autocomplete=k.dropdown;k.calendar=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){if(d){f=e;l=c.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_7134[3]+e;g.substr(4,1)==_$_7134[185]&&g.substr(7,1)==_$_7134[185]?g=!0:(g=g.split(_$_7134[185]),g=4==g[0].length&&g[0]==Number(g[0])&&
|
|
440
|
+
2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$_7134[3];return _$_7134[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_7134[84]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options||{};f.opened=!0;f.onclose=function(m,p){h.closeEditor(d,!0)};typeof l.timepicker!==_$_7134[13]&&(f.time=b(l,_$_7134[598])?!0:!1);typeof f.readonly!==
|
|
441
|
+
_$_7134[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;a=k.createEditor(_$_7134[221],d,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&a.focus()};c.closeEditor=function(d,e,f,g,h){d=a.calendar.close(!0,a.value?!0:!1);d=a.value?d:_$_7134[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_7134[599]};c[_$_7134[51]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();
|
|
442
|
+
k.color=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_7134[600]?(f=document.createElement(_$_7134[20]),f.className=_$_7134[258],f.style.backgroundColor=e,d.innerText=_$_7134[3],d.appendChild(f)):(d.style.color=e,d.innerText=e))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_7134[84]&&(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(m,p){h.closeEditor(d,!0)};a=k.createEditor(_$_7134[221],d,e,
|
|
443
|
+
h);a=jSuites.color(a,l);a.open()};c.closeEditor=function(d,e,f,g,h,l){d=a.close(!0);if(e)return d};c[_$_7134[51]]=function(d,e){d=document.createElement(_$_7134[20]);d.style.width=_$_7134[601];d.style.height=_$_7134[22];d.style.backgroundColor=e;return d.outerHTML};return c}();k.checkbox=function(){var c={createCell:function(a,d,e,f,g,h){d=d&&d!=_$_7134[602]&&d!=_$_7134[603]?!0:!1;e=document.createElement(_$_7134[221]);e.type=_$_7134[253];e.checked=d;e.onclick=function(){g.setValue(a,this.checked)};
|
|
444
|
+
(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_7134[604],_$_7134[604]);a.innerHTML=_$_7134[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_7134[602]&&d!=_$_7134[603]?!0:!1;a&&(a.children[0].checked=d);return d},openEditor:function(a,d,e,f,g){d=a.children[0].checked?!1:!0;g.setValue(a,d);return!1},closeEditor:function(a,d){return!1}};c[_$_7134[51]]=function(a,d){return 1==d||1==d||d==_$_7134[230]?jSuites.translate(_$_7134[230]):jSuites.translate(_$_7134[602])};return c}();
|
|
445
|
+
k.radio=function(){var c={createCell:function(a,d,e,f,g,h){a.getAttribute(_$_7134[42]);e=document.createElement(_$_7134[221]);e.type=_$_7134[255];e.checked=1==d||1==d||d==_$_7134[230]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_7134[604],_$_7134[604]);a.innerHTML=_$_7134[3];a.appendChild(e)},updateCell:function(a,d,e,f,g){d=1==d||1==d||d==_$_7134[230]||d==_$_7134[605]?!0:!1;a&&(a.children[0].checked=d);if(1==d){a=[];for(var h=0;h<g.options.data.length;h++)f!=
|
|
446
|
+
h&&g.options.data[h][e]&&a.push({x:e,y:h,value:0});a.length&&g.setValue(a)}return d},openEditor:function(a,d,e,f,g){return!1},closeEditor:function(a,d){return!1}};c[_$_7134[51]]=function(a,d){return 1==d||1==d||d==_$_7134[230]?_$_7134[230]:_$_7134[602]};return c}();k.autonumber=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){(e=parseInt(e))||0<parseInt(d.innerText)&&(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?c.isValid(e,f,g,h)||(e=_$_7134[245]):e=l.sequence+1;e>l.sequence&&
|
|
447
|
+
(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_7134[221],d,e,h);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h){return e?a.value:_$_7134[3]};c.isValid=function(d,e,f,g){for(var h,l=0;l<g.options.data.length;l++)if(h=g.value(e,l),h==d&&l!=f)return!1;return!0};return c}();k.progressbar=function(){var c={},a=null;c.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>
|
|
448
|
+
e)e=0;if(d.children[0]&&d.children[0].tagName==_$_7134[557])var f=d.children[0];else f=document.createElement(_$_7134[20]),f.classList.add(_$_7134[259]),d.innerText=_$_7134[3],d.classList.add(_$_7134[606]),d.appendChild(f);f.style.width=parseInt(e)+_$_7134[579];f.setAttribute(_$_7134[268],parseInt(e)+_$_7134[579])};c.destroyCell=function(d){d.classList.remove(_$_7134[606])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_7134[221],d,e,h);a.type=_$_7134[14];a.setAttribute(_$_7134[607],
|
|
449
|
+
0);a.setAttribute(_$_7134[608],100);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h){return e?a.value:_$_7134[3]};return c}();k.rating=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){return c.setCell(d,e,l)};c.destroyCell=function(d){d.classList.remove(_$_7134[609])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_7134[221],d,e,h);a.type=_$_7134[14];a.setAttribute(_$_7134[607],0);a.setAttribute(_$_7134[608],
|
|
450
|
+
5);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,f,g,h,l){return e?a.value:_$_7134[3]};c.setCell=function(d,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(d){f=f&&f.color?f.color:_$_7134[582];var g=document.createElement(_$_7134[20]);g.setAttribute(_$_7134[268],parseInt(e)+_$_7134[610]);g.classList.add(_$_7134[260]);for(var h=0;h<e;h++){var l=document.createElement(_$_7134[445]);l.className=_$_7134[510];l.style.color=f;l.innerHTML=_$_7134[611];g.appendChild(l)}d.innerHTML=
|
|
451
|
+
_$_7134[3];d.className=_$_7134[609];d.appendChild(g)}return e};return c}();k.email=function(){var c={createCell:function(a,d,e,f,g,h){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_7134[564]?e=a.children[0]:(e=document.createElement(_$_7134[201]),a.innerText=_$_7134[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_7134[612],h.options.url)),e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_7134[560]);g.parent.input.onblur=
|
|
452
|
+
function(){g.closeEditor(a,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(a,d,e,f,g){g.parent.input.classList.remove(_$_7134[560]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,_$_7134[188]),_$_7134[3]):_$_7134[3]};return c}();k.url=k.email;k.image=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$_7134[613])d.children[0].src=e;else{var m=document.createElement(_$_7134[37]);
|
|
453
|
+
l.render==_$_7134[614]&&m.classList.add(_$_7134[614]);l.options&&(m.style.maxWidth=_$_7134[615],l.options.absolute&&(d.classList.add(_$_7134[616]),m.setAttribute(_$_7134[617],-1),m.classList.add(_$_7134[220]),m.classList.add(_$_7134[618]),m.settings=function(){h.openEditor(d,e,f,g,h,l)},m.dblclick=function(){h.openEditor(d,!0)},m[_$_7134[619]]=function(){h.setValueFromCoords(f,g,_$_7134[3])}),l.options.width&&(m.style.width=parseInt(l.options.width)+_$_7134[44]),l.options.height&&(m.style.height=
|
|
454
|
+
parseInt(l.options.height)+_$_7134[44]));m.src=e;d.innerHTML=_$_7134[3];d.appendChild(m)}else d.innerHTML=_$_7134[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_7134[37]),d.src=e,d.classList.add(_$_7134[620]),d.style.width=_$_7134[615],a.appendChild(d));jSuites.image(a,l)};c.closeEditor=function(d,e,f,g,h,l){if(e&&(d=a.children[0]))return d.tagName==_$_7134[613]?d.src:_$_7134[3]};c[_$_7134[51]]=
|
|
455
|
+
function(d,e){return _$_7134[621]+e+_$_7134[622]};return c}();k.html=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_7134[623]);var f=document.createElement(_$_7134[20]);f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_7134[623])};c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_7134[585];e=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(e,
|
|
456
|
+
m);a.close=function(){h.closeEditor(d,!0)};jSuites.tracking(a,!0)};c.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return c}();k.hidden=function(){return{createCell:function(c,a,d,e,f){c.style.display=_$_7134[40];c.innerText=a},updateCell:function(c,a,d,e,f){c&&(c.innerText=a)},openEditor:function(c,a,d,e,f){return!1},closeEditor:function(c,a){return!1}}}();k.tags=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_7134[624]);c.updateCell(d,
|
|
457
|
+
e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_7134[624])};c.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.value=e;a=k.createDialog(d,e,f,g,h,l);d=document.createElement(_$_7134[20]);d.style.margin=_$_7134[22];d.style.marginRight=_$_7134[625];a.appendChild(d);a=jSuites.tags(d,m);d.focus();jSuites.focus(d)};c.closeEditor=function(d,e,f,g,h,l){d=a.getValue();if(e)return d};return c}();k.record=function(){var c={},a=null;c.createCell=
|
|
458
|
+
function(d,e,f,g,h,l){d.classList.add(_$_7134[588]);var m;(m=h.parent.getWorksheetInstance(l.worksheetId))?m.rows?c.updateCell(d,e,f,g,h,l):(d.innerText=_$_7134[245],h.parent.queue.push([h,f,g])):(d.innerText=_$_7134[245],h.parent.queue.push([h,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_7134[588])};c.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_7134[13]?d.innerText=_$_7134[245]:d.innerHTML=c.getValue(d,e,f,g,h,l))};c.openEditor=function(d,e,f,g,h,l){var m=l.delimiter||
|
|
459
|
+
_$_7134[217];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_7134[84]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_7134[84]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;f.data=c.getSource(h,l);b(l,_$_7134[589])&&(f.multiple=!0);b(l,_$_7134[56])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};b(l,_$_7134[589])?e&&(f.value=(_$_7134[3]+e).split(m)):f.value=e;a=k.createEditor(_$_7134[20],d,e,h);a=jSuites.dropdown(a,
|
|
460
|
+
f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_7134[217];f=a.getValue(!0);a.close(!0);if(e)return f.join(d)};c.getValue=function(d,e,f,g,h,l){d=[];if(typeof l.worksheetId==_$_7134[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_7134[3]||0==e||null==e||void 0==e)return _$_7134[3];e=(_$_7134[3]+e).split(_$_7134[217]);for(g=0;g<e.length;g++){var m=e[g].trim();var p=h.name(f);m=h.getRowById(m);
|
|
461
|
+
p=!1===m?_$_7134[626]:m[p];0<=l.worksheetImage&&(p=_$_7134[627]+p+_$_7134[628]);d.push(p)}return 0<=l.worksheetImage?d.join(_$_7134[3]):d.join(_$_7134[298])}return _$_7134[245]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_7134[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(d=0;d<g.rows.length;d++)if(h=g.value(f,d))h={id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,d)),l.push(h)}else console.error(_$_7134[629]+
|
|
462
|
+
e.worksheetId);return l};c[_$_7134[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_7134[258]?d.source[f].color:d.render==_$_7134[590]?d.source[f].image:d.source[f].name};return c}();return k}();typeof jQuery!==_$_7134[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(b){var c=k(this)[_$_7134[51]](0);if(c.jspreadsheet){if(typeof arguments[0]==_$_7134[14])var a=arguments[0],d=2;else a=0,d=1;return c.jspreadsheet[a][b].apply(c.jspreadsheet[a],Array.prototype.slice.call(arguments,
|
|
463
|
+
d))}return t(k(this)[_$_7134[51]](0),arguments[0])}}(jQuery);return t});
|