jspreadsheet 8.3.3 → 8.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -3
- package/dist/index.js +396 -396
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,10 +19,10 @@ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(B){v
|
|
|
19
19
|
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(B,I,J){if(B==Array.prototype||B==Object.prototype)return B;B[I]=J.value;return B};$jscomp.getGlobal=function(B){B=["object"==typeof globalThis&&globalThis,B,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var I=0;I<B.length;++I){var J=B[I];if(J&&J.Math==Math)return J}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
|
20
20
|
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(B,I){var J=$jscomp.propertyToPolyfillSymbol[I];if(null==J)return B[I];J=B[J];return void 0!==J?J:B[I]};
|
|
21
21
|
$jscomp.polyfill=function(B,I,J,T){I&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(B,I,J,T):$jscomp.polyfillUnisolated(B,I,J,T))};$jscomp.polyfillUnisolated=function(B,I,J,T){J=$jscomp.global;B=B.split(".");for(T=0;T<B.length-1;T++){var O=B[T];if(!(O in J))return;J=J[O]}B=B[B.length-1];T=J[B];I=I(T);I!=T&&null!=I&&$jscomp.defineProperty(J,B,{configurable:!0,writable:!0,value:I})};
|
|
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
|
|
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 _$_5163=["use strict","{","}","","8.3.4","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
|
|
26
26
|
"none","status","data-x","data-y","px","X","goto","jss_scroll","jss_control","hidden","jss_freezed","get","colspan","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","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","persistence",
|
|
28
28
|
"?","?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,423 +40,423 @@ var _$_6e88=["use strict","{","}","","8.3.2","Base","https://jspreadsheet.com","
|
|
|
40
40
|
"ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","TABLE","Element is not a table","colgroup > col","data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV",
|
|
41
41
|
"data-current","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","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},
|
|
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 q=e[n]?e[n].charCodeAt(0):0;m+=String.fromCharCode(54^q);p+=String.fromCharCode(92^q)}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===_$_5163[83]&&typeof module!==_$_5163[13]?module.exports=I():typeof define===_$_5163[84]&&define.amd?define(I):B.jspreadsheet=B.jexcel=I()})(this,function(){_$_5163[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(_$_5163[1]+c+_$_5163[2],b[c]);return k},I=function(k,b){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_5163[3]).toUpperCase();if(void 0===b)return window[k]?window[k]:null;window[k]=b},J=function(){var k=
|
|
44
|
+
{version:_$_5163[4],edition:_$_5163[5],host:_$_5163[6],license:_$_5163[7],print:function(){return[_$_5163[8]+this.edition+_$_5163[9]+this.version+_$_5163[10]+this.host+_$_5163[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[_$_5163[11]].call(this,c))},O=function(k){return(_$_5163[3]+k).substr(0,1)===_$_5163[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===_$_5163[13]?c=typeof d===_$_5163[14]?a[k]:jSuites.path.call(a,_$_5163[3]+d):(typeof d===_$_5163[14]?a[k]=c:jSuites.path.call(a,_$_5163[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=_$_5163[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===_$_5163[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=_$_5163[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==_$_5163[16]?!0:!1);b.style.display=k?_$_5163[16]:_$_5163[3];setTimeout(function(){b.style.display=_$_5163[3]},1E3)},Ga=function(k,
|
|
47
|
+
b){if(typeof k===_$_5163[17]){var c=E.getCoordsFromColumnName(k);c=this.records[c[1]][c[0]];if(c.element)k=c.element;else return typeof b===_$_5163[13]?c.readonly:c.readonly=b?!0:!1}c=_$_5163[18];k=k.classList;if(typeof b===_$_5163[13])return k.contains(c)?!0:!1;b?k.add(c):k.remove(c)},xa=function(k){var b=_$_5163[19],c=this.table.classList;if(typeof k==_$_5163[13])return c.contains(b)?!1:!0;k?c.remove(b):c.add(b);0<this.options.freezeColumns&&ka[_$_5163[11]].call(this,this.options.freezeColumns);
|
|
48
|
+
this.refreshBorders()},Ja=function(k){if(void 0===k)return this.status;var b=document.createElement(_$_5163[20]);b.style.textAlign=_$_5163[21];b.style.fontSize=_$_5163[22];b.style.cursor=_$_5163[23];b.onclick=function(){window.location.href=J().host+_$_5163[24]};var c=null,a=[74,50,48,50,48,33].join(_$_5163[3]);(function(e){c=1;try{if(e){var f=window.atob(e);f=f.split(_$_5163[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=a;var h=f[1],l=jSuites.sha512,m=_$_5163[3],p=_$_5163[3];128<e.length&&(e=
|
|
49
|
+
l(e));for(var n=0;128>n;n++){var q=e[n]?e[n].charCodeAt(0):0;m+=String.fromCharCode(54^q);p+=String.fromCharCode(92^q)}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||_$_5163[26],y=u.split(_$_5163[27]);u=u.split(_$_5163[27]);2<u.length&&!jSuites.isNumeric(u[u.length-1])&&y.shift();y=y.join(_$_5163[27]);u=u.join(_$_5163[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(_$_5163[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+_$_5163[29]):(c=8,w.license=_$_5163[30]+f[1].name,w.edition=3==f[1].plan||6==f[1].plan?_$_5163[31]:_$_5163[5])}else c=5}else c=4}else c=2}}catch(C){}})(k);k=_$_5163[3];if(1==c)k=_$_5163[32];else if(2==c||3==c||4==c)k=_$_5163[33];else if(5==c)k=_$_5163[34];else if(6==c||7==c)k=_$_5163[35];b.appendChild(document.createTextNode(k));if(8>c)try{if(typeof sessionStorage!==
|
|
51
|
+
_$_5163[13]&&!sessionStorage.getItem(_$_5163[36])){sessionStorage.setItem(_$_5163[36],!0);var d=document.createElement(_$_5163[37]);d.src=J().host+_$_5163[38]+_$_5163[39];d.style.display=_$_5163[40];b.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_5163[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});J().edition===_$_5163[31]&&(this.edition=1);return b},U=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_5163[42]),e=this.edition.getAttribute(_$_5163[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(_$_5163[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+_$_5163[44];this.scrollY.firstChild.style.height=this.height+_$_5163[44];this.scrollX.style.width=e+_$_5163[44];this.scrollY.style.height=f+_$_5163[44];this.scrollX.style.display=this.width>e?_$_5163[3]:_$_5163[40];this.scrollY.style.display=this.height>f&&!this.options.pagination?_$_5163[3]:_$_5163[40]}else this.scrollX.style.display=_$_5163[40],this.scrollY.style.display=_$_5163[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(_$_5163[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(_$_5163[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==_$_5163[45]?(d=a.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),H.reset.call(this),H[_$_5163[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=_$_5163[3],H[_$_5163[46]].call(this,d),c.call(this))};a.build=function(d){var e=this,f=document.createElement(_$_5163[20]),g=document.createElement(_$_5163[20]);
|
|
57
|
+
f.className=_$_5163[47]+d;g.className=_$_5163[48]+d;f.appendChild(g);d==_$_5163[45]?f.style.height=_$_5163[22]:f.style.width=_$_5163[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!==_$_5163[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-q+3,U.ignore=!0,this.scrollY.scrollTop+=h-q+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(_$_5163[42]),h=c.getAttribute(_$_5163[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 q=h.top+h.height;var v=0;h=l.top;h>=g&&h<=q||(v++,e=!0);h=l.top+l.height;h>=g&&h<=q||v++;if(v>=a)return 2>a&&(a=this.content.scrollTop,0==e?q-g>l.height&&
|
|
60
|
+
(this.content.scrollTop+=h-q+3,U.ignore=!0,this.scrollY.scrollTop+=h-q+3):(this.content.scrollTop=c.offsetTop-d,U.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!m||!c.classList.contains(_$_5163[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(_$_5163[42]))+1,a=parseInt(this.tbody.lastChild.getAttribute(_$_5163[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!==_$_5163[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(_$_5163[42]));h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$_5163[42])):l;var m=this.results?this.results.indexOf(c):c,p=parseInt(this.options.pagination)||0,n=this.tbody.children.length||0,q=!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,q=!0),g+=this.rows[c].height):(g=(q=v.offsetHeight)?g+(this.rows[c].height=q):g+(this.options.defaultRowHeight||23),q=!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);q&&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(_$_5163[43])),(e=M[_$_5163[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(_$_5163[42])));null==d&&(d=parseInt(this.headerContainer.lastChild.getAttribute(_$_5163[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[_$_5163[51]].call(this,h,c));ka.update.call(this,c)}for(h=a;h<=d;h++)a=M[_$_5163[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=_$_5163[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[_$_5163[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=_$_5163[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(_$_5163[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=_$_5163[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.lastChild.getAttribute(_$_5163[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(_$_5163[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=_$_5163[3];else{e=c;if(this.options.mergeCells){var g=parseInt(this.tbody.firstChild.getAttribute(_$_5163[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(_$_5163[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(_$_5163[52]);0<m&&m--;0<m?l.setAttribute(_$_5163[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
|
-
f=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$
|
|
80
|
-
this.tbody.children[c].children[d],2)||a.push(d);a.length&&b.removeColumns.call(this,a.length,a[0])}};b.adjustY=function(c,a){if(c)var d=this.rows.length-1,e=parseInt(this.tbody.lastChild.getAttribute(_$
|
|
81
|
-
b.renderY.call(this,f,c));if(!0===a){c=[];for(a=0;a<this.tbody.children.length;a++)this.tbody.children[a].style.display!==_$
|
|
82
|
-
_$
|
|
83
|
-
_$
|
|
84
|
-
d))):
|
|
85
|
-
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(_$_5163[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(_$_5163[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(_$_5163[42]))};b.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_5163[43]))};b.adjustX=function(c,a){var d=this.options.freezeColumns||0;if(c)var e=this.options.columns.length-1,
|
|
79
|
+
f=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_5163[42])),g=parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_5163[42]));else e=d,f=parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_5163[42])),g=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_5163[42]));f===e&&(c?g--:g++,b.renderX.call(this,g,c));if(!0===a){for(c=0;c<this.tbody.children.length&&this.tbody.children[c].style.display===_$_5163[40];c++);a=[];for(d+=1;d<this.thead.lastChild.children.length;d++)k.call(this,
|
|
80
|
+
this.tbody.children[c].children[d],2)||a.push(d);a.length&&b.removeColumns.call(this,a.length,a[0])}};b.adjustY=function(c,a){if(c)var d=this.rows.length-1,e=parseInt(this.tbody.lastChild.getAttribute(_$_5163[43])),f=parseInt(this.tbody.firstChild.getAttribute(_$_5163[43]));else d=0,e=parseInt(this.tbody.firstChild.getAttribute(_$_5163[43])),f=parseInt(this.tbody.lastChild.getAttribute(_$_5163[43]));e==d&&(this.results?(d=this.results.indexOf(f),f=c?this.results[d-1]:this.results[d+1]):c?f--:f++,
|
|
81
|
+
b.renderY.call(this,f,c));if(!0===a){c=[];for(a=0;a<this.tbody.children.length;a++)this.tbody.children[a].style.display!==_$_5163[40]&&this.tbody.children[a].children[1]&&(k.call(this,this.tbody.children[a].children[1],2)||c.push(this.tbody.children[a].firstChild.getAttribute(_$_5163[43])));if(c.length)for(a=0;a<c.length;a++)this.rows[c[a]].element.remove()}};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
|
+
_$_5163[49]){f=this.records[b]&&this.records[b][k].v===_$_5163[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_5163[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&&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!==_$_5163[49]){f=this.records[b]&&this.records[b][k].v===
|
|
83
|
+
_$_5163[3]?!1:!0;null===g&&(g=f);if(this.records[b]&&this.records[b][k].element&&this.records[b][k].element.style.display==_$_5163[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=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[_$_5163[46]].call(this,
|
|
84
|
+
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[_$_5163[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]),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<
|
|
85
|
+
h;){h--;var p=this.results?this.results[h]:h;if(!1!==this.rows[p].visible){var n=this.records[p][g].v===_$_5163[3]?!1:!0;null===m&&(m=n);if(this.records[p][g].element&&this.records[p][g].element.style.display==_$_5163[40]){if(this.records[p][g].merged){l=p-this.records[p][g].merged[1];if(!a)break;n=!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,
|
|
86
86
|
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);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 q=this.records[n][g].v===
|
|
87
|
-
_$
|
|
87
|
+
_$_5163[3]?!1:!0;null===m&&(m=q);if(this.records[n][g].element&&this.records[n][g].element.style.display==_$_5163[40]){if(this.records[n][g].merged){if(!this.records[n][g].merged[1]&&(l=n,!a))break;q=!0}}else if(a&&q!==m&&!d){d=l;break a}else if(a)l=n;else{d=n;break a}m=q}}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,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]);
|
|
88
88
|
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]),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=
|
|
89
|
-
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=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
|
-
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=_$
|
|
91
|
-
this.options.tableHeight);this.tbody.innerHTML=_$
|
|
92
|
-
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:_$
|
|
93
|
-
filters:!1,footers:null,validations:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1},b={application:_$
|
|
89
|
+
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=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[_$_5163[46]]=H[_$_5163[46]];
|
|
90
|
+
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=_$_5163[49];100<b&&(this.options.tableWidth=b+_$_5163[44],this.content.style.maxWidth=this.options.tableWidth);100<c&&(this.options.tableHeight=parseInt(c)+_$_5163[44],this.content.style.maxHeight=
|
|
91
|
+
this.options.tableHeight);this.tbody.innerHTML=_$_5163[3];H.call(this);U.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,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_5163[36],csvHeaders:!0,csvDelimiter:_$_5163[25],columnSorting:!0,columnDrag:!0,columnResize:!0,
|
|
92
|
+
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:_$_5163[53],tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_5163[3],worksheetName:null,worksheetState:null,
|
|
93
|
+
filters:!1,footers:null,validations:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1},b={application:_$_5163[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,parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,
|
|
94
94
|
allowRenameWorksheet:!0,allowMoveWorksheet:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresizerow:null,onresizecolumn:null,onselection:null,onbeforecomments:null,
|
|
95
95
|
oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,
|
|
96
|
-
onsearch:null,onbeforefilter:null,onfilter: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},c=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$
|
|
97
|
-
this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$
|
|
98
|
-
_$
|
|
99
|
-
_$
|
|
100
|
-
method:_$
|
|
101
|
-
g)}}):a.call(f)};d[_$
|
|
102
|
-
(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,_$
|
|
103
|
-
this.history[this.historyIndex--];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();
|
|
104
|
-
b.
|
|
105
|
-
_$
|
|
106
|
-
_$
|
|
107
|
-
b.numOfRows);else if(b.action==_$
|
|
108
|
-
else if(b.action==_$
|
|
109
|
-
b.action==_$
|
|
110
|
-
(this.plugins[e]=f.call(t,this,g,this.config),typeof f.license==_$
|
|
111
|
-
e.length;a++)if(typeof d[e[a]][b]==_$
|
|
112
|
-
e=parseInt(b.getAttribute(_$
|
|
113
|
-
this,b,d,e);c=1==c?_$
|
|
114
|
-
f),b=document.createTextNode(_$
|
|
115
|
-
null;typeof a[0].closeEditor==_$
|
|
116
|
-
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?e.style.opacity=_$
|
|
117
|
-
0))}};k.build=function(b){b.input||(b.input=document.createElement(_$
|
|
118
|
-
this.config.onevent.apply(this,arguments);typeof c!==_$
|
|
119
|
-
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;var c=this.getPrimaryKey();if(!1!==c)return
|
|
120
|
-
F.call(this.parent,_$
|
|
121
|
-
l})},b=function(c){var a=c[0];if(0<=[_$
|
|
122
|
-
data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$
|
|
123
|
-
_$
|
|
124
|
-
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]&&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.cursor=k?this.records[c][b].element:null);for(k=d;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$
|
|
126
|
-
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];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
|
-
function(){this.selectedCell&&k[_$
|
|
128
|
-
if(parseInt(c)<parseInt(d))var m=parseInt(c),p=parseInt(d);else m=parseInt(d),p=parseInt(c);var n;var q={};if(this.options.mergeCells){for(var v=m;v<=p;v++)for(var u=h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),q[n]=!0;v=Object.keys(q);if(v.length)for(u=0;u<v.length;u++)n=E.getCoordsFromColumnName(v[u]),q=this.options.mergeCells[v[u]],n[0]<h&&(h=n[0]),n[0]+q[0]-1>l&&(l=n[0]+q[0]-1),n[1]<m&&(m=n[1]),n[1]+q[1]-1>p&&(p=n[1]+q[1]-1)}}f==_$
|
|
129
|
-
(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,c),0==n&&F.call(this.parent,_$
|
|
130
|
-
c=c.getAttribute(_$
|
|
131
|
-
_$
|
|
132
|
-
g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$
|
|
133
|
-
0,v=!1,u=null,y=null,w=null,C=null;this.tbody.firstChild&&(y=parseInt(this.tbody.firstChild.getAttribute(_$
|
|
134
|
-
w,C)));null==u||e<u&&a>=q||a>w||f<y||d>C||(h?l.element.style.borderLeftColor=l.color?l.color:_$
|
|
135
|
-
g==_$
|
|
136
|
-
(l.element.style.borderLeftWidth=_$
|
|
137
|
-
l.element.style.width=m+_$
|
|
138
|
-
a,d,e,f,g,h);g==_$
|
|
139
|
-
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,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
|
-
this.thead.insertBefore(a,this.thead.firstChild),b=document.createElement(_$
|
|
141
|
-
b.target.getAttribute(_$
|
|
142
|
-
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(_$
|
|
143
|
-
b&&(this.rows[k.event.y].element.style.height=k.event.h+b+_$
|
|
144
|
-
else{k.event={x:b,d:b};this.headers[b].classList.add(_$
|
|
145
|
-
_$
|
|
146
|
-
null;k.end.call(this)},update:function(b){var c=b.target.getAttribute(_$
|
|
147
|
-
this)){this.resetSelection();var c=this.parent.helper;if(null!==b.target.getAttribute(_$
|
|
148
|
-
this.content.offsetWidth-50+_$
|
|
149
|
-
a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$
|
|
150
|
-
this.options.columns.length-1,k.event.d)),this.parent.helper.classList.remove(_$
|
|
151
|
-
_$
|
|
152
|
-
(d?c.top:c.bottom)-a.top+_$
|
|
153
|
-
k[_$
|
|
154
|
-
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!==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
|
-
_$
|
|
156
|
-
m,p,n);else{e=E.getCoordsFromColumnName(m);for(var q=e[1];q<e[1]+n;q++)for(var v=e[0];v<e[0]+p;v++)b=E.getColumnNameFromCoords(v,q),(d=this.merged.cells[b])&&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);
|
|
157
|
-
_$
|
|
158
|
-
(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:_$
|
|
159
|
-
1<d?a.setAttribute(_$
|
|
160
|
-
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];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(_$
|
|
96
|
+
onsearch:null,onbeforefilter:null,onfilter: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},c=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$_5163[17]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=
|
|
97
|
+
this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_5163[13]){var f=this.options.data[0].data&&0<Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=
|
|
98
|
+
_$_5163[55]):this.options.columns[g]={type:_$_5163[55]},this.options.columns[g].type==_$_5163[56]&&(this.options.columns[g].type=_$_5163[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),this.options.columns[g].type!=_$_5163[57]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==
|
|
99
|
+
_$_5163[57]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_5163[58],dataType:_$_5163[59],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=d[_$_5163[51]];e.setConfig=d[_$_5163[11]]};d.spreadsheet=function(e){this.config=c(e,b);1!=this.config.secureFormulas&&console.log(_$_5163[60])};d.worksheet=function(e){var f=this;f.options=c(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,
|
|
100
|
+
method:_$_5163[58],dataType:_$_5163[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:_$_5163[55],width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_5163[13]&&(f.options.columns[l].title=h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_5163[58],dataType:_$_5163[59],group:f.parent.name,success:function(g){a.call(f,
|
|
101
|
+
g)}}):a.call(f)};d[_$_5163[51]]=function(){return this.options};d[_$_5163[11]]=function(e){typeof e==_$_5163[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_5163[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):!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]&&
|
|
102
|
+
(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,_$_5163[61],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof b[f[g]]!==_$_5163[13]&&(this.config[f[g]]=e[f[g]])};return d}(),V=function(k){k=function(b){if(1!=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=
|
|
103
|
+
this.history[this.historyIndex--];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_5163[62])c.deleteRow(b.insertBefore?b.rowNumber:b.rowNumber+1,b.numOfRows);else if(b.action==_$_5163[63])c.insertRow(b.numOfRows,b.rowNumber,1,b.data),M.setAttributes.call(c,b.attributes);else if(b.action==_$_5163[64])c.deleteColumn(b.insertBefore?b.columnNumber:b.columnNumber+1,b.numOfColumns);else if(b.action==_$_5163[65])c.insertColumn(b.numOfColumns,b.columnNumber,1,b.properties,b.data,
|
|
104
|
+
b.extra),M.setAttributes.call(c,b.attributes);else if(b.action==_$_5163[66])c.moveRow(b.newValue,b.oldValue);else if(b.action==_$_5163[67])c.moveColumn(b.newValue,b.oldValue);else if(b.action==_$_5163[68])c.removeMerge(b.newValue,!0),c.setMerge(b.oldValue);else if(b.action==_$_5163[69])c.setMerge(b.oldValue);else if(b.action==_$_5163[70])c.setStyle(b.oldValue,null,null,1);else if(b.action==_$_5163[71])c.setStyle(b.oldValue);else if(b.action==_$_5163[72])c.setWidth(b.column,b.oldValue);else if(b.action==
|
|
105
|
+
_$_5163[73])c.setHeight(b.row,b.oldValue);else if(b.action==_$_5163[74])c.setHeader(b.column,b.oldValue);else if(b.action==_$_5163[75])c.setComments(b.oldValue);else if(b.action==_$_5163[76])c.orderBy(b.column,b.direction?0:1,b.oldValue);else if(b.action==_$_5163[77]||b.action==_$_5163[78]){var a=[];for(var d=0;d<b.records.length;d++){var e={x:b.records[d].x,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
|
+
_$_5163[79]?c.renameWorksheet(b.index,b.oldValue):b.action==_$_5163[80]&&c.moveWorksheet(b.t,b.f);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_5163[81],c,b)}};k.redo=function(){if(this.historyIndex<this.history.length-1)var b=this.history[++this.historyIndex];if(b){this.ignoreHistory=!0;var c=b.worksheet;c.openWorksheet();if(b.action==_$_5163[62])c.insertRow(b.numOfRows,b.rowNumber,b.insertBefore,b.data);else if(b.action==_$_5163[63])c.deleteRow(b.rowNumber,
|
|
107
|
+
b.numOfRows);else if(b.action==_$_5163[64])c.insertColumn(b.numOfColumns,b.columnNumber,b.insertBefore,b.properties,b.data);else if(b.action==_$_5163[65])c.deleteColumn(b.columnNumber,b.numOfColumns);else if(b.action==_$_5163[66])c.moveRow(b.oldValue,b.newValue);else if(b.action==_$_5163[67])c.moveColumn(b.oldValue,b.newValue);else if(b.action==_$_5163[68])c.setMerge(b.newValue);else if(b.action==_$_5163[69])c.removeMerge(b.newValue);else if(b.action==_$_5163[70])c.setStyle(b.newValue,null,null,1);
|
|
108
|
+
else if(b.action==_$_5163[71])c.resetStyle(b.cells);else if(b.action==_$_5163[72])c.setWidth(b.column,b.newValue);else if(b.action==_$_5163[73])c.setHeight(b.row,b.newValue);else if(b.action==_$_5163[74])c.setHeader(b.column,b.newValue);else if(b.action==_$_5163[75])c.setComments(b.newValue);else if(b.action==_$_5163[76])c.orderBy(b.column,b.direction,b.newValue);else if(b.action==_$_5163[77]||b.action==_$_5163[78])c[b.action](b.records);else b.action==_$_5163[79]?c.renameWorksheet(b.index,b.newValue):
|
|
109
|
+
b.action==_$_5163[80]&&c.moveWorksheet(b.f,b.t);b.selection&&c.updateSelectionFromCoords(b.selection);this.ignoreHistory=!1;F.call(this,_$_5163[82],c,b)}};return k}(),pa=function(){var k=function(b){var c=null;if(Array.isArray(b))c=b;else if(typeof b==_$_5163[83]){c=[];var a=Object.keys(b);for(var d=0;d<a.length;d++)c.push({name:a[d],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===_$_5163[84]&&
|
|
110
|
+
(this.plugins[e]=f.call(t,this,g,this.config),typeof f.license==_$_5163[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]==_$_5163[84]){var e=this.plugins[a[d]][b].apply(this.plugins[a[d]],c);e&&(b==_$_5163[85]&&(c[4]=e),b==_$_5163[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<
|
|
111
|
+
e.length;a++)if(typeof d[e[a]][b]==_$_5163[84]){var f=d[e[a]][b].apply(d[e[a]],arguments);typeof f!==_$_5163[13]&&(c=f)}}return c}}(_$_5163[87]);return k}(),da=function(){var k=function(b){b.getEditor=k[_$_5163[51]];b.openEditor=k.open;b.closeEditor=k.close};k[_$_5163[51]]=function(b,c){b=Ha[_$_5163[51]].call(this,b,c);return[b.type&&typeof b.type==_$_5163[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(_$_5163[18])){var d=parseInt(b.getAttribute(_$_5163[42])),
|
|
112
|
+
e=parseInt(b.getAttribute(_$_5163[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,e)){if(this.results&&0<this.results.length)return console.error(_$_5163[88]),!1;H[_$_5163[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;f.innerText=_$_5163[3];F.call(this.parent,_$_5163[89],
|
|
113
|
+
this,b,d,e);c=1==c?_$_5163[3]:L.call(this,d,e);var g=k[_$_5163[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_5163[84]&&(!1===g[0].openEditor(b,c,d,e,this,g[1],a)?h=!1:F.call(this.parent,_$_5163[90],this,b,d,e,f,g[1]));h&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_5163[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_5163[49])),this.edition=b,f.classList.add(_$_5163[91]),1==this.parent.config.editorFormulas&&O(c)&&(f.classList.add(_$_5163[92]),la.parse.call(this,
|
|
114
|
+
f),b=document.createTextNode(_$_5163[3]),f.appendChild(b),jSuites.focus(f)))}};k.close=function(b,c){null===b&&(b=this.edition);this.parent.input.classList.contains(_$_5163[92])&&la.close.call(this,this.parent.input);var a,d=parseInt(b.getAttribute(_$_5163[42])),e=parseInt(b.getAttribute(_$_5163[43]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&a.element.innerText==_$_5163[3]&&(this.records[e][d].element.style.overflow=_$_5163[3]);a=k[_$_5163[51]].call(this,d,e);if(1==c){var f=
|
|
115
|
+
null;typeof a[0].closeEditor==_$_5163[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,_$_5163[93],this,b,d,e,f,c);a=this.parent.input;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(_$_5163[94]);a.removeAttribute(_$_5163[95]);a.removeAttribute(_$_5163[96]);this.edition=
|
|
116
|
+
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?e.style.opacity=_$_5163[97]:(e.setAttribute(_$_5163[98],_$_5163[3]),b=a.top-d.top+1,c=a.left-d.left+1,e.style.top=b+_$_5163[44],e.style.left=c+_$_5163[44],e.style.minWidth=a.width-1+_$_5163[44],e.style.minHeight=a.height-1+_$_5163[44],setTimeout(function(){e.focus()},
|
|
117
|
+
0))}};k.build=function(b){b.input||(b.input=document.createElement(_$_5163[20]));b.input.className=_$_5163[99];b.input.setAttribute(_$_5163[100],!0);b.input.innerText=_$_5163[3];b.input.oninput=function(c){1==t.current.parent.config.editorFormulas&&(O(c.target.innerText)?c.target.classList.add(_$_5163[92]):c.target.classList.contains(_$_5163[92])&&la.close.call(t.current,this))};return b.input};return k}(),F=function(k){var b;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_5163[84]){var c=
|
|
118
|
+
this.config.onevent.apply(this,arguments);typeof c!==_$_5163[13]&&(b=c)}typeof this.config[k]==_$_5163[84]&&(c=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==_$_5163[13]&&(b=c));c=pa.onevent.apply(this,arguments);typeof c!==_$_5163[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[_$_5163[51]]=function(){return this.sequence};k[_$_5163[11]]=function(b,c){if(b>
|
|
119
|
+
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;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[_$_5163[11]].call(this,c);K.call(this,_$_5163[101],[a]);
|
|
120
|
+
F.call(this.parent,_$_5163[102],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=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!=
|
|
121
|
+
l})},b=function(c){var a=c[0];if(0<=[_$_5163[103],_$_5163[104],_$_5163[101],_$_5163[105]].indexOf(a))return!1;var d={};a==_$_5163[77]||a==_$_5163[106]?(a=_$_5163[107],d[a]=k.call(this,c[1].data)):Array.isArray(c[1])&&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,_$_5163[108],f,g,a))a=h;else if(!1===h)return!1;La.call(f,!0);jSuites.ajax({url:c,method:_$_5163[109],dataType:_$_5163[59],
|
|
122
|
+
data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_5163[110],_$_5163[111]+d)},success:function(l){f.element.classList.contains(_$_5163[112])&&f.element.classList.remove(_$_5163[112]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_5163[113]+l.message):jSuites.notification(l)),l.success?typeof e===_$_5163[84]?e(l):l.data&&Array.isArray(l.data)&&M.updateAll.call(g,l.data):l.error&&(alert(_$_5163[114]),window.open(window.location.href,
|
|
123
|
+
_$_5163[115])));F.call(f,_$_5163[116],f,g,a,l)},error:function(){f.element.classList.add(_$_5163[112])}})}}(),K=function(){return function(){pa.execute.call(this.parent,_$_5163[117],[this,arguments[0],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(_$_5163[118])?k+(_$_5163[119]+b):k+(_$_5163[120]+b)}else this.options.persistence&&(k=typeof this.options.persistence==_$_5163[17]?
|
|
124
|
+
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]&&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?_$_5163[121]:_$_5163[122];this.records[c]&&this.records[c][b]&&this.records[c][b].element&&(this.records[c][b].element.classList[g](_$_5163[123]),
|
|
125
|
+
this.cursor=k?this.records[c][b].element:null);for(k=d;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$_5163[124]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[g](_$_5163[124])}},ya=function(){var k=function(b){b.resetSelection=k.reset;b.updateSelection=k.fromElements;b.updateSelectionFromCoords=k[_$_5163[11]];b.selectAll=k.all;b.isSelected=k.isSelected;b.getHighlighted=k.getHighlighted;b.getRange=k.getRange};k.getHighlighted=function(){var b=this.borders;
|
|
126
|
+
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];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(_$_5163[125],!0),this.resetBorders(_$_5163[126],!0),this.selectedCell=null,1==b&&F.call(this.parent,_$_5163[127],this);else var b=0;return b};k.refresh=
|
|
127
|
+
function(){this.selectedCell&&k[_$_5163[11]].call(this,this.selectedCell)};k.isValid=function(b,c,a,d){return!(b>=this.options.columns.length||c>=this.rows.length||a>=this.options.columns.length||d>=this.rows.length)};k[_$_5163[11]]=function(b,c,a,d,e,f,g){f||(f=_$_5163[125]);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);
|
|
128
|
+
if(parseInt(c)<parseInt(d))var m=parseInt(c),p=parseInt(d);else m=parseInt(d),p=parseInt(c);var n;var q={};if(this.options.mergeCells){for(var v=m;v<=p;v++)for(var u=h;u<=l;u++)if(n=this.records[v][u].merged)n=E.getColumnNameFromCoords(u-n[0],v-n[1]),q[n]=!0;v=Object.keys(q);if(v.length)for(u=0;u<v.length;u++)n=E.getCoordsFromColumnName(v[u]),q=this.options.mergeCells[v[u]],n[0]<h&&(h=n[0]),n[0]+q[0]-1>l&&(l=n[0]+q[0]-1),n[1]<m&&(m=n[1]),n[1]+q[1]-1>p&&(p=n[1]+q[1]-1)}}f==_$_5163[125]&&(this.selectedCell?
|
|
129
|
+
(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,c),0==n&&F.call(this.parent,_$_5163[128],this));ha[_$_5163[11]].call(this,h,m,l,p,f,g);f==_$_5163[125]&&(F.call(this.parent,_$_5163[129],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(_$_5163[42]);b=b.getAttribute(_$_5163[43]);if(c){var e=c.getAttribute(_$_5163[42]);
|
|
130
|
+
c=c.getAttribute(_$_5163[43])}else e=d,c=b;this.updateSelectionFromCoords(d,b,e,c,a)};k.all=function(){k[_$_5163[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};k.getRange=function(){var b=this.selectedCell;if(!b)return _$_5163[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(_$_5163[130])?_$_5163[131]+a+_$_5163[132]:a+_$_5163[133];return c==b?a+c:a+t.helpers.getRangeFromTokens(t.helpers.getTokensFromRange(c+
|
|
131
|
+
_$_5163[134]+b))};return k}(),ha=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_5163[11]];a.getBorder=k[_$_5163[51]];a.resetBorders=k.reset;a.refreshBorders=k.refresh};k[_$_5163[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(_$_5163[20]);l.element.classList.add(_$_5163[135]);g==_$_5163[126]||g==_$_5163[136]||g==_$_5163[125]?l.element.classList.add(_$_5163[137]+
|
|
132
|
+
g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_5163[138],l.element.style.borderColor=h);this.content.appendChild(l.element)}l.x1=a;l.y1=d;l.x2=e;l.y2=f;h=this.headers[a]?this.headers[a].offsetLeft:0;var 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=_$_5163[139];l.element.style.left=_$_5163[139];l.active=0;var q=this.options.freezeColumns||
|
|
133
|
+
0,v=!1,u=null,y=null,w=null,C=null;this.tbody.firstChild&&(y=parseInt(this.tbody.firstChild.getAttribute(_$_5163[43])),C=parseInt(this.tbody.lastChild.getAttribute(_$_5163[43])));this.thead.lastChild&&(u=parseInt(this.thead.lastChild.children[q+1].getAttribute(_$_5163[42])),w=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_5163[42])),this.thead.lastChild.children[1].style.display==_$_5163[40]&&(u=Ma.call(this,u,y)),this.thead.lastChild.lastChild.style.display==_$_5163[40]&&(w=Na.call(this,
|
|
134
|
+
w,C)));null==u||e<u&&a>=q||a>w||f<y||d>C||(h?l.element.style.borderLeftColor=l.color?l.color:_$_5163[3]:(h=this.thead.lastChild.children[q+1].offsetLeft,l.element.style.borderLeftColor=g==_$_5163[126]?_$_5163[140]:_$_5163[141]),m?(m+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_5163[3]):(e>w?(m=this.headers[w].offsetLeft+this.headers[w].offsetWidth,v=!0):m=this.thead.lastChild.children[q].offsetLeft+this.thead.lastChild.children[q].offsetWidth,l.element.style.borderRightColor=
|
|
135
|
+
g==_$_5163[126]?_$_5163[140]:_$_5163[141]),m=m-h-1,p?l.element.style.borderTopColor=l.color?l.color:_$_5163[3]:(p=this.tbody.firstChild.offsetTop,l.element.style.borderTopColor=g==_$_5163[126]?_$_5163[140]:_$_5163[141]),n?(n+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_5163[3]):(n=this.rows[C].element.offsetTop+this.rows[C].element.offsetHeight,l.element.style.borderBottomColor=g==_$_5163[126]?_$_5163[140]:_$_5163[141],v=!0),n=n-p-1,this.options.freezeColumns&&
|
|
136
|
+
(l.element.style.borderLeftWidth=_$_5163[3],l.element.style.borderRightWidth=_$_5163[3],d=0<this.content.scrollLeft?ka.getWidth.call(this):0)&&(a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||!a&&e||(a&&!e?(e=d+this.content.scrollLeft,e>h+m&&(l.element.style.borderRightWidth=_$_5163[142],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=_$_5163[142]))))),l.element.style.top=p+_$_5163[44],l.element.style.left=h+_$_5163[44],
|
|
137
|
+
l.element.style.width=m+_$_5163[44],l.element.style.height=n+_$_5163[44],l.t=p,l.l=h,l.w=m,l.h=n,l.active=1);g==_$_5163[125]&&(l.active&&1!=v?(this.corner.style.top=p+n-2+_$_5163[44],this.corner.style.left=h+m-2+_$_5163[44]):(this.corner.style.top=_$_5163[139],this.corner.style.left=_$_5163[139]));this.borders[g]=l},c=function(a,d){a.element.style.top=_$_5163[139];a.element.style.left=_$_5163[139];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_5163[11]]=function(a,d,e,f,g,h){b.call(this,
|
|
138
|
+
a,d,e,f,g,h);g==_$_5163[125]&&(Ea.call(this,!0),K.call(this,_$_5163[103],{x1:a,y1:d,x2:e,y2:f}))};k.reset=function(a,d){a&&a!=_$_5163[125]||(this.corner.style.top=_$_5163[139],this.corner.style.left=_$_5163[139],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!=_$_5163[125]||K.call(this,_$_5163[104])};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,
|
|
139
|
+
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,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[_$_5163[11]];b.unsetGroup=k.unset};k[_$_5163[11]]=function(b,c,a){0==b&&(a=document.createElement(_$_5163[143]),a.classList.add(_$_5163[144]),
|
|
140
|
+
this.thead.insertBefore(a,this.thead.firstChild),b=document.createElement(_$_5163[145]),b.innerHTML=_$_5163[146],a.appendChild(b),b=document.createElement(_$_5163[145]),a.appendChild(b),c=this.headers[c])&&(c=c.querySelector(_$_5163[147]),c||(c=document.createElement(_$_5163[20]),c.classList.add(_$_5163[148]),c.innerText=_$_5163[149],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(_$_5163[43])){var c=
|
|
141
|
+
b.target.getAttribute(_$_5163[43]);k.event={y:parseInt(c),h:b.target.offsetHeight,p:b.pageY}}else null!==b.target.getAttribute(_$_5163[42])&&(c=b.target.getAttribute(_$_5163[42]),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));
|
|
142
|
+
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(_$_5163[150]));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+
|
|
143
|
+
b&&(this.rows[k.event.y].element.style.height=k.event.h+b+_$_5163[44],this.refreshBorders())):null!=k.event.x&&(b=b.pageX-k.event.p,0<k.event.w+b&&(this.colgroup[k.event.x].setAttribute(_$_5163[150],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(_$_5163[42]));if(this.merged.cols[b])console.error(_$_5163[151]);
|
|
144
|
+
else{k.event={x:b,d:b};this.headers[b].classList.add(_$_5163[152]);for(var a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_5163[43]);this.records[d][b].element.classList.add(_$_5163[152])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_5163[16];c.style.top=d.top-a.top+_$_5163[44];c.style.left=b.left-d.left+_$_5163[44];c.style.width=_$_5163[153];c.style.height=d.height+
|
|
145
|
+
_$_5163[44];c.classList.add(_$_5163[154])}},end:function(){this.headers[k.event.x].classList.remove(_$_5163[152]);for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$_5163[43]);this.records[c][k.event.x].element.classList.remove(_$_5163[152])}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(_$_5163[154]);this.parent.helper.style.display=_$_5163[3];k.event=null},cancel:function(){k.event.d=
|
|
146
|
+
null;k.end.call(this)},update:function(b){var c=b.target.getAttribute(_$_5163[42]);if(null!=c)if(c=parseInt(c),this.merged.cols[c])console.error(_$_5163[151]);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+_$_5163[44]}}};return k}(),ra=function(){var k={start:function(b){if(R.call(this.parent,
|
|
147
|
+
this)){this.resetSelection();var c=this.parent.helper;if(null!==b.target.getAttribute(_$_5163[43])){var a=parseInt(b.target.getAttribute(_$_5163[43]));this.merged.rows[a]?console.error(_$_5163[155]):this.results?console.error(_$_5163[156]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_5163[152]),b=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),c.style.display=_$_5163[16],c.style.top=a.top-b.top+_$_5163[44],c.style.left=_$_5163[157],c.style.width=
|
|
148
|
+
this.content.offsetWidth-50+_$_5163[44],c.style.height=_$_5163[153],c.classList.add(_$_5163[158]))}else if(null!==b.target.getAttribute(_$_5163[42]))if(a=parseInt(b.target.getAttribute(_$_5163[42])),this.merged.cols[a])console.error(_$_5163[151]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_5163[152]);for(b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_5163[43]);this.records[d][a].element.classList.add(_$_5163[152])}b=this.parent.element.getBoundingClientRect();
|
|
149
|
+
a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_5163[16];c.style.top=d.top-b.top+_$_5163[44];c.style.left=a.left-d.left+_$_5163[44];c.style.width=_$_5163[153];c.style.height=d.height+_$_5163[44];c.classList.add(_$_5163[154])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_5163[152]),null!=k.event.d&&k.event.y!=k.event.d&&(this.moveRow(k.event.y,k.event.d),this.updateSelectionFromCoords(0,k.event.d,
|
|
150
|
+
this.options.columns.length-1,k.event.d)),this.parent.helper.classList.remove(_$_5163[158]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_5163[152]);for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$_5163[43]);this.records[c][k.event.x].element.classList.remove(_$_5163[152])}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(_$_5163[154])}this.parent.helper.style.display=
|
|
151
|
+
_$_5163[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(_$_5163[43]);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=
|
|
152
|
+
(d?c.top:c.bottom)-a.top+_$_5163[44])}}else d=b.target.getAttribute(_$_5163[42]),null!=d&&(a=d=parseInt(d),(c=b.target.clientWidth/2>b.offsetX)?k.event.x<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+_$_5163[44]))}};return k}(),ba=function(){var k=function(b){b.getMerge=
|
|
153
|
+
k[_$_5163[51]];b.setMerge=k[_$_5163[11]];b.updateMerge=k.update;b.removeMerge=k.remove;b.destroyMerged=b.destroyMerge=k.destroy};k.getHeight=function(b,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=
|
|
154
|
+
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!==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[_$_5163[51]]=function(b){return b?this.options.mergeCells[b]:this.options.mergeCells};k[_$_5163[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==
|
|
155
|
+
_$_5163[17]?h[b]=[c,a]:typeof b==_$_5163[83]?h=b:((e=this.getHighlighted())?e=[E.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:B(_$_5163[159])}),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(_$_5163[160])+_$_5163[134]+m);else if(this.options.mergeCells[m])g[m]=[p,n],f[m]=this.options.mergeCells[m],k.update.call(this,
|
|
156
|
+
m,p,n);else{e=E.getCoordsFromColumnName(m);for(var q=e[1];q<e[1]+n;q++)for(var v=e[0];v<e[0]+p;v++)b=E.getColumnNameFromCoords(v,q),(d=this.merged.cells[b])&&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[_$_5163[46]].call(this,e[1],e[0]),V.call(this.parent,{worksheet:this,action:_$_5163[68],newValue:g,oldValue:f}),K.call(this,
|
|
157
|
+
_$_5163[68],[g]),k.build.call(this),ya.refresh.call(this),ha.refresh.call(this),F.call(this.parent,_$_5163[161],this,g,f))}};k.update=function(b,c,a){var d=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==_$_5163[17]?d[b]=!0:typeof b==_$_5163[83]&&(d=b);b=Object.keys(d);for(d=0;d<b.length;d++)this.options.mergeCells[b[d]]&&
|
|
158
|
+
(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:_$_5163[69],newValue:a,oldValue:c});K.call(this,_$_5163[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[_$_5163[51]].call(this,b[0],b[1])){a.style.display=_$_5163[3];
|
|
159
|
+
1<d?a.setAttribute(_$_5163[52],d):a.removeAttribute(_$_5163[52]);1<e?a.setAttribute(_$_5163[162],e):a.removeAttribute(_$_5163[162]);1==this.options.textOverflow&&(a.style.overflow=_$_5163[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[_$_5163[51]].call(this,c,h),a.element.style.display=_$_5163[40],a.merged[3]=a.element.innerText,a.element.innerText=_$_5163[3],L.call(this,c,h,_$_5163[3])}}}};k.applyDestroy=
|
|
160
|
+
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];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(_$_5163[52]),a.element.removeAttribute(_$_5163[162])):(a.element.style.display=_$_5163[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==
|
|
161
161
|
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]);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:[]};
|
|
162
162
|
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]+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=
|
|
163
|
-
k[_$
|
|
164
|
-
c;if(a=this.headers[b])a.innerHTML=c,a.setAttribute(_$
|
|
165
|
-
(e.style.textAlign=c.align);c.title&&e.setAttribute(_$
|
|
166
|
-
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]:_$
|
|
167
|
-
c.setFooter=b[_$
|
|
168
|
-
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=function(c,a,d){if(void 0===d)return this.options.footers[a][c];k.call(this,c,a,d);K.call(this,_$
|
|
169
|
-
{});F.call(this.parent,_$
|
|
170
|
-
{element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$
|
|
171
|
-
{})}}};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)}};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]=_$
|
|
163
|
+
k[_$_5163[51]];b.setHeader=k[_$_5163[11]];b.getHeaders=k.all};k[_$_5163[51]]=function(b){var c;if(c=this.options.columns)return c[b].title||E.getColumnName(b)};k.all=function(b){for(var c=[],a=0;a<this.options.columns.length;a++)c.push(k[_$_5163[51]].call(this,a));return b?c:c.join(this.options.csvDelimiter)};k[_$_5163[11]]=function(b,c){if(!R.call(this.parent,this))return!1;var a;if(a=this.options.columns[b]){var d=k[_$_5163[51]].call(this,b);if(!c&&(c=prompt(B(_$_5163[163]),d),!c))return!1;a.title=
|
|
164
|
+
c;if(a=this.headers[b])a.innerHTML=c,a.setAttribute(_$_5163[164],c);V.call(this.parent,{worksheet:this,action:_$_5163[74],column:b,oldValue:d,newValue:c});K.call(this,_$_5163[74],{column:b,title:c});F.call(this.parent,_$_5163[165],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(_$_5163[145]);this.parent.config.stripHTML?e.innerText=d:e.innerHTML=d;e.setAttribute(_$_5163[42],b);c.align&&
|
|
165
|
+
(e.style.textAlign=c.align);c.title&&e.setAttribute(_$_5163[164],e.innerText);c.tooltip&&(e.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&(d=!1);!0===d&&e.classList.add(_$_5163[166]);!1===c.visible&&(a=_$_5163[97]);d=document.createElement(_$_5163[167]);d.setAttribute(_$_5163[150],a);c.type==_$_5163[49]&&(e.style.display=_$_5163[40],d.style.display=_$_5163[40]);this.headers[b]=e;this.colgroup[b]=d};return k}(),aa=function(){var k=function(c,a,d){var e=this.footers.content,
|
|
166
|
+
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]:_$_5163[3]),O(d)&&1==this.parent.config.parseFormulas&&(d=W.execute.call(this,d,c,null,!1)),this.options.applyMaskOnFooters&&(e=da[_$_5163[51]].call(this,c),d=t.editors.general.parseValue(c,a,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_5163[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},b=function(c){c.getFooter=b[_$_5163[51]];
|
|
167
|
+
c.setFooter=b[_$_5163[11]];c.resetFooter=b.reset;c.refreshFooter=b.refresh;c.getFooterValue=b.value;c.setFooterValue=b.value};b[_$_5163[51]]=function(){return this.options.footers};b[_$_5163[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=_$_5163[40],H.resetY.call(this)),K.call(this,_$_5163[168],{data:this.options.footers}),F.call(this.parent,_$_5163[169],this,
|
|
168
|
+
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=function(c,a,d){if(void 0===d)return this.options.footers[a][c];k.call(this,c,a,d);K.call(this,_$_5163[170],{x:c,y:a,value:d});F.call(this.parent,_$_5163[171],this,c,a,d)};b.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_5163[3];K.call(this,_$_5163[172],
|
|
169
|
+
{});F.call(this.parent,_$_5163[169],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=this.options.columns[c].align;d.element=document.createElement(_$_5163[145]);d.element.setAttribute(_$_5163[42],c);d.element.setAttribute(_$_5163[43],a);e&&(d.element.style.textAlign=e);k.call(this,c,a);this.options.columns[c].type==_$_5163[49]&&(d.element.style.display=_$_5163[40]);return d.element};b.build=function(){this.footers=
|
|
170
|
+
{element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_5163[3];for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=[];var a=document.createElement(_$_5163[143]),d=document.createElement(_$_5163[145]);d.innerHTML=_$_5163[146];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]=_$_5163[3]),this.footers.content[c][a]||(this.footers.content[c][a]=
|
|
171
|
+
{})}}};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)}};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]=_$_5163[3];f[d]=f[d].concat(m);m=g[d].splice(c);
|
|
172
172
|
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));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=
|
|
173
|
-
k.cell;b.setNestedHeaders=k[_$
|
|
174
|
-
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,_$
|
|
175
|
-
_$
|
|
176
|
-
var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$
|
|
177
|
-
0;b<this.options.nestedHeaders.length;b++){this.nested.content[b]=[];var c=document.createElement(_$
|
|
178
|
-
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(_$
|
|
179
|
-
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=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]==_$
|
|
173
|
+
k.cell;b.setNestedHeaders=k[_$_5163[11]];b.getNestedHeaders=k[_$_5163[51]];b.resetNestedHeaders=k.reset};k[_$_5163[51]]=function(){return this.options.nestedHeaders};k[_$_5163[11]]=function(b){k.reset.call(this);this.options.nestedHeaders=b;k.build.call(this);k.render.call(this);ha.refresh.call(this);U.call(this);K.call(this,_$_5163[173],{data:b});F.call(this.parent,_$_5163[174],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(_$_5163[175])&&
|
|
174
|
+
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,_$_5163[176]);F.call(this.parent,_$_5163[174],this,[])};k.cell=function(b,c,a){if(a){if(!R.call(this.parent,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(_$_5163[52],a.colspan),e.style.display=0==d.colspan?
|
|
175
|
+
_$_5163[40]:_$_5163[3]);K.call(this,_$_5163[177],{x:b,y:c,properties:a});F.call(this.parent,_$_5163[178],this,b,c,a)}else return this.nested.content[c][b].element};k.range=function(b){b=this.options.nestedHeaders[b];for(var c=[],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;
|
|
176
|
+
var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_5163[179]);a.title||(a.title=_$_5163[3]);var e=document.createElement(_$_5163[145]);e.setAttribute(_$_5163[180],b);e.setAttribute(_$_5163[181],c);e.setAttribute(_$_5163[52],a.colspan);e.setAttribute(_$_5163[182],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=
|
|
177
|
+
0;b<this.options.nestedHeaders.length;b++){this.nested.content[b]=[];var c=document.createElement(_$_5163[145]);c.innerHTML=_$_5163[146];var a=document.createElement(_$_5163[143]);a.classList.add(_$_5163[175]);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(_$_5163[42]);var e=k.getColumns.call(this,
|
|
178
|
+
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(_$_5163[52]),b++,d.setAttribute(_$_5163[52],b)):(d.setAttribute(_$_5163[52],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(_$_5163[50]),d.style.left=xa.call(this)?_$_5163[157]:_$_5163[153]))};k.adjust=function(b,c,a,d){var e=this.options.nestedHeaders;
|
|
179
|
+
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=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]==_$_5163[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,
|
|
180
180
|
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 q=p;0<=q;q--)if(p=this.results?n[q]:q,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 q=p;q<n.length;q++)if(p=this.results?n[q]:q,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&&
|
|
181
|
-
this.records[n][p].element.style.display!=_$
|
|
182
|
-
(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,_$
|
|
183
|
-
p,!1,!1),q=this.getSelected();if(f=this.getStyle(q,!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,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
|
-
1!=c.active)&&
|
|
185
|
-
jSuites.two(A.getDate())+_$
|
|
186
|
-
!0)};return k}(),Fa=function(){var k=function(b){b.getData=k[_$
|
|
187
|
-
h=this.options.data.length;void 0===d&&(d=this.dataType&&typeof a==_$
|
|
188
|
-
_$
|
|
189
|
-
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]=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
|
-
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]||(b[g].data[h]=_$
|
|
191
|
-
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=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
|
-
_$
|
|
193
|
-
k.getRowData=function(b,c){if(typeof this.options.data[b]===_$
|
|
194
|
-
_$
|
|
195
|
-
this,a=this.getHighlighted(),d=function(){c.setBorder(a[0],a[1],a[2],a[3],_$
|
|
196
|
-
(d.resetBorders(_$
|
|
197
|
-
E.getColumnNameFromCoords(q,n),m[u][v]=g&&g[f]?g[f]:_$
|
|
198
|
-
m&&m[C]&&m[C][w]?u.push(m[C][w]):u.push(_$
|
|
199
|
-
0<n&&this.insertRow(n);u=v=b;w=y=c;C=null;this.results&&(g=this.results.indexOf(c));for(n=0;n<a.length;n++)for(q=0;q<a[n].length;q++){null!==h&&null!==l&&a[n][q][0]==_$
|
|
200
|
-
_$
|
|
201
|
-
_$
|
|
202
|
-
c:b[c].row;b[c]=a}return b};return k}(),Wa=function(){var k=function(b){b.getLabel=k[_$
|
|
203
|
-
b[c[a]];K.call(this,_$
|
|
204
|
-
0;f<e.length;f++){var g=W.updateWorksheetName(a[e[f]],b,c);g!==a[e[f]]&&(d[e[f]]=g)}k[_$
|
|
205
|
-
for(var g=0,h=[],l,m=0;m<f.children.length;m++)if(l=f.children[m].getAttribute(_$
|
|
206
|
-
f.classList.add(_$
|
|
207
|
-
_$
|
|
208
|
-
h;g&&(g.tagName?m.setStart(g.firstChild,p):m.setStart(g,p),l.removeAllRanges(),l.addRange(m));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$
|
|
209
|
-
m),W.getRangeFromTokens.call(this,m)):f};e.range=function(f,g,h,l,m){e.current.getAttribute(_$
|
|
210
|
-
u.innerText=q;u.setAttribute(_$
|
|
211
|
-
p.parent.input);m.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$
|
|
212
|
-
f.which?jSuites.focus(f.target):187==f.which&&!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$
|
|
213
|
-
_$
|
|
214
|
-
_$
|
|
215
|
-
v[q]+_$
|
|
216
|
-
_$
|
|
217
|
-
0;n<m[p].length;n++)m[p][n]&&(m[p][n].innerText=_$
|
|
218
|
-
_$
|
|
219
|
-
G[1]?(S=G[1],G=I(G[0]),P=r.getWorksheetName()+_$
|
|
220
|
-
Q=0,y[D[x]]=Q))}}}return N.substr(1)},y={};try{h=u(h,l,m,this);if(h==_$
|
|
221
|
-
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=w[C][A])));null===q?(q=w[0][0],this.records[m][l].a=p):g.call(this,l,m);w=this.records[m][l].v=q}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
|
-
k.test(h[u])){if(-1==h[u].indexOf(_$
|
|
223
|
-
h)return[];var l=[],m=[],p=[],n=function(u){if(0<=u.indexOf(_$
|
|
224
|
-
q=Object.keys(h);for(h=0;h<q.length;h++)n.call(this,q[h]);q=0;for(h=l.length-1;0<=h;h--){for(var v=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}q++;if(1E6<q){console.error(_$
|
|
225
|
-
(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]=h[y[w]]),v[y[w]]=!0,C.push(y[w]));C.length&&(h[u]&&(u=h[u]),q[u]=C)}}this.formula=q;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++){q=[];y=N[S].formula[n[m]];for(w=0;w<y.length;w++)u=y[w].split(_$
|
|
226
|
-
q.push(u[0]+_$
|
|
227
|
-
n[u[h]]),ea.setValueChained.call(q,n[u[h]]),K.call(q,_$
|
|
228
|
-
[],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=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&&q.push({x:w,y,value:p,force:!0}));q.length&&(q=ea.applyValues.call(v[u],q),K.call(v[u],_$
|
|
229
|
-
E.getCoordsFromColumnName(y[1]),y=y[0]+_$
|
|
230
|
-
this,m=_$
|
|
231
|
-
h;u<=v;u++)p.push(m+E.getColumnNameFromCoords(u,l));return p};a.getRangeFromTokens=function(h){h=h.filter(function(p){return p!=_$
|
|
232
|
-
l){var m=d(h);h.replace(/!/g,_$
|
|
233
|
-
b.getValueFromCoords=k.getFromCoords;b.setValue=k[_$
|
|
234
|
-
b,c));return d};k[_$
|
|
235
|
-
null!==q&&(p.style=q);g.push(p)};if(b&&Array.isArray(b))for(var l=0;l<b.length;l++)h(b[l],c);else if(typeof b==_$
|
|
236
|
-
selection:this.selectedCell});b=this.getPrimaryKey();if(!1!==b)for(l=0;l<g.length;l++)g[l].x===b&&g[l].value&&T.call(this,g[l]);K.call(this,_$
|
|
237
|
-
|
|
238
|
-
d)return null;var e=da[_$
|
|
239
|
-
b,c,!1)),e[0]&&typeof e[0][_$
|
|
240
|
-
b.cell=g[e],b.f=a[g[e]],f.push(b));F.call(this.parent,_$
|
|
241
|
-
_$
|
|
242
|
-
return d};k.selected=function(b,c){return k.getFromCoords.call(this,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
|
-
k.update=function(b,c,a,d){var e=this.records[c];if(e=e&&e[b]?e[b]:null){e=e.element;var f={x:b,y:c};if(d||!e||1!=e.classList.contains(_$
|
|
244
|
-
a,b,c,this,d[1]);F.call(this.parent,_$
|
|
245
|
-
this.records[c][b].v);k.applyProperties.call(this,e,b,c,d);k.applyOverflow.call(this,e,b,c);F.call(this.parent,_$
|
|
246
|
-
b&&b.meta&&this.setMeta(b.meta);b&&b.cells&&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
|
-
this.options.columns[c].wrap&&b.classList.add(_$
|
|
248
|
-
this.records[a][c].readonly&&1!=d.readOnly&&1!=d.readonly||b.classList.add(_$
|
|
249
|
-
d[e].indexOf(_$
|
|
250
|
-
k[_$
|
|
251
|
-
c),this.options.cells&&this.options.cells[c]&&(a=this.options.cells[c]));null===a&&(a=this.options.columns[b]);if(!a)a={type:_$
|
|
252
|
-
(b={x:b,value:c},d.push(b));if(Array.isArray(d))for(a=0;a<d.length;a++){var e=d[a];b=e.x;
|
|
253
|
-
|
|
254
|
-
this.records[
|
|
255
|
-
this.records[
|
|
256
|
-
g=0;g<f.length;g++)if(d=this.rows[a[f[g]]])d.element&&(d.element.style.display=e),d.visible=c;this.resetBorders();H.refresh.call(this)},b=function(c){c.getRow=b[_$
|
|
257
|
-
if(d)for(var e=d[1];e<=d[3];e++)c?a.push(e):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
|
-
_$
|
|
259
|
-
c=parseInt(c);a=parseInt(a);if(!this.rows[a]||!this.rows[c])return console.error(_$
|
|
260
|
-
this.rows[c].element&&(this.tbody.removeChild(this.rows[c].element),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
|
-
newValue:a});F.call(this.parent,_$
|
|
262
|
-
!1;this.resetBorders();var l=d?a:a+1,m=0;c=[];for(var p=[],n=this.rows.splice(l),q=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]=_$
|
|
181
|
+
this.records[n][p].element.style.display!=_$_5163[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!=_$_5163[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)):
|
|
182
|
+
(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,_$_5163[136]))};k.execute=function(b){if(!R.call(this.parent,this))return!1;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[_$_5163[51]].call(this,
|
|
183
|
+
p,!1,!1),q=this.getSelected();if(f=this.getStyle(q,!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,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(_$_5163[18]))){if((!c||
|
|
184
|
+
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==_$_5163[55]||this.options.columns[u].type==_$_5163[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==_$_5163[183]&&(A=new Date(A),A.setDate(A.getDate()+y),A=A.getFullYear()+_$_5163[184]+jSuites.two(parseInt(A.getMonth()+1))+_$_5163[184]+
|
|
185
|
+
jSuites.two(A.getDate())+_$_5163[130]+_$_5163[185]));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&&(q[0].x<b&&(b=q[0].x),q[0].y<a&&(a=q[0].y),q[q.length-1].x>d&&(d=q[q.length-1].x),q[q.length-1].y>e&&(e=q[q.length-1].y),this.setValue(l),this.resetBorders(_$_5163[136],!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(_$_5163[136],
|
|
186
|
+
!0)};return k}(),Fa=function(){var k=function(b){b.getData=k[_$_5163[51]];b.getJson=k[_$_5163[51]];b.setData=k[_$_5163[11]];b.loadData=k.load;b.getRowData=k.getRowData;b.setRowData=k.setRowData;b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$_5163[51]];b.download=k.download;b.copy=k.copy;b.paste=k.paste;b.cut=function(){return b.copy(!0)}};k[_$_5163[51]]=function(b,c,a,d){!0===b&&(b=this.getHighlighted());var e=b?!0:!1,f=[],g=this.options.columns.length,
|
|
187
|
+
h=this.options.data.length;void 0===d&&(d=this.dataType&&typeof a==_$_5163[13]?1:0);for(var l=0;l<h;l++){var m=null;var p=d?{}:[];for(var n=0;n<g;n++){var q;if(!(q=!e)){q=b[1];var v=b[2],u=b[3];q=n>=b[0]&&n<=v&&l>=q&&l<=u?!0:!1}if(q&&(!e||!this.results||-1!=this.results.indexOf(l))){q=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&&(q=m)}a&&q.match&&(q.match(a)||q.match(/\n/)||q.match(/"/))&&(q=q.replace(new RegExp(_$_5163[186],_$_5163[187]),
|
|
188
|
+
_$_5163[188]),q=_$_5163[186]+q+_$_5163[186]);d?jSuites.path.call(p,_$_5163[3]+Z.call(this,n),q):p.push(q);m=!0}}m&&(a?f.push(p.join(a)):f.push(p))}return a?f.join(_$_5163[10])+_$_5163[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==_$_5163[83])&&(typeof f[g].id==_$_5163[14]&&(b=parseInt(f[g].id)),typeof f[g].row==_$_5163[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=
|
|
189
|
+
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]=b));return c};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$_5163[13]&&(this.dataType=1)};k[_$_5163[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&&
|
|
190
|
+
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]||(b[g].data[h]=_$_5163[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[_$_5163[11]].call(this,
|
|
191
|
+
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=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=_$_5163[3];this.options.data=b;k.build.call(this);H.call(this);Y.update.call(this)};k.refresh=function(b){if(typeof b!==
|
|
192
|
+
_$_5163[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:null,d=da[_$_5163[51]].call(this,c,b);typeof d[0].updateCell==_$_5163[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:_$_5163[58],dataType:_$_5163[59],success:function(f){e.setData(f);jSuites.loading.hide()}})}};
|
|
193
|
+
k.getRowData=function(b,c){if(typeof this.options.data[b]===_$_5163[13])return!1;if(c){if(this.dataType){c={};for(var a=0;a<this.options.columns.length;a++){var d=_$_5163[3]+Z.call(this,a),e=_$_5163[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]===
|
|
194
|
+
_$_5163[13]&&(c[e]=_$_5163[3]),d.push({x:e,y:b,value:c[e]});d.length&&this.setValue(d,null,a)};k.getColumnData=function(b,c){if(typeof this.options.columns[b]===_$_5163[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]===_$_5163[13]&&(c[e]=_$_5163[3]),d.push({x:b,y:e,value:c[e]});d.length&&this.setValue(d,null,a)};k.copy=function(b){var c=
|
|
195
|
+
this,a=this.getHighlighted(),d=function(){c.setBorder(a[0],a[1],a[2],a[3],_$_5163[126]);c.borders.copying.clear=1==b?!0:!1},e=k[_$_5163[51]].call(this,a,!0,_$_5163[189]),f=F.call(this.parent,_$_5163[190],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(_$_5163[191]),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&&
|
|
196
|
+
(d.resetBorders(_$_5163[126],!0),d.borders.copying.clear=!1)},f=null,g=this.options.style,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),q=jSuites.hash(k[_$_5163[51]].call(this,p,!0,_$_5163[189]));if(n!=q)e();else{var v=0,u=0;a=k[_$_5163[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(q=p[0];q<=p[2];q++)f=
|
|
197
|
+
E.getColumnNameFromCoords(q,n),m[u][v]=g&&g[f]?g[f]:_$_5163[192],v++;u++}}}b=parseInt(b);c=parseInt(c);if(a){Array.isArray(a)||(a=E.parseCSV(a,_$_5163[189]));if(n=F.call(this.parent,_$_5163[193],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(_$_5163[194]);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(q=f[0];q<=f[2];q++)v.push(a[C][w]),
|
|
198
|
+
m&&m[C]&&m[C][w]?u.push(m[C][w]):u.push(_$_5163[3]),w++,w>=a[0].length&&(w=0);y.push(v);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(q=p[0];q<=p[2];q++)(!this.results||this.results&&0<=this.results.indexOf(n))&&f.push({x:q,y:n,value:_$_5163[3],style:_$_5163[3]});e()}n=b+a[0].length-this.options.columns.length;0<n&&this.insertColumn(n);n=c+a.length-this.rows.length;
|
|
199
|
+
0<n&&this.insertRow(n);u=v=b;w=y=c;C=null;this.results&&(g=this.results.indexOf(c));for(n=0;n<a.length;n++)for(q=0;q<a[n].length;q++){null!==h&&null!==l&&a[n][q][0]==_$_5163[12]&&(a[n][q]=W.shiftFormula(a[n][q],b-h,c-l));u=b+q;w=c+n;this.results&&(w=this.results[g+n]);var A={x:u,y:w,value:a[n][q]};m&&m[n]&&m[n][q]&&(A.style=m[n][q]);f.push(A);null===C&&ya.isSelected.call(this,u,w,p)&&(C=!0)}C&&e();f.length&&(ea[_$_5163[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),F.call(this.parent,
|
|
200
|
+
_$_5163[195],this,f),this.updateSelectionFromCoords(v,y,u,w))}};k.download=function(b,c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var a=_$_5163[3];if(1==b||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_5163[130])+_$_5163[10];a+=k[_$_5163[51]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_5163[197]+a],{type:_$_5163[198]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+
|
|
201
|
+
_$_5163[199]):(b=document.createElement(_$_5163[200]),c=URL.createObjectURL(c),b.href=c,b.setAttribute(_$_5163[201],this.options.csvFileName+_$_5163[199]),document.body.appendChild(b),b.click(),b.parentNode.removeChild(b))}else console.error(_$_5163[196])};k.standardize=function(b){b||(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$_5163[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?
|
|
202
|
+
c:b[c].row;b[c]=a}return b};return k}(),Wa=function(){var k=function(b){b.getLabel=k[_$_5163[51]];b.getLabelFromCoords=k[_$_5163[51]]};k[_$_5163[51]]=function(b,c,a){if(typeof b==_$_5163[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[_$_5163[51]];b.setDefinedNames=k[_$_5163[11]]};k[_$_5163[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]]=
|
|
203
|
+
b[c[a]];K.call(this,_$_5163[202],[b])}};k[_$_5163[51]]=function(b){var c=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[_$_5163[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=
|
|
204
|
+
0;f<e.length;f++){var g=W.updateWorksheetName(a[e[f]],b,c);g!==a[e[f]]&&(d[e[f]]=g)}k[_$_5163[11]].call(this,d)}}};return k}(),la=function(){var k=[_$_5163[203],_$_5163[204],_$_5163[205],_$_5163[206],_$_5163[207]],b=[_$_5163[184],_$_5163[149],_$_5163[208],_$_5163[209],_$_5163[210],_$_5163[211],_$_5163[1],_$_5163[212],_$_5163[25],_$_5163[213],_$_5163[12],_$_5163[214],_$_5163[215],_$_5163[216]],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);
|
|
205
|
+
for(var g=0,h=[],l,m=0;m<f.children.length;m++)if(l=f.children[m].getAttribute(_$_5163[217])){h[l]||(h[l]=k[g++],4<g&&(g=0));f.children[m].style.color=h[l];if(-1===l.indexOf(_$_5163[133])){if(0<=l.indexOf(_$_5163[134])){var p=l.split(_$_5163[134]),n=E.getCoordsFromColumnName(p[0]);p=E.getCoordsFromColumnName(p[1])}else p=n=E.getCoordsFromColumnName(l);ya[_$_5163[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(_$_5163[92]);f.classList.add(_$_5163[218]);f.classList.add(_$_5163[219]);
|
|
206
|
+
f.classList.add(_$_5163[220]);f.setAttribute(_$_5163[221],!0);f.onclick=function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$_5163[222]))};f.onblur=function(){f.worksheet&&(a.call(f.worksheet),typeof f.onchange==_$_5163[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=
|
|
207
|
+
_$_5163[3],h=_$_5163[3],l=window.getSelection(),m=document.createRange(),p=E.getCaretIndex.call(this.parent,f),n=W.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_5163[3])),q=0;q<n.length;q++)n[q]&&W.tokenIdentifier.test(n[q].trim())?(q==n.length-1&&(h=_$_5163[223]),g+=_$_5163[224]+h+_$_5163[225]+n[q].trim().replace(/\$/g,_$_5163[3])+_$_5163[226]+n[q]+_$_5163[227]):g+=n[q];f.innerHTML=g;g=null;for(q=0;q<f.childNodes.length&&!(g=f.childNodes[q],h=g.tagName?g.innerText.length:g.length,0>=p-h);q++)p-=
|
|
208
|
+
h;g&&(g.tagName?m.setStart(g.firstChild,p):m.setStart(g,p),l.removeAllRanges(),l.addRange(m));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$_5163[92]):e.current&&(typeof e.current.onchange==_$_5163[84]&&e.current.onchange.call(e.current),e.current.classList.remove(_$_5163[222]),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+_$_5163[134]+h,m=W.getTokensFromRange.call(this,
|
|
209
|
+
m),W.getRangeFromTokens.call(this,m)):f};e.range=function(f,g,h,l,m){e.current.getAttribute(_$_5163[228])==_$_5163[229]&&(f=h,g=l);f=e.getName.call(this,f,g,h,l,m);g=document.createElement(_$_5163[230]);g.innerText=f;g.setAttribute(_$_5163[217],f);e.current.innerText=_$_5163[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 q=e.getName.call(this,f,g,h,l,m);f=function(v){var u=document.createElement(_$_5163[230]);
|
|
210
|
+
u.innerText=q;u.setAttribute(_$_5163[217],q);n.parentNode===p.parent.input&&!1===v?n.parentNode.insertBefore(u,n.nextSibling):p.parent.input.appendChild(u);n=u};if(n.getAttribute(_$_5163[217]))m.ctrlKey?(p.parent.input.appendChild(document.createTextNode(_$_5163[25])),f(!0)):(n.innerText=q,n.setAttribute(_$_5163[217],q));else{if(n.innerText!==_$_5163[3]&&-1==b.indexOf(n.innerText.slice(-1))||n.nextElementSibling&&n.nextElementSibling.getAttribute(_$_5163[217]))return!1;f(!1)}jSuites.focus(n);d.call(p,
|
|
211
|
+
p.parent.input);m.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_5163[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_5163[191]))}else if(36==f.which){var g=window.getSelection(),h=document.createRange();h.setStart(f.target,0);g.removeAllRanges();g.addRange(h)}else 35==
|
|
212
|
+
f.which?jSuites.focus(f.target):187==f.which&&!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_5163[3])&&f.target.getAttribute(_$_5163[94])&&f.target.removeAttribute(_$_5163[94])};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=[_$_5163[184],_$_5163[149],_$_5163[208],_$_5163[209],_$_5163[210],_$_5163[231]],m=[_$_5163[211],_$_5163[232],_$_5163[1],_$_5163[2],_$_5163[212],_$_5163[233],_$_5163[25],_$_5163[213],
|
|
213
|
+
_$_5163[12],_$_5163[214],_$_5163[215],_$_5163[216]],p=_$_5163[3],n=[],q=0,v=0;v<h.length;v++){if(h[v]==_$_5163[186]||h[v]==_$_5163[131])q=0==q?1:0;0==q&&(-1<l.indexOf(h[v])||-1<m.indexOf(h[v]))?(p&&(n.push(p),p=_$_5163[3]),n.push(h[v])):p+=h[v]}p&&n.push(p);for(v=0;v<n.length;v++)-1==n[v].indexOf(_$_5163[186])&&-1==n[v].indexOf(_$_5163[131])&&(n[v]=n[v].replace(/\s/g,_$_5163[3]));return n},c=function(h,l){for(var m=_$_5163[3],p=0,n=[_$_5163[12],_$_5163[133],_$_5163[215],_$_5163[214]],q=0;q<h.length;q++)h[q]==
|
|
214
|
+
_$_5163[186]&&(p=0==p?1:0),1==p?m+=h[q]:(m+=h[q].toUpperCase(),1==l&&0<q&&h[q]==_$_5163[12]&&-1==n.indexOf(h[q-1])&&-1==n.indexOf(h[q+1])&&(m+=_$_5163[12]));return m},a=function(h){h.setFormula=a[_$_5163[11]];h.executeFormula=a.execute;h.formula=[]};a.run=function(h,l){var m=_$_5163[3],p=Object.keys(l);if(p.length){for(var n={},q=0;q<p.length;q++){var v=p[q].replace(/!/g,_$_5163[27]);0<v.indexOf(_$_5163[27])&&(v=v.split(_$_5163[27]),n[v[0]]=!0)}v=Object.keys(n);for(q=0;q<v.length;q++)m+=_$_5163[234]+
|
|
215
|
+
v[q]+_$_5163[235];for(q=0;q<p.length;q++)v=p[q].replace(/!/g,_$_5163[27]),jSuites.isNumeric(l[p[q]])||(n=l[p[q]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&n.length&&(l[p[q]]=e(n,l[p[q]])),m=0<v.indexOf(_$_5163[27])?m+(v+_$_5163[236]+l[p[q]]+_$_5163[237]):m+(_$_5163[234]+v+_$_5163[236]+l[p[q]]+_$_5163[237])}h=h.replace(/\$/g,_$_5163[3]);(n=h.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&n.length&&(h=e(n,h));h=h.replace(/!/g,_$_5163[27]);return(new Function(m+
|
|
216
|
+
_$_5163[238]+h))()};a[_$_5163[11]]=function(){};var d=function(h){h=c(h,!0);return h.replace(/\$/g,_$_5163[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],_$_5163[212]+p.join(_$_5163[25])+_$_5163[233])}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=
|
|
217
|
+
0;n<m[p].length;n++)m[p][n]&&(m[p][n].innerText=_$_5163[3],this.records[l+p][h+n].v=_$_5163[3]);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]),_$_5163[3];if(typeof this.parent.config.onbeforeformula==_$_5163[84]){var q=F.call(this.parent,_$_5163[239],this,h,l,m);if(!1===q)return h;q&&(h=q)}var v=[],u=function(N,S,P,r){if(void 0!=S&&void 0!=P){var z=E.getColumnNameFromCoords(S,P);P=r.getWorksheetName()+
|
|
218
|
+
_$_5163[27]+z;v[P]||(v[P]=0);v[P]++;if(3<v[P])throw{error:_$_5163[240],message:_$_5163[241],reference:P};}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(r.parent,D,x,y));(D=x.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&D.length&&(x=e.call(r,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:_$_5163[242],message:_$_5163[243]};for(x=0;x<D.length;x++){G=D[x].split(_$_5163[133]);
|
|
219
|
+
G[1]?(S=G[1],G=I(G[0]),P=r.getWorksheetName()+_$_5163[27]+z):(S=G[0],G=r,P=z);if(typeof G==_$_5163[13]||typeof G.formula==_$_5163[13])throw{error:_$_5163[244],message:_$_5163[245]};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]]||((_$_5163[3]+Q).substr(0,1)==_$_5163[12]?y[D[x]]=u(Q,S,P,G):(Q?Q!=Number(Q)&&(Q=_$_5163[186]+Q+_$_5163[186]):
|
|
220
|
+
Q=0,y[D[x]]=Q))}}}return N.substr(1)},y={};try{h=u(h,l,m,this);if(h==_$_5163[3])return _$_5163[3];0==h.indexOf(_$_5163[246])&&(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=[];q=null;for(var C=0;C<w.length;C++)for(var A=0;A<w[C].length;A++)null===q&&(0<C&&C>A&&this.options.data[m+C][l+A]?q=_$_5163[247]:(this.records[m+C][l+A].v=w[C][A],this.records[m+
|
|
221
|
+
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=w[C][A])));null===q?(q=w[0][0],this.records[m][l].a=p):g.call(this,l,m);w=this.records[m][l].v=q}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:_$_5163[244]}};a.update=function(h,l,m,p){var n=null,q=null,v=function(w){m&&m[w]&&(w=_$_5163[248]);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]&&
|
|
222
|
+
k.test(h[u])){if(-1==h[u].indexOf(_$_5163[133])){if(q=h[u],n=_$_5163[3],p)continue}else if(q=h[u].split(_$_5163[133]),n=q[0],q=q[1],p!=n)continue;if(0<=q.indexOf(_$_5163[134])){q=a.getTokensFromRange.call(this,q);for(var y=0;y<q.length;y++)q[y]=v(q[y]);q=a.getRangeFromTokens.call(this,q)}else-1==q.indexOf(_$_5163[249])?q=v(q):(q=v(q.replace(/\$/g,_$_5163[3])),q=_$_5163[249]+q.match(/[A-Z]+/g)+_$_5163[249]+q.match(/[0-9]+/g));n&&(q=n+_$_5163[133]+q);h[u]=q}return h.join(_$_5163[3])};a.getChain=function(h){if(void 0===
|
|
223
|
+
h)return[];var l=[],m=[],p=[],n=function(u){if(0<=u.indexOf(_$_5163[27])){var y=u.split(_$_5163[27]),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(_$_5163[27])&&(N=w+_$_5163[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}))}},
|
|
224
|
+
q=Object.keys(h);for(h=0;h<q.length;h++)n.call(this,q[h]);q=0;for(h=l.length-1;0<=h;h--){for(var v=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}q++;if(1E6<q){console.error(_$_5163[250]);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 q=[];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]]&&
|
|
225
|
+
(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]=h[y[w]]),v[y[w]]=!0,C.push(y[w]));C.length&&(h[u]&&(u=h[u]),q[u]=C)}}this.formula=q;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++){q=[];y=N[S].formula[n[m]];for(w=0;w<y.length;w++)u=y[w].split(_$_5163[27]),u[0]==C&&u[1]?l&&l[u[1]]||(h[u[1]]&&(u[1]=h[u[1]]),
|
|
226
|
+
q.push(u[0]+_$_5163[27]+u[1])):q.push(y[w]);N[S].formula[n[m]]=q}n=[];u=Object.keys(v);for(w=0;w<u.length;w++)0<=u[w].indexOf(_$_5163[27])?(y=u[w].split(_$_5163[27]),q=I(y[0]),m=y[1],C=this.getWorksheetName(),y=y[0]):(q=this,m=u[w],C=null,y=this.getWorksheetName()),(p=q.getValue(m))&&O(p)&&(q=a.update.call(q,p,h,l,C),q!=p&&(v[u[w]]=q,m=E.getCoordsFromColumnName(m),n[y]||(n[y]=[]),n[y].push({x:m[0],y:m[1],value:q,force:!0})));u=Object.keys(n);for(h=0;h<u.length;h++)q=I(u[h]),n[u[h]]=ea.applyValues.call(q,
|
|
227
|
+
n[u[h]]),ea.setValueChained.call(q,n[u[h]]),K.call(q,_$_5163[106],{data:n[u[h]]})};a.updateWorksheetName=function(h,l,m){for(var p=b(h),n=0;n<p.length;n++)h=p[n].split(_$_5163[133]),h[1]&&(h[0]=h[0].replace(new RegExp(_$_5163[131],_$_5163[187]),_$_5163[3]),h[0].toUpperCase()==l.toUpperCase()&&(h[0]=m,0<=h[0].indexOf(_$_5163[130])&&(h[0]=_$_5163[131]+h[0]+_$_5163[131]),p[n]=h.join(_$_5163[133])));return p.join(_$_5163[3])};a.updateWorksheetNames=function(h,l){for(var m,p,n=0;n<t.spreadsheet.length;n++)for(var q=
|
|
228
|
+
[],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=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&&q.push({x:w,y,value:p,force:!0}));q.length&&(q=ea.applyValues.call(v[u],q),K.call(v[u],_$_5163[106],{data:q}))}};a.shiftFormula=function(h,l,m){var p=b(h,!0);h=function(u){if(-1==u.indexOf(_$_5163[133])){u=E.getCoordsFromColumnName(u);var y=_$_5163[3]}else y=p[n].split(_$_5163[133]),u=
|
|
229
|
+
E.getCoordsFromColumnName(y[1]),y=y[0]+_$_5163[133];var w=u[0]+l;u=u[1]+m;return u=0>w||0>u?_$_5163[248]:y+E.getColumnNameFromCoords(w,u)};for(var n=0;n<p.length;n++)if(k.test(p[n])&&-1==p[n].indexOf(_$_5163[249])){var q=-1==p[n].indexOf(_$_5163[133])?[_$_5163[3],p[n]]:p[n].split(_$_5163[133]);if(-1==q[1].indexOf(_$_5163[134]))q[1]=h(q[1]);else{var v=q[1].split(_$_5163[134]);q[1]=h(v[0])+_$_5163[134]+h(v[1])}p[n]=q[0]?q.join(_$_5163[133]):q[1]}return p.join(_$_5163[3])};a.getTokensFromRange=function(h){var l=
|
|
230
|
+
this,m=_$_5163[3],p=_$_5163[3];0<=h.indexOf(_$_5163[27])?p=_$_5163[27]:0<=h.indexOf(_$_5163[133])&&(p=_$_5163[133]);h=h.replace(/\$/g,_$_5163[3]);p&&(m=h.split(p),l=I(m[0]),h=m[1],m=m[0]+p);p=[];h=h.split(_$_5163[134]);var n=E.getCoordsFromColumnName(h[0]),q=E.getCoordsFromColumnName(h[1]);if(n[0]<=q[0]){h=n[0];var v=q[0]}else h=q[0],v=n[0];if(null===n[1]&&null==q[1]){var u=0;n=0;l.options&&l.options.data&&(n=l.options.data.length-1)}else n[1]<=q[1]?(u=n[1],n=q[1]):(u=q[1],n=n[1]);for(l=u;l<=n;l++)for(u=
|
|
231
|
+
h;u<=v;u++)p.push(m+E.getColumnNameFromCoords(u,l));return p};a.getRangeFromTokens=function(h){h=h.filter(function(p){return p!=_$_5163[248]});for(var l=_$_5163[3],m=0;m<h.length;m++)0<=h[m].indexOf(_$_5163[27])&&(l=h[m].split(_$_5163[27]),h[m]=l[1],l=l[0]);l&&(l+=_$_5163[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]+_$_5163[134]+h[h.length-1]):_$_5163[248]};a.getTokens=function(h,
|
|
232
|
+
l){var m=d(h);h.replace(/!/g,_$_5163[27]);(h=m.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&h.length&&(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(_$_5163[27])&&l&&(h[m]=l+_$_5163[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[_$_5163[51]];
|
|
233
|
+
b.getValueFromCoords=k.getFromCoords;b.setValue=k[_$_5163[11]];b.setValueFromCoords=k.setFromCoords;b.setCheckRadioValue=k.setCheckRadio;b.getProcessed=k.processed};k[_$_5163[51]]=function(b,c){var a=this;if(typeof b==_$_5163[83]){var d=b.x;b=b.y}else 0<=b.indexOf(_$_5163[27])&&(a=b.split(_$_5163[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,
|
|
234
|
+
b,c));return d};k[_$_5163[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,n){var q=null;typeof p==_$_5163[17]?(f=E.getCoordsFromColumnName(p),d=f[0],e=f[1]):p.tagName?(d=p.getAttribute(_$_5163[42]),e=p.getAttribute(_$_5163[43])):p.element&&p.element.tagName?(d=p.element.getAttribute(_$_5163[42]),e=p.element.getAttribute(_$_5163[43])):(d=p.x,e=p.y,void 0!==p.value&&(n=p.value),void 0!==p.style&&(q=p.style));p={x:d,y:e,value:n,force:a};
|
|
235
|
+
null!==q&&(p.style=q);g.push(p)};if(b&&Array.isArray(b))for(var l=0;l<b.length;l++)h(b[l],c);else if(typeof b==_$_5163[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:_$_5163[77],records:g,
|
|
236
|
+
selection:this.selectedCell});b=this.getPrimaryKey();if(!1!==b)for(l=0;l<g.length;l++)g[l].x===b&&g[l].value&&T.call(this,g[l]);K.call(this,_$_5163[77],{data:g});F.call(this.parent,_$_5163[251],this,g)}}};k.setFromCoords=function(b,c,a,d){var e=[];e.push({x:b,y:c,value:a});k[_$_5163[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==_$_5163[252]){var f=
|
|
237
|
+
L.call(this,d,e)?!1:!0;b.push({x:d,y:e,value:f})}}b.length&&k[_$_5163[11]].call(this,b)};k.applyValues=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]:_$_5163[192]}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===
|
|
238
|
+
d)return null;var e=da[_$_5163[51]].call(this,b,c),f=e[1];f.type!=_$_5163[49]&&f.type!=_$_5163[253]&&f.type!=_$_5163[254]&&f.type!=_$_5163[255]&&f.type!=_$_5163[256]&&0!=f.process&&(!0===a||f.type!=_$_5163[257]&&f.type!=_$_5163[258]&&f.type!=_$_5163[259])&&(f.type==_$_5163[252]?d=e[0][_$_5163[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:((_$_5163[3]+d).substr(0,1)==_$_5163[12]&&(d=this.executeFormula(d,
|
|
239
|
+
b,c,!1)),e[0]&&typeof e[0][_$_5163[51]]==_$_5163[84]&&(d=e[0][_$_5163[51]](f,d,a))));return d};k.setValueChained=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(_$_5163[27])?(c=g[e].split(_$_5163[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,
|
|
240
|
+
b.cell=g[e],b.f=a[g[e]],f.push(b));F.call(this.parent,_$_5163[260],this,f)};return k}(),M=function(){var k=function(b){b.getCell=k[_$_5163[51]];b.getCellFromCoords=k[_$_5163[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[_$_5163[51]]=function(b,c,a){typeof b==
|
|
241
|
+
_$_5163[17]&&(c=E.getCoordsFromColumnName(b),b=c[0],c=c[1]);b=parseInt(b);c=parseInt(c);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=_$_5163[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]);
|
|
242
|
+
return d};k.selected=function(b,c){return k.getFromCoords.call(this,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,_$_5163[105],[a])};
|
|
243
|
+
k.update=function(b,c,a,d){var e=this.records[c];if(e=e&&e[b]?e[b]:null){e=e.element;var f={x:b,y:c};if(d||!e||1!=e.classList.contains(_$_5163[18])){var g=F.call(this.parent,_$_5163[261],this,e,b,c,a);void 0!==g&&(a=g);d=da[_$_5163[51]].call(this,b,c);typeof d[0].updateCell==_$_5163[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==_$_5163[84]&&d[1].render(e,
|
|
244
|
+
a,b,c,this,d[1]);F.call(this.parent,_$_5163[262],this,e,b,c,f.value,f.oldValue)}}}else return!1;return f};k.create=function(b,c,a,d){var e=document.createElement(_$_5163[145]);e.setAttribute(_$_5163[42],b);e.setAttribute(_$_5163[43],c);var f=da[_$_5163[51]].call(this,b,c);f[0]&&typeof f[0].createCell==_$_5163[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=
|
|
245
|
+
this.records[c][b].v);k.applyProperties.call(this,e,b,c,d);k.applyOverflow.call(this,e,b,c);F.call(this.parent,_$_5163[263],this,e,b,c,a);return e};k.getAttributes=function(b,c,a){a[b]||(a[b]={});b==_$_5163[264]?a[b][c]=this.getValue(c):b==_$_5163[265]?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);
|
|
246
|
+
b&&b.meta&&this.setMeta(b.meta);b&&b.cells&&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(_$_5163[98]))?l+(_$_5163[216]+f[e]):f[e];b.setAttribute(_$_5163[98],l)}this.options.columns[c]&&
|
|
247
|
+
this.options.columns[c].wrap&&b.classList.add(_$_5163[266]);d&&d[e]&&b.setAttribute(_$_5163[267],d[e]);g&&g[e]&&(1==g[e].readOnly&&b.classList.add(_$_5163[18]),!1===g[e].locked&&!0===this.options.selectUnLockedCells&&b.classList.add(_$_5163[268]),1==g[e].wrap&&b.classList.add(_$_5163[266]));h&&h[a]&&1==h[a].readOnly&&b.classList.add(_$_5163[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!=
|
|
248
|
+
this.records[a][c].readonly&&1!=d.readOnly&&1!=d.readonly||b.classList.add(_$_5163[18])};k.applyOverflow=function(b,c,a){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(b.style.overflow=_$_5163[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?_$_5163[3]:_$_5163[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<=
|
|
249
|
+
d[e].indexOf(_$_5163[27])){var f=d[e].split(_$_5163[27]);var g=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,_$_5163[106],a[d[e]])};return k}(),Ha=function(){var k=function(b){b.getColumnOptions=k[_$_5163[51]];b.setColumnOptions=k[_$_5163[11]];b.getCells=k.getCells;b.setCells=k.setCells;b.getProperties=
|
|
250
|
+
k[_$_5163[51]];b.setProperties=k[_$_5163[11]];b.getProperty=k[_$_5163[51]];b.setProperty=k[_$_5163[11]];b.resetProperty=k[_$_5163[11]];b.getOptions=k[_$_5163[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==_$_5163[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[_$_5163[51]]=function(b,c){var a=null;void 0!==c&&(c=E.getColumnNameFromCoords(b,
|
|
251
|
+
c),this.options.cells&&this.options.cells[c]&&(a=this.options.cells[c]));null===a&&(a=this.options.columns[b]);if(!a)a={type:_$_5163[55]};else if(!a.type||typeof a.type==_$_5163[17]&&!t.editors[a.type])a.type=_$_5163[55];return a};k[_$_5163[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==_$_5163[83]&&(b.value=a),d.push(b)):typeof c===_$_5163[83]&&
|
|
252
|
+
(b={x:b,value:c},d.push(b));if(Array.isArray(d))for(a=0;a<d.length;a++){var e=d[a];b=e.x;c=e.y;var f=k[_$_5163[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===_$_5163[13]){e.oldValue=f;if(h&&typeof h.destroyCell==_$_5163[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=_$_5163[55]);this.options.columns[b]=
|
|
253
|
+
g;g.width&&this.colgroup[b]&&this.colgroup[b].setAttribute(_$_5163[150],parseInt(g.width));typeof g.title!==_$_5163[13]&&this.headers[b]&&(g.title?(this.headers[b].innerText=g.title,this.headers[b].setAttribute(_$_5163[164],g.title)):(this.headers[b].innerText=E.getColumnName(b),this.headers[b].removeAttribute(_$_5163[164])));g.tooltip&&this.headers[b]&&(this.headers[b].title=g.tooltip);if(l&&typeof l.createCell==_$_5163[84])for(c=0;c<this.records.length;c++)this.records[c]&&this.records[c][b]&&(M.applyProperties.call(this,
|
|
254
|
+
this.records[c][b].element,b,c),l.createCell(this.records[c][b].element,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]:_$_5163[3],h&&typeof h.destroyCell==_$_5163[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[_$_5163[51]].call(this,b,c),l=t.editors[g.type]),l&&
|
|
255
|
+
typeof l.createCell==_$_5163[84]&&this.records[c]&&this.records[c][b]&&(h=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(_$_5163[250]),!1;this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_5163[78],records:d});K.call(this,_$_5163[78],{data:d});return!0};return k}(),Aa=function(){var k=function(c,a){Array.isArray(a)||(a=[a]);for(var d,e=c?_$_5163[3]:_$_5163[40],
|
|
256
|
+
f=Object.keys(a),g=0;g<f.length;g++)if(d=this.rows[a[f[g]]])d.element&&(d.element.style.display=e),d.visible=c;this.resetBorders();H.refresh.call(this)},b=function(c){c.getRow=b[_$_5163[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[_$_5163[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=
|
|
257
|
+
[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)c?a.push(e):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(_$_5163[143]);d.setAttribute(_$_5163[43],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!a&&(this.options.rows[c].style&&d.setAttribute(_$_5163[98],this.options.rows[c].style),this.options.rows[c].height&&(d.style.height=parseInt(this.options.rows[c].height)+
|
|
258
|
+
_$_5163[44]),this.options.rows[c].title&&(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,_$_5163[269],this,c,d);0==this.rows[c].visible&&(d.style.display=_$_5163[40]);e||(e=parseInt(c+1));a=document.createElement(_$_5163[145]);a.innerHTML=e;a.setAttribute(_$_5163[43],c);a.className=_$_5163[270];d.appendChild(a);return d};b.move=function(c,a){if(!R.call(this.parent,this))return!1;
|
|
259
|
+
c=parseInt(c);a=parseInt(a);if(!this.rows[a]||!this.rows[c])return console.error(_$_5163[271]),!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)):
|
|
260
|
+
this.rows[c].element&&(this.tbody.removeChild(this.rows[c].element),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,_$_5163[66],{f:c,t:a});Y.references.call(this);Y.update.call(this);V.call(this.parent,{worksheet:this,action:_$_5163[66],oldValue:c,
|
|
261
|
+
newValue:a});F.call(this.parent,_$_5163[272],this,c,a)};b.add=function(c,a,d,e){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_5163[273]),!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,_$_5163[274],this,a,g,d))return console.log(_$_5163[275]),
|
|
262
|
+
!1;this.resetBorders();var l=d?a:a+1,m=0;c=[];for(var p=[],n=this.rows.splice(l),q=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]=_$_5163[3];e&&e[m]&&e[m].data&&(typeof e[m].data[A]!==_$_5163[13]?w[A]=e[m].data[A]:typeof e[m].data[C]!==_$_5163[13]&&(w[A]=e[m].data[C]));f.push({x:C,y:u,value:w[A],
|
|
263
263
|
force:!0})}p.push({id:y,data:w});m++}this.rows=this.rows.concat(n);this.records=this.records.concat(v);Array.prototype.push.apply(this.options.data,q);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=
|
|
264
|
-
n[0]?n[0].element:null,A=H.renderRow.call(this,u,null,null,!0),h?this.tbody.insertBefore(A,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
|
-
this.results&&(l=this.results.indexOf(parseInt(l)),this.results=ua.refresh.call(this));Y.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ta[_$
|
|
266
|
-
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(_$
|
|
267
|
-
if(!1===F.call(this.parent,_$
|
|
268
|
-
d,e),
|
|
269
|
-
a);ba.updateConfig.call(this,1,0,c,a);K.call(this,_$
|
|
270
|
-
rowNumber:c,numOfRows:a,insertBefore:1,data:d,attributes:e});F.call(this.parent,_$
|
|
271
|
-
this.resetBorders()},b=function(c){c.getColumn=b[_$
|
|
272
|
-
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);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(_$
|
|
264
|
+
n[0]?n[0].element:null,A=H.renderRow.call(this,u,null,null,!0),h?this.tbody.insertBefore(A,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,_$_5163[62],{numOfRows:g,rowNumber:a,insertBefore:d?1:0,data:p});l=this.tbody.firstChild.getAttribute(_$_5163[43]);
|
|
265
|
+
this.results&&(l=this.results.indexOf(parseInt(l)),this.results=ua.refresh.call(this));Y.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ta[_$_5163[11]].call(this,this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$_5163[3],H[_$_5163[46]].call(this,l));Y.update.call(this);U.call(this);ha.refresh.call(this);V.call(this.parent,{worksheet:this,action:_$_5163[62],rowNumber:a,numOfRows:g,insertBefore:d,data:p});F.call(this.parent,_$_5163[276],
|
|
266
|
+
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(_$_5163[277]),!1;var d=null,e={},f=[],g=0;void 0==c&&(a=this.getSelectedRows(),a[0]?(c=parseInt(a[0].getAttribute(_$_5163[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()));
|
|
267
|
+
if(!1===F.call(this.parent,_$_5163[278],this,c,a))return console.log(_$_5163[279]),!1;if(-1<parseInt(c)&&0<parseInt(a)){h=parseInt(this.thead.lastChild.children[1].getAttribute(_$_5163[42]));var l=parseInt(this.tbody.firstChild.getAttribute(_$_5163[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,_$_5163[280],d,e),M.getAttributes.call(this,_$_5163[98],d,e),M.getAttributes.call(this,_$_5163[281],
|
|
268
|
+
d,e),M.getAttributes.call(this,_$_5163[282],d,e),M.getAttributes.call(this,_$_5163[265],d,e),M.getAttributes.call(this,_$_5163[264],d,e),f[d]=!0;if(d=W.getChain.call(this,e.values))e.formulas=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,
|
|
269
|
+
a);ba.updateConfig.call(this,1,0,c,a);K.call(this,_$_5163[63],{rowNumber:c,numOfRows:a,data:d});Y.references.call(this,f);this.results&&(this.results=ua.refresh.call(this));0<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=_$_5163[3],H.call(this),H[_$_5163[46]].call(this,l,h));Y.update.call(this,!0);V.call(this.parent,{worksheet:this,action:_$_5163[63],
|
|
270
|
+
rowNumber:c,numOfRows:a,insertBefore:1,data:d,attributes:e});F.call(this.parent,_$_5163[283],this,c,a,m,d,e)}};return b}(),Xa=function(){var k=function(c,a){Array.isArray(a)||(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)+_$_5163[44]:_$_5163[142]),e.visible=c;H.refresh.call(this);0<this.options.freezeColumns&&ka[_$_5163[11]].call(this,this.options.freezeColumns);
|
|
271
|
+
this.resetBorders()},b=function(c){c.getColumn=b[_$_5163[51]];c.getColumnIdByName=b.getByName;c.getPrimaryKey=b.getPrimaryKey;c.getSelectedColumns=b.selected;c.moveColumn=b.move;c.insertColumn=b.add;c.deleteColumn=b.del;c.showColumn=k.bind(c,!0);c.hideColumn=k.bind(c,!1)};b[_$_5163[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==
|
|
272
|
+
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);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(_$_5163[284]),!1;if(!this.options.columns[a])return console.error(_$_5163[285]),!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-
|
|
273
273
|
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):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=
|
|
274
|
-
this.tbody.children[f].getAttribute(_$
|
|
275
|
-
this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$
|
|
276
|
-
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,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
|
-
d&&(c<=d||d<=d)&&ka[_$
|
|
278
|
-
if(void 0==a||a>c||0>a)a=c,d=!1;l||(l=1);if(!1===F.call(this.parent,_$
|
|
279
|
-
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]),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(
|
|
274
|
+
this.tbody.children[f].getAttribute(_$_5163[43]);e=(c>a?this.records[g][a].element:this.records[g][a].element.nextSibling)||null;this.tbody.children[f].insertBefore(M[_$_5163[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]);
|
|
275
|
+
this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_5163[43])),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,
|
|
276
|
+
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,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,_$_5163[67],{f:c,t:a});Y.references.call(this);Y.update.call(this);0<
|
|
277
|
+
d&&(c<=d||d<=d)&&ka[_$_5163[11]].call(this,d);V.call(this.parent,{worksheet:this,action:_$_5163[67],oldValue:c,newValue:a});F.call(this.parent,_$_5163[286],this,c,a)};b.add=function(c,a,d,e,f,g){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_5163[287]),!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;
|
|
278
|
+
if(void 0==a||a>c||0>a)a=c,d=!1;l||(l=1);if(!1===F.call(this.parent,_$_5163[288],this,a,l,d))return console.log(_$_5163[289]),!1;ha.reset.call(this);if(1==this.dataType)var p=parseInt((_$_5163[3]+Date.now()).substr(-8));e||(e=[]);for(m=0;m<l;m++)e[m]||(e[m]={type:_$_5163[55],source:[],options:[],width:this.options.defaultColWidth}),1==this.dataType&&typeof e[m].name==_$_5163[13]&&(e[m].name=_$_5163[290]+(p+m));var n=d?a:a+1;this.options.columns=E.injectArray(this.options.columns,n,e);p=function(w,
|
|
279
|
+
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]),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[_$_5163[51]].call(this,A,w,!0),C);else for(A=n;A<l+n;A++)this.rows[w].element.appendChild(M[_$_5163[51]].call(this,A,w,!0))};var q=this.headers.splice(n),v=
|
|
280
280
|
this.colgroup.splice(n);q[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,q[0])&&p.call(this,q[0],v[0]):this.headers[c]&&0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[c])&&p.call(this);this.headers=this.headers.concat(q);this.colgroup=this.colgroup.concat(v);aa.adjust.call(this,n,l,1);oa.adjust.call(this,a,l,1,g);g=0;v=q=p=null;for(var u=0;u<this.options.data.length;u++){this.dataType||(q=this.options.data[u].splice(n));v=this.records[u].splice(n);g=0;
|
|
281
|
-
for(var y=n;y<l+n;y++)p=f[u]&&f[u][g]?f[u][g]:_$
|
|
282
|
-
this.records[u].concat(v)}this.merged.cols[n]&&ba.updateConfig.call(this,0,1,n-1,l);K.call(this,_$
|
|
283
|
-
if(!this.options.allowDeleteColumn)return console.error(_$
|
|
284
|
-
this,c,a))return console.log(_$
|
|
285
|
-
f++),n[q]=this.options.columns[v],q++;for(var u=0;u<this.options.data.length;u++)for(v=c;v<c+a;v++)q=E.getColumnNameFromCoords(v,u),
|
|
286
|
-
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||(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
|
-
Y.references.call(this,e);H.limited.call(this)&&0<f&&(this.tbody.textContent=_$
|
|
288
|
-
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(_$
|
|
289
|
-
0;h<g.length;h++){if(typeof d[h]==_$
|
|
290
|
-
(l=m[C].split(_$
|
|
291
|
-
0;q<d.length;q++){var v=E.getColumnNameFromCoords(d[q].x,d[q].y);p.call(this,v,e,f)}}else for(f=Object.keys(d),q=0;q<f.length;q++)if(v=d[f[q]])for(typeof v==_$
|
|
292
|
-
n[p[q]][d[e]]);this.options.style[p[q]]=m[p[q]].join(_$
|
|
293
|
-
d[e]);else c.call(this,d);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$
|
|
294
|
-
(this.records[l][h].element.setAttribute(_$
|
|
295
|
-
this.options.comments&&this.options.comments[b]?this.options.comments[b]:!1:this.options.comments};k[_$
|
|
296
|
-
_$
|
|
297
|
-
k.reset};k[_$
|
|
298
|
-
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,_$
|
|
299
|
-
d?-1:a<d?1:0:a===_$
|
|
300
|
-
[g,e];g=typeof this.parent.config.sorting===_$
|
|
301
|
-
g;Ea.call(this,!1);ha.reset.call(this);K.call(this,_$
|
|
302
|
-
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(_$
|
|
303
|
-
k.quantityOfPages;b.page=k[_$
|
|
304
|
-
k[_$
|
|
305
|
-
this.rows.length)/parseInt(this.options.pagination));console.log(_$
|
|
306
|
-
function(){this.pagination.children[0].innerHTML=_$
|
|
307
|
-
a;c++)d=document.createElement(_$
|
|
308
|
-
k[_$
|
|
309
|
-
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(_$
|
|
310
|
-
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[_$
|
|
311
|
-
0;a<this.options.footers.length;a++)this.tfoot.children[a].children[c].classList.remove(_$
|
|
312
|
-
{},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++)
|
|
313
|
-
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(_$
|
|
314
|
-
H.pageUp.call(a,1,null,f):H.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$
|
|
315
|
-
_$
|
|
316
|
-
this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$
|
|
317
|
-
this.scrollY=U.build.call(a,_$
|
|
318
|
-
document.body.offsetWidth-8),this.content.style.overflow=_$
|
|
319
|
-
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(_$
|
|
320
|
-
m+1,g.element.children[0].innerHTML=f));var p=function(q,v){g=this.records[v][q];h=g.x;l=g.y;h!=q&&(g.x=q,g.element&&g.element.setAttribute(_$
|
|
321
|
-
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,_$
|
|
322
|
-
this.records[d][e],this.parent.config.updateTable.call(this,this,a.element,e,d,
|
|
323
|
-
a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$
|
|
324
|
-
d);b.classList.add(_$
|
|
325
|
-
e.appendChild(Ra(a));a.textarea=document.createElement(_$
|
|
326
|
-
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=Ka;a.progress=La;a.undo=V.undo;a.redo=V.redo;a.setToolbar=fa[_$
|
|
327
|
-
(a.config.definedNames={},console.log(_$
|
|
328
|
-
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,_$
|
|
329
|
-
_$
|
|
330
|
-
(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==_$
|
|
331
|
-
Ba[c[a]],c[a]==_$
|
|
332
|
-
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(_$
|
|
333
|
-
column:b,oldValue:a,newValue:c});K.call(this,_$
|
|
334
|
-
this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=a+_$
|
|
335
|
-
1==f&&(d=e);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$
|
|
336
|
-
g.selected;return g.element},b=null,c=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$
|
|
337
|
-
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(_$
|
|
338
|
-
g=h.children[1].selectAll;h.children[1].textContent=_$
|
|
339
|
-
a[_$
|
|
340
|
-
_$
|
|
341
|
-
function(){ua.reset.call(this);this.resetSelection();this.resetBorders();var g=qa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$
|
|
342
|
-
g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=!1;if(g){e=[];g=new RegExp(g,_$
|
|
343
|
-
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=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
|
-
p};var h=document.createElement(_$
|
|
345
|
-
g.selectAll.innerHTML=_$
|
|
346
|
-
p=function(n){1==h?m[n].classList.add(_$
|
|
347
|
-
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<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
|
-
document.createElement(_$
|
|
349
|
-
d.appendChild(document.createTextNode(B(_$
|
|
350
|
-
_$
|
|
351
|
-
a);if(typeof this.parent.config.onbeforesearch==_$
|
|
352
|
-
!0;this.searchContainer.style.display=_$
|
|
353
|
-
e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&(this.searchContainer.style.display=_$
|
|
354
|
-
e=k[_$
|
|
355
|
-
(1==l.allowRenameWorksheet&&h.push({title:B(_$
|
|
356
|
-
if(e==_$
|
|
357
|
-
b.selectedCell[1],n)})}}),h.push({type:_$
|
|
358
|
-
onclick:function(){b.setHeader(f)}}),b.options.data.length||(h.push({type:_$
|
|
359
|
-
parseInt(a),1)}}),h.push({title:B(_$
|
|
360
|
-
g),q=prompt(B(_$
|
|
361
|
-
function(){k.show.call(b.parent)};b.hideToolbar=function(){k.hide.call(b.parent)};b.refreshToolbar=function(){k.update.call(b.parent,b)}};k[_$
|
|
362
|
-
(b.responsive=!0,b.bottom=!1,b.maxWidth=this.element.offsetWidth);return b};k.show=function(){this.toolbar.innerHTML||k.build.call(this);this.toolbar.style.display=_$
|
|
363
|
-
a;c.refresh()}};k.build=function(){for(var b=k[_$
|
|
364
|
-
{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])?h.color.select(h.color.toHex(l)):h.color.select(_$
|
|
365
|
-
this;b=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[b])};k.getDefault=function(){return[{content:_$
|
|
366
|
-
onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$
|
|
367
|
-
b+_$
|
|
368
|
-
b.classList.remove(_$
|
|
369
|
-
_$
|
|
370
|
-
e[n]=d!=_$
|
|
371
|
-
_$
|
|
372
|
-
onchange:function(f,g){f.parentNode.children[1].style.color=g;c.color=g}});d=document.createElement(_$
|
|
373
|
-
d.style.flex=_$
|
|
281
|
+
for(var y=n;y<l+n;y++)p=f[u]&&f[u][g]?f[u][g]:_$_5163[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,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(q));this.records[u]=
|
|
282
|
+
this.records[u].concat(v)}this.merged.cols[n]&&ba.updateConfig.call(this,0,1,n-1,l);K.call(this,_$_5163[64],{numOfColumns:l,columnNumber:a,insertBefore:d?1:0,properties:e,data:f});Y.references.call(this);h.length&&ea.applyValues.call(this,h);Y.update.call(this);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_5163[64],columnNumber:a,numOfColumns:l,insertBefore:d,properties:e,data:f});F.call(this.parent,_$_5163[291],this,a,l,[],d)};b.del=function(c,a){if(!R.call(this.parent,this))return!1;
|
|
283
|
+
if(!this.options.allowDeleteColumn)return console.error(_$_5163[292]),!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-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(_$_5163[293])));if(!1===F.call(this.parent,_$_5163[294],
|
|
284
|
+
this,c,a))return console.log(_$_5163[295]),!1;if(-1<parseInt(c)&&0<parseInt(a)){g=parseInt(this.thead.lastChild.children[1].getAttribute(_$_5163[42]));var h=0;this.tbody.firstChild&&(h=parseInt(this.tbody.firstChild.getAttribute(_$_5163[43])));this.resetBorders();var l=null,m=[],p=[],n=[];var q=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]),
|
|
285
|
+
f++),n[q]=this.options.columns[v],q++;for(var u=0;u<this.options.data.length;u++)for(v=c;v<c+a;v++)q=E.getColumnNameFromCoords(v,u),M.getAttributes.call(this,_$_5163[280],q,d),M.getAttributes.call(this,_$_5163[98],q,d),M.getAttributes.call(this,_$_5163[281],q,d),M.getAttributes.call(this,_$_5163[282],q,d),M.getAttributes.call(this,_$_5163[265],q,d),M.getAttributes.call(this,_$_5163[264],q,d),e[q]=!0,this.records[u][v].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][v].element)&&
|
|
286
|
+
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||(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,_$_5163[65],{columnNumber:c,numOfColumns:a});
|
|
287
|
+
Y.references.call(this,e);H.limited.call(this)&&0<f&&(this.tbody.textContent=_$_5163[3],H.call(this),H[_$_5163[46]].call(this,h,g));Y.update.call(this,!0);V.call(this.parent,{worksheet:this,action:_$_5163[65],columnNumber:c,numOfColumns:a,insertBefore:1,data:p,properties:n,attributes:d,extra:l});F.call(this.parent,_$_5163[296],this,c,a,m,n,d)}}};return b}(),Qa=function(){var k={},b={},c=function(d){if(typeof d==_$_5163[17]){var e=d;d=E.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,
|
|
288
|
+
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(_$_5163[98],_$_5163[3]));this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$_5163[51]];d.setStyle=a[_$_5163[11]];d.resetStyle=a.reset};a[_$_5163[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_5163[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var h=
|
|
289
|
+
0;h<g.length;h++){if(typeof d[h]==_$_5163[17])var l=e&&e[d[h]]?e[d[h]]:_$_5163[3];else l=E.getColumnNameFromCoords(d[h].x,d[h].y),l=e&&e[l]?e[l]:_$_5163[3];f.push(l)}return f}return this.options.style};a[_$_5163[11]]=function(d,e,f,g){if(!R.call(this.parent,this))return!1;this.options.style||(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(_$_5163[216]):(h[u]=_$_5163[3],m=[]),n[u]={},m.length))for(var C=0;C<m.length;C++)m[C]&&m[C].trim()&&
|
|
290
|
+
(l=m[C].split(_$_5163[134]),n[u][l[0].trim()]=l[1].trim());b[u]||(b[u]=[]);k[u]||(k[u]=[]);n[u][y]||(n[u][y]=_$_5163[3]);b[u].push([y+_$_5163[134]+n[u][y]]);n[u][y]=n[u][y]&&n[u][y]==w&&!g?_$_5163[3]:w;k[u].push([y+_$_5163[134]+n[u][y]]);w=E.getCoordsFromColumnName(u);this.records[w[1]]&&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==_$_5163[17])p.call(this,d,e,f);else{if(d&&d.length)for(var q=
|
|
291
|
+
0;q<d.length;q++){var v=E.getColumnNameFromCoords(d[q].x,d[q].y);p.call(this,v,e,f)}}else for(f=Object.keys(d),q=0;q<f.length;q++)if(v=d[f[q]])for(typeof v==_$_5163[17]&&(v=v.split(_$_5163[216])),e=0;e<v.length;e++)v[e]&&(typeof v[e]==_$_5163[17]&&(v[e]=v[e].split(_$_5163[134])),v[e][0].trim()&&p.call(this,f[q],v[e][0].trim(),v[e][1].trim()));m={};p=Object.keys(n);if(p.length){for(q=0;q<p.length;q++){m[p[q]]||(m[p[q]]=[]);d=Object.keys(n[p[q]]);for(e=0;e<d.length;e++)m[p[q]].push(d[e]+_$_5163[113]+
|
|
292
|
+
n[p[q]][d[e]]);this.options.style[p[q]]=m[p[q]].join(_$_5163[297])}p=Object.keys(k);for(q=0;q<p.length;q++)k[p[q]]=k[p[q]].join(_$_5163[216]);p=Object.keys(b);for(q=0;q<p.length;q++)b[p[q]]=b[p[q]].join(_$_5163[216]);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_5163[70],oldValue:b,newValue:k});K.call(this,_$_5163[70],[k]);F.call(this.parent,_$_5163[298],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,
|
|
293
|
+
d[e]);else c.call(this,d);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_5163[71],cells:d,oldValue:b});K.call(this,_$_5163[71],[d]);F.call(this.parent,_$_5163[300],this,d)}else console.error(_$_5163[299])};a.update=function(d){k={};b={};for(var e,f=Object.keys(d),g=0;g<f.length;g++){b[f[g]]=this.options.style[f[g]]||_$_5163[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&&
|
|
294
|
+
(this.records[l][h].element.setAttribute(_$_5163[98],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,_$_5163[71],[f]);K.call(this,_$_5163[70],[k]);F.call(this.parent,_$_5163[298],this,k,b)};return a}(),Ya=function(){var k=function(b){b.getComments=k[_$_5163[51]];b.setComments=k[_$_5163[11]]};k[_$_5163[51]]=function(b){return b&&typeof b==_$_5163[17]?
|
|
295
|
+
this.options.comments&&this.options.comments[b]?this.options.comments[b]:!1:this.options.comments};k[_$_5163[11]]=function(b,c){if(!R.call(this.parent,this))return!1;if(typeof b==_$_5163[17]){var a={};a[b]=c}else a=b;if(c=F.call(this.parent,_$_5163[301],this,a))a=c;else if(!1===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
|
+
_$_5163[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(_$_5163[267],c):this.records[f[1]][f[0]].element.removeAttribute(_$_5163[267])))}V.call(this.parent,{worksheet:this,action:_$_5163[75],newValue:a,oldValue:b});K.call(this,_$_5163[75],[a]);F.call(this.parent,_$_5163[302],this,a,b)}};return k}(),Za=function(){var k=function(b){b.getMeta=k[_$_5163[51]];b.setMeta=k[_$_5163[11]];b.resetMeta=
|
|
297
|
+
k.reset};k[_$_5163[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[_$_5163[11]]=function(b,c,a){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof b==_$_5163[17]&&c){a||(a=_$_5163[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]]),
|
|
298
|
+
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,_$_5163[303],[a]),F.call(this.parent,_$_5163[304],this,a))}};k.reset=function(){this.options.meta={};K.call(this,_$_5163[305],{});F.call(this.parent,_$_5163[306],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===_$_5163[3]&&d!==_$_5163[3]?1:a!==_$_5163[3]&&d===_$_5163[3]?-1:a>
|
|
299
|
+
d?-1:a<d?1:0:a===_$_5163[3]&&d!==_$_5163[3]?1:a!==_$_5163[3]&&d===_$_5163[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(_$_5163[307])?1:0:c?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Ha[_$_5163[51]].call(this,b,g),e=this.records[g][b].v,e=d.type==_$_5163[253]||d.type==_$_5163[258]||d.type==_$_5163[259]||d.type==_$_5163[308]||d.type==_$_5163[14]||d.type==_$_5163[309]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=
|
|
300
|
+
[g,e];g=typeof this.parent.config.sorting===_$_5163[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,_$_5163[310],this,b,c,a))a=g;else if(!1===g)return!1;if(d)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(B(_$_5163[311])))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]]=
|
|
301
|
+
g;Ea.call(this,!1);ha.reset.call(this);K.call(this,_$_5163[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:_$_5163[76],column:b,newValue:a,oldValue:f,direction:c});F.call(this.parent,_$_5163[312],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=
|
|
302
|
+
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(_$_5163[313]),this.headers[a].classList.remove(_$_5163[307]);c?this.headers[b].classList.add(_$_5163[313]):this.headers[b].classList.add(_$_5163[307])};return k}(),ta=function(){var k=function(b){b.whichPage=k.whichPage;b.quantityOfPages=
|
|
303
|
+
k.quantityOfPages;b.page=k[_$_5163[11]];b.updatePagination=k.update};k.build=function(){this.pageNumber=0;var b=document.createElement(_$_5163[20]),c=document.createElement(_$_5163[20]);this.pagination=document.createElement(_$_5163[20]);this.pagination.classList.add(_$_5163[314]);this.pagination.appendChild(b);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_5163[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,
|
|
304
|
+
k[_$_5163[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_5163[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))),Math.ceil((parseInt(b)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_5163[315]);return!1};k.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:
|
|
305
|
+
this.rows.length)/parseInt(this.options.pagination));console.log(_$_5163[315]);return!1};k[_$_5163[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,_$_5163[317],this,b,a,d))return!1;this.pageNumber=b;H.resetY.call(this);aa.refresh.call(this);typeof c==_$_5163[84]&&c.call(this);F.call(this.parent,_$_5163[318],this,b,a,d)}else console.error(_$_5163[316])};k.update=
|
|
306
|
+
function(){this.pagination.children[0].innerHTML=_$_5163[3];this.pagination.children[1].innerHTML=_$_5163[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>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(_$_5163[20]);d.className=_$_5163[320];d.innerHTML=_$_5163[214];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=
|
|
307
|
+
a;c++)d=document.createElement(_$_5163[20]),d.className=_$_5163[320],d.innerHTML=c,this.pagination.children[1].appendChild(d),this.pageNumber==c-1&&d.classList.add(_$_5163[321]);a<b&&(d=document.createElement(_$_5163[20]),d.className=_$_5163[320],d.innerHTML=_$_5163[215],d.title=b,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=B(_$_5163[322],[this.pageNumber+1,b])}else this.pagination.children[0].innerHTML=B(_$_5163[319])}};return k}(),ka=function(){var k=function(b){b.setFreezeColumns=
|
|
308
|
+
k[_$_5163[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=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(_$_5163[50]),c.style.left=d+1+_$_5163[44];!1!==this.options.columns[e].visible&&(d+=this.options.columns[e].width)}}};k.headers=
|
|
309
|
+
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(_$_5163[50]);this.headers[a].style.left=b+1+_$_5163[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_5163[50]),this.footers.content[d][a].element.style.left=b+1+_$_5163[44];!1!==this.options.columns[a].visible&&(b+=this.options.columns[a].width)}}else k.reset.call(this)};k[_$_5163[11]]=
|
|
310
|
+
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[_$_5163[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(_$_5163[50]),b.children[c].style.left=_$_5163[3];for(var a=0;a<this.rows.length;a++)if(b=this.rows[a].element)b.children[c].classList.remove(_$_5163[50]),b.children[c].style.left=_$_5163[3];if(this.options.footers)for(a=
|
|
311
|
+
0;a<this.options.footers.length;a++)this.tfoot.children[a].children[c].classList.remove(_$_5163[50]),this.tfoot.children[a].children[c].style.left=_$_5163[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]?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=
|
|
312
|
+
{},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-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,
|
|
313
|
+
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(_$_5163[20]);this.content.classList.add(_$_5163[323]);this.content.addEventListener(_$_5163[324],function(f){if(H.limited.call(a)&&!a.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?H.pageLeft.call(a,1,null,f):H.pageRight.call(a,1,null,f):0>f.deltaY?
|
|
314
|
+
H.pageUp.call(a,1,null,f):H.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$_5163[325],function(f){if(!a.edition)return f.preventDefault(),!1});this.table=document.createElement(_$_5163[326]);this.thead=document.createElement(_$_5163[327]);this.tbody=document.createElement(_$_5163[328]);this.tfoot=document.createElement(_$_5163[329]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_5163[330]);var d=document.createElement(_$_5163[167]);d.setAttribute(_$_5163[150],
|
|
315
|
+
_$_5163[331]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_5163[143]);d=document.createElement(_$_5163[145]);d.classList.add(_$_5163[332]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_5163[333]);this.table.setAttribute(_$_5163[334],_$_5163[97]);this.table.setAttribute(_$_5163[335],_$_5163[97]);this.table.setAttribute(_$_5163[336],_$_5163[337]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);
|
|
316
|
+
this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.textOverflow||this.table.classList.add(_$_5163[338]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_5163[339]);this.corner=document.createElement(_$_5163[20]);this.corner.className=_$_5163[340];this.corner.setAttribute(_$_5163[336],_$_5163[341]);this.corner.setAttribute(_$_5163[342],_$_5163[343]);0==this.options.selectionCopy&&(this.corner.style.display=_$_5163[40]);this.scrollX=U.build.call(a,_$_5163[45]);
|
|
317
|
+
this.scrollY=U.build.call(a,_$_5163[344]);d=document.createElement(_$_5163[20]);d.appendChild(this.content);d.appendChild(this.scrollY);d.classList.add(_$_5163[345]);var e=document.createElement(_$_5163[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_5163[346]);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(e);1==this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=300),this.options.tableWidth||(this.options.tableWidth=
|
|
318
|
+
document.body.offsetWidth-8),this.content.style.overflow=_$_5163[49],this.content.style.maxWidth=parseInt(this.options.tableWidth)+_$_5163[44],this.options.pagination||(this.content.style.maxHeight=parseInt(this.options.tableHeight)+_$_5163[44]));this.options.freezeColumns>this.options.columns.length&&console.error(_$_5163[347]);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=
|
|
319
|
+
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(_$_5163[42]),h!=f&&(g.setAttribute(_$_5163[42],f),g.getAttribute(_$_5163[164])||(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]=m,g.element&&(g.element.setAttribute(_$_5163[43],m),g.element.children[0].setAttribute(_$_5163[43],m),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:
|
|
320
|
+
m+1,g.element.children[0].innerHTML=f));var p=function(q,v){g=this.records[v][q];h=g.x;l=g.y;h!=q&&(g.x=q,g.element&&g.element.setAttribute(_$_5163[42],q));l!=v&&(g.y=v,g.element&&g.element.setAttribute(_$_5163[43],v));if(h!=q||l!=v){var u=E.getColumnNameFromCoords(h,l);q=E.getColumnNameFromCoords(q,v);e[u]=q}};if(a){m=function(q,v){q&&q[v]&&delete q[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,
|
|
321
|
+
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,_$_5163[348],d);k.call(this,_$_5163[280],e);k.call(this,_$_5163[281],e);k.call(this,_$_5163[98],e);k.call(this,_$_5163[282],e);k.call(this,_$_5163[265],e);this.options.mergeCells&&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==_$_5163[84])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)a=
|
|
322
|
+
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:[],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);
|
|
323
|
+
a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$_5163[83]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=b.offsetWidth-50+_$_5163[44]);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,
|
|
324
|
+
d);b.classList.add(_$_5163[349]);1==c.fullscreen&&b.classList.add(_$_5163[15]);var e=document.createElement(_$_5163[20]);a.toolbar=document.createElement(_$_5163[20]);a.toolbar.className=_$_5163[350];e.appendChild(a.toolbar);a.filter=ca.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_5163[20]);a.helper.className=_$_5163[351];e.appendChild(a.helper);a.loading=document.createElement(_$_5163[20]);a.loading.classList.add(_$_5163[352]);e.appendChild(a.loading);e.appendChild(da.build(a));
|
|
325
|
+
e.appendChild(Ra(a));a.textarea=document.createElement(_$_5163[353]);a.textarea.className=_$_5163[354];a.textarea.tabIndex=_$_5163[355];e.appendChild(a.textarea);d.position===_$_5163[356]?b.insertBefore(e,b.children[0]):b.insertBefore(e,b.children[1]);b.appendChild(Ja.call(a,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;
|
|
326
|
+
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=Ka;a.progress=La;a.undo=V.undo;a.redo=V.redo;a.setToolbar=fa[_$_5163[11]];a.getToolbar=fa[_$_5163[51]];a.showToolbar=fa.show;a.hideToolbar=fa.hide;a.tools=e;1!==a.edition&&(b=Object.keys(a.config.definedNames))&&b.length&&
|
|
327
|
+
(a.config.definedNames={},console.log(_$_5163[357]));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==_$_5163[84])t.extensions[b[d]].oninit(a,c);return a},worksheet:function(b,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);
|
|
328
|
+
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,_$_5163[358],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_5163[359]+ia.nextName());var d=this.options.worksheetName;I(d)&&console.log(_$_5163[360]+d+_$_5163[361]);I(d,a);this.element=b.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===
|
|
329
|
+
_$_5163[49]&&(f.style.display=_$_5163[40])});this.element.classList.add(_$_5163[362]);this.element.jexcel=this;Y.build.call(this);pa.execute.call(this.parent,_$_5163[363],[this]);this.options.data&&500<this.options.data.length&&!H.limited.call(this)&&!this.options.pagination&&console.error(_$_5163[364])};return a},row:function(b,c){this.rows[b]||(this.rows[b]={element:null,y:b});c&&(this.rows[b].id=c,sa[_$_5163[11]].call(this,c));this.options.rows&&this.options.rows[b]&&this.options.rows[b].height&&
|
|
330
|
+
(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==_$_5163[13]&&(a=L.call(this,b,c),null===a||void 0===a)&&(a=_$_5163[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]==_$_5163[365]?window:b).addEventListener(c[a],
|
|
331
|
+
Ba[c[a]],c[a]==_$_5163[366]||c[a]==_$_5163[367]||c[a]==_$_5163[368]?{passive:!1}:{})},unbind:function(b){for(var c=Object.keys(Ba),a=0;a<c.length;a++)(c[a]==_$_5163[365]?window:b).removeEventListener(c[a],Ba[c[a]])}};return k}(),ab=function(){var k=function(b){b.getWidth=k[_$_5163[51]];b.setWidth=k[_$_5163[11]]};k[_$_5163[51]]=function(b){var c=this.options.columns;if(typeof b===_$_5163[13]){b=[];for(var a=0;a<c.length;a++)b.push(c[a].width)}else b=c[b].width;return b};k[_$_5163[11]]=function(b,c,
|
|
332
|
+
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(_$_5163[150],e)}}else a||(a=this.options.columns[b].width),this.options.columns[b].width=c,this.colgroup[b]&&this.colgroup[b].setAttribute(_$_5163[150],c);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_5163[72],
|
|
333
|
+
column:b,oldValue:a,newValue:c});K.call(this,_$_5163[72],{column:b,width:c,oldWidth:a});F.call(this.parent,_$_5163[369],this,b,c,a)}H.refresh.call(this)};return k}(),bb=function(){var k=function(c){c.getHeight=k[_$_5163[51]];c.setHeight=k[_$_5163[11]]};k[_$_5163[51]]=function(c){if(c)c=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:
|
|
334
|
+
this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=a+_$_5163[44];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=a+_$_5163[44];this.rows[c].height=a;return d};k[_$_5163[11]]=function(c,a,d){if(!R.call(this.parent,this))return!1;var e,f=typeof d==_$_5163[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),
|
|
335
|
+
1==f&&(d=e);this.refreshBorders();V.call(this.parent,{worksheet:this,action:_$_5163[73],row:c,oldValue:d,newValue:a});K.call(this,_$_5163[73],{row:c,height:a,oldHeight:d});F.call(this.parent,_$_5163[370],this,c,a,d)}H.refresh.call(this)};return k}(),ca=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_5163[371]);g.element.innerHTML=g.value;var l=document.createElement(_$_5163[220]);l.type=_$_5163[252];l.value=h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=
|
|
336
|
+
g.selected;return g.element},b=null,c=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$_5163[11]];g.getFilter=f[_$_5163[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};f[_$_5163[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_5163[372]),g.filters=h):(l&&l.classList.remove(_$_5163[372]),g.filters=null);f.update.call(this)};f[_$_5163[51]]=
|
|
337
|
+
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(_$_5163[166])){c=!0;var h=this.parent.element.getBoundingClientRect(),l=this.headers[b].getBoundingClientRect();g=l.left-h.left;l=l.top-h.top+l.height;h=this.parent.filter;h.style.display=_$_5163[16];h.style.top=l+_$_5163[44];h.style.left=g+_$_5163[44];h.children[0].focus();
|
|
338
|
+
g=h.children[1].selectAll;h.children[1].textContent=_$_5163[3];h.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);h=[];for(l=0;l<this.rows.length;l++)if(g[l]){var m=_$_5163[3]+L.call(this,b,l),p=_$_5163[3]+ea.processed.call(this,b,l,!0);m.substr(0,1)==_$_5163[12]&&(m=p);h.push([m,p])}h.sort(function(n,q){return n[0]>q[0]?1:n[0]<q[0]?-1:0});a=[];for(l=0;l<h.length;l++)a[h[l][0]]={value:h[l][1],element:null};void 0!==
|
|
339
|
+
a[_$_5163[3]]&&(delete a[_$_5163[3]],a[_$_5163[3]]={value:_$_5163[211]+B(_$_5163[374])+_$_5163[232],element:null});f.search.call(this,_$_5163[3])}else console.log(_$_5163[373])};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[_$_5163[11]].call(this,b,g)}this.parent.filter.style.display=
|
|
340
|
+
_$_5163[3];this.parent.filter.children[0].value=_$_5163[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);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 q=_$_5163[3]+L.call(this,n,m),v=_$_5163[3]+this.getLabelFromCoords(n,m,!0);-1==h[n].filters.indexOf(q)&&-1==h[n].filters.indexOf(v)&&(p=!1)}p&&l.push(m)}return l};f.update=
|
|
341
|
+
function(){ua.reset.call(this);this.resetSelection();this.resetBorders();var g=qa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_5163[84]){var h=f[_$_5163[51]].call(this),l=F.call(this.parent,_$_5163[375],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&ua[_$_5163[11]].call(this,g);H.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_5163[376],this,h,g)};f.show=function(g){f.updateDOM.call(this,g,!0)};f.hide=function(g){f.updateDOM.call(this,
|
|
342
|
+
g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=!1;if(g){e=[];g=new RegExp(g,_$_5163[377]);for(var l=Object.keys(a),m=0;m<l.length;m++)(_$_5163[3]+l[m]).match(g)||(_$_5163[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=
|
|
343
|
+
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=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(_$_5163[20]);g.className=_$_5163[378];g.onclick=function(p){p.target.tagName==_$_5163[379]&&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=
|
|
344
|
+
p};var h=document.createElement(_$_5163[220]);h.type=_$_5163[55];h.placeholder=B(_$_5163[380]);h.className=_$_5163[381];var l=document.createElement(_$_5163[220]);l.type=_$_5163[382];l.value=_$_5163[383];l.className=_$_5163[384];var m=document.createElement(_$_5163[20]);m.className=_$_5163[385];m.appendChild(h);m.appendChild(g);m.appendChild(l);g.currentSelection=document.createElement(_$_5163[371]);g.currentSelection.innerHTML=_$_5163[386]+B(_$_5163[387]);g.selectAll=document.createElement(_$_5163[371]);
|
|
345
|
+
g.selectAll.innerHTML=_$_5163[388]+B(_$_5163[389])+_$_5163[232];g.selectAll.onclick=function(){for(var p=this.children[0].checked,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,
|
|
346
|
+
p=function(n){1==h?m[n].classList.add(_$_5163[166]):(this.options.columns[n].filters=null,m[n].classList.remove(_$_5163[372]),1==l&&m[n].classList.remove(_$_5163[166]))};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(_$_5163[372]),h=!0);1==h&&f.update.call(this)};return f}(),ua=function(){var k={};k[_$_5163[11]]=
|
|
347
|
+
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<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(_$_5163[20]);if(0<a.options.pagination&&a.options.paginationOptions&&0<a.options.paginationOptions.length){a.paginationDropdown=
|
|
348
|
+
document.createElement(_$_5163[390]);a.paginationDropdown.classList.add(_$_5163[391]);a.paginationDropdown.onchange=function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$_5163[392]);f.value=a.options.paginationOptions[e];f.innerHTML=a.options.paginationOptions[e];a.paginationDropdown.appendChild(f)}a.paginationDropdown.value=a.options.pagination;d.appendChild(document.createTextNode(B(_$_5163[393])));d.appendChild(a.paginationDropdown);
|
|
349
|
+
d.appendChild(document.createTextNode(B(_$_5163[394])))}return d},b=function(a,d){var e=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||_$_5163[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,
|
|
350
|
+
_$_5163[377]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=d.indexOf(g))for(var h=0;h<this.options.columns.length;h++){var l=_$_5163[3]+L.call(this,h,g),m=_$_5163[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,
|
|
351
|
+
a);if(typeof this.parent.config.onbeforesearch==_$_5163[84]){var e=F.call(this.parent,_$_5163[396],this,a,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&ua[_$_5163[11]].call(this,d);H.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_5163[397],this,a,d)};c.refresh=function(){H.resetY.call(this);aa.refresh.call(this)};c.reset=function(){this.searchInput.value=_$_5163[3];ua.reset.call(this);H.resetY.call(this);aa.refresh.call(this)};c.show=function(){this.options.search=
|
|
352
|
+
!0;this.searchContainer.style.display=_$_5163[3]};c.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_5163[40]};c.build=function(){this.searchContainer=document.createElement(_$_5163[20]);this.searchContainer.classList.add(_$_5163[398]);this.searchContainer.appendChild(k(this));var a=this.searchContainer,d=a.appendChild,e=document.createElement(_$_5163[20]);e.innerHTML=B(_$_5163[380])+_$_5163[113];this.searchInput=document.createElement(_$_5163[220]);this.searchInput.classList.add(_$_5163[395]);
|
|
353
|
+
e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&(this.searchContainer.style.display=_$_5163[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return c}(),Ra=function(){var k=function(b){b.contextmenu=document.createElement(_$_5163[20]);b.contextmenu.className=_$_5163[399];jSuites.contextmenu(b.contextmenu,{onclick:function(c,a,d){c.close()}});return b.contextmenu};k.open=function(b,c){var a=b.target.getAttribute(_$_5163[42]),d=b.target.getAttribute(_$_5163[43]),
|
|
354
|
+
e=k[_$_5163[51]](this,a,d,b,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_5163[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,_$_5163[85],[this,a,d,b,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(b,e)};k[_$_5163[51]]=function(b,c,a,d,e,f,g){var h=[],l=b.parent.config,m=-1!=navigator.userAgent.indexOf(_$_5163[400])?_$_5163[401]:_$_5163[402];e==_$_5163[403]&&
|
|
355
|
+
(1==l.allowRenameWorksheet&&h.push({title:B(_$_5163[404]),onclick:function(){var n=prompt(B(_$_5163[404]),d.target.innerText);n&&b.parent.renameWorksheet(f,n)}}),1==l.allowDeleteWorksheet&&h.push({title:B(_$_5163[405]),onclick:function(){confirm(B(_$_5163[406]),d.target.innerText)&&b.parent.deleteWorksheet(f)}}),h.push({type:_$_5163[407]}));e==_$_5163[408]&&(h.push({title:B(_$_5163[409]),onclick:function(){var n=prompt(B(_$_5163[409]),d.target.innerText);b.setNestedCell(f,g,{title:n})}}),h.push({type:_$_5163[407]}));
|
|
356
|
+
if(e==_$_5163[410]||e==_$_5163[411]||e==_$_5163[412]||e==_$_5163[408])h.push({title:B(_$_5163[413]),icon:_$_5163[414],shortcut:m+_$_5163[415],onclick:function(){b.cut()}}),h.push({title:B(_$_5163[416]),icon:_$_5163[417],shortcut:m+_$_5163[418],onclick:function(){b.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:B(_$_5163[419]),icon:_$_5163[420],shortcut:m+_$_5163[421],onclick:function(){b.selectedCell&&navigator.clipboard.readText().then(function(n){n&&b.paste(b.selectedCell[0],
|
|
357
|
+
b.selectedCell[1],n)})}}),h.push({type:_$_5163[407]});e==_$_5163[410]&&(1==b.options.allowInsertColumn&&h.push({title:B(_$_5163[422]),onclick:function(){b.insertColumn(1,parseInt(f),1)}}),1==b.options.allowInsertColumn&&h.push({title:B(_$_5163[423]),onclick:function(){b.insertColumn(1,parseInt(f),0)}}),1==b.options.allowDeleteColumn&&h.push({title:B(_$_5163[424]),onclick:function(){b.deleteColumn(b.getSelectedColumns().length?void 0:parseInt(c))}}),1==b.options.allowRenameColumn&&h.push({title:B(_$_5163[425]),
|
|
358
|
+
onclick:function(){b.setHeader(f)}}),b.options.data.length||(h.push({type:_$_5163[407]}),h.push({title:B(_$_5163[426]),onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(h.push({type:_$_5163[407]}),h.push({title:B(_$_5163[427]),onclick:function(){b.orderBy(f,0)}}),h.push({title:B(_$_5163[428]),onclick:function(){b.orderBy(f,1)}}),h.push({type:_$_5163[407]})));if(e==_$_5163[412]||e==_$_5163[411])1==b.options.allowInsertRow&&(h.push({title:B(_$_5163[429]),onclick:function(){b.insertRow(1,
|
|
359
|
+
parseInt(a),1)}}),h.push({title:B(_$_5163[430]),onclick:function(){b.insertRow(1,parseInt(a))}})),1==b.options.allowDeleteRow&&h.push({title:B(_$_5163[431]),onclick:function(){b.deleteRow(b.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_5163[407]});if(e==_$_5163[412]&&1==b.options.allowComments){var p=b.records[g][f].element.getAttribute(_$_5163[267])||_$_5163[3];h.push({title:p?B(_$_5163[432]):B(_$_5163[433]),icon:_$_5163[434],onclick:function(){var n=E.getColumnNameFromCoords(f,
|
|
360
|
+
g),q=prompt(B(_$_5163[435]),p);q&&b.setComments(n,q)}});p&&h.push({title:B(_$_5163[436]),onclick:function(){var n=E.getColumnNameFromCoords(f,g);b.setComments(n,_$_5163[3])}});h.push({type:_$_5163[407]})}l.allowExport&&h.push({title:B(_$_5163[437]),icon:_$_5163[438],shortcut:m+_$_5163[439],onclick:function(){b.download()}});l.about&&h.push({title:B(_$_5163[440]),icon:_$_5163[441],onclick:function(){!0===l.about?alert(J().print()):alert(l.about)}});return h};return k}(),fa=function(){var k=function(b){b.showToolbar=
|
|
361
|
+
function(){k.show.call(b.parent)};b.hideToolbar=function(){k.hide.call(b.parent)};b.refreshToolbar=function(){k.update.call(b.parent,b)}};k[_$_5163[11]]=function(b){this.toolbar.innerHTML=_$_5163[3];this.config.toolbar=k[_$_5163[51]].call(this,b);k.show.call(this)};k[_$_5163[51]]=function(b){b||(b=this.config.toolbar);b?Array.isArray(b)?b={items:b}:typeof b===_$_5163[84]&&(b=b({items:k.getDefault()})):b={};typeof b!==_$_5163[83]&&(b={});b.items||(b.items=k.getDefault());typeof b.responsive==_$_5163[13]&&
|
|
362
|
+
(b.responsive=!0,b.bottom=!1,b.maxWidth=this.element.offsetWidth);return b};k.show=function(){this.toolbar.innerHTML||k.build.call(this);this.toolbar.style.display=_$_5163[3];this.element.classList.add(_$_5163[442])};k.hide=function(){this.toolbar.style.display=_$_5163[40];this.element.classList.remove(_$_5163[442])};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=
|
|
363
|
+
a;c.refresh()}};k.build=function(){for(var b=k[_$_5163[51]].call(this),c=0;c<b.items.length;c++)if(b.items[c].type==_$_5163[390]){if(!b.items[c].options&&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==_$_5163[257]?(b.items[c].type=_$_5163[443],b.items[c].onclick=function(d,e,f){if(!f.color){var g=null;jSuites.color(f,
|
|
364
|
+
{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])?h.color.select(h.color.toHex(l)):h.color.select(_$_5163[3]):h.color.select(_$_5163[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,_$_5163[86],[b]))&&(b=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,b);this.toolbarInstance.application=
|
|
365
|
+
this;b=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[b])};k.getDefault=function(){return[{content:_$_5163[444],onclick:function(){t.current&&t.current.undo()}},{content:_$_5163[445],onclick:function(){t.current&&t.current.redo()}},{content:_$_5163[438],onclick:function(){t.current&&t.current.download()}},{type:_$_5163[446]},{type:_$_5163[390],width:_$_5163[447],options:[_$_5163[448],_$_5163[449],_$_5163[450]],render:function(b){return _$_5163[451]+b+_$_5163[226]+b+_$_5163[452]},
|
|
366
|
+
onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_5163[453],d)}},{type:_$_5163[390],width:_$_5163[454],content:_$_5163[455],options:[_$_5163[456],_$_5163[457],_$_5163[458],_$_5163[459],_$_5163[460]],render:function(b){return _$_5163[461]+b+_$_5163[226]+b+_$_5163[452]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_5163[462],d)}},{type:_$_5163[390],options:[_$_5163[463],_$_5163[464],_$_5163[465],_$_5163[466]],render:function(b){return _$_5163[467]+
|
|
367
|
+
b+_$_5163[468]},onchange:function(b,c,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_5163[469],d.split(_$_5163[470])[2])}},{type:_$_5163[443],content:_$_5163[471],k:_$_5163[472],v:_$_5163[473]},{type:_$_5163[257],content:_$_5163[474],k:_$_5163[257]},{type:_$_5163[257],content:_$_5163[475],k:_$_5163[476]},{type:_$_5163[390],content:_$_5163[477],width:_$_5163[478],options:[_$_5163[479],_$_5163[480],_$_5163[481],_$_5163[482]],onchange:function(b,c,a,d,e){b=t.current.table;b.classList.remove(_$_5163[483]);
|
|
368
|
+
b.classList.remove(_$_5163[484]);b.classList.remove(_$_5163[485]);1==e?b.classList.add(_$_5163[483]):2==e?b.classList.add(_$_5163[484]):3==e&&b.classList.add(_$_5163[485]);t.current.refreshBorders()}},{content:_$_5163[15],onclick:function(b,c,a){a.children[0].innerText==_$_5163[15]?(t.current.fullscreen(!0),a.children[0].innerText=_$_5163[486]):(t.current.fullscreen(!1),a.children[0].innerText=_$_5163[15])},tooltip:_$_5163[487],updateState:function(b,c,a,d){a.children[0].innerText=1==d.parent.config.fullscreen?
|
|
369
|
+
_$_5163[486]:_$_5163[15]}},{type:_$_5163[390],data:[_$_5163[488],_$_5163[489],_$_5163[490],_$_5163[491],_$_5163[492],_$_5163[493],_$_5163[494],_$_5163[495],_$_5163[496],_$_5163[497]],columns:5,render:function(b){return _$_5163[467]+b+_$_5163[468]},right:!0,onchange:function(b,c,a,d,e){if(b=t.current.getHighlighted()){a=c.thickness||1;c=c.color||_$_5163[498];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]=_$_5163[3]);
|
|
370
|
+
e[n]=d!=_$_5163[493]&&d!=_$_5163[489]||p!=f?(d==_$_5163[490]||d==_$_5163[492])&&p>f?e[n]+(_$_5163[499]+a+_$_5163[500]+c+_$_5163[297]):d==_$_5163[488]?e[n]+(_$_5163[499]+a+_$_5163[500]+c+_$_5163[297]):e[n]+_$_5163[501]:e[n]+(_$_5163[499]+a+_$_5163[500]+c+_$_5163[297]);e[n]=d!=_$_5163[488]&&d!=_$_5163[495]&&d!=_$_5163[489]||p!=h?e[n]+_$_5163[503]:e[n]+(_$_5163[502]+a+_$_5163[500]+c+_$_5163[297]);e[n]=d!=_$_5163[494]&&d!=_$_5163[489]||m!=g?(d==_$_5163[490]||d==_$_5163[491])&&m>g?e[n]+(_$_5163[504]+a+
|
|
371
|
+
_$_5163[500]+c+_$_5163[297]):d==_$_5163[488]?e[n]+(_$_5163[504]+a+_$_5163[500]+c+_$_5163[297]):e[n]+_$_5163[505]:e[n]+(_$_5163[504]+a+_$_5163[500]+c+_$_5163[297]);e[n]=d!=_$_5163[488]&&d!=_$_5163[496]&&d!=_$_5163[489]||m!=l?e[n]+_$_5163[507]:e[n]+(_$_5163[506]+a+_$_5163[500]+c+_$_5163[297])}Object.keys(e)&&t.current.setStyle(e,null,null,!0)}},onload:function(b,c){var a=document.createElement(_$_5163[20]),d=document.createElement(_$_5163[20]);a.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,
|
|
372
|
+
onchange:function(f,g){f.parentNode.children[1].style.color=g;c.color=g}});d=document.createElement(_$_5163[443]);d.classList.add(_$_5163[508]);d.innerHTML=_$_5163[509];d.onclick=function(){e.open()};a.appendChild(d);b.children[1].appendChild(a);d=document.createElement(_$_5163[20]);jSuites.picker(d,{type:_$_5163[390],data:[1,2,3,4,5],render:function(f){return _$_5163[510]+f+_$_5163[511]},onchange:function(f,g,h,l){c.thickness=l},width:_$_5163[512]});b.children[1].appendChild(d);d=document.createElement(_$_5163[20]);
|
|
373
|
+
d.style.flex=_$_5163[513];b.children[1].appendChild(d)}},{content:_$_5163[514],onclick:function(b,c,a){a.children[0].innerText==_$_5163[514]?(qa.show.call(t.current),a.children[0].innerText=_$_5163[515]):(qa.hide.call(t.current),a.children[0].innerText=_$_5163[514])},tooltip:_$_5163[516],updateState:function(b,c,a,d){a.children[0].innerText=1==d.options.search?_$_5163[515]:_$_5163[514]}}]};return k}(),ia=function(){var k=function(b){b.createWorksheet=function(c){return b.parent.createWorksheet(c)};
|
|
374
374
|
b.deleteWorksheet=function(c){return b.parent.deleteWorksheet(c)};b.renameWorksheet=function(c,a){return b.parent.renameWorksheet(c,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=
|
|
375
|
-
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&&(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
|
-
jSuites.guid().substring(0,8));b.worksheetName||(b.worksheetName=_$
|
|
377
|
-
_$
|
|
378
|
-
d,c),W.updateWorksheetNames.call(a,d,c),F.call(this,_$
|
|
379
|
-
b?this.element.tabs.open(b):this.element.tabs.setBorder(b),t.current&&t.current.resetSelection(),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
|
-
k.getWorksheetInstance=function(b){return b===_$
|
|
381
|
-
0,a=(this.config.root?this.config.root:window).getSelection();a&&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
|
-
String.fromCharCode(65+b%26)},getColumnNameFromCoords:function(b,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
|
-
[];c.data=[];var a=b.querySelectorAll(_$
|
|
384
|
-
(c.columns[d].align=w.style.textAlign);w.classList.contains(_$
|
|
385
|
-
0;var m={},p={},n={},q={},v=null;h=b.querySelectorAll(_$
|
|
386
|
-
0;if(v||y)m[u]=[v||1,y||1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$
|
|
387
|
-
n);0<Object.keys(m).length&&(c.mergeCells=m);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(q).length&&(c.classes=q);h=b.querySelectorAll(_$
|
|
388
|
-
10==u.length){if(u.substr(4,1)!=_$
|
|
389
|
-
b[m]!=_$
|
|
390
|
-
k.getTokensFromRange=W.getTokensFromRange;k.getRangeFromTokens=W.getRangeFromTokens;return k}(),Ba=function(){function k(r){return t.current&&t.current.options.tableOverflow&&r.target.tagName==_$
|
|
375
|
+
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&&(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,_$_5163[517],b,c);if(typeof a===_$_5163[83])b=a;else if(!1===a)return!1;b.data||b.minDimensions||(b.minDimensions=[8,8]);b.worksheetId||(b.worksheetId=
|
|
376
|
+
jSuites.guid().substring(0,8));b.worksheetName||(b.worksheetName=_$_5163[359]+k.nextName());if(I(b.worksheetName))jSuites.notification({error:_$_5163[513],message:_$_5163[518]});else return a=na.worksheet(this,b),a.onload(),K.call(a,_$_5163[519],[b]),F.call(this,_$_5163[520],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,_$_5163[521],[b]);F.call(this,
|
|
377
|
+
_$_5163[522],c,b)};k.renameWorksheet=function(b,c){var a=this.worksheets[b];if(!R.call(this,a))return!1;var d=a.options.worksheetName;if(d.toLowerCase()==c.toLowerCase())return!1;c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_5163[3]);Number(c)==c&&(c=_$_5163[359]+Number(c));I(c)?alert(_$_5163[523]):(I(d,null),this.element.tabs.rename(b,c),a.options.worksheetName=c,I(c,a),V.call(this,{worksheet:a,action:_$_5163[79],index:b,oldValue:d,newValue:c}),K.call(a,_$_5163[79],{worksheet:b,newValue:c}),Ia.updateWorksheetName.call(a,
|
|
378
|
+
d,c),W.updateWorksheetNames.call(a,d,c),F.call(this,_$_5163[524],a,b,c,d))};k.updateWorksheet=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:_$_5163[80],f:b,t:c});K.call(a[c],_$_5163[80],{f:b,t:c});F.call(this,_$_5163[525],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()!=
|
|
379
|
+
b?this.element.tabs.open(b):this.element.tabs.setBorder(b),t.current&&t.current.resetSelection(),t.current=c,t.current.refreshBorders(),U.call(t.current),k.state.call(this,b),fa.update.call(this,t.current),F.call(this,_$_5163[526],c,b))};k.getWorksheet=function(b){if(b&&typeof b==_$_5163[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()};
|
|
380
|
+
k.getWorksheetInstance=function(b){return b===_$_5163[3]||typeof b==_$_5163[17]?(b=k.getWorksheet.call(this,b),!1===b?!1:this.worksheets[b]):this.worksheets[b]};k.state=function(b){try{if(typeof localStorage!==_$_5163[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof b!==_$_5163[13])localStorage.setItem(_$_5163[527]+c,b);else{var a=parseInt(localStorage.getItem(_$_5163[527]+c));k.openWorksheet.call(this,a)}}}catch(d){}};return k}(),E=function(){var k={getCaretIndex:function(b){var c=
|
|
381
|
+
0,a=(this.config.root?this.config.root:window).getSelection();a&&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=_$_5163[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+=
|
|
382
|
+
String.fromCharCode(65+b%26)},getColumnNameFromCoords:function(b,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!=_$_5163[528])console.log(_$_5163[529]);else{c||(c={});c.columns=
|
|
383
|
+
[];c.data=[];var a=b.querySelectorAll(_$_5163[530]);if(a.length)for(var d=0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$_5163[150]));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(_$_5163[531])?c.columns[d].type=w.getAttribute(_$_5163[531]):c.columns[d].type=_$_5163[55];c.columns[d].width=C+_$_5163[44];c.columns[d].title=w.innerHTML;w.style.textAlign&&
|
|
384
|
+
(c.columns[d].align=w.style.textAlign);w.classList.contains(_$_5163[532])&&(c.columns[d].readOnly=!0);if(C=w.getAttribute(_$_5163[533]))c.columns[d].name=C;if(C=w.getAttribute(_$_5163[534]))c.columns[d].id=C};var f=[],g=b.querySelectorAll(_$_5163[535]);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(_$_5163[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=
|
|
385
|
+
0;var m={},p={},n={},q={},v=null;h=b.querySelectorAll(_$_5163[536]);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(_$_5163[537]);u?u.substr(0,1)!=_$_5163[12]&&(u=_$_5163[12]+u):u=h[a].children[d].innerHTML;c.data[l].push(u);u=E.getColumnNameFromCoords(d,a);(v=h[a].children[d].getAttribute(_$_5163[538]))&&(q[u]=v);v=parseInt(h[a].children[d].getAttribute(_$_5163[52]))||0;var y=parseInt(h[a].children[d].getAttribute(_$_5163[162]))||
|
|
386
|
+
0;if(v||y)m[u]=[v||1,y||1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$_5163[40])h[a].children[d].style.display=_$_5163[3];(v=h[a].children[d].getAttribute(_$_5163[98]))&&(n[u]=v);h[a].children[d].classList.contains(_$_5163[539])&&(n[u]=n[u]?n[u]+_$_5163[540]:_$_5163[541])}h[a].style&&h[a].style.height&&(p[a]={height:h[a].style.height});l++}else for(d=0;d<h[a].children.length;d++)e(h[a].children[d]);0<Object.keys(f).length&&(c.nestedHeaders=f);0<Object.keys(n).length&&(c.style=
|
|
387
|
+
n);0<Object.keys(m).length&&(c.mergeCells=m);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(q).length&&(c.classes=q);h=b.querySelectorAll(_$_5163[542]);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),
|
|
388
|
+
10==u.length){if(u.substr(4,1)!=_$_5163[184]||u.substr(7,1)!=_$_5163[184])f=!1}else f=!1;a=Object.keys(b[d]).length;f?c.columns[d].type=_$_5163[183]:1==e&&1<a&&a<=parseInt(.1*c.data.length)&&(c.columns[d].type=_$_5163[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||_$_5163[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]=_$_5163[3]),
|
|
389
|
+
b[m]!=_$_5163[543])if(b[m]!=_$_5163[544]&&b[m]!=c||0!=h&&1!=l&&g){b[m]==_$_5163[186]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&b[m]==_$_5163[186]){b[m+1]==_$_5163[186]?(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]==_$_5163[186]){var p=e[d][a].trim();p[p.length-1]==_$_5163[186]&&(e[d][a]=p.substr(1,p.length-2))}b[m]==_$_5163[544]?(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]=_$_5163[3]);return e};
|
|
390
|
+
k.getTokensFromRange=W.getTokensFromRange;k.getRangeFromTokens=W.getRangeFromTokens;return k}(),Ba=function(){function k(r){return t.current&&t.current.options.tableOverflow&&r.target.tagName==_$_5163[570]&&r.target.hasAttribute(_$_5163[42])}function b(){A.x1=A.x2;A.y1=A.y2;N=null}function c(r,z){z||(z=1);z*=.1;return 0>r?Math.min(0,Math.ceil(r/(1+z))+1):Math.max(0,Math.ceil(r/(1+z))-1)}function a(){0<Math.abs(A.speeds.vertical)&&(A.speeds.vertical=c(A.speeds.vertical,1),t.current.scrollY.scrollTop+=
|
|
391
391
|
d(A.speeds.vertical),0==t.current.scrollY.scrollTop||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)||
|
|
392
|
-
requestAnimationFrame(a)}function d(r,z){z||(z=100);return Math.ceil(z/1E3*r)}var e={},f=null,g=null,h=null,l=null,m=!1,p=null,n=null,q=null,v=function(r){function z(ja){ja.className&&(ja.classList.contains(_$
|
|
393
|
-
null;z(r.target);if(null!==za)return!1;if(G)if(r.target.classList.contains(_$
|
|
394
|
-
X=parseInt(X),wa=parseInt(wa));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$
|
|
395
|
-
3<X&&20>X&&(D=_$
|
|
396
|
-
z.spreadsheet.config.root:document).elementsFromPoint(x,r);for(var D=0;D<z.length;D++)if(x=z[D].getAttribute(_$
|
|
397
|
-
t.current=null);return z};e.input=function(r){if(r.target.tagName==_$
|
|
398
|
-
!1;if(ra.event)return ra.cancel.call(t.current,r),r.preventDefault(),!1;if(ma.event)return ma.cancel.call(t.current,r),!1;if(1==ca.isVisible())return ca.close.call(t.current,!1),r.preventDefault(),!1}if(!r.target.classList.contains(_$
|
|
399
|
-
p=null},400);else if(t.current.edition){var x=t.current.edition.getAttribute(_$
|
|
392
|
+
requestAnimationFrame(a)}function d(r,z){z||(z=100);return Math.ceil(z/1E3*r)}var e={},f=null,g=null,h=null,l=null,m=!1,p=null,n=null,q=null,v=function(r){function z(ja){ja.className&&(ja.classList.contains(_$_5163[349])&&(G=ja),ja.classList.contains(_$_5163[362])&&(Q=ja),ja.classList.contains(_$_5163[545])&&(za=ja));ja.tagName==_$_5163[546]?x=1:ja.tagName==_$_5163[547]?x=2:ja.tagName==_$_5163[548]&&(x=3);ja.parentNode&&!G&&z(ja.parentNode)}var x=null,D=null,G=null,Q=null,za=null,X=null,wa=null,Sa=
|
|
393
|
+
null;z(r.target);if(null!==za)return!1;if(G)if(r.target.classList.contains(_$_5163[332]))D=_$_5163[549];else if(r.target.classList.contains(_$_5163[340]))D=_$_5163[136];else if(r.target.classList.contains(_$_5163[270]))D=_$_5163[411],X=parseInt(r.target.getAttribute(_$_5163[43]));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_5163[175]))X=r.target.getAttribute(_$_5163[180]),wa=r.target.getAttribute(_$_5163[181]),null===X?D=_$_5163[549]:(D=_$_5163[408],
|
|
394
|
+
X=parseInt(X),wa=parseInt(wa));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_5163[144]))D=_$_5163[550];else if(r.target.classList.contains(_$_5163[148]))D=_$_5163[550];else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_5163[551]))D=_$_5163[403],X=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==x)D=_$_5163[410],X=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_5163[166])&&
|
|
395
|
+
3<X&&20>X&&(D=_$_5163[552]),X=r.target.getAttribute(_$_5163[42]);else if(2==x){if(r=u(r,G))D=_$_5163[412],X=r[0],wa=r[1],Sa=r[2]}else if(3==x){if(X=r.target.getAttribute(_$_5163[42]),wa=r.target.getAttribute(_$_5163[43]),X||wa)D=_$_5163[553]}else x||jSuites.findElement(r.target,_$_5163[554])&&(D=_$_5163[86]);return[G,Q,x,D,X,wa,Sa]},u=function(r,z){if(r.changedTouches&&r.changedTouches[0]){var x=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else x=r.clientX,r=r.clientY;z=(z.spreadsheet.config.root?
|
|
396
|
+
z.spreadsheet.config.root:document).elementsFromPoint(x,r);for(var D=0;D<z.length;D++)if(x=z[D].getAttribute(_$_5163[42]),r=z[D].getAttribute(_$_5163[43]),null!=x&&null!=r)return x=parseInt(x),r=parseInt(r),[x,r,z[D]];return!1},y=function(r){var z=v(r);if(!1===z)return!1;z[0]?z[1]?t.current!=z[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=z[1].jexcel):(r=z[0].tabs.getActive(),0<=r&&(t.current=z[0].spreadsheet.worksheets[r])):t.current&&!jSuites.findElement(r.target,_$_5163[219])&&(t.current.resetSelection(!0),
|
|
397
|
+
t.current=null);return z};e.input=function(r){if(r.target.tagName==_$_5163[555]&&r.target.classList.contains(_$_5163[92])){var z=null;t.current?z=t.current:r.target.getAttribute(_$_5163[556])&&(z=I(r.target.getAttribute(_$_5163[556])));z&&la.parse.call(z,r.target)}};e.keydown=function(r){if(t.current){r.target.tagName==_$_5163[555]&&r.target.classList.contains(_$_5163[92])&&la.onkeydown.call(t.current,r);if(27==r.which){if(t.current.edition)return t.current.closeEditor(t.current.edition,!1),r.preventDefault(),
|
|
398
|
+
!1;if(ra.event)return ra.cancel.call(t.current,r),r.preventDefault(),!1;if(ma.event)return ma.cancel.call(t.current,r),!1;if(1==ca.isVisible())return ca.close.call(t.current,!1),r.preventDefault(),!1}if(!r.target.classList.contains(_$_5163[219]))if(r.target.classList.contains(_$_5163[381])){var z=r.target;p&&clearTimeout(p);p=setTimeout(function(){ca.search.call(t.current,z.value);p=null},500)}else if(r.target.classList.contains(_$_5163[395]))z=r.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(_$_5163[42]);13==r.which?t.current.options.columns[x].type==_$_5163[183]?t.current.closeEditor(t.current.edition,!0):t.current.options.columns[x].type!=_$_5163[57]&&t.current.options.columns[x].type!=_$_5163[557]&&t.current.options.columns[x].type!=_$_5163[434]&&(r.altKey?t.current.parent.input.classList.contains(_$_5163[558])||document.execCommand(_$_5163[559],!1,_$_5163[560]):(t.current.closeEditor(t.current.edition,!0),
|
|
400
400
|
t.current.down(),r.preventDefault())):9==r.which&&(t.current.closeEditor(t.current.edition,!0),t.current.right(),r.preventDefault())}else if(t.current.selectedCell)if(33==r.which)0<t.current.options.pagination?ta.pageUp.call(t.current):H.pageUp.call(t.current);else if(34==r.which)0<t.current.options.pagination?ta.pageDown.call(t.current):H.pageDown.call(t.current);else if(37==r.which)t.current.left(r.shiftKey,r.ctrlKey),r.preventDefault();else if(39==r.which)t.current.right(r.shiftKey,r.ctrlKey),
|
|
401
|
-
r.preventDefault();else if(38==r.which)t.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)t.current.down(r.shiftKey,r.ctrlKey),r.preventDefault();else if(36==r.which)t.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)t.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)t.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||8==r.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$
|
|
401
|
+
r.preventDefault();else if(38==r.which)t.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)t.current.down(r.shiftKey,r.ctrlKey),r.preventDefault();else if(36==r.which)t.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)t.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)t.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||8==r.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$_5163[3]);
|
|
402
402
|
else if(13==r.which)r.shiftKey?t.current.up():(1==t.current.options.allowManualInsertRow&&t.current.selectedCell[1]==(t.current.results?t.current.results[t.current.results.length-1]:t.current.rows.length-1)&&t.current.insertRow(),t.current.selectedCell&&t.current.down()),r.preventDefault();else if(9==r.which)r.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&&
|
|
403
403
|
(t.current.insertColumn(),t.current.right())),r.preventDefault();else if((r.ctrlKey||r.metaKey)&&!r.shiftKey)65==r.which?(t.current.selectAll(),r.preventDefault()):83==r.which?(t.current.download(),r.preventDefault()):89==r.which?(t.current.parent.redo(),r.preventDefault()):90==r.which?(t.current.parent.undo(),r.preventDefault()):67==r.which?(t.current.copy(),r.preventDefault()):88==r.which?(t.current.cut(),r.preventDefault()):86==r.which?e.paste(r):189==r.which&&(1==t.current.options.allowDeleteRow&&
|
|
404
|
-
l==_$
|
|
405
|
-
!0,r):113==r.keyCode?t.current.openEditor(t.current.records[x][D].element,!1,r):1!=r.key.length&&r.key!=_$
|
|
406
|
-
r,z,x,D,G)};e.mousedown=function(r){r=r||window.event;var z=r.buttons?r.buttons:r.button?r.button:r.which;if(t.current)if(1==ca.isVisible()&&(jSuites.findElement(r.target,_$
|
|
407
|
-
x[4]))return!1}else if(x[3]==_$
|
|
408
|
-
1;if(x[3]==_$
|
|
409
|
-
r):1==t.current.options.rowResize&&6>r.target.offsetHeight-r.offsetY?va.start.call(t.current,r):(z=t.current.options.columns.length-1,D=parseInt(x[4]),(r.shiftKey||r.ctrlKey)&&null!=g&&null!=h?w(0,h,z,D,r,x[3]):(w(0,D,z,D,r,x[3]),g=0,h=D));else if(x[3]==_$
|
|
410
|
-
G==_$
|
|
411
|
-
r.target.classList.contains(_$
|
|
412
|
-
x=r.target.getAttribute(_$
|
|
413
|
-
_$
|
|
414
|
-
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]==_$
|
|
404
|
+
l==_$_5163[411]?(t.current.deleteRow(),r.preventDefault()):1==t.current.options.allowDeleteColumn&&l==_$_5163[410]&&(t.current.deleteColumn(),r.preventDefault()));else if(t.current.selectedCell&&t.current.isEditable()){x=t.current.selectedCell[1];var D=t.current.selectedCell[0];t.current.options.columns[D].type!=_$_5163[18]&&(32==r.keyCode?t.current.options.columns[D].type==_$_5163[252]||t.current.options.columns[D].type==_$_5163[254]?r.preventDefault():t.current.openEditor(t.current.records[x][D].element,
|
|
405
|
+
!0,r):113==r.keyCode?t.current.openEditor(t.current.records[x][D].element,!1,r):1!=r.key.length&&r.key!=_$_5163[561]||r.altKey||r.ctrlKey||t.current.records[x]&&t.current.openEditor(t.current.records[x][D].element,!0,r))}}};var w=function(r,z,x,D,G,Q){if(1==t.current.parent.input.classList.contains(_$_5163[92])&&la.update.call(t.current,r,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,r,z,x,D,G):ya[_$_5163[11]].call(t.current,
|
|
406
|
+
r,z,x,D,G)};e.mousedown=function(r){r=r||window.event;var z=r.buttons?r.buttons:r.button?r.button:r.which;if(t.current)if(1==ca.isVisible()&&(jSuites.findElement(r.target,_$_5163[385])||ca.close.call(t.current,!1)),t.current.edition){if(jSuites.findElement(r.target,_$_5163[99]))return!1}else if(jSuites.findElement(r.target,_$_5163[219]))return!1;var x=y(r);if(!1===x)return!1;q=x;if(1<z)if(x[3]==_$_5163[410]){if(t.current.isSelected(x[4],null))return!1}else if(x[3]==_$_5163[411]){if(t.current.isSelected(null,
|
|
407
|
+
x[4]))return!1}else if(x[3]==_$_5163[412]&&t.current.isSelected(x[4],x[5]))return!1;if(t.current){if(x[3]==_$_5163[136])t.current.isEditable()&&(ma.event=!0);else if(x[3]==_$_5163[552])ca.open.call(t.current,x[4]);else{if(1==x[2])if(1==t.current.options.columnDrag&&6>r.target.offsetHeight-r.offsetY)ra.start.call(t.current,r);else if(1==t.current.options.columnResize&&6>r.target.offsetWidth-r.offsetX)va.start.call(t.current,r);else{z=t.current.options.columns.length-1;var D=t.current.options.data.length-
|
|
408
|
+
1;if(x[3]==_$_5163[549])w(0,0,z,D,r,x[3]),h=g=0;else if(x[3]==_$_5163[408]){var G=oa.range.call(t.current,x[5])[x[4]];G[1]>z&&(G[1]=z);w(G[0],0,G[1],D,r,x[3]);g=G[0];h=0}else(r.shiftKey||r.ctrlKey)&&null!=g&&null!=h?w(g,0,x[4],D,r,x[3]):(x[3]==_$_5163[410]&&g==x[4]&&1==t.current.options.allowRenameColumn&&(n=setTimeout(function(){t.current.setHeader(x[4])},800)),w(x[4],0,x[4],D,r,x[3]),g=x[4],h=0)}if(2==x[2])if(x[3]==_$_5163[411])1==t.current.options.rowDrag&&6>r.target.offsetWidth-r.offsetX?ra.start.call(t.current,
|
|
409
|
+
r):1==t.current.options.rowResize&&6>r.target.offsetHeight-r.offsetY?va.start.call(t.current,r):(z=t.current.options.columns.length-1,D=parseInt(x[4]),(r.shiftKey||r.ctrlKey)&&null!=g&&null!=h?w(0,h,z,D,r,x[3]):(w(0,D,z,D,r,x[3]),g=0,h=D));else if(x[3]==_$_5163[412]){z=parseInt(x[4]);D=parseInt(x[5]);if(!t.current.edition&&(G=t.current.options.columns[x[4]].type,r.target.tagName==_$_5163[562]&&(G==_$_5163[255]||G==_$_5163[256])&&r.target.parentNode.classList.contains(_$_5163[123]))){var Q=r.target.innerText;
|
|
410
|
+
G==_$_5163[255]&&(Q=_$_5163[563]+Q);window.open(Q,_$_5163[564])}r.shiftKey||r.ctrlKey?w(t.current.selectedCell[0],t.current.selectedCell[1],z,D,r,x[3]):(w(z,D,z,D,r,x[3]),g=z,h=D)}}l=x[3];typeof x[3]!==_$_5163[13]&&F.call(t.current.parent,_$_5163[565],t.current,x[3],x[4],x[5]);m=!0}else m=!1};e.mouseup=function(r){t.current&&(ra.event?ra.end.call(t.current,r):va.event?va.end.call(t.current,r):ma.event?ma.end.call(t.current,r):r.target.classList.contains(_$_5163[384])?ca.close.call(t.current,!0):t.current.edition&&
|
|
411
|
+
r.target.classList.contains(_$_5163[566])&&50>r.target.clientWidth-r.offsetX&&50>r.offsetY?da.close.call(t.current,null,!0):r.target.classList.contains(_$_5163[320])&&(r=r.target.innerText==_$_5163[214]?0:r.target.innerText==_$_5163[215]?r.target.getAttribute(_$_5163[267])-1:r.target.innerText-1,ta[_$_5163[11]].call(t.current,parseInt(r))));n&&(clearTimeout(n),n=null);m=l=!1;la.current&&la.close.call(t.current)};e.mousemove=function(r){r=r||window.event;if(t.current){var z=r.target.getAttribute(_$_5163[42]),
|
|
412
|
+
x=r.target.getAttribute(_$_5163[43]);if(1==m)ra.event?ra.update.call(t.current,r):va.event?va.update.call(t.current,r):Pa.event&&Pa.update.call(t.current,r);else{var D=r.target.getBoundingClientRect();f&&(f.style.cursor=_$_5163[3],f=null);1==t.current.options.editable&&(z||x)&&(1==t.current.options.rowResize&&r.target&&z&&!x&&5>D.width-(r.clientX-D.left)?(f=r.target,f.style.cursor=_$_5163[567]):1==t.current.options.columnResize&&r.target&&!z&&x&&5>D.height-(r.clientY-D.top)?(f=r.target,f.style.cursor=
|
|
413
|
+
_$_5163[568]):1==t.current.options.rowDrag&&r.target&&!z&&x&&5>D.width-(r.clientX-D.left)?(f=r.target,f.style.cursor=_$_5163[569]):1==t.current.options.columnDrag&&r.target&&z&&!x&&5>D.height-(r.clientY-D.top)&&(f=r.target,f.style.cursor=_$_5163[569]))}}};e.mouseover=function(r){r=r||window.event;var z=!1;if(t.current&&1==m){var x=v(r);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=r.target.getAttribute(_$_5163[42]),G=r.target.getAttribute(_$_5163[43]);
|
|
414
|
+
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]==_$_5163[410]&&(D=r.target.getAttribute(_$_5163[42])),G=t.current.options.data.length-1,w(g,0,D,G,r,x[3])),2==x[2]&&(x[3]==_$_5163[411]?(D=t.current.options.columns.length-1,G=parseInt(r.target.getAttribute(_$_5163[43])),w(0,h,D,G,r,x[3])):x[3]==_$_5163[412]&&(D=r.target.getAttribute(_$_5163[42]),G=r.target.getAttribute(_$_5163[43]),D&&G&&(w(g,h,D,G,r,x[3]),z=!0))))}}1==z&&!n&&
|
|
415
415
|
H.limited.call(t.current)?n=setTimeout(function(){var Q=t.current.content.getBoundingClientRect();if(r.changedTouches&&r.changedTouches[0])var za=r.changedTouches[0].clientX,X=r.changedTouches[0].clientY;else za=r.clientX,X=r.clientY;50>Q.height-(X-Q.top)?H.pageDown.call(t.current,1,null,r):80>X-Q.top&&H.pageUp.call(t.current,1,null,r);50>Q.width-(za-Q.left)?H.pageRight.call(t.current,1,null,r):80>za-Q.left&&H.pageLeft.call(t.current,1,null,r);n=null},100):n&&(clearTimeout(n),n=null)};e.dblclick=
|
|
416
|
-
function(r){if(t.current)if(r.target.classList.contains(_$
|
|
417
|
-
z.getData(_$
|
|
416
|
+
function(r){if(t.current)if(r.target.classList.contains(_$_5163[340]))ma.execute.call(t.current,!1);else{var z=v(r);1==z[2]?1==t.current.options.columnSorting&&(r=r.target.getAttribute(_$_5163[42]))&&t.current.orderBy(r):2==z[2]&&t.current.isEditable()&&!t.current.edition&&z[6]&&t.current.openEditor(z[6])}};e.paste=function(r){if(t.current&&t.current.selectedCell&&!t.current.edition){var z=r.clipboardData||window.clipboardData;z&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],
|
|
417
|
+
z.getData(_$_5163[55])),r&&r.preventDefault())}};e.contextmenu=function(r){var z=y(r);!1!==z&&(z[1]||(z=q),t.current&&!t.current.edition&&(z=Array.prototype.slice.call(z,3),Ra.open.call(t.current,r,z)))};var C=Date.now(),A={},N=null,S=null,P=null;e.touchstart=function(r){var z=v(r);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(r)&&(P=r.touches[0],
|
|
418
418
|
S=r.touches.length,C=Date.now(),A.x1=r.touches[0].screenX,A.y1=r.touches[0].screenY,A.x2=r.touches[0].screenX,A.y2=r.touches[0].screenY,N=setTimeout(b,250),null!=A.speeds&&(A.speeds.vertical=0,A.speeds.horizontal=0));if(null!==x&&null!==z){t.current.updateSelectionFromCoords(x,z,x,z);var D=r.target;n=setTimeout(function(){t.current.openEditor(D,!1,r);n=null;r.preventDefault();r.stopPropagation();r.stopImmediatePropagation()},750)}}};e.touchmove=function(r){n&&(clearTimeout(n),n=null);if(k(r)&&1==
|
|
419
419
|
S){var z=r.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=r.touches[0].screenX;A.y2=r.touches[0].screenY;null!=A.speeds&&(A.speeds.vertical=0,A.speeds.horizontal=0);null==N&&(N=setTimeout(b,250));r.cancelable&&t.current.options.tableOverflow&&r.preventDefault()}};e.touchend=function(r){n&&(clearTimeout(n),n=null);N&&(clearTimeout(N),N=null);P=S=null;if(k(r)){r=Date.now()-C;var z=A.x1,x=A.y1,D=A.x2,G=A.y2,
|
|
420
420
|
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>=r?-1:Math.ceil(Q/(r/1E3));x=z==D&&x==x?0:Math.sqrt(Math.pow(z-D,2)+Math.pow(x-x,2));D>z&&(x=-x);10>Math.abs(D-z)&&(x=0);A.speeds={vertical:G,horizontal:0>=r?-1:Math.ceil(x/(r/1E3))};(250>r&&200<Math.abs(A.speeds.vertical)||250>r&&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}(),
|
|
421
|
-
t=function(k,b,c){b||(b={});if(b.cloud&&!c)typeof b.plugins.cloud==_$
|
|
422
|
-
!1;if(Array.isArray(a.queue)&&0<a.queue.length)for(;d=a.queue.shift();)d[0].updateCell(d[1],d[2],
|
|
423
|
-
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=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]]===_$
|
|
424
|
-
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,null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$
|
|
425
|
-
c[a]||c.options&&1==c.options[a]?!0:c[a]==_$
|
|
426
|
-
c.classList.add(_$
|
|
427
|
-
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!=_$
|
|
428
|
-
!1===m.autoCasting?!1:!0)&&(m.type==_$
|
|
429
|
-
l.closeEditor(e,!0)};if(m.type==_$
|
|
430
|
-
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:_$
|
|
431
|
-
f.mask&&(f=f.mask.split(_$
|
|
432
|
-
{},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(f=document.createElement(_$
|
|
433
|
-
k.dropdown=function(){var c={createCell:function(a,d,e,f,g,h){h.render==_$
|
|
434
|
-
k.createEditor(_$
|
|
435
|
-
(_$
|
|
436
|
-
!b(h,_$
|
|
437
|
-
name:f};for(d=0;d<h.source.length;d++)typeof e[h.source[d].id]!==_$
|
|
438
|
-
0;d<a.length;d++)a[d]=(_$
|
|
439
|
-
e;g.substr(4,1)==_$
|
|
440
|
-
!0;f.onclose=function(m,p){h.closeEditor(d,!0)};typeof l.timepicker!==_$
|
|
441
|
-
d.options.format:_$
|
|
442
|
-
(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(m,p){h.closeEditor(d,!0)};a=k.createEditor(_$
|
|
443
|
-
!1;e=document.createElement(_$
|
|
444
|
-
d){return 1==d||1==d||d==_$
|
|
445
|
-
1==d||d==_$
|
|
446
|
-
(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?c.isValid(e,f,g,h)||(e=_$
|
|
447
|
-
k.progressbar=function(){var c={},a=null;c.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$
|
|
448
|
-
c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$
|
|
449
|
-
e,f,g,h,l){a=k.createEditor(_$
|
|
450
|
-
0;h<e;h++){var l=document.createElement(_$
|
|
451
|
-
e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$
|
|
452
|
-
l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$
|
|
453
|
-
g,_$
|
|
454
|
-
l)};c.closeEditor=function(d,e,f,g,h,l){if(e&&(d=a.children[0]))return d.tagName==_$
|
|
455
|
-
g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$
|
|
456
|
-
closeEditor:function(c,a){return!1}}}();k.tags=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$
|
|
457
|
-
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=function(d,e,f,g,h,l){d.classList.add(_$
|
|
458
|
-
_$
|
|
459
|
-
!0)};b(l,_$
|
|
460
|
-
e=(_$
|
|
461
|
-
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(_$
|
|
462
|
-
_$
|
|
421
|
+
t=function(k,b,c){b||(b={});if(b.cloud&&!c)typeof b.plugins.cloud==_$_5163[84]?b.plugins.cloud.load(b,function(d){t(k,d,!0)}):console.error(_$_5163[571]);else{if(k.spreadsheet)a=k.spreadsheet,Da[_$_5163[11]].call(a,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==_$_5163[84]&&(a.worksheets[d].onload(),a.worksheets[d].onload=null);a.processing=
|
|
422
|
+
!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]);if(typeof a.config.onload==_$_5163[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=
|
|
423
|
+
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=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]]===_$_5163[84]&&(t[b[c]]=k[b[c]],t.extensions[b[c]]=k[b[c]],t.license&&typeof t[b[c]].license==_$_5163[84]&&t[b[c]].license.call(t,
|
|
424
|
+
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,null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$_5163[3];k.classList.remove(_$_5163[572]);k.classList.remove(_$_5163[349])}};t.version=J;t.helpers=E;t.events=Ba;typeof formula!==_$_5163[13]&&(t.formula=formula);t.editors=function(){var k={},b=function(c,a){return 1==
|
|
425
|
+
c[a]||c.options&&1==c.options[a]?!0:c[a]==_$_5163[229]||c.options&&c.options[a]==_$_5163[229]?!0:!1};k.createEditor=function(c,a,d,e){e.parent.input.setAttribute(_$_5163[100],!1);c==_$_5163[220]?(c=document.createElement(_$_5163[220]),c.type=_$_5163[55],c.value=d):c=document.createElement(_$_5163[20]);c.style.width=a.offsetWidth-2+_$_5163[44];c.style.height=a.offsetHeight-1+_$_5163[44];e.parent.input.appendChild(c);return c};k.createDialog=function(c,a,d,e,f,g){c=k.createEditor(_$_5163[20],c,a,f);
|
|
426
|
+
c.classList.add(_$_5163[573]);c.classList.add(_$_5163[566]);800>window.innerWidth?(f.parent.input.style.top=_$_5163[142],f.parent.input.style.left=_$_5163[142]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=-f.parent.input.offsetHeight));return c};k.general=function(){var c={},a=function(e){return(_$_5163[3]+e)[0]==_$_5163[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=
|
|
427
|
+
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!=_$_5163[14]&&m.type!=_$_5163[309]&&m.type!=_$_5163[308]||e.classList.add(_$_5163[574]);return c.updateCell(e,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===_$_5163[3]||a(f)||typeof f===_$_5163[14]||(p?(p=jSuites.mask.extract(f,p,!0))&&p.value!==_$_5163[3]&&(n=p.value):1==(!1===l.parent.config.autoCasting||
|
|
428
|
+
!1===m.autoCasting?!1:!0)&&(m.type==_$_5163[14]||m.type==_$_5163[309]||m.type==_$_5163[308]?(p=jSuites.mask.extract(f,m,!0))&&p.value!==_$_5163[3]&&(n=p.value):jSuites.isNumeric(Number(f))&&(n=Number(f))));null!==n&&(f=n);f=c.parseValue(g,h,f,l,m,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_5163[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(_$_5163[92])||
|
|
429
|
+
l.closeEditor(e,!0)};if(m.type==_$_5163[14]||m.type==_$_5163[309]||m.type==_$_5163[308])p.classList.add(_$_5163[558]),a(f)||m.inputmode||(m.inputmode=_$_5163[575]);g=null;a(f)||(m.inputmode&&p.setAttribute(_$_5163[96],m.inputmode),(g=d(m))?(m.disabledMaskOnEdition||(m.mask?(m=m.mask.split(_$_5163[216]),p.setAttribute(_$_5163[94],m[0])):m.locale&&p.setAttribute(_$_5163[576],m.locale)),g.input=l.parent.input,l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&m.type==_$_5163[308]&&(f*=100));g||(l.parent.config.stripHTML?
|
|
430
|
+
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:_$_5163[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_5163[3]):m.type==_$_5163[308]&&(f+=_$_5163[577],e.classList.remove(_$_5163[578]));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&&
|
|
431
|
+
f.mask&&(f=f.mask.split(_$_5163[216]),f[1]&&(f[1].match(new RegExp(_$_5163[579],_$_5163[377]))&&(0>g?m.classList.add(_$_5163[580]):m.classList.remove(_$_5163[580])),f[1].match(new RegExp(_$_5163[581],_$_5163[377]))&&0>g&&(e=_$_5163[211]+e+_$_5163[232]))),e&&(g=e));return g};c[_$_5163[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_5163[308]?100*parseFloat(f):f};return c}();k.text=k.general;k.number=k.general;k.numeric=k.general;k.percent=k.general;k.notes=function(){var c=
|
|
432
|
+
{},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(f=document.createElement(_$_5163[20]),f.classList.add(_$_5163[582]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_5163[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=_$_5163[583];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():_$_5163[3]};return c}();
|
|
433
|
+
k.dropdown=function(){var c={createCell:function(a,d,e,f,g,h){h.render==_$_5163[584]?a.classList.add(_$_5163[585]):a.classList.add(_$_5163[586]);if(a=c.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_5163[586])},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=_$_5163[3]):a.innerHTML=_$_5163[3];return d}},openEditor:function(a,d,e,f,g,h){var l=
|
|
434
|
+
k.createEditor(_$_5163[20],a,d,g),m=h.delimiter||_$_5163[216];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_5163[84]&&(h.source=h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_5163[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,_$_5163[587])&&(e.multiple=!0);b(h,_$_5163[56])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};b(h,_$_5163[587])?d&&(e.value=
|
|
435
|
+
(_$_5163[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||_$_5163[216],p=l.dropdown.getText(!0),n=l.dropdown.getValue(!0),q=0;q<n.length;q++)!1===c.getItem(a,n[q],e,f,g,h)&&h.source.push({id:n[q],name:p[q]});l.dropdown.close(!0);if(d)return n.join(m)},fromLabel:function(a,d,e,f,g,h){a=h.delimiter||_$_5163[216];e=[];f=[];Array.isArray(d)||(d=(_$_5163[3]+d).split(a));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);
|
|
436
|
+
!b(h,_$_5163[587])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<h.source.length;d++)f[h.source[d].name]&&e.push(h.source[d].id);return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$_5163[216];a=[];e=[];Array.isArray(d)||(d=(_$_5163[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!b(h,_$_5163[587])&&1<Object.keys(f).length&&(d=[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_5163[83])for(d=0;d<h.source.length;d++)f=h.source[d],h.source[d]={id:f,
|
|
437
|
+
name:f};for(d=0;d<h.source.length;d++)typeof e[h.source[d].id]!==_$_5163[13]&&a.push(h.render==_$_5163[257]?h.source[d].color:h.render==_$_5163[588]?h.source[d].image:h.source[d].name);if(a.length){if(typeof h.render!==_$_5163[13]){for(d=0;d<a.length;d++)e=d,f=a[d],f=h.render==_$_5163[257]?_$_5163[589]+f+_$_5163[590]:h.render==_$_5163[588]?_$_5163[589]+f+_$_5163[590]:h.render==_$_5163[584]?_$_5163[592]+(h.source[d].color||_$_5163[591])+_$_5163[593]+f+_$_5163[594]:void 0,a[e]=f;return a.join(_$_5163[3])}for(d=
|
|
438
|
+
0;d<a.length;d++)a[d]=(_$_5163[3]+a[d]).replace(_$_5163[214],_$_5163[595]);return a.join(_$_5163[297])}return!1}};c[_$_5163[51]]=function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_5163[257]?a.source[e].color:a.render==_$_5163[588]?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=_$_5163[3]+
|
|
439
|
+
e;g.substr(4,1)==_$_5163[184]&&g.substr(7,1)==_$_5163[184]?g=!0:(g=g.split(_$_5163[184]),g=4==g[0].length&&g[0]==Number(g[0])&&2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$_5163[3];return _$_5163[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_5163[84]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options||{};f.opened=
|
|
440
|
+
!0;f.onclose=function(m,p){h.closeEditor(d,!0)};typeof l.timepicker!==_$_5163[13]&&(f.time=b(l,_$_5163[596])?!0:!1);typeof f.readonly!==_$_5163[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;a=k.createEditor(_$_5163[220],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:_$_5163[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?
|
|
441
|
+
d.options.format:_$_5163[597]};c[_$_5163[51]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();k.color=function(){var c={},a=null;c.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_5163[598]?(f=document.createElement(_$_5163[20]),f.className=_$_5163[257],f.style.backgroundColor=e,d.innerText=_$_5163[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==_$_5163[84]&&
|
|
442
|
+
(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(m,p){h.closeEditor(d,!0)};a=k.createEditor(_$_5163[220],d,e,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[_$_5163[51]]=function(d,e){d=document.createElement(_$_5163[20]);d.style.width=_$_5163[599];d.style.height=_$_5163[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!=_$_5163[600]&&d!=_$_5163[601]?!0:
|
|
443
|
+
!1;e=document.createElement(_$_5163[220]);e.type=_$_5163[252];e.checked=d;e.onclick=function(){g.setValue(a,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_5163[602],_$_5163[602]);a.innerHTML=_$_5163[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_5163[600]&&d!=_$_5163[601]?!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[_$_5163[51]]=function(a,
|
|
444
|
+
d){return 1==d||1==d||d==_$_5163[229]?jSuites.translate(_$_5163[229]):jSuites.translate(_$_5163[600])};return c}();k.radio=function(){var c={createCell:function(a,d,e,f,g,h){a.getAttribute(_$_5163[42]);e=document.createElement(_$_5163[220]);e.type=_$_5163[254];e.checked=1==d||1==d||d==_$_5163[229]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_5163[602],_$_5163[602]);a.innerHTML=_$_5163[3];a.appendChild(e)},updateCell:function(a,d,e,f,g){d=1==d||
|
|
445
|
+
1==d||d==_$_5163[229]||d==_$_5163[603]?!0:!1;a&&(a.children[0].checked=d);if(1==d){a=[];for(var h=0;h<g.options.data.length;h++)f!=h&&g.options.data[h][e]&&a.push({x:e,y:h,value:0});a.length&&g.setValue(a)}return d},openEditor:function(a,d,e,f,g){return!1},closeEditor:function(a,d){return!1}};c[_$_5163[51]]=function(a,d){return 1==d||1==d||d==_$_5163[229]?_$_5163[229]:_$_5163[600]};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)&&
|
|
446
|
+
(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?c.isValid(e,f,g,h)||(e=_$_5163[244]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_5163[220],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:_$_5163[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}();
|
|
447
|
+
k.progressbar=function(){var c={},a=null;c.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$_5163[555])var f=d.children[0];else f=document.createElement(_$_5163[20]),f.classList.add(_$_5163[258]),d.innerText=_$_5163[3],d.classList.add(_$_5163[604]),d.appendChild(f);f.style.width=parseInt(e)+_$_5163[577];f.setAttribute(_$_5163[267],parseInt(e)+_$_5163[577])};c.destroyCell=function(d){d.classList.remove(_$_5163[604])};c.updateCell=
|
|
448
|
+
c.createCell;c.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_5163[220],d,e,h);a.type=_$_5163[14];a.setAttribute(_$_5163[605],0);a.setAttribute(_$_5163[606],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:_$_5163[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(_$_5163[607])};c.updateCell=c.createCell;c.openEditor=function(d,
|
|
449
|
+
e,f,g,h,l){a=k.createEditor(_$_5163[220],d,e,h);a.type=_$_5163[14];a.setAttribute(_$_5163[605],0);a.setAttribute(_$_5163[606],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:_$_5163[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:_$_5163[580];var g=document.createElement(_$_5163[20]);g.setAttribute(_$_5163[267],parseInt(e)+_$_5163[608]);g.classList.add(_$_5163[259]);for(var h=
|
|
450
|
+
0;h<e;h++){var l=document.createElement(_$_5163[443]);l.className=_$_5163[508];l.style.color=f;l.innerHTML=_$_5163[609];g.appendChild(l)}d.innerHTML=_$_5163[3];d.className=_$_5163[607];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==_$_5163[562]?e=a.children[0]:(e=document.createElement(_$_5163[200]),a.innerText=_$_5163[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_5163[610],h.options.url)),
|
|
451
|
+
e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_5163[558]);g.parent.input.onblur=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(_$_5163[558]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,_$_5163[187]),_$_5163[3]):_$_5163[3]};return c}();k.url=k.email;k.image=function(){var c={},a=null;c.createCell=function(d,e,f,g,h,
|
|
452
|
+
l){if(d)if(e)if(d.children&&d.children[0]&&d.children[0].tagName==_$_5163[611])d.children[0].src=e;else{var m=document.createElement(_$_5163[37]);l.render==_$_5163[612]&&m.classList.add(_$_5163[612]);l.options&&(m.style.maxWidth=_$_5163[613],l.options.absolute&&(d.classList.add(_$_5163[614]),m.setAttribute(_$_5163[615],-1),m.classList.add(_$_5163[219]),m.classList.add(_$_5163[616]),m.settings=function(){h.openEditor(d,e,f,g,h,l)},m.dblclick=function(){h.openEditor(d,!0)},m[_$_5163[617]]=function(){h.setValueFromCoords(f,
|
|
453
|
+
g,_$_5163[3])}),l.options.width&&(m.style.width=parseInt(l.options.width)+_$_5163[44]),l.options.height&&(m.style.height=parseInt(l.options.height)+_$_5163[44]));m.src=e;d.innerHTML=_$_5163[3];d.appendChild(m)}else d.innerHTML=_$_5163[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(_$_5163[37]),d.src=e,d.classList.add(_$_5163[618]),d.style.width=_$_5163[613],a.appendChild(d));jSuites.image(a,
|
|
454
|
+
l)};c.closeEditor=function(d,e,f,g,h,l){if(e&&(d=a.children[0]))return d.tagName==_$_5163[611]?d.src:_$_5163[3]};c[_$_5163[51]]=function(d,e){return _$_5163[619]+e+_$_5163[620]};return c}();k.html=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_5163[621]);var f=document.createElement(_$_5163[20]);f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_5163[621])};c.openEditor=function(d,e,f,
|
|
455
|
+
g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_5163[583];e=k.createDialog(d,e,f,g,h,l);a=jSuites.editor(e,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=_$_5163[40];c.innerText=a},updateCell:function(c,a,d,e,f){c&&(c.innerText=a)},openEditor:function(c,a,d,e,f){return!1},
|
|
456
|
+
closeEditor:function(c,a){return!1}}}();k.tags=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_5163[622]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_5163[622])};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(_$_5163[20]);d.style.margin=_$_5163[22];d.style.marginRight=_$_5163[623];a.appendChild(d);a=jSuites.tags(d,m);d.focus();
|
|
457
|
+
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=function(d,e,f,g,h,l){d.classList.add(_$_5163[586]);var m;(m=h.parent.getWorksheetInstance(l.worksheetId))?m.rows?c.updateCell(d,e,f,g,h,l):(d.innerText=_$_5163[244],h.parent.queue.push([h,f,g])):(d.innerText=_$_5163[244],h.parent.queue.push([h,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_5163[586])};c.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==
|
|
458
|
+
_$_5163[13]?d.innerText=_$_5163[244]:d.innerHTML=c.getValue(d,e,f,g,h,l))};c.openEditor=function(d,e,f,g,h,l){var m=l.delimiter||_$_5163[216];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_5163[84]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_5163[84]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;f.data=c.getSource(h,l);b(l,_$_5163[587])&&(f.multiple=!0);b(l,_$_5163[56])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,
|
|
459
|
+
!0)};b(l,_$_5163[587])?e&&(f.value=(_$_5163[3]+e).split(m)):f.value=e;a=k.createEditor(_$_5163[20],d,e,h);a=jSuites.dropdown(a,f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_5163[216];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==_$_5163[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_5163[3]||0==e||null==e||void 0==e)return _$_5163[3];
|
|
460
|
+
e=(_$_5163[3]+e).split(_$_5163[216]);for(g=0;g<e.length;g++){var m=e[g].trim();var p=h.name(f);m=h.getRowById(m);p=!1===m?_$_5163[624]:m[p];0<=l.worksheetImage&&(p=_$_5163[625]+p+_$_5163[626]);d.push(p)}return 0<=l.worksheetImage?d.join(_$_5163[3]):d.join(_$_5163[297])}return _$_5163[244]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_5163[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(d=0;d<g.rows.length;d++)if(h=
|
|
461
|
+
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(_$_5163[627]+e.worksheetId);return l};c[_$_5163[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_5163[257]?d.source[f].color:d.render==_$_5163[588]?d.source[f].image:d.source[f].name};return c}();return k}();typeof jQuery!==_$_5163[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(b){var c=k(this)[_$_5163[51]](0);if(c.jspreadsheet){if(typeof arguments[0]==
|
|
462
|
+
_$_5163[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,d))}return t(k(this)[_$_5163[51]](0),arguments[0])}}(jQuery);return t});
|