jspreadsheet 9.2.5 → 9.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +464 -464
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v9.2.
|
|
2
|
+
* Jspreadsheet v9.2.7
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -16,24 +16,24 @@ if (! jSuites && typeof(require) === 'function') {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(E){var I=0;return function(){return I<E.length?{done:!1,value:E[I++]}:{done:!0}}};$jscomp.arrayIterator=function(E){return{next:$jscomp.arrayIteratorImpl(E)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
|
|
19
|
-
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(E,I,
|
|
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(E,I){var
|
|
21
|
-
$jscomp.polyfill=function(E,I,
|
|
22
|
-
$jscomp.polyfillIsolated=function(E,I,
|
|
23
|
-
$jscomp.global.Symbol(
|
|
24
|
-
$jscomp.iteratorFromArray=function(E,I){E instanceof String&&(E+="");var
|
|
25
|
-
$jscomp.polyfill("Object.fromEntries",function(E){return E?E:function(I){var
|
|
26
|
-
var _$
|
|
19
|
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(E,I,L){if(E==Array.prototype||E==Object.prototype)return E;E[I]=L.value;return E};$jscomp.getGlobal=function(E){E=["object"==typeof globalThis&&globalThis,E,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var I=0;I<E.length;++I){var L=E[I];if(L&&L.Math==Math)return L}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
|
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(E,I){var L=$jscomp.propertyToPolyfillSymbol[I];if(null==L)return E[I];L=E[L];return void 0!==L?L:E[I]};
|
|
21
|
+
$jscomp.polyfill=function(E,I,L,P){I&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(E,I,L,P):$jscomp.polyfillUnisolated(E,I,L,P))};$jscomp.polyfillUnisolated=function(E,I,L,P){L=$jscomp.global;E=E.split(".");for(P=0;P<E.length-1;P++){var W=E[P];if(!(W in L))return;L=L[W]}E=E[E.length-1];P=L[E];I=I(P);I!=P&&null!=I&&$jscomp.defineProperty(L,E,{configurable:!0,writable:!0,value:I})};
|
|
22
|
+
$jscomp.polyfillIsolated=function(E,I,L,P){var W=E.split(".");E=1===W.length;P=W[0];P=!E&&P in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<W.length-1;Z++){var ra=W[Z];if(!(ra in P))return;P=P[ra]}W=W[W.length-1];L=$jscomp.IS_SYMBOL_NATIVE&&"es6"===L?P[W]:null;I=I(L);null!=I&&(E?$jscomp.defineProperty($jscomp.polyfills,W,{configurable:!0,writable:!0,value:I}):I!==L&&(void 0===$jscomp.propertyToPolyfillSymbol[W]&&(L=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[W]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
|
+
$jscomp.global.Symbol(W):$jscomp.POLYFILL_PREFIX+L+"$"+W),$jscomp.defineProperty(P,$jscomp.propertyToPolyfillSymbol[W],{configurable:!0,writable:!0,value:I})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(E){E={next:E};E[Symbol.iterator]=function(){return this};return E};
|
|
24
|
+
$jscomp.iteratorFromArray=function(E,I){E instanceof String&&(E+="");var L=0,P=!1,W={next:function(){if(!P&&L<E.length){var Z=L++;return{value:I(Z,E[Z]),done:!1}}P=!0;return{done:!0,value:void 0}}};W[Symbol.iterator]=function(){return W};return W};$jscomp.polyfill("Array.prototype.values",function(E){return E?E:function(){return $jscomp.iteratorFromArray(this,function(I,L){return L})}},"es8","es3");
|
|
25
|
+
$jscomp.polyfill("Object.fromEntries",function(E){return E?E:function(I){var L={};if(!(Symbol.iterator in I))throw new TypeError(""+I+" is not iterable");I=I[Symbol.iterator].call(I);for(var P=I.next();!P.done;P=I.next()){P=P.value;if(Object(P)!==P)throw new TypeError("iterable for fromEntries should yield objects");L[P[0]]=P[1]}return L}},"es_2019","es3");
|
|
26
|
+
var _$_24da=["use strict","{","}","","9.2.7","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","&","<","g","<",">",">","=","!",'"',"undefined","number","fullscreen","block","string","readonly","jss_rotate","span","rotate(","deg)","jss_hidden_index","div","right","10px","pointer","/v9",",","localhost",".","v9"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license",
|
|
27
27
|
"Your license is expired. Please renew your certificate.","jspreadsheet","img","/jspreadsheet/","logo.png","none","status","edition","scope","get","px","jss_frozen","0px","data-y","scroll","wheel","firefox","goto","data-x","jss_scroll","jss_hidden","jss_content_overflow","onresize","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","hideRow",
|
|
28
28
|
"showRow","hideColumn","showColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","setFreezeColumns","setFreezeRows","orderBy","setValue","setProperty","updateProperty","renameWorksheet","moveWorksheet","setDefinedNames","setRowGroup","resetRowGroup","openRowGroup","closeRowGroup","onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","copying","keydown","oneditionstart","oncreateeditor",
|
|
29
29
|
"hidden","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","oninput","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","onbeforesend","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","disconnected","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","onblur",
|
|
30
30
|
"onfocus","onselection"," ","'","'!",":","jss_border","cloning","jss_border_","15","jss_resize_corner","data-action","ontouchstart","moveLeft","-6px","moveTop","moveRight","moveDown","-2000px","transparent","left","bottom","top","tr","jss_group_container","td"," ",".jss_group","jss_group","+","oncreaterowgroup","i","material-icons","onopenrowgroup","oncloserowgroup","ondestroyrowgroup","width","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action",
|
|
31
|
-
"jss_dragging","51px","1px","jss_helper_row","Jspreadsheet: This column is part of a merged cell.","jss_helper_col","No cell selected","Invalid merged properties","onmerge","colspan","rowspan","Column name","data-title","onchangeheader","jss_header","col","oncreatecolumn","jss_filters_icon","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell","onchangenestedcell",
|
|
32
|
-
"data-nested-y","align","calendar",'""',"\t","oncopy","copy","color: initial","onbeforepaste","JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","Defined names are only available on the Premium edition.","onchangedefinednames","#REF!","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","-","/","*","^","(","[","|",";","data-token","picker","jss_picker","click","active","focus",
|
|
33
|
-
"contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula","#LOOP","Reference loop detected","#SELF","Self Reference detected","#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","jss_number","$","Something went wrong","onafterchanges","checkbox","autonumber","email","url","color","progressbar","rating","radio","onformulachain","onbeforechange","onchange",
|
|
34
|
-
"mergeCells","title","jss_comments","jss_unlocked","jss_zebra","jss_wrap","onchangeproperty","onchangerowvisibility","jss_row","oncreaterow","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration","onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments",
|
|
35
|
-
"onchangecolumnvisibility","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination","onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","record","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration","Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ",
|
|
36
|
-
"No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta","onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined","onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_frozen_row","jss_freeze_control_row",
|
|
31
|
+
"jss_dragging","51px","1px","jss_helper_row","Jspreadsheet: This column is part of a merged cell.","jss_helper_col","No cell selected","Invalid merged properties","onmerge","colspan","rowspan","Column name","data-title","onchangeheader","jss_header","col","oncreatecolumn","jss_filters_icon","onrenderfootercell","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell","onchangenestedcell",
|
|
32
|
+
"center","data-nested-x","data-nested-y","align","calendar",'""',"\t","oncopy","copy","color: initial","onbeforepaste","JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",".csv","a","download","Defined names are only available on the Premium edition.","onchangedefinednames","#REF!","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","-","/","*","^","(","[","|",";","data-token","picker","jss_picker","click","active","focus",
|
|
33
|
+
"input","jss_object","contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula","#LOOP","Reference loop detected","#SELF","Self Reference detected","#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","jss_number","$","Something went wrong","onafterchanges","checkbox","autonumber","email","url","color","progressbar","rating","radio","onformulachain","onbeforechange","onchange",
|
|
34
|
+
"oncreatecell","values","mergeCells","title","jss_comments","jss_unlocked","jss_zebra","jss_wrap","onchangeproperty","onchangerowvisibility","jss_row","oncreaterow","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration","onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments",
|
|
35
|
+
"ondeleterow","onchangecolumnvisibility","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination","onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","record","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration","Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ",
|
|
36
|
+
"onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta","onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined","onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_frozen_row","jss_freeze_control_row",
|
|
37
37
|
"jss_freeze_control_col","jss_content","selectstart","table","thead","tbody","tfoot","jss_nogridline","colgroup","50","jss_selectall","JSS: Freeze controls are only available on the Premium edition.","jss","cellpadding","cellspacing","unselectable","yes","jss_","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false","X","Y","jss_content_pagination","Frozen columns cannot be greater than the number of available columns","rows","onbeforechangereferences","onchangereferences","jss_container",
|
|
38
38
|
"jss_toolbar","jss_helper","jss_loading","textarea","jss_textarea","-1","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.","jss_worksheet","init","To improve the performance, please consider tableOverflow or pagination.","resize","touchstart","touchmove","touchend","auto","onresizecolumn","onresizerow","label","jss_filters_active","Jspreadsheet: the filter is not enabled.","onopenfilter","Blanks","onbeforefilter","onfilter",
|
|
39
39
|
"gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply","jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all","select","jss_pagination_dropdown","option","Show","entries","jss_search","jss_searching","onsearchrow","onsearchstart","onbeforesearch","onsearch","jss_search_container","jss_contextmenu","cell","row","header","Mac","⌘","Ctrl","tabs","Rename this worksheet","Delete this worksheet",
|
|
@@ -44,465 +44,465 @@ var _$_e96d=["use strict","{","}","","9.2.5","Base","https://jspreadsheet.com","
|
|
|
44
44
|
"data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","header-group","jtabs-headers","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","move","col-resize","grab","row-resize","A","mailto:","_blank","onclick","jclose","DOM el not found",'<table class="jss"><tbody><tr><td>A</td></tr></tbody></table>',"Cloud extension not loaded.","onload","jss_dialog","@","decimal","data-locale","%",
|
|
45
45
|
"jss_percent","[Red]","red","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","timepicker","YYYY-MM-DD","square","100px","false","FALSE","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex","jpanel","delete","jfile",'<img src="','" alt="">',"jss_richtext",
|
|
46
46
|
"jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
47
|
-
(function(E,I){typeof exports===_$
|
|
48
|
-
{version:_$
|
|
49
|
-
h=h.replace(new RegExp(_$
|
|
50
|
-
0<=h?
|
|
51
|
-
u.current:null;typeof h===_$
|
|
52
|
-
else return typeof b===_$
|
|
53
|
-
b?(h&&h.classList&&h.classList.contains(_$
|
|
54
|
-
!1:!0;h?c.remove(b):c.add(b);J.call(this,!0)},
|
|
55
|
-
_$
|
|
56
|
-
1E3),x=
|
|
57
|
-
!sessionStorage.getItem(_$
|
|
58
|
-
configurable:!1,enumerable:!1,extensible:!1});return b},J=function(){var h=function(l){-1==this.indexOf(l)&&this.push(l)},b=function(l,p){if(!l||!p)return!1;var q=l.length;if(q!=p.length)return!1;for(;q--;)if(l[q]!==p[q])return!1;return!0},c=function(l){var p=null,q,r,w=0,x={},y=!1;for(q=0;q<this.options.columns.length;q++)if(-1===l.indexOf(q)){if(
|
|
59
|
-
0;r<this.options.footers.length;r++)this.footers.content[r][q].element&&this.footers.content[r][q].element.parentNode&&this.footers.content[r][q].element.parentNode.removeChild(this.footers.content[r][q].element);y=!0}for(r=0;r<this.visibleRows.length;r++){var B=this.records[this.visibleRows[r]][q];B.element&&B.element.
|
|
60
|
-
|
|
61
|
-
B
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.thead.children[r].insertBefore(D,this.thead.children[r].children[1]),D.style.top=w+_$
|
|
65
|
-
(this.table.style.left=_$
|
|
66
|
-
|
|
67
|
-
0,(B+x>r&&B<=w||p<y)&&h.call(l,p),B+=x;for(p=0;p<l.length;p++)if(r=
|
|
68
|
-
0!=this.options.virtualizationY){var x=this.content.scrollTop,y=x+this.content.offsetHeight,B=0,z=this.options.freezeRows||0,D=0;p=this.results?this.results:this.rows;z&&(x+=
|
|
69
|
-
(w=p.length)):(q=0,w=p.length),r=q;r<w;r++)q=this.results?p[r]:r,l.push(q);if(this.options.mergeCells){for(r=0;r<l.length;r++)if(this.merged.rows[l[r]]&&(w=
|
|
70
|
-
g.update.call(q)});this.content.addEventListener(_$
|
|
71
|
-
100;this.scrollX.style.width=this.width+l+_$
|
|
72
|
-
r.height=q,p=!0}p&&(q=this.parent.config.spacing||100,p=
|
|
73
|
-
p),this.content.scrollLeft=p)};g.up=function(l){var p=this.options.freezeRows||0;if(l)this.content.scrollTop=0;else if(this.tbody.children[p+1]){l=this.tbody.children[p+1].getAttribute(_$
|
|
74
|
-
this.content.scrollTop-=r}};g.down=function(l){var p=this.options.freezeRows||0;l?this.content.scrollTop=this.content.scrollHeight:this.tbody.firstChild&&(this.content.scrollTop+=this.tbody.children[1+p].offsetHeight)};g.left=function(l){var p=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0;else{for(p=l=this.thead.lastChild.children[1+p].getAttribute(_$
|
|
75
|
-
(p+=this.content.scrollLeft-this.table.offsetLeft);this.content.scrollLeft-=p}};g.right=function(l){var p=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+p].offsetWidth};var k=function(){for(var l,p=this.content.offsetHeight-this.thead.offsetHeight-
|
|
76
|
-
|
|
77
|
-
p){for(var q=this.options.columns,r=0,w=this.options.freezeColumns||0;w<this.options.columns.length;w++){if(l===w)return r;
|
|
78
|
-
this.records[p][l].element;if(r){if(!this.records[p][l].merged)if(0==q||2==q){var w=0,x=
|
|
79
|
-
w&&(r.parentNode?(q=this.content.scrollLeft+(x+y-w+16),g.setX.call(this,q)):g[_$
|
|
80
|
-
q)):g[_$
|
|
81
|
-
return g}(),
|
|
82
|
-
g;else return g}e=f}}return d},
|
|
83
|
-
k!==e&&!a)break;if(c)d=f;else return f}e=k}}return d},
|
|
84
|
-
(e=h,!c))break}else{if(c&&g!==f&&!a)break;if(c)e=h;else return h}f=g}return e},
|
|
85
|
-
!c))break}else{if(c&&e!==g&&!a)break;if(c)d=h;else return h}g=e}return d},
|
|
86
|
-
g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);d=
|
|
87
|
-
e,g,a,d);d!=g&&(g=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=g,e=c,g=d),h.call(this,3,e,g,a),
|
|
88
|
-
a),
|
|
89
|
-
(a?b.up.call(this,c,!0,!0):b.left.call(this,c,!0,!0))};b.last=function(c,a){Array.isArray(this.selectedCell)&&(a?b.down.call(this,c,!0,!0):b.right.call(this,c,!0,!0))};return b}()
|
|
90
|
-
h.isEditable=function(){return T.call(h.parent,h)};h.dispatch=function(){return G.apply(this.parent,arguments)};h.persistence=
|
|
91
|
-
|
|
47
|
+
(function(E,I){typeof exports===_$_24da[111]&&typeof module!==_$_24da[21]?module.exports=I():typeof define===_$_24da[112]&&define.amd?define(I):E.jspreadsheet=E.jexcel=I()})(this,function(){_$_24da[0];var E=function(h,b){h=jSuites.translate(h);if(b&&b.length)for(var c=0;c<b.length;c++)h=h.replace(_$_24da[1]+c+_$_24da[2],b[c]);return h},I=function(h,b){Array.isArray(h)&&(h=h[0]);h=h.replace(new RegExp(/'/g),_$_24da[3]).toUpperCase();if(void 0===b)return window[h]?window[h]:null;window[h]=b},L=function(){var h=
|
|
48
|
+
{version:_$_24da[4],edition:_$_24da[5],host:_$_24da[6],license:_$_24da[7],print:function(){return[_$_24da[8]+this.edition+_$_24da[9]+this.version+_$_24da[10]+this.host+_$_24da[10]+this.license]}};return function(){return h}}(),P=function(h){var b=parseInt(h.y);if(h.id)var c=parseInt(h.id);else h.value&&(c=parseInt(h.value));0<c&&(this.rows[b].id=c,za[_$_24da[11]].call(this,c))},W=function(h,b){var c=_$_24da[3],a=0;-1!==h.indexOf(_$_24da[12])&&(h=h.replace(new RegExp(_$_24da[13],_$_24da[14]),_$_24da[15]),
|
|
49
|
+
h=h.replace(new RegExp(_$_24da[16],_$_24da[14]),_$_24da[17]));for(var d=[_$_24da[18],_$_24da[19],_$_24da[17],_$_24da[15]],e=0;e<h.length;e++)h[e]==_$_24da[20]&&(a=0==a?1:0),1==a?c+=h[e]:(c+=h[e].toUpperCase(),1==b&&0<e&&h[e]==_$_24da[18]&&-1==d.indexOf(h[e-1])&&-1==d.indexOf(h[e+1])&&(c+=_$_24da[18]));return c},Z=function(h){return(_$_24da[3]+h).substr(0,1)===_$_24da[18]},ra=function(h){var b=this.options.columns;return b[h]&&b[h].name?b[h].name:h},R=function(h,b,c){var a;if(a=this.options.data[b]){var d=
|
|
50
|
+
0<=h?ra.call(this,h):h;typeof c===_$_24da[21]?c=typeof d===_$_24da[22]?a[h]:jSuites.path.call(a,_$_24da[3]+d):(typeof d===_$_24da[22]?a[h]=c:jSuites.path.call(a,_$_24da[3]+d,c),!Z(c)&&this.records[b][h]&&(this.records[b][h].v=c))}else c=null;return c},T=function(h){return 0==this.config.editable||h&&0==h.options.editable?!1:(h=Oa.call(this))?7<=h?!0:!1:!0},Pa=function(h){var b=_$_24da[23];if(this.parent)var c=this.parent.config,a=this.parent.element,d=this;else c=this.config,a=this.element,d=u.current?
|
|
51
|
+
u.current:null;typeof h===_$_24da[21]&&(h=!a.classList.contains(b));h?(a.classList.add(b),c.fullscreen=!0):(a.classList.remove(b),c.fullscreen=!1);d&&(J.call(d,!0),ma.update.call(d.parent,d))},Qa=function(h){var b=this.loading;null===h&&(h=b.style.display==_$_24da[24]?!0:!1);b.style.display=h?_$_24da[24]:_$_24da[3];setTimeout(function(){b.style.display=_$_24da[3]},1E3)},Ra=function(h,b){if(typeof h===_$_24da[25]){var c=H.getCoordsFromColumnName(h);c=this.records[c[1]][c[0]];if(c.element)h=c.element;
|
|
52
|
+
else return typeof b===_$_24da[21]?c.readonly:c.readonly=b?!0:!1}c=_$_24da[26];h=h.classList;if(typeof b===_$_24da[21])return h.contains(c)?!0:!1;b?h.add(c):h.remove(c)},Ya=function(h,b){var c,a=[];if(typeof h===_$_24da[25]){var d=H.getCoordsFromColumnName(h);a.push({x:d[0],y:d[1],value:{rotate:b}})}else if(Array.isArray(h))for(c=0;c<h.length;c++)d=H.getCoordsFromColumnName(h[c]),a.push({x:d[0],y:d[1],value:{rotate:b}});for(c=0;c<a.length;c++)(d=this.records[a[c].y][a[c].x])&&d.element&&(h=d.element.firstChild,
|
|
53
|
+
b?(h&&h.classList&&h.classList.contains(_$_24da[27])||(h=document.createElement(_$_24da[28]),h.classList.add(_$_24da[27]),h.innerHTML=d.element.innerHTML,d.element.innerHTML=_$_24da[3],d.element.appendChild(h)),h.style.transform=_$_24da[29]+parseInt(270-b)+_$_24da[30]):h&&h.classList&&h.classList.contains(_$_24da[27])&&(h.classList.remove(_$_24da[27]),h.style.transform=_$_24da[3]));this.updateProperty(a);da.refresh.call(this)},Ca=function(h){var b=_$_24da[31],c=this.table.classList;if(typeof h==_$_24da[21])return c.contains(b)?
|
|
54
|
+
!1:!0;h?c.remove(b):c.add(b);J.call(this,!0)},Oa=function(h){if(void 0===h)return this.status;var b=document.createElement(_$_24da[32]);b.style.textAlign=_$_24da[33];b.style.fontSize=_$_24da[34];b.style.cursor=_$_24da[35];b.onclick=function(){window.location.href=L().host+_$_24da[36]};var c=null,a=[],d=[74,50,48,50,48,33].join(_$_24da[3]);(function(g){c=1;try{if(g){var f=window.atob(g);f=f.split(_$_24da[37]);if(f[1]){f[1]=window.atob(f[1]);var k=f[0];g=d;var n=f[1],l=jSuites.sha512,p=_$_24da[3],q=
|
|
55
|
+
_$_24da[3];128<g.length&&(g=l(g));for(var r=0;128>r;r++){var w=g[r]?g[r].charCodeAt(0):0;p+=String.fromCharCode(54^w);q+=String.fromCharCode(92^w)}var x=l(q+l(p+n));if(k!=x)c=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var y=window.location.hostname||_$_24da[38];k=!1;for(x=0;x<f[1].domain.length;x++)-1===f[1].domain[x].indexOf(_$_24da[39])?y===f[1].domain[x]&&(k=!0):y.substr(y.indexOf(f[1].domain[x]))==f[1].domain[x]&&(k=!0);!1===k?c=4:f[1].scope&&0<=f[1].scope.indexOf(_$_24da[40])?(y=new Date,k=parseInt(y.getTime()/
|
|
56
|
+
1E3),x=L(),f[1].date<k?(c=f[1].demo||!f[1].plan||f[1].date+2592E3<k?6:7,x.license=f[1].name+_$_24da[41]):(c=8,x.license=_$_24da[42]+f[1].name,x.edition=3==f[1].plan||6==f[1].plan||31==f[1].plan||33==f[1].plan?_$_24da[43]:_$_24da[5],a=f[1].scope)):c=5}else c=4}else c=2}}catch(B){}})(h);h=_$_24da[3];if(1==c)h=_$_24da[44];else if(2==c||3==c||4==c)h=_$_24da[45];else if(5==c)h=_$_24da[46];else if(6==c||7==c)h=_$_24da[47];b.appendChild(document.createTextNode(h));if(8>c)try{if(typeof sessionStorage!==_$_24da[21]&&
|
|
57
|
+
!sessionStorage.getItem(_$_24da[48])){sessionStorage.setItem(_$_24da[48],!0);var e=document.createElement(_$_24da[49]);e.src=L().host+_$_24da[50]+_$_24da[51];e.style.display=_$_24da[52];b.appendChild(e)}}catch(g){}Object.defineProperty(this,_$_24da[53],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_24da[54],{value:L().edition===_$_24da[43]?1:0,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_24da[55],{get:function(){return a},
|
|
58
|
+
configurable:!1,enumerable:!1,extensible:!1});return b},J=function(){var h=function(l){-1==this.indexOf(l)&&this.push(l)},b=function(l,p){if(!l||!p)return!1;var q=l.length;if(q!=p.length)return!1;for(;q--;)if(l[q]!==p[q])return!1;return!0},c=function(l){var p=null,q,r,w=0,x={},y=!1;for(q=0;q<this.options.columns.length;q++)if(-1===l.indexOf(q)){if(na.attached.call(this,q)){this.headers[q].parentNode.removeChild(this.headers[q]);this.colgroup[q].parentNode.removeChild(this.colgroup[q]);if(this.options.footers)for(r=
|
|
59
|
+
0;r<this.options.footers.length;r++)this.footers.content[r][q].element&&this.footers.content[r][q].element.parentNode&&this.footers.content[r][q].element.parentNode.removeChild(this.footers.content[r][q].element);y=!0}for(r=0;r<this.visibleRows.length;r++){var B=this.records[this.visibleRows[r]][q];B.element&&B.element.remove()}}if(this.options.nestedHeaders)for(r=0;r<this.thead.children.length-1;r++)w+=this.thead.children[r].offsetHeight;for(q=0;q<l.length;q++){var z=l[q];var D=Fa.create.call(this,
|
|
60
|
+
z);if(p){if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[p].nextSibling);this.colgroupContainer.insertBefore(this.colgroup[z],this.colgroupContainer.children[p].nextSibling);if(this.options.footers)for(r=0;r<this.options.footers.length;r++)this.tfoot.children[r].insertBefore(ia.create.call(this,z,r),this.tfoot.children[r].children[p].nextSibling);w&&(D.style.top+=w);y=!0}for(r=0;r<this.visibleRows.length;r++)B=this.visibleRows[r],B=U[_$_24da[56]].call(this,z,B),
|
|
61
|
+
B.parentNode||this.tbody.children[r].insertBefore(B,this.tbody.children[r].children[p].nextSibling)}else{if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[1]);this.colgroupContainer.insertBefore(this.colgroup[z],this.colgroupContainer.children[1]);if(this.options.footers)for(r=0;r<this.options.footers.length;r++)this.tfoot.children[r].insertBefore(ia.create.call(this,z,r),this.tfoot.children[r].children[1]);w&&(D.style.top+=w);y=!0}for(r=0;r<this.visibleRows.length;r++)B=
|
|
62
|
+
this.visibleRows[r],B=U[_$_24da[56]].call(this,z,B),B.parentNode||this.tbody.children[r].insertBefore(B,this.tbody.children[r].children[1])}if(this.options.mergeCells)for(r=0;r<this.visibleRows.length;r++)B=this.visibleRows[r],p=H.getColumnNameFromCoords(z,B),this.options.mergeCells[p]&&(this.records[B][z].merged||(x[p]=!1));p=Array.prototype.indexOf.call(this.headerContainer.children,D)}w=0;if(this.options.nestedHeaders)for(r=0;r<this.options.nestedHeaders.length;r++){p=null;z=[];B=Aa.getColumns.call(this,
|
|
63
|
+
r);for(q=0;q<l.length;q++)void 0!==B[l[q]]&&-1==z.indexOf(B[l[q]])&&z.push(B[l[q]]);for(q=0;q<this.options.nestedHeaders[r].length;q++)-1==z.indexOf(q)&&this.nested.content[r][q]&&this.nested.content[r][q].element.offsetHeight&&this.nested.content[r][q].element.remove();for(q=B=0;q<z.length;q++)D=Aa.create.call(this,z[q],r),D.parentNode||(p?this.thead.children[r].children[p]?this.thead.children[r].insertBefore(D,this.thead.children[r].children[p].nextSibling):this.thead.children[r].appendChild(D):
|
|
64
|
+
this.thead.children[r].insertBefore(D,this.thead.children[r].children[1]),D.style.top=w+_$_24da[57],this.options.freezeColumns&&this.options.nestedHeaders[r][z[q]].frozen&&(D.style.left=B+(Ca.call(this)?50:0)+_$_24da[57],D.classList.add(_$_24da[58]))),B+=D.offsetWidth,p=Array.prototype.indexOf.call(this.thead.children[r].children,D);w+=this.thead.children[r].offsetHeight}1==y?this.table.style.left=g.width.call(this,l[this.options.freezeColumns||0])+_$_24da[57]:this.width<parseInt(this.table.style.left)&&
|
|
65
|
+
(this.table.style.left=_$_24da[59]);sa.batch.call(this,x);this.visibleCols=l},a=function(l){var p=[],q=null,r,w=!1;for(r=0;r<this.tbody.children.length;r++)p.push(this.tbody.children[r]);for(r=0;r<p.length;r++){var x=parseInt(p[r].getAttribute(_$_24da[60]));-1===l.indexOf(x)&&(p[r].remove(),w=!0)}for(r=0;r<l.length;r++)p=aa.create.call(this,l[r]),p.parentNode||(q?this.tbody.insertBefore(p,q.nextSibling):this.tbody.insertBefore(p,this.tbody.firstChild),w=!0),q=p;w?(this.table.style.top=g.height.call(this,
|
|
66
|
+
l[this.options.freezeRows||0])+_$_24da[57],this.visibleCols=null):this.height<parseInt(this.table.style.top)&&(this.table.style.top=_$_24da[59]);this.visibleRows=l},d=function(){var l=[],p=0,q=null;if(J.limited.call(this)&&0!=this.options.virtualizationX){var r=q=0;r=this.content.scrollLeft;var w=r+this.content.offsetWidth;q=this.options.columns;var x=null,y=this.options.freezeColumns||0,B=0;y&&(r+=ea.getWidth.call(this,!0));for(p=0;p<q.length;p++)x=na.isVisible.call(this,p)?parseInt(q[p].width):
|
|
67
|
+
0,(B+x>r&&B<=w||p<y)&&h.call(l,p),B+=x;for(p=0;p<l.length;p++)if(r=sa.getAffected.call(this.merged.cols,l[p]))for(q=0;q<r.length;q++)h.call(l,r[q]);for(p=0;p<l.length;p++)if(r=Aa.getAffected.call(this,l[p]))for(q=0;q<r.length;q++)this.options.columns[r[q]]&&h.call(l,r[q]);l.sort(function(z,D){return z-D})}else for(q=this.options.columns,p=0;p<q.length;p++)l.push(p);b(l,this.visibleCols)||c.call(this,l)},e=function(){var l=[],p=null,q=0,r=0;q=null;var w=0;if(J.limited.call(this)&&!this.options.pagination&&
|
|
68
|
+
0!=this.options.virtualizationY){var x=this.content.scrollTop,y=x+this.content.offsetHeight,B=0,z=this.options.freezeRows||0,D=0;p=this.results?this.results:this.rows;z&&(x+=ja.getHeight.call(this,!0));for(r=0;r<p.length;r++)q=this.results?p[r]:r,!1!==this.rows[q].visible&&(B=aa.height.call(this,q),(D+B>x&&D<y||r<z)&&l.push(q),D+=B)}else for(p=this.results?this.results:this.rows,this.options.pagination?(q=parseInt(this.options.pagination)*this.pageNumber,w=q+parseInt(this.options.pagination),w>p.length&&
|
|
69
|
+
(w=p.length)):(q=0,w=p.length),r=q;r<w;r++)q=this.results?p[r]:r,l.push(q);if(this.options.mergeCells){for(r=0;r<l.length;r++)if(this.merged.rows[l[r]]&&(w=sa.getAffected.call(this.merged.rows,l[r])))for(q=0;q<w.length;q++)-1===l.indexOf(w[q])&&l.push(w[q]);l.sort(function(v,A){return v-A})}b(l,this.visibleRows)||a.call(this,l)},g=function(l,p){p&&(this.visibleCols=this.visibleRows=null);g.calculate.call(this);g.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$_24da[61],function(){g.ignore||
|
|
70
|
+
g.update.call(q)});this.content.addEventListener(_$_24da[62],function(r){if(J.limited.call(q)&&!q.options.pagination){var w=Math.abs(r.deltaX),x=Math.abs(r.deltaY);r.shiftKey||w>x?0>r.deltaX||0>r.deltaY?g.left.call(q):g.right.call(q):0>r.deltaY?g.up.call(q):g.down.call(q);r.preventDefault()}})}};g.calculate=function(){if(J.limited.call(this)){var l=ea.getWidth.call(this),p=ja.getHeight.call(this);this.width=g.width.call(this)+(l?l:1);this.height=g.height.call(this)+(p?p:1);l=this.parent.config.spacing||
|
|
71
|
+
100;this.scrollX.style.width=this.width+l+_$_24da[57];this.scrollY.style.height=this.height+l+_$_24da[57]}};var f=null;g.update=function(){var l=this.thead.lastChild.offsetHeight;e.call(this);d.call(this);if(J.limited.call(this)){var p=null;var q=this.thead.lastChild.offsetHeight;l<q&&(this.thead.lastChild.style.height=q+_$_24da[57],p=!0);for(l=0;l<this.visibleRows.length;l++){var r=this.rows[this.visibleRows[l]];q=r.element.offsetHeight;if(q>r.height||!r.height)r.element.style.height=q+_$_24da[57],
|
|
72
|
+
r.height=q,p=!0}p&&(q=this.parent.config.spacing||100,p=ja.getHeight.call(this),this.height=g.height.call(this)+(p?p:1),this.scrollY.style.height=this.height+q+_$_24da[57])}Ea.update.call(this);ea.refresh.call(this);ja.refresh.call(this);da.refresh.call(this);f||(f=-1<window.navigator.userAgent.toLowerCase().indexOf(_$_24da[63]));f&&this.thead.appendChild(this.thead.lastChild)};g[_$_24da[64]]=function(l,p){null!==l&&(l=g.height.call(this,l),this.content.scrollTop=l);void 0!==p&&null!==p&&(p=g.width.call(this,
|
|
73
|
+
p),this.content.scrollLeft=p)};g.up=function(l){var p=this.options.freezeRows||0;if(l)this.content.scrollTop=0;else if(this.tbody.children[p+1]){l=this.tbody.children[p+1].getAttribute(_$_24da[60]);l=parseInt(l);var q=l;for(this.results&&(l=this.results.indexOf(l));0<l;){l--;var r=this.results?this.results[l]:l;if(aa.isVisible.call(this,r)){q=r;break}}r=aa.height.call(this,q);l=this.tbody.children[p].getAttribute(_$_24da[60]);aa.attached.call(this,l)||(r+=this.content.scrollTop-this.table.offsetTop);
|
|
74
|
+
this.content.scrollTop-=r}};g.down=function(l){var p=this.options.freezeRows||0;l?this.content.scrollTop=this.content.scrollHeight:this.tbody.firstChild&&(this.content.scrollTop+=this.tbody.children[1+p].offsetHeight)};g.left=function(l){var p=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0;else{for(p=l=this.thead.lastChild.children[1+p].getAttribute(_$_24da[65]);0<l;)if(l--,na.isVisible.call(this,l)){p=l;break}l=p;p=parseInt(this.options.columns[l].width);this.headers[l]&&this.headers[l].parentNode||
|
|
75
|
+
(p+=this.content.scrollLeft-this.table.offsetLeft);this.content.scrollLeft-=p}};g.right=function(l){var p=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+p].offsetWidth};var k=function(){for(var l,p=this.content.offsetHeight-this.thead.offsetHeight-ja.getHeight.call(this),q=0,r=0;r<this.tbody.children.length;r++)l=this.tbody.children[r].offsetHeight,p>l&&(q+=l,p-=l);return q},n=function(){for(var l,p=this.content.offsetWidth-
|
|
76
|
+
ea.getWidth.call(this),q=0,r=0;r<this.thead.lastChild.children.length;r++)l=this.thead.lastChild.children[r].offsetWidth,p>l&&(q+=l,p-=l);return q};g.pageUp=function(){this.content.scrollTop-=k.call(this)};g.pageDown=function(){this.content.scrollTop+=k.call(this)};g.pageLeft=function(){this.content.scrollLeft-=n.call(this)};g.pageRight=function(){this.content.scrollLeft+=n.call(this)};g.build=function(l){var p=document.createElement(_$_24da[32]);p.className=_$_24da[66]+l;return p};g.width=function(l,
|
|
77
|
+
p){for(var q=this.options.columns,r=0,w=this.options.freezeColumns||0;w<this.options.columns.length;w++){if(l===w)return r;na.isVisible.call(this,w)&&(r+=parseInt(q[w].width));if(r>=p)return w}return p?w:r};g.height=function(l,p){for(var q=0,r=0,w=this.results?this.results:this.rows,x=this.options.freezeRows||0;x<w.length;x++){r=x;this.results&&(r=w[x]);if(l===r)return q;this.rows[r]&&!1!==this.rows[r].visible&&(q+=aa.height.call(this,r));if(q>=p)return r}return p?r:q};g.adjust=function(l,p,q){var r=
|
|
78
|
+
this.records[p][l].element;if(r){if(!this.records[p][l].merged)if(0==q||2==q){var w=0,x=Ca.call(this)?50:0;this.options.freezeColumns&&(w=ea.getWidth.call(this,!0));p=this.content.scrollLeft+w;w=this.content.scrollLeft+(this.content.offsetWidth-x);x=this.table.offsetLeft+r.offsetLeft-x;var y=r.offsetWidth;0==q?x+y<w&&l>this.options.freezeColumns-1&&x<p&&(r.offsetHeight?(q=this.content.scrollLeft+(x-p),g.setX.call(this,q)):g[_$_24da[64]].call(this,null,l)):l>this.options.freezeColumns-1&&(x>p?x+y>
|
|
79
|
+
w&&(r.parentNode?(q=this.content.scrollLeft+(x+y-w+16),g.setX.call(this,q)):g[_$_24da[64]].call(this,null,l)):g[_$_24da[64]].call(this,null,l))}else w=0,this.options.freezeRows&&(w=ja.getHeight.call(this,!0)),l=this.content.scrollTop+w,w=this.content.scrollTop+this.content.offsetHeight-this.thead.offsetHeight-16,x=this.table.offsetTop+r.offsetTop-this.thead.offsetHeight,y=r.offsetHeight,1==q?x+y<w&&p>this.options.freezeRows-1&&x<l&&(r.offsetHeight?(q=this.content.scrollTop+(x-l),g.setY.call(this,
|
|
80
|
+
q)):g[_$_24da[64]].call(this,p)):p>this.options.freezeRows-1&&(x>l?x+y>w&&(r.parentNode?(q=this.content.scrollTop+(x+y-w),g.setY.call(this,q)):g[_$_24da[64]].call(this,p)):g[_$_24da[64]].call(this,p,null))}else 0==q||2==q?g[_$_24da[64]].call(this,null,l):g[_$_24da[64]].call(this,p)};g.setX=function(l){g.ignore=!0;this.content.scrollLeft=l;g.ignore=!1};g.setY=function(l){g.ignore=!0;this.content.scrollTop=l;g.ignore=!1};g.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};
|
|
81
|
+
return g}(),Sa=function(h,b,c,a){var d=b,e=null;if(this.results&&(b=this.results.indexOf(b),-1==b))return d;for(;0<b;){b--;var g=this.results?this.results[b]:b;if(!1!==this.rows[g].visible){var f=this.records[g][h].v===_$_24da[3]?!1:!0;null===e&&(e=f);if(this.records[g][h].element&&this.records[g][h].element.classList.contains(_$_24da[67])){if(this.records[g][h].merged){d=g-this.records[g][h].merged[1];if(!c)break;f=!0}}else{if(c&&f!==e&&!a)break;if(c)d=this.records[g][h].merged?g-this.records[g][h].merged[1]:
|
|
82
|
+
g;else return g}e=f}}return d},Ta=function(h,b,c,a){var d=b,e=null;if(this.results){b=this.results.indexOf(b);if(-1==b)return d;var g=this.results.length-1}else g=this.rows.length-1;for(;b<g;){b++;var f=this.results?this.results[b]:b;if(!1!==this.rows[f].visible){var k=this.records[f][h].v===_$_24da[3]?!1:!0;null===e&&(e=k);if(this.records[f][h].element&&this.records[f][h].element.classList.contains(_$_24da[67])){if(this.records[f][h].merged){if(!this.records[f][h].merged[1]&&(d=f,!c))break;k=!0}}else{if(c&&
|
|
83
|
+
k!==e&&!a)break;if(c)d=f;else return f}e=k}}return d},Ua=function(h,b,c,a){for(var d=this.options.columns,e=h,g,f=null;h<d.length-1;)if(h++,na.isVisible.call(this,h)){g=!1;this.records[b]&&(g=this.records[b][h].merged?this.records[b-this.records[b][h].merged[1]][h-this.records[b][h].merged[0]].v?!0:!1:this.records[b][h].v?!0:!1);null===f&&(f=g);if(this.records[b]&&this.records[b][h].element&&this.records[b][h].element.classList.contains(_$_24da[67])){if(this.records[b][h].merged&&h==h+this.records[b][h].merged[0]&&
|
|
84
|
+
(e=h,!c))break}else{if(c&&g!==f&&!a)break;if(c)e=h;else return h}f=g}return e},Va=function(h,b,c,a){for(var d=h,e,g=null;0<h;)if(h--,na.isVisible.call(this,h)){e=!1;this.records[b]&&(e=this.records[b][h].merged?this.records[b-this.records[b][h].merged[1]][h-this.records[b][h].merged[0]].v?!0:!1:this.records[b][h].v?!0:!1);null===g&&(g=e);if(this.records[b]&&this.records[b][h].element&&this.records[b][h].element.classList.contains(_$_24da[67])){if(this.records[b][h].merged&&(d=h-this.records[b][h].merged[0],
|
|
85
|
+
!c))break}else{if(c&&e!==g&&!a)break;if(c)d=h;else return h}g=e}return d},Za=function(){var h=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?J.up.call(this,e):J.down.call(this,e)):U.attached.call(this,a,d)||(0==c?J.left.call(this,e):J.right.call(this,e))},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(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),
|
|
86
|
+
g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);d=Sa.call(this,e,g,a,d);d!=g&&(g=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=g,e=c,g=d),h.call(this,1,e,g,a),ka[_$_24da[11]].call(this,c,d,e,g),J.adjust.call(this,e,g,1))}};b.down=function(c,a,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);d=Ta.call(this,
|
|
87
|
+
e,g,a,d);d!=g&&(g=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=g,e=c,g=d),h.call(this,3,e,g,a),ka[_$_24da[11]].call(this,c,d,e,g),J.adjust.call(this,e,g,3))}};b.right=function(c,a,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);d=Ua.call(this,e,g,a,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=g,e=c,g=d),h.call(this,2,e,g,
|
|
88
|
+
a),ka[_$_24da[11]].call(this,c,d,e,g),J.adjust.call(this,e,g,2))}};b.left=function(c,a,d){if(Array.isArray(this.selectedCell)){if(c)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);d=Va.call(this,e,g,a,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=g,e=c,g=d),h.call(this,0,e,g,a),ka[_$_24da[11]].call(this,c,d,e,g),J.adjust.call(this,e,g,0))}};b.first=function(c,a){Array.isArray(this.selectedCell)&&
|
|
89
|
+
(a?b.up.call(this,c,!0,!0):b.left.call(this,c,!0,!0))};b.last=function(c,a){Array.isArray(this.selectedCell)&&(a?b.down.call(this,c,!0,!0):b.right.call(this,c,!0,!0))};return b}(),$a=function(){return function(h){h.save=Wa;h.fullscreen=Pa;h.setReadOnly=Ra;h.isReadOnly=Ra;h.rotate=Ya;h.setPlugins=function(b){wa.call(this.parent,b)};h.showIndex=function(){Ca.call(this,!0)};h.hideIndex=function(){Ca.call(this,!1)};h[_$_24da[64]]=J[_$_24da[64]];h.undo=function(){Q.undo.call(h.parent)};h.redo=function(){Q.redo.call(h.parent)};
|
|
90
|
+
h.isEditable=function(){return T.call(h.parent,h)};h.dispatch=function(){return G.apply(this.parent,arguments)};h.persistence=K;h.setViewport=function(b,c){this.options.tableOverflow=!0;b=parseInt(b);c=parseInt(c);this.content.classList.add(_$_24da[68]);150<b&&(this.options.tableWidth=b+_$_24da[57],this.content.style.width=this.options.tableWidth);150<c&&!this.options.pagination&&(this.options.tableHeight=parseInt(c)+_$_24da[57],this.content.style.height=this.options.tableHeight);J.call(this,!0);
|
|
91
|
+
ma.update.call(this.parent,this);G.call(this.parent,_$_24da[69],b,c)};h.helpers=H}}(),Ha=function(){var h={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:_$_24da[48],csvHeaders:!0,csvDelimiter:_$_24da[37],columnSorting:!0,columnSortingOnDblClick:!0,columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,
|
|
92
92
|
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,virtualizationY:!0,virtualizationX:!0,tableHeight:null,tableWidth:null,resize:null,comments:null,meta:null,style:{},freezeColumns:0,freezeRows:0,freezeColumnControl:!1,freezeRowControl:!1,
|
|
93
|
-
orderBy:null,worksheetId:_$
|
|
93
|
+
orderBy:null,worksheetId:_$_24da[3],worksheetName:null,worksheetState:null,filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1,gridline:!0},b={application:_$_24da[70],cloud:null,root:null,definedNames:{},sorting:null,server:null,toolbar:null,editable:!0,allowExport:!0,includeHeadersOnDownload:!1,forceUpdateOnPaste:!1,loadingSpin:!1,fullscreen:!1,secureFormulas:!0,parseFormulas:!0,debugFormulas:!1,editorFormulas:!0,
|
|
94
94
|
autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,allowMoveWorksheet:!0,moveDownOnEnter:!0,spacing:100,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,
|
|
95
|
-
onmoverow:null,onmovecolumn:null,onresize:null,onresizerow:null,onresizecolumn:null,onselection:null,onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,
|
|
96
|
-
onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,onsearchstart:null,onsearch:null,onsearchrow:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,onchangereferences:null,onbeforechangereferences:null,onbeforesend:null,onchangedefinednames:null,oninput:null,onchangerowvisibility:null,onchangecolumnvisibility:null,
|
|
97
|
-
onopenrowgroup:null,oncloserowgroup:null,ondestroyrowgroup:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},c=function(e,g){g=JSON.parse(JSON.stringify(g));var f={},k;for(k in g)e&&e.hasOwnProperty(k)?f[k]=e[k]:f[k]=g[k];return f},a=function(e){e&&(typeof e==_$
|
|
98
|
-
(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$
|
|
99
|
-
{type:_$
|
|
100
|
-
this.options.columns[f].url&&jSuites.ajax({url:this.options.columns[f].url,index:f,method:_$
|
|
101
|
-
method:_$
|
|
102
|
-
f)}}):a.call(g)};d[_$
|
|
103
|
-
e.minDimensions&&e.minDimensions[0]&&(g=parseInt(e.minDimensions[0])-this.headers.length,0<g&&this.insertColumn(g),g=parseInt(e.minDimensions[1])-this.rows.length,0<g&&this.insertRow(g));
|
|
104
|
-
[]),this.history[this.historyIndex].cascade.push(a);else{var d=++this.historyIndex;this.history=this.history.slice(0,d+1);this.history[d]=a}},b=function(a){var d=a.worksheet;if(a.action==_$
|
|
105
|
-
_$
|
|
106
|
-
!0),d.setMerge(a.oldValue);else if(a.action==_$
|
|
107
|
-
_$
|
|
108
|
-
_$
|
|
109
|
-
if(a){this.ignoreHistory=!0;var d=a.worksheet;d.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&d.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var c=function(a){var d=a.worksheet;if(a.action==_$
|
|
110
|
-
a.insertBefore,a.properties,a.data);else if(a.action==_$
|
|
111
|
-
a.newValue);else if(a.action==_$
|
|
112
|
-
else a.action==_$
|
|
113
|
-
!0;var d=a.worksheet;d.openWorksheet();c.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)c.call(this,a.cascade[e]);a.selection&&d.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};h.reset=function(){this.historyIndex=-1;this.history=[]};return h}(),
|
|
114
|
-
0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var g=c[d].plugin;var f=c[d].options}typeof g===_$
|
|
115
|
-
e))}return c}};h.onevent=function(b){return function(){var c,a,d=this.plugins;if(d){var e=Object.keys(d);if(e.length)for(a=0;a<e.length;a++)if(typeof d[e[a]][b]==_$
|
|
116
|
-
b]};h.open=function(b,c,a){if(!T.call(this.parent,this))return!1;if(1!=b.classList.contains(_$
|
|
117
|
-
!1;var f=g=null;
|
|
118
|
-
this,b,d,e,g,f[1]));k&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$
|
|
119
|
-
|
|
120
|
-
!1,d,e,this,a[1]);G.call(this.parent,_$
|
|
121
|
-
a=a.getBoundingClientRect();var e=this.parent.input;e.x=b;e.y=c;0==a.width&&0==a.height?e.style.opacity=_$
|
|
122
|
-
!0);b.input.innerText=_$
|
|
123
|
-
arguments);typeof c!==_$
|
|
124
|
-
b};h.next=function(){return 1==this.options.sequence?++this.sequence:null};h.reset=function(){this.sequence=0};h.getId=function(b){if(this.rows[b]&&this.rows[b].id)return this.rows[b].id;var c=this.getPrimaryKey();if(!1!==c)return
|
|
125
|
-
this,a)}};h.getRowById=function(b,c){for(var a=0;a<this.rows.length;a++)if(h.getId.call(this,a)==b)return!0===c?this.rows[a]:this.options.data[a];return!1};return h}(),
|
|
126
|
-
c[0];if(0<=[_$
|
|
127
|
-
queue:!0,beforeSend:function(n){d&&n.setRequestHeader(_$
|
|
128
|
-
_$
|
|
129
|
-
this.options.persistence:this.options.url);h&&
|
|
130
|
-
this.cursor=h?this.records[c][b].element:null);for(h=d;h<=g;h++)if(this.headers[h])this.headers[h].classList[f](_$
|
|
95
|
+
onmoverow:null,onmovecolumn:null,onresize:null,onresizerow:null,onresizecolumn:null,onselection:null,onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onrenderfootercell:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,
|
|
96
|
+
oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,onsearchstart:null,onsearch:null,onsearchrow:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,onchangereferences:null,onbeforechangereferences:null,onbeforesend:null,onchangedefinednames:null,oninput:null,onchangerowvisibility:null,onchangecolumnvisibility:null,
|
|
97
|
+
oncreaterowgroup:null,onopenrowgroup:null,oncloserowgroup:null,ondestroyrowgroup:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},c=function(e,g){g=JSON.parse(JSON.stringify(g));var f={},k;for(k in g)e&&e.hasOwnProperty(k)?f[k]=e[k]:f[k]=g[k];return f},a=function(e){e&&(typeof e==_$_24da[25]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);
|
|
98
|
+
this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_24da[21]){var g=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]);g.length>e&&(e=g.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var f=0;f<e;f++)this.options.columns[f]?this.options.columns[f].type||(this.options.columns[f].type=_$_24da[71]):
|
|
99
|
+
this.options.columns[f]={type:_$_24da[71]},this.options.columns[f].type==_$_24da[72]&&(this.options.columns[f].type=_$_24da[73],this.options.columns[f].autocomplete=!0),!this.options.columns[f].name&&g&&g[f]&&Number(g[f])!=g[f]&&(this.options.columns[f].name=g[f]),this.options.columns[f].width||(this.options.columns[f].width=parseInt(this.options.defaultColWidth)+_$_24da[57]),this.options.columns[f].type!=_$_24da[73]||this.options.columns[f].source||(this.options.columns[f].source=[]),this.options.columns[f].type==
|
|
100
|
+
_$_24da[73]&&this.options.columns[f].url&&jSuites.ajax({url:this.options.columns[f].url,index:f,method:_$_24da[74],dataType:_$_24da[75],worksheet:this,group:this.parent.name,success:function(k){this.worksheet.options.columns[this.index].source=k}})},d=function(e){e.getConfig=d[_$_24da[56]];e.setConfig=d[_$_24da[11]]};d.spreadsheet=function(e){this.config=c(e,b);1!=this.config.secureFormulas&&console.log(_$_24da[76])};d.worksheet=function(e){var g=this;g.options=c(e,h);g.options.csv?jSuites.ajax({url:g.options.csv,
|
|
101
|
+
method:_$_24da[74],dataType:_$_24da[71],group:g.parent.name,success:function(f){f=H.parseCSV(f,g.options.csvDelimiter);if(1==g.options.csvHeaders&&0<f.length)for(var k=f.shift(),n=0;n<k.length;n++)g.options.columns[n]||(g.options.columns[n]={type:_$_24da[71],width:g.options.defaultColWidth}),typeof g.options.columns[n].title===_$_24da[21]&&(g.options.columns[n].title=k[n]);a.call(g,f)}}):g.options.url?jSuites.ajax({url:g.options.url,method:_$_24da[74],dataType:_$_24da[75],group:g.parent.name,success:function(f){a.call(g,
|
|
102
|
+
f)}}):a.call(g)};d[_$_24da[56]]=function(){return this.options};d[_$_24da[11]]=function(e){typeof e==_$_24da[25]&&(e=JSON.parse(e));if(this.parent){g=Object.keys(e);for(f=0;f<g.length;f++)typeof h[g[f]]!==_$_24da[21]&&(this.options[g[f]]=e[g[f]]);this.content.style.resize=e.resize?e.resize:_$_24da[3];!0===e.filters?la.show.call(this):!1===e.filters&&la.hide.call(this);!0===e.search?xa.show.call(this):!1===e.search&&xa.hide.call(this);!0===e.toolbar?ma.show.call(this.parent):!1===e.toolbar&&ma.hide.call(this.parent);
|
|
103
|
+
e.minDimensions&&e.minDimensions[0]&&(g=parseInt(e.minDimensions[0])-this.headers.length,0<g&&this.insertColumn(g),g=parseInt(e.minDimensions[1])-this.rows.length,0<g&&this.insertRow(g));K.call(this,_$_24da[77],{data:JSON.stringify(e)})}else for(var g=Object.keys(e),f=0;f<g.length;f++)typeof b[g[f]]!==_$_24da[21]&&(this.config[g[f]]=e[g[f]])};return d}(),Q=function(){var h=function(a){if(1!=this.ignoreHistory)if(this.historyCascade)this.history[this.historyIndex].cascade||(this.history[this.historyIndex].cascade=
|
|
104
|
+
[]),this.history[this.historyIndex].cascade.push(a);else{var d=++this.historyIndex;this.history=this.history.slice(0,d+1);this.history[d]=a}},b=function(a){var d=a.worksheet;if(a.action==_$_24da[78])d.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+1,a.numOfRows);else if(a.action==_$_24da[79])d.insertRow(a.numOfRows,a.rowNumber,1,a.data),U.setAttributes.call(d,a.attributes);else if(a.action==_$_24da[80])d.deleteColumn(a.insertBefore?a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==
|
|
105
|
+
_$_24da[81])d.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,a.data,a.extra),U.setAttributes.call(d,a.attributes);else if(a.action==_$_24da[82])d.moveRow(a.newValue,a.oldValue);else if(a.action==_$_24da[83])d.moveColumn(a.newValue,a.oldValue);else if(a.action==_$_24da[84])d.showRow(a.records);else if(a.action==_$_24da[85])d.hideRow(a.records);else if(a.action==_$_24da[86])d.showColumn(a.records);else if(a.action==_$_24da[87])d.hideColumn(a.records);else if(a.action==_$_24da[88])d.removeMerge(a.newValue,
|
|
106
|
+
!0),d.setMerge(a.oldValue);else if(a.action==_$_24da[89])d.setMerge(a.oldValue);else if(a.action==_$_24da[90])d.setStyle(a.oldValue,null,null,1);else if(a.action==_$_24da[91])d.setStyle(a.oldValue);else if(a.action==_$_24da[92])d.setWidth(a.column,a.oldValue);else if(a.action==_$_24da[93])d.setHeight(a.row,a.oldValue);else if(a.action==_$_24da[94])d.setHeader(a.column,a.oldValue);else if(a.action==_$_24da[95]||a.action==_$_24da[96]||a.action==_$_24da[97])d[a.action](a.oldValue);else if(a.action==
|
|
107
|
+
_$_24da[98])d.orderBy(a.column,a.direction?0:1,a.oldValue,a.previousState);else if(a.action==_$_24da[99]||a.action==_$_24da[100]||a.action==_$_24da[101]){var e=[];for(var g=0;g<a.records.length;g++){var f={x:a.records[g].x,value:a.records[g].oldValue};void 0!==a.records[g].y&&(f.y=a.records[g].y);a.records[g].oldStyle&&(f.style=a.records[g].oldStyle);e.push(f)}a.action==_$_24da[99]?d.setValue(e):d.setProperty(e)}else if(a.action==_$_24da[102])d.renameWorksheet(a.index,a.oldValue);else if(a.action==
|
|
108
|
+
_$_24da[103])d.moveWorksheet(a.t,a.f);else if(a.action==_$_24da[104]){e=[];for(g=0;g<a.records.length;g++)e.push({index:a.records[g].index,value:a.records[g].oldValue});d.setDefinedNames(e)}else a.action==_$_24da[105]?d.resetRowGroup(a.row):a.action==_$_24da[106]?d.setRowGroup(a.row,a.elements):a.action==_$_24da[107]?d.closeRowGroup(a.row):a.action==_$_24da[108]&&d.openRowGroup(a.row);G.call(this,_$_24da[109],d,a)};h.undo=function(){if(0<=this.historyIndex)var a=this.history[this.historyIndex--];
|
|
109
|
+
if(a){this.ignoreHistory=!0;var d=a.worksheet;d.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&d.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var c=function(a){var d=a.worksheet;if(a.action==_$_24da[78])d.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data);else if(a.action==_$_24da[79])d.deleteRow(a.rowNumber,a.numOfRows);else if(a.action==_$_24da[80])d.insertColumn(a.numOfColumns,a.columnNumber,
|
|
110
|
+
a.insertBefore,a.properties,a.data);else if(a.action==_$_24da[81])d.deleteColumn(a.columnNumber,a.numOfColumns);else if(a.action==_$_24da[82])d.moveRow(a.oldValue,a.newValue);else if(a.action==_$_24da[83])d.moveColumn(a.oldValue,a.newValue);else if(a.action==_$_24da[88])d.setMerge(a.newValue);else if(a.action==_$_24da[89])d.removeMerge(a.newValue);else if(a.action==_$_24da[90])d.setStyle(a.newValue,null,null,1);else if(a.action==_$_24da[91])d.resetStyle(a.cells);else if(a.action==_$_24da[92])d.setWidth(a.column,
|
|
111
|
+
a.newValue);else if(a.action==_$_24da[93])d.setHeight(a.row,a.newValue);else if(a.action==_$_24da[94])d.setHeader(a.column,a.newValue);else if(a.action==_$_24da[95]||a.action==_$_24da[96]||a.action==_$_24da[97])d[a.action](a.newValue);else if(a.action==_$_24da[98])d.orderBy(a.column,a.direction,a.newValue);else if(a.action==_$_24da[99]||a.action==_$_24da[100]||a.action==_$_24da[101]||a.action==_$_24da[84]||a.action==_$_24da[85]||a.action==_$_24da[86]||a.action==_$_24da[87])d[a.action](a.records);
|
|
112
|
+
else a.action==_$_24da[102]?d.renameWorksheet(a.index,a.newValue):a.action==_$_24da[103]?d.moveWorksheet(a.f,a.t):a.action==_$_24da[104]?d.setDefinedNames(a.records):a.action==_$_24da[105]?d.setRowGroup(a.row,a.elements):a.action==_$_24da[106]?d.resetRowGroup(a.row):a.action==_$_24da[107]?d.openRowGroup(a.row):a.action==_$_24da[108]&&d.closeRowGroup(a.row);G.call(this,_$_24da[110],d,a)};h.redo=function(){if(this.historyIndex<this.history.length-1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=
|
|
113
|
+
!0;var d=a.worksheet;d.openWorksheet();c.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)c.call(this,a.cascade[e]);a.selection&&d.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};h.reset=function(){this.historyIndex=-1;this.history=[]};return h}(),wa=function(){var h=function(b){var c=null;if(Array.isArray(b))c=b;else if(typeof b==_$_24da[111]){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=
|
|
114
|
+
0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var g=c[d].plugin;var f=c[d].options}typeof g===_$_24da[112]&&(this.plugins[e]=g.call(u,this,f,this.config),typeof g.license==_$_24da[112]&&u.license&&g.license(u.license))}};h.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]==_$_24da[112]){var e=this.plugins[a[d]][b].apply(this.plugins[a[d]],c);e&&(b==_$_24da[113]&&(c[4]=e),b==_$_24da[114]&&(c[0]=
|
|
115
|
+
e))}return c}};h.onevent=function(b){return function(){var c,a,d=this.plugins;if(d){var e=Object.keys(d);if(e.length)for(a=0;a<e.length;a++)if(typeof d[e[a]][b]==_$_24da[112]){var g=d[e[a]][b].apply(d[e[a]],arguments);typeof g!==_$_24da[21]&&(c=g)}}return c}}(_$_24da[115]);return h}(),pa=function(){var h=function(b){b.getEditor=h[_$_24da[56]];b.openEditor=h.open;b.closeEditor=h.close};h[_$_24da[56]]=function(b,c){b=Ma[_$_24da[56]].call(this,b,c);return[b.type&&typeof b.type==_$_24da[111]?b.type:u.editors[b.type],
|
|
116
|
+
b]};h.open=function(b,c,a){if(!T.call(this.parent,this))return!1;if(1!=b.classList.contains(_$_24da[26])){var d=parseInt(b.getAttribute(_$_24da[65])),e=parseInt(b.getAttribute(_$_24da[60]));if(!0===this.options.locked){var g=H.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[g]||!1!==this.options.cells[g].locked)return!1}if(g=this.records[e][d].merged)d-=g[0],e-=g[1],b=this.records[e][d].element;if(!U.attached.call(this,d,e)){if(this.results&&0<this.results.length)return console.error(_$_24da[116]),
|
|
117
|
+
!1;var f=g=null;na.attached.call(this,d)||(g=d);aa.attached.call(this,e)||(f=e);J[_$_24da[64]].call(this,f,g)}this.resetBorders(_$_24da[117],!0);h.position.call(this,d,e);g=this.parent.input;!a||113!==a.keyCode&&a.type===_$_24da[118]||(g.selected=!0);g.innerText=_$_24da[3];G.call(this.parent,_$_24da[119],this,b,d,e);c=1==c?_$_24da[3]:R.call(this,d,e);f=h[_$_24da[56]].call(this,d,e);var k=!0;typeof f[0].openEditor==_$_24da[112]&&(!1===f[0].openEditor(b,c,d,e,this,f[1],a)?k=!1:G.call(this.parent,_$_24da[120],
|
|
118
|
+
this,b,d,e,g,f[1]));k&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_24da[121],0<d&&this.records[e][d-1].element&&(this.records[e][d-1].element.style.overflow=_$_24da[121])),this.edition=b,g.classList.add(_$_24da[122]),1==this.parent.config.editorFormulas&&Z(c)&&(g.classList.add(_$_24da[123]),ta.parse.call(this,g),b=document.createTextNode(_$_24da[3]),g.appendChild(b),jSuites.focus(g)))}};h.close=function(b,c){null===b&&(b=this.edition);this.parent.input.classList.contains(_$_24da[123])&&
|
|
119
|
+
ta.close.call(this,this.parent.input);var a,d=parseInt(b.getAttribute(_$_24da[65])),e=parseInt(b.getAttribute(_$_24da[60]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&a.element.innerText==_$_24da[3]&&(this.records[e][d].element.style.overflow=_$_24da[3]);a=h[_$_24da[56]].call(this,d,e);if(1==c){var g=null;typeof a[0].closeEditor==_$_24da[112]&&(a=a[0].closeEditor(b,!0,d,e,this,a[1]),void 0!==a&&(g=a));null!==g&&R.call(this,d,e)!=g&&this.setValue(b,g)}else a[0].closeEditor(b,
|
|
120
|
+
!1,d,e,this,a[1]);G.call(this.parent,_$_24da[124],this,b,d,e,g,c);a=this.parent.input;a.selected=!1;a.onblur&&(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);pa.build(this.parent);a.removeAttribute(_$_24da[125]);a.removeAttribute(_$_24da[126]);a.removeAttribute(_$_24da[127]);this.edition=a.mask=null;this.refreshBorders()};h.position=function(b,c){var a=null;if(a=this.records[c][b].element){var d=this.parent.element.getBoundingClientRect();
|
|
121
|
+
a=a.getBoundingClientRect();var e=this.parent.input;e.x=b;e.y=c;0==a.width&&0==a.height?e.style.opacity=_$_24da[128]:(e.setAttribute(_$_24da[129],_$_24da[3]),b=a.top-d.top+1,c=a.left-d.left+1,e.style.top=b+_$_24da[57],e.style.left=c+_$_24da[57],e.style.minWidth=a.width-1+_$_24da[57],e.style.minHeight=a.height-1+_$_24da[57],setTimeout(function(){e.focus()},0))}};h.build=function(b){b.input||(b.input=document.createElement(_$_24da[32]));b.input.className=_$_24da[130];b.input.setAttribute(_$_24da[131],
|
|
122
|
+
!0);b.input.innerText=_$_24da[3];b.input.oninput=function(c){u.current&&(1==u.current.parent.config.editorFormulas&&(Z(c.target.innerText)?(c.target.classList.add(_$_24da[123]),c.target.selected=!0):c.target.classList.contains(_$_24da[123])&&ta.close.call(u.current,this)),G.call(u.current.parent,_$_24da[132],u.current,c))};b.input.onclick=function(){this.selected=!0};return b.input};return h}(),G=function(h){var b;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_24da[112]){var c=this.config.onevent.apply(this,
|
|
123
|
+
arguments);typeof c!==_$_24da[21]&&(b=c)}typeof this.config[h]==_$_24da[112]&&(c=this.config[h].apply(this,Array.prototype.slice.call(arguments,1)),typeof c!==_$_24da[21]&&(b=c));c=wa.onevent.apply(this,arguments);typeof c!==_$_24da[21]&&(b=c)}return b},za=function(){var h=function(b){b.sequence=0;b.getNextSequence=h.next;b.getRowId=h.getId;b.setRowId=h.setId;b.getRowById=h.getRowById};h[_$_24da[56]]=function(){return this.sequence};h[_$_24da[11]]=function(b,c){if(b>this.sequence||c)this.sequence=
|
|
124
|
+
b};h.next=function(){return 1==this.options.sequence?++this.sequence:null};h.reset=function(){this.sequence=0};h.getId=function(b){if(this.rows[b]&&this.rows[b].id)return this.rows[b].id;var c=this.getPrimaryKey();if(!1!==c)return R.call(this,c,b)};h.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,h[_$_24da[11]].call(this,c);K.call(this,_$_24da[133],[a]);G.call(this.parent,_$_24da[134],
|
|
125
|
+
this,a)}};h.getRowById=function(b,c){for(var a=0;a<this.rows.length;a++)if(h.getId.call(this,a)==b)return!0===c?this.rows[a]:this.options.data[a];return!1};return h}(),Wa=function(){var h=function(c){for(var a=[],d={},e=0;e<c.length;e++){var g=c[e].x,f=c[e].y,k=za.getId.call(this,f);if(!k)if(d[f])k=d[f];else if(k=za.next.call(this))d[f]=k;a[f]||(a[f]={id:k,row:f,data:{}});g=ra.call(this,g);a[f].data[g]=c[e].value}za.setId.call(this,d);return a.filter(function(n){return null!=n})},b=function(c){var a=
|
|
126
|
+
c[0];if(0<=[_$_24da[135],_$_24da[136],_$_24da[133],_$_24da[137]].indexOf(a))return!1;var d={};a==_$_24da[99]||a==_$_24da[138]?(a=_$_24da[139],d[a]=h.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 g=this.parent,f=this,k=b.call(this,a);if(k)a=k;else if(!1===k)return!1;if(k=G.call(g,_$_24da[140],g,f,a))a=k;else if(!1===k)return!1;Qa.call(g,!0);jSuites.ajax({url:c,method:_$_24da[141],dataType:_$_24da[75],data:{data:JSON.stringify(a)},
|
|
127
|
+
queue:!0,beforeSend:function(n){d&&n.setRequestHeader(_$_24da[142],_$_24da[143]+d);G.call(g,_$_24da[144],f,n)},success:function(n){g.element.classList.contains(_$_24da[145])&&g.element.classList.remove(_$_24da[145]);n&&(n.message&&(n.name=g.config.application,jSuites.notification.isVisible()?console.log(n.name+_$_24da[146]+n.message):jSuites.notification(n)),n.success?typeof e===_$_24da[112]?e(n):n.data&&Array.isArray(n.data)&&U.updateAll.call(f,n.data):n.error&&(alert(_$_24da[147]),window.open(window.location.href,
|
|
128
|
+
_$_24da[148])));G.call(g,_$_24da[149],g,f,a,n)},error:function(){g.element.classList.add(_$_24da[150])}})}}(),K=function(){return function(){wa.execute.call(this.parent,_$_24da[151],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var h=null;if(this.parent.config.server){var b=this.parent.worksheets.indexOf(this);h=this.parent.config.server;h=-1==h.indexOf(_$_24da[152])?h+(_$_24da[153]+b):h+(_$_24da[154]+b)}else this.options.persistence&&(h=typeof this.options.persistence==_$_24da[25]?
|
|
129
|
+
this.options.persistence:this.options.url);h&&Wa.call(this,h,arguments)}}}(),Ia=function(h){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],g=a[2];a=a[3];var f=h?_$_24da[155]:_$_24da[156];this.records[c]&&this.records[c][b]&&this.records[c][b].element&&(this.records[c][b].element.classList[f](_$_24da[157]),
|
|
130
|
+
this.cursor=h?this.records[c][b].element:null);for(h=d;h<=g;h++)if(this.headers[h])this.headers[h].classList[f](_$_24da[158]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[f](_$_24da[158])}},ka=function(){var h=function(b){b.resetSelection=h.reset;b.updateSelection=h.fromElements;b.updateSelectionFromCoords=h[_$_24da[11]];b.selectAll=h.all;b.isSelected=h.isSelected;b.getHighlighted=h.getHighlighted;b.getRange=h.getRange;b.getSelection=h[_$_24da[56]]};h[_$_24da[56]]=
|
|
131
131
|
function(){var b=this.selectedCell;if(b[0]<b[2])var c=b[0],a=b[2];else c=b[2],a=b[0];if(b[1]<b[3]){var d=b[1];b=b[3]}else d=b[3],b=b[1];return[c,d,a,b]};h.getHighlighted=function(){var b=this.borders;return b&&b.main&&null!==b.main.x1?(b=b.main,[b.x1,b.y1,b.x2,b.y2]):null};h.isSelected=function(b,c,a){if(!a&&(a=this.getHighlighted(),!a||null===a[0]))return!1;var d=a[0],e=a[1],g=a[2];a=a[3];g||(g=d);a||(a=e);return null==b?c>=e&&c<=a:null==c?b>=d&&b<=g:b>=d&&b<=g&&c>=e&&c<=a};h.reset=function(){if(this.selectedCell)b=
|
|
132
|
-
1,this.edition&&
|
|
133
|
-
h[_$
|
|
134
|
-
k;x<=n;x++)if(q=this.records[w][x].merged)q=H.getColumnNameFromCoords(x-q[0],w-q[1]),r[q]=!0;w=Object.keys(r);if(w.length)for(x=0;x<w.length;x++)q=H.getCoordsFromColumnName(w[x]),r=this.options.mergeCells[w[x]],q[0]<k&&(k=q[0]),q[0]+r[0]-1>n&&(n=q[0]+r[0]-1),q[1]<l&&(l=q[1]),q[1]+r[1]-1>p&&(p=q[1]+r[1]-1)}}g==_$
|
|
135
|
-
null!==x&&null!==r&&(J.adjust.call(this,a,d,3),J.adjust.call(this,a,d,2),J.adjust.call(this,a,d,1),J.adjust.call(this,a,d,0))),
|
|
136
|
-
d,c=b;h[_$
|
|
137
|
-
function(){var h=function(a){a.borders=[];a.setBorder=h[_$
|
|
138
|
-
f==_$
|
|
139
|
-
_$
|
|
140
|
-
l.x1=a;l.y1=d;l.x2=e;l.y2=g;l.element.style.top=_$
|
|
141
|
-
1]||d>B||e<z&&a>=x||g<k&&d>=y?n=!0:(!1!==this.options.columns[a].visible&&this.headers[a]&&this.headers[a].offsetWidth||(a=
|
|
142
|
-
0,this.headers[e]&&this.headers[e].parentNode?(q=this.headers[e].offsetLeft,q=q-p+parseInt(this.options.columns[e].width)):(r=this.thead.lastChild.lastChild.getAttribute(_$
|
|
143
|
-
!1!==this.rows[d].visible&&this.rows[d].element&&this.rows[d].element.offsetHeight||(d=
|
|
144
|
-
this.rows[g].element.offsetTop?(w=this.rows[g].element.firstChild.offsetTop,w=w-r+this.rows[g].element.firstChild.offsetHeight):(this.tbody.lastChild?(w=this.tbody.lastChild.getAttribute(_$
|
|
145
|
-
_$
|
|
146
|
-
(k=
|
|
147
|
-
l.t=r,l.l=p,l.w=q,l.h=w,f==_$
|
|
148
|
-
_$
|
|
149
|
-
d);a&&a!=_$
|
|
150
|
-
function(b){b.setRowGroup=h[_$
|
|
151
|
-
_$
|
|
152
|
-
action:c?_$
|
|
153
|
-
h.open.call(this,b),c.element&&(a=c.element.firstChild.children[0])&&a.remove(),Q.call(this.parent,{worksheet:this,action:_$
|
|
154
|
-
b.target.getAttribute(_$
|
|
155
|
-
h.event.w!==a)){d=this.getSelectedColumns();b=d.indexOf(parseInt(h.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(h.event.x),c.push(h.event.w)):c[b]=h.event.w;this.setWidth(d,a,c)}h.event=null},update:function(b){null!=h.event.y?(b=b.pageY-h.event.p,0<h.event.h+b&&(this.rows[h.event.y].element.style.height=h.event.h+b+_$
|
|
156
|
-
h.event.w+b),this.options.columns[h.event.x].width=h.event.w+b),0<this.options.freezeColumns&&
|
|
157
|
-
d:a},this.rows[a].element.classList.add(_$
|
|
158
|
-
{x:a,d:a};this.headers[a].classList.add(_$
|
|
159
|
-
end:function(){if(null!=h.event.y)this.rows[h.event.y].element.classList.remove(_$
|
|
160
|
-
h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
161
|
-
1]&&(b=!0):this.merged.rows[a+1]&&(b=!0));b||(h.event.d=a,a=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-a.top+_$
|
|
162
|
-
d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?a.left:a.right)-d.left+_$
|
|
163
|
-
!0:!1))};h.getAffected=function(b){if(void 0!==this[b]){for(var c=b,a=this[b],d=[];this[c]==a;)d.push(c),c--;for(c=b+1;this[c]==a;)d.push(c),c++;d.sort(function(e,g){return e-g});return d}return!1};h[_$
|
|
164
|
-
((e=this.getHighlighted())?e=[H.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$
|
|
165
|
-
e[1];r<e[1]+q;r++)for(var w=e[0];w<e[0]+p;w++)b=H.getColumnNameFromCoords(w,r),(d=this.merged.cells[b])&&this.options.mergeCells[d]&&(g[d]=this.options.mergeCells[d],h.applyDestroy.call(this,d));f[l]=this.options.mergeCells[l]=[p,q];h.applyCreate.call(this,l);U.attached.call(this,e[0],e[1])||(n=e)}}Object.keys(f).length&&(n&&J[_$
|
|
166
|
-
|
|
167
|
-
a[b[d]]=!0,h.applyDestroy.call(this,b[d],!0));h.build.call(this);Q.call(this.parent,{worksheet:this,action:_$
|
|
168
|
-
_$
|
|
169
|
-
h.applyDestroy=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=H.getCoordsFromColumnName(b),e=d[0];d=d[1];var g=a[b][0],f=a[b][1];delete this.options.mergeCells[b];for(b=0;b<f;b++)for(var k=0;k<g;k++)this.records[d+b]&&(a=this.records[d+b][e+k])&&a.element&&(0==k&&0==b?(a.element.removeAttribute(_$
|
|
132
|
+
1,this.edition&&pa.close.call(this,this.edition,!0),this.resetBorders(_$_24da[159],!0),this.resetBorders(_$_24da[117],!0),this.selectedCell=null,1==b&&G.call(this.parent,_$_24da[160],this);else var b=0;return b};h.refresh=function(){this.selectedCell&&h[_$_24da[11]].call(this,this.selectedCell)};h.isValid=function(b,c,a,d){if(!this)return!1;Array.isArray(b)&&(d=b[3],a=b[2],c=b[1],b=b[0]);return!(b>=this.options.columns.length||c>=this.rows.length||a>=this.options.columns.length||d>=this.rows.length)};
|
|
133
|
+
h[_$_24da[11]]=function(b,c,a,d,e,g,f){g||(g=_$_24da[159]);Array.isArray(b)&&(d=b[3],a=b[2],c=b[1],b=b[0]);null==a&&(a=b);null==d&&(d=c);if(!h.isValid.call(this,b,c,a,d))return!1;g==_$_24da[159]&&u.current!=this&&this.openWorksheet();if(null!=b){if(parseInt(b)<parseInt(a))var k=parseInt(b),n=parseInt(a);else k=parseInt(a),n=parseInt(b);if(parseInt(c)<parseInt(d))var l=parseInt(c),p=parseInt(d);else l=parseInt(d),p=parseInt(c);var q;var r={};if(this.options.mergeCells){for(var w=l;w<=p;w++)for(var x=
|
|
134
|
+
k;x<=n;x++)if(q=this.records[w][x].merged)q=H.getColumnNameFromCoords(x-q[0],w-q[1]),r[q]=!0;w=Object.keys(r);if(w.length)for(x=0;x<w.length;x++)q=H.getCoordsFromColumnName(w[x]),r=this.options.mergeCells[w[x]],q[0]<k&&(k=q[0]),q[0]+r[0]-1>n&&(n=q[0]+r[0]-1),q[1]<l&&(l=q[1]),q[1]+r[1]-1>p&&(p=q[1]+r[1]-1)}}g==_$_24da[159]&&(this.selectedCell?(Ia.call(this,!1),q=1):q=0,this.selectedCell=[b,c,a,d],this.records[d][a].element&&e&&(x=e.target.getAttribute(_$_24da[65]),r=e.target.getAttribute(_$_24da[60]),
|
|
135
|
+
null!==x&&null!==r&&(J.adjust.call(this,a,d,3),J.adjust.call(this,a,d,2),J.adjust.call(this,a,d,1),J.adjust.call(this,a,d,0))),pa.position.call(this,b,c),0==q&&G.call(this.parent,_$_24da[161],this));da[_$_24da[11]].call(this,k,l,n,p,g,f);g==_$_24da[159]&&(G.call(this.parent,_$_24da[162],this,k,l,n,p,e),ma.update.call(this.parent,this,this.selectedCell))};h.fromElements=function(b,c,a){var d=b.getAttribute(_$_24da[65]);b=b.getAttribute(_$_24da[60]);if(c){var e=c.getAttribute(_$_24da[65]);c=c.getAttribute(_$_24da[60])}else e=
|
|
136
|
+
d,c=b;h[_$_24da[11]].call(this,d,b,e,c,a)};h.all=function(){h[_$_24da[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};h.getRange=function(){var b=this.selectedCell;if(!b)return _$_24da[3];var c=H.getColumnNameFromCoords(b[0],b[1]);b=H.getColumnNameFromCoords(b[2],b[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_24da[163])?_$_24da[164]+a+_$_24da[165]:a+_$_24da[19];return c==b?a+c:a+H.getRangeFromTokens(u.helpers.getTokensFromRange(c+_$_24da[166]+b))};return h}(),da=
|
|
137
|
+
function(){var h=function(a){a.borders=[];a.setBorder=h[_$_24da[11]];a.getBorder=h[_$_24da[56]];a.resetBorders=h.reset;a.refreshBorders=h.refresh};h[_$_24da[56]]=function(a){return this.borders[a]};var b=function(a,d,e,g,f,k){if(!ka.isValid.call(this,a,d,e,g))return!1;var n=!1,l=null,p=null,q=null,r=null,w=null,x=this.options.freezeColumns||0,y=this.options.freezeRows||0;f||(f=0);this.borders[f]?l=this.borders[f]:(l={},l.element=document.createElement(_$_24da[32]),l.element.classList.add(_$_24da[167]),
|
|
138
|
+
f==_$_24da[117]||f==_$_24da[168]||f==_$_24da[159]?(l.element.classList.add(_$_24da[169]+f),l.color=_$_24da[3]):(l.color=k?k:jSuites.randomColor(!0),l.element.style.backgroundColor=k+_$_24da[170],l.element.style.borderColor=k),f==_$_24da[159]&&(k=function(D,v){l[D]=document.createElement(_$_24da[32]);l[D].classList.add(_$_24da[171]);l[D].setAttribute(_$_24da[172],v);l.element.appendChild(l[D]);!1===_$_24da[173]in document.documentElement&&(l[D].style.display=_$_24da[52])},k(_$_24da[174],0),l.moveLeft.style.left=
|
|
139
|
+
_$_24da[59],l.moveLeft.style.marginTop=_$_24da[175],l.moveLeft.style.marginLeft=_$_24da[175],k(_$_24da[176],1),l.moveTop.style.left=_$_24da[59],l.moveTop.style.marginTop=_$_24da[175],l.moveTop.style.marginLeft=_$_24da[175],k(_$_24da[177],2),l.moveRight.style.right=_$_24da[59],l.moveRight.style.marginTop=_$_24da[175],l.moveRight.style.marginRight=_$_24da[175],k(_$_24da[178],3),l.moveDown.style.bottom=_$_24da[59],l.moveDown.style.marginLeft=_$_24da[175],l.moveDown.style.marginBottom=_$_24da[175]),this.content.appendChild(l.element));
|
|
140
|
+
l.x1=a;l.y1=d;l.x2=e;l.y2=g;l.element.style.top=_$_24da[179];l.element.style.left=_$_24da[179];l.element.style.borderTopColor=l.color;l.element.style.borderBottomColor=l.color;l.element.style.borderLeftColor=l.color;l.element.style.borderRightColor=l.color;l.element.style.backgroundPositionX=_$_24da[3];l.element.style.backgroundPositionY=_$_24da[3];l.active=0;k=[];for(var B=a;B<=e;B++)k.push(B);k=this.visibleRows[y];B=this.visibleRows[this.visibleRows.length-1];var z=this.visibleCols[x];a>this.visibleCols[this.visibleCols.length-
|
|
141
|
+
1]||d>B||e<z&&a>=x||g<k&&d>=y?n=!0:(!1!==this.options.columns[a].visible&&this.headers[a]&&this.headers[a].offsetWidth||(a=Ua.call(this,a,d),l.element.style.borderLeftColor=_$_24da[180],l.element.style.backgroundPositionX=_$_24da[33]),!1!==this.options.columns[e].visible&&this.headers[e]&&this.headers[e].offsetWidth||(e=Va.call(this,e,g),l.element.style.borderRightColor=_$_24da[180],l.element.style.backgroundPositionX=_$_24da[181]),p=this.headers[a]&&this.headers[a].offsetLeft?this.headers[a].offsetLeft:
|
|
142
|
+
0,this.headers[e]&&this.headers[e].parentNode?(q=this.headers[e].offsetLeft,q=q-p+parseInt(this.options.columns[e].width)):(r=this.thead.lastChild.lastChild.getAttribute(_$_24da[65]),x&&e<r?(q=this.thead.lastChild.children[x-1].offsetLeft,q=q-p+parseInt(this.options.columns[x-1].width)):(q=this.thead.lastChild.lastChild.offsetLeft,q=q-p+parseInt(this.options.columns[r].width)),l.element.style.borderRightColor=_$_24da[180],l.element.style.backgroundPositionX=_$_24da[181]),p+=this.table.offsetLeft,
|
|
143
|
+
!1!==this.rows[d].visible&&this.rows[d].element&&this.rows[d].element.offsetHeight||(d=Ta.call(this,a,d),l.element.style.borderTopColor=_$_24da[180],l.element.style.backgroundPositionY=_$_24da[182]),!1!==this.rows[g].visible&&this.rows[g].element&&this.rows[g].element.offsetHeight||(g=Sa.call(this,e,g),l.element.style.borderBottomColor=_$_24da[180],l.element.style.backgroundPositionY=_$_24da[183]),r=this.rows[d].element&&this.rows[d].element.offsetTop?this.rows[d].element.firstChild.offsetTop:0,this.rows[g].element&&
|
|
144
|
+
this.rows[g].element.offsetTop?(w=this.rows[g].element.firstChild.offsetTop,w=w-r+this.rows[g].element.firstChild.offsetHeight):(this.tbody.lastChild?(w=this.tbody.lastChild.getAttribute(_$_24da[60]),y&&g<w?(w=this.tbody.children[y-1].firstChild.offsetTop,w=w-r+this.tbody.children[y-1].firstChild.offsetHeight):(w=this.tbody.lastChild.firstChild.offsetTop+this.tbody.lastChild.firstChild.offsetHeight-(this.thead.offsetHeight-3),w=w-r+this.tbody.lastChild.firstChild.offsetHeight)):w=0,l.element.style.borderBottomColor=
|
|
145
|
+
_$_24da[180],l.element.style.backgroundPositionY=_$_24da[183]),r+=this.table.offsetTop,q++,w++,this.options.freezeColumns&&(k=ea.getWidth.call(this),a=a<x,e=e<x,a&&e||(a&&!e?(e=this.content.scrollLeft+k,e>p+q&&(q=q+(e-(p+q))-1,l.element.style.borderRightColor=_$_24da[180],l.element.style.backgroundPositionX=_$_24da[181])):(e=this.content.scrollLeft+k,e>p&&(e-=p,e>q?p=r=-2E3:(p+=e,q-=e,l.element.style.borderLeftColor=_$_24da[180],l.element.style.backgroundPositionX=_$_24da[33]))))),this.options.freezeRows&&
|
|
146
|
+
(k=ja.getHeight.call(this),a=d<y,e=g<y,a&&e||(a&&!e?(d=this.content.scrollTop+k,d>r+w&&(w=w+(d-(r+w))-1,l.element.style.borderBottomColor=_$_24da[180],l.element.style.backgroundPositionY=_$_24da[183])):(d=this.content.scrollTop+k,d>r&&(e=d-r,e>w?p=r=-2E3:(r+=e,w-=e,l.element.style.borderTopColor=_$_24da[180],l.element.style.backgroundPositionY=_$_24da[182]))))),l.element.style.top=r+_$_24da[57],l.element.style.left=p+_$_24da[57],l.element.style.width=q+_$_24da[57],l.element.style.height=w+_$_24da[57],
|
|
147
|
+
l.t=r,l.l=p,l.w=q,l.h=w,f==_$_24da[159]&&(l.moveLeft.style.top=l.h/2+_$_24da[57],l.moveRight.style.top=l.h/2+_$_24da[57],l.moveTop.style.left=l.w/2+_$_24da[57],l.moveDown.style.left=l.w/2+_$_24da[57]),l.active=1);f==_$_24da[159]&&(n||l.element.style.borderBottomColor||l.element.style.borderRightColor?(this.corner.style.top=_$_24da[179],this.corner.style.left=_$_24da[179]):(this.corner.style.top=r+w-4+_$_24da[57],this.corner.style.left=p+q-4+_$_24da[57]));this.borders[f]=l},c=function(a,d){a.element.style.top=
|
|
148
|
+
_$_24da[179];a.element.style.left=_$_24da[179];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};h[_$_24da[11]]=function(a,d,e,g,f,k){b.call(this,a,d,e,g,f,k);f==_$_24da[159]&&(Ia.call(this,!0),K.call(this,_$_24da[135],{x1:a,y1:d,x2:e,y2:g}))};h.reset=function(a,d){a&&a!=_$_24da[159]||(this.corner.style.top=_$_24da[179],this.corner.style.left=_$_24da[179],Ia.call(this,!1));if(a)this.borders[a]&&c(this.borders[a],d);else for(var e=Object.keys(this.borders),g=0;g<e.length;g++)c(this.borders[e[g]],
|
|
149
|
+
d);a&&a!=_$_24da[159]||K.call(this,_$_24da[136])};h.refresh=function(a){var d=this.borders;if(a)d[a]&&null!=d[a].x1&&b.call(this,d[a].x1,d[a].y1,d[a].x2,d[a].y2,a);else{a=Object.keys(d);for(var e=0;e<a.length;e++)d[a[e]]&&null!=d[a[e]].x1&&b.call(this,d[a[e]].x1,d[a[e]].y1,d[a[e]].x2,d[a[e]].y2,a[e])}this.edition&&(d=this.parent.input,pa.position.call(this,d.x,d.y))};h.destroy=function(a){var d;this&&(d=this.borders[a])&&(d.element.remove(),delete this.borders[a])};return h}(),Ja=function(){var h=
|
|
150
|
+
function(b){b.setRowGroup=h[_$_24da[11]];b.openRowGroup=h.open;b.closeRowGroup=h.close;b.resetRowGroup=h.reset};h[_$_24da[11]]=function(b,c){if(Array.isArray(c))var a=c;else{a=[];for(var d=1;d<=c;d++)a.push(b+d)}this.options.rows[b]||(this.options.rows[b]={});this.options.rows[b].group=a;d=this.rows[b];d.group=a;d.state=!1;aa.visibility.call(this,a,!1);h.icon.call(this,b);Q.call(this.parent,{worksheet:this,action:_$_24da[105],row:b,elements:a});K.call(this,_$_24da[105],{row:b,elements:c});G.call(this.parent,
|
|
151
|
+
_$_24da[191],this,b,c)};h.icon=function(b){var c=null,a=this,d=this.rows[b];d.element&&(c=d.element.firstChild.children[0],c||(c=document.createElement(_$_24da[192]),c.classList.add(_$_24da[193]),c.onclick=function(){d.state?h.close.call(a,b):h.open.call(a,b)},d.element.firstChild.appendChild(c)),c.innerText=d.state?_$_24da[156]:_$_24da[155])};h.setState=function(b,c){var a=this.rows[b];a&&a.group&&(a.state=c,aa.visibility.call(this,a.group,c),h.icon.call(this,b),Q.call(this.parent,{worksheet:this,
|
|
152
|
+
action:c?_$_24da[107]:_$_24da[108],row:b}),K.call(this,c?_$_24da[107]:_$_24da[108]),G.call(this.parent,c?_$_24da[194]:_$_24da[195],this,b))};h.open=function(b){h.setState.call(this,b,!0)};h.close=function(b){h.setState.call(this,b,!1)};h.build=function(){var b=this.options.rows,c,a,d,e=Object.keys(b);if(e.length)for(d=0;d<e.length;d++)if(!b[e[d]].state&&(c=b[e[d]].group)&&c.length)for(a=0;a<c.length;a++)b[c[a]]||(b[c[a]]={}),b[c[a]].visible=!1};h.reset=function(b){var c=this.rows[b],a;c.group&&(c.state||
|
|
153
|
+
h.open.call(this,b),c.element&&(a=c.element.firstChild.children[0])&&a.remove(),Q.call(this.parent,{worksheet:this,action:_$_24da[106],row:b,elements:c.group}),K.call(this,_$_24da[106],{row:b}),delete c.group,delete c.state,G.call(this.parent,_$_24da[196],this,b))};return h}(),Da=function(){var h={start:function(b){if(!T.call(this.parent,this))return!1;if(null!==b.target.getAttribute(_$_24da[60])){var c=b.target.getAttribute(_$_24da[60]);h.event={y:parseInt(c),h:b.target.offsetHeight,p:b.pageY}}else null!==
|
|
154
|
+
b.target.getAttribute(_$_24da[65])&&(c=b.target.getAttribute(_$_24da[65]),h.event={x:parseInt(c),w:b.target.offsetWidth,p:b.pageX})},end:function(b){var c=[];if(null!=h.event.y){var a=parseInt(this.rows[h.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);b=d.indexOf(parseInt(h.event.y));if(d.length&&-1<b)for(var e=0;e<d.length;e++)c.push(aa.height.call(this,d[e]));else d=[];-1==b?(d.push(h.event.y),c.push(h.event.h)):c[b]=h.event.h;this.setHeight(d,a,c)}else if(null!=h.event.x&&(a=parseInt(this.colgroup[h.event.x].getAttribute(_$_24da[197])),
|
|
155
|
+
h.event.w!==a)){d=this.getSelectedColumns();b=d.indexOf(parseInt(h.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(h.event.x),c.push(h.event.w)):c[b]=h.event.w;this.setWidth(d,a,c)}h.event=null},update:function(b){null!=h.event.y?(b=b.pageY-h.event.p,0<h.event.h+b&&(this.rows[h.event.y].element.style.height=h.event.h+b+_$_24da[57],this.refreshBorders())):null!=h.event.x&&(b=b.pageX-h.event.p,0<h.event.w+b&&(this.colgroup[h.event.x].setAttribute(_$_24da[197],
|
|
156
|
+
h.event.w+b),this.options.columns[h.event.x].width=h.event.w+b),0<this.options.freezeColumns&&ea.refresh.call(this),this.refreshBorders())},cancel:function(){h.end.call(this)}};return h}(),ya=function(){var h={start:function(b){if(T.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==b.target.getAttribute(_$_24da[60])){var a=parseInt(b.target.getAttribute(_$_24da[60]));this.merged.rows[a]?console.error(_$_24da[198]):this.results?console.error(_$_24da[199]):(h.event={y:a,
|
|
157
|
+
d:a},this.rows[a].element.classList.add(_$_24da[200]),b=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),c.style.display=_$_24da[24],c.style.top=a.top-b.top+_$_24da[57],c.style.left=_$_24da[201],c.style.width=this.content.offsetWidth-50+_$_24da[57],c.style.height=_$_24da[202],c.classList.add(_$_24da[203]))}else if(null!==b.target.getAttribute(_$_24da[65]))if(a=parseInt(b.target.getAttribute(_$_24da[65])),this.merged.cols[a])console.error(_$_24da[204]);else{h.event=
|
|
158
|
+
{x:a,d:a};this.headers[a].classList.add(_$_24da[200]);for(b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_24da[60]);this.records[d][a].element.classList.add(_$_24da[200])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_24da[24];c.style.top=d.top-b.top+_$_24da[57];c.style.left=a.left-d.left+_$_24da[57];c.style.width=_$_24da[202];c.style.height=d.height+_$_24da[57];c.classList.add(_$_24da[205])}}else return!1},
|
|
159
|
+
end:function(){if(null!=h.event.y)this.rows[h.event.y].element.classList.remove(_$_24da[200]),null!=h.event.d&&h.event.y!=h.event.d&&(this.moveRow(h.event.y,h.event.d),this.updateSelectionFromCoords(0,h.event.d,this.options.columns.length-1,h.event.d)),this.parent.helper.classList.remove(_$_24da[203]);else if(null!=h.event.x){this.headers[h.event.x].classList.remove(_$_24da[200]);for(var b=0;b<this.tbody.children.length;b++){var c=this.tbody.children[b].getAttribute(_$_24da[60]);this.records[c][h.event.x].element.classList.remove(_$_24da[200])}null!=
|
|
160
|
+
h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_24da[205])}this.parent.helper.style.display=_$_24da[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(b){if(null!=h.event.y){var c=b.target.getAttribute(_$_24da[60]);if(null!=c){var a=c=parseInt(c),d=b.target.clientHeight/2>b.offsetY;d?h.event.y<c&&(a=c-1):h.event.y>c&&(a=c+1);b=!1;this.merged.rows[a]&&(h.event.y>a?this.merged.rows[a-
|
|
161
|
+
1]&&(b=!0):this.merged.rows[a+1]&&(b=!0));b||(h.event.d=a,a=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-a.top+_$_24da[57])}}else d=b.target.getAttribute(_$_24da[65]),null!=d&&(a=d=parseInt(d),(c=b.target.clientWidth/2>b.offsetX)?h.event.x<d&&(a=d-1):h.event.x>d&&(a=d+1),b=!1,this.merged.cols[a]&&(h.event.x>a?this.merged.cols[a-1]&&(b=!0):this.merged.cols[a+1]&&(b=!0)),b||(h.event.d=a,a=this.headers[d].getBoundingClientRect(),
|
|
162
|
+
d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(c?a.left:a.right)-d.left+_$_24da[57]))}};return h}(),sa=function(){var h=function(b){b.getMerge=h[_$_24da[56]];b.setMerge=h[_$_24da[11]];b.updateMerge=h.update;b.removeMerge=h.remove;b.destroyMerged=b.destroyMerge=h.destroy};h.isMerged=function(b,c){var a=H.getColumnNameFromCoords(b,c);if(a=this.merged.cells[a])if(i=this.options.mergeCells[a])m&&void 0!==m[a]||(i[1]>t&&(t=i[1]),m&&(m[a]=this.records[c][b].element&&!this.records[c][b].merged?
|
|
163
|
+
!0:!1))};h.getAffected=function(b){if(void 0!==this[b]){for(var c=b,a=this[b],d=[];this[c]==a;)d.push(c),c--;for(c=b+1;this[c]==a;)d.push(c),c++;d.sort(function(e,g){return e-g});return d}return!1};h[_$_24da[56]]=function(b){return b?this.options.mergeCells[b]:this.options.mergeCells};h[_$_24da[11]]=function(b,c,a){if(!T.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,g={},f={},k={},n=!1;typeof b==_$_24da[25]?k[b]=[c,a]:typeof b==_$_24da[111]?k=b:
|
|
164
|
+
((e=this.getHighlighted())?e=[H.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$_24da[206])}),e=!1),e&&(k[e[0]]=[e[1],e[2]]));c=Object.keys(k);if(c.length){for(a=0;a<c.length;a++){var l=c[a],p=k[c[a]][0],q=k[c[a]][1];p=parseInt(p);q=parseInt(q);if((!p||2>p)&&(!q||2>q))console.log(E(_$_24da[207])+_$_24da[166]+l);else if(this.options.mergeCells[l])f[l]=[p,q],g[l]=this.options.mergeCells[l],h.update.call(this,l,p,q);else{e=H.getCoordsFromColumnName(l);for(var r=
|
|
165
|
+
e[1];r<e[1]+q;r++)for(var w=e[0];w<e[0]+p;w++)b=H.getColumnNameFromCoords(w,r),(d=this.merged.cells[b])&&this.options.mergeCells[d]&&(g[d]=this.options.mergeCells[d],h.applyDestroy.call(this,d));f[l]=this.options.mergeCells[l]=[p,q];h.applyCreate.call(this,l);U.attached.call(this,e[0],e[1])||(n=e)}}Object.keys(f).length&&(n&&J[_$_24da[64]].call(this,e[1],e[0]),Q.call(this.parent,{worksheet:this,action:_$_24da[88],newValue:f,oldValue:g}),K.call(this,_$_24da[88],[f]),h.build.call(this),ka.refresh.call(this),
|
|
166
|
+
da.refresh.call(this),G.call(this.parent,_$_24da[208],this,f,g))}};h.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)h.applyDestroy.call(this,b),c&&a&&(d[b]=[c,a],h.applyCreate.call(this,b));h.build.call(this)}};h.remove=function(b){if(!T.call(this.parent,this))return!1;var c={},a={},d={};typeof b==_$_24da[25]?d[b]=!0:typeof b==_$_24da[111]&&(d=b);b=Object.keys(d);for(d=0;d<b.length;d++)this.options.mergeCells[b[d]]&&(c[b[d]]=this.options.mergeCells[b[d]],
|
|
167
|
+
a[b[d]]=!0,h.applyDestroy.call(this,b[d],!0));h.build.call(this);Q.call(this.parent,{worksheet:this,action:_$_24da[89],newValue:a,oldValue:c});K.call(this,_$_24da[89],{data:a})};h.destroy=function(){h.remove.call(this,this.options.mergeCells,!0)};h.applyCreate=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=a[b][0]||1,e=a[b][1]||1;b=H.getCoordsFromColumnName(b);if(!this.records[b[1]][b[0]].merged||1==c)if(a=U[_$_24da[56]].call(this,b[0],b[1])){a.classList.remove(_$_24da[67]);a.style.display=
|
|
168
|
+
_$_24da[3];1<d?a.setAttribute(_$_24da[209],d):a.removeAttribute(_$_24da[209]);1<e?a.setAttribute(_$_24da[210],e):a.removeAttribute(_$_24da[210]);1==this.options.textOverflow&&(a.style.overflow=_$_24da[121]);for(var g=0;g<e;g++)for(var f=0;f<d;f++){c=b[0]+f;var k=b[1]+g;if(a=this.records[k][c])if(a.merged=[f,g,a.v,d,e],0!=f||0!=g)a.element||U[_$_24da[56]].call(this,c,k),a.element.classList.add(_$_24da[67]),a.merged[3]=a.element.innerText,a.element.innerText=_$_24da[3],R.call(this,c,k,_$_24da[3])}}}};
|
|
169
|
+
h.applyDestroy=function(b,c){var a=this.options.mergeCells;if(a[b]){var d=H.getCoordsFromColumnName(b),e=d[0];d=d[1];var g=a[b][0],f=a[b][1];delete this.options.mergeCells[b];for(b=0;b<f;b++)for(var k=0;k<g;k++)this.records[d+b]&&(a=this.records[d+b][e+k])&&a.element&&(0==k&&0==b?(a.element.removeAttribute(_$_24da[209]),a.element.removeAttribute(_$_24da[210])):(a.element.classList.remove(_$_24da[67]),1==c&&(R.call(this,e+k,d+b,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};
|
|
170
170
|
h.updateConfig=function(b,c,a,d){if(1==c)var e=[a];else{e=[];for(var g=a;g<a+d;g++)e.push(g)}a=this.options.mergeCells;var f=Object.keys(a),k={};for(g=0;g<f.length;g++){var n=H.getCoordsFromColumnName(f[g]);var l=n[b];for(n=l+a[f[g]][b]-c;l<n;l++)-1!==e.indexOf(l)&&(k[f[g]]||(k[f[g]]=[a[f[g]][0],a[f[g]][1]],1==c&&(k[f[g]][b]+=d)),0==c&&k[f[g]][b]--)}f=Object.keys(k);for(g=0;g<f.length;g++)h.update.call(this,f[g],k[f[g]][0],k[f[g]][1]);h.build.call(this)};h.build=function(){var b=this.options.mergeCells;
|
|
171
171
|
this.merged={cols:[],rows:[],cells:[]};if(b)for(var c=Object.keys(b),a=0;a<c.length;a++){b[c[a]][0]=parseInt(b[c[a]][0]);b[c[a]][1]=parseInt(b[c[a]][1]);var d=H.getCoordsFromColumnName(c[a]),e=parseInt(b[c[a]][0]),g=parseInt(b[c[a]][1]);if(1<e)for(var f=0;f<e;f++)this.merged.cols[d[0]+f]=!0;if(1<g)for(var k=0;k<g;k++)this.merged.rows[d[1]+k]=!0;for(k=0;k<g;k++)for(f=0;f<e;f++){var n=H.getColumnNameFromCoords(d[0]+f,d[1]+k);this.merged.cells[n]=c[a]}}};h.batch=function(b){var c=Object.keys(b);if(c.length)for(var a=
|
|
172
|
-
0;a<c.length;a++)!1===b[c[a]]&&h.applyCreate.call(this,c[a])};return h}(),
|
|
173
|
-
if(a=this.options.columns[b]){var d=h[_$
|
|
174
|
-
var c=document.createElement(_$
|
|
175
|
-
(d.style.textAlign=c.align);c.title?(d.innerText=c.title,d.setAttribute(_$
|
|
176
|
-
e[a][c]&&(g=e[a][c].element)&&(void 0===d&&(e=this.options.footers,d=e[a]&&e[a][c]?e[a][c]:_$
|
|
177
|
-
b[_$
|
|
178
|
-
0;a<c.length;a++)for(var d=0;d<c[a].length;d++)h.call(this,d,a,c[a][d])};b.value=function(c,a,d){if(void 0===d)return this.options.footers[a][c];h.call(this,c,a,d);
|
|
179
|
-
if(d&&d.element)return d.element;d=this.footers.content[a][c]={};var e=this.options.columns[c].align;d.element=document.createElement(_$
|
|
180
|
-
[];var a=document.createElement(_$
|
|
181
|
-
b.adjust=function(c,a,d){var e=[],g=this.options.footers,f=this.footers.content;if(g)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var k=this.headers[c]==this.thead.lastChild.lastChild?!0:!1,n=!0;for(d=0;d<g.length;d++){for(var l=g[d].splice(c),p=c;p<c+a;p++)g[d][p]=_$
|
|
182
|
-
f[d]=f[d].concat(l)}}else for(d=0;d<g.length;d++){for(p=c;p<c+a;p++)(k=this.footers.content[d][p].element)&&k.parentNode&&k.parentNode.removeChild(k);f[d].splice(c,a);e[d]=g[d].splice(c,a)}return e};return b}(),
|
|
183
|
-
b;h.build.call(this);J.call(this,!0,!0);
|
|
184
|
-
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(_$
|
|
172
|
+
0;a<c.length;a++)!1===b[c[a]]&&h.applyCreate.call(this,c[a])};return h}(),Fa=function(){var h=function(b){b.getHeader=h[_$_24da[56]];b.setHeader=h[_$_24da[11]];b.getHeaders=h.all};h[_$_24da[56]]=function(b){var c;if(c=this.options.columns)return c[b].title||H.getColumnName(b)};h.all=function(b){for(var c=[],a=0;a<this.options.columns.length;a++)c.push(h[_$_24da[56]].call(this,a));return b?c:c.join(this.options.csvDelimiter)};h[_$_24da[11]]=function(b,c){if(!T.call(this.parent,this))return!1;var a;
|
|
173
|
+
if(a=this.options.columns[b]){var d=h[_$_24da[56]].call(this,b);if(void 0===c&&(c=prompt(E(_$_24da[211]),d),!c))return!1;a.title=c;if(a=this.headers[b])c?(a.innerHTML=c,a.setAttribute(_$_24da[212],c)):(a.innerHTML=H.getColumnName(b),a.removeAttribute(_$_24da[212]));Q.call(this.parent,{worksheet:this,action:_$_24da[94],column:b,oldValue:d,newValue:c});K.call(this,_$_24da[94],{column:b,title:c});G.call(this.parent,_$_24da[213],this,b,c,d)}};h.create=function(b){if(this.headers[b])return this.headers[b];
|
|
174
|
+
var c=document.createElement(_$_24da[186]);c.classList.add(_$_24da[214]);c.setAttribute(_$_24da[65],b);var a=document.createElement(_$_24da[215]);this.headers[b]=c;this.colgroup[b]=a;this.options.nestedHeaders&&(c.style.top=this.thead.lastChild.offsetTop+_$_24da[57]);h.applyProperties.call(this,b);G.call(this.parent,_$_24da[216],this,b,c,this.options.columns[b]);return c};h.applyProperties=function(b){var c=this.options.columns[b],a=c.width||this.options.defaultColWidth,d=this.headers[b];c.align&&
|
|
175
|
+
(d.style.textAlign=c.align);c.title?(d.innerText=c.title,d.setAttribute(_$_24da[212],c.title)):(d.innerText=H.getColumnName(b),d.removeAttribute(_$_24da[212]));c.tooltip&&(d.title=c.tooltip);var e=this.options.filters;!0===c.filter&&(e=!0);!1===c.filter&&(e=!1);!0===e&&d.classList.add(_$_24da[217]);if(!1===c.visible||c.type==_$_24da[121])a=_$_24da[128],c.visible=!1;this.colgroup[b].setAttribute(_$_24da[197],a)};return h}(),ia=function(){var h=function(c,a,d){var e=this.footers.content,g;e&&e[a]&&
|
|
176
|
+
e[a][c]&&(g=e[a][c].element)&&(void 0===d&&(e=this.options.footers,d=e[a]&&e[a][c]?e[a][c]:_$_24da[3]),Z(d)&&1==this.parent.config.parseFormulas&&(d=Y.execute.call(this,d,c,null,!1)),this.options.applyMaskOnFooters&&(e=pa[_$_24da[56]].call(this,c),d=u.editors.general.parseValue(c,a,d,this,e[1],g)),d instanceof Element||d instanceof HTMLDocument?(g.innerHTML=_$_24da[3],g.appendChild(d)):1==this.parent.config.stripHTML?g.innerText=d:g.innerHTML=d,G.call(this.parent,_$_24da[218],this,c,a,d,g))},b=function(c){c.getFooter=
|
|
177
|
+
b[_$_24da[56]];c.setFooter=b[_$_24da[11]];c.resetFooter=b.reset;c.refreshFooter=b.refresh;c.getFooterValue=b.value;c.setFooterValue=b.value};b[_$_24da[56]]=function(){return this.options.footers};b[_$_24da[11]]=function(c){if(c){var a=this.options.footers;this.options.footers=c}this.options.footers!=a&&(ia.build.call(this),b.render.call(this),K.call(this,_$_24da[219],{data:this.options.footers}),G.call(this.parent,_$_24da[220],this,this.options.footers,a))};b.refresh=function(){var c=this.options.footers;
|
|
178
|
+
if(c&&c.length)for(var a=0;a<c.length;a++)for(var d=0;d<c[a].length;d++)h.call(this,d,a,c[a][d])};b.value=function(c,a,d){if(void 0===d)return this.options.footers[a][c];h.call(this,c,a,d);K.call(this,_$_24da[221],{x:c,y:a,value:d});G.call(this.parent,_$_24da[222],this,c,a,d)};b.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_24da[3];K.call(this,_$_24da[223],{});G.call(this.parent,_$_24da[220],this,null,c)};b.create=function(c,
|
|
179
|
+
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(_$_24da[186]);d.element.setAttribute(_$_24da[65],c);d.element.setAttribute(_$_24da[60],a);e&&(d.element.style.textAlign=e);h.call(this,c,a);return d.element};b.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_24da[3];for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=
|
|
180
|
+
[];var a=document.createElement(_$_24da[184]),d=document.createElement(_$_24da[186]);d.innerHTML=_$_24da[187];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]=_$_24da[3]),this.footers.content[c][a]||(this.footers.content[c][a]={})}}};b.render=function(){for(var c=this.options.footers,a=0;a<c.length;a++)for(var d=0;d<c[a].length;d++){var e=ia.create.call(this,d,a);this.tfoot.children[a].appendChild(e)}};
|
|
181
|
+
b.adjust=function(c,a,d){var e=[],g=this.options.footers,f=this.footers.content;if(g)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var k=this.headers[c]==this.thead.lastChild.lastChild?!0:!1,n=!0;for(d=0;d<g.length;d++){for(var l=g[d].splice(c),p=c;p<c+a;p++)g[d][p]=_$_24da[3];g[d]=g[d].concat(l);l=f[d].splice(c);for(p=c;p<c+a;p++)f[d][p]={element:b.create.call(this,p,d)},n&&(1==k?this.tfoot.children[d].appendChild(f[d][p].element):this.tfoot.children[d].insertBefore(f[d][p].element,this.tfoot.children[d].children[c].nextSibling));
|
|
182
|
+
f[d]=f[d].concat(l)}}else for(d=0;d<g.length;d++){for(p=c;p<c+a;p++)(k=this.footers.content[d][p].element)&&k.parentNode&&k.parentNode.removeChild(k);f[d].splice(c,a);e[d]=g[d].splice(c,a)}return e};return b}(),Aa=function(){var h=function(b){b.setNestedCell=h.cell;b.getNestedCell=h.cell;b.setNestedHeaders=h[_$_24da[11]];b.getNestedHeaders=h[_$_24da[56]];b.resetNestedHeaders=h.reset};h[_$_24da[56]]=function(){return this.options.nestedHeaders};h[_$_24da[11]]=function(b){h.reset.call(this);this.options.nestedHeaders=
|
|
183
|
+
b;h.build.call(this);J.call(this,!0,!0);da.refresh.call(this);K.call(this,_$_24da[224],{data:b});G.call(this.parent,_$_24da[225],this,b)};h.reset=function(){var b=[],c=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<c.length;a++)c[a].classList.contains(_$_24da[226])&&b.push(c[a]);if(b.length)for(;c=b.shift();)c.remove();this.nested=null;J.call(this,!0,!0);da.refresh.call(this);K.call(this,_$_24da[227]);G.call(this.parent,_$_24da[225],this,[])};h.cell=function(b,c,a){if(a){if(!T.call(this.parent,
|
|
184
|
+
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(_$_24da[209],a.colspan),e.style.display=0==d.colspan?_$_24da[52]:_$_24da[3]);K.call(this,_$_24da[228],{x:b,y:c,properties:a});G.call(this.parent,_$_24da[229],this,b,c,a)}else return this.nested.content[c][b].element};h.range=function(b){b=this.options.nestedHeaders[b];for(var c=
|
|
185
185
|
[],a=0,d=0;d<b.length;d++){var e=parseInt(b[d].colspan);c[d]=[a,a+e-1];a+=e}return c};h.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};h.getAffected=function(b){var c=[],a=this.options.nestedHeaders;if(a){var d,e,g;for(e=0;e<a.length;e++)if((d=h.getColumns.call(this,e))&&void 0!==d[b]){var f=h.range.call(this,e);for(g=f[d[b]][0];g<=f[d[b]][1];g++)c.push(g)}}return c};h.create=function(b,c){if(this.nested.content[c][b])return this.nested.content[c][b].element;
|
|
186
|
-
var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$
|
|
187
|
-
0;c<b.length;c++){this.nested.content[c]=[];var d=document.createElement(_$
|
|
188
|
-
a+_$
|
|
189
|
-
g[e][d].colspan--);d=Object.keys(f[e]);for(a=0;a<d.length;a++)h.cell.call(this,d[a],e,{colspan:g[e][d[a]].colspan})}return f}};return h}(),
|
|
190
|
-
return u.formula&&typeof u.formula.TREND==_$
|
|
191
|
-
(x=this.results)?w=x.indexOf(w):x=this.rows;w--;for(var y=w;0<=y;y--)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return 0},f=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w++;for(var y=w;y<x.length;y++)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return x[x.length-1]},k=function(w,x){for(;0<=w;w--)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$
|
|
192
|
-
!this.records[x][w].element.classList.contains(_$
|
|
193
|
-
_$
|
|
194
|
-
1][d-1]||this.options.data[l+1][q+1]||(f=!1);for(var r=d;r<=q;r++)this.options.data[l+1][r]&&(f=!1)}else f=!1;f&&l++}else return this.resetBorders(_$
|
|
186
|
+
var a=this.options.nestedHeaders[c][b]||{},d=this.nested.content[c][b]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_24da[230]);a.title||(a.title=_$_24da[3]);var e=document.createElement(_$_24da[186]);e.setAttribute(_$_24da[231],b);e.setAttribute(_$_24da[232],c);e.setAttribute(_$_24da[209],a.colspan);e.setAttribute(_$_24da[233],a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return d.element=e};h.build=function(){this.nested||(this.nested={content:[]});var b,c,a=0;if(b=this.options.nestedHeaders){for(c=
|
|
187
|
+
0;c<b.length;c++){this.nested.content[c]=[];var d=document.createElement(_$_24da[186]);d.innerHTML=_$_24da[187];var e=document.createElement(_$_24da[184]);e.classList.add(_$_24da[226]);e.appendChild(d);this.thead.insertBefore(e,this.thead.lastChild)}for(c=0;c<this.thead.children.length;c++)this.thead.children[c].firstChild.style.top=a+_$_24da[57],a+=this.thead.children[c].offsetHeight;a=this.thead.offsetHeight-this.thead.lastChild.offsetHeight;for(c=0;c<this.headers.length;c++)this.headers[c].style.top=
|
|
188
|
+
a+_$_24da[57]}};h.adjust=function(b,c,a,d){var e,g=this.options.nestedHeaders,f=[],k;if(g)if(1==a)if(d&&d.nested)for(e=0;e<g.length;e++)for(a=0;a<g[e].length;a++)h.cell.call(this,a,e,{colspan:d.nested[e][a]});else for(e=0;e<g.length;e++){if(a=h.getColumns.call(this,e))a=a[b],g[e][a]&&(d=parseInt(g[e][a].colspan)+c,h.cell.call(this,a,e,{colspan:d}))}else{for(e=0;e<g.length;e++)if(k=h.getColumns.call(this,e)){f[e]=[];for(a=0;a<c;a++)d=k[b+a],void 0!==d&&(typeof f[e][d]==_$_24da[21]&&(f[e][d]=g[e][d].colspan),
|
|
189
|
+
g[e][d].colspan--);d=Object.keys(f[e]);for(a=0;a<d.length;a++)h.cell.call(this,d[a],e,{colspan:g[e][d[a]].colspan})}return f}};return h}(),fa=function(){var h=function(d,e,g,f){Z(d)?d=Y.shiftFormula(d,e,g):f&&(d=jSuites.calendar.dateToNum(d),0>e||0>g?d--:d++,d=jSuites.calendar.numToDate(d));return d},b=function(d,e,g){if(1===d.length){if(1<e||u.formula&&typeof u.formula.TREND!==_$_24da[112])g?d[0]--:d[0]++;return d}e=1;g=[];for(var f=[],k=0;k<d.length;k++)f.push(e++);for(k=0;k<d.length;k++)g.push(e++);
|
|
190
|
+
return u.formula&&typeof u.formula.TREND==_$_24da[112]?u.formula.TREND(d,f,g):d},c=function(d,e,g,f,k){var n=null,l=[],p=null,q=[];for(n=0;n<d.length;n++){if(jSuites.isNumeric(d[n])&&(l.push(d[n]),jSuites.isNumeric(d[n+1])))continue;l.length?(p=b(l,d.length,f),Array.isArray(p)?(p.forEach(function(r){q.push(r)}),l=[]):q.push(p)):(p=void 0!==k&&this.options.columns[k].type===_$_24da[234]?!0:!1,f&&(e*=-1,g*=-1),p=h(d[n],e*d.length,g*d.length,p),q.push(p))}return q},a=function(d,e){var g=function(w){var x;
|
|
191
|
+
(x=this.results)?w=x.indexOf(w):x=this.rows;w--;for(var y=w;0<=y;y--)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return 0},f=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w++;for(var y=w;y<x.length;y++)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return x[x.length-1]},k=function(w,x){for(;0<=w;w--)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_24da[67]))return w;return 0},n=function(w,x){for(;w<this.options.columns.length;w++)if(this.records[x][w].element&&
|
|
192
|
+
!this.records[x][w].element.classList.contains(_$_24da[67]))return w;return this.options.columns-1},l=this.getHighlighted(),p=l[0],q=l[1],r=l[2];l=l[3];d=parseInt(d);e=parseInt(e);null!=d&&null!=e&&(0<d-r?(n=n.call(this,parseInt(r)+1,e),k=parseInt(d)):(n=parseInt(d),k=k.call(this,parseInt(p)-1,e)),0<e-l?(f=f.call(this,parseInt(l)),g=parseInt(e)):(f=parseInt(e),g=g.call(this,parseInt(q))),Math.abs(d-r)>Math.abs(e-l)?(f=parseInt(q),g=parseInt(l)):(n=parseInt(p),k=parseInt(r)),this.setBorder(n,f,k,g,
|
|
193
|
+
_$_24da[168]))};a.execute=function(d){if(!T.call(this.parent,this))return!1;var e=this.getHighlighted(),g=Ka[_$_24da[56]].call(this,e,!1,!1),f=!0,k=!1,n=!1,l=this.borders.cloning;if(d)if(l&&l.active){d=l.x1;var p=l.y1,q=l.x2;l=l.y2;e[0]==d?(k=!0,e[1]>p&&(n=!0)):e[0]>d&&(n=!0)}else return this.resetBorders(_$_24da[168],!0),!1;else if(l=this.getSelected(),l.length)for(k=!0,d=l[0].x,q=l[l.length-1].x,p=parseInt(l[l.length-1].y)+1,l=parseInt(l[l.length-1].y);1==f;){if(this.options.data[l+1]){this.options.data[l+
|
|
194
|
+
1][d-1]||this.options.data[l+1][q+1]||(f=!1);for(var r=d;r<=q;r++)this.options.data[l+1][r]&&(f=!1)}else f=!1;f&&l++}else return this.resetBorders(_$_24da[168],!0),!1;var w=Na.getFromSelection.call(this,e),x=r=0,y=0,B=0,z=[],D=[],v=!0,A=this;if(k)for(f=function(){D.push({x:r,y:x,value:z[B],style:w[B][y]});B++;void 0==g[B]&&(B=0,v&&(z=c.call(A,z,0,1,n,r)))},r=d;r<=q;r++){v=void 0!==this.options.columns[r].autoIncrement?this.options.columns[r].autoIncrement:this.parent.config.autoIncrement;B=0;z=[];
|
|
195
195
|
for(x=0;x<g.length;x++)z.push(g[x][y]);n&&z.reverse();v&&(z=c.call(A,z,0,1,n,r));if(n)for(x=l;x>=p;x--)f();else for(x=p;x<=l;x++)f();y++}else for(v=this.parent.config.autoIncrement,f=function(){D.push({x:r,y:x,value:z[y],style:w[B][y]});y++;void 0==g[B][y]&&(y=0,v&&(z=c(z,1,0,n)))},x=p;x<=l;x++){y=0;z=[];for(r=0;r<g[B].length;r++)z.push(g[B][r]);n&&z.reverse();v&&(z=c(z,1,0,n));if(n)for(r=q;r>=d;r--)f();else for(r=d;r<=q;r++)f();B++}D.length&&this.setValue(D);e[0]<d&&(d=e[0]);e[1]<p&&(p=e[1]);e[2]>
|
|
196
|
-
q&&(q=e[2]);e[3]>l&&(l=e[3]);this.resetBorders(_$
|
|
197
|
-
c.setColumnData=h.setColumnData;c.refresh=h.refresh;c.data=h[_$
|
|
198
|
-
w=r>=c[0]&&r<=x&&l>=w&&l<=y?!0:!1}if(w&&(!g||!this.results||-1!=this.results.indexOf(l))){w=
|
|
199
|
-
function(){for(var c,a={},d=0,e,g=[],f=this.options.data,k=0;k<f.length;k++)c=null,e=k,f[k].data&&(Array.isArray(f[k].data)||typeof f[k].data==_$
|
|
200
|
-
function(){for(var c=this.dataType=0;c<this.options.columns.length;c++)typeof this.options.columns[c].name!==_$
|
|
201
|
-
(c[k].data[n]=_$
|
|
202
|
-
h.parse.call(this),a=this.options.data.length;this.options.minDimensions[1]>a&&(a=this.options.minDimensions[1]);for(var d=0;d<a;d++){var e=c[d]?c[d]:null;
|
|
203
|
-
null,e=
|
|
204
|
-
for(var d=0;d<this.options.columns.length;d++){var e=_$
|
|
205
|
-
function(c,a){if(typeof this.options.columns[c]===_$
|
|
206
|
-
1==c?!0:!1},g=h[_$
|
|
207
|
-
n=null,l=null,p=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];n=q[0];l=q[1];var r=jSuites.hash(d),w=jSuites.hash(h[_$
|
|
208
|
-
a=parseInt(a);if(d){Array.isArray(d)||(d=H.parseCSV(d,_$
|
|
209
|
-
k.push(y);D++;D>=d.length&&(D=0)}0==B.length%d.length&&0==B[0].length%d[0].length&&(d=B,p=k)}k=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(r=q[1];r<=q[3];r++)for(w=q[0];w<=q[2];w++)(!this.results||this.results&&0<=this.results.indexOf(r))&&f.push({x:w,y:r,value:_$
|
|
210
|
-
for(r=0;r<d.length;r++)for(w=0;w<d[r].length;w++){null!==n&&null!==l&&d[r][w][0]==_$
|
|
211
|
-
a){if(this.parent.config.allowExport){void 0===a&&(a=!0);var d=_$
|
|
212
|
-
a,c.setAttribute(_$
|
|
213
|
-
e.data=c[d]:e=c[d];e.row=void 0==c[d].row?d:c[d].row;a[e.row]=e}for(d=0;d<a.length;d++)c[d]=a[d]||{row:d,data:[]};return c};return h}()
|
|
214
|
-
function(b){if(b.length)if(1!==this.parent.edition)console.log(_$
|
|
215
|
-
this,d)}};h[_$
|
|
216
|
-
!1}};h.updateWorksheetName=function(b,c){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a;if(a=this.parent.config.definedNames){var d=[],e=Object.keys(a);if(e.length){for(var g=0;g<e.length;g++){var f=Y.updateWorksheetName(a[e[g]],b,c);f!==a[e[g]]&&d.push({index:e[g],value:f})}d.length&&h[_$
|
|
217
|
-
else for(var c=0;c<b.length;c++){var a=(_$
|
|
218
|
-
k=0;k<c.length;k++)f=-1===c[k].indexOf(_$
|
|
219
|
-
q=H.getCoordsFromColumnName(q);
|
|
220
|
-
var l=this.getBoundingClientRect();24>l.width-(n-l.left)&&(g.current=f,f.classList.add(_$
|
|
221
|
-
(f.classList.remove(_$
|
|
222
|
-
_$
|
|
223
|
-
n;k&&(k.tagName?p.setStart(k.firstChild,q):(q>k.length&&(q=k.length),p.setStart(k,q)),l.removeAllRanges(),l.addRange(p));d.call(this,f)};g.close=function(f){a.call(this);f?f.classList.remove(_$
|
|
224
|
-
l);p.ctrlKey&&(f=n);return f!==n?(p=f+_$
|
|
225
|
-
_$
|
|
226
|
-
w.innerText!==_$
|
|
227
|
-
f,this.parent.textarea.select(),document.execCommand(_$
|
|
228
|
-
b=function(f){f=
|
|
229
|
-
k+=f[p]}k&&n.push(k);for(p=0;p<n.length;p++)0==l&&(n[p]=n[p].trim());return n},c=function(f){f.setFormula=c[_$
|
|
230
|
-
r[q]+_$
|
|
231
|
-
_$
|
|
232
|
-
return a(k)}return k};c.resetArray=function(f,k){var n;if(n=this.records[k][f].a){for(var l=0;l<n.length;l++)for(var p=0;p<n[l].length;p++)this.options.data[k+l][f+p]||(this.records[k+l][f+p].v=_$
|
|
233
|
-
G.call(this.parent,_$
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
k&&void 0!=n)if(B instanceof Date)this.records[n][k].v=jSuites.calendar.dateToNum(B);else if(Array.isArray(B)){l=[];q=null;for(var z=0;z<B.length;z++)for(var D=0;D<B[z].length;D++){(0<D||0<z)&&this.options.data[n+z][k+D]!==_$
|
|
237
|
-
-1==C&&this.formula[A[z]].push(l[D])}for(z=0;z<B.length;z++)for(D=0;D<B[z].length;D++)this.records[n+z][k+D].v=B[z][D],this.records[n+z][k+D].element&&(this.records[n+z][k+D].element.innerText=B[z][D],jSuites.isNumeric(B[z][D])?this.records[n+z][k+D].element.classList.add(_$
|
|
238
|
-
x,F),F&&F.error?F.error:_$
|
|
239
|
-
f[y].indexOf(_$
|
|
240
|
-
w(q);p&&(q=p+_$
|
|
241
|
-
x.formula[y][w]=null);p.call(x,D);n[D]=!0}}1==z&&(x.formula[y]=x.formula[y].filter(function(A){return null!=A}))}},q=Object.keys(f);for(f=0;f<q.length;f++)p.call(this,q[f]);q=0;for(f=k.length-1;0<=f;f--){for(var r=0;r<f;r++)if(0<=k[r][2].indexOf(k[f][0])){k.splice(r,0,k.splice(f,1)[0]);f=k.length;break}q++;if(
|
|
242
|
-
u.spreadsheet[r].worksheets;for(p=0;p<y.length;p++){var B=y[p].getWorksheetName();for(l=0;l<y[p].options.data.length;l++)for(n=0;n<y[p].options.data[l].length;n++)if((q=y[p].options.data[l][n])&&Z(q)){var z=c.update.call(y[p],q,f,k,x);z!=q&&(w[B]||(w[B]=[]),w[B].push({x:n,y:l,value:z,force:!0}))}}}y=Object.keys(w);for(n=0;n<y.length;n++)if(w[y[n]].length){p=I(y[n]);for(l=0;l<w[y[n]].length;l++)
|
|
243
|
-
y=[];l=[];for(p=0;p<n.length;p++)if(z=n[p],q=this.formula[z],k&&k[z])for(r=0;r<q.length;r++)k&&k[q[r]]||(f[q[r]]&&(q[r]=f[q[r]]),l[q[r]]=!0);else{B=[];for(r=0;r<q.length;r++)k&&k[q[r]]||(f[q[r]]&&(q[r]=f[q[r]]),l[q[r]]=!0,B.push(q[r]));B.length&&(f[z]&&(z=f[z]),y[z]=B)}this.formula=y;B=this.getWorksheetName();for(var D=0;D<u.spreadsheet.length;D++)for(var v=u.spreadsheet[D].worksheets,A=0;A<v.length;A++)if(v[A].getWorksheetName()!==B)for(n=Object.keys(v[A].formula),
|
|
244
|
-
for(r=0;r<q.length;r++)z=q[r].split(_$
|
|
245
|
-
I(y[n]),w[y[n]]=
|
|
246
|
-
u.spreadsheet[l].worksheets;for(var q=0;q<p.length;q++){var r=[];for(var w=0;w<p[q].options.data.length;w++)for(var x=0;x<p[q].options.data[w].length;x++)if((n=p[q].options.data[w][x])&&Z(n)){var y=c.updateWorksheetName(n,f,k);y!=n&&(r.push({x,y:w,value:y,force:!0}),
|
|
247
|
-
f=H.getCoordsFromColumnName(f);k=f[0]+k;f=f[1]+n;return f=0>k||0>f?_$
|
|
248
|
-
l=_$
|
|
249
|
-
p=q[1]):(w=q[1],p=p[1]);for(k=w;k<=p;k++)for(w=f;w<=r;w++)l.push(n+H.getColumnNameFromCoords(w,k));return l};c.getRangeFromTokens=function(f){f=f.filter(function(l){return l!=_$
|
|
250
|
-
return l[1]>p[1]?1:l[1]<p[1]?-1:l[0]>p[0]?1:l[0]<p[0]?-1:0});return f.length?k+(f[0]+_$
|
|
251
|
-
k&&(f[n]=k+_$
|
|
252
|
-
h;c.tokenize=b;return c}(),
|
|
253
|
-
d,b,c)};h.getFromCoords=function(b,c,a){var d=null;null!=b&&null!=c&&(d=a?h.processed.call(this,b,c):
|
|
254
|
-
(d=p.x,e=p.y,void 0!==p.value&&(q=p.value),void 0!==p.style&&(r=p.style));p={x:d,y:e,value:q,force:a};null!==r&&(p.style=r);f.push(p)};if(b&&Array.isArray(b))for(var n=0;n<b.length;n++)k(b[n],c);else if(typeof b==_$
|
|
255
|
-
250);if(f.length){Q.call(this.parent,{worksheet:l,action:_$
|
|
256
|
-
e=c[a].y;if(!this.options.columns[d].readOnly&&this.options.columns[d].type==_$
|
|
257
|
-
|
|
258
|
-
f.innerText:f.children.length&&f.children[0].classList.contains(_$
|
|
259
|
-
(c=f[e].split(_$
|
|
260
|
-
this.records[c][b]&&this.records[c][b].element&&this.records[c][b].element.parentNode&&this.records[c][b].element.parentNode.parentNode?!0:!1};h[_$
|
|
196
|
+
q&&(q=e[2]);e[3]>l&&(l=e[3]);this.resetBorders(_$_24da[168],!0);this.updateSelectionFromCoords(d,p,q,l)};a.end=function(d){fa.event=!1;fa.execute.call(this,!0);ea.refresh.call(this)};a.cancel=function(d){fa.event=!1;a.reset.call(this,d)};a.reset=function(){this.resetBorders(_$_24da[168],!0)};return a}(),Ka=function(){var h=function(c){c.getData=h[_$_24da[56]];c.getJson=h[_$_24da[56]];c.setData=h[_$_24da[11]];c.loadData=h.load;c.getRowData=h.getRowData;c.setRowData=h.setRowData;c.getColumnData=h.getColumnData;
|
|
197
|
+
c.setColumnData=h.setColumnData;c.refresh=h.refresh;c.data=h[_$_24da[56]];c.download=h.download;c.downloadCSV=h.downloadCSV;c.copy=h.copy;c.paste=h.paste;c.cut=function(){return c.copy(!0)}};h[_$_24da[56]]=function(c,a,d,e){!0===c&&(c=this.getHighlighted());var g=c?!0:!1,f=[],k=this.options.columns.length,n=this.options.data.length;void 0===e&&(e=this.dataType&&typeof d==_$_24da[21]?1:0);for(var l=0;l<n;l++){var p=null;var q=e?{}:[];for(var r=0;r<k;r++){var w;if(!(w=!g)){w=c[1];var x=c[2],y=c[3];
|
|
198
|
+
w=r>=c[0]&&r<=x&&l>=w&&l<=y?!0:!1}if(w&&(!g||!this.results||-1!=this.results.indexOf(l))){w=R.call(this,r,l);if(a){if(g&&!1===this.rows[l].visible)continue;p=qa.processed.call(this,r,l);void 0!==p&&(w=p)}d&&w.match&&(w.match(d)||w.match(/\n/)||w.match(/"/))&&(w=w.replace(new RegExp(_$_24da[20],_$_24da[14]),_$_24da[235]),w=_$_24da[20]+w+_$_24da[20]);e?jSuites.path.call(q,_$_24da[3]+ra.call(this,r),w):q.push(w);p=!0}}p&&(d?f.push(q.join(d)):f.push(q))}return d?f.join(_$_24da[10])+_$_24da[10]:f};h.parse=
|
|
199
|
+
function(){for(var c,a={},d=0,e,g=[],f=this.options.data,k=0;k<f.length;k++)c=null,e=k,f[k].data&&(Array.isArray(f[k].data)||typeof f[k].data==_$_24da[111])&&(typeof f[k].id!==_$_24da[21]&&(c=parseInt(f[k].id)),typeof f[k].row!==_$_24da[21]&&(e=f[k].row),g[e]=f[k].data,f[k]=[]),e>d&&(d=e),c&&(a[e]=c);if(Object.keys(g).length)for(k=0;k<=d;k++)g[k]&&(f[k]=g[k]);d=this.getPrimaryKey();if(!1!==d)for(d=ra.call(this,d),k=0;k<f.length;k++)a[k]||!1===d||(c=parseInt(f[k][d]),0<c&&(a[k]=c));return a};h.type=
|
|
200
|
+
function(){for(var c=this.dataType=0;c<this.options.columns.length;c++)typeof this.options.columns[c].name!==_$_24da[21]&&(this.dataType=1)};h[_$_24da[11]]=function(c){c=h.standardize(c);var a={},d=[],e={};var g=Object.keys(c[0]).length-this.options.columns.length;0<g&&this.insertRow(g);var f=c.length-this.options.data.length;0<f&&this.insertRow(f);for(var k=0;k<this.options.data.length;k++){void 0===c[k]&&(c[k]={row:k,data:[]});for(var n=0;n<this.options.columns.length;n++)void 0===c[k].data[n]&&
|
|
201
|
+
(c[k].data[n]=_$_24da[3])}for(n=0;n<this.options.columns.length;n++){var l=ra.call(this,n);e[l]=n}for(k=0;k<c.length;k++){f=c[k].row;l=Object.keys(c[k].data);for(n=0;n<l.length;n++)g=null,void 0!==e[l[n]]?g=e[l[n]]:-1<l[n]&&(g=parseInt(l[n])),null!==g&&d.push({x:g,y:f,value:c[k].data[l[n]]});c[k].id&&(a[f]=c[k].id)}za.setId.call(this,a);qa[_$_24da[11]].call(this,d,null,!0)};h.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;h.type.call(this);if(this.options.data){var c=
|
|
202
|
+
h.parse.call(this),a=this.options.data.length;this.options.minDimensions[1]>a&&(a=this.options.minDimensions[1]);for(var d=0;d<a;d++){var e=c[d]?c[d]:null;va.row.call(this,d,e)}}};h.load=function(c){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_24da[3];this.options.data=c;h.build.call(this);J.call(this,!0,!0);ha.update.call(this)};h.refresh=function(c){if(typeof c!==_$_24da[21])for(var a=0;a<this.options.columns.length;a++){var d=this.records[c]&&this.records[c][a].element?this.records[c][a].element:
|
|
203
|
+
null,e=pa[_$_24da[56]].call(this,a,c);typeof e[0].updateCell==_$_24da[112]&&e[0].updateCell(d,R.call(this,a,c),a,c,this,e[1]);d&&U.applyOverflow.call(this,d,a,c)}else if(this.options.url){var g=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_24da[74],dataType:_$_24da[75],success:function(f){g.setData(f);jSuites.loading.hide()}})}};h.getRowData=function(c,a){if(typeof this.options.data[c]===_$_24da[21])return!1;if(a){if(this.dataType){a={};
|
|
204
|
+
for(var d=0;d<this.options.columns.length;d++){var e=_$_24da[3]+ra.call(this,d),g=_$_24da[3]+qa.processed.call(this,d,c,!0);jSuites.path.call(a,e,g)}}else for(a=[],d=0;d<this.options.columns.length;d++)a.push(qa.processed.call(this,d,c,!0));return a}return JSON.parse(JSON.stringify(this.options.data[c]))};h.setRowData=function(c,a,d){for(var e=[],g=0;g<this.options.columns.length;g++)typeof a[g]===_$_24da[21]&&(a[g]=_$_24da[3]),e.push({x:g,y:c,value:a[g]});e.length&&this.setValue(e,null,d)};h.getColumnData=
|
|
205
|
+
function(c,a){if(typeof this.options.columns[c]===_$_24da[21])return!1;for(var d=[],e=0;e<this.options.data.length;e++){var g=a?qa.processed.call(this,c,e,!0):R.call(this,c,e);d.push(g)}return d};h.setColumnData=function(c,a,d){for(var e=[],g=0;g<this.rows.length;g++)typeof a[g]===_$_24da[21]&&(a[g]=_$_24da[3]),e.push({x:c,y:g,value:a[g]});e.length&&this.setValue(e,null,d)};h.copy=function(c){var a=this,d=this.getHighlighted(),e=function(){a.setBorder(d[0],d[1],d[2],d[3],_$_24da[117]);a.borders.copying.clear=
|
|
206
|
+
1==c?!0:!1},g=h[_$_24da[56]].call(this,d,!0,_$_24da[236]),f=G.call(this.parent,_$_24da[237],this,d,g);if(f)g=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(g).then(e):(this.parent.textarea.value=g,this.parent.textarea.select(),document.execCommand(_$_24da[238]),e());return g};h.paste=function(c,a,d){if(!T.call(this.parent,this))return!1;var e=this,g=function(){e.borders.copying&&(e.resetBorders(_$_24da[117],!0),e.borders.copying.clear=!1)},f=null,k=this.options.style,
|
|
207
|
+
n=null,l=null,p=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];n=q[0];l=q[1];var r=jSuites.hash(d),w=jSuites.hash(h[_$_24da[56]].call(this,q,!0,_$_24da[236]));if(r!=w)g();else{var x=0,y=0;d=h[_$_24da[56]].call(this,q,!1,!1);for(r=q[1];r<=q[3];r++)if(!this.results||-1!=this.results.indexOf(r)){p[y]=[];x=0;for(w=q[0];w<=q[2];w++)f=H.getColumnNameFromCoords(w,r),p[y][x]=k&&k[f]?k[f]:_$_24da[239],x++;y++}}}c=parseInt(c);
|
|
208
|
+
a=parseInt(a);if(d){Array.isArray(d)||(d=H.parseCSV(d,_$_24da[236]));if(r=G.call(this.parent,_$_24da[240],this,d,c,a,p))d=r;else if(!1===r)return!1;100<d.length&&!this.options.pagination&&!J.limited.call(this)&&console.log(_$_24da[241]);if(f=this.getHighlighted()){x=[];y=[];var B=[];k=[];var z=0,D=0;for(r=f[1];r<=f[3];r++)if(!this.results||-1!=this.results.indexOf(r)){x=[];y=[];for(w=f[0];w<=f[2];w++)x.push(d[D][z]),p&&p[D]&&p[D][z]?y.push(p[D][z]):y.push(_$_24da[3]),z++,z>=d[0].length&&(z=0);B.push(x);
|
|
209
|
+
k.push(y);D++;D>=d.length&&(D=0)}0==B.length%d.length&&0==B[0].length%d[0].length&&(d=B,p=k)}k=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(r=q[1];r<=q[3];r++)for(w=q[0];w<=q[2];w++)(!this.results||this.results&&0<=this.results.indexOf(r))&&f.push({x:w,y:r,value:_$_24da[3],style:_$_24da[3]});g()}r=c+d[0].length-this.options.columns.length;0<r&&this.insertColumn(r);r=a+d.length-this.rows.length;0<r&&this.insertRow(r);y=x=c;z=B=a;D=null;this.results&&(k=this.results.indexOf(a));
|
|
210
|
+
for(r=0;r<d.length;r++)for(w=0;w<d[r].length;w++){null!==n&&null!==l&&d[r][w][0]==_$_24da[18]&&(d[r][w]=Y.shiftFormula(d[r][w],c-n,a-l));y=c+w;z=a+r;this.results&&(z=this.results[k+r]);var v={x:y,y:z,value:d[r][w]};p&&p[r]&&p[r][w]&&(v.style=p[r][w]);f.push(v);null===D&&ka.isSelected.call(this,y,z,q)&&(D=!0)}D&&g();f.length&&(qa[_$_24da[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),G.call(this.parent,_$_24da[242],this,f),this.updateSelectionFromCoords(x,B,y,z))}};var b=function(c,
|
|
211
|
+
a){if(this.parent.config.allowExport){void 0===a&&(a=!0);var d=_$_24da[3];if(1==c||1==this.parent.config.includeHeadersOnDownload)d+=this.getHeaders().replace(/\s+/gm,_$_24da[163])+_$_24da[10];d+=h[_$_24da[56]].call(this,null,a,this.options.csvDelimiter);a=new Blob([_$_24da[244]+d],{type:_$_24da[245]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(a,this.options.csvFileName+_$_24da[246]):(c=document.createElement(_$_24da[247]),a=URL.createObjectURL(a),c.href=
|
|
212
|
+
a,c.setAttribute(_$_24da[248],this.options.csvFileName+_$_24da[246]),document.body.appendChild(c),c.click(),c.parentNode.removeChild(c))}else console.error(_$_24da[243])};h.downloadCSV=function(c,a){b.call(this,c,a)};h.download=function(c,a){u.render?u.render(this.parent):b.call(this,c,a)};h.standardize=function(c){c||(c=[]);Array.isArray(c)||(c=[c]);void 0==c[0]||Array.isArray(c[0])||typeof c[0]==_$_24da[111]||(c=[c]);for(var a=[],d=0;d<c.length;d++){var e={};Array.isArray(c[d])||void 0==c[d].data?
|
|
213
|
+
e.data=c[d]:e=c[d];e.row=void 0==c[d].row?d:c[d].row;a[e.row]=e}for(d=0;d<a.length;d++)c[d]=a[d]||{row:d,data:[]};return c};return h}(),ab=function(){var h=function(b){b.getLabel=h[_$_24da[56]];b.getLabelFromCoords=h[_$_24da[56]]};h[_$_24da[56]]=function(b,c,a){if(typeof b==_$_24da[25]){b=H.getCoordsFromColumnName(b);var d=b[0];c=b[1]}else d=b;return this.getProcessed(d,c,a)};return h}(),La=function(){var h=function(b){b.getDefinedNames=h[_$_24da[56]];b.setDefinedNames=h[_$_24da[11]]};h[_$_24da[11]]=
|
|
214
|
+
function(b){if(b.length)if(1!==this.parent.edition)console.log(_$_24da[249]);else{for(var c=this.parent.config.definedNames,a,d=[],e=0;e<b.length;e++){var g=b[e].index.toUpperCase();a=c[g]?c[g]:null;b[e].value?(b[e].value=W(b[e].value),this.parent.config.definedNames[g]=b[e].value):c[g]&&delete this.parent.config.definedNames[g];d.push({index:g,value:b[e].value,oldValue:a})}Q.call(this.parent,{worksheet:this,action:_$_24da[104],records:d});K.call(this,_$_24da[104],{data:d});G.call(this.parent,_$_24da[250],
|
|
215
|
+
this,d)}};h[_$_24da[56]]=function(b){var c=this.parent.config.definedNames;return b?c[b]:c};h.updateAll=function(b,c){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a,d=this.getWorksheetName();if(a=this.parent.config.definedNames){var e=[],g=Object.keys(a);if(g.length){for(var f=0;f<g.length;f++){var k=Y.update.call(this,a[g[f]],b,c,d);k!==a[g[f]]&&(-1!==k.indexOf(_$_24da[251])&&(k=null),e.push({index:g[f],value:k}))}e.length&&h[_$_24da[11]].call(this,e)}}this.parent.historyCascade=
|
|
216
|
+
!1}};h.updateWorksheetName=function(b,c){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a;if(a=this.parent.config.definedNames){var d=[],e=Object.keys(a);if(e.length){for(var g=0;g<e.length;g++){var f=Y.updateWorksheetName(a[e[g]],b,c);f!==a[e[g]]&&d.push({index:e[g],value:f})}d.length&&h[_$_24da[11]].call(this,d)}}this.parent.historyCascade=!1}};h.build=function(){var b=Object.keys(this.config.definedNames);if(b&&b.length)if(1!==this.edition)this.config.definedNames={},console.log(_$_24da[249]);
|
|
217
|
+
else for(var c=0;c<b.length;c++){var a=(_$_24da[3]+b[c]).toUpperCase(),d=W(this.config.definedNames[b[c]]);a!=b[c]&&delete this.config.definedNames[b[c]];this.config.definedNames[a]=d}};return h}(),ta=function(){var h=[_$_24da[252],_$_24da[253],_$_24da[254],_$_24da[255],_$_24da[256]],b=[_$_24da[257],_$_24da[190],_$_24da[258],_$_24da[259],_$_24da[260],_$_24da[261],_$_24da[1],_$_24da[262],_$_24da[37],_$_24da[263],_$_24da[18],_$_24da[15],_$_24da[17],_$_24da[264]],c=[],a=function(){if(0<c.length){for(var f,
|
|
218
|
+
k=0;k<c.length;k++)f=-1===c[k].indexOf(_$_24da[19])?this:I(c[k].split(_$_24da[19])[0]),da.destroy.call(f,c[k]);c=[]}},d=function(f){a.call(this);for(var k=0,n=[],l,p,q,r=0;r<f.children.length;r++)if(l=f.children[r].getAttribute(_$_24da[265])){n[l]||(n[l]=h[k++],4<k&&(k=0));f.children[r].style.color=n[l];-1===l.indexOf(_$_24da[19])?(p=this,q=l):(p=l.split(_$_24da[19]),q=p[1],p=I(p[0]));if(0<=q.indexOf(_$_24da[166])){var w=q.split(_$_24da[166]);q=H.getCoordsFromColumnName(w[0]);w=H.getCoordsFromColumnName(w[1])}else w=
|
|
219
|
+
q=H.getCoordsFromColumnName(q);ka[_$_24da[11]].call(p,q[0],q[1],w[0],w[1],null,l,n[l]);c.push(l)}},e=function(f){this.worksheet&&(a.call(this.worksheet),typeof this.onchange==_$_24da[112]&&this.onchange.call(this,this.innerText,f),this.worksheet=null)},g=function(f,k){k&&typeof k!=_$_24da[112]||(k={type:_$_24da[266],onchange:k});k.type===_$_24da[266]?(f.classList.add(_$_24da[267]),f.addEventListener(_$_24da[268],function(n){n=n.changedTouches&&n.changedTouches[0]?n.changedTouches[0].clientX:n.clientX;
|
|
220
|
+
var l=this.getBoundingClientRect();24>l.width-(n-l.left)&&(g.current=f,f.classList.add(_$_24da[269]),f.classList.add(_$_24da[123]))})):(f.addEventListener(_$_24da[270],function(n){Z(f.innerText)&&(f.classList.add(_$_24da[123]),u.current&&setTimeout(function(){f.worksheet=u.current;g.parse.call(u.current,f);var l=document.createTextNode(_$_24da[3]);f.appendChild(l);jSuites.focus(f)}))}),f.addEventListener(_$_24da[271],function(n){Z(f.innerText)?f.classList.add(_$_24da[123]):f.classList.contains(_$_24da[123])&&
|
|
221
|
+
(f.classList.remove(_$_24da[123]),f.worksheet&&a.call(f.worksheet));n.preventDefault()}),f.addEventListener(_$_24da[118],function(n){27==n.which&&(f.innerText=_$_24da[3],e.call(f,!1))}));f.classList.add(_$_24da[272]);f.classList.add(_$_24da[271]);f.setAttribute(_$_24da[273],!0);f.addEventListener(_$_24da[274],function(n){e.call(f,!0)});f.val=function(n){if(void 0===n)return f.innerText;f.innerText=n};k.onchange&&(f.onchange=k.onchange);k.onupdate&&(f.onupdate=k.onupdate)};g.current=null;g.parse=function(f){for(var k=
|
|
222
|
+
_$_24da[3],n=_$_24da[3],l=window.getSelection(),p=document.createRange(),q=H.getCaretIndex.call(this.parent,f),r=Y.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_24da[3])),w=0;w<r.length;w++)r[w]&&Y.tokenIdentifier.test(r[w].trim())?(w==r.length-1&&(n=_$_24da[275]),k+=_$_24da[276]+n+_$_24da[277]+r[w].trim().replace(/\$/g,_$_24da[3])+_$_24da[278]+r[w]+_$_24da[279]):k+=r[w];f.innerHTML=k;k=null;for(w=0;w<f.childNodes.length&&!(k=f.childNodes[w],n=k.tagName?k.innerText.length:k.length,0>=q-n);w++)q-=
|
|
223
|
+
n;k&&(k.tagName?p.setStart(k.firstChild,q):(q>k.length&&(q=k.length),p.setStart(k,q)),l.removeAllRanges(),l.addRange(p));d.call(this,f)};g.close=function(f){a.call(this);f?f.classList.remove(_$_24da[123]):g.current&&(typeof g.current.onchange==_$_24da[112]&&g.current.onchange.call(g.current),g.current.classList.remove(_$_24da[269]),g.current.classList.remove(_$_24da[123]),g.current.worksheet=null,g.current=null)};g.getName=function(f,k,n,l,p){f=H.getColumnNameFromCoords(f,k);n=H.getColumnNameFromCoords(n,
|
|
224
|
+
l);p.ctrlKey&&(f=n);return f!==n?(p=f+_$_24da[166]+n,p=Y.getTokensFromRange.call(this,p),Y.getRangeFromTokens.call(this,p)):f};g.range=function(f,k,n,l,p){g.current.getAttribute(_$_24da[280])==_$_24da[281]&&(f=n,k=l);f=g.getName.call(this,f,k,n,l,p);k=document.createElement(_$_24da[282]);k.innerText=f;k.setAttribute(_$_24da[265],f);g.current.innerText=_$_24da[3];g.current.appendChild(k);d.call(this,g.current);jSuites.focus(k);p.preventDefault()};g.update=function(f,k,n,l,p,q,r){q.getAttribute(_$_24da[280])==
|
|
225
|
+
_$_24da[281]&&(f=n,k=l);var w=jSuites.getNode();if(w){var x=g.getName.call(this,f,k,n,l,p);this!==r&&(x=r.getWorksheetName()+_$_24da[19]+x);f=function(y){var B=document.createElement(_$_24da[282]);B.innerText=x;B.setAttribute(_$_24da[265],x);w.parentNode===q&&!1===y?w.parentNode.insertBefore(B,w.nextSibling):q.appendChild(B);w=B};if(w.getAttribute(_$_24da[265]))p.ctrlKey?(q.appendChild(document.createTextNode(_$_24da[37])),f(!0)):(w.innerText=x,w.setAttribute(_$_24da[265],x));else{if(!w.innerText||
|
|
226
|
+
w.innerText!==_$_24da[3]&&-1==b.indexOf(w.innerText.slice(-1))||w.nextElementSibling&&w.nextElementSibling.getAttribute(_$_24da[265]))return!1;f(!1)}jSuites.focus(w);d.call(this,q);p.preventDefault();typeof q.onupdate==_$_24da[112]&&q.onupdate.call(q,q.innerText);return!0}return!1};g.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,_$_24da[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=
|
|
227
|
+
f,this.parent.textarea.select(),document.execCommand(_$_24da[238]))}else if(36==f.which){var k=window.getSelection(),n=document.createRange();n.setStart(f.target,0);k.removeAllRanges();k.addRange(n)}else 35==f.which?jSuites.focus(f.target):187==f.which?!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_24da[3])&&f.target.getAttribute(_$_24da[125])&&f.target.removeAttribute(_$_24da[125]):13==f.which&&f.target.blur()};g.palette=function(f){h=f};return g}(),Y=function(){var h=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),
|
|
228
|
+
b=function(f){f=W(f);for(var k=_$_24da[3],n=[],l=0,p=0;p<f.length;p++){if(f[p]==_$_24da[20]||f[p]==_$_24da[164])l=0==l?1:0;var q;if(q=0==l)q=f[p],(q=q==_$_24da[257]||q==_$_24da[190]||q==_$_24da[258]||q==_$_24da[259]||q==_$_24da[260]||q==_$_24da[12])||(q=f[p],q=q==_$_24da[261]||q==_$_24da[283]||q==_$_24da[1]||q==_$_24da[2]||q==_$_24da[262]||q==_$_24da[284]||q==_$_24da[37]||q==_$_24da[263]||q==_$_24da[18]||q==_$_24da[15]||q==_$_24da[17]||q==_$_24da[264]);q?(k&&(n.push(k),k=_$_24da[3]),n.push(f[p])):
|
|
229
|
+
k+=f[p]}k&&n.push(k);for(p=0;p<n.length;p++)0==l&&(n[p]=n[p].trim());return n},c=function(f){f.setFormula=c[_$_24da[11]];f.updateFormula=c.update;f.executeFormula=c.execute;f.resetArray=c.resetArray;f.formula=[];f.tracking=[];f.setTracking=c.setTracking};c.run=function(f,k){var n=_$_24da[3],l=Object.keys(k);if(l.length){for(var p={},q=0;q<l.length;q++){var r=l[q].replace(/!/g,_$_24da[39]);0<r.indexOf(_$_24da[39])&&(r=r.split(_$_24da[39]),p[r[0]]=!0)}r=Object.keys(p);for(q=0;q<r.length;q++)n+=_$_24da[285]+
|
|
230
|
+
r[q]+_$_24da[286];for(q=0;q<l.length;q++)r=l[q].replace(/!/g,_$_24da[39]),null===k[l[q]]||jSuites.isNumeric(k[l[q]])||(p=k[l[q]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(k[l[q]]=d(p,k[l[q]])),n=0<r.indexOf(_$_24da[39])?n+(r+_$_24da[287]+k[l[q]]+_$_24da[288]):n+(_$_24da[285]+r+_$_24da[287]+k[l[q]]+_$_24da[288])}f=f.replace(/\$/g,_$_24da[3]);(p=f.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(f=d(p,f));f=f.replace(/!/g,
|
|
231
|
+
_$_24da[39]);f=(new Function(n+_$_24da[289]+f))();null===f&&(f=0);return f};c[_$_24da[11]]=function(){};var a=function(f){f=W(f,!0);return f.replace(/\$/g,_$_24da[3])},d=function(f,k){for(var n=0;n<f.length;n++){var l=c.getTokensFromRange.call(this,f[n]);k=k.replace(f[n],_$_24da[262]+l.join(_$_24da[37])+_$_24da[284])}return k},e=function(f,k,n){var l=this.config.definedNames;if(l&&0<Object.keys(l).length){for(var p=0;p<f.length;p++)f[p]&&l&&l[f[p]]&&(k=k.replace(f[p],l[f[p]]),n&&(n[f[p]]=l[f[p]]));
|
|
232
|
+
return a(k)}return k};c.resetArray=function(f,k){var n;if(n=this.records[k][f].a){for(var l=0;l<n.length;l++)for(var p=0;p<n[l].length;p++)this.options.data[k+l][f+p]||(this.records[k+l][f+p].v=_$_24da[3],this.records[k+l][f+p].element&&(this.records[k+l][f+p].element.innerText=_$_24da[3]));this.records[k][f].a=null}};c.execute=function(f,k,n,l,p){if(1==this.parent.processing)return null!==k&&null!==n&&this.parent.queue.push([this,k,n]),_$_24da[3];if(typeof this.parent.config.onbeforeformula==_$_24da[112]){var q=
|
|
233
|
+
G.call(this.parent,_$_24da[290],this,f,k,n);if(!1===q)return f;q&&(f=q)}var r=[],w=function(F,M,N,V){var O=null,oa=null;if(void 0!=M&&void 0!=N){O=H.getColumnNameFromCoords(M,N);oa=V.getWorksheetName()+_$_24da[39]+O;if(r[oa])throw{error:_$_24da[291],message:_$_24da[292],reference:oa};r[oa]=!0}p||(F=a(F));var X=F,S=X.match(/[A-Z_]+[A-Z0-9_\.!]*[(]*/g);S&&S.length&&(X=e.call(V.parent,S,X,x));(S=X.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&S.length&&(X=d.call(V,S,X));S=
|
|
234
|
+
[];X=b(X);for(var ba=0;ba<X.length;ba++)X[ba]&&h.test(X[ba])&&S.push(X[ba]);if(S)for(X=0;X<S.length;X++){var ca=S[X].split(_$_24da[19]);ca[1]?(M=ca[1],ba=I(ca[0]),N=V.getWorksheetName()+_$_24da[39]+O,ca=S[X]):(M=ca[0],ba=V,N=O,ca=V.getWorksheetName()+_$_24da[39]+ca[0]);if(ca===oa)throw{error:_$_24da[293],message:_$_24da[294]};if(typeof ba==_$_24da[21]||typeof ba.formula==_$_24da[21])throw{error:_$_24da[295],message:_$_24da[296]};N&&(ba.formula[M]||(ba.formula[M]=[]),0>ba.formula[M].indexOf(N)&&ba.formula[M].push(N));
|
|
235
|
+
x[S[X]]||(N=H.getCoordsFromColumnName(M),M=N[0],N=N[1],ba.rows.length>N&&ba.options.columns.length>M&&(ca=ba.records[N]&&void 0!==ba.records[N][M].v?ba.records[N][M].v:R.call(ba,M,N),Z(ca)?x[S[X]]=w(ca,M,N,ba):(ca===_$_24da[3]||null===ca||void 0===ca?ca=null:jSuites.isNumeric(ca)||(ca=_$_24da[20]+ca+_$_24da[20],y[S[X]]=_$_24da[71]),x[S[X]]=ca)))}return F.substr(1)},x={},y={};try{f=w(f,k,n,this);if(f==_$_24da[3])return _$_24da[3];0==f.indexOf(_$_24da[297])&&(p=!0);var B=p?c.run(f,x):u.formula(f,x,
|
|
236
|
+
k,n,this,y);if(!1!==l&&void 0!=k&&void 0!=n)if(B instanceof Date)this.records[n][k].v=jSuites.calendar.dateToNum(B);else if(Array.isArray(B)){l=[];q=null;for(var z=0;z<B.length;z++)for(var D=0;D<B[z].length;D++){(0<D||0<z)&&this.options.data[n+z][k+D]!==_$_24da[3]&&(q=_$_24da[298]);var v=H.getColumnNameFromCoords(k+D,n+z);l.push(v)}if(!q){v=H.getColumnNameFromCoords(k,n);var A=Object.keys(this.formula);for(z=0;z<A.length;z++){var C=this.formula[A[z]].indexOf(v);if(0<=C)for(D=0;D<l.length;D++)C=this.formula[A[z]].indexOf(l[D]),
|
|
237
|
+
-1==C&&this.formula[A[z]].push(l[D])}for(z=0;z<B.length;z++)for(D=0;D<B[z].length;D++)this.records[n+z][k+D].v=B[z][D],this.records[n+z][k+D].element&&(this.records[n+z][k+D].element.innerText=B[z][D],jSuites.isNumeric(B[z][D])?this.records[n+z][k+D].element.classList.add(_$_24da[299]):this.records[n+z][k+D].element.classList.remove(_$_24da[299]));this.records[n][k].a=B;q=B[0][0];this.records[n][k].v=q}B=q}else this.records[n][k].v=B;return B}catch(F){return 1==this.parent.config.debugFormulas&&console.log(f,
|
|
238
|
+
x,F),F&&F.error?F.error:_$_24da[295]}};c.update=function(f,k,n,l){var p=null,q=null,r=this.getWorksheetName(),w=function(D){n&&n[D]&&(D=_$_24da[251]);k[D]&&(D=k[D]);return D},x=function(D,v){if(-1===v.indexOf(_$_24da[300]))return D;v=v.split(_$_24da[300]);if(3===v.length){v=_$_24da[300];var A=_$_24da[300]}else v[0]===_$_24da[3]?(v=_$_24da[300],A=_$_24da[3]):(v=_$_24da[3],A=_$_24da[300]);return v+D.match(/[A-Z]+/g)+A+D.match(/[0-9]+/g)};f=W(f,!0);f=b(f);for(var y=0;y<f.length;y++)if(f[y]&&h.test(f[y])){if(-1==
|
|
239
|
+
f[y].indexOf(_$_24da[19])){if(q=f[y],p=_$_24da[3],l&&l!=r)continue}else if(q=f[y].split(_$_24da[19]),p=q[0],q=q[1],l&&l!=p)continue;var B=q;if(0<=q.indexOf(_$_24da[166])){q=c.getTokensFromRange.call(this,q);for(var z=0;z<q.length;z++)q[z]=w(q[z]);q=c.getRangeFromTokens.call(this,q);q!==_$_24da[251]&&-1!==B.indexOf(_$_24da[300])&&(B=B.split(_$_24da[166]),q=q.split(_$_24da[166]),q=x(q[0],B[0])+_$_24da[166]+x(q[1],B[1]))}else-1!==B.indexOf(_$_24da[300])?(q=w(q.replace(/\$/g,_$_24da[3])),q=x(q,B)):q=
|
|
240
|
+
w(q);p&&(q=p+_$_24da[19]+q);f[y]=q}return f.join(_$_24da[3])};c.getChain=function(f){if(void 0===f)return[];var k=[],n=[],l=[],p=function(w){if(0<=w.indexOf(_$_24da[39])){var x=w.split(_$_24da[39]),y=x.pop(),B=x.join(_$_24da[39]);x=I(B)}else x=this,B=x.getWorksheetName(),y=w,w=B+_$_24da[39]+w;if(x.formula[y]&&!l[w]){var z=!1;l[w]=!0;for(w=0;w<x.formula[y].length;w++){var D=x.formula[y][w];-1==D.indexOf(_$_24da[39])&&(D=B+_$_24da[39]+D);if(!n[D]){var v=x.getValue(D);Z(v)?k.push([D,v,c.getTokens.call(x,
|
|
241
|
+
v,B)]):(z=!0,x.formula[y][w]=null);p.call(x,D);n[D]=!0}}1==z&&(x.formula[y]=x.formula[y].filter(function(A){return null!=A}))}},q=Object.keys(f);for(f=0;f<q.length;f++)p.call(this,q[f]);q=0;for(f=k.length-1;0<=f;f--){for(var r=0;r<f;r++)if(0<=k[r][2].indexOf(k[f][0])){k.splice(r,0,k.splice(f,1)[0]);f=k.length;break}q++;if(5E4<q){console.error(_$_24da[301]);break}}n=[];for(f=0;f<k.length;f++)n[k[f][0]]=k[f][1];return n};c.updateAll=function(f,k){var n,l,p,q,r,w={},x=this.getWorksheetName();for(r=0;r<
|
|
242
|
+
u.spreadsheet.length;r++){var y=u.spreadsheet[r].worksheets;for(p=0;p<y.length;p++){var B=y[p].getWorksheetName();for(l=0;l<y[p].options.data.length;l++)for(n=0;n<y[p].options.data[l].length;n++)if((q=y[p].options.data[l][n])&&Z(q)){var z=c.update.call(y[p],q,f,k,x);z!=q&&(w[B]||(w[B]=[]),w[B].push({x:n,y:l,value:z,force:!0}))}}}y=Object.keys(w);for(n=0;n<y.length;n++)if(w[y[n]].length){p=I(y[n]);for(l=0;l<w[y[n]].length;l++)R.call(p,w[y[n]][l].x,w[y[n]][l].y,w[y[n]][l].value);K.call(p,_$_24da[138],
|
|
243
|
+
{data:w[y[n]]})}w=[];n=Object.keys(this.formula);y=[];l=[];for(p=0;p<n.length;p++)if(z=n[p],q=this.formula[z],k&&k[z])for(r=0;r<q.length;r++)k&&k[q[r]]||(f[q[r]]&&(q[r]=f[q[r]]),l[q[r]]=!0);else{B=[];for(r=0;r<q.length;r++)k&&k[q[r]]||(f[q[r]]&&(q[r]=f[q[r]]),l[q[r]]=!0,B.push(q[r]));B.length&&(f[z]&&(z=f[z]),y[z]=B)}this.formula=y;B=this.getWorksheetName();for(var D=0;D<u.spreadsheet.length;D++)for(var v=u.spreadsheet[D].worksheets,A=0;A<v.length;A++)if(v[A].getWorksheetName()!==B)for(n=Object.keys(v[A].formula),
|
|
244
|
+
p=0;p<n.length;p++){y=[];q=v[A].formula[n[p]];for(r=0;r<q.length;r++)z=q[r].split(_$_24da[39]),z[0]==B&&z[1]?k&&k[z[1]]||(f[z[1]]&&(z[1]=f[z[1]]),y.push(z[0]+_$_24da[39]+z[1])):y.push(q[r]);v[A].formula[n[p]]=y}y=Object.keys(l);for(n=0;n<y.length;n++)z=y[n].split(_$_24da[39]),z[1]?(q=z[1],f=I(z[0]),k=z[0]):(q=z[0],f=this,k=x),z=H.getCoordsFromColumnName(q),l=z[0],p=z[1],q=f.options.data[p][l],z=Y.execute.call(f,q,l,p,!1),z!==f.records[p][l].v&&(w[k]||(w[k]=[]),w[k].push({x:l,y:p,value:q,force:!0}));
|
|
245
|
+
y=Object.keys(w);if(y.length)for(n=0;n<y.length;n++)p=I(y[n]),w[y[n]]=qa.applyValues.call(p,w[y[n]]),qa.setValueChained.call(p,w[y[n]])};c.updateWorksheetName=function(f,k,n){for(var l=b(f),p=0;p<l.length;p++)f=l[p].split(_$_24da[19]),f[1]&&(f[0]=f[0].replace(new RegExp(_$_24da[164],_$_24da[14]),_$_24da[3]),f[0].toUpperCase()==k.toUpperCase()&&(f[0]=n,0<=f[0].indexOf(_$_24da[163])&&(f[0]=_$_24da[164]+f[0]+_$_24da[164]),l[p]=f.join(_$_24da[19])));return l.join(_$_24da[3])};c.updateWorksheetNames=function(f,
|
|
246
|
+
k){var n,l;for(l=0;l<u.spreadsheet.length;l++){var p=u.spreadsheet[l].worksheets;for(var q=0;q<p.length;q++){var r=[];for(var w=0;w<p[q].options.data.length;w++)for(var x=0;x<p[q].options.data[w].length;x++)if((n=p[q].options.data[w][x])&&Z(n)){var y=c.updateWorksheetName(n,f,k);y!=n&&(r.push({x,y:w,value:y,force:!0}),R.call(p[q],x,w,y))}r.length&&K.call(p[q],_$_24da[138],{data:r})}}};var g=function(f,k,n){var l=_$_24da[3],p=_$_24da[3],q=f.split(_$_24da[300]);if(3===q.length)return f;2===q.length&&
|
|
247
|
+
(q[0]?(n=0,p=_$_24da[300]):(k=0,l=_$_24da[300]),f=q.join(_$_24da[3]));f=H.getCoordsFromColumnName(f);k=f[0]+k;f=f[1]+n;return f=0>k||0>f?_$_24da[251]:l+H.getColumnName(k)+p+(f+1)};c.shiftFormula=function(f,k,n){f=b(f,!0);for(var l,p,q=0;q<f.length;q++)h.test(f[q])&&(p=-1==f[q].indexOf(_$_24da[19])?[_$_24da[3],f[q]]:f[q].split(_$_24da[19]),-1==p[1].indexOf(_$_24da[166])?p[1]=g(p[1],k,n):(l=p[1].split(_$_24da[166]),p[1]=g(l[0],k,n)+_$_24da[166]+g(l[1],k,n)),f[q]=p[0]?p.join(_$_24da[19]):p[1]);return f.join(_$_24da[3])};
|
|
248
|
+
c.getTokensFromRange=function(f){var k=this,n=_$_24da[3],l=_$_24da[3];0<=f.indexOf(_$_24da[19])?l=_$_24da[19]:0<=f.indexOf(_$_24da[39])&&(l=_$_24da[39]);f=f.replace(/\$/g,_$_24da[3]);l&&(n=f.split(l),f=n.pop(),n=n.join(_$_24da[39]),k=I(n),n+=l);if(-1==f.indexOf(_$_24da[166]))return[n+f];l=[];f=f.split(_$_24da[166]);var p=H.getCoordsFromColumnName(f[0]),q=H.getCoordsFromColumnName(f[1]);if(p[0]<=q[0]){f=p[0];var r=q[0]}else f=q[0],r=p[0];if(null===p[1]&&null==q[1]){var w=0;p=0;k.options&&k.options.data&&
|
|
249
|
+
(p=k.options.data.length-1)}else p[1]<=q[1]?(w=p[1],p=q[1]):(w=q[1],p=p[1]);for(k=w;k<=p;k++)for(w=f;w<=r;w++)l.push(n+H.getColumnNameFromCoords(w,k));return l};c.getRangeFromTokens=function(f){f=f.filter(function(l){return l!=_$_24da[251]});for(var k=_$_24da[3],n=0;n<f.length;n++)0<=f[n].indexOf(_$_24da[19])?(k=f[n].split(_$_24da[19]),f[n]=k.pop(),k=k[0]+_$_24da[19]):0<=f[n].indexOf(_$_24da[39])&&(k=f[n].split(_$_24da[39]),f[n]=k.pop(),k=k.join(_$_24da[39])+_$_24da[39]);f.sort(function(l,p){l=H.getCoordsFromColumnName(l);
|
|
250
|
+
p=H.getCoordsFromColumnName(p);return l[1]>p[1]?1:l[1]<p[1]?-1:l[0]>p[0]?1:l[0]<p[0]?-1:0});return f.length?k+(f[0]+_$_24da[166]+f[f.length-1]):_$_24da[251]};c.getTokens=function(f,k){var n=a(f);f.replace(/!/g,_$_24da[39]);(f=n.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&f.length&&(n=e.call(this.parent,f,n));(f=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&f.length&&(n=d.call(this,f,n));if(f=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(n=0;n<f.length;n++)-1==
|
|
251
|
+
f[n].indexOf(_$_24da[39])&&k&&(f[n]=k+_$_24da[39]+f[n]);return f};c.setTracking=function(){var f=H.getColumnNameFromCoords(this.x,this.y);-1===this.instance.tracking.indexOf(f)&&this.instance.tracking.push(f)};c.tracking=function(f,k){for(var n=this.tracking,l=[],p=0;p<n.length;p++)k&&k[n[p]]||(f[n[p]]?l.push(f[n[p]]):l.push(n[p]));this.tracking=l;c.evaluate.call(this)};c.evaluate=function(){var f=this.tracking;if(f)for(var k=0;k<f.length;k++){var n=this.getValue(f[k]);n&&Z(n)?this.setValue(f[k],
|
|
252
|
+
n):f.splice(k,1)}};c.tokenIdentifier=h;c.tokenize=b;return c}(),qa=function(){var h=function(b){b.name=ra;b.value=R;b.getValue=h[_$_24da[56]];b.getValueFromCoords=h.getFromCoords;b.setValue=h[_$_24da[11]];b.setValueFromCoords=h.setFromCoords;b.setCheckRadioValue=h.setCheckRadio;b.getProcessed=h.processed};h[_$_24da[56]]=function(b,c){var a=this;if(typeof b==_$_24da[111]){var d=b.x;b=b.y}else 0<=b.indexOf(_$_24da[39])&&(a=b.split(_$_24da[39]),b=a.pop(),a=I(a.join(_$_24da[39]))),b=H.getCoordsFromColumnName(b),
|
|
253
|
+
d=b[0],b=b[1];return h.getFromCoords.call(a,d,b,c)};h.getFromCoords=function(b,c,a){var d=null;null!=b&&null!=c&&(d=a?h.processed.call(this,b,c):R.call(this,b,c));return d};h[_$_24da[11]]=function(b,c,a){if(!T.call(this.parent,this))return!1;var d=null,e=null,g=null,f=[];a=a?!0:!1;var k=function(p,q){var r=null;typeof p==_$_24da[25]?(g=H.getCoordsFromColumnName(p),d=g[0],e=g[1]):p.tagName?(d=p.getAttribute(_$_24da[65]),e=p.getAttribute(_$_24da[60])):p.element&&p.element.tagName?(d=p.element.getAttribute(_$_24da[65]),
|
|
254
|
+
e=p.element.getAttribute(_$_24da[60])):(d=p.x,e=p.y,void 0!==p.value&&(q=p.value),void 0!==p.style&&(r=p.style));p={x:d,y:e,value:q,force:a};null!==r&&(p.style=r);f.push(p)};if(b&&Array.isArray(b))for(var n=0;n<b.length;n++)k(b[n],c);else if(typeof b==_$_24da[111]&&void 0==b.x&&void 0==b.tagName)for(c=Object.keys(b),n=0;n<c.length;n++)k(c[n],b[c[n]]);else k(b,c);if(f.length){f=h.applyValues.call(this,f);this.parent.config.parseFormulas&&h.setValueChained.call(this,f);this.refreshBorders();var l=this;
|
|
255
|
+
setTimeout(function(){da.refresh.call(l)},250);if(f.length){Q.call(this.parent,{worksheet:l,action:_$_24da[99],records:f,selection:this.selectedCell});b=this.getPrimaryKey();if(!1!==b)for(n=0;n<f.length;n++)f[n].x===b&&f[n].value&&P.call(this,f[n]);K.call(this,_$_24da[99],{data:f});ha.update.call(this,!0);G.call(this.parent,_$_24da[302],this,f)}}};h.setFromCoords=function(b,c,a,d){var e=[];e.push({x:b,y:c,value:a});h[_$_24da[11]].call(this,e,null,d)};h.setCheckRadio=function(){for(var b=[],c=this.getSelected(),
|
|
256
|
+
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==_$_24da[303]){var g=R.call(this,d,e)?!1:!0;b.push({x:d,y:e,value:g})}}b.length&&h[_$_24da[11]].call(this,b)};h.applyValues=function(b){for(var c,a,d=this.options.style||{},e=[],g={},f=0;f<b.length;f++)if(c=b[f],a=this.updateCell(c.x,c.y,c.value,c.force),void 0!==a.value){if(void 0!==c.style){var k=H.getColumnNameFromCoords(c.x,c.y);a.style=g[k]=c.style;a.oldStyle=d&&d[k]?d[k]:_$_24da[239]}e.push(a)}0<
|
|
257
|
+
Object.keys(g).length&&Na.update.call(this,g);return e};h.processed=function(b,c,a){var d=R.call(this,b,c);if(null===d)return null;var e=pa[_$_24da[56]].call(this,b,c),g=e[1];if(g.type!=_$_24da[121]&&g.type!=_$_24da[304]&&g.type!=_$_24da[234]&&g.type!=_$_24da[305]&&g.type!=_$_24da[306]&&0!=g.process&&(!0===a||g.type!=_$_24da[307]&&g.type!=_$_24da[308]&&g.type!=_$_24da[309]))if(g.type==_$_24da[310]||g.type==_$_24da[303])d=e[0][_$_24da[56]](g,d,a);else{var f;(f=this.records[c][b].element)?d=1==this.parent.config.stripHTML?
|
|
258
|
+
f.innerText:f.children.length&&f.children[0].classList.contains(_$_24da[27])?f.children[0].innerHTML:f.innerHTML:((_$_24da[3]+d).substr(0,1)==_$_24da[18]&&(d=this.executeFormula(d,b,c,!1)),e[0]&&typeof e[0][_$_24da[56]]==_$_24da[112]&&(d=e[0][_$_24da[56]](g,d,a)))}return d};h.setValueChained=function(b){for(var c,a=[],d,e=0;e<b.length;e++)c=b[e],d=H.getColumnNameFromCoords(c.x,c.y),a[d]=c.value;a=Y.getChain.call(this,a);var g=[],f=Object.keys(a);for(e=0;e<f.length;e++)0<=f[e].indexOf(_$_24da[39])?
|
|
259
|
+
(c=f[e].split(_$_24da[39]),d=c.pop(),c=I(c.join(_$_24da[39]))):(d=f[e],c=this),d=H.getCoordsFromColumnName(d),b=U.update.call(c,d[0],d[1],a[f[e]],!0),b.w=c,b.value=b.v=c.records[d[1]][d[0]].v,b.cell=f[e],b.f=a[f[e]],g.push(b);g.length&&G.call(this.parent,_$_24da[311],this,g)};return h}(),U=function(){var h=function(b){b.getCell=h[_$_24da[56]];b.getCellFromCoords=h[_$_24da[56]];b.updateCell=h.update;b.updateCells=h.updateAll;b.getSelected=h.selected;b.isAttached=h.attached};h.attached=function(b,c){return this.records[c]&&
|
|
260
|
+
this.records[c][b]&&this.records[c][b].element&&this.records[c][b].element.parentNode&&this.records[c][b].element.parentNode.parentNode?!0:!1};h[_$_24da[56]]=function(b,c){typeof b==_$_24da[25]&&(c=H.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 a=R.call(this,b,c);null===a&&(a=_$_24da[3]);return U.create.call(this,b,c,a)};h.getFromCoords=function(b,c,a){if(!b||null===b[0])return null;
|
|
261
261
|
var d=[],e=b[0],g=b[1],f=b[2];b=b[3];for(a&&(a=this.results?H.invert(this.results):null);g<=b;g++)for(var k=e;k<=f;k++)if(!a||a[g])c?d.push(H.getColumnNameFromCoords(k,g)):d.push(this.records[g][k]);return d};h.selected=function(b,c){return h.getFromCoords.call(this,this.getHighlighted(),b,c)};h.getSelectedColumns=function(){var b=[],c=this.getHighlighted();if(c)for(var a=c[0];a<=c[2];a++)b.push(a);return b};h.updateAll=function(b){for(var c=this.getPrimaryKey(),a=[],d=0;d<b.length;d++)void 0!==b[d].id?
|
|
262
|
-
(P.call(this,b[d]),a.push({id:b[d].id,y:b[d].y}),!1!==c&&h.update.call(this,c,b[d].y,b[d].id,!0)):a.push(h.update.call(this,b[d].x,b[d].y,b[d].value,b[d].force));
|
|
263
|
-
d[0].updateCell(e,a,b,c,this,d[1]);void 0!==f&&(a=f)}f=
|
|
264
|
-
_$
|
|
265
|
-
b==_$
|
|
266
|
-
c,a){var d=H.getColumnNameFromCoords(c,a),e=this.options.columns,g=this.options.style,f=this.options.comments,k=this.options.cells,n=this.options.rows,l=null,p=!1;e[c]&&(e[c].readonly||e[c].readOnly)&&(p=!0);n&&n[a]&&(n[a].readonly||n[a].readOnly)&&(p=!0);b.classList.contains(_$
|
|
267
|
-
if(k&&k[d])if(!1===k[d].locked&&!0===this.options.selectUnLockedCells?b.classList.add(_$
|
|
268
|
-
b.style.textAlign||(g=null,k&&k[d]&&k[d].align?g=k[d].align:e&&e[c].align&&(g=e[c].align),g&&(b.style.textAlign=g));void 0==this.records[a][c].readonly&&p&&(this.records[a][c].readonly=p);this.records[a][c].readonly?b.classList.add(_$
|
|
269
|
-
this.options.data[a][c]==_$
|
|
270
|
-
|
|
271
|
-
this))return!1;if(typeof c==_$
|
|
272
|
-
f&&(e&&typeof e.destroyCell==_$
|
|
273
|
-
_$
|
|
274
|
-
(a.type=_$
|
|
275
|
-
{worksheet:this,action:_$
|
|
276
|
-
p=Object.keys(n.value);for(var q=0;q<p.length;q++)c[p[q]]=n.value[p[q]];l||typeof k===_$
|
|
277
|
-
_$
|
|
278
|
-
!0),d.visible!=c&&(d.element&&(d.element.style.display=e,c||(d.element.remove(),-1!==this.visibleRows.indexOf(a)&&this.visibleRows.splice(a,1))),d.visible=c,f.push(a));if(f.length)return J.call(this,!0),c||this.resetSelection(),this.refreshBorders(),f};h.setVisibility=function(b,c){if(b=h.visibility.call(this,b,c))Q.call(this.parent,{worksheet:this,action:c?_$
|
|
279
|
-
0,a=this.rows,d=this.options.rows||{};a[b]&&!1!==a[b].visible&&(c=a[b].height?a[b].height:d[b]&&d[b].height?parseInt(d[b].height):a[b].element&&a[b].element.offsetHeight?a[b].element.offsetHeight:this.options.defaultRowHeight||u.defaultRowHeight||24);a[b].height||(a[b].height=c);return c};h[_$
|
|
280
|
-
a[1];d<=a[3];d++)this.rows[d]&&(b?c.push(d):c.push(this.rows[d].element));return c};h.create=function(b,c){if(this.rows[b]&&this.rows[b].element)return this.rows[b].element;this.rows[b]||
|
|
281
|
-
e[b].id),e[b].group&&(this.rows[b].group=e[b].group,this.rows[b].state=!!e[b].state));!a.style.height&&this.options.defaultRowHeight&&(a.style.height=parseInt(this.options.defaultRowHeight)+_$
|
|
282
|
-
function(b,c){if(!T.call(this.parent,this))return!1;b=parseInt(b);c=parseInt(c);if(!this.rows[c]||!this.rows[b])return console.error(_$
|
|
283
|
-
this.tbody.insertBefore(a,this.rows[c].element.nextSibling)):aa.attached.call(this,b)&&this.tbody.removeChild(this.rows[b].element);this.rows.splice(c,0,this.rows.splice(b,1)[0]);this.records.splice(c,0,this.records.splice(b,1)[0]);this.options.data.splice(c,0,this.options.data.splice(b,1)[0]);
|
|
284
|
-
this,b,c)};h.add=function(b,c,a,d,e){if(!T.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$
|
|
285
|
-
n,l=0,p=[],q=[],r=this.rows.splice(b),w=this.options.data?this.options.data.splice(b):[],x=this.records.splice(b),y=b;y<f+b;y++){var B=d[l]&&d[l].id?d[l].id:
|
|
286
|
-
this.rows.concat(r);this.records=this.records.concat(x);Array.prototype.push.apply(this.options.data,w);for(y=b;y<f+b;y++)this.results&&(this.rows[y].results=!0),p.push(this.records[y]);this.merged.rows[b]&&
|
|
287
|
-
!0,!0);e||
|
|
288
|
-
0>b)b=e;c||(c=1);b+c>=this.options.data.length&&(c=this.options.data.length-b,c>=this.options.data.length&&(c=this.options.data.length,this.resetSelection()));if(!1===G.call(this.parent,_$
|
|
289
|
-
_$
|
|
290
|
-
c);
|
|
291
|
-
h[_$
|
|
292
|
-
c&&(this.colgroup[a]&&(e=c?parseInt(d.width||this.options.defaultColWidth):_$
|
|
262
|
+
(P.call(this,b[d]),a.push({id:b[d].id,y:b[d].y}),!1!==c&&h.update.call(this,c,b[d].y,b[d].id,!0)):a.push(h.update.call(this,b[d].x,b[d].y,b[d].value,b[d].force));K.call(this,_$_24da[137],[a])};h.update=function(b,c,a,d){var e=this.records[c];if(e=e&&e[b]?e[b]:null){e=e.element;var g={x:b,y:c};if(d||!e||1!=e.classList.contains(_$_24da[26])){d=G.call(this.parent,_$_24da[312],this,e,b,c,a);if(!1===d)return g;void 0!==d&&(a=d);d=pa[_$_24da[56]].call(this,b,c);if(typeof d[0].updateCell==_$_24da[112]){var f=
|
|
263
|
+
d[0].updateCell(e,a,b,c,this,d[1]);void 0!==f&&(a=f)}f=R.call(this,b,c);if(f!==a){var k=R.call(this,b,c,a);g.oldValue=f;g.value=k;e&&h.applyOverflow.call(this,e,b,c);d[1]&&typeof d[1].render==_$_24da[112]&&d[1].render(e,a,b,c,this,d[1]);G.call(this.parent,_$_24da[313],this,e,b,c,g.value,g.oldValue)}}}else return!1;return g};h.create=function(b,c,a){var d=document.createElement(_$_24da[186]);d.setAttribute(_$_24da[65],b);d.setAttribute(_$_24da[60],c);var e=pa[_$_24da[56]].call(this,b,c);if(e[0]&&typeof e[0].createCell==
|
|
264
|
+
_$_24da[112]){var g=e[0].createCell(d,a,b,c,this,e[1]);void 0!==g&&(a=g)}R.call(this,b,c,a);this.records[c][b]||va.cell.call(this,b,c,a);this.records[c][b].element=d;!a&&this.records[c][b].v&&(d.innerText=this.records[c][b].v);e[1]&&typeof e[1].render==_$_24da[112]&&e[1].render(d,a,b,c,this,e[1]);h.applyProperties.call(this,d,b,c);h.applyOverflow.call(this,d,b,c);G.call(this.parent,_$_24da[314],this,d,b,c,a);return d};h.getAttributes=function(b,c,a){a[b]||(a[b]={});b==_$_24da[315]?a[b][c]=this.getValue(c):
|
|
265
|
+
b==_$_24da[316]?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])};h.setAttributes=function(b){b&&b.style&&this.setStyle(b.style);b&&b.comments&&this.setComments(b.comments);b&&b.meta&&this.setMeta(b.meta);b&&b.cells&&this.setProperty(b.cells);b&&b.mergeCells&&this.setMerge(b.mergeCells);b&&b.values&&h.batch.call(this,b.values);b&&b.formulas&&h.batch.call(this,b.formulas,!0)};h.applyProperties=function(b,
|
|
266
|
+
c,a){var d=H.getColumnNameFromCoords(c,a),e=this.options.columns,g=this.options.style,f=this.options.comments,k=this.options.cells,n=this.options.rows,l=null,p=!1;e[c]&&(e[c].readonly||e[c].readOnly)&&(p=!0);n&&n[a]&&(n[a].readonly||n[a].readOnly)&&(p=!0);b.classList.contains(_$_24da[26])&&(p=!0);if(g&&g[d]){var q=(q=b.getAttribute(_$_24da[129]))?q+(_$_24da[264]+g[d]):g[d];b.setAttribute(_$_24da[129],q)}f&&f[d]&&(typeof f[d]===_$_24da[25]?b.setAttribute(_$_24da[317],f[d]):b.classList.add(_$_24da[318]));
|
|
267
|
+
if(k&&k[d])if(!1===k[d].locked&&!0===this.options.selectUnLockedCells?b.classList.add(_$_24da[319]):b.classList.remove(_$_24da[319]),k[d].zebra?b.classList.add(_$_24da[320]):b.classList.remove(_$_24da[320]),typeof k[d].wrap!==_$_24da[21]&&((l=k[d].wrap)?b.classList.add(_$_24da[321]):b.classList.remove(_$_24da[321])),!0===k[d].readonly||!0===k[d].readOnly)p=!0;else if(!1===k[d].readonly||!1===k[d].readOnly)p=!1;null===l&&(e[c]&&e[c].wrap?b.classList.add(_$_24da[321]):b.classList.remove(_$_24da[321]));
|
|
268
|
+
b.style.textAlign||(g=null,k&&k[d]&&k[d].align?g=k[d].align:e&&e[c].align&&(g=e[c].align),g&&(b.style.textAlign=g));void 0==this.records[a][c].readonly&&p&&(this.records[a][c].readonly=p);this.records[a][c].readonly?b.classList.add(_$_24da[26]):b.classList.remove(_$_24da[26])};h.applyOverflow=function(b,c,a){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-1&&(b.style.overflow=_$_24da[121]),this.records[a][c-1]&&this.records[a][c-1].element&&(this.records[a][c-1].element.style.overflow=
|
|
269
|
+
this.options.data[a][c]==_$_24da[3]&&this.headers[c-1]&&this.headers[c-1].offsetWidth?_$_24da[3]:_$_24da[121]))};h.batch=function(b,c){var a=[],d=Object.keys(b);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_24da[39])){var g=d[e].split(_$_24da[39]);var f=I(g[0]);var k=g[1];g=g[0]}else f=this,k=d[e],g=this.getWorksheetName();k=H.getCoordsFromColumnName(k);k=f.updateCell(k[0],k[1],b[d[e]],!0);a[g]||(a[g]=[]);a[g].push(k)}if(1==c&&(d=Object.keys(a),d.length))for(e=0;e<d.length;e++)f=I(d[e]),
|
|
270
|
+
K.call(f,_$_24da[138],a[d[e]])};return h}(),Ma=function(){var h=function(c){c.getColumnOptions=h[_$_24da[56]];c.setColumnOptions=h[_$_24da[11]];c.getCells=h.getCells;c.setCells=h.setCells;c.getProperties=h[_$_24da[56]];c.setProperties=h[_$_24da[11]];c.getProperty=h[_$_24da[56]];c.setProperty=h[_$_24da[11]];c.resetProperty=h[_$_24da[11]];c.updateProperty=h.update;c.getOptions=h[_$_24da[56]]};h.getCells=function(c){return c?this.options.cells[c]:this.options.cells};h.setCells=function(c,a){if(!T.call(this.parent,
|
|
271
|
+
this))return!1;if(typeof c==_$_24da[25])this.options.cells[c]=a;else{a=Object.keys(c);for(var d=0;d<a.length;d++)this.options.cells[a[d]]=c[a[d]]}};h[_$_24da[56]]=function(c,a){var d=null;void 0!==a&&(a=H.getColumnNameFromCoords(c,a),this.options.cells.hasOwnProperty(a)&&(d=this.options.cells[a]));d||(d=this.options.columns[c]);if(!d)d={type:_$_24da[71]};else if(!d.type||typeof d.type==_$_24da[25]&&!u.editors[d.type])d.type=_$_24da[71];return d};var b=function(c,a,d,e,g){var f=this.records[a][c].element;
|
|
272
|
+
f&&(e&&typeof e.destroyCell==_$_24da[112]&&e.destroyCell(f,c,a,this),d&&typeof d.createCell==_$_24da[112]&&(e=R.call(this,c,a),e=d.createCell(f,e,c,a,this,g),void 0!==e&&R.call(this,c,a,e),U.applyProperties.call(this,f,c,a)))};h[_$_24da[11]]=function(c,a,d){if(!T.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var e=[];if(Array.isArray(c))e=c;else if(jSuites.isNumeric(c)&&jSuites.isNumeric(a))c={x:c,y:a},typeof d==_$_24da[111]&&(c.value=d),e.push(c);else if(typeof a===
|
|
273
|
+
_$_24da[111])c={x:c,value:a},e.push(c);else if(typeof c==_$_24da[111]&&void 0===a)for(a=Object.keys(c),d=0;d<a.length;d++){var g=H.getCoordsFromColumnName(a[d]);e.push({x:g[0],y:g[1],value:c[a[d]]})}if(Array.isArray(e))for(d=0;d<e.length;d++){var f=e[d];c=f.x;var k=f.y,n=h[_$_24da[56]].call(this,c,k);a=f.value;g=u.editors[n.type];var l=null;a&&a.type&&(l=u.editors[a.type]);if(typeof k===_$_24da[21])for(f.oldValue=n,parseInt(a.width)||(a.width=this.options.defaultColWidth||100),a.type&&u.editors[a.type]||
|
|
274
|
+
(a.type=_$_24da[71]),this.options.columns[c]=a,Fa.applyProperties.call(this,c),f=0;f<this.records.length;f++)b.call(this,c,f,l,g,a);else n=H.getColumnNameFromCoords(c,k),f.oldValue=this.options.cells&&this.options.cells[n]?this.options.cells[n]:_$_24da[3],a?(this.options.cells||(this.options.cells={}),this.options.cells[n]=a):(delete this.options.cells[n],a=h[_$_24da[56]].call(this,c,k),l=u.editors[a.type]),b.call(this,c,k,l,g,a)}else return console.error(_$_24da[301]),!1;this.refreshBorders();Q.call(this.parent,
|
|
275
|
+
{worksheet:this,action:_$_24da[100],records:e});K.call(this,_$_24da[100],{data:e});G.call(this.parent,_$_24da[322],this,e);return!0};h.update=function(c,a,d,e){a=typeof c==_$_24da[25]||typeof c==_$_24da[22]?[{x:c,y:a,value:d}]:c;d=JSON.parse(JSON.stringify(a));if(Array.isArray(a))for(var g=0;g<a.length;g++){var f=a[g].x,k=a[g].y,n=a[g],l=e,p=H.getColumnNameFromCoords(f,k);(c=this.options.cells[p])?n.oldValue=Object.assign({},c):(n.oldValue=null,c=this.options.cells[p]=Object.assign({},this.options.columns[f]));
|
|
276
|
+
p=Object.keys(n.value);for(var q=0;q<p.length;q++)c[p[q]]=n.value[p[q]];l||typeof k===_$_24da[21]||(l=h[_$_24da[56]].call(this,f,k),l=u.editors[l.type],n.value.type?(n=n.value,p=null,n&&n.type&&(p=u.editors[n.type]),b.call(this,f,k,p,l,c)):(n=this.records[k][f].element)&&typeof l.updateCell==_$_24da[112]&&(p=R.call(this,f,k),p=l.updateCell(n,p,f,k,this,c),void 0!==p&&R.call(this,f,k,p),U.applyProperties.call(this,n,f,k)))}Q.call(this.parent,{worksheet:this,action:_$_24da[101],records:a});K.call(this,
|
|
277
|
+
_$_24da[101],{data:d});G.call(this.parent,_$_24da[322],this,a)};return h}(),aa=function(){var h=function(b){b.getRow=h[_$_24da[56]];b.moveRow=h.move;b.insertRow=h.add;b.deleteRow=h.del;b.getSelectedRows=h.selected;b.showRow=function(c){h.setVisibility.call(b,c,!0)};b.hideRow=function(c){h.setVisibility.call(b,c,!1)}};h.visibility=function(b,c){Array.isArray(b)||(b=[b]);for(var a,d,e=c?_$_24da[3]:_$_24da[52],g=Object.keys(b),f=[],k=0;k<g.length;k++)if(a=b[g[k]],d=this.rows[a])void 0===d.visible&&(d.visible=
|
|
278
|
+
!0),d.visible!=c&&(d.element&&(d.element.style.display=e,c||(d.element.remove(),-1!==this.visibleRows.indexOf(a)&&this.visibleRows.splice(a,1))),d.visible=c,f.push(a));if(f.length)return J.call(this,!0),c||this.resetSelection(),this.refreshBorders(),f};h.setVisibility=function(b,c){if(b=h.visibility.call(this,b,c))Q.call(this.parent,{worksheet:this,action:c?_$_24da[85]:_$_24da[84],records:b}),K.call(this,c?_$_24da[85]:_$_24da[84],{data:b}),G.call(this.parent,_$_24da[323],this,c,b)};h.height=function(b){var c=
|
|
279
|
+
0,a=this.rows,d=this.options.rows||{};a[b]&&!1!==a[b].visible&&(c=a[b].height?a[b].height:d[b]&&d[b].height?parseInt(d[b].height):a[b].element&&a[b].element.offsetHeight?a[b].element.offsetHeight:this.options.defaultRowHeight||u.defaultRowHeight||24);a[b].height||(a[b].height=c);return c};h[_$_24da[56]]=function(b){return this.rows[b]};h.attached=function(b){return this.rows[b]&&this.rows[b].element&&this.rows[b].element.parentNode?!0:!1};h.selected=function(b){var c=[],a=this.getHighlighted();if(a)for(var d=
|
|
280
|
+
a[1];d<=a[3];d++)this.rows[d]&&(b?c.push(d):c.push(this.rows[d].element));return c};h.create=function(b,c){if(this.rows[b]&&this.rows[b].element)return this.rows[b].element;this.rows[b]||va.row.call(this,b);var a=document.createElement(_$_24da[184]);a.setAttribute(_$_24da[60],b);this.rows[b].element=a;var d=null,e=this.options.rows;e[b]&&!c&&(e[b].style&&a.setAttribute(_$_24da[129],e[b].style),e[b].height&&(a.style.height=parseInt(e[b].height)+_$_24da[57]),e[b].title&&(d=e[b].title),e[b].id&&(this.rows[b].id=
|
|
281
|
+
e[b].id),e[b].group&&(this.rows[b].group=e[b].group,this.rows[b].state=!!e[b].state));!a.style.height&&this.options.defaultRowHeight&&(a.style.height=parseInt(this.options.defaultRowHeight)+_$_24da[57]);0==this.rows[b].visible&&(a.style.display=_$_24da[52]);d||(d=parseInt(b+1));c=document.createElement(_$_24da[186]);c.innerHTML=d;c.setAttribute(_$_24da[60],b);c.className=_$_24da[324];a.appendChild(c);this.rows[b].group&&Ja.icon.call(this,b);G.call(this.parent,_$_24da[325],this,b,a);return a};h.move=
|
|
282
|
+
function(b,c){if(!T.call(this.parent,this))return!1;b=parseInt(b);c=parseInt(c);if(!this.rows[c]||!this.rows[b])return console.error(_$_24da[326]),!1;if(0<Object.keys(this.getMerge()).length){var a=null;this.merged.rows[b]?a=!0:this.merged.rows[c]&&(b>c?this.merged.rows[c-1]&&(a=!0):this.merged.rows[c+1]&&(a=!0));a&&this.destroyMerged()}this.rows[b].group&&Ja.reset.call(this,b);this.resetBorders();aa.attached.call(this,c)?(a=aa.create.call(this,b),b>c?this.tbody.insertBefore(a,this.rows[c].element):
|
|
283
|
+
this.tbody.insertBefore(a,this.rows[c].element.nextSibling)):aa.attached.call(this,b)&&this.tbody.removeChild(this.rows[b].element);this.rows.splice(c,0,this.rows.splice(b,1)[0]);this.records.splice(c,0,this.records.splice(b,1)[0]);this.options.data.splice(c,0,this.options.data.splice(b,1)[0]);K.call(this,_$_24da[82],{f:b,t:c});Q.call(this.parent,{worksheet:this,action:_$_24da[82],oldValue:b,newValue:c});ha.references.call(this);J.call(this,!0,!0);ha.update.call(this);G.call(this.parent,_$_24da[327],
|
|
284
|
+
this,b,c)};h.add=function(b,c,a,d,e){if(!T.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_24da[328]),!1;var g=[];if(0<b)var f=parseInt(b);else f=1,Array.isArray(b)&&!d&&(Array.isArray(b[0])?d=b:(d=[],d.push(b)));d=Ka.standardize(d);a=a?!0:!1;b=this.options.data?this.options.data.length-1:0;if(void 0==c||c>b||0>c)c=b,a=!1;f||(f=1);if(!1===G.call(this.parent,_$_24da[329],this,c,f,a))return console.log(_$_24da[330]),!1;da.reset.call(this);b=a?c:c+1;for(var k,
|
|
285
|
+
n,l=0,p=[],q=[],r=this.rows.splice(b),w=this.options.data?this.options.data.splice(b):[],x=this.records.splice(b),y=b;y<f+b;y++){var B=d[l]&&d[l].id?d[l].id:za.next.call(this);va.row.call(this,y,B);n=this.dataType?{}:[];for(var z=0;z<this.options.columns.length;z++)k=ra.call(this,z),n[k]=_$_24da[3],d&&d[l]&&d[l].data&&(typeof d[l].data[k]!==_$_24da[21]?n[k]=d[l].data[k]:typeof d[l].data[z]!==_$_24da[21]&&(n[k]=d[l].data[z])),g.push({x:z,y,value:n[k],force:!0});q.push({id:B,data:n});l++}this.rows=
|
|
286
|
+
this.rows.concat(r);this.records=this.records.concat(x);Array.prototype.push.apply(this.options.data,w);for(y=b;y<f+b;y++)this.results&&(this.rows[y].results=!0),p.push(this.records[y]);this.merged.rows[b]&&sa.updateConfig.call(this,1,1,b-1,f);K.call(this,_$_24da[78],{numOfRows:f,rowNumber:c,insertBefore:a?1:0,data:q});this.results&&(this.results=Ba.refresh.call(this));Q.call(this.parent,{worksheet:this,action:_$_24da[78],rowNumber:c,numOfRows:f,insertBefore:a,data:q});ha.references.call(this);J.call(this,
|
|
287
|
+
!0,!0);e||ka[_$_24da[11]].call(this,0,b,this.options.columns.length-1,f+b-1);g.length&&qa.applyValues.call(this,g);ha.update.call(this);G.call(this.parent,_$_24da[331],this,c,f,p,a)};h.del=function(b,c){if(!T.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_24da[332]),!1;var a={},d=[];void 0==b&&(c=this.getSelectedRows(!0),c.length?(b=parseInt(c[0]),c=parseInt(c.length)):(b=this.options.data.length-1,c=1));var e=this.options.data.length-1;if(void 0==b||b>e||
|
|
288
|
+
0>b)b=e;c||(c=1);b+c>=this.options.data.length&&(c=this.options.data.length-b,c>=this.options.data.length&&(c=this.options.data.length,this.resetSelection()));if(!1===G.call(this.parent,_$_24da[333],this,b,c))return console.log(_$_24da[334]),!1;if(-1<parseInt(b)&&0<parseInt(c)){da.reset.call(this);for(var g=b;g<b+c;g++)for(var f=0;f<this.options.columns.length;f++)e=H.getColumnNameFromCoords(f,g),U.getAttributes.call(this,_$_24da[335],e,a),U.getAttributes.call(this,_$_24da[129],e,a),U.getAttributes.call(this,
|
|
289
|
+
_$_24da[336],e,a),U.getAttributes.call(this,_$_24da[337],e,a),U.getAttributes.call(this,_$_24da[316],e,a),U.getAttributes.call(this,_$_24da[315],e,a),d[e]=!0;if(e=Y.getChain.call(this,a.values))a.formulas=e;for(g=b;g<b+c;g++)aa.attached.call(this,g)&&this.rows[g].element.remove(),this.options.rows&&this.options.rows[g]&&(this.options.rows[g]=null);e=[];for(g=b;g<b+c;g++)e.push({id:this.getRowId(g),row:g,data:this.getRowData(g)});this.rows.splice(b,c);g=this.records.splice(b,c);this.options.data.splice(b,
|
|
290
|
+
c);sa.updateConfig.call(this,1,0,b,c);this.results&&(this.results=Ba.refresh.call(this));K.call(this,_$_24da[79],{rowNumber:b,numOfRows:c,data:e});Q.call(this.parent,{worksheet:this,action:_$_24da[79],rowNumber:b,numOfRows:c,insertBefore:1,data:e,attributes:a});ha.references.call(this,d);J.call(this,!0,!0);ha.update.call(this,!0);G.call(this.parent,_$_24da[338],this,b,c,g,e,a)}};h.isVisible=function(b){var c=this.rows;return c&&!1!==c[b].visible?!0:!1};return h}(),na=function(){var h=function(b){b.getColumn=
|
|
291
|
+
h[_$_24da[56]];b.getColumnIdByName=h.getByName;b.getPrimaryKey=h.getPrimaryKey;b.getSelectedColumns=h.selected;b.moveColumn=h.move;b.insertColumn=h.add;b.deleteColumn=h.del;b.showColumn=function(c){h.setVisibility.call(b,c,!0)};b.hideColumn=function(c){h.setVisibility.call(b,c,!1)}};h.visibility=function(b,c){Array.isArray(b)||(b=[b]);for(var a,d,e,g=Object.keys(b),f=[],k=0;k<g.length;k++)a=b[g[k]],(d=this.options.columns[a])&&d.type!==_$_24da[121]&&(void 0===d.visible&&(d.visible=!0),d.visible!=
|
|
292
|
+
c&&(this.colgroup[a]&&(e=c?parseInt(d.width||this.options.defaultColWidth):_$_24da[128],this.colgroup[a].setAttribute(_$_24da[197],e)),d.visible=c,f.push(a)));if(f.length)return J.call(this,!0),c||this.resetSelection(),this.refreshBorders(),f};h.setVisibility=function(b,c){if(b=h.visibility.call(this,b,c))Q.call(this.parent,{worksheet:this,action:c?_$_24da[87]:_$_24da[86],records:b}),K.call(this,c?_$_24da[87]:_$_24da[86],{data:b}),G.call(this.parent,_$_24da[339],this,c,b)};h[_$_24da[56]]=function(b){return this.options.columns[b]||
|
|
293
293
|
!1};h.attached=function(b){return this.headers[b]&&this.headers[b].parentNode?!0:!1};h.getByName=function(b){for(var c=this.options.columns,a=0;a<c.length;a++)if(c[a].name==b)return a;return!1};h.getPrimaryKey=function(){for(var b=0;b<this.options.columns.length;b++)if(1==this.options.columns[b].primaryKey)return b;return!1};h.selected=function(){var b=[],c=this.getHighlighted();if(c)for(var a=c[0];a<=c[2];a++)b.push(a);return b};h.move=function(b,c){if(!T.call(this.parent,this))return!1;b=parseInt(b);
|
|
294
|
-
c=parseInt(c);if(!this.options.columns[b])return console.error(_$
|
|
295
|
-
null;this.headerContainer.insertBefore(this.headers[b],d);d=(b>c?this.colgroup[c]:this.colgroup[c].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[b],d);for(var e=0;e<this.tbody.children.length;e++)a=this.tbody.children[e].getAttribute(_$
|
|
296
|
-
this.footers.content[e][c].element.nextSibling)||null,this.tfoot.children[e].insertBefore(
|
|
294
|
+
c=parseInt(c);if(!this.options.columns[b])return console.error(_$_24da[340]),!1;if(!this.options.columns[c])return console.error(_$_24da[341]),!1;if(0<Object.keys(this.getMerge()).length){var a=null;this.merged.cols[b]?a=!0:this.merged.cols[c]&&(b>c?this.merged.cols[c-1]&&(a=!0):this.merged.cols[c+1]&&(a=!0));a&&this.destroyMerged()}da.reset.call(this);this.options.freezeColumns&&ea.applyReset.call(this);if(na.attached.call(this,c)){Fa.create.call(this,b);var d=(b>c?this.headers[c]:this.headers[c].nextSibling)||
|
|
295
|
+
null;this.headerContainer.insertBefore(this.headers[b],d);d=(b>c?this.colgroup[c]:this.colgroup[c].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[b],d);for(var e=0;e<this.tbody.children.length;e++)a=this.tbody.children[e].getAttribute(_$_24da[60]),d=(b>c?this.records[a][c].element:this.records[a][c].element.nextSibling)||null,this.tbody.children[e].insertBefore(U[_$_24da[56]].call(this,b,a),d);if(this.options.footers)for(e=0;e<this.tfoot.children.length;e++)d=(b>c?this.footers.content[e][c].element:
|
|
296
|
+
this.footers.content[e][c].element.nextSibling)||null,this.tfoot.children[e].insertBefore(ia.create.call(this,b,e),d)}else if(na.attached.call(this,b)){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(e=0;e<this.tbody.children.length;e++)a=parseInt(this.tbody.children[e].getAttribute(_$_24da[60])),this.tbody.children[e].removeChild(this.records[a][b].element);if(this.options.footers)for(e=0;e<this.tfoot.children.length;e++)this.tfoot.children[e].removeChild(this.footers.content[e][b].element)}this.options.columns.splice(c,
|
|
297
297
|
0,this.options.columns.splice(b,1)[0]);this.headers.splice(c,0,this.headers.splice(b,1)[0]);this.colgroup.splice(c,0,this.colgroup.splice(b,1)[0]);for(e=0;e<this.rows.length;e++)this.dataType||this.options.data[e].splice(c,0,this.options.data[e].splice(b,1)[0]),this.records[e].splice(c,0,this.records[e].splice(b,1)[0]);if(this.options.footers)for(e=0;e<this.options.footers.length;e++)this.options.footers[e].splice(c,0,this.options.footers[e].splice(b,1)[0]),this.footers.content[e].splice(c,0,this.footers.content[e].splice(b,
|
|
298
|
-
1)[0]);
|
|
299
|
-
[b[l]]}e||(e=[]);a=a?!0:!1;b=this.options.columns.length-1;if(void 0==c||c>b||0>c)c=b,a=!1;n||(n=1);if(!1===G.call(this.parent,_$
|
|
300
|
-
d[l].source||(d[l].source=[]),1==this.dataType&&typeof d[l].name==_$
|
|
301
|
-
r=this.records[w].splice(p);g=0;for(b=p;b<n+p;b++)l=e[w]&&e[w][g]?e[w][g]:_$
|
|
302
|
-
insertBefore:a,properties:d,data:e});
|
|
303
|
-
(b=this.options.columns.length-1,c=1));var e=this.options.columns.length-1;if(void 0==b||b>e||0>b)b=e;c||(c=1);b+c>=this.options.columns.length&&(c=this.options.columns.length-b,c>=this.options.columns.length&&(c--,console.error(_$
|
|
304
|
-
this.headers[l].parentNode.removeChild(this.headers[l])),k[n]=this.options.columns[l],n++;for(var p=0;p<this.options.data.length;p++)for(l=b;l<b+c;l++)n=H.getColumnNameFromCoords(l,p),U.getAttributes.call(this,_$
|
|
305
|
-
this.records[p][l].element)&&this.records[p][l].element.parentNode.removeChild(this.records[p][l].element);if(l=Y.getChain.call(this,a.values))a.formulas=l;this.options.columns.splice(b,c);this.headers.splice(b,c);this.colgroup.splice(b,c);for(p=0;p<this.options.data.length;p++)this.dataType||(f[p]=this.options.data[p].splice(b,c)),g[p]=this.records[p].splice(b,c);
|
|
306
|
-
numOfColumns:c});Q.call(this.parent,{worksheet:this,action:_$
|
|
307
|
-
_$
|
|
308
|
-
f)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$
|
|
309
|
-
a.getFromSelection=function(d){var e,g,f=this.options.style,k=0,n=[];for(g=d[1];g<=d[3];g++){var l=0;n[k]=[];for(e=d[0];e<=d[2];e++){var p=H.getColumnNameFromCoords(e,g);n[k][l++]=f&&f[p]?f[p]:_$
|
|
310
|
-
l[z].trim()&&(n=l[z].split(_$
|
|
311
|
-
d.length)for(var r=0;r<d.length;r++){var w=H.getColumnNameFromCoords(d[r].x,d[r].y);p.call(this,w,e,g)}}else for(g=Object.keys(d),r=0;r<g.length;r++)if(w=d[g[r]])for(typeof w==_$
|
|
312
|
-
_$
|
|
313
|
-
0;e<d.length;e++)c.call(this,d[e]);else c.call(this,d);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$
|
|
314
|
-
this.records[f][k].element&&(this.records[f][k].element.setAttribute(_$
|
|
315
|
-
function(b){b.getComments=h[_$
|
|
316
|
-
0;e<d.length;e++){var g=H.getCoordsFromColumnName(d[e]);this.records[g[1]]&&this.records[g[1]][g[0]]&&(b[d[e]]=this.options.comments[d[e]]||_$
|
|
317
|
-
_$
|
|
318
|
-
{};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]]),g=0;g<e.length;g++)this.options.meta[c[d]][e[g]]=b[c[d]][e[g]],a[c[d]][e[g]]=b[c[d]][e[g]]}Object.keys(a).length&&(
|
|
319
|
-
{},this.options.meta=b;
|
|
320
|
-
g,f=[],k=0;k<this.options.data.length;k++)e=
|
|
321
|
-
b,c,a))a=k;else if(!1===k)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(E(_$
|
|
322
|
-
h.update.call(this,a);h.arrow.call(this,b,c,d);
|
|
323
|
-
null):
|
|
324
|
-
0]}return null};return h}(),
|
|
325
|
-
_$
|
|
326
|
-
return!1};h.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$
|
|
327
|
-
typeof c==_$
|
|
328
|
-
document.createElement(_$
|
|
329
|
-
E(_$
|
|
330
|
-
d+=parseInt(this.rows[e].element.offsetHeight)}};h.headers=function(){var b=this.thead.offsetHeight,c;if(c=this.options.freezeRows)for(var a=0;a<c;a++)this.rows[a]&&this.rows[a].element&&(this.rows[a].element.firstChild.classList.add(_$
|
|
331
|
-
this.visibleCols[b])}};h[_$
|
|
332
|
-
0)};h.getHeight=function(b){b=b?0:this.thead.offsetHeight;if(0<this.options.freezeRows)for(var c=0;c<this.options.freezeRows;c++)b+=parseInt(aa.height.call(this,c));return b};h.applyReset=function(){for(var b,c=0;c<this.options.freezeRows;c++)if(this.rows[c].element){this.rows[c].element.firstChild.classList.remove(_$
|
|
333
|
-
_$
|
|
334
|
-
b.target.getAttribute(_$
|
|
335
|
-
0;b<this.rows.length;b++)this.rows[b].element&&h.update.call(this,b)}};h.update=function(b){var c,a;if(a=this.options.freezeColumns){var d=
|
|
336
|
-
this.headers[a].style.left=b+_$
|
|
337
|
-
h[_$
|
|
338
|
-
function(){for(var b,c=1;c<=this.options.freezeColumns;c++){if(b=this.thead.lastChild)b.children[c].classList.remove(_$
|
|
339
|
-
function(b){b=b?0:
|
|
340
|
-
h.end=function(b){b=h.event;null!==b.d&&this.setFreezeColumns(b.d);this.parent.helper.style.display=_$
|
|
341
|
-
return h}(),
|
|
342
|
-
for(g=this.options.columns.length-1;0<=g;g--){e=!1;for(d=0;d<this.rows.length;d++)
|
|
343
|
-
document.createElement(_$
|
|
344
|
-
d.classList.add(_$
|
|
345
|
-
this.table.setAttribute(_$
|
|
346
|
-
this.table.classList.add(_$
|
|
347
|
-
this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$
|
|
348
|
-
(this.content.style.height=parseInt(this.options.tableHeight)+_$
|
|
349
|
-
this.headers[g])k=f.getAttribute(_$
|
|
350
|
-
k=f.x;n=f.y;k!=r&&(f.x=r,f.element&&f.element.setAttribute(_$
|
|
351
|
-
g,l);e=Object.fromEntries(e);h.call(this,_$
|
|
352
|
-
_$
|
|
353
|
-
b.spreadsheet=a;b.jspreadsheet=b.jexcel=a.worksheets;u.spreadsheet.push(a);a.name||(a.name=jSuites.guid());h.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$
|
|
354
|
-
!0)};d.onchangeposition=function(g,f,k){a.updateWorksheet(f,k)};jSuites.tabs(b,d);b.classList.add(_$
|
|
355
|
-
a.loading.classList.add(_$
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
parseInt(this.options.freezeRows));this.options.style||(this.options.style={});var d=this.options.worksheetName;I(d)&&console.log(_$
|
|
360
|
-
!J.limited.call(this)&&!this.options.pagination&&console.error(_$
|
|
361
|
-
c,b)},cell:function(b,c,a){typeof a==_$
|
|
362
|
-
window:b).removeEventListener(c[a],
|
|
363
|
-
0;d<a.length;d++)c.push(a[d].width)}else c=a[c].width;return c};var b=function(c,a){this.options.columns[c].width=a;this.colgroup[c]&&this.colgroup[c].setAttribute(_$
|
|
364
|
-
(d=this.options.columns[c].width),b.call(this,c,a);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$
|
|
365
|
-
aa.height.call(this,c);return c};var b=function(c,a){a=parseInt(a);var d=aa.height.call(this,c);this.rows[c].element&&(this.rows[c].element.style.height=a+_$
|
|
366
|
-
!1;if(a){if(Array.isArray(c))for(!0===g&&(d=[]),e=0;e<c.length;e++){var f=Array.isArray(a)&&a[e]?a[e]:a;b.call(this,c[e],f);1==g&&d.push(g)}else e=b.call(this,c,a),1==g&&(d=e);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$
|
|
367
|
-
f.element.innerHTML=f.value;var n=document.createElement(_$
|
|
368
|
-
this.options.columns[f];Array.isArray(k)&&0<k.length?(n&&n.classList.add(_$
|
|
369
|
-
f=n.left-k.left;var l=n.top-k.top+n.height;n=this.parent.filter;k=k.left+k.width;n.style.display=_$
|
|
370
|
-
_$
|
|
371
|
-
this.parent.filter.children[1];if(1==f.selectAll.firstChild.checked&&e.length==Object.keys(a).length)f=null;else{f=1==f.currentSelection.firstChild.checked?this.options.columns[b].filters||[]:[];for(var k=0;k<e.length;k++)a[e[k]].selected&&f.push(e[k])}g[_$
|
|
372
|
-
function(f){for(var k=this.options.columns,n=[],l=0;l<this.options.data.length;l++){for(var p=!0,q=0;q<k.length;q++)if(k[q].filters&&f!==q){var r=_$
|
|
373
|
-
n=G.call(this.parent,_$
|
|
374
|
-
[];f=new RegExp(f,_$
|
|
375
|
-
d=0;l<e.length;l++)200>l&&(f=d++,k.appendChild(h(f)))};g.build=function(){var f=document.createElement(_$
|
|
376
|
-
var n=document.createElement(_$
|
|
377
|
-
q=1;q<this.parentNode.children.length;q++)this.parentNode.children[q].children[0].checked=p;if(1==p)for(q=0;q<e.length;q++)a[e[q]].selected=!0;else for(p=Object.keys(a),q=0;q<p.length;q++)a[p[q]].selected=!1};jSuites.lazyLoading(f,{loadDown:function(p){for(p=0;d<e.length-1&&10>p;){var q=d++;f.appendChild(h(q));p++}}});return l};g.updateDOM=function(f,k,n){var l=this.headers,p=function(q){1==k?l[q].classList.add(_$
|
|
378
|
-
1==n&&l[q].classList.remove(_$
|
|
379
|
-
(e.push(b[a]),this.merged.rows[b[a]]&&(d=
|
|
380
|
-
return b};return h}(),
|
|
381
|
-
k.innerHTML=e.options.paginationOptions[f];e.paginationDropdown.appendChild(k)}e.paginationDropdown.value=e.options.pagination;g.appendChild(document.createTextNode(E(_$
|
|
382
|
-
500)},a=function(e,g){for(var f,k=0;k<this.options.columns.length;k++){f=_$
|
|
383
|
-
0;g=
|
|
384
|
-
d.update=function(e){c.call(this,!0);
|
|
385
|
-
function(){J.update.call(this);
|
|
386
|
-
var e=this.searchContainer,g=e.appendChild,f=document.createElement(_$
|
|
387
|
-
b.contextmenu.className=_$
|
|
388
|
-
_$
|
|
389
|
-
k.push({title:E(_$
|
|
390
|
-
k.push({title:E(_$
|
|
391
|
-
k.push({title:E(_$
|
|
392
|
-
onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(k.push({type:_$
|
|
393
|
-
b.options.allowInsertRow&&(k.push({title:E(_$
|
|
394
|
-
k.push({type:_$
|
|
395
|
-
onclick:function(){b.showRow(b.getSelectedRows(!0));b.showColumn(b.getSelectedColumns())}}),k.push({type:_$
|
|
396
|
-
b.refreshToolbar=function(){h.update.call(b.parent,b,b.selectedCell)}};h[_$
|
|
397
|
-
return b};h.show=function(){this.toolbar.innerHTML||h.build.call(this);this.toolbar.style.display=_$
|
|
398
|
-
h[_$
|
|
399
|
-
u.current.getSelected(!1,!0))&&u.current.setStyle(f,g.k,n)},onopen:function(k){var n;u.current.cursor?(n=u.current.cursor.style[g.k])?k.color.select(k.color.toHex(n)):k.color.select(_$
|
|
400
|
-
this;b=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[b])};h.item=function(b){this.isEditable()?b.classList.remove(_$
|
|
401
|
-
width:_$
|
|
402
|
-
_$
|
|
403
|
-
g)}});c.push({type:_$
|
|
404
|
-
g.picker.setValue(d));h.item.call(f,g)}});c.push({type:_$
|
|
405
|
-
|
|
406
|
-
d.length&&(e=u.helpers.getColumnNameFromCoords(d[0],d[1]),u.current.records[d[1]][d[0]].merged?u.current.removeMerge(e):u.current.setMerge(e,d[2]-d[0]+1,d[3]-d[1]+1))},tooltip:E(_$
|
|
407
|
-
g,f,k){if(d=u.current.getHighlighted()){g=e.thickness||1;e=e.color||_$
|
|
408
|
-
f!=_$
|
|
409
|
-
e+_$
|
|
410
|
-
jSuites.picker(f,{type:_$
|
|
411
|
-
_$
|
|
412
|
-
tooltip:_$
|
|
298
|
+
1)[0]);K.call(this,_$_24da[83],{f:b,t:c});Q.call(this.parent,{worksheet:this,action:_$_24da[83],oldValue:b,newValue:c});ha.references.call(this);J.call(this,!0,!0);ha.update.call(this);G.call(this.parent,_$_24da[342],this,b,c)};h.add=function(b,c,a,d,e,g,f){if(!T.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_24da[343]),!1;var k=[];if(0<b)var n=parseInt(b);else if(n=1,Array.isArray(b)&&!e)if(Array.isArray(b[0]))e=b;else{e=[];for(var l=0;l<b.length;l++)e[l]=
|
|
299
|
+
[b[l]]}e||(e=[]);a=a?!0:!1;b=this.options.columns.length-1;if(void 0==c||c>b||0>c)c=b,a=!1;n||(n=1);if(!1===G.call(this.parent,_$_24da[344],this,c,n,a))return console.log(_$_24da[345]),!1;da.reset.call(this);this.options.freezeColumns&&ea.applyReset.call(this);if(1==this.dataType)var p=parseInt((_$_24da[3]+Date.now()).substr(-8));d||(d=[]);for(l=0;l<n;l++)d[l]||(d[l]={}),d[l].type||(d[l].type=_$_24da[71]),d[l].width||(d[l].width=this.options.defaultColWidth),d[l].type!=_$_24da[73]&&d[l].type!=_$_24da[346]||
|
|
300
|
+
d[l].source||(d[l].source=[]),1==this.dataType&&typeof d[l].name==_$_24da[21]&&(d[l].name=_$_24da[347]+(p+l));p=a?c:c+1;this.options.columns=H.injectArray(this.options.columns,p,d);l=this.headers.splice(p);var q=this.colgroup.splice(p);for(b=p;b<n+p;b++)Fa.create.call(this,b);this.headers=this.headers.concat(l);this.colgroup=this.colgroup.concat(q);ia.adjust.call(this,p,n,1);Aa.adjust.call(this,c,n,1,g);q=null;for(var r,w=0;w<this.options.data.length;w++){this.dataType||(q=this.options.data[w].splice(p));
|
|
301
|
+
r=this.records[w].splice(p);g=0;for(b=p;b<n+p;b++)l=e[w]&&e[w][g]?e[w][g]:_$_24da[3],R.call(this,b,w,l),k.push({x:b,y:w,value:l}),va.cell.call(this,b,w),g++;this.dataType||(this.options.data[w]=this.options.data[w].concat(q));this.records[w]=this.records[w].concat(r)}this.merged.cols[p]&&sa.updateConfig.call(this,0,1,p-1,n);K.call(this,_$_24da[80],{numOfColumns:n,columnNumber:c,insertBefore:a?1:0,properties:d,data:e});Q.call(this.parent,{worksheet:this,action:_$_24da[80],columnNumber:c,numOfColumns:n,
|
|
302
|
+
insertBefore:a,properties:d,data:e});ha.references.call(this);J.call(this,!0,!0);f||ka[_$_24da[11]].call(this,p,0,n+p-1,this.rows.length-1);k.length&&qa.applyValues.call(this,k);ha.update.call(this);G.call(this.parent,_$_24da[348],this,c,n,[],a)};h.del=function(b,c){if(!T.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_24da[349]),!1;var a={},d=[];if(1<this.options.columns.length){void 0==b&&(c=this.getSelectedColumns(),c.length?(b=parseInt(c[0]),c=parseInt(c.length)):
|
|
303
|
+
(b=this.options.columns.length-1,c=1));var e=this.options.columns.length-1;if(void 0==b||b>e||0>b)b=e;c||(c=1);b+c>=this.options.columns.length&&(c=this.options.columns.length-b,c>=this.options.columns.length&&(c--,console.error(_$_24da[350])));if(!1===G.call(this.parent,_$_24da[351],this,b,c))return console.log(_$_24da[352]),!1;if(-1<parseInt(b)&&0<parseInt(c)){da.reset.call(this);e=null;var g=[],f=[],k=[];var n=0;for(var l=b;l<b+c;l++)na.attached.call(this,l)&&(this.colgroup[l].parentNode.removeChild(this.colgroup[l]),
|
|
304
|
+
this.headers[l].parentNode.removeChild(this.headers[l])),k[n]=this.options.columns[l],n++;for(var p=0;p<this.options.data.length;p++)for(l=b;l<b+c;l++)n=H.getColumnNameFromCoords(l,p),U.getAttributes.call(this,_$_24da[335],n,a),U.getAttributes.call(this,_$_24da[129],n,a),U.getAttributes.call(this,_$_24da[336],n,a),U.getAttributes.call(this,_$_24da[337],n,a),U.getAttributes.call(this,_$_24da[316],n,a),U.getAttributes.call(this,_$_24da[315],n,a),d[n]=!0,this.records[p][l].element&&0<=Array.prototype.indexOf.call(this.rows[p].element.children,
|
|
305
|
+
this.records[p][l].element)&&this.records[p][l].element.parentNode.removeChild(this.records[p][l].element);if(l=Y.getChain.call(this,a.values))a.formulas=l;this.options.columns.splice(b,c);this.headers.splice(b,c);this.colgroup.splice(b,c);for(p=0;p<this.options.data.length;p++)this.dataType||(f[p]=this.options.data[p].splice(b,c)),g[p]=this.records[p].splice(b,c);ia.adjust.call(this,b,c,0);(l=Aa.adjust.call(this,b,c,0))&&(e={nested:l});sa.updateConfig.call(this,0,0,b,c);K.call(this,_$_24da[81],{columnNumber:b,
|
|
306
|
+
numOfColumns:c});Q.call(this.parent,{worksheet:this,action:_$_24da[81],columnNumber:b,numOfColumns:c,insertBefore:1,data:f,properties:k,attributes:a,extra:e});ha.references.call(this,d);J.call(this,!0,!0);ha.update.call(this,!0);G.call(this.parent,_$_24da[353],this,b,c,g,k,a)}}};h.isVisible=function(b){var c=this.options.columns;return!1===c[b].visible||c[b].type===_$_24da[121]||c[b].width===_$_24da[59]||c[b].width===_$_24da[128]?!1:!0};return h}(),Na=function(){var h={},b={},c=function(d){if(typeof d==
|
|
307
|
+
_$_24da[25]){var e=d;d=H.getCoordsFromColumnName(d);var g=d[0];d=d[1]}else g=d.x,d=d.y,e=H.getColumnNameFromCoords(g,d);if(this.records[d]&&this.records[d][g]&&this.records[d][g].element){b[e]=this.options.style[e];this.records[d][g].element.setAttribute(_$_24da[129],_$_24da[3]);if(this.options.cells&&this.options.cells[e]&&this.options.cells[e].align)var f=this.options.cells[e].align;else this.options.columns[g].align&&(f=this.options.columns[g].align);f&&(this.records[d][g].element.style.textAlign=
|
|
308
|
+
f)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$_24da[56]];d.setStyle=a[_$_24da[11]];d.resetStyle=a.reset};a[_$_24da[56]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_24da[25])return e[d];var g=[],f=Object.keys(d);if(0<f.length)for(var k=0;k<f.length;k++){if(typeof d[k]==_$_24da[25])var n=e&&e[d[k]]?e[d[k]]:_$_24da[3];else n=H.getColumnNameFromCoords(d[k].x,d[k].y),n=e&&e[n]?e[n]:_$_24da[3];g.push(n)}return g}return this.options.style};
|
|
309
|
+
a.getFromSelection=function(d){var e,g,f=this.options.style,k=0,n=[];for(g=d[1];g<=d[3];g++){var l=0;n[k]=[];for(e=d[0];e<=d[2];e++){var p=H.getColumnNameFromCoords(e,g);n[k][l++]=f&&f[p]?f[p]:_$_24da[3]}k++}return n};a[_$_24da[11]]=function(d,e,g,f){if(!T.call(this.parent,this))return!1;this.options.style||(this.options.style={});var k=this.options.style,n=null,l=[],p=[],q={};p=function(x,y,B){if(!q[x]&&(k[x]?l=k[x].split(_$_24da[264]):(k[x]=_$_24da[3],l=[]),q[x]={},l.length))for(var z=0;z<l.length;z++)l[z]&&
|
|
310
|
+
l[z].trim()&&(n=l[z].split(_$_24da[166]),q[x][n[0].trim()]=n[1].trim());b[x]||(b[x]=[]);h[x]||(h[x]=[]);q[x][y]||(q[x][y]=_$_24da[3]);b[x].push([y+_$_24da[166]+q[x][y]]);q[x][y]=q[x][y]&&q[x][y]==B&&!f?_$_24da[3]:B;h[x].push([y+_$_24da[166]+q[x][y]]);B=H.getCoordsFromColumnName(x);this.records[B[1]]&&this.records[B[1]][B[0]]&&this.records[B[1]][B[0]].element&&(this.records[B[1]][B[0]].element.style[y]=q[x][y]);q[x][y]||delete q[x][y]};h={};b={};if(e)if(typeof d==_$_24da[25])p.call(this,d,e,g);else{if(d&&
|
|
311
|
+
d.length)for(var r=0;r<d.length;r++){var w=H.getColumnNameFromCoords(d[r].x,d[r].y);p.call(this,w,e,g)}}else for(g=Object.keys(d),r=0;r<g.length;r++)if(w=d[g[r]])for(typeof w==_$_24da[25]&&(w=w.split(_$_24da[264])),e=0;e<w.length;e++)w[e]&&(typeof w[e]==_$_24da[25]&&(w[e]=w[e].split(_$_24da[166])),w[e][0].trim()&&p.call(this,g[r],w[e][0].trim(),w[e][1].trim()));l={};p=Object.keys(q);if(p.length){for(r=0;r<p.length;r++){l[p[r]]||(l[p[r]]=[]);d=Object.keys(q[p[r]]);for(e=0;e<d.length;e++)l[p[r]].push(d[e]+
|
|
312
|
+
_$_24da[146]+q[p[r]][d[e]]);this.options.style[p[r]]=l[p[r]].join(_$_24da[354])}p=Object.keys(h);for(r=0;r<p.length;r++)h[p[r]]=h[p[r]].join(_$_24da[264]);p=Object.keys(b);for(r=0;r<p.length;r++)b[p[r]]=b[p[r]].join(_$_24da[264]);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_24da[90],oldValue:b,newValue:h});K.call(this,_$_24da[90],[h]);G.call(this.parent,_$_24da[355],this,h,b)}};a.reset=function(d){if(!T.call(this.parent,this))return!1;if(d){b={};if(Array.isArray(d))for(var e=
|
|
313
|
+
0;e<d.length;e++)c.call(this,d[e]);else c.call(this,d);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_24da[91],cells:d,oldValue:b});K.call(this,_$_24da[91],[d]);G.call(this.parent,_$_24da[357],this,d)}else console.error(_$_24da[356])};a.update=function(d){h={};b={};for(var e=Object.keys(d),g=0;g<e.length;g++){b[e[g]]=this.options.style[e[g]]||_$_24da[3];h[e[g]]=this.options.style[e[g]]=d[e[g]];var f=H.getCoordsFromColumnName(e[g]),k=f[0];f=f[1];if(this.records[f]&&this.records[f][k]&&
|
|
314
|
+
this.records[f][k].element&&(this.records[f][k].element.setAttribute(_$_24da[129],d[e[g]]),!this.records[f][k].element.style.textAlign)){var n=null;this.options.cells&&this.options.cells[e[g]]&&this.options.cells[e[g]].align?n=this.options.cells[e[g]].align:this.options.columns[k].align&&(n=this.options.columns[k].align);n&&(this.records[f][k].element.style.textAlign=n)}}K.call(this,_$_24da[91],[e]);K.call(this,_$_24da[90],[h]);G.call(this.parent,_$_24da[355],this,h,b)};return a}(),bb=function(){var h=
|
|
315
|
+
function(b){b.getComments=h[_$_24da[56]];b.setComments=h[_$_24da[11]]};h[_$_24da[56]]=function(b){return b&&typeof b==_$_24da[25]?this.options.comments&&this.options.comments[b]?this.options.comments[b]:!1:this.options.comments};h[_$_24da[11]]=function(b,c){if(!T.call(this.parent,this))return!1;if(typeof b==_$_24da[25]){var a={};a[b]=c}else a=b;if(c=G.call(this.parent,_$_24da[358],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=
|
|
316
|
+
0;e<d.length;e++){var g=H.getCoordsFromColumnName(d[e]);this.records[g[1]]&&this.records[g[1]][g[0]]&&(b[d[e]]=this.options.comments[d[e]]||_$_24da[3],(c=a[d[e]])?this.options.comments[d[e]]=c:delete this.options.comments[d[e]],this.records[g[1]][g[0]].element&&(c?this.records[g[1]][g[0]].element.setAttribute(_$_24da[317],c):this.records[g[1]][g[0]].element.removeAttribute(_$_24da[317])))}Q.call(this.parent,{worksheet:this,action:_$_24da[95],newValue:a,oldValue:b});K.call(this,_$_24da[95],[a]);G.call(this.parent,
|
|
317
|
+
_$_24da[359],this,a,b)}};return h}(),cb=function(){var h=function(b){b.getMeta=h[_$_24da[56]];b.setMeta=h[_$_24da[11]];b.resetMeta=h.reset};h[_$_24da[56]]=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};h[_$_24da[11]]=function(b,c,a){if(!T.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof b==_$_24da[25]&&c){a||(a=_$_24da[3]);var d={};d[b]={};d[b][c]=a;b=d}c=Object.keys(b);if(c.length){a=
|
|
318
|
+
{};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]]),g=0;g<e.length;g++)this.options.meta[c[d]][e[g]]=b[c[d]][e[g]],a[c[d]][e[g]]=b[c[d]][e[g]]}Object.keys(a).length&&(K.call(this,_$_24da[360],[a]),G.call(this.parent,_$_24da[361],this,a))}};h.reset=function(b){if(!T.call(this.parent,this))return!1;if(b){if(this.options.meta){typeof b==_$_24da[25]&&(b=[b]);for(var c=0;c<b.length;c++)this.options.meta[b[c]]&&delete this.options.meta[b[c]]}}else b=
|
|
319
|
+
{},this.options.meta=b;K.call(this,_$_24da[362],b);G.call(this.parent,_$_24da[363],this,b)};return h}(),db=function(){var h=function(b){b.orderBy=h.execute};h.handler=function(b,c){return function(a,d){a=a[1];d=d[1];return b?a===_$_24da[3]&&d!==_$_24da[3]?1:a!==_$_24da[3]&&d===_$_24da[3]?-1:a>d?-1:a<d?1:0:a===_$_24da[3]&&d!==_$_24da[3]?1:a!==_$_24da[3]&&d===_$_24da[3]?-1:a>d?1:a<d?-1:0}};h.execute=function(b,c,a,d){if(0<=b){c=null==c?this.headers[b].classList.contains(_$_24da[364])?1:0:c?1:0;for(var e,
|
|
320
|
+
g,f=[],k=0;k<this.options.data.length;k++)e=Ma[_$_24da[56]].call(this,b,k),g=this.records[k][b].v,g=e.type==_$_24da[304]||e.type==_$_24da[308]||e.type==_$_24da[309]||e.type==_$_24da[365]||e.type==_$_24da[22]||e.type==_$_24da[366]?Number(g):jSuites.isNumeric(g)?Number(g):g.toLowerCase(),f[k]=[k,g];k=typeof this.parent.config.sorting===_$_24da[112]?this.parent.config.sorting(c,b):h.handler(c,b);f.sort(k);e=a?!0:!1;if(!a)for(a=[],k=0;k<f.length;k++)a[k]=f[k][0];if(k=G.call(this.parent,_$_24da[367],this,
|
|
321
|
+
b,c,a))a=k;else if(!1===k)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(E(_$_24da[368])))this.destroyMerged();else return!1;if(a.length<f.length)for(k=0;k<f.length;k++)-1==a.indexOf(f[k][0])&&a.push(f[k][0]);f=[];for(k=0;k<a.length;k++)f[a[k]]=k;Ia.call(this,!1);da.reset.call(this);K.call(this,_$_24da[98],{column:b,direction:c,order:a});Q.call(this.parent,{worksheet:this,action:_$_24da[98],column:b,newValue:a,oldValue:f,direction:c,previousState:h.getState.call(this)});
|
|
322
|
+
h.update.call(this,a);h.arrow.call(this,b,c,d);da.refresh.call(this);G.call(this.parent,_$_24da[369],this,b,c,a);return!0}};h.update=function(b){for(var c=[],a=0;a<b.length;a++)c[a]=this.options.data[b[a]];for(a=0;a<b.length;a++)this.options.data[a]=c[a];c=[];for(a=0;a<b.length;a++)c[a]=this.records[b[a]];this.records=c;c=[];for(a=0;a<b.length;a++)c[a]=this.rows[b[a]];this.rows=c;ha.references.call(this);this.tbody.innerHTML=_$_24da[3];J.call(this,!0,!0);this.searchInput&&this.searchInput.value?xa.update.call(this,
|
|
323
|
+
null):la.update.call(this)};h.arrow=function(b,c,a){for(var d=0;d<this.headers.length;d++)this.headers[d].classList.remove(_$_24da[370]),this.headers[d].classList.remove(_$_24da[364]);void 0===a?this.headers[b].classList.add(c?_$_24da[370]:_$_24da[364]):Array.isArray(a)&&this.headers[a[0]].classList.add(a[1]?_$_24da[370]:_$_24da[364])};h.getState=function(){for(var b=0;b<this.headers.length;b++){if(this.headers[b].classList.contains(_$_24da[370]))return[b,1];if(this.headers[b].classList.contains(_$_24da[364]))return[b,
|
|
324
|
+
0]}return null};return h}(),Ea=function(){var h=function(b){b.whichPage=h.whichPage;b.quantityOfPages=h.quantityOfPages;b.page=h[_$_24da[11]];b.updatePagination=h.update};h.build=function(){this.pageNumber=0;var b=document.createElement(_$_24da[32]),c=document.createElement(_$_24da[32]);this.pagination=document.createElement(_$_24da[32]);this.pagination.classList.add(_$_24da[371]);this.pagination.appendChild(b);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=
|
|
325
|
+
_$_24da[52]);this.element.appendChild(this.pagination)};h.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,h[_$_24da[11]].call(this,this.pageNumber))};h.pageDown=function(){this.pageNumber<h.quantityOfPages.call(this)-1&&(this.pageNumber++,h[_$_24da[11]].call(this,this.pageNumber))};h.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(_$_24da[372]);
|
|
326
|
+
return!1};h.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_24da[372]);return!1};h[_$_24da[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===G.call(this.parent,_$_24da[374],this,b,a,d))return!1;this.pageNumber=b;J.update.call(this);ia.refresh.call(this);
|
|
327
|
+
typeof c==_$_24da[112]&&c.call(this);G.call(this.parent,_$_24da[375],this,b,a,d)}else console.error(_$_24da[373])};h.update=function(){this.pagination.children[0].innerHTML=_$_24da[3];this.pagination.children[1].innerHTML=_$_24da[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=
|
|
328
|
+
document.createElement(_$_24da[32]);d.className=_$_24da[377];d.innerHTML=_$_24da[15];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=a;c++)d=document.createElement(_$_24da[32]),d.className=_$_24da[377],d.innerHTML=c,this.pagination.children[1].appendChild(d),this.pageNumber==c-1&&d.classList.add(_$_24da[378]);a<b&&(d=document.createElement(_$_24da[32]),d.className=_$_24da[377],d.innerHTML=_$_24da[17],d.title=b,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=
|
|
329
|
+
E(_$_24da[379],[this.pageNumber+1,b])}else this.pagination.children[0].innerHTML=E(_$_24da[376]);this.options.tableOverflow&&(this.content.style.height=this.table.offsetHeight+16+_$_24da[57],this.scrollY.style.height=_$_24da[59],this.table.style.top=0)}};return h}(),ja=function(){var h=function(b){b.setFreezeRows=h[_$_24da[11]];b.resetFreezeRows=h.reset};h.update=function(b){var c,a;if(a=this.options.freezeRows)for(var d=this.thead.offsetHeight,e=0;e<a;e++){if(c=this.records[e][b].element)c.classList.add(_$_24da[380]),
|
|
330
|
+
c.style.top=d+_$_24da[57];d+=parseInt(this.rows[e].element.offsetHeight)}};h.headers=function(){var b=this.thead.offsetHeight,c;if(c=this.options.freezeRows)for(var a=0;a<c;a++)this.rows[a]&&this.rows[a].element&&(this.rows[a].element.firstChild.classList.add(_$_24da[380]),this.rows[a].element.firstChild.style.top=b+_$_24da[57],b+=parseInt(this.rows[a].element.offsetHeight));else h.reset.call(this)};h.refresh=function(){if(0<this.options.freezeRows){h.headers.call(this);for(var b=0;b<this.visibleCols.length;b++)h.update.call(this,
|
|
331
|
+
this.visibleCols[b])}};h[_$_24da[11]]=function(b){h.applyReset.call(this);var c=this.options.freezeRows;this.options.freezeRows=b;this.options.freezeRowControl&&!b?this.thead.lastChild.firstChild.classList.add(_$_24da[381]):this.thead.lastChild.firstChild.classList.remove(_$_24da[381]);h.refresh.call(this);J.call(this,!0);da.refresh.call(this);Q.call(this.parent,{worksheet:this,action:_$_24da[97],newValue:b,oldValue:c});K.call(this,_$_24da[97],{row:b})};h.reset=function(){h[_$_24da[11]].call(this,
|
|
332
|
+
0)};h.getHeight=function(b){b=b?0:this.thead.offsetHeight;if(0<this.options.freezeRows)for(var c=0;c<this.options.freezeRows;c++)b+=parseInt(aa.height.call(this,c));return b};h.applyReset=function(){for(var b,c=0;c<this.options.freezeRows;c++)if(this.rows[c].element){this.rows[c].element.firstChild.classList.remove(_$_24da[380]);this.rows[c].element.firstChild.style.top=_$_24da[3];for(var a=0;a<this.options.columns.length;a++)if(b=this.records[c][a].element)b.classList.remove(_$_24da[380]),b.style.top=
|
|
333
|
+
_$_24da[3]}};h.start=function(b,c){b=this.parent.helper;h.event={y:c,d:c};this.content.scrollTop=0;c=this.content.offsetTop+h.getHeight.call(this);b.style.display=_$_24da[24];b.style.top=c+_$_24da[57];b.style.left=_$_24da[59];b.style.width=this.content.offsetWidth+_$_24da[57];b.style.height=_$_24da[202]};h.end=function(b){b=h.event;null!==b.d&&this.setFreezeRows(b.d);this.parent.helper.style.display=_$_24da[3];h.event=null};h.cancel=function(){h.event.d=null;h.end.call(this,!1)};h.move=function(b){var c=
|
|
334
|
+
b.target.getAttribute(_$_24da[60]);if(null!=c){c=parseInt(c);var a=(b=b.target.clientHeight/2>b.offsetY)?c:c+1;this.merged.rows[a]&&0<a||(h.event.d=a,a=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(b?c.top:c.bottom)-a.top+_$_24da[57])}};return h}(),ea=function(){var h=function(b){b.setFreezeColumns=h[_$_24da[11]];b.resetFreezeColumns=h.reset};h.width=function(){if(this.options.freezeColumns){h.headers.call(this);for(var b=
|
|
335
|
+
0;b<this.rows.length;b++)this.rows[b].element&&h.update.call(this,b)}};h.update=function(b){var c,a;if(a=this.options.freezeColumns){var d=Ca.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(_$_24da[58]),c.style.left=d+_$_24da[57];na.isVisible.call(this,e)&&(d+=parseInt(this.options.columns[e].width))}}};h.headers=function(){var b=Ca.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(_$_24da[58]);
|
|
336
|
+
this.headers[a].style.left=b+_$_24da[57];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_24da[58]),this.footers.content[d][a].element.style.left=b+_$_24da[57];!1!==this.options.columns[a].visible&&(b+=parseInt(this.options.columns[a].width))}}else h.reset.call(this)};h.refresh=function(){if(0<this.options.freezeColumns){h.headers.call(this);for(var b=0;b<this.visibleRows.length;b++)h.update.call(this,this.visibleRows[b])}};
|
|
337
|
+
h[_$_24da[11]]=function(b){h.applyReset.call(this);var c=this.options.freezeColumns;this.options.freezeColumns=b;this.options.freezeColumnControl&&!b?this.thead.lastChild.firstChild.classList.add(_$_24da[382]):this.thead.lastChild.firstChild.classList.remove(_$_24da[382]);h.width.call(this);J.call(this,!0);da.refresh.call(this);Q.call(this.parent,{worksheet:this,action:_$_24da[96],newValue:b,oldValue:c});K.call(this,_$_24da[96],{column:b})};h.reset=function(){h[_$_24da[11]].call(this,0)};h.applyReset=
|
|
338
|
+
function(){for(var b,c=1;c<=this.options.freezeColumns;c++){if(b=this.thead.lastChild)b.children[c].classList.remove(_$_24da[58]),b.children[c].style.left=_$_24da[3];for(var a=0;a<this.rows.length;a++)if(b=this.rows[a].element)b.children[c].classList.remove(_$_24da[58]),b.children[c].style.left=_$_24da[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[c].classList.remove(_$_24da[58]),this.tfoot.children[a].children[c].style.left=_$_24da[3]}};h.getWidth=
|
|
339
|
+
function(b){b=b?0:Ca.call(this)?50:0;if(0<this.options.freezeColumns)for(var c=0;c<this.options.freezeColumns;c++)na.isVisible.call(this,c)&&(b+=parseInt(this.options.columns[c].width));return b};h.start=function(b,c){b=this.parent.helper;h.event={x:c,d:c};this.content.scrollLeft=0;c=h.getWidth.call(this);b.style.display=_$_24da[24];b.style.top=this.content.offsetTop+_$_24da[57];b.style.left=c+_$_24da[57];b.style.width=_$_24da[202];b.style.height=this.content.offsetHeight+_$_24da[57];this.thead.lastChild.firstChild.classList.remove(_$_24da[382])};
|
|
340
|
+
h.end=function(b){b=h.event;null!==b.d&&this.setFreezeColumns(b.d);this.parent.helper.style.display=_$_24da[3];h.event=null};h.cancel=function(){h.event.d=null;h.end.call(this,!1)};h.move=function(b){var c=b.target.getAttribute(_$_24da[65]);if(null!=c){c=parseInt(c);var a=(b=b.target.clientWidth/2>b.offsetX)?c:c+1;this.merged.cols[a]&&0<a||(h.event.d=a,c=this.headers[c].getBoundingClientRect(),a=this.content.getBoundingClientRect(),this.parent.helper.style.left=(b?c.left:c.right)-a.left+_$_24da[57])}};
|
|
341
|
+
return h}(),ha=function(){var h=function(a,d){if(this.options[a]){for(var e={},g=Object.keys(this.options[a]),f=0;f<g.length;f++)e[d&&void 0!=d[g[f]]?d[g[f]]:g[f]]=this.options[a][g[f]];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,g=0;g<this.options.columns.length;g++)R.call(this,g,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;
|
|
342
|
+
for(g=this.options.columns.length-1;0<=g;g--){e=!1;for(d=0;d<this.rows.length;d++)R.call(this,g,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(_$_24da[32]);this.content.classList.add(_$_24da[383]);this.content.addEventListener(_$_24da[384],function(e){if(!a.edition)return e.preventDefault(),!1});this.table=document.createElement(_$_24da[385]);this.thead=
|
|
343
|
+
document.createElement(_$_24da[386]);this.tbody=document.createElement(_$_24da[387]);this.tfoot=document.createElement(_$_24da[388]);!1===this.options.gridline&&this.table.classList.add(_$_24da[389]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_24da[390]);var d=document.createElement(_$_24da[215]);d.setAttribute(_$_24da[197],_$_24da[391]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_24da[184]);d=document.createElement(_$_24da[186]);
|
|
344
|
+
d.classList.add(_$_24da[392]);if(1==this.parent.edition)this.options.freezeRowControl&&!this.options.freezeRows&&d.classList.add(_$_24da[381]),this.options.freezeColumnControl&&!this.options.freezeColumns&&d.classList.add(_$_24da[382]);else if(this.options.freezeRowControl||this.options.freezeColumnControl)this.options.freezeRowControl=!1,this.options.freezeColumnControl=!1,console.log(_$_24da[393]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_24da[394]);
|
|
345
|
+
this.table.setAttribute(_$_24da[395],_$_24da[128]);this.table.setAttribute(_$_24da[396],_$_24da[128]);this.table.setAttribute(_$_24da[397],_$_24da[398]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.defaultColAlign&&this.table.classList.add(_$_24da[399]+this.options.defaultColAlign);this.options.textOverflow||this.table.classList.add(_$_24da[400]);!1===this.options.selectLockedCells&&
|
|
346
|
+
this.table.classList.add(_$_24da[401]);this.corner=document.createElement(_$_24da[32]);this.corner.className=_$_24da[402];this.corner.setAttribute(_$_24da[397],_$_24da[403]);this.corner.setAttribute(_$_24da[404],_$_24da[405]);0==this.options.selectionCopy&&(this.corner.style.display=_$_24da[52]);this.scrollX=J.build.call(a,_$_24da[406]);this.scrollY=J.build.call(a,_$_24da[407]);this.content.appendChild(this.scrollX);this.content.appendChild(this.scrollY);this.content.appendChild(this.table);this.content.appendChild(this.corner);
|
|
347
|
+
this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$_24da[68]),this.options.tableHeight||this.parent.element.style.height||(this.options.tableHeight=300),this.options.tableWidth||this.parent.element.style.width||(this.options.tableWidth=document.body.offsetWidth-18),this.options.tableWidth&&(this.content.style.width=parseInt(this.options.tableWidth)+_$_24da[57]),this.options.pagination?this.content.classList.add(_$_24da[408]):this.options.tableHeight&&
|
|
348
|
+
(this.content.style.height=parseInt(this.options.tableHeight)+_$_24da[57]));this.options.resize&&(this.content.style.resize=this.options.resize);this.options.freezeColumns>this.options.columns.length&&console.error(_$_24da[409]);sa.build.call(this);Ja.build.call(this);xa.build.call(this);Aa.build.call(this);Ea.build.call(this);Ka.build.call(this);ia.build.call(this);la.onload.call(this);b.call(this);J.call(this)};c.references=function(a){var d=[],e=[],g=null,f=null,k=null,n=null;for(g=0;g<this.options.columns.length;g++)if(f=
|
|
349
|
+
this.headers[g])k=f.getAttribute(_$_24da[65]),k!=g&&(f.setAttribute(_$_24da[65],g),f.getAttribute(_$_24da[212])||(f.innerHTML=H.getColumnName(g)));for(var l=0;l<this.rows.length;l++)f=this.rows[l],n=f.y,n!=l&&(f.y=l,d[n]=l,f.element&&(f.element.setAttribute(_$_24da[60],l),f.element.children[0].setAttribute(_$_24da[60],l),g=this.options.rows&&this.options.rows[n]&&this.options.rows[n].title?this.options.rows[n].title:l+1,f.element.children[0].innerHTML=g));var p=function(r,w){f=this.records[w][r];
|
|
350
|
+
k=f.x;n=f.y;k!=r&&(f.x=r,f.element&&f.element.setAttribute(_$_24da[65],r));n!=w&&(f.y=w,f.element&&f.element.setAttribute(_$_24da[60],w));if(k!=r||n!=w){var x=H.getColumnNameFromCoords(k,n);r=H.getColumnNameFromCoords(r,w);e.push([x,r])}};if(a){l=function(r,w){r&&r[w]&&delete r[w]};var q=Object.keys(a);for(g=0;g<q.length;g++)l(this,q[g]),l(this.options.meta,q[g]),l(this.options.cells,q[g]),l(this.options.style,q[g]),l(this.options.comments,q[g])}for(l=0;l<this.rows.length;l++)for(g=0;g<this.options.columns.length;g++)p.call(this,
|
|
351
|
+
g,l);e=Object.fromEntries(e);h.call(this,_$_24da[410],d);h.call(this,_$_24da[335],e);h.call(this,_$_24da[336],e);h.call(this,_$_24da[129],e);h.call(this,_$_24da[337],e);h.call(this,_$_24da[316],e);this.options.mergeCells&&sa.build.call(this);G.call(this.parent,_$_24da[411],this,e,a);Y.tracking.call(this,e,a);Y.updateAll.call(this,e,a);La.updateAll.call(this,e,a);this.resetBorders(_$_24da[117],!0);G.call(this.parent,_$_24da[412],this,e,a);return e};c.update=function(a){a&&b.call(this);if(typeof this.parent.config.updateTable==
|
|
352
|
+
_$_24da[112])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)a=this.records[d][e],this.parent.config.updateTable.call(this,this,a.element,e,d,R.call(this,e,d),a.r?a.r:a.v);ia.refresh.call(this)};return c}(),va=function(){var h={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};Ha.spreadsheet.call(a,c);a.config.license&&(u.license=a.config.license);
|
|
353
|
+
b.spreadsheet=a;b.jspreadsheet=b.jexcel=a.worksheets;u.spreadsheet.push(a);a.name||(a.name=jSuites.guid());h.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$_24da[111]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=b.offsetWidth-50+_$_24da[57]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){a.createWorksheet();return!1};d.onclick=function(g,f,k,n,l){0<=k&&a.openWorksheet(k,
|
|
354
|
+
!0)};d.onchangeposition=function(g,f,k){a.updateWorksheet(f,k)};jSuites.tabs(b,d);b.classList.add(_$_24da[413]);1==c.fullscreen&&b.classList.add(_$_24da[23]);var e=document.createElement(_$_24da[32]);a.toolbar=document.createElement(_$_24da[32]);a.toolbar.className=_$_24da[414];e.appendChild(a.toolbar);a.filter=la.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_24da[32]);a.helper.className=_$_24da[415];e.appendChild(a.helper);a.loading=document.createElement(_$_24da[32]);
|
|
355
|
+
a.loading.classList.add(_$_24da[416]);e.appendChild(a.loading);e.appendChild(pa.build(a));e.appendChild(Xa(a));a.textarea=document.createElement(_$_24da[417]);a.textarea.className=_$_24da[418];a.textarea.tabIndex=_$_24da[419];e.appendChild(a.textarea);d.position===_$_24da[182]?b.insertBefore(e,b.children[0]):b.insertBefore(e,b.children[1]);b.appendChild(Oa.call(a,u.license));a.createWorksheet=ua.createWorksheet;a.deleteWorksheet=ua.deleteWorksheet;a.renameWorksheet=ua.renameWorksheet;a.updateWorksheet=
|
|
356
|
+
ua.updateWorksheet;a.openWorksheet=ua.openWorksheet;a.moveWorksheet=ua.moveWorksheet;a.getWorksheet=ua.getWorksheet;a.getWorksheetActive=ua.getWorksheetActive;a.getWorksheetInstance=ua.getWorksheetInstance;a.getConfig=function(){var g=a.config;g.worksheets=[];for(var f=0;f<a.worksheets.length;f++)g.worksheets.push(a.worksheets[f].getConfig());return g};a.fullscreen=Pa;a.progress=Qa;a.dispatch=G;a.setHistory=Q;a.resetHistory=Q.reset;a.undo=Q.undo;a.redo=Q.redo;a.setToolbar=ma[_$_24da[11]];a.getToolbar=
|
|
357
|
+
ma[_$_24da[56]];a.showToolbar=ma.show;a.hideToolbar=ma.hide;a.tools=e;La.build.call(a);c.plugins&&wa.call(a,c.plugins);a.setPlugins=function(g){wa.call(a,g)};b=Object.keys(u.extensions);if(b.length)for(d=0;d<b.length;d++)if(typeof u.extensions[b[d]].oninit==_$_24da[112])u.extensions[b[d]].oninit(a,c);return a},worksheet:function(b,c){var a={};b.worksheets.push(a);a.parent=b;Ha(a);Za(a);ka(a);da(a);pa(a);Ka(a);Ja(a);sa(a);Na(a);ab(a);qa(a);Y(a);U(a);aa(a);na(a);cb(a);bb(a);Fa(a);ia(a);Aa(a);xa(a);
|
|
358
|
+
la(a);ma(a);za(a);eb(a);fb(a);Ea(a);ua(a);ea(a);ja(a);$a(a);db(a);La(a);Ma(a);Ha.worksheet.call(a,c);!u.license&&a.options.license&&(u.license=a.options.license);b.element.jexcel=b.element.jexcel?b.worksheets:a;wa.execute.call(a.parent,_$_24da[420],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_24da[421]+ua.nextName());this.options.freezeColumns&&(this.options.freezeColumns=parseInt(this.options.freezeColumns));this.options.freezeRows&&(this.options.freezeRows=
|
|
359
|
+
parseInt(this.options.freezeRows));this.options.style||(this.options.style={});var d=this.options.worksheetName;I(d)&&console.log(_$_24da[422]+d+_$_24da[423]);I(d,a);this.element=b.element.tabs.appendElement(this.options.worksheetName,function(e,g){a.options.worksheetState===_$_24da[121]&&(g.style.display=_$_24da[52])});this.element.classList.add(_$_24da[424]);this.element.jexcel=this;ha.build.call(this);wa.execute.call(this.parent,_$_24da[425],[this]);this.options.data&&500<this.options.data.length&&
|
|
360
|
+
!J.limited.call(this)&&!this.options.pagination&&console.error(_$_24da[426]);u.current=this};return a},row:function(b,c){this.rows[b]||(this.rows[b]={element:null,y:b});c&&(this.rows[b].id=c,za[_$_24da[11]].call(this,c));(c=this.options.rows)&&c[b]&&(c[b].height&&(this.rows[b].height=parseInt(c[b].height)),!1===c[b].visible&&(this.rows[b].visible=!1));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++)h.cell.call(this,
|
|
361
|
+
c,b)},cell:function(b,c,a){typeof a==_$_24da[21]&&(a=R.call(this,b,c),null===a||void 0===a)&&(a=_$_24da[3],R.call(this,b,c,a));this.records[c][b]||(this.records[c][b]={element:null,x:b,y:c},Z(a)||(this.records[c][b].v=a))},bind:function(b){for(var c=Object.keys(Ga),a=0;a<c.length;a++)(c[a]==_$_24da[427]?window:b).addEventListener(c[a],Ga[c[a]],c[a]==_$_24da[428]||c[a]==_$_24da[429]||c[a]==_$_24da[430]?{passive:!1}:{})},unbind:function(b){for(var c=Object.keys(Ga),a=0;a<c.length;a++)(c[a]==_$_24da[427]?
|
|
362
|
+
window:b).removeEventListener(c[a],Ga[c[a]])}};return h}(),eb=function(){var h=function(c){c.getWidth=h[_$_24da[56]];c.setWidth=h[_$_24da[11]];c.autoWidth=h.auto};h.auto=function(c){if(c.length){var a=[],d=[],e;this.table.style.tableLayout=_$_24da[431];for(var g=0;g<c.length;g++)if(e=this.headers[c[g]])e=e.offsetWidth,26<e&&(a.push(c[g]),d.push(e));this.table.style.tableLayout=_$_24da[3];this.setWidth(a,d)}};h[_$_24da[56]]=function(c){var a=this.options.columns;if(typeof c===_$_24da[21]){c=[];for(var d=
|
|
363
|
+
0;d<a.length;d++)c.push(a[d].width)}else c=a[c].width;return c};var b=function(c,a){this.options.columns[c].width=a;this.colgroup[c]&&this.colgroup[c].setAttribute(_$_24da[197],a);!1===this.options.columns[c].visible&&(this.options.columns[c].visible=!0)};h[_$_24da[11]]=function(c,a,d){if(!T.call(this.parent,this))return!1;if(a){if(Array.isArray(c)){d||(d=[]);for(var e=0;e<c.length;e++){d[e]||(d[e]=this.options.columns[c[e]].width);var g=Array.isArray(a)&&a[e]?a[e]:a;b.call(this,c[e],g)}}else d||
|
|
364
|
+
(d=this.options.columns[c].width),b.call(this,c,a);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_24da[92],column:c,oldValue:d,newValue:a});K.call(this,_$_24da[92],{column:c,width:a,oldWidth:d});G.call(this.parent,_$_24da[432],this,c,a,d);J.call(this,!0)}};return h}(),fb=function(){var h=function(c){c.getHeight=h[_$_24da[56]];c.setHeight=h[_$_24da[11]]};h[_$_24da[56]]=function(c){if(void 0===c){c=[];for(var a=0;a<this.rows.length;a++){var d=aa.height.call(this,a);d&&(c[a]=d)}}else c=
|
|
365
|
+
aa.height.call(this,c);return c};var b=function(c,a){a=parseInt(a);var d=aa.height.call(this,c);this.rows[c].element&&(this.rows[c].element.style.height=a+_$_24da[57]);!1===this.rows[c].visible&&(this.rows[c].visible=!0,this.rows[c].element&&(this.rows[c].element.style.display=_$_24da[3]));this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=a;this.rows[c].height=a;return d};h[_$_24da[11]]=function(c,a,d){if(!T.call(this.parent,this))return!1;var e,g=typeof d==_$_24da[21]?!0:
|
|
366
|
+
!1;if(a){if(Array.isArray(c))for(!0===g&&(d=[]),e=0;e<c.length;e++){var f=Array.isArray(a)&&a[e]?a[e]:a;b.call(this,c[e],f);1==g&&d.push(g)}else e=b.call(this,c,a),1==g&&(d=e);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_24da[93],row:c,oldValue:d,newValue:a});K.call(this,_$_24da[93],{row:c,height:a,oldHeight:d});G.call(this.parent,_$_24da[433],this,c,a,d);J.call(this,!0)}};return h}(),la=function(){var h=function(f){var k=e[f];f=a[e[f]];if(!f.element){f.element=document.createElement(_$_24da[434]);
|
|
367
|
+
f.element.innerHTML=f.value;var n=document.createElement(_$_24da[271]);n.type=_$_24da[303];n.value=k;n.o=f;f.element.insertBefore(n,f.element.firstChild)}f.element.firstChild.checked=f.selected;return f.element},b=null,c=null,a=[],d=0,e=null,g=function(f){f.setFilter=g[_$_24da[11]];f.getFilter=g[_$_24da[56]];f.openFilter=g.open;f.closeFilter=g.close;f.resetFilters=g.reset;f.showFilter=g.show;f.hideFilter=g.hide};g.isVisible=function(){return c};g[_$_24da[11]]=function(f,k){var n=this.headers[f];f=
|
|
368
|
+
this.options.columns[f];Array.isArray(k)&&0<k.length?(n&&n.classList.add(_$_24da[435]),f.filters=k):(n&&n.classList.remove(_$_24da[435]),f.filters=null);g.update.call(this)};g[_$_24da[56]]=function(f){if(f)return this.options.columns[f].filters||null;f={};for(var k=0;k<this.options.columns.length;k++)f[k]=this.options.columns[k].filters||null;return f};g.open=function(f){b=parseInt(f);if(this.headers[b].classList.contains(_$_24da[217])){c=!0;var k=this.parent.element.getBoundingClientRect(),n=this.headers[b].getBoundingClientRect();
|
|
369
|
+
f=n.left-k.left;var l=n.top-k.top+n.height;n=this.parent.filter;k=k.left+k.width;n.style.display=_$_24da[24];f+n.offsetWidth>k&&(f=k-(n.offsetWidth+18));n.style.top=l+_$_24da[57];n.style.left=f+_$_24da[57];n.children[0].focus();f=n.children[1].selectAll;n.children[1].textContent=_$_24da[3];n.children[1].appendChild(f);f.children[0].checked=this.options.columns[b].filters?!1:!0;f=xa.execute.call(this,null,b);f=H.invert(f);n=[];for(k=0;k<this.rows.length;k++)if(f[k]){l=_$_24da[3]+R.call(this,b,k);var p=
|
|
370
|
+
_$_24da[3]+qa.processed.call(this,b,k,!0);l.substr(0,1)==_$_24da[18]&&(l=p);n.push([l,p])}n.sort(function(q,r){return q[0]>r[0]?1:q[0]<r[0]?-1:0});a=[];for(k=0;k<n.length;k++)a[n[k][1]]={value:n[k][1],element:null,key:n[k][0]};(f=G.call(this.parent,_$_24da[437],this,b,a))&&(a=f);typeof a[_$_24da[3]]!==_$_24da[21]&&(delete a[_$_24da[3]],a[_$_24da[3]]={value:_$_24da[261]+E(_$_24da[438])+_$_24da[283],element:null});g.search.call(this,_$_24da[3])}else console.log(_$_24da[436])};g.close=function(f){if(f){f=
|
|
371
|
+
this.parent.filter.children[1];if(1==f.selectAll.firstChild.checked&&e.length==Object.keys(a).length)f=null;else{f=1==f.currentSelection.firstChild.checked?this.options.columns[b].filters||[]:[];for(var k=0;k<e.length;k++)a[e[k]].selected&&f.push(e[k])}g[_$_24da[11]].call(this,b,f)}this.parent.filter.style.display=_$_24da[3];this.parent.filter.children[0].value=_$_24da[3];b=null;c=!1;a=null;d=0;e=null};g.reset=function(f){g.updateDOM.call(this,f,!1);Ba.reset.call(this);g.update.call(this)};g.execute=
|
|
372
|
+
function(f){for(var k=this.options.columns,n=[],l=0;l<this.options.data.length;l++){for(var p=!0,q=0;q<k.length;q++)if(k[q].filters&&f!==q){var r=_$_24da[3]+R.call(this,q,l),w=_$_24da[3]+this.getLabelFromCoords(q,l,!0);-1==k[q].filters.indexOf(r)&&-1==k[q].filters.indexOf(w)&&(p=!1)}p&&n.push(l)}return n};g.update=function(){Ba.reset.call(this);this.resetSelection();this.resetBorders();var f=xa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_24da[112]){var k=g[_$_24da[56]].call(this),
|
|
373
|
+
n=G.call(this.parent,_$_24da[439],this,k,f);if(n)f=n;else if(!1===n)return!1}this.pageNumber=0;f&&f.length<this.rows.length&&Ba[_$_24da[11]].call(this,f);ia.refresh.call(this);J.call(this,!0);G.call(this.parent,_$_24da[440],this,k,f)};g.show=function(f){g.updateDOM.call(this,f,!0)};g.hide=function(f){g.updateDOM.call(this,f,!1,!0);g.update.call(this)};g.search=function(f){for(var k=this.parent.filter.children[1];k.children[1];)k.removeChild(k.lastChild);k.currentSelection.firstChild.checked=!1;if(f){e=
|
|
374
|
+
[];f=new RegExp(f,_$_24da[441]);for(var n=Object.keys(a),l=0;l<n.length;l++)a[n[l]]&&(_$_24da[3]+a[n[l]].value).match(f)?(e.push(n[l]),a[n[l]].selected=!0):a[n[l]].selected=!1;e.length&&this.options.columns[b].filters&&(k.firstChild.checked=!0,k.appendChild(k.currentSelection))}else{e=Object.keys(a);if(f=this.options.columns[b].filters)for(l=0;l<e.length;l++)a[e[l]].selected=!1,0<=f.indexOf(e[l])&&(a[e[l]].selected=!0);else for(l=0;l<e.length;l++)a[e[l]].selected=!0;k.firstChild.checked=f?!1:!0}for(l=
|
|
375
|
+
d=0;l<e.length;l++)200>l&&(f=d++,k.appendChild(h(f)))};g.build=function(){var f=document.createElement(_$_24da[32]);f.className=_$_24da[442];f.onclick=function(p){p.target.tagName==_$_24da[443]&&p.target.o&&(p.target.o.selected=p.target.checked);p=!0;for(var q=1;q<this.children.length;q++)this.children[q].children[0].checked||(p=!1);this.children[0].children[0].checked=p};var k=document.createElement(_$_24da[271]);k.type=_$_24da[71];k.placeholder=E(_$_24da[444]);k.classList.add(_$_24da[445]);k.classList.add(_$_24da[272]);
|
|
376
|
+
var n=document.createElement(_$_24da[271]);n.type=_$_24da[446];n.value=_$_24da[447];n.className=_$_24da[448];var l=document.createElement(_$_24da[32]);l.className=_$_24da[449];l.appendChild(k);l.appendChild(f);l.appendChild(n);f.currentSelection=document.createElement(_$_24da[434]);f.currentSelection.innerHTML=_$_24da[450]+E(_$_24da[451]);f.selectAll=document.createElement(_$_24da[434]);f.selectAll.innerHTML=_$_24da[452]+E(_$_24da[453])+_$_24da[283];f.selectAll.onclick=function(){for(var p=this.children[0].checked,
|
|
377
|
+
q=1;q<this.parentNode.children.length;q++)this.parentNode.children[q].children[0].checked=p;if(1==p)for(q=0;q<e.length;q++)a[e[q]].selected=!0;else for(p=Object.keys(a),q=0;q<p.length;q++)a[p[q]].selected=!1};jSuites.lazyLoading(f,{loadDown:function(p){for(p=0;d<e.length-1&&10>p;){var q=d++;f.appendChild(h(q));p++}}});return l};g.updateDOM=function(f,k,n){var l=this.headers,p=function(q){1==k?l[q].classList.add(_$_24da[217]):(this.options.columns[q].filters=null,l[q].classList.remove(_$_24da[435]),
|
|
378
|
+
1==n&&l[q].classList.remove(_$_24da[217]))};if(f)p.call(this,f);else for(f=0;f<l.length;f++)p.call(this,f)};g.onload=function(){var f,k=!1;if(f=this.options.columns)for(var n=0;n<f.length;n++)Array.isArray(f[n].filters)&&0<f[n].filters.length&&this.headers[n]&&(this.headers[n].classList.add(_$_24da[435]),k=!0);1==k&&g.update.call(this)};return g}(),Ba=function(){var h={};h[_$_24da[11]]=function(b){var c=null,a=null,d=null,e=[];if(this.merged.rows.length){for(a=0;a<b.length;a++)if(-1===e.indexOf(b[a])&&
|
|
379
|
+
(e.push(b[a]),this.merged.rows[b[a]]&&(d=sa.getAffected.call(this.merged.rows,b[a]))))for(c=0;c<d.length;c++)-1===e.indexOf(d[c])&&e.push(d[c]);e.sort(function(g,f){return g-f})}else e=b;for(a=0;a<e.length;a++)this.rows[e[a]].results=!0;this.results=e;Y.evaluate.call(this)};h.reset=function(){for(var b=0;b<this.rows.length;b++)!0===this.rows[b].results&&delete this.rows[b].results;this.results=null};h.refresh=function(){for(var b=[],c=0;c<this.rows.length;c++)!0===this.rows[c].results&&b.push(c);
|
|
380
|
+
return b};return h}(),xa=function(){var h=function(e){var g=document.createElement(_$_24da[32]);if(0<e.options.pagination&&e.options.paginationOptions&&0<e.options.paginationOptions.length){e.paginationDropdown=document.createElement(_$_24da[454]);e.paginationDropdown.classList.add(_$_24da[455]);e.paginationDropdown.onchange=function(){e.options.pagination=parseInt(this.value);e.page(0)};for(var f=0;f<e.options.paginationOptions.length;f++){var k=document.createElement(_$_24da[456]);k.value=e.options.paginationOptions[f];
|
|
381
|
+
k.innerHTML=e.options.paginationOptions[f];e.paginationDropdown.appendChild(k)}e.paginationDropdown.value=e.options.pagination;g.appendChild(document.createTextNode(E(_$_24da[457])));g.appendChild(e.paginationDropdown);g.appendChild(document.createTextNode(E(_$_24da[458])))}return g},b=function(e,g){var f=this.merged.rows;if(f[g]){for(;0<g&&f[g-1];)g--;for(;f[g];)e.push(g++)}else e.push(g)},c=function(e){var g=this.searchInput.parentNode;e?g.classList.add(_$_24da[460]):setTimeout(function(){g.classList.remove(_$_24da[460])},
|
|
382
|
+
500)},a=function(e,g){for(var f,k=0;k<this.options.columns.length;k++){f=_$_24da[3]+R.call(this,k,e);if(f.match(g))return!0;f=_$_24da[3]+this.getLabelFromCoords(k,e);if(f.match(g))return!0}return!1},d=function(e){e.search=d.update;e.resetSearch=d.reset;e.updateSearch=d.refresh;e.showSearch=d.show;e.hideSearch=d.hide};d.execute=function(e,g){null===e?e=this.searchInput.value||_$_24da[3]:e!==this.searchInput.value&&(this.searchInput.value=e);this.pageNumber=0;var f=[],k=null,n=null,l=this.options.freezeRows||
|
|
383
|
+
0;g=la.execute.call(this,g);if(e)try{var p=new RegExp(e,_$_24da[441]);if(g&&g.length){var q={};for(k=0;k<g.length;k++)q[g[k]]=!0}else q=null;for(k=0;k<this.rows.length;k++)n=!1,(!q||q[k])&&(n=this.parent.config.onsearchrow?G.call(this.parent,_$_24da[461],this,k,e):a.call(this,k,p))&&b.call(this,f,k)}catch(r){}else f=g;if(l)for(k=0;k<l;k++)f.push(k);if(f.length){f=new Set(f);f=Array.from(f);for(k=0;k<this.rows.length;k++)!0===this.rows[k].results&&f.push(k);f.sort(function(r,w){return r-w})}return f};
|
|
384
|
+
d.update=function(e){c.call(this,!0);Ba.reset.call(this);this.resetSelection();this.resetBorders();G.call(this.parent,_$_24da[462],this,e);var g=d.execute.call(this,e);if(typeof this.parent.config.onbeforesearch==_$_24da[112]){var f=G.call(this.parent,_$_24da[463],this,e,g);if(f)g=f;else if(!1===f)return c.call(this,!1),!1}this.pageNumber=0;g&&g.length<this.rows.length&&Ba[_$_24da[11]].call(this,g);ia.refresh.call(this);J.call(this,!0);G.call(this.parent,_$_24da[464],this,e,g);c.call(this,!1)};d.refresh=
|
|
385
|
+
function(){J.update.call(this);ia.refresh.call(this)};d.reset=function(){this.searchInput.value=_$_24da[3];Ba.reset.call(this);J.update.call(this);ia.refresh.call(this)};d.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_24da[3]};d.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_24da[52]};d.build=function(){this.searchContainer=document.createElement(_$_24da[32]);this.searchContainer.classList.add(_$_24da[465]);this.searchContainer.appendChild(h(this));
|
|
386
|
+
var e=this.searchContainer,g=e.appendChild,f=document.createElement(_$_24da[32]);f.innerHTML=E(_$_24da[444])+_$_24da[146];this.searchInput=document.createElement(_$_24da[271]);this.searchInput.classList.add(_$_24da[459]);f.appendChild(this.searchInput);g.call(e,f);0==this.options.search&&(this.searchContainer.style.display=_$_24da[52]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return d}(),Xa=function(){var h=function(b){b.contextmenu=document.createElement(_$_24da[32]);
|
|
387
|
+
b.contextmenu.className=_$_24da[466];jSuites.contextmenu(b.contextmenu,{onclick:function(c,a,d){c.close()}});return b.contextmenu};h.open=function(b,c){if(c[0]===_$_24da[467])var a=c[1],d=c[2];else c[0]===_$_24da[468]?(a=null,d=c[1]):c[0]===_$_24da[469]&&(a=c[1],d=null);var e=h[_$_24da[56]](this,a,d,b,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_24da[112]){var g=this.parent.config.contextMenu(this,a,d,b,e,c[0],c[1],c[2]);if(g)e=g;else if(!1===g)return!1}b.preventDefault();g=wa.execute.call(this.parent,
|
|
388
|
+
_$_24da[113],[this,a,d,b,e,c[0],c[1],c[2]]);e=g[4];this.parent.contextmenu.contextmenu.open(b,e)};h.isOpened=function(){return this.parent.contextmenu.contextmenu.isOpened()};h[_$_24da[56]]=function(b,c,a,d,e,g,f){var k=[],n=b.parent.config,l=-1!=navigator.userAgent.indexOf(_$_24da[470])?_$_24da[471]:_$_24da[472];e==_$_24da[473]&&(1==n.allowRenameWorksheet&&k.push({title:E(_$_24da[474]),onclick:function(){var q=prompt(E(_$_24da[474]),d.target.innerText);q&&b.parent.renameWorksheet(g,q)}}),1==n.allowDeleteWorksheet&&
|
|
389
|
+
k.push({title:E(_$_24da[475]),onclick:function(){confirm(E(_$_24da[476]),d.target.innerText)&&b.parent.deleteWorksheet(g)}}),k.push({type:_$_24da[477]}));e==_$_24da[478]&&(k.push({title:E(_$_24da[479]),onclick:function(){var q=prompt(E(_$_24da[479]),d.target.innerText);b.setNestedCell(g,f,{title:q})}}),k.push({type:_$_24da[477]}));if(e==_$_24da[469]||e==_$_24da[468]||e==_$_24da[467]||e==_$_24da[478])k.push({title:E(_$_24da[480]),icon:_$_24da[481],shortcut:l+_$_24da[482],onclick:function(){b.cut()}}),
|
|
390
|
+
k.push({title:E(_$_24da[483]),icon:_$_24da[484],shortcut:l+_$_24da[485],onclick:function(){b.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&k.push({title:E(_$_24da[486]),icon:_$_24da[487],shortcut:l+_$_24da[488],onclick:function(){b.selectedCell&&navigator.clipboard.readText().then(function(q){q&&b.paste(Math.min(b.selectedCell[0],b.selectedCell[2]),Math.min(b.selectedCell[1],b.selectedCell[3]),q)})}}),k.push({type:_$_24da[477]});e==_$_24da[469]&&(1==b.options.allowInsertColumn&&
|
|
391
|
+
k.push({title:E(_$_24da[489]),onclick:function(){b.insertColumn(1,parseInt(g),1)}}),1==b.options.allowInsertColumn&&k.push({title:E(_$_24da[490]),onclick:function(){b.insertColumn(1,parseInt(g),0)}}),1==b.options.allowDeleteColumn&&k.push({title:E(_$_24da[491]),onclick:function(){b.deleteColumn(b.getSelectedColumns().length?void 0:parseInt(c))}}),1==b.options.allowRenameColumn&&k.push({title:E(_$_24da[492]),onclick:function(){b.setHeader(g)}}),b.options.data.length||(k.push({type:_$_24da[477]}),k.push({title:E(_$_24da[493]),
|
|
392
|
+
onclick:function(){b.insertRow(0)}})),1==b.options.columnSorting&&(k.push({type:_$_24da[477]}),k.push({title:E(_$_24da[494]),onclick:function(){b.orderBy(g,0)}}),k.push({title:E(_$_24da[495]),onclick:function(){b.orderBy(g,1)}}),k.push({type:_$_24da[477]})),k.push({title:E(_$_24da[496]),onclick:function(){b.hideColumn(b.getSelectedColumns())}}),k.push({title:E(_$_24da[457]),onclick:function(){b.showColumn(b.getSelectedColumns())}}),k.push({type:_$_24da[477]}));if(e==_$_24da[467]||e==_$_24da[468])1==
|
|
393
|
+
b.options.allowInsertRow&&(k.push({title:E(_$_24da[497]),onclick:function(){b.insertRow(1,parseInt(a),1)}}),k.push({title:E(_$_24da[498]),onclick:function(){b.insertRow(1,parseInt(a))}})),1==b.options.allowDeleteRow&&k.push({title:E(_$_24da[499]),onclick:function(){b.deleteRow(b.getSelectedRows().length?void 0:parseInt(a))}}),k.push({type:_$_24da[477]});e==_$_24da[468]&&(k.push({title:E(_$_24da[496]),onclick:function(){b.hideRow(b.getSelectedRows(!0))}}),k.push({title:E(_$_24da[457]),onclick:function(){b.showRow(b.getSelectedRows(!0))}}),
|
|
394
|
+
k.push({type:_$_24da[477]}));if(e==_$_24da[467]&&1==b.options.allowComments){var p=b.records[f][g].element.getAttribute(_$_24da[317])||_$_24da[3];k.push({title:p?E(_$_24da[500]):E(_$_24da[501]),icon:_$_24da[502],onclick:function(){var q=H.getColumnNameFromCoords(g,f),r=prompt(E(_$_24da[503]),p);r&&b.setComments(q,r)}});p&&k.push({title:E(_$_24da[504]),onclick:function(){var q=H.getColumnNameFromCoords(g,f);b.setComments(q,_$_24da[3])}});k.push({type:_$_24da[477]})}e==_$_24da[505]&&(k.push({title:E(_$_24da[506]),
|
|
395
|
+
onclick:function(){b.showRow(b.getSelectedRows(!0));b.showColumn(b.getSelectedColumns())}}),k.push({type:_$_24da[477]}));n.allowExport&&k.push({title:E(_$_24da[507]),icon:_$_24da[508],shortcut:l+_$_24da[509],onclick:function(){b.download()}});n.about&&k.push({title:E(_$_24da[510]),icon:_$_24da[511],onclick:function(){!0===n.about?alert(L().print()):alert(n.about)}});return k};return h}(),ma=function(){var h=function(b){b.showToolbar=function(){h.show.call(b.parent)};b.hideToolbar=function(){h.hide.call(b.parent)};
|
|
396
|
+
b.refreshToolbar=function(){h.update.call(b.parent,b,b.selectedCell)}};h[_$_24da[11]]=function(b){this.toolbar.innerHTML=_$_24da[3];this.config.toolbar=h[_$_24da[56]].call(this,b);h.show.call(this)};h[_$_24da[56]]=function(b){b||(b=this.config.toolbar);var c=h.getDefault(b);b?Array.isArray(b)?b={items:b}:typeof b===_$_24da[112]&&(b=b({items:c})):b={};typeof b!==_$_24da[111]&&(b={});b.items||(b.items=c);typeof b.responsive==_$_24da[21]&&(b.responsive=!0,b.bottom=!1,b.maxWidth=this.element.offsetWidth);
|
|
397
|
+
return b};h.show=function(){this.toolbar.innerHTML||h.build.call(this);this.toolbar.style.display=_$_24da[3];this.element.classList.add(_$_24da[512])};h.hide=function(){this.toolbar.style.display=_$_24da[52];this.element.classList.remove(_$_24da[512])};h.update=function(b,c){var a=this.toolbarInstance;a&&(a.options.responsive&&(c=this.config.fullscreen?b.element.offsetWidth:b.options.tableWidth?parseInt(b.options.tableWidth):null,a.options.maxWidth=c,a.refresh()),a.update(b))};h.build=function(){for(var b=
|
|
398
|
+
h[_$_24da[56]].call(this),c=0;c<b.items.length;c++)if(b.items[c].type==_$_24da[454]){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,g,f){u.current.setStyle(u.current.getSelected(!1,!0),g.k,f)})}}else b.items[c].type==_$_24da[307]?(b.items[c].type=_$_24da[192],b.items[c].onclick=function(d,e,g){if(!g.color){var f=null;jSuites.color(g,{onchange:function(k,n){(f=
|
|
399
|
+
u.current.getSelected(!1,!0))&&u.current.setStyle(f,g.k,n)},onopen:function(k){var n;u.current.cursor?(n=u.current.cursor.style[g.k])?k.color.select(k.color.toHex(n)):k.color.select(_$_24da[3]):k.color.select(_$_24da[3])}});g.color.open()}}):!b.items[c].onclick&&b.items[c].k&&(b.items[c].onclick=function(){var d=u.current.getSelected(!1,!0);d&&d.length&&u.current.setStyle(d,this.k,this.v)});(c=wa.execute.call(this,_$_24da[114],[b]))&&(b=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,b);this.toolbarInstance.application=
|
|
400
|
+
this;b=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[b])};h.item=function(b){this.isEditable()?b.classList.remove(_$_24da[513]):b.classList.add(_$_24da[513])};h.getDefault=function(b){var c=[];c.push({content:_$_24da[514],onclick:function(){u.current&&u.current.undo()}});c.push({content:_$_24da[515],onclick:function(){u.current&&u.current.redo()}});c.push({content:_$_24da[508],onclick:function(){u.current&&u.current.download()}});c.push({type:_$_24da[516]});c.push({type:_$_24da[454],
|
|
401
|
+
width:_$_24da[517],options:[_$_24da[518],_$_24da[519],_$_24da[520],_$_24da[521]],render:function(d){return _$_24da[522]+d+_$_24da[278]+d+_$_24da[523]},onchange:function(d,e,g,f,k){u.current&&(k&&k!=_$_24da[128]?u.current.setStyle(u.current.getSelected(!1,!0),_$_24da[524],f):u.current.setStyle(u.current.getSelected(!1,!0),_$_24da[524],_$_24da[3]))},updateState:function(d,e,g,f){if((d=f.selectedCell)&&d.length&&f.records[d[1]][d[0]].element){var k=f.records[d[1]][d[0]].element.style.fontFamily||0;k&&
|
|
402
|
+
(k=k.replace(/"/g,_$_24da[3]),k=this.picker.options.data.findIndex(function(n){return n.toLowerCase()===k.toLowerCase()}),-1==k&&(k=0));g.picker.setValue(k)}h.item.call(f,g)}});c.push({type:_$_24da[454],width:_$_24da[525],content:_$_24da[526],options:[_$_24da[527],_$_24da[528],_$_24da[529],_$_24da[530],_$_24da[531]],render:function(d){return _$_24da[532]+d+_$_24da[278]+d+_$_24da[523]},onchange:function(d,e,g,f){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_24da[533],f)},updateState:function(d,
|
|
403
|
+
e,g,f){h.item.call(f,g)}});c.push({type:_$_24da[454],options:[_$_24da[534],_$_24da[535],_$_24da[536],_$_24da[537]],render:function(d){return _$_24da[538]+d+_$_24da[539]},onchange:function(d,e,g,f){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_24da[540],f.split(_$_24da[541])[2])},updateState:function(d,e,g,f){(d=f.selectedCell)&&d.length&&f.records[d[1]][d[0]].element&&(d=this.picker.options.data.indexOf(_$_24da[542]+(f.records[d[1]][d[0]].element.style.textAlign||f.options.defaultColAlign||
|
|
404
|
+
_$_24da[230])),g.picker.setValue(d));h.item.call(f,g)}});c.push({type:_$_24da[192],content:_$_24da[543],k:_$_24da[544],v:_$_24da[545],updateState:function(d,e,g,f){h.item.call(f,g)}});c.push({type:_$_24da[307],content:_$_24da[546],k:_$_24da[307],updateState:function(d,e,g,f){h.item.call(f,g)}});c.push({type:_$_24da[307],content:_$_24da[547],k:_$_24da[548],updateState:function(d,e,g,f){h.item.call(f,g)}});if(b===_$_24da[549]||typeof b===_$_24da[112]){var a=[_$_24da[183],_$_24da[550],_$_24da[182]];
|
|
405
|
+
c.push({type:_$_24da[454],options:[_$_24da[551],_$_24da[552],_$_24da[553]],render:function(d){return _$_24da[538]+d+_$_24da[539]},value:1,onchange:function(d,e,g,f,k){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_24da[554],a[k])},updateState:function(d,e,g,f){(d=f.selectedCell)&&d.length&&f.records[d[1]][d[0]].element&&(d=a.indexOf(f.records[d[1]][d[0]].element.style.verticalAlign||_$_24da[550]),g.picker.setValue(d));h.item.call(f,g)}});c.push({content:_$_24da[555],onclick:function(d,
|
|
406
|
+
e,g){u.current&&(d=u.current.getHighlighted())&&d.length&&(e=u.helpers.getColumnNameFromCoords(d[0],d[1]),u.current.records[d[1]][d[0]].merged?u.current.removeMerge(e):u.current.setMerge(e,d[2]-d[0]+1,d[3]-d[1]+1))},tooltip:E(_$_24da[556]),updateState:function(d,e,g,f){h.item.call(f,g)}})}c.push({type:_$_24da[454],data:[_$_24da[557],_$_24da[558],_$_24da[559],_$_24da[560],_$_24da[561],_$_24da[562],_$_24da[563],_$_24da[564],_$_24da[565],_$_24da[566]],columns:5,render:function(d){return _$_24da[538]+
|
|
407
|
+
d+_$_24da[539]},right:!0,onchange:function(d,e,g,f,k){if(d=u.current.getHighlighted()){g=e.thickness||1;e=e.color||_$_24da[567];k={};for(var n=d[0],l=d[1],p=d[2],q=d[3],r=d[1];r<=d[3];r++)for(var w=d[0];w<=d[2];w++){var x=H.getColumnNameFromCoords(w,r);k[x]||(k[x]=_$_24da[3]);k[x]=f!=_$_24da[562]&&f!=_$_24da[558]||w!=n?(f==_$_24da[559]||f==_$_24da[561])&&w>n?k[x]+(_$_24da[568]+g+_$_24da[569]+e+_$_24da[354]):f==_$_24da[557]?k[x]+(_$_24da[568]+g+_$_24da[569]+e+_$_24da[354]):k[x]+_$_24da[570]:k[x]+(_$_24da[568]+
|
|
408
|
+
g+_$_24da[569]+e+_$_24da[354]);k[x]=f!=_$_24da[557]&&f!=_$_24da[564]&&f!=_$_24da[558]||w!=p?k[x]+_$_24da[572]:k[x]+(_$_24da[571]+g+_$_24da[569]+e+_$_24da[354]);k[x]=f!=_$_24da[563]&&f!=_$_24da[558]||r!=l?(f==_$_24da[559]||f==_$_24da[560])&&r>l?k[x]+(_$_24da[573]+g+_$_24da[569]+e+_$_24da[354]):f==_$_24da[557]?k[x]+(_$_24da[573]+g+_$_24da[569]+e+_$_24da[354]):k[x]+_$_24da[574]:k[x]+(_$_24da[573]+g+_$_24da[569]+e+_$_24da[354]);k[x]=f!=_$_24da[557]&&f!=_$_24da[565]&&f!=_$_24da[558]||r!=q?k[x]+_$_24da[576]:
|
|
409
|
+
k[x]+(_$_24da[575]+g+_$_24da[569]+e+_$_24da[354])}Object.keys(k)&&u.current.setStyle(k,null,null,!0)}},onload:function(d,e){var g=document.createElement(_$_24da[32]),f=document.createElement(_$_24da[32]);g.appendChild(f);var k=jSuites.color(f,{closeOnChange:!1,onchange:function(n,l){n.parentNode.children[1].style.color=l;e.color=l}});f=document.createElement(_$_24da[192]);f.classList.add(_$_24da[193]);f.innerHTML=_$_24da[577];f.onclick=function(){k.open()};g.appendChild(f);d.children[1].appendChild(g);
|
|
410
|
+
f=document.createElement(_$_24da[32]);jSuites.picker(f,{type:_$_24da[454],data:[1,2,3,4,5],render:function(n){return _$_24da[578]+n+_$_24da[579]},onchange:function(n,l,p,q){e.thickness=q},width:_$_24da[580]});d.children[1].appendChild(f);f=document.createElement(_$_24da[32]);f.style.flex=_$_24da[581];d.children[1].appendChild(f)},updateState:function(d,e,g,f){h.item.call(f,g)}});c.push({type:_$_24da[516]});c.push({content:_$_24da[23],onclick:function(d,e,g){g.children[0].innerText==_$_24da[23]?(u.current.fullscreen(!0),
|
|
411
|
+
g.children[0].innerText=_$_24da[582]):(u.current.fullscreen(!1),g.children[0].innerText=_$_24da[23])},tooltip:_$_24da[583],updateState:function(d,e,g,f){g.children[0].innerText=1==f.parent.config.fullscreen?_$_24da[582]:_$_24da[23]}});c.push({content:_$_24da[584],onclick:function(d,e,g){u.current&&u.current.parent.tools.search?u.current.parent.tools.search.open(!0):g.children[0].innerText==_$_24da[584]?(xa.show.call(u.current),g.children[0].innerText=_$_24da[585]):(xa.hide.call(u.current),g.children[0].innerText=
|
|
412
|
+
_$_24da[584])},tooltip:_$_24da[586],updateState:function(d,e,g,f){g.children[0].innerText=1==f.options.search?_$_24da[585]:_$_24da[584]}});return c};return h}(),ua=function(){var h=function(b){b.createWorksheet=function(c){return b.parent.createWorksheet(c)};b.deleteWorksheet=function(c){return b.parent.deleteWorksheet(c)};b.renameWorksheet=function(c,a){return b.parent.renameWorksheet(c,a)};b.moveWorksheet=function(c,a){return b.parent.moveWorksheet(c,a)};b.openWorksheet=function(){return b.parent.openWorksheet(b.parent.getWorksheet(b))};
|
|
413
413
|
b.getWorksheet=function(c){return b.parent.getWorksheet(c)};b.getWorksheetActive=function(){return b.parent.getWorksheetActive()};b.getWorksheetName=function(){return b.options.worksheetName.toUpperCase()}};h.nextName=function(){var b=1,c,a=u.spreadsheet;if(a.length)for(var d=0;d<a.length;d++){var e=a[d].worksheets;if(e.length)for(var g=0;g<e.length;g++)e[g].options.worksheetName&&(c=e[g].options.worksheetName.match(/(\d+)/))&&(c=parseInt(c[0])+1,c>b&&(b=c))}return b};h.createWorksheet=function(b){if(!T.call(this))return!1;
|
|
414
|
-
b||(b={});var c=this.worksheets.length,a=G.call(this,_$
|
|
415
|
-
[b]),
|
|
416
|
-
_$
|
|
417
|
-
1)[0]);Q.call(this,{worksheet:a[c],action:_$
|
|
418
|
-
c,b))};h.getWorksheet=function(b){if(b&&typeof b==_$
|
|
419
|
-
_$
|
|
420
|
-
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=_$
|
|
421
|
-
_$
|
|
422
|
-
e||(e=a[d].getAttribute(_$
|
|
423
|
-
z;if(z=B.getAttribute(_$
|
|
424
|
-
0!=a){for(d=0;d<k[a].children.length;d++){var x=k[a].children[d].getAttribute(_$
|
|
425
|
-
_$
|
|
426
|
-
if(k.length){b=[];for(a=0;a<k.length;a++){e=[];for(d=0;d<k[a].children.length;d++)e.push(k[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++){g=e=!0;b[d]=[];for(a=0;a<c.data.length;a++)if(x=c.data[a][d],b[d][x]||(b[d][x]=0),b[d][x]++,25<x.length&&(e=!1),10==x.length){if(x.substr(4,1)!=_$
|
|
427
|
-
1<a&&a<=parseInt(.1*c.data.length)&&(c.columns[d].type=_$
|
|
428
|
-
_$
|
|
429
|
-
b=b[1]);b=b.split(_$
|
|
430
|
-
_$
|
|
431
|
-
v.target.parentNode.classList.contains(_$
|
|
432
|
-
_$
|
|
433
|
-
N,C,F,O,
|
|
434
|
-
p=function(v){var A=n(v);if(!1===A)return!1;A[0]?A[1]?u.current&&document.activeElement.classList.contains(_$
|
|
435
|
-
_$
|
|
436
|
-
v);return}if(1==
|
|
437
|
-
13==v.which?u.current.options.columns[C].type==_$
|
|
414
|
+
b||(b={});var c=this.worksheets.length,a=G.call(this,_$_24da[587],b,c);if(typeof a===_$_24da[111])b=a;else if(!1===a)return!1;b.data||b.minDimensions||(b.minDimensions=[8,8]);b.worksheetId||(b.worksheetId=jSuites.guid().substring(0,8));b.worksheetName||(b.worksheetName=_$_24da[421]+h.nextName());if(I(b.worksheetName))jSuites.notification({error:_$_24da[581],message:_$_24da[588]});else return a=va.worksheet(this,b),a.onload(),u.current&&u.current.resetSelection(),u.current=a,K.call(a,_$_24da[589],
|
|
415
|
+
[b]),ma.update.call(this,u.current),G.call(this,_$_24da[590],a,b,c),a};h.deleteWorksheet=function(b){var c=this.worksheets[b];if(!T.call(this,c))return!1;I(c.options.worksheetName,null);this.element.tabs.deleteElement(b);this.worksheets.splice(b,1);K.call(c,_$_24da[591],[b]);G.call(this,_$_24da[592],c,b)};h.renameWorksheet=function(b,c){var a=this.worksheets[b];if(!T.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,
|
|
416
|
+
_$_24da[3]);Number(c)==c&&(c=_$_24da[421]+Number(c));I(c)?alert(_$_24da[593]):(I(d,null),this.element.tabs.rename(b,c),a.options.worksheetName=c,I(c,a),Q.call(this,{worksheet:a,action:_$_24da[102],index:b,oldValue:d,newValue:c}),K.call(a,_$_24da[102],{worksheet:b,newValue:c}),La.updateWorksheetName.call(a,d,c),Y.updateWorksheetNames.call(a,d,c),G.call(this,_$_24da[594],a,b,c,d))};h.updateWorksheet=function(b,c){var a=this.worksheets;if(!T.call(this))return!1;this.worksheets.splice(c,0,a.splice(b,
|
|
417
|
+
1)[0]);Q.call(this,{worksheet:a[c],action:_$_24da[103],f:b,t:c});K.call(a[c],_$_24da[103],{f:b,t:c});G.call(this,_$_24da[595],a[c],b,c)};h.moveWorksheet=function(b,c){this.element.tabs.move(b,c)};h.openWorksheet=function(b){var c=this.worksheets[b];!c||u.current&&u.current==c||(this.element.tabs.getActive()!=b?this.element.tabs.open(b):this.element.tabs.setBorder(b),u.current&&u.current.resetSelection(),u.current=c,J.update.call(c),h.state.call(this,b),ma.update.call(this,u.current),G.call(this,_$_24da[596],
|
|
418
|
+
c,b))};h.getWorksheet=function(b){if(b&&typeof b==_$_24da[111]){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};h.getWorksheetActive=function(){return this.element.tabs.getActive()};h.getWorksheetInstance=function(b){return b===_$_24da[3]||typeof b==_$_24da[25]?(b=h.getWorksheet.call(this,b),!1===b?!1:this.worksheets[b]):this.worksheets[b]};h.state=function(b){try{if(typeof localStorage!==
|
|
419
|
+
_$_24da[21]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof b!==_$_24da[21])localStorage.setItem(_$_24da[399]+c,b);else{var a=parseInt(localStorage.getItem(_$_24da[399]+c));h.openWorksheet.call(this,a)}}}catch(d){}};return h}(),H=function(){var h={getCaretIndex:function(b){var c=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);
|
|
420
|
+
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=_$_24da[3];701<b?(c+=String.fromCharCode(64+parseInt(b/676)),c+=String.fromCharCode(64+parseInt(b%676/26))):25<b&&(c+=String.fromCharCode(64+parseInt(b/26)));return c+=String.fromCharCode(65+b%26)},getColumnNameFromCoords:function(b,c){return h.getColumnName(parseInt(b))+(parseInt(c)+1)},getCoordsFromColumnName:function(b){if(!b)return[];b=(_$_24da[3]+b).replace(new RegExp(/\$/),
|
|
421
|
+
_$_24da[3]);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]}}};h.shiftFormula=Y.shiftFormula;h.updateWorksheetName=Y.updateWorksheetName;h.createFromTable=function(b,c){if(b.tagName!=_$_24da[597])console.log(_$_24da[598]);else{c||(c={});c.columns=[];c.data=[];var a=b.querySelectorAll(_$_24da[599]);if(a.length)for(var d=0;d<a.length;d++){var e=a[d].style.width;
|
|
422
|
+
e||(e=a[d].getAttribute(_$_24da[197]));e&&(c.columns[d]||(c.columns[d]={}),c.columns[d].width=e)}e=function(B){var z=B.getBoundingClientRect();z=50<z.width?z.width:50;c.columns[d]||(c.columns[d]={});B.getAttribute(_$_24da[600])?c.columns[d].type=B.getAttribute(_$_24da[600]):c.columns[d].type=_$_24da[71];c.columns[d].width=z+_$_24da[57];c.columns[d].title=B.innerHTML;B.style.textAlign&&(c.columns[d].align=B.style.textAlign);B.classList.contains(_$_24da[601])&&(c.columns[d].readOnly=!0);if(z=B.getAttribute(_$_24da[602]))c.columns[d].name=
|
|
423
|
+
z;if(z=B.getAttribute(_$_24da[603]))c.columns[d].id=z};var g=[],f=b.querySelectorAll(_$_24da[604]);if(f.length){for(a=0;a<f.length-1;a++){var k=[];for(d=0;d<f[a].children.length;d++){var n={title:f[a].children[d].innerText,colspan:f[a].children[d].getAttribute(_$_24da[209])||1};k.push(n)}g.push(k)}f=f[f.length-1].children;for(d=0;d<f.length;d++)e(f[d])}n=0;var l={},p={},q={},r={},w=null;k=b.querySelectorAll(_$_24da[605]);for(a=0;a<k.length;a++)if(c.data[n]=[],1!=c.parseTableFirstRowAsHeader||f.length||
|
|
424
|
+
0!=a){for(d=0;d<k[a].children.length;d++){var x=k[a].children[d].getAttribute(_$_24da[606]);x?x.substr(0,1)!=_$_24da[18]&&(x=_$_24da[18]+x):x=k[a].children[d].innerHTML;c.data[n].push(x);x=H.getColumnNameFromCoords(d,a);(w=k[a].children[d].getAttribute(_$_24da[607]))&&(r[x]=w);w=parseInt(k[a].children[d].getAttribute(_$_24da[209]))||0;var y=parseInt(k[a].children[d].getAttribute(_$_24da[210]))||0;if(w||y)l[x]=[w||1,y||1];if(w=k[a].children[d].style&&k[a].children[d].style.display==_$_24da[52])k[a].children[d].style.display=
|
|
425
|
+
_$_24da[3];(w=k[a].children[d].getAttribute(_$_24da[129]))&&(q[x]=w);k[a].children[d].classList.contains(_$_24da[608])&&(q[x]=q[x]?q[x]+_$_24da[609]:_$_24da[610])}k[a].style&&k[a].style.height&&(p[a]={height:k[a].style.height});n++}else for(d=0;d<k[a].children.length;d++)e(k[a].children[d]);0<Object.keys(g).length&&(c.nestedHeaders=g);0<Object.keys(q).length&&(c.style=q);0<Object.keys(l).length&&(c.mergeCells=l);0<Object.keys(p).length&&(c.rows=p);0<Object.keys(r).length&&(c.classes=r);k=b.querySelectorAll(_$_24da[611]);
|
|
426
|
+
if(k.length){b=[];for(a=0;a<k.length;a++){e=[];for(d=0;d<k[a].children.length;d++)e.push(k[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++){g=e=!0;b[d]=[];for(a=0;a<c.data.length;a++)if(x=c.data[a][d],b[d][x]||(b[d][x]=0),b[d][x]++,25<x.length&&(e=!1),10==x.length){if(x.substr(4,1)!=_$_24da[257]||x.substr(7,1)!=_$_24da[257])g=!1}else g=!1;a=Object.keys(b[d]).length;g?c.columns[d].type=_$_24da[234]:1==e&&
|
|
427
|
+
1<a&&a<=parseInt(.1*c.data.length)&&(c.columns[d].type=_$_24da[73],c.columns[d].source=Object.keys(b[d]))}return c}};h.injectArray=function(b,c,a){return b.slice(0,c).concat(a).concat(b.slice(c))};h.parseCSV=function(b,c){c=c||_$_24da[37];for(var a=0,d=0,e=[[]],g=0,f=null,k=!1,n=!1,l=0;l<b.length;l++)if(e[d]||(e[d]=[]),e[d][a]||(e[d][a]=_$_24da[3]),b[l]!=_$_24da[612])if(b[l]!=_$_24da[613]&&b[l]!=c||0!=k&&1!=n&&f){b[l]==_$_24da[20]&&(k=!k);if(null===f){if(f=k,1==f)continue}else if(!0===f&&!n&&b[l]==
|
|
428
|
+
_$_24da[20]){b[l+1]==_$_24da[20]?(k=!0,e[d][a]+=b[l],l++):n=!0;continue}e[d][a]+=b[l]}else{f=null;n=k=!1;if(e[d][a][0]==_$_24da[20]){var p=e[d][a].trim();p[p.length-1]==_$_24da[20]&&(e[d][a]=p.substr(1,p.length-2))}b[l]==_$_24da[613]?(a=0,d++):(a++,a>g&&(g=a))}for(b=0;b<e.length;b++)for(l=0;l<=g;l++)void 0===e[b][l]&&(e[b][l]=_$_24da[3]);return e};h.getTokensFromRange=Y.getTokensFromRange;h.getRangeFromTokens=Y.getRangeFromTokens;h.getCoordsFromRange=function(b){-1!==b.indexOf(_$_24da[19])&&(b=b.split(_$_24da[19]),
|
|
429
|
+
b=b[1]);b=b.split(_$_24da[166]);b[1]||(b[1]=b[0]);var c=H.getCoordsFromColumnName(b[0]);b=H.getCoordsFromColumnName(b[1]);return[c[0],c[1],b[0],b[1]]};return h}(),Ga=function(){var h={},b=null,c=null,a=null,d=null,e=!1,g=null,f=null,k=null,n=function(v){function A(S){S.className&&(S.classList.contains(_$_24da[413])&&(M=S),S.classList.contains(_$_24da[424])&&(N=S),S.classList.contains(_$_24da[614])&&(V=S));S.parentNode&&S.parentNode.classList&&S.parentNode.classList.contains(_$_24da[394])&&(S.tagName==
|
|
430
|
+
_$_24da[615]?C=1:S.tagName==_$_24da[616]?C=2:S.tagName==_$_24da[617]&&(C=3));S.parentNode&&!M&&A(S.parentNode)}var C=null,F=null,M=null,N=null,V=null,O=null,oa=null,X=null;A(v.target);if(null!==V)return!1;if(M)if(v.target.classList.contains(_$_24da[392]))F=_$_24da[505];else if(v.target.classList.contains(_$_24da[402]))F=_$_24da[168];else if(v.target.classList.contains(_$_24da[324]))F=_$_24da[468],O=parseInt(v.target.getAttribute(_$_24da[60]));else if(v.target.parentNode&&v.target.parentNode.classList&&
|
|
431
|
+
v.target.parentNode.classList.contains(_$_24da[226]))O=v.target.getAttribute(_$_24da[231]),oa=v.target.getAttribute(_$_24da[232]),null===O?F=_$_24da[505]:(F=_$_24da[478],O=parseInt(O),oa=parseInt(oa));else if(v.target.parentNode&&v.target.parentNode.classList&&v.target.parentNode.classList.contains(_$_24da[185]))F=_$_24da[618];else if(v.target.classList.contains(_$_24da[189]))F=_$_24da[618];else if(v.target.parentNode&&v.target.parentNode.classList&&v.target.parentNode.classList.contains(_$_24da[619]))F=
|
|
432
|
+
_$_24da[473],O=Array.prototype.indexOf.call(v.target.parentNode.children,v.target);else if(1==C)F=_$_24da[469],O=v.target.clientWidth-v.offsetX,v.target.classList.contains(_$_24da[217])&&3<O&&20>O&&(F=_$_24da[620]),O=v.target.getAttribute(_$_24da[65]);else if(2==C){if(v=l(v,M))F=_$_24da[467],O=v[0],oa=v[1],X=v[2]}else if(3==C){if(O=v.target.getAttribute(_$_24da[65]),oa=v.target.getAttribute(_$_24da[60]),O||oa)F=_$_24da[621]}else C||jSuites.findElement(v.target,_$_24da[622])&&(F=_$_24da[114]);return[M,
|
|
433
|
+
N,C,F,O,oa,X]},l=function(v,A){if(v.changedTouches&&v.changedTouches[0]){var C=v.changedTouches[0].clientX;v=v.changedTouches[0].clientY}else C=v.clientX,v=v.clientY;A=A.spreadsheet.config.root?A.spreadsheet.config.root:document;if(A.elementsFromPoint)var F=A.elementsFromPoint(C,v);else A.msElementsFromPoint&&(F=A.msElementsFromPoint(C,v));for(A=0;A<F.length;A++)if(C=F[A].getAttribute(_$_24da[65]),v=F[A].getAttribute(_$_24da[60]),null!=C&&null!=v)return C=parseInt(C),v=parseInt(v),[C,v,F[A]];return!1},
|
|
434
|
+
p=function(v){var A=n(v);if(!1===A)return!1;A[0]?A[1]?u.current&&document.activeElement.classList.contains(_$_24da[123])?document.activeElement.worksheet||(document.activeElement.worksheet=A[1].jexcel):u.current!=A[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=A[1].jexcel):u.current||(v=A[0].tabs.getActive(),0<=v&&(u.current=A[0].spreadsheet.worksheets[v])):u.current&&!jSuites.findElement(v.target,_$_24da[272])&&(u.current.resetSelection(!0),u.current=null);return A};h.input=function(v){if(v.target.tagName==
|
|
435
|
+
_$_24da[623]&&v.target.classList.contains(_$_24da[123])){var A=null;v.target.worksheet?A=v.target.worksheet:u.current&&(A=u.current);A&&ta.parse.call(A,v.target)}};h.keydown=function(v){if(u.current){v.target.tagName==_$_24da[623]&&v.target.classList.contains(_$_24da[123])&&ta.onkeydown.call(u.current,v);if(27==v.which){if(u.current.edition){u.current.closeEditor(u.current.edition,!1);v.preventDefault();return}if(ya.event){ya.cancel.call(u.current,v);v.preventDefault();return}if(fa.event){fa.cancel.call(u.current,
|
|
436
|
+
v);return}if(1==la.isVisible()){la.close.call(u.current,!1);v.preventDefault();return}}if(v.target.classList.contains(_$_24da[445])){var A=v.target;g&&clearTimeout(g);g=setTimeout(function(){la.search.call(u.current,A.value);g=null},500)}else if(v.target.classList.contains(_$_24da[459]))A=v.target,g&&clearTimeout(g),g=setTimeout(function(){u.current.search(A.value);g=null},400);else if(!v.target.classList.contains(_$_24da[272]))if(u.current.edition){var C=u.current.edition.getAttribute(_$_24da[65]);
|
|
437
|
+
13==v.which?u.current.options.columns[C].type==_$_24da[234]?u.current.closeEditor(u.current.edition,!0):u.current.options.columns[C].type!=_$_24da[73]&&u.current.options.columns[C].type!=_$_24da[624]&&u.current.options.columns[C].type!=_$_24da[502]&&(v.altKey?u.current.parent.input.classList.contains(_$_24da[625])||document.execCommand(_$_24da[626],!1,_$_24da[627]):(u.current.closeEditor(u.current.edition,!0),u.current.parent.config.moveDownOnEnter&&u.current.down(),v.preventDefault())):9==v.which?
|
|
438
438
|
(u.current.closeEditor(u.current.edition,!0),u.current.right(),v.preventDefault()):39!=v.which&&37!=v.which&&38!=v.which&&40!=v.which||u.current.parent.input.selected||(u.current.closeEditor(u.current.edition,!0),37==v.which?u.current.left(v.shiftKey,v.ctrlKey):39==v.which?u.current.right(v.shiftKey,v.ctrlKey):38==v.which?u.current.up(v.shiftKey,v.ctrlKey):40==v.which&&u.current.down(v.shiftKey,v.ctrlKey),v.preventDefault())}else{if((v.ctrlKey||v.metaKey)&&!v.shiftKey){if(65==v.which){u.current.selectAll();
|
|
439
|
-
v.preventDefault();return}if(83==v.which){u.current.download();v.preventDefault();return}if(89==v.which){u.current.parent.redo();v.preventDefault();return}if(90==v.which){u.current.parent.undo();v.preventDefault();return}if(70==v.which&&u.current.parent.tools.search){u.current.parent.tools.search.open(!0);v.preventDefault();return}}if(u.current.selectedCell)if(33==v.which)0<u.current.options.pagination?
|
|
440
|
-
v.which)0<u.current.options.pagination?
|
|
441
|
-
else if(35==v.which)u.current.last(v.shiftKey,v.ctrlKey),v.preventDefault();else if(32==v.which)u.current.setCheckRadioValue(),v.preventDefault();else if(46==v.which||8==v.which)u.current.isEditable()&&u.current.setValue(u.current.getSelected(!1,!0),_$
|
|
439
|
+
v.preventDefault();return}if(83==v.which){u.current.download();v.preventDefault();return}if(89==v.which){u.current.parent.redo();v.preventDefault();return}if(90==v.which){u.current.parent.undo();v.preventDefault();return}if(70==v.which&&u.current.parent.tools.search){u.current.parent.tools.search.open(!0);v.preventDefault();return}}if(u.current.selectedCell)if(33==v.which)0<u.current.options.pagination?Ea.pageUp.call(u.current):v.altKey?J.pageLeft.call(u.current):J.pageUp.call(u.current);else if(34==
|
|
440
|
+
v.which)0<u.current.options.pagination?Ea.pageDown.call(u.current):v.altKey?J.pageRight.call(u.current):J.pageDown.call(u.current);else if(37==v.which)u.current.left(v.shiftKey,v.ctrlKey),v.preventDefault();else if(39==v.which)u.current.right(v.shiftKey,v.ctrlKey),v.preventDefault();else if(38==v.which)u.current.up(v.shiftKey,v.ctrlKey),v.preventDefault();else if(40==v.which)u.current.down(v.shiftKey,v.ctrlKey),v.preventDefault();else if(36==v.which)u.current.first(v.shiftKey,v.ctrlKey),v.preventDefault();
|
|
441
|
+
else if(35==v.which)u.current.last(v.shiftKey,v.ctrlKey),v.preventDefault();else if(32==v.which)u.current.setCheckRadioValue(),v.preventDefault();else if(46==v.which||8==v.which)u.current.isEditable()&&u.current.setValue(u.current.getSelected(!1,!0),_$_24da[3]);else if(13==v.which)v.shiftKey?u.current.up():(1==u.current.options.allowManualInsertRow&&u.current.selectedCell[1]==(u.current.results?u.current.results[u.current.results.length-1]:u.current.rows.length-1)&&u.current.insertRow(null,null,null,
|
|
442
442
|
null,v),u.current.selectedCell&&u.current.down()),v.preventDefault();else if(9==v.which)v.shiftKey?u.current.left():(C=u.current.selectedCell[0],u.current.right(),1==u.current.options.allowInsertColumn&&1==u.current.options.allowManualInsertColumn&&u.current.selectedCell[0]==C&&(u.current.insertColumn(null,null,null,null,null,null,v),u.current.right())),v.preventDefault();else if((v.ctrlKey||v.metaKey)&&!v.shiftKey)67==v.which?(u.current.copy(),v.preventDefault()):88==v.which?(u.current.cut(),v.preventDefault()):
|
|
443
|
-
86==v.which?v.target.classList.contains(_$
|
|
444
|
-
_$
|
|
445
|
-
null),f=setTimeout(function(){if(e){var A=q[0],C=q[1],F=u.current.content.getBoundingClientRect();50>F.height-(C-F.top)?J.down.call(u.current):80>C-F.top&&J.up.call(u.current);50>F.width-(A-F.left)?J.right.call(u.current):80>A-F.left&&J.left.call(u.current);r(v)}f=null},100))},w=function(v,A,C,F,
|
|
446
|
-
d!==N)return!1;u.current!==
|
|
447
|
-
p(v);if(!1===C)return!1;k=C;if(1<A)if(C[3]==_$
|
|
448
|
-
_$
|
|
449
|
-
(C[3]==_$
|
|
450
|
-
A,F,v,C[3],C[1].jexcel):(w(0,F,A,F,v,C[3],C[1].jexcel),c=0,a=F));else if(C[3]==_$
|
|
451
|
-
A,F,v,C[3],C[1].jexcel):(w(A,F,A,F,v,C[3],C[1].jexcel),c=A,a=F)}}d=C[3];typeof C[3]!==_$
|
|
452
|
-
u.current.edition&&v.target.classList.contains(_$
|
|
453
|
-
v.changedTouches[0].clientX;var C=v.changedTouches[0].clientY}else A=v.clientX,C=v.clientY;q=[A,C];if(u.current)if(A=v.target.getAttribute(_$
|
|
454
|
-
v.offsetWidth,v.h=v.offsetHeight);else{var F=v.target.getBoundingClientRect();b&&(b.style.cursor=_$
|
|
455
|
-
!0):v.target.classList.contains(_$
|
|
456
|
-
parseInt(A)+1&&5>F.width-(v.clientX-F.left)?(b=v.target,b.style.cursor=_$
|
|
457
|
-
|
|
458
|
-
w(0,a,C,F,v,A[3],A[1].jexcel)):A[3]==_$
|
|
459
|
-
null,v)}};h.paste=function(v){if(!v.target.classList.contains(_$
|
|
460
|
-
v,A)))};var x=null,y=null,B=null,z=null,D=null;h.touchstart=function(v){var A=n(v);A[0]?A[1]&&u.current!=A[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=A[1].jexcel):u.current&&(u.current.resetSelection(),u.current=null);u.current&&!u.current.edition?A[3]==_$
|
|
461
|
-
setTimeout(function(){x=y=z=null},400),B=setTimeout(function(){h.contextmenu(v);B=null},800)),x=v.target):z=null:z=null};h.touchmove=function(v){if(u.current){var A=null,C=null,F=null,
|
|
462
|
-
N,
|
|
463
|
-
z[4];var C=z[5];var F=A;v=C}else z[3]===_$
|
|
464
|
-
h);h.parentNode.removeChild(h);h=a}b||(b={});u.defaultRowHeight||(a=document.createElement(_$
|
|
465
|
-
|
|
466
|
-
G.call(e,_$
|
|
467
|
-
u.picker=
|
|
468
|
-
b=u.spreadsheet.indexOf(h.spreadsheet);u.spreadsheet.splice(b,1);for(c=0;c<h.spreadsheet.worksheets.length;c++)I(h.spreadsheet.worksheets[c].options.worksheetName,null);h.spreadsheet=null;h.jexcel=null;h.innerHTML=_$
|
|
469
|
-
h.createEditor=function(c,a,d,e){e.parent.input.setAttribute(_$
|
|
470
|
-
_$
|
|
471
|
-
return g.mask===_$
|
|
472
|
-
l,!0))&&p.value!==_$
|
|
473
|
-
e.innerText=g:e.innerHTML=g;if(null!==q)return q}};c.openEditor=function(e,g,f,k,n,l){var p=n.parent.input;p.onblur=function(){p.classList.contains(_$
|
|
474
|
-
l.locale&&p.setAttribute(_$
|
|
475
|
-
(k.resetArray(e,g),a(f)&&(f=k.executeFormula(f,e,g)));f instanceof Element||f instanceof HTMLDocument||(l&&(!n.rotate&&jSuites.isNumeric(f)?l.classList.add(_$
|
|
476
|
-
e,!0))):l=jSuites.mask.render(f,e,!0),l&&(f=l)));return f};c[_$
|
|
477
|
-
e:g.innerHTML=e,d.innerHTML=_$
|
|
478
|
-
c.updateCell(a,d,e,g,f,k))return a},destroyCell:function(a){a.classList.remove(_$
|
|
479
|
-
k.filter(f.el,a,e,g,k.source));typeof k.filterOptions==_$
|
|
480
|
-
_$
|
|
481
|
-
return e.join(a)},getItem:function(a,d,e,g,f,k){g=k.delimiter||_$
|
|
482
|
-
_$
|
|
483
|
-
function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$
|
|
484
|
-
2==f[1].length&&f[1]==Number(f[1])?!0:!1);f||(f=jSuites.calendar.extractDateFromString(e,n))&&(g=f);if(g=jSuites.calendar.getDateString(g,n))return d.innerText=g,e;d.innerText=_$
|
|
485
|
-
_$
|
|
486
|
-
h.color=function(){var c={},a=null;c.updateCell=function(d,e,g,f,k,n){d&&(n.render==_$
|
|
487
|
-
d,e,k);a=jSuites.color(a,g);a.open()};c.closeEditor=function(d,e,g,f,k,n){d=a.close(!0);if(e)return d};c[_$
|
|
488
|
-
!f.isEditable())return n.preventDefault(),n.stopPropagation(),!1;f.setValue(a,this.checked)};a.innerHTML=_$
|
|
489
|
-
return c}();h.radio=function(){var c={createCell:function(a,d,e,g,f,k){a.getAttribute(_$
|
|
490
|
-
0;k<f.options.data.length;k++)g!=k&&f.options.data[k][e]&&a.push({x:e,y:k,value:0});a.length&&f.setValue(a)}return d},openEditor:function(a,d,e,g,f){return!1},closeEditor:function(a,d){return!1}};c[_$
|
|
491
|
-
0);e?c.isValid(e,g,f,k)||(e=_$
|
|
492
|
-
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==_$
|
|
493
|
-
f,k,n){a=h.createEditor(_$
|
|
494
|
-
d,e,k);a.type=_$
|
|
495
|
-
n.className=_$
|
|
496
|
-
c.openEditor=function(a,d,e,g,f,k){f.parent.input.classList.add(_$
|
|
497
|
-
d.children[0].tagName==_$
|
|
498
|
-
function(p){if(!p){p=parseInt(l.style.top)||0;var q=parseInt(l.style.left)||0,r=parseInt(l.style.width)||40,w=parseInt(l.style.height)||40,x=d.getAttribute(_$
|
|
499
|
-
_$
|
|
500
|
-
e,g,f,k,n){if(e&&(d=a.children[0]))return d.tagName==_$
|
|
501
|
-
{};l.focus=!0;l.value=e;l.border=!1;l.height=_$
|
|
502
|
-
{},a=null;c.createCell=function(d,e){d.classList.add(_$
|
|
503
|
-
a.getValue();if(e)return d};return c}();h.record=function(){var c={},a=null;c.createCell=function(d,e,g,f,k,n){d.classList.add(_$
|
|
504
|
-
c.getValue(d,e,g,f,k,n))};c.openEditor=function(d,e,g,f,k,n){var l=n.delimiter||_$
|
|
505
|
-
(g.value=(_$
|
|
506
|
-
e).split(_$
|
|
507
|
-
{id:f.getRowId(d),name:k},void 0!=e.worksheetImage&&(k.image=f.value(e.worksheetImage,d)),n.push(k)}else console.error(_$
|
|
508
|
-
_$
|
|
443
|
+
86==v.which?v.target.classList.contains(_$_24da[272])||h.paste(v):189==v.which&&(1==u.current.options.allowDeleteRow&&k[3]==_$_24da[468]?(ka.isValid.call(u.current,u.current.selectedCell)&&u.current.deleteRow(),v.preventDefault()):1==u.current.options.allowDeleteColumn&&k[3]==_$_24da[469]&&(ka.isValid.call(u.current,u.current.selectedCell)&&u.current.deleteColumn(),v.preventDefault()));else if(u.current.isEditable()){C=u.current.selectedCell[1];var F=u.current.selectedCell[0];u.current.options.columns[F].type!=
|
|
444
|
+
_$_24da[26]&&(32==v.keyCode?u.current.options.columns[F].type==_$_24da[303]||u.current.options.columns[F].type==_$_24da[310]?v.preventDefault():u.current.openEditor(u.current.records[C][F].element,!0,v):113==v.keyCode?u.current.openEditor(u.current.records[C][F].element,!1,v):1!=v.key.length&&v.key!=_$_24da[628]||v.altKey||v.ctrlKey||u.current.records[C]&&u.current.openEditor(u.current.records[C][F].element,!0,v))}}}};var q=[0,0],r=function(v){e&&J.limited.call(u.current)&&(f&&(clearTimeout(f),f=
|
|
445
|
+
null),f=setTimeout(function(){if(e){var A=q[0],C=q[1],F=u.current.content.getBoundingClientRect();50>F.height-(C-F.top)?J.down.call(u.current):80>C-F.top&&J.up.call(u.current);50>F.width-(A-F.left)?J.right.call(u.current):80>A-F.left&&J.left.call(u.current);r(v)}f=null},100))},w=function(v,A,C,F,M,N,V){if(document.activeElement.classList.contains(_$_24da[123])&&ta.update.call(u.current,v,A,C,F,M,document.activeElement,V))return!1;if(u.current.edition)u.current.closeEditor(u.current.edition,!0);else if(d&&
|
|
446
|
+
d!==N)return!1;u.current!==V&&(u.current.resetSelection(),u.current=V);ta.current?ta.range.call(u.current,v,A,C,F,M):ka[_$_24da[11]].call(u.current,v,A,C,F,M)};h.mousedown=function(v){v=v||window.event;var A=v.buttons?v.buttons:v.button?v.button:v.which;if(u.current)if(1==la.isVisible()&&(jSuites.findElement(v.target,_$_24da[449])||la.close.call(u.current,!1)),u.current.edition){if(jSuites.findElement(v.target,_$_24da[130]))return!1}else if(jSuites.findElement(v.target,_$_24da[272]))return!1;var C=
|
|
447
|
+
p(v);if(!1===C)return!1;k=C;if(1<A)if(C[3]==_$_24da[467]){if(u.current.isSelected(C[4],C[5]))return!1}else if(C[3]==_$_24da[468]){if(u.current.isSelected(0,C[4]))return!1}else if(C[3]==_$_24da[469]&&u.current.isSelected(C[4],0))return!1;if(u.current){if(C[3]==_$_24da[168])u.current.isEditable()&&(fa.event=!0);else if(C[3]==_$_24da[620])la.open.call(u.current,C[4]);else{if(1==C[2])if(b)b.style.cursor==_$_24da[629]?ya.start.call(u.current,v):b.style.cursor==_$_24da[630]?Da.start.call(u.current,v):b.style.cursor==
|
|
448
|
+
_$_24da[631]&&(!0===b.column?ea.start.call(u.current,v,0):!1===b.column?ja.start.call(u.current,v,0):ea.start.call(u.current,v,parseInt(C[4])+1));else{A=u.current.options.columns.length-1;var F=u.current.options.data.length-1;if(C[3]==_$_24da[505])w(0,0,A,F,v,C[3],C[1].jexcel),a=c=0;else if(C[3]==_$_24da[478]){var M=Aa.range.call(u.current,C[5])[C[4]];M[1]>A&&(M[1]=A);w(M[0],0,M[1],F,v,C[3],C[1].jexcel);c=M[0];a=0}else C[4]&&((v.shiftKey||v.ctrlKey)&&null!=c&&null!=a?w(c,0,C[4],F,v,C[3],C[1].jexcel):
|
|
449
|
+
(C[3]==_$_24da[469]&&c==C[4]&&1==u.current.options.allowRenameColumn&&(f=setTimeout(function(){u.current.setHeader(C[4])},800)),w(C[4],0,C[4],F,v,C[3],C[1].jexcel),c=C[4],a=0))}if(2==C[2])if(C[3]==_$_24da[468])b?b.style.cursor==_$_24da[629]?ya.start.call(u.current,v):b.style.cursor==_$_24da[632]?Da.start.call(u.current,v):b.style.cursor==_$_24da[631]&&ja.start.call(u.current,v,parseInt(C[4])+1):(A=u.current.options.columns.length-1,F=parseInt(C[4]),(v.shiftKey||v.ctrlKey)&&null!=c&&null!=a?w(0,a,
|
|
450
|
+
A,F,v,C[3],C[1].jexcel):(w(0,F,A,F,v,C[3],C[1].jexcel),c=0,a=F));else if(C[3]==_$_24da[467]){A=parseInt(C[4]);F=parseInt(C[5]);if(!u.current.edition&&(M=u.current.options.columns[C[4]].type,v.target.tagName==_$_24da[633]&&(M==_$_24da[305]||M==_$_24da[306])&&v.target.parentNode.classList.contains(_$_24da[157]))){var N=v.target.innerText;M==_$_24da[305]&&(N=_$_24da[634]+N);window.open(N,_$_24da[635])}(v.shiftKey||v.ctrlKey)&&u.current.selectedCell?w(u.current.selectedCell[0],u.current.selectedCell[1],
|
|
451
|
+
A,F,v,C[3],C[1].jexcel):(w(A,F,A,F,v,C[3],C[1].jexcel),c=A,a=F)}}d=C[3];typeof C[3]!==_$_24da[21]&&G.call(u.current.parent,_$_24da[636],u.current,C[3],C[4],C[5],v);e=!0;C[3]!==_$_24da[467]&&C[3]!==_$_24da[168]||r(v)}else e=!1};h.mouseup=function(v){u.current&&(ya.event?ya.end.call(u.current,v):Da.event?Da.end.call(u.current,v):ea.event?ea.end.call(u.current,v):ja.event?ja.end.call(u.current,v):fa.event?fa.end.call(u.current,v):v.target.classList.contains(_$_24da[448])?la.close.call(u.current,!0):
|
|
452
|
+
u.current.edition&&v.target.classList.contains(_$_24da[637])&&50>v.target.clientWidth-v.offsetX&&50>v.offsetY?pa.close.call(u.current,null,!0):v.target.classList.contains(_$_24da[377])&&(v=v.target.innerText==_$_24da[15]?0:v.target.innerText==_$_24da[17]?v.target.getAttribute(_$_24da[317])-1:v.target.innerText-1,Ea[_$_24da[11]].call(u.current,parseInt(v))));f&&(clearTimeout(f),f=null);e=d=!1;ta.current&&ta.close.call(u.current)};h.mousemove=function(v){v=v||window.event;if(v.changedTouches&&v.changedTouches[0]){var A=
|
|
453
|
+
v.changedTouches[0].clientX;var C=v.changedTouches[0].clientY}else A=v.clientX,C=v.clientY;q=[A,C];if(u.current)if(A=v.target.getAttribute(_$_24da[65]),C=v.target.getAttribute(_$_24da[60]),1==e)ya.event?ya.update.call(u.current,v):Da.event?Da.update.call(u.current,v):ea.event?ea.move.call(u.current,v):ja.event?ja.move.call(u.current,v):u.current.options.tableOverflow&&(v=u.current.content,(v.w&&v.w!==v.offsetWidth||v.h&&v.h!==v.offsetHeight)&&u.current.setViewport(v.offsetWidth,v.offsetHeight),v.w=
|
|
454
|
+
v.offsetWidth,v.h=v.offsetHeight);else{var F=v.target.getBoundingClientRect();b&&(b.style.cursor=_$_24da[3],b=null);1==u.current.options.editable&&v.target&&(v.target.classList.contains(_$_24da[392])?u.current.options.freezeRowControl&&!u.current.options.freezeRows&&5>F.height-(v.clientY-F.top)?(b=v.target,b.style.cursor=_$_24da[631],b.column=!1):u.current.options.freezeColumnControl&&!u.current.options.freezeColumns&&5>F.width-(v.clientX-F.left)&&(b=v.target,b.style.cursor=_$_24da[631],b.column=
|
|
455
|
+
!0):v.target.classList.contains(_$_24da[324])?u.current.options.freezeRowControl&&u.current.options.freezeRows==parseInt(C)+1&&5>F.height-(v.clientY-F.top)?(b=v.target,b.style.cursor=_$_24da[631]):1==u.current.options.rowDrag&&6>F.width-(v.clientX-F.left)?(b=v.target,b.style.cursor=_$_24da[629]):1==u.current.options.rowResize&&6>F.height-(v.clientY-F.top)&&(b=v.target,b.style.cursor=_$_24da[632]):v.target.classList.contains(_$_24da[214])&&(u.current.options.freezeColumnControl&&u.current.options.freezeColumns==
|
|
456
|
+
parseInt(A)+1&&5>F.width-(v.clientX-F.left)?(b=v.target,b.style.cursor=_$_24da[631]):1==u.current.options.columnResize&&6>F.width-(v.clientX-F.left)?(b=v.target,b.style.cursor=_$_24da[630]):1==u.current.options.columnDrag&&6>F.height-(v.clientY-F.top)&&(b=v.target,b.style.cursor=_$_24da[629])))}};h.mouseover=function(v){v=v||window.event;if(u.current&&1==e){var A=n(v);if(A[0]){if(!document.activeElement.classList.contains(_$_24da[123])&&A[1]&&u.current!=A[1].jexcel&&u.current)return!1;if(!(ya.event||
|
|
457
|
+
Da.event||ea.event||ja.event))if(fa.event){var C=v.target.getAttribute(_$_24da[65]),F=v.target.getAttribute(_$_24da[60]);u.current.isSelected(C,F)?fa.reset.call(u.current):null!==C&&null!==F&&fa.call(u.current,C,F)}else null!==c&&null!==a&&(1==A[2]&&(C=c,A[3]==_$_24da[469]&&(C=v.target.getAttribute(_$_24da[65])),F=u.current.options.data.length-1,w(c,0,C,F,v,A[3],A[1].jexcel),f&&(clearTimeout(f),f=null)),2==A[2]&&(A[3]==_$_24da[468]?(C=u.current.options.columns.length-1,F=parseInt(v.target.getAttribute(_$_24da[60])),
|
|
458
|
+
w(0,a,C,F,v,A[3],A[1].jexcel)):A[3]==_$_24da[467]&&(C=A[4],F=A[5],w(c,a,C,F,v,A[3],A[1].jexcel))))}}};h.dblclick=function(v){if(u.current)if(v.target.classList.contains(_$_24da[402]))fa.execute.call(u.current,!1);else{var A=n(v);1==A[2]?(v=v.target.getAttribute(_$_24da[65]))&&(b&&b.style.cursor==_$_24da[630]?u.current.autoWidth(u.getSelectedColumns()):1==u.current.options.columnSortingOnDblClick&&u.current.orderBy(v)):2==A[2]&&u.current.isEditable()&&!u.current.edition&&A[6]&&u.current.openEditor(A[6],
|
|
459
|
+
null,v)}};h.paste=function(v){if(!v.target.classList.contains(_$_24da[272])&&u.current&&u.current.selectedCell&&!u.current.edition){var A=v.clipboardData||window.clipboardData;A&&(u.current.paste(Math.min(u.current.selectedCell[0],u.current.selectedCell[2]),Math.min(u.current.selectedCell[1],u.current.selectedCell[3]),A.getData(_$_24da[71])),v&&v.preventDefault())}};h.contextmenu=function(v){var A=p(v);!1!==A&&(A[1]||(A=k),u.current&&!u.current.edition&&(A=Array.prototype.slice.call(A,3),Xa.open.call(u.current,
|
|
460
|
+
v,A)))};var x=null,y=null,B=null,z=null,D=null;h.touchstart=function(v){var A=n(v);A[0]?A[1]&&u.current!=A[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=A[1].jexcel):u.current&&(u.current.resetSelection(),u.current=null);u.current&&!u.current.edition?A[3]==_$_24da[168]?u.current.isEditable()&&(fa.event=!0):v.target&&v.target.classList.contains(_$_24da[171])?D=parseInt(v.target.getAttribute(_$_24da[172])):A[3]==_$_24da[467]?(z=A,x===v.target&&y?u.current.openEditor(v.target,!1,v):(y=
|
|
461
|
+
setTimeout(function(){x=y=z=null},400),B=setTimeout(function(){h.contextmenu(v);B=null},800)),x=v.target):z=null:z=null};h.touchmove=function(v){if(u.current){var A=null,C=null,F=null,M=null;if(v.changedTouches&&v.changedTouches[0]){var N=v.changedTouches[0].clientX;var V=v.changedTouches[0].clientY}else N=v.clientX,V=v.clientY;if(V=document.elementFromPoint(N,V))if(N=V.getAttribute(_$_24da[65]),V=V.getAttribute(_$_24da[60]),null!==N&&null!==V&&fa.event)u.current.isSelected(N,V)||(fa.call(u.current,
|
|
462
|
+
N,V),r(v)),v.preventDefault();else if(null!==D){N=parseInt(N);V=parseInt(V);var O=u.current.selectedCell;0==D?N<=O[2]&&(A=N,F=O[2],C=O[1],M=O[3]):2==D?N>=O[0]&&(A=O[0],C=O[1],F=N,M=O[3]):1==D?V<=O[3]&&(A=O[0],C=V,F=O[2],M=O[3]):3==D&&V>=O[1]&&(A=O[0],C=O[1],F=O[2],M=V);null!==A&&u.current.updateSelectionFromCoords(A,C,F,M);v.preventDefault()}else z=null;B&&clearInterval(B)}};h.touchend=function(v){if(fa.event)fa.end.call(u.current,v);else if(null!==D)D=null;else if(z){v=null;if(z[3]===_$_24da[467]){var A=
|
|
463
|
+
z[4];var C=z[5];var F=A;v=C}else z[3]===_$_24da[468]?(A=0,C=z[4],F=u.current.options.columns.length-1,v=C):z[3]===_$_24da[469]&&(A=z[4],C=0,F=A,v=u.current.rows.length-1);null!=A&&u.current.updateSelectionFromCoords(A,C,F,v)}B&&clearInterval(B)};h.resize=function(){u.current&&1==u.current.parent.config.fullscreen&&J.call(u.current,!0)};return h}(),u=function(h,b,c){if(h){if(h.tagName==_$_24da[597]){b=u.helpers.createFromTable(h,b);var a=document.createElement(_$_24da[32]);h.parentNode.insertBefore(a,
|
|
464
|
+
h);h.parentNode.removeChild(h);h=a}b||(b={});u.defaultRowHeight||(a=document.createElement(_$_24da[32]),a.innerHTML=_$_24da[639],document.body.appendChild(a),u.defaultRowHeight=a.querySelector(_$_24da[186]).offsetHeight,a.parentNode.removeChild(a));var d=[];if(b.cloud&&!c)return typeof u.cloud==_$_24da[112]?u.cloud.load(b,function(g){if((g=u(h,g,!0))&&g.length)for(var f=0;f<g.length;f++)d.push(g[f])}):console.error(_$_24da[640]),d;if(h.spreadsheet)e=h.spreadsheet,Ha[_$_24da[11]].call(e,b);else var e=
|
|
465
|
+
va.spreadsheet(h,b);e.processing=!0;1==e.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[e.name]=function(){for(var g=0;g<e.worksheets.length;g++)typeof e.worksheets[g].onload==_$_24da[112]&&(e.worksheets[g].onload(),e.worksheets[g].onload=null);e.processing=!1;if(Array.isArray(e.queue)&&0<e.queue.length)for(;g=e.queue.shift();)g[0].updateCell(g[1],g[2],R.call(g[0],g[1],g[2]),!0);e.config.toolbar&&ma.show.call(e);for(g=0;g<e.worksheets.length;g++)ia.refresh.call(e.worksheets[g]);
|
|
466
|
+
G.call(e,_$_24da[641],e);for(g=0;g<e.worksheets.length;g++)ha.update.call(e.worksheets[g]);jSuites.loading.hide()};Array.isArray(b.worksheets)&&(b=b.worksheets);if(Array.isArray(b)){for(c=0;c<b.length;c++)va.worksheet(e,b[c]);d=e.worksheets}else d=va.worksheet(e,b);jSuites.ajax.pending(e.name)||(jSuites.ajax.oncomplete[e.name](),jSuites.ajax.oncomplete[e.name]=null);return d}console.error(_$_24da[638])};u.defaultRowHeight=null;u.license=null;u.setLicense=function(h){u.license=h};u.spreadsheet=[];
|
|
467
|
+
u.picker=ta;u.setDictionary=function(h){jSuites.setDictionary(h)};u.extensions={};u.setExtensions=function(h){for(var b=Object.keys(h),c=0;c<b.length;c++)typeof h[b[c]]===_$_24da[112]&&(u[b[c]]=h[b[c]],u.extensions[b[c]]=h[b[c]],u.license&&typeof u[b[c]].license==_$_24da[112]&&u[b[c]].license.call(u,u.license))};u.destroy=function(h,b){if(h.spreadsheet){b&&va.unbind(h);b=Object.keys(u.extensions);if(b.length)for(var c=0;c<b.length;c++)if(typeof u.extensions[b[c]].ondestroy==_$_24da[112])u.extensions[b[c]].ondestroy(h.spreadsheet);
|
|
468
|
+
b=u.spreadsheet.indexOf(h.spreadsheet);u.spreadsheet.splice(b,1);for(c=0;c<h.spreadsheet.worksheets.length;c++)I(h.spreadsheet.worksheets[c].options.worksheetName,null);h.spreadsheet=null;h.jexcel=null;h.innerHTML=_$_24da[3];h.removeAttribute(_$_24da[607])}};u.version=L;u.helpers=H;u.events=Ga;typeof formula!==_$_24da[21]&&(u.formula=formula);u.editors=function(){var h={},b=function(c,a){return 1==c[a]||c.options&&1==c.options[a]?!0:c[a]==_$_24da[281]||c.options&&c.options[a]==_$_24da[281]?!0:!1};
|
|
469
|
+
h.createEditor=function(c,a,d,e){e.parent.input.setAttribute(_$_24da[131],!1);c==_$_24da[271]?(c=document.createElement(_$_24da[271]),c.type=_$_24da[71],c.value=d):c=document.createElement(_$_24da[32]);c.style.width=a.offsetWidth-2+_$_24da[57];c.style.height=a.offsetHeight-1+_$_24da[57];e.parent.input.appendChild(c);return c};h.createDialog=function(c,a,d,e,g){c=h.createEditor(_$_24da[32],c,a,g);c.classList.add(_$_24da[642]);c.classList.add(_$_24da[637]);800>window.innerWidth?(g.parent.input.style.top=
|
|
470
|
+
_$_24da[59],g.parent.input.style.left=_$_24da[59]):(a=g.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(g.parent.input.style.marginTop=-g.parent.input.offsetHeight));return c};h.general=function(){var c={},a=function(e){return(_$_24da[3]+e)[0]==_$_24da[18]?!0:!1},d=function(e){if(e.format||e.mask||e.locale){var g={};e.mask?g.mask=e.mask:e.format?g.mask=e.format:g.locale=e.locale;e.options&&(g.options=e.options);e.decimal&&(g.options||(g.options={}),g.options={decimal:e.decimal});
|
|
471
|
+
return g.mask===_$_24da[643]?!1:g}return null};c.createCell=function(e,g,f,k,n,l){return c.updateCell(e,g,f,k,n,l)};c.updateCell=function(e,g,f,k,n,l){f=parseInt(f);k=parseInt(k);if(e){var p=d(l),q=null;g===_$_24da[3]||a(g)||typeof g===_$_24da[22]||typeof g!=_$_24da[25]||g.trim()===_$_24da[3]||(p?(p=jSuites.mask.extract(g,p,!0))&&p.value!==_$_24da[3]&&(q=p.value):1==(!1===n.parent.config.autoCasting||!1===l.autoCasting?!1:!0)&&(l.type==_$_24da[22]||l.type==_$_24da[366]||l.type==_$_24da[365]?(p=jSuites.mask.extract(g,
|
|
472
|
+
l,!0))&&p.value!==_$_24da[3]&&(q=p.value):jSuites.isNumeric(Number(g))&&(q=Number(g))));null!==q&&(g=q);g=c.parseValue(f,k,g,n,l,e);g instanceof Element||g instanceof HTMLDocument?(e.innerHTML=_$_24da[3],e.appendChild(g)):l.rotate?(e.firstChild&&e.firstChild.classList.contains(_$_24da[27])?n=e.firstChild:(n=document.createElement(_$_24da[28]),n.classList.add(_$_24da[27])),n.style.transform=_$_24da[29]+parseInt(270-l.rotate)+_$_24da[30],n.innerHTML=g,e.appendChild(n)):1==n.parent.config.stripHTML?
|
|
473
|
+
e.innerText=g:e.innerHTML=g;if(null!==q)return q}};c.openEditor=function(e,g,f,k,n,l){var p=n.parent.input;p.onblur=function(){p.classList.contains(_$_24da[123])||n.closeEditor(e,!0)};if(l.type==_$_24da[22]||l.type==_$_24da[366]||l.type==_$_24da[365])p.classList.add(_$_24da[625]),a(g)||l.inputmode||(l.inputmode=_$_24da[644]);f=null;a(g)||(l.inputmode&&p.setAttribute(_$_24da[127],l.inputmode),(f=d(l))?l.disabledMaskOnEdition||(l.mask?(k=l.mask.split(_$_24da[264]),p.setAttribute(_$_24da[125],k[0])):
|
|
474
|
+
l.locale&&p.setAttribute(_$_24da[645],l.locale),f.input=p,p.mask=f,jSuites.mask.render(g,f,!1)):g&&l.type==_$_24da[365]&&(g*=100));if(!f||l.disabledMaskOnEdition)n.parent.config.stripHTML?p.innerText=g:p.innerHTML=g,jSuites.focus(p)};c.closeEditor=function(e,g,f,k,n,l){e=n.parent.input;g=g?e.innerText:_$_24da[3];a(g)?g=g.replace(/(\r\n|\n|\r)/gm,_$_24da[3]):l.type==_$_24da[365]&&(g+=_$_24da[646],e.classList.remove(_$_24da[647]));return g};c.parseValue=function(e,g,f,k,n,l){1==k.parent.config.parseFormulas&&
|
|
475
|
+
(k.resetArray(e,g),a(f)&&(f=k.executeFormula(f,e,g)));f instanceof Element||f instanceof HTMLDocument||(l&&(!n.rotate&&jSuites.isNumeric(f)?l.classList.add(_$_24da[299]):l.classList.remove(_$_24da[299])),n&&!a(f)&&(e=d(n))&&(e.mask?(g=e.mask.split(_$_24da[264]),0>f&&g[1]?(l&&-1!==g[1].indexOf(_$_24da[648])&&l.classList.add(_$_24da[649]),l=-1===g[1].indexOf(_$_24da[257])?jSuites.mask.render(-1*f,e,!0):jSuites.mask.render(f,e,!0)):(e.mask=g[0],l&&l.classList.remove(_$_24da[649]),l=jSuites.mask.render(f,
|
|
476
|
+
e,!0))):l=jSuites.mask.render(f,e,!0),l&&(f=l)));return f};c[_$_24da[56]]=function(e,g){var f;return(f=d(e))?jSuites.mask.render(g,f,!0):e.type==_$_24da[365]?100*parseFloat(g):g};c.destroyCell=function(e){e.classList.remove(_$_24da[299])};return c}();h.text=h.general;h.number=h.general;h.numeric=h.general;h.percent=h.general;h.notes=function(){var c={},a=null;c.updateCell=function(d,e,g,f,k,n){d&&(g=document.createElement(_$_24da[32]),g.classList.add(_$_24da[650]),1==k.parent.config.stripHTML?g.innerText=
|
|
477
|
+
e:g.innerHTML=e,d.innerHTML=_$_24da[3],d.appendChild(g))};c.createCell=c.updateCell;c.openEditor=function(d,e,g,f,k,n){var l=n&&n.options?n.options:{};l.focus=!0;l.value=e;l.border=!1;l.height=_$_24da[651];l.toolbar=!1;a=h.createDialog(d,e,g,f,k,n);a=jSuites.editor(a,l)};c.closeEditor=function(d,e,g,f,k,n){return e?a.getData():_$_24da[3]};return c}();h.dropdown=function(){var c={createCell:function(a,d,e,g,f,k){k.render==_$_24da[652]?a.classList.add(_$_24da[653]):a.classList.add(_$_24da[654]);if(a=
|
|
478
|
+
c.updateCell(a,d,e,g,f,k))return a},destroyCell:function(a){a.classList.remove(_$_24da[654])},updateCell:function(a,d,e,g,f,k){if(a){var n=c.getItem(a,d,e,g,f,k);n?a.innerHTML=n:d?(d=c.fromLabel(a,d,e,g,f,k),d.length?(n=c.getItem(a,d,e,g,f,k),a.innerHTML=n):a.innerHTML=_$_24da[3]):a.innerHTML=_$_24da[3];return d}},openEditor:function(a,d,e,g,f,k){var n=h.createEditor(_$_24da[32],a,d,f),l=k.delimiter||_$_24da[264];k=Object.create(k);k.options||(k.options={});typeof k.filter==_$_24da[112]&&(k.source=
|
|
479
|
+
k.filter(f.el,a,e,g,k.source));typeof k.filterOptions==_$_24da[112]&&(k=k.filterOptions(f,a,e,g,d,k));e=k.options;k.source&&(e.data=JSON.parse(JSON.stringify(k.source)));b(k,_$_24da[655])&&(e.multiple=!0);b(k,_$_24da[72])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){f.closeEditor(a,!0)};b(k,_$_24da[655])?d&&(e.value=(_$_24da[3]+d).split(l)):e.value=d;jSuites.dropdown(n,e)},closeEditor:function(a,d,e,g,f,k){for(var n=f.parent.input.children[0],l=k.delimiter||
|
|
480
|
+
_$_24da[264],p=n.dropdown.getText(!0),q=n.dropdown.getValue(!0),r=0;r<q.length;r++)!1===c.getItem(a,q[r],e,g,f,k)&&k.source.push({id:q[r],name:p[r]});n.dropdown.close(!0);if(d)return q.join(l)},fromLabel:function(a,d,e,g,f,k){a=k.delimiter||_$_24da[264];e=[];g=[];Array.isArray(d)||(d=(_$_24da[3]+d).split(a));for(f=0;f<d.length;f++)g[d[f].trim()]=!0;d=Object.keys(g);!b(k,_$_24da[655])&&1<Object.keys(d).length&&(g=[],g[d[0]]=!0);for(d=0;d<k.source.length;d++)g[k.source[d].name]&&e.push(k.source[d].id);
|
|
481
|
+
return e.join(a)},getItem:function(a,d,e,g,f,k){g=k.delimiter||_$_24da[264];a=[];e=[];Array.isArray(d)||(d=(_$_24da[3]+d).split(g));for(g=0;g<d.length;g++)e[d[g].trim()]=!0;g=Object.keys(e);!b(k,_$_24da[655])&&1<Object.keys(g).length&&(d=[],d[g[0]]=!0,e=d);if(k.source&&typeof k.source[0]!==_$_24da[111])for(d=0;d<k.source.length;d++)g=k.source[d],k.source[d]={id:g,name:g};for(d=0;d<k.source.length;d++)typeof e[k.source[d].id]!==_$_24da[21]&&a.push(k.render==_$_24da[307]?k.source[d].color:k.render==
|
|
482
|
+
_$_24da[656]?k.source[d].image:k.source[d].name);if(a.length){if(typeof k.render!==_$_24da[21]){for(d=0;d<a.length;d++)e=d,g=a[d],g=k.render==_$_24da[307]?_$_24da[657]+g+_$_24da[658]:k.render==_$_24da[656]?_$_24da[657]+g+_$_24da[658]:k.render==_$_24da[652]?_$_24da[660]+(k.source[d].color||_$_24da[659])+_$_24da[661]+g+_$_24da[662]:void 0,a[e]=g;return a.join(_$_24da[3])}for(d=0;d<a.length;d++)a[d]=(_$_24da[3]+a[d]).replace(_$_24da[15],_$_24da[13]);return a.join(_$_24da[354])}return!1}};c[_$_24da[56]]=
|
|
483
|
+
function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_24da[307]?a.source[e].color:a.render==_$_24da[656]?a.source[e].image:a.source[e].name};return c}();h.autocomplete=h.dropdown;h.calendar=function(){var c={},a=null;c.updateCell=function(d,e,g,f,k,n){if(d){g=e;n=c.getFormat(n);0<e&&Number(e)==e&&(g=jSuites.calendar.numToDate(e));f=_$_24da[3]+e;f.substr(4,1)==_$_24da[257]&&f.substr(7,1)==_$_24da[257]?f=!0:(f=f.split(_$_24da[257]),f=4==f[0].length&&f[0]==Number(f[0])&&
|
|
484
|
+
2==f[1].length&&f[1]==Number(f[1])?!0:!1);f||(f=jSuites.calendar.extractDateFromString(e,n))&&(g=f);if(g=jSuites.calendar.getDateString(g,n))return d.innerText=g,e;d.innerText=_$_24da[3];return _$_24da[3]}};c.createCell=c.updateCell;c.openEditor=function(d,e,g,f,k,n){n=Object.create(n);typeof n.filterOptions==_$_24da[112]&&(n=n.filterOptions(k,d,g,f,e,n));g=n.options||{};g.opened=!0;g.onclose=function(l,p){k.closeEditor(d,!0)};typeof n.timepicker!==_$_24da[21]&&(g.time=b(n,_$_24da[663])?!0:!1);typeof g.readonly!==
|
|
485
|
+
_$_24da[21]&&(g.readonly=g.readonly);g.value=e||null;g.placeholder=g.format;a=h.createEditor(_$_24da[271],d,e,k);jSuites.calendar(a,g);!1===a.calendar.options.readonly&&a.focus()};c.closeEditor=function(d,e,g,f,k){d=a.calendar.close(!0,a.value?!0:!1);d=a.value?d:_$_24da[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_24da[664]};c[_$_24da[56]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();
|
|
486
|
+
h.color=function(){var c={},a=null;c.updateCell=function(d,e,g,f,k,n){d&&(n.render==_$_24da[665]?(g=document.createElement(_$_24da[32]),g.className=_$_24da[307],g.style.backgroundColor=e,d.innerText=_$_24da[3],d.appendChild(g)):(d.style.color=e,d.innerText=e))};c.createCell=c.updateCell;c.openEditor=function(d,e,g,f,k,n){n=Object.create(n);typeof n.filterOptions==_$_24da[112]&&(n=n.filterOptions(k,d,g,f,e,n));g=n.options||{};g.value=e;g.onclose=function(l,p){k.closeEditor(d,!0)};a=h.createEditor(_$_24da[271],
|
|
487
|
+
d,e,k);a=jSuites.color(a,g);a.open()};c.closeEditor=function(d,e,g,f,k,n){d=a.close(!0);if(e)return d};c[_$_24da[56]]=function(d,e){d=document.createElement(_$_24da[32]);d.style.width=_$_24da[666];d.style.height=_$_24da[34];d.style.backgroundColor=e;return d.outerHTML};return c}();h.checkbox=function(){var c={createCell:function(a,d,e,g,f,k){d=d&&d!=_$_24da[667]&&d!=_$_24da[668]?!0:!1;e=document.createElement(_$_24da[271]);e.type=_$_24da[303];e.checked=d;e.onclick=function(n){if(k&&1==k.readOnly||
|
|
488
|
+
!f.isEditable())return n.preventDefault(),n.stopPropagation(),!1;f.setValue(a,this.checked)};a.innerHTML=_$_24da[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_24da[667]&&d!=_$_24da[668]?!0:!1;a&&a.children[0]&&(a.children[0].checked=d);return d},openEditor:function(a,d,e,g,f){d=a.children[0].checked?!1:!0;f.setValue(a,d);return!1},closeEditor:function(a,d){return!1}};c[_$_24da[56]]=function(a,d){return 1==d||1==d||d==_$_24da[281]?jSuites.translate(_$_24da[281]):jSuites.translate(_$_24da[667])};
|
|
489
|
+
return c}();h.radio=function(){var c={createCell:function(a,d,e,g,f,k){a.getAttribute(_$_24da[65]);e=document.createElement(_$_24da[271]);e.type=_$_24da[310];e.checked=1==d||1==d||d==_$_24da[281]?!0:!1;e.onclick=function(n){if(k&&1==k.readOnly||!f.isEditable())return n.preventDefault(),n.stopPropagation(),!1;f.setValue(a,!0)};a.innerHTML=_$_24da[3];a.appendChild(e)},updateCell:function(a,d,e,g,f){d=1==d||1==d||d==_$_24da[281]||d==_$_24da[669]?!0:!1;a&&(a.children[0].checked=d);if(1==d){a=[];for(var k=
|
|
490
|
+
0;k<f.options.data.length;k++)g!=k&&f.options.data[k][e]&&a.push({x:e,y:k,value:0});a.length&&f.setValue(a)}return d},openEditor:function(a,d,e,g,f){return!1},closeEditor:function(a,d){return!1}};c[_$_24da[56]]=function(a,d){return 1==d||1==d||d==_$_24da[281]?jSuites.translate(_$_24da[281]):jSuites.translate(_$_24da[667])};return c}();h.autonumber=function(){var c={},a=null;c.createCell=function(d,e,g,f,k,n){(e=parseInt(e))||d&&0<parseInt(d.innerText)&&(e=parseInt(d.innerText));n.sequence||(n.sequence=
|
|
491
|
+
0);e?c.isValid(e,g,f,k)||(e=_$_24da[295]):e=n.sequence+1;e>n.sequence&&(n.sequence=e);d&&(d.innerText=e);return e};c.updateCell=c.createCell;c.openEditor=function(d,e,g,f,k,n){a=h.createEditor(_$_24da[271],d,e,k);a.onblur=function(){k.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,g,f,k){return e?a.value:_$_24da[3]};c.isValid=function(d,e,g,f){for(var k,n=0;n<f.options.data.length;n++)if(k=f.value(e,n),k==d&&n!=g)return!1;return!0};return c}();h.progressbar=function(){var c={},
|
|
492
|
+
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==_$_24da[623])var g=d.children[0];else g=document.createElement(_$_24da[32]),g.classList.add(_$_24da[308]),d.innerText=_$_24da[3],d.classList.add(_$_24da[670]),d.appendChild(g);g.style.width=parseInt(e)+_$_24da[646];g.setAttribute(_$_24da[317],parseInt(e)+_$_24da[646])};c.destroyCell=function(d){d.classList.remove(_$_24da[670])};c.updateCell=c.createCell;c.openEditor=function(d,
|
|
493
|
+
e,g,f,k,n){a=h.createEditor(_$_24da[271],d,e,k);a.type=_$_24da[22];a.setAttribute(_$_24da[671],0);a.setAttribute(_$_24da[672],100);a.onblur=function(){k.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,g,f,k){return e?a.value:_$_24da[3]};return c}();h.rating=function(){var c={},a=null;c.createCell=function(d,e,g,f,k,n){return c.setCell(d,e,n)};c.destroyCell=function(d){d.classList.remove(_$_24da[673])};c.updateCell=c.createCell;c.openEditor=function(d,e,g,f,k,n){a=h.createEditor(_$_24da[271],
|
|
494
|
+
d,e,k);a.type=_$_24da[22];a.setAttribute(_$_24da[671],0);a.setAttribute(_$_24da[672],5);a.onblur=function(){k.closeEditor(d,!0)};a.focus();a.value=e};c.closeEditor=function(d,e,g,f,k,n){return e?a.value:_$_24da[3]};c.setCell=function(d,e,g){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(d){g=g&&g.color?g.color:_$_24da[649];var f=document.createElement(_$_24da[32]);f.setAttribute(_$_24da[317],parseInt(e)+_$_24da[674]);f.classList.add(_$_24da[309]);for(var k=0;k<e;k++){var n=document.createElement(_$_24da[192]);
|
|
495
|
+
n.className=_$_24da[193];n.style.color=g;n.innerHTML=_$_24da[675];f.appendChild(n)}d.innerHTML=_$_24da[3];d.className=_$_24da[673];d.appendChild(f)}return e};return c}();h.email=function(){var c={createCell:function(a,d,e,g,f,k){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_24da[633]?e=a.children[0]:(e=document.createElement(_$_24da[247]),a.innerText=_$_24da[3],a.appendChild(e),k.options&&k.options.url&&e.setAttribute(_$_24da[676],k.options.url)),e.innerText=d)}};c.updateCell=c.createCell;
|
|
496
|
+
c.openEditor=function(a,d,e,g,f,k){f.parent.input.classList.add(_$_24da[625]);f.parent.input.onblur=function(){f.closeEditor(a,!0)};f.parent.input.innerText=d;jSuites.focus(f.parent.input)};c.closeEditor=function(a,d,e,g,f){f.parent.input.classList.remove(_$_24da[625]);return d?f.parent.input.innerText.replace(new RegExp(/\n/,_$_24da[14]),_$_24da[3]):_$_24da[3]};return c}();h.url=h.email;h.image=function(){var c={},a=null;c.createCell=function(d,e,g,f,k,n){if(d)if(e)if(d.children&&d.children[0]&&
|
|
497
|
+
d.children[0].tagName==_$_24da[677])d.children[0].src=e;else{var l=document.createElement(_$_24da[49]);n.render==_$_24da[678]&&l.classList.add(_$_24da[678]);n.options&&(l.style.maxWidth=_$_24da[679],n.options.absolute&&(d.classList.add(_$_24da[680]),l.setAttribute(_$_24da[681],-1),l.classList.add(_$_24da[272]),l.classList.add(_$_24da[682]),l.settings=function(){k.openEditor(d,e,g,f,k,n)},l.dblclick=function(){k.openEditor(d,!0)},l[_$_24da[683]]=function(){k.setValueFromCoords(g,f,_$_24da[3])},l.refresh=
|
|
498
|
+
function(p){if(!p){p=parseInt(l.style.top)||0;var q=parseInt(l.style.left)||0,r=parseInt(l.style.width)||40,w=parseInt(l.style.height)||40,x=d.getAttribute(_$_24da[65]),y=d.getAttribute(_$_24da[60]);k.updateProperty([{x,y,value:{top:p,left:q,width:r,height:w}}],null,null,!0)}}),n.options.width&&(l.style.width=parseInt(n.options.width)+_$_24da[57]),n.options.height&&(l.style.height=parseInt(n.options.height)+_$_24da[57]),n.top&&(l.style.top=parseInt(n.top)+_$_24da[57]),n.left&&(l.style.left=parseInt(n.left)+
|
|
499
|
+
_$_24da[57]),n.width&&(l.style.width=parseInt(n.width)+_$_24da[57]),n.height&&(l.style.height=parseInt(n.height)+_$_24da[57]));l.src=e;d.innerHTML=_$_24da[3];d.appendChild(l)}else d.innerHTML=_$_24da[3]};c.updateCell=c.createCell;c.openEditor=function(d,e,g,f,k,n){(n&&n.options?n.options:{}).value=e;a=h.createDialog(d,e,g,f,k,n);e&&(d=document.createElement(_$_24da[49]),d.src=e,d.classList.add(_$_24da[684]),d.style.width=_$_24da[679],a.appendChild(d));jSuites.image(a,n)};c.closeEditor=function(d,
|
|
500
|
+
e,g,f,k,n){if(e&&(d=a.children[0]))return d.tagName==_$_24da[677]?d.src:_$_24da[3]};c[_$_24da[56]]=function(d,e){return _$_24da[685]+e+_$_24da[686]};return c}();h.html=function(){var c={},a=null;c.createCell=function(d,e){d.classList.add(_$_24da[687]);var g=document.createElement(_$_24da[32]);g.innerHTML=e;d.appendChild(g)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_24da[687])};c.openEditor=function(d,e,g,f,k,n){var l=n&&n.options?n.options:
|
|
501
|
+
{};l.focus=!0;l.value=e;l.border=!1;l.height=_$_24da[651];e=h.createDialog(d,e,g,f,k,n);a=jSuites.editor(e,l);a.close=function(){k.closeEditor(d,!0)};jSuites.tracking(a,!0)};c.closeEditor=function(d,e,g,f,k,n){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return c}();h.hidden=function(){return{createCell:function(c,a,d,e,g){c.innerText=a},updateCell:function(c,a,d,e,g){c&&(c.innerText=a)},openEditor:function(c,a,d,e,g){return!1},closeEditor:function(c,a){return!1}}}();h.tags=function(){var c=
|
|
502
|
+
{},a=null;c.createCell=function(d,e){d.classList.add(_$_24da[688]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_24da[688])};c.openEditor=function(d,e,g,f,k,n){var l=n&&n.options?n.options:{};l.value=e;a=h.createDialog(d,e,g,f,k,n);d=document.createElement(_$_24da[32]);d.style.margin=_$_24da[34];d.style.marginRight=_$_24da[689];a.appendChild(d);a=jSuites.tags(d,l);d.focus();jSuites.focus(d)};c.closeEditor=function(d,e,g,f,k,n){d=
|
|
503
|
+
a.getValue();if(e)return d};return c}();h.record=function(){var c={},a=null;c.createCell=function(d,e,g,f,k,n){d.classList.add(_$_24da[654]);var l;(l=k.parent.getWorksheetInstance(n.worksheetId))?l.rows?c.updateCell(d,e,g,f,k,n):(d.innerText=_$_24da[295],k.parent.queue.push([k,g,f])):(d.innerText=_$_24da[295],k.parent.queue.push([k,g,f]))};c.destroyCell=function(d){d.classList.remove(_$_24da[654])};c.updateCell=function(d,e,g,f,k,n){d&&(typeof n.worksheetId==_$_24da[21]?d.innerText=_$_24da[295]:d.innerHTML=
|
|
504
|
+
c.getValue(d,e,g,f,k,n))};c.openEditor=function(d,e,g,f,k,n){var l=n.delimiter||_$_24da[264];n=Object.create(n);n.options||(n.options={});typeof n.filter==_$_24da[112]&&(n.source=n.filter(k.el,d,g,f,n.source));typeof n.filterOptions==_$_24da[112]&&(n=n.filterOptions(k,d,g,f,e,n));g=n.options;g.data=c.getSource(k,n);b(n,_$_24da[655])&&(g.multiple=!0);b(n,_$_24da[72])&&(g.autocomplete=!0);g.format=!0;g.opened=!0;g.width=d.offsetWidth-2;g.onclose=function(){k.closeEditor(d,!0)};b(n,_$_24da[655])?e&&
|
|
505
|
+
(g.value=(_$_24da[3]+e).split(l)):g.value=e;a=h.createEditor(_$_24da[32],d,e,k);a=jSuites.dropdown(a,g)};c.closeEditor=function(d,e,g,f,k,n){d=n.delimiter||_$_24da[264];g=a.getValue(!0);a.close(!0);if(e)return g.join(d)};c.getValue=function(d,e,g,f,k,n){d=[];if(typeof n.worksheetId==_$_24da[25]&&(k=k.parent.getWorksheetInstance(n.worksheetId))){g=n.worksheetColumn?n.worksheetColumn:0;0<=n.worksheetImage&&(g=n.worksheetImage);if(e==_$_24da[3]||0==e||null==e||void 0==e)return _$_24da[3];e=(_$_24da[3]+
|
|
506
|
+
e).split(_$_24da[264]);for(f=0;f<e.length;f++){var l=e[f].trim();var p=k.name(g);l=k.getRowById(l);p=!1===l?_$_24da[690]:l[p];0<=n.worksheetImage&&(p=_$_24da[691]+p+_$_24da[692]);d.push(p)}return 0<=n.worksheetImage?d.join(_$_24da[3]):d.join(_$_24da[354])}return _$_24da[295]};c.getSource=function(d,e){var g=e.worksheetColumn?e.worksheetColumn:0,f=null;typeof e.worksheetId==_$_24da[25]&&(f=d.parent.getWorksheetInstance(e.worksheetId));if(f){var k,n=[];for(d=0;d<f.rows.length;d++)if(k=f.value(g,d))k=
|
|
507
|
+
{id:f.getRowId(d),name:k},void 0!=e.worksheetImage&&(k.image=f.value(e.worksheetImage,d)),n.push(k)}else console.error(_$_24da[693]+e.worksheetId);return n};c[_$_24da[56]]=function(d,e){for(var g=0;g<d.source.length;g++)if(d.source[g].id==e)return d.render==_$_24da[307]?d.source[g].color:d.render==_$_24da[656]?d.source[g].image:d.source[g].name};return c}();return h}();typeof jQuery!==_$_24da[21]&&function(h){h.fn.jspreadsheet=h.fn.jexcel=function(b){var c=h(this)[_$_24da[56]](0);if(c.jspreadsheet){if(typeof arguments[0]==
|
|
508
|
+
_$_24da[22])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 u(h(this)[_$_24da[56]](0),arguments[0])}}(jQuery);return u});
|