From 950cca271298593f6aab08ea015de340c2c2ee54 Mon Sep 17 00:00:00 2001 From: chenyongxuan Date: Wed, 9 Feb 2022 18:25:45 +0800 Subject: [PATCH 1/2] fix: fix issues#565 (scrollbar bug) --- src/component/scrollbar.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/component/scrollbar.js b/src/component/scrollbar.js index 99b045c0..8137811f 100644 --- a/src/component/scrollbar.js +++ b/src/component/scrollbar.js @@ -29,16 +29,16 @@ export default class Scrollbar { set(distance, contentDistance) { const d = distance - 1; - // console.log('distance:', distance, ', contentDistance:', contentDistance); - if (contentDistance > d) { - const cssKey = this.vertical ? 'height' : 'width'; - // console.log('d:', d); - this.el.css(cssKey, `${d - 15}px`).show(); - this.contentEl - .css(this.vertical ? 'width' : 'height', '1px') - .css(cssKey, `${contentDistance}px`); - } else { - this.el.hide(); + const cssKey = this.vertical ? 'height' : 'width'; + // console.log('d:', d); + this.el.css(cssKey, `${d - 15}px`).show(); + this.contentEl + .css(this.vertical ? 'width' : 'height', '1px') + .css(cssKey, `${contentDistance}px`); + if (contentDistance <= d) { + setTimeout(() => { + this.el.hide() + }); } return this; } From f64f538a030bc02e8f397dc9dc6a4785d61b6d99 Mon Sep 17 00:00:00 2001 From: chenyongxuan Date: Fri, 11 Feb 2022 17:06:15 +0800 Subject: [PATCH 2/2] chore: build --- dist/xspreadsheet.js | 2 +- dist/xspreadsheet.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/xspreadsheet.js b/dist/xspreadsheet.js index 10f54468..5b7e6f87 100644 --- a/dist/xspreadsheet.js +++ b/dist/xspreadsheet.js @@ -1,2 +1,2 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){},function(t,e,n){},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e?(this.el=document.createElement(e),this.el.className=n):this.el=e,this.data={}}var e,n,o;return e=t,(n=[{key:"data",value:function(t,e){return void 0!==e?(this.data[t]=e,this):this.data[t]}},{key:"on",value:function(t,e){var n=r(t.split(".")),i=n[0],o=n.slice(1),a=i;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,function(t){e(t);for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(t)}},{key:"toggleClass",value:function(t){return this.el.classList.toggle(t)}},{key:"active",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return t?this.addClass(e):this.removeClass(e),this}},{key:"checked",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.active(t,"checked"),this}},{key:"disabled",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(t,e){var n=this;if(void 0!==e)this.el.setAttribute(t,e);else{if("string"==typeof t)return this.el.getAttribute(t);Object.keys(t).forEach(function(e){n.el.setAttribute(e,t[e])})}return this}},{key:"removeAttr",value:function(t){return this.el.removeAttribute(t),this}},{key:"html",value:function(t){return void 0!==t?(this.el.innerHTML=t,this):this.el.innerHTML}},{key:"val",value:function(t){return void 0!==t?(this.el.value=t,this):this.el.value}},{key:"focus",value:function(){this.el.focus()}},{key:"cssRemoveKeys",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return new o(t,e)};n(0);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function s(t){for(var e="",n=t;n>=c.length;)n/=c.length,n-=1,e+=c[parseInt(n,10)%c.length];var r=t%c.length;return e+=c[r]}function u(t){for(var e=0,n=0;n="0"&&t.charAt(r)<="9"?n+=t.charAt(r):e+=t.charAt(r);return[u(e),parseInt(n,10)-1]}function h(t,e){return"".concat(s(t)).concat(e+1)}function p(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};if(0===e&&0===n)return t;var i=l(f(t),2),o=i[0],a=i[1];return r(o,a)?h(o+e,a+n):t}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function y(t,e){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sri=e,this.sci=n,this.eri=r,this.eci=i,this.w=o,this.h=a}var e,n,r;return e=t,r=[{key:"valueOf",value:function(e){var n=e.split(":"),r=d(f(n[0]),2),i=r[0],o=r[1],a=o,l=i;if(n.length>1){var c=d(f(n[1]),2);l=c[0],a=c[1]}return new t(o,i,a,l)}}],(n=[{key:"set",value:function(t,e,n,r){this.sri=t,this.sci=e,this.eri=n,this.eci=r}},{key:"multiple",value:function(){return this.eri-this.sri>0||this.eci-this.sci>0}},{key:"includes",value:function(){for(var t=0,e=0,n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=this.sri,r=this.sci,i=this.eri,o=this.eci,a=n;a<=i;a+=1)if(e(a))for(var l=r;l<=o;l+=1)t(a,l)}},{key:"contains",value:function(t){return this.sri<=t.sri&&this.sci<=t.sci&&this.eri>=t.eri&&this.eci>=t.eci}},{key:"within",value:function(t){return this.sri>=t.sri&&this.sci>=t.sci&&this.eri<=t.eri&&this.eci<=t.eci}},{key:"disjoint",value:function(t){return this.sri>t.eri||this.sci>t.eci||t.sri>this.eri||t.sci>this.eci}},{key:"intersects",value:function(t){return this.sri<=t.eri&&this.sci<=t.eci&&t.sri<=this.eri&&t.sci<=this.eci}},{key:"union",value:function(e){var n=this.sri,r=this.sci,i=this.eri,o=this.eci;return new t(e.srii?e.eri:i,e.eci>o?e.eci:o)}},{key:"difference",value:function(e){var n=[],r=function(e,r,i,o){n.push(new t(e,r,i,o))},i=this.sri,o=this.sci,a=this.eri,l=this.eci,c=e.sri-i,s=e.sci-o,u=a-e.eri,f=l-e.eci;return c>0?(r(i,o,e.sri-1,l),u>0?(r(e.eri+1,o,a,l),s>0&&r(e.sri,o,e.eri,e.sci-1),f>0&&r(e.sri,e.eci+1,e.eri,l)):(s>0&&r(e.sri,o,a,e.sci-1),f>0&&r(e.sri,e.eci+1,a,l))):u>0&&(r(e.eri+1,o,a,l),s>0&&r(i,o,e.eri,e.sci-1),f>0&&r(i,e.eci+1,e.eri,l)),s>0?(r(i,o,a,e.sci-1),f>0?(r(i,e.eri+1,a,l),c>0&&r(i,e.sci,e.sri-1,e.eci),u>0&&r(e.sri+1,e.sci,a,e.eci)):(c>0&&r(i,e.sci,e.sri-1,l),u>0&&r(e.sri+1,e.sci,a,l))):f>0&&(r(a,e.eci+1,a,l),c>0&&r(i,o,e.sri-1,e.eci),u>0&&r(e.eri+1,o,a,e.eci)),n}},{key:"size",value:function(){return[this.eri-this.sri+1,this.eci-this.sci+1]}},{key:"toString",value:function(){var t=this.sri,e=this.sci,n=this.eri,r=this.eci,i=h(e,t);return this.multiple()&&(i="".concat(i,":").concat(h(r,n))),i}},{key:"clone",value:function(){return new t(this.sri,this.sci,this.eri,this.eci,this.w,this.h)}},{key:"equals",value:function(t){return this.eri===t.eri&&this.eci===t.eci&&this.sri===t.sri&&this.sci===t.sci}}])&&y(e.prototype,n),r&&y(e,r),t}();function b(t,e){for(var n=0;n0}},{key:"canRedo",value:function(){return this.redoItems.length>0}},{key:"undo",value:function(t,e){var n=this.undoItems,r=this.redoItems;this.canUndo()&&(r.push(JSON.stringify(t)),e(JSON.parse(n.pop())))}},{key:"redo",value:function(t,e){var n=this.undoItems,r=this.redoItems;this.canRedo()&&(n.push(JSON.stringify(t)),e(JSON.parse(r.pop())))}}])&&w(e.prototype,n),r&&w(e,r),t}();function O(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._=e}var e,n,r;return e=t,(n=[{key:"forEach",value:function(t){this._.forEach(t)}},{key:"deleteWithin",value:function(t){this._=this._.filter(function(e){return!e.within(t)})}},{key:"getFirstIncludes",value:function(t,e){for(var n=0;n=e?(s.sri+=n,s.eri+=n):o=e?(s.sci+=n,s.eci+=n):a0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length,r=new Array(n>1?n-1:0),i=1;i5?l.toFixed(2):l;return l.toFixed(Math.max(r,i))}var z={cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},merge:function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:function(t){return t},n=0,r=0;return Object.keys(t).forEach(function(i){n+=e(t[i],i),r+=1}),[n,r]},rangeEach:function(t,e,n){for(var r=t;ri);c+=1)a+=l=o(c);return[c,a-l,l]},deleteProperty:function(t,e){var n=t["".concat(e)];return delete t["".concat(e)],n},numberCalc:I};function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function M(t,e){for(var n=0;n0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}},{key:"isHide",value:function(t){var e=this.get(t);return e&&e.hide}},{key:"setHide",value:function(t,e){var n=this.getOrNew(t);!0===e?n.hide=!0:delete n.hide}},{key:"setStyle",value:function(t,e){this.getOrNew(t).style=e}},{key:"sumHeight",value:function(t,e,n){var r=this;return z.rangeSum(t,e,function(t){return n&&n.has(t)?0:r.getHeight(t)})}},{key:"totalHeight",value:function(){return this.sumHeight(0,this.len)}},{key:"get",value:function(t){return this._[t]}},{key:"getOrNew",value:function(t){return this._[t]=this._[t]||{cells:{}},this._[t]}},{key:"getCell",value:function(t,e){var n=this.get(t);return void 0!==n&&void 0!==n.cells&&void 0!==n.cells[e]?n.cells[e]:null}},{key:"getCellMerge",value:function(t,e){var n=this.getCell(t,e);return n&&n.merge?n.merge:[0,0]}},{key:"getCellOrNew",value:function(t,e){var n=this.getOrNew(t);return n.cells[e]=n.cells[e]||{},n.cells[e]}},{key:"setCell",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"all",i=this.getOrNew(t);"all"===r?i.cells[e]=n:"text"===r?(i.cells[e]=i.cells[e]||{},i.cells[e].text=n.text):"format"===r&&(i.cells[e]=i.cells[e]||{},i.cells[e].style=n.style,n.merge&&(i.cells[e].merge=n.merge))}},{key:"setCellText",value:function(t,e,n){var r=this.getCellOrNew(t,e);!1!==r.editable&&(r.text=n)}},{key:"copyPaste",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=t.sri,a=t.sci,l=t.eri,c=t.eci,s=e.sri,u=e.sci,f=e.eri,h=e.eci,d=t.size(),y=H(d,2),v=y[0],b=y[1],g=e.size(),m=H(g,2),w=m[0],k=m[1],O=!0,S=0;(f0&&function(){var t=P.text,e=_-u+(j-s)+2;if(O||(e-=S+1),"="===t[0])P.text=t.replace(/[a-zA-Z]{1,3}\d+/g,function(t){var n=0,r=0;return o===s?n=e-1:r=e-1,/^\d+$/.test(t)?t:p(t,n,r)});else if(v<=1&&b>1&&(s>l||f1&&(u>c||h1&&void 0!==arguments[1]?arguments[1]:1,r={};this.each(function(i,o){var a=parseInt(i,10);a>=t&&(a+=n,e.eachCells(i,function(e,r){r.text&&"="===r.text[0]&&(r.text=r.text.replace(/[a-zA-Z]{1,3}\d+/g,function(e){return p(e,0,n,function(e,n){return n>=t})}))})),r[a]=o}),this._=r,this.len+=n}},{key:"delete",value:function(t,e){var n=this,r=e-t+1,i={};this.each(function(o,a){var l=parseInt(o,10);le&&(i[l-r]=a,n.eachCells(o,function(t,n){n.text&&"="===n.text[0]&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,function(t){return p(t,0,-r,function(t,n){return n>e})}))}))}),this._=i,this.len-=r}},{key:"insertColumn",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.each(function(r,i){var o={};e.eachCells(r,function(e,r){var i=parseInt(e,10);i>=t&&(i+=n,r.text&&"="===r.text[0]&&(r.text=r.text.replace(/[a-zA-Z]{1,3}\d+/g,function(e){return p(e,n,0,function(e){return e>=t})}))),o[i]=r}),i.cells=o})}},{key:"deleteColumn",value:function(t,e){var n=this,r=e-t+1;this.each(function(i,o){var a={};n.eachCells(i,function(n,i){var o=parseInt(n,10);oe&&(a[o-r]=i,i.text&&"="===i.text[0]&&(i.text=i.text.replace(/[a-zA-Z]{1,3}\d+/g,function(t){return p(t,-r,0,function(t){return t>e})})))}),o.cells=a})}},{key:"deleteCells",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";t.each(function(t,r){e.deleteCell(t,r,n)})}},{key:"deleteCell",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",r=this.get(t);if(null!==r){var i=this.getCell(t,e);null!==i&&!1!==i.editable&&("all"===n?delete r.cells[e]:"text"===n?(i.text&&delete i.text,i.value&&delete i.value):"format"===n?(void 0!==i.style&&delete i.style,i.merge&&delete i.merge):"merge"===n&&i.merge&&delete i.merge)}}},{key:"maxCell",value:function(){var t=Object.keys(this._),e=t[t.length-1],n=this._[e];if(n){var r=n.cells,i=Object.keys(r),o=i[i.length-1];return[parseInt(e,10),parseInt(o,10)]}return[0,0]}},{key:"each",value:function(t){Object.entries(this._).forEach(function(e){var n=H(e,2),r=n[0],i=n[1];t(r,i)})}},{key:"eachCells",value:function(t,e){this._[t]&&this._[t].cells&&Object.entries(this._[t].cells).forEach(function(t){var n=H(t,2),r=n[0],i=n[1];e(r,i)})}},{key:"setData",value:function(t){t.len&&(this.len=t.len,delete t.len),this._=t}},{key:"getData",value:function(){var t=this.len;return Object.assign({len:t},this._)}}])&&M(e.prototype,n),r&&M(e,r),t}();function F(t,e){for(var n=0;n0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}},{key:"isHide",value:function(t){var e=this._[t];return e&&e.hide}},{key:"setHide",value:function(t,e){var n=this.getOrNew(t);!0===e?n.hide=!0:delete n.hide}},{key:"setStyle",value:function(t,e){this.getOrNew(t).style=e}},{key:"sumWidth",value:function(t,e){var n=this;return z.rangeSum(t,e,function(t){return n.getWidth(t)})}},{key:"totalWidth",value:function(){return this.sumWidth(0,this.len)}}])&&F(e.prototype,n),r&&F(e,r),t}(),V=["en"],q={en:{toolbar:{undo:"Undo",redo:"Redo",print:"Print",paintformat:"Paint format",clearformat:"Clear format",format:"Format",fontName:"Font",fontSize:"Font size",fontBold:"Font bold",fontItalic:"Font italic",underline:"Underline",strike:"Strike",color:"Text color",bgcolor:"Fill color",border:"Borders",merge:"Merge cells",align:"Horizontal align",valign:"Vertical align",textwrap:"Text wrapping",freeze:"Freeze cell",autofilter:"Filter",formula:"Functions",more:"More"},contextmenu:{copy:"Copy",cut:"Cut",paste:"Paste",pasteValue:"Paste values only",pasteFormat:"Paste format only",hide:"Hide",insertRow:"Insert row",insertColumn:"Insert column",deleteSheet:"Delete",deleteRow:"Delete row",deleteColumn:"Delete column",deleteCell:"Delete cell",deleteCellText:"Delete cell text",validation:"Data validations",cellprintable:"Enable export",cellnonprintable:"Disable export",celleditable:"Enable editing",cellnoneditable:"Disable editing"},print:{size:"Paper size",orientation:"Page orientation",orientations:["Landscape","Portrait"]},format:{normal:"Normal",text:"Plain Text",number:"Number",percent:"Percent",rmb:"RMB",usd:"USD",eur:"EUR",date:"Date",time:"Time",datetime:"Date time",duration:"Duration"},formula:{sum:"Sum",average:"Average",max:"Max",min:"Min",_if:"IF",and:"AND",or:"OR",concat:"Concat"},validation:{required:"it must be required",notMatch:"it not match its validation rule",between:"it is between {} and {}",notBetween:"it is not between {} and {}",notIn:"it is not in list",equal:"it equal to {}",notEqual:"it not equal to {}",lessThan:"it less than {}",lessThanEqual:"it less than or equal to {}",greaterThan:"it greater than {}",greaterThanEqual:"it greater than or equal to {}"},error:{pasteForMergedCell:"Unable to do this for merged cells"},calendar:{weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},button:{next:"Next",cancel:"Cancel",remove:"Remove",save:"Save",ok:"OK"},sort:{desc:"Sort Z -> A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}}};function B(t,e){if(e)for(var n=0,r=V;n2&&void 0!==arguments[2]&&arguments[2]?V=[t]:V.unshift(t),e&&(q[t]=e)}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function X(t,e){for(var n=0;n2?r-2:0),o=2;o=this.parseValue(l)&&o<=this.parseValue(c),"between",l,c)}if("nbe"===n){var s=$(r,2),u=s[0],f=s[1];return K(othis.parseValue(f),"notBetween",u,f)}if("eq"===n)return K(o===this.parseValue(r),"equal",r);if("neq"===n)return K(o!==this.parseValue(r),"notEqual",r);if("lt"===n)return K(othis.parseValue(r),"greaterThan",r);if("gte"===n)return K(o>=this.parseValue(r),"greaterThanEqual",r)}return[!0]}}])&&X(e.prototype,n),r&&X(e,r),t}();function G(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var n=0;n0}).map(function(t){return t.getData()})}},{key:"setData",value:function(t){this._=t.map(function(t){return nt.valueOf(t)})}}]),t}();function it(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:function(){},r=this.merges,i=e.clone(),o=at(t.size(),2),a=o[0],l=o[1],c=at(e.size(),2),s=c[0],u=c[1];return a>s&&(i.eri=e.sri+a-1),l>u&&(i.eci=e.sci+l-1),!r.intersects(i)||(n(L("error.pasteForMergedCell")),!1)}function ut(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.rows,o=this.merges;"all"!==n&&"format"!==n||(i.deleteCells(e,n),o.deleteWithin(e)),i.copyPaste(t,e,n,r,function(t,e,n){if(n&&n.merge){var r=at(n.merge,2),i=r[0],a=r[1];if(i<=0&&a<=0)return;o.add(new v(t,e,t+i,e+a))}})}function ft(t,e){var n=this.clipboard,r=this.rows,i=this.merges;r.cutPaste(t,e),i.move(t,e.sri-t.sri,e.sci-t.sci),n.clear()}function ht(t,e,n){var r=this.styles,i=this.rows.getCellOrNew(t,e),o={};void 0!==i.style&&(o=z.cloneDeep(r[i.style])),o=z.merge(o,{border:n}),i.style=this.addStyle(o)}var pt=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.settings=z.merge(lt,n||{}),this.name=e||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new A,this.rows=new N(this.settings.row),this.cols=new W(this.settings.col),this.validations=new rt,this.hyperlinks={},this.comments={},this.selector=new g,this.scroll=new m,this.history=new k,this.clipboard=new S,this.autoFilter=new T,this.change=function(){},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map}var e,n,r;return e=t,(n=[{key:"addValidation",value:function(t,e,n){var r=this;this.changeData(function(){r.validations.add(t,e,n)})}},{key:"removeValidation",value:function(){var t=this,e=this.selector.range;this.changeData(function(){t.validations.remove(e)})}},{key:"getSelectedValidator",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=this.validations.get(e,n);return r?r.validator:null}},{key:"getSelectedValidation",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=t.range,i=this.validations.get(e,n),o={ref:r.toString()};return null!==i&&(o.mode=i.mode,o.validator=i.validator),o}},{key:"canUndo",value:function(){return this.history.canUndo()}},{key:"canRedo",value:function(){return this.history.canRedo()}},{key:"undo",value:function(){var t=this;this.history.undo(this.getData(),function(e){t.setData(e)})}},{key:"redo",value:function(){var t=this;this.history.redo(this.getData(),function(e){t.setData(e)})}},{key:"copy",value:function(){this.clipboard.copy(this.selector.range)}},{key:"copyToSystemClipboard",value:function(){if(void 0!==navigator.clipboard){for(var t="",e=this.rows.getData(),n=this.selector.range.sri;n<=this.selector.range.eri;n+=1){if(ct(e,n)){for(var r=this.selector.range.sci;r<=this.selector.range.eci;r+=1)if(r>this.selector.range.sci&&(t+="\t"),ct(e[n].cells,r)){var i=String(e[n].cells[r].text);-1===i.indexOf("\n")&&-1===i.indexOf("\t")&&-1===i.indexOf('"')?t+=i:t+='"'.concat(i,'"')}}else for(var o=this.selector.range.sci;o<=this.selector.range.eci;o+=1)t+="\t";t+="\n"}navigator.clipboard.writeText(t).then(function(){},function(e){console.log("text copy to the system clipboard error ",t,e)})}}},{key:"cut",value:function(){this.clipboard.cut(this.selector.range)}},{key:"paste",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=this.clipboard,i=this.selector;return!r.isClear()&&(!!st.call(this,r.range,i.range,n)&&(this.changeData(function(){r.isCopy()?ut.call(t,r.range,i.range,e):r.isCut()&&ft.call(t,r.range,i.range)}),!0))}},{key:"pasteFromText",value:function(t){var e=t.split("\r\n").map(function(t){return t.replace(/"/g,"").split("\t")});e.length>0&&(e.length-=1);var n=this.rows,r=this.selector;this.changeData(function(){n.paste(e,r.range)})}},{key:"autofill",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=this.selector.range;return!!st.call(this,i,t,r)&&(this.changeData(function(){ut.call(n,i,t,e,!0)}),!0)}},{key:"clearClipboard",value:function(){this.clipboard.clear()}},{key:"calSelectedRangeByEnd",value:function(t,e){var n=this.selector,r=this.rows,i=this.cols,o=this.merges,a=n.range,l=a.sri,c=a.sci,s=a.eri,u=a.eci,f=n.ri,h=n.ci,p=t,d=e;return t<0&&(p=r.len-1),e<0&&(d=i.len-1),p>f?(l=f,s=p):(l=p,s=f),d>h?(c=h,u=d):(c=d,u=h),n.range=o.union(new v(l,c,s,u)),n.range=o.union(n.range),n.range}},{key:"calSelectedRangeByStart",value:function(t,e){var n=this.selector,r=this.rows,i=this.cols,o=this.merges.getFirstIncludes(t,e);return null===o&&(o=new v(t,e,t,e),-1===t&&(o.sri=0,o.eri=r.len-1),-1===e&&(o.sci=0,o.eci=i.len-1)),n.range=o,o}},{key:"setSelectedCellAttr",value:function(t,e){var n=this;this.changeData(function(){var r=n.selector,i=n.styles,o=n.rows;if("merge"===t)e?n.merge():n.unmerge();else if("border"===t)(function(t){var e=this,n=t.mode,r=t.style,i=t.color,o=this.styles,a=this.selector,l=this.rows,c=a.range,s=c.sri,u=c.sci,f=c.eri,h=c.eci,p=!this.isSingleSelected();if(p||"inside"!==n&&"horizontal"!==n&&"vertical"!==n)if("outside"!==n||p){if("none"===n)a.range.each(function(t,n){var r=l.getCell(t,n);if(r&&void 0!==r.style){var i=z.cloneDeep(o[r.style]);delete i.border,r.style=e.addStyle(i)}});else if("all"===n||"inside"===n||"outside"===n||"horizontal"===n||"vertical"===n)!function(){for(var t=[],o=s;o<=f;o+=1)for(var a=u;a<=h;a+=1){for(var c=[],d=0;dh)break;var w=l.getCell(o,a),k=0,O=0;if(w&&w.merge){var S=at(w.merge,2);k=S[0],O=S[1],t.push([o,a,k,O])}var x=k>0&&o+k===f,E=O>0&&a+O===h,j={};"all"===n?j={bottom:[r,i],top:[r,i],left:[r,i],right:[r,i]}:"inside"===n?(!E&&a0&&ht.call(e,o,a,j),a+=O}}();else if("top"===n||"bottom"===n)for(var d=u;d<=h;d+=1)"top"===n&&(ht.call(this,s,d,{top:[r,i]}),d+=l.getCellMerge(s,d)[1]),"bottom"===n&&(ht.call(this,f,d,{bottom:[r,i]}),d+=l.getCellMerge(f,d)[1]);else if("left"===n||"right"===n)for(var y=s;y<=f;y+=1)"left"===n&&(ht.call(this,y,u,{left:[r,i]}),y+=l.getCellMerge(y,u)[0]),"right"===n&&(ht.call(this,y,h,{right:[r,i]}),y+=l.getCellMerge(y,h)[0])}else ht.call(this,s,u,{top:[r,i],bottom:[r,i],left:[r,i],right:[r,i]})}).call(n,e);else if("formula"===t){var a=r.ri,l=r.ci,c=r.range;if(r.multiple()){var s=at(r.size(),2),u=s[0],f=s[1],p=c.sri,d=c.sci,y=c.eri,v=c.eci;if(u>1)for(var b=d;b<=v;b+=1){o.getCellOrNew(y+1,b).text="=".concat(e,"(").concat(h(b,p),":").concat(h(b,y),")")}else if(f>1){o.getCellOrNew(a,v+1).text="=".concat(e,"(").concat(h(d,a),":").concat(h(v,a),")")}}else{o.getCellOrNew(a,l).text="=".concat(e,"()")}}else r.range.each(function(r,a){var l=o.getCellOrNew(r,a),c={};if(void 0!==l.style&&(c=z.cloneDeep(i[l.style])),"format"===t)c.format=e,l.style=n.addStyle(c);else if("font-bold"===t||"font-italic"===t||"font-name"===t||"font-size"===t){var s={};s[t.split("-")[1]]=e,c.font=Object.assign(c.font||{},s),l.style=n.addStyle(c)}else"strike"===t||"textwrap"===t||"underline"===t||"align"===t||"valign"===t||"color"===t||"bgcolor"===t?(c[t]=e,l.style=n.addStyle(c)):l[t]=e})})}},{key:"setSelectedCellText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"input",n=this.autoFilter,r=this.selector,i=this.rows,o=r.ri,a=r.ci,l=o;this.unsortedRowMap.has(o)&&(l=this.unsortedRowMap.get(o));var c=i.getCell(l,a),s=c?c.text:"";if(this.setCellText(l,a,t,e),n.active()){var u=n.getFilter(a);if(u){var f=u.value.findIndex(function(t){return t===s});f>=0&&u.value.splice(f,1,t)}}}},{key:"getSelectedCell",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=e;return this.unsortedRowMap.has(e)&&(r=this.unsortedRowMap.get(e)),this.rows.getCell(r,n)}},{key:"xyInSelectedRect",value:function(t,e){var n=this.getSelectedRect(),r=n.left,i=n.top,o=n.width,a=n.height,l=t-this.cols.indexWidth,c=e-this.rows.height;return l>r&&li&&c0&&v>s&&(p=s),y>0&&y>u&&(d=u),{l:s,t:u,left:p,top:d,height:f,width:h,scroll:e}}},{key:"getCellRectByXY",value:function(t,e){var n=this.scroll,r=this.merges,i=this.rows,o=this.cols,a=function(t,e){var n=this.rows,r=this.freezeTotalHeight(),i=n.height;r+n.heightt);a+=1)o.has(a)||(l+=c=n.getHeight(a));return(l-=c)<=0?{ri:-1,top:0,height:c}:{ri:a-1,top:l,height:c}}.call(this,e,n.y),l=a.ri,c=a.top,s=a.height,u=function(t,e){var n=this.cols,r=this.freezeTotalWidth(),i=n.indexWidth;r+n.indexWidth=0||f>=0){var d=r.getFirstIncludes(l,f);if(d){l=d.sri,f=d.sci;var y=this.cellRect(l,f);h=y.left,c=y.top,p=y.width,s=y.height}}return{ri:l,ci:f,left:h,top:c,width:p,height:s}}},{key:"isSingleSelected",value:function(){var t=this.selector.range,e=t.sri,n=t.sci,r=t.eri,i=t.eci,o=this.getCell(e,n);if(o&&o.merge){var a=at(o.merge,2),l=a[0],c=a[1];if(e+l===r&&n+c===i)return!0}return!this.selector.multiple()}},{key:"canUnmerge",value:function(){var t=this.selector.range,e=t.sri,n=t.sci,r=t.eri,i=t.eci,o=this.getCell(e,n);if(o&&o.merge){var a=at(o.merge,2),l=a[0],c=a[1];if(e+l===r&&n+c===i)return!0}return!1}},{key:"merge",value:function(){var t=this,e=this.selector,n=this.rows;if(!this.isSingleSelected()){var r=at(e.size(),2),i=r[0],o=r[1];if(i>1||o>1){var a=e.range,l=a.sri,c=a.sci;this.changeData(function(){var r=n.getCellOrNew(l,c);r.merge=[i-1,o-1],t.merges.add(e.range),t.rows.deleteCells(e.range),t.rows.setCell(l,c,r)})}}}},{key:"unmerge",value:function(){var t=this,e=this.selector;if(this.isSingleSelected()){var n=e.range,r=n.sri,i=n.sci;this.changeData(function(){t.rows.deleteCell(r,i,"merge"),t.merges.deleteWithin(e.range)})}}},{key:"canAutofilter",value:function(){return!this.autoFilter.active()}},{key:"autofilter",value:function(){var t=this,e=this.autoFilter,n=this.selector;this.changeData(function(){e.active()?(e.clear(),t.exceptRowSet=new Set,t.sortedRowMap=new Map,t.unsortedRowMap=new Map):e.ref=n.range.toString()})}},{key:"setAutoFilter",value:function(t,e,n,r){var i=this.autoFilter;i.addFilter(t,n,r),i.setSort(t,e),this.resetAutoFilter()}},{key:"resetAutoFilter",value:function(){var t=this,e=this.autoFilter,n=this.rows;if(e.active()){var r=e.sort,i=e.filteredRows(function(t,e){return n.getCell(t,e)}),o=i.rset,a=i.fset,l=Array.from(a),c=Array.from(a);r&&l.sort(function(t,e){return"asc"===r.order?t-e:"desc"===r.order?e-t:0}),this.exceptRowSet=o,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,l.forEach(function(e,n){t.sortedRowMap.set(c[n],e),t.unsortedRowMap.set(e,c[n])})}}},{key:"deleteCell",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",n=this.selector;this.changeData(function(){t.rows.deleteCells(n.range,e),"all"!==e&&"format"!==e||t.merges.deleteWithin(n.range)})}},{key:"insert",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.changeData(function(){var r=e.selector.range,i=r.sri,o=r.sci,a=e.rows,l=e.merges,c=e.cols,s=i;"row"===t?a.insert(i,n):"column"===t&&(a.insertColumn(o,n),s=o,c.len+=1),l.shift(t,s,n,function(t,e,n,r){var i=a.getCell(t,e);i.merge[0]+=n,i.merge[1]+=r})})}},{key:"delete",value:function(t){var e=this;this.changeData(function(){var n=e.rows,r=e.merges,i=e.selector,o=e.cols,a=i.range,l=i.range,c=l.sri,s=l.sci,u=l.eri,f=l.eci,h=at(i.range.size(),2),p=h[0],d=h[1],y=c,v=p;"row"===t?n.delete(c,u):"column"===t&&(n.deleteColumn(s,f),y=a.sci,v=d,o.len-=f-s+1),r.shift(t,y,-v,function(t,e,r,i){var o=n.getCell(t,e);o.merge[0]+=r,o.merge[1]+=i,0===o.merge[0]&&0===o.merge[1]&&delete o.merge})})}},{key:"scrollx",value:function(t,e){var n=this.scroll,r=this.freeze,i=this.cols,o=at(r,2)[1],a=at(z.rangeReduceIf(o,i.len,0,0,t,function(t){return i.getWidth(t)}),3),l=a[0],c=a[1],s=a[2],u=c;t>0&&(u+=s),n.x!==u&&(n.ci=t>0?l:0,n.x=u,e())}},{key:"scrolly",value:function(t,e){var n=this.scroll,r=this.freeze,i=this.rows,o=at(r,1)[0],a=at(z.rangeReduceIf(o,i.len,0,0,t,function(t){return i.getHeight(t)}),3),l=a[0],c=a[1],s=a[2],u=c;t>0&&(u+=s),n.y!==u&&(n.ri=t>0?l:0,n.y=u,e())}},{key:"cellRect",value:function(t,e){var n=this.rows,r=this.cols,i=r.sumWidth(0,e),o=n.sumHeight(0,t),a=n.getCell(t,e),l=r.getWidth(e),c=n.getHeight(t);if(null!==a&&a.merge){var s=at(a.merge,2),u=s[0],f=s[1];if(u>0)for(var h=1;h<=u;h+=1)c+=n.getHeight(t+h);if(f>0)for(var p=1;p<=f;p+=1)l+=r.getWidth(e+p)}return{left:i,top:o,width:l,height:c,cell:a}}},{key:"getCell",value:function(t,e){return this.rows.getCell(t,e)}},{key:"getCellTextOrDefault",value:function(t,e){var n=this.getCell(t,e);return n&&n.text?n.text:""}},{key:"getCellStyle",value:function(t,e){var n=this.getCell(t,e);return n&&void 0!==n.style?this.styles[n.style]:null}},{key:"getCellStyleOrDefault",value:function(t,e){var n=this.styles,r=this.rows.getCell(t,e),i=r&&void 0!==r.style?n[r.style]:{};return z.merge(this.defaultStyle(),i)}},{key:"getSelectedCellStyle",value:function(){var t=this.selector,e=t.ri,n=t.ci;return this.getCellStyleOrDefault(e,n)}},{key:"setCellText",value:function(t,e,n,r){var i=this.rows,o=this.history,a=this.validations;"finished"===r?(i.setCellText(t,e,""),o.add(this.getData()),i.setCellText(t,e,n)):(i.setCellText(t,e,n),this.change(this.getData())),a.validate(t,e,n)}},{key:"freezeIsActive",value:function(){var t=at(this.freeze,2),e=t[0],n=t[1];return e>0||n>0}},{key:"setFreeze",value:function(t,e){var n=this;this.changeData(function(){n.freeze=[t,e]})}},{key:"freezeTotalWidth",value:function(){return this.cols.sumWidth(0,this.freeze[1])}},{key:"freezeTotalHeight",value:function(){return this.rows.sumHeight(0,this.freeze[0])}},{key:"setRowHeight",value:function(t,e){var n=this;this.changeData(function(){n.rows.setHeight(t,e)})}},{key:"setColWidth",value:function(t,e){var n=this;this.changeData(function(){n.cols.setWidth(t,e)})}},{key:"viewHeight",value:function(){var t=this.settings,e=t.view,n=t.showToolbar,r=t.showBottomBar,i=e.height();return r&&(i-=41),n&&(i-=41),i}},{key:"viewWidth",value:function(){return this.settings.view.width()}},{key:"freezeViewRange",value:function(){var t=at(this.freeze,2),e=t[0],n=t[1];return new v(0,0,e-1,n-1,this.freezeTotalWidth(),this.freezeTotalHeight())}},{key:"contentRange",value:function(){var t=this.rows,e=this.cols,n=at(t.maxCell(),2),r=n[0],i=n[1],o=t.sumHeight(0,r+1),a=e.sumWidth(0,i+1);return new v(0,0,r,i,a,o)}},{key:"exceptRowTotalHeight",value:function(t,e){var n=this.exceptRowSet,r=this.rows,i=Array.from(n),o=0;return i.forEach(function(n){if(ne){var i=r.getHeight(n);o+=i}}),o}},{key:"viewRange",value:function(){var t=this.scroll,e=this.rows,n=this.cols,r=this.freeze,i=this.exceptRowSet,o=t.ri,a=t.ci;o<=0&&(o=at(r,1)[0]);a<=0&&(a=at(r,2)[1]);for(var l=0,c=0,s=[e.len,n.len],u=s[0],f=s[1],h=o;hthis.viewHeight()));h+=1);for(var p=a;pthis.viewWidth()));p+=1);return new v(o,a,u,f,l,c)}},{key:"eachMergesInView",value:function(t,e){this.merges.filterIntersects(t).forEach(function(t){return e(t)})}},{key:"hideRowsOrCols",value:function(){var t=this.rows,e=this.cols,n=this.selector,r=at(n.size(),2),i=r[0],o=r[1],a=n.range,l=a.sri,c=a.sci,s=a.eri,u=a.eci;if(i===t.len)for(var f=c;f<=u;f+=1)e.setHide(f,!0);else if(o===e.len)for(var h=l;h<=s;h+=1)t.setHide(h,!0)}},{key:"unhideRowsOrCols",value:function(t,e){this["".concat(t,"s")].unhide(e)}},{key:"rowEach",value:function(t,e,n){for(var r=0,i=this.rows,o=this.exceptRowSet,a=it(o),l=0,c=0;c0&&(n(s,r,u),(r+=u)>this.viewHeight()))break}}},{key:"colEach",value:function(t,e,n){for(var r=0,i=this.cols,o=t;o<=e;o+=1){var a=i.getWidth(o);if(a>0&&(n(o,r,a),(r+=a)>this.viewWidth()))break}}},{key:"defaultStyle",value:function(){return this.settings.style}},{key:"addStyle",value:function(t){for(var e=this.styles,n=0;nMath.abs(e)?r(t>0?"right":"left",t,n):r(e>0?"down":"up",e,n)}var kt="x-spreadsheet";window.devicePixelRatio;function Ot(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.moving=!1,this.vertical=n,this.el=a("div","".concat(kt,"-resizer ").concat(n?"vertical":"horizontal")).children(this.unhideHoverEl=a("div","".concat(kt,"-resizer-hover")).on("dblclick.stop",function(t){return e.mousedblclickHandler(t)}).css("position","absolute").hide(),this.hoverEl=a("div","".concat(kt,"-resizer-hover")).on("mousedown.stop",function(t){return e.mousedownHandler(t)}),this.lineEl=a("div","".concat(kt,"-resizer-line")).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=r,this.unhideFn=function(){}}var e,n,r;return e=t,(n=[{key:"showUnhide",value:function(t){this.unhideIndex=t,this.unhideHoverEl.show()}},{key:"hideUnhide",value:function(){this.unhideHoverEl.hide()}},{key:"show",value:function(t,e){var n=this.moving,r=this.vertical,i=this.hoverEl,o=this.lineEl,a=this.el,l=this.unhideHoverEl;if(!n){this.cRect=t;var c=t.left,s=t.top,u=t.width,f=t.height;a.offset({left:r?c+u-5:c,top:r?s:s+f-5}).show(),i.offset({width:r?5:u,height:r?f:5}),o.offset({width:r?0:e.width,height:r?e.height:0}),l.offset({left:r?5-u:c,top:r?s:5-f,width:r?5:u,height:r?f:5})}}},{key:"hide",value:function(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}},{key:"mousedblclickHandler",value:function(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}},{key:"mousedownHandler",value:function(t){var e=this,n=t,r=this.el,i=this.lineEl,o=this.cRect,a=this.vertical,l=this.minDistance,c=a?o.width:o.height;i.show(),mt(window,function(t){e.moving=!0,null!==n&&1===t.buttons&&(a?(c+=t.movementX)>l&&r.css("left","".concat(o.left+c,"px")):(c+=t.movementY)>l&&r.css("top","".concat(o.top+c,"px")),n=t)},function(){n=null,i.hide(),e.moving=!1,e.hide(),e.finishedFn&&(cn){var r=this.vertical?"height":"width";this.el.css(r,"".concat(n-15,"px")).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(r,"".concat(e,"px"))}else this.el.hide();return this}}])&&xt(e.prototype,n),r&&xt(e,r),t}();function jt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];jt(this,t),this.useHideInput=n,this.inputChange=function(){},this.cornerEl=a("div","".concat(kt,"-selector-corner")),this.areaEl=a("div","".concat(kt,"-selector-area")).child(this.cornerEl).hide(),this.clipboardEl=a("div","".concat(kt,"-selector-clipboard")).hide(),this.autofillEl=a("div","".concat(kt,"-selector-autofill")).hide(),this.el=a("div","".concat(kt,"-selector")).css("z-index","".concat(Tt)).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),n&&(this.hideInput=a("input","").on("compositionend",function(t){e.inputChange(t.target.value)}),this.el.child(this.hideInputDiv=a("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=a("div","hide-input").child(this.hideInput))),Tt+=1}return Ct(t,[{key:"setOffset",value:function(t){return this.el.offset(t).show(),this}},{key:"hide",value:function(){return this.el.hide(),this}},{key:"setAreaOffset",value:function(t){var e=t.left,n=t.top,r={width:t.width-3+.8,height:t.height-3+.8,left:e-.8,top:n-.8};this.areaEl.offset(r).show(),this.useHideInput&&(this.hideInputDiv.offset(r),this.hideInput.val("").focus())}},{key:"setClipboardOffset",value:function(t){var e=t.left,n=t.top,r=t.width,i=t.height;this.clipboardEl.offset({left:e,top:n,width:r-5,height:i-5})}},{key:"showAutofill",value:function(t){var e=t.left,n=t.top,r=t.width,i=t.height;this.autofillEl.offset({width:r-3,height:i-3,left:e,top:n}).show()}},{key:"hideAutofill",value:function(){this.autofillEl.hide()}},{key:"showClipboard",value:function(){this.clipboardEl.show()}},{key:"hideClipboard",value:function(){this.clipboardEl.hide()}}]),t}();function At(t){var e=this.data,n=t.left,r=t.top,i=t.width,o=t.height,a=t.scroll,l=t.l,c=t.t,s=e.freezeTotalWidth(),u=e.freezeTotalHeight(),f=n-s;s>l&&(f-=a.x);var h=r-u;return u>c&&(h-=a.y),{left:f,top:h,width:i,height:o}}function Rt(t){var e=this.data,n=t.left,r=t.width,i=t.height,o=t.l,a=t.t,l=t.scroll,c=e.freezeTotalWidth(),s=n-c;return c>o&&(s-=l.x),{left:s,top:a,width:r,height:i}}function Dt(t){var e=this.data,n=t.top,r=t.width,i=t.height,o=t.l,a=t.t,l=t.scroll,c=e.freezeTotalHeight(),s=n-c;return c>a&&(s-=l.y),{left:o,top:s,width:r,height:i}}function It(t){this.br.setAreaOffset(At.call(this,t))}function zt(t){this.t.setAreaOffset(Rt.call(this,t))}function Ht(t){this.l.setAreaOffset(Dt.call(this,t))}function Mt(t){this.l.setClipboardOffset(Dt.call(this,t))}function Nt(t){this.br.setClipboardOffset(At.call(this,t))}function Ft(t){this.t.setClipboardOffset(Rt.call(this,t))}function Wt(t){It.call(this,t),function(t){this.tl.setAreaOffset(t)}.call(this,t),zt.call(this,t),Ht.call(this,t)}function Vt(t){Nt.call(this,t),function(t){this.tl.setClipboardOffset(t)}.call(this,t),Ft.call(this,t),Mt.call(this,t)}var qt=function(){function t(e){var n=this;jt(this,t),this.inputChange=function(){},this.data=e,this.br=new Pt(!0),this.t=new Pt,this.l=new Pt,this.tl=new Pt,this.br.inputChange=function(t){n.inputChange(t)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=a("div","".concat(kt,"-selectors")).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Tt+=1}return Ct(t,[{key:"resetData",value:function(t){this.data=t,this.range=t.selector.range,this.resetAreaOffset()}},{key:"hide",value:function(){this.el.hide()}},{key:"resetOffset",value:function(){var t=this.data,e=this.tl,n=this.t,r=this.l,i=this.br,o=t.freezeTotalHeight(),a=t.freezeTotalWidth();o>0||a>0?(e.setOffset({width:a,height:o}),n.setOffset({left:a,height:o}),r.setOffset({top:o,width:a}),i.setOffset({left:a,top:o})):(e.hide(),n.hide(),r.hide(),i.setOffset({left:0,top:0}))}},{key:"resetAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Wt.call(this,t),Vt.call(this,e),this.resetOffset()}},{key:"resetBRTAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();It.call(this,t),zt.call(this,t),Nt.call(this,e),Ft.call(this,e),this.resetOffset()}},{key:"resetBRLAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();It.call(this,t),Ht.call(this,t),Nt.call(this,e),Mt.call(this,e),this.resetOffset()}},{key:"set",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.data,i=r.calSelectedRangeByStart(t,e),o=i.sri,a=i.sci;if(n){var l=t,c=e;t<0&&(l=0),e<0&&(c=0),r.selector.setIndexes(l,c),this.indexes=[l,c]}this.moveIndexes=[o,a],this.range=i,this.resetAreaOffset(),this.el.show()}},{key:"setEnd",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.data,i=this.lastri,o=this.lastci;if(n){if(t===i&&e===o)return;this.lastri=t,this.lastci=e}this.range=r.calSelectedRangeByEnd(t,e),Wt.call(this,this.data.getSelectedRect())}},{key:"reset",value:function(){var t=this.data.selector.range,e=t.eri,n=t.eci;this.setEnd(e,n)}},{key:"showAutofill",value:function(t,e){if(-1!==t||-1!==e){var n=this.range,r=n.sri,i=n.sci,o=n.eri,a=n.eci,l=t,c=e,s=r-t,u=o-t,f=a-e;if(i-e>0)this.arange=new v(r,c,o,i-1);else if(s>0)this.arange=new v(l,i,r-1,a);else if(f<0)this.arange=new v(r,a+1,o,c);else{if(!(u<0))return void(this.arange=null);this.arange=new v(o+1,i,l,a)}if(null!==this.arange){var h=this.data.getRect(this.arange);h.width+=2,h.height+=2;var p=this.br,d=this.l,y=this.t,b=this.tl;p.showAutofill(At.call(this,h)),d.showAutofill(Dt.call(this,h)),y.showAutofill(Rt.call(this,h)),b.showAutofill(h)}}}},{key:"hideAutofill",value:function(){var t=this;["br","l","t","tl"].forEach(function(e){t[e].hideAutofill()})}},{key:"showClipboard",value:function(){var t=this,e=this.data.getClipboardRect();Vt.call(this,e),["br","l","t","tl"].forEach(function(e){t[e].showClipboard()})}},{key:"hideClipboard",value:function(){var t=this;["br","l","t","tl"].forEach(function(e){t[e].hideClipboard()})}}]),t}();function Bt(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:"200px";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.filterItems=[],this.items=e,this.el=a("div","".concat(kt,"-suggest")).css("width",r).hide(),this.itemClick=n,this.itemIndex=-1}var e,n,r;return e=t,(n=[{key:"setOffset",value:function(t){this.el.cssRemoveKeys("top","bottom").offset(t)}},{key:"hide",value:function(){var t=this.el;this.filterItems=[],this.itemIndex=-1,t.hide(),bt(this.el.parent())}},{key:"setItems",value:function(t){this.items=t}},{key:"search",value:function(t){var e,n=this,r=this.items;if(/^\s*$/.test(t)||(r=r.filter(function(e){return(e.key||e).startsWith(t.toUpperCase())})),r=r.map(function(t){var e=t.title;e?"function"==typeof e&&(e=e()):e=t;var r=a("div","".concat(kt,"-item")).child(e).on("click.stop",function(){n.itemClick(t),n.hide()});return t.label&&r.child(a("div","label").html(t.label)),r}),this.filterItems=r,!(r.length<=0)){var i=this.el;(e=i.html("")).children.apply(e,Bt(r)).show(),gt(i.parent(),function(){n.hide()})}}},{key:"bindInputEvents",value:function(t){var e=this;t.on("keydown",function(t){return function(t){var e=t.keyCode;switch(t.ctrlKey&&t.stopPropagation(),e){case 37:t.stopPropagation();break;case 38:(function(t){t.preventDefault(),t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=e.length-1),e[this.itemIndex].toggle())}).call(this,t);break;case 39:t.stopPropagation();break;case 40:(function(t){t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>e.length-1&&(this.itemIndex=0),e[this.itemIndex].toggle())}).call(this,t);break;case 13:case 9:Ut.call(this,t);break;default:t.stopPropagation()}}.call(e,t)})}}])&&Lt(e.prototype,n),r&&Lt(e,r),t}();function $t(t){return($t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xt(t,e){for(var n=0;nr.width){var u=l;l>c&&(u=c,s+=parseInt(l/c,10),s+=l%c>0?1:0),n.css("width","".concat(u,"px"))}(s*=this.rowHeight)>r.height&&n.css("height","".concat(s,"px"))}}function se(t){var e=t.keyCode,n=t.altKey;13!==e&&9!==e&&t.stopPropagation(),13===e&&n&&(function(t,e){var n=t.target,r=n.value,i=n.selectionEnd,o="".concat(r.slice(0,i)).concat(e).concat(r.slice(i));n.value=o,n.setSelectionRange(i+1,i+1),this.inputText=o,this.textlineEl.html(o),ce.call(this)}.call(this,t,"\n"),t.stopPropagation()),13!==e||n||t.preventDefault()}function ue(t,e){var n=this.textEl,r=this.textlineEl;n.el.blur(),n.val(t),r.html(t),function(t){var e=this.textEl.el;setTimeout(function(){e.focus(),e.setSelectionRange(t,t)},0)}.call(this,e)}var fe=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.viewFn=n,this.rowHeight=r,this.formulas=e,this.suggest=new Yt(e,function(t){(function(t){var e=this.inputText,n=this.validator,r=0;if(n&&"list"===n.type)this.inputText=t,r=this.inputText.length;else{var i=e.lastIndexOf("="),o=e.substring(0,i+1),a=e.substring(i+1);a=-1!==a.indexOf(")")?a.substring(a.indexOf(")")):"",this.inputText="".concat(o+t.key,"("),r=this.inputText.length,this.inputText+=")".concat(a)}ue.call(this,this.inputText,r)}).call(i,t)}),this.datepicker=new oe,this.datepicker.change(function(t){i.setText(function(t){var e=t.getMonth()+1,n=t.getDate();return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(t.getFullYear(),"-").concat(e,"-").concat(n)}(t)),i.clear()}),this.areaEl=a("div","".concat(kt,"-editor-area")).children(this.textEl=a("textarea","").on("input",function(t){return function(t){var e=t.target.value,n=this.suggest,r=this.textlineEl,i=this.validator,o=this.cell;if(null!==o)if("editable"in o&&!0===o.editable||void 0===o.editable){if(this.inputText=e,i)"list"===i.type?n.search(e):n.hide();else{var a=e.lastIndexOf("=");-1!==a?n.search(e.substring(a+1)):n.hide()}r.html(e),ce.call(this),this.change("input",e)}else t.target.value=o.text;else{if(this.inputText=e,i)"list"===i.type?n.search(e):n.hide();else{var l=e.lastIndexOf("=");-1!==l?n.search(e.substring(l+1)):n.hide()}r.html(e),ce.call(this),this.change("input",e)}}.call(i,t)}).on("paste.stop",function(){}).on("keydown",function(t){return se.call(i,t)}),this.textlineEl=a("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",function(){}).on("mousedown.stop",function(){}),this.el=a("div","".concat(kt,"-editor")).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=function(){}}var e,n,r;return e=t,(n=[{key:"setFreezeLengths",value:function(t,e){this.freeze.w=t,this.freeze.h=e}},{key:"clear",value:function(){""!==this.inputText&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),function(){this.suggest.setItems(this.formulas)}.call(this),this.datepicker.hide()}},{key:"setOffset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n=this.textEl,r=this.areaEl,i=this.suggest,o=this.freeze,a=this.el;if(t){this.areaOffset=t;var l=t.left,c=t.top,s=t.width,u=t.height,f=t.l,h=t.t,p={left:0,top:0};o.w>f&&o.h>h||(o.wf?p.top=o.h:o.h>h&&(p.left=o.w)),a.offset(p),r.offset({left:l-p.left-.8,top:c-p.top-.8}),n.offset({width:s-9+.8,height:u-3+.8});var d={left:0};d[e]=u,i.setOffset(d),i.hide()}}},{key:"setCell",value:function(t,e){var n=this.el,r=this.datepicker,i=this.suggest;n.show(),this.cell=t;var o=t&&t.text||"";if(this.setText(o),this.validator=e,e){var a=e.type;"date"===a&&(r.show(),/^\s*$/.test(o)||r.setValue(o)),"list"===a&&(i.setItems(e.values()),i.search(""))}}},{key:"setText",value:function(t){this.inputText=t,ue.call(this,t,t.length),ce.call(this)}}])&&ae(e.prototype,n),r&&ae(e,r),t}();function he(t){return(he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pe(t,e){return!e||"object"!==he(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function de(t){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ye(t,e){return(ye=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var ve=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=pe(this,de(e).call(this,"div","".concat(kt,"-button ").concat(r)))).child(L("button.".concat(t))),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ye(t,e)}(e,o),e}();function be(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?e-.5:.5}var je=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;me(this,t),this.x=e,this.y=n,this.width=r,this.height=i,this.padding=o,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}return ke(t,[{key:"setBorders",value:function(t){var e=t.top,n=t.bottom,r=t.left,i=t.right;e&&(this.borderTop=e),i&&(this.borderRight=i),n&&(this.borderBottom=n),r&&(this.borderLeft=r)}},{key:"innerWidth",value:function(){return this.width-2*this.padding-2}},{key:"innerHeight",value:function(){return this.height-2*this.padding-2}},{key:"textx",value:function(t){var e=this.width,n=this.padding,r=this.x;return"left"===t?r+=n:"center"===t?r+=e/2:"right"===t&&(r+=e-n),r}},{key:"texty",value:function(t,e){var n=this.height,r=this.padding,i=this.y;return"top"===t?i+=r:"middle"===t?i+=n/2-e/2:"bottom"===t&&(i+=n-r-e),i}},{key:"topxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t+this.width,e]]}},{key:"rightxys",value:function(){var t=this.x,e=this.y,n=this.width;return[[t+n,e],[t+n,e+this.height]]}},{key:"bottomxys",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[[t,e+r],[t+n,e+r]]}},{key:"leftxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t,e+this.height]]}}]),t}();function _e(t,e,n,r,i,o,a){var l={x:0,y:0};"underline"===t?l.y="bottom"===i?0:"top"===i?-(o+2):-o/2:"strike"===t&&("bottom"===i?l.y=o/2:"top"===i&&(l.y=-(o/2+2))),"center"===r?l.x=a/2:"right"===r&&(l.x=a),this.line([e-l.x,n-l.y],[e-l.x+a,n-l.y])}var Ce=function(){function t(e,n,r){me(this,t),this.el=e,this.ctx=e.getContext("2d"),this.resize(n,r),this.ctx.scale(Oe(),Oe())}return ke(t,[{key:"resize",value:function(t,e){this.el.style.width="".concat(t,"px"),this.el.style.height="".concat(e,"px"),this.el.width=xe(t),this.el.height=xe(e)}},{key:"clear",value:function(){var t=this.el,e=t.width,n=t.height;return this.ctx.clearRect(0,0,e,n),this}},{key:"attr",value:function(t){return Object.assign(this.ctx,t),this}},{key:"save",value:function(){return this.ctx.save(),this.ctx.beginPath(),this}},{key:"restore",value:function(){return this.ctx.restore(),this}},{key:"beginPath",value:function(){return this.ctx.beginPath(),this}},{key:"translate",value:function(t,e){return this.ctx.translate(xe(t),xe(e)),this}},{key:"scale",value:function(t,e){return this.ctx.scale(t,e),this}},{key:"clearRect",value:function(t,e,n,r){return this.ctx.clearRect(t,e,n,r),this}},{key:"fillRect",value:function(t,e,n,r){return this.ctx.fillRect(xe(t)-.5,xe(e)-.5,xe(n),xe(r)),this}},{key:"fillText",value:function(t,e,n){return this.ctx.fillText(t,xe(e),xe(n)),this}},{key:"text",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.ctx,a=r.align,l=r.valign,c=r.font,s=r.color,u=r.strike,f=r.underline,h=e.textx(a);o.save(),o.beginPath(),this.attr({textAlign:a,textBaseline:l,font:"".concat(c.italic?"italic":""," ").concat(c.bold?"bold":""," ").concat(xe(c.size),"px ").concat(c.name),fillStyle:s,strokeStyle:s});var p="".concat(t).split("\n"),d=e.innerWidth(),y=[];p.forEach(function(t){var e=o.measureText(t).width;if(i&&e>xe(d)){for(var n={w:0,len:0,start:0},r=0;r=xe(d)&&(y.push(t.substr(n.start,n.len)),n={w:0,len:0,start:r}),n.len+=1,n.w+=o.measureText(t[r]).width+1;n.len>0&&y.push(t.substr(n.start,n.len))}else y.push(t)});var v=(y.length-1)*(c.size+2),b=e.texty(l,v);return y.forEach(function(t){var e=o.measureText(t).width;n.fillText(t,h,b),u&&_e.call(n,"strike",h,b,a,l,c.size,e),f&&_e.call(n,"underline",h,b,a,l,c.size,e),b+=c.size+2}),o.restore(),this}},{key:"border",value:function(t,e){var n=this.ctx;return n.lineWidth=Se,n.strokeStyle=e,"medium"===t?n.lineWidth=xe(2)-.5:"thick"===t?n.lineWidth=xe(3):"dashed"===t?n.setLineDash([xe(3),xe(2)]):"dotted"===t?n.setLineDash([xe(1),xe(1)]):"double"===t&&n.setLineDash([xe(2),0]),this}},{key:"line",value:function(){var t=this.ctx;if(arguments.length>1){t.beginPath();var e=arguments.length<=0?void 0:arguments[0],n=ge(e,2),r=n[0],i=n[1];t.moveTo(Ee(r),Ee(i));for(var o=1;o="a"&&s<="z")r.push(s.toUpperCase());else if(s>="0"&&s<="9"||s>="A"&&s<="Z"||"."===s)r.push(s);else if('"'===s){for(c+=1;'"'!==t.charAt(c);)r.push(t.charAt(c)),c+=1;n.push('"'.concat(r.join(""))),r=[]}else if("-"===s&&/[+\-*/,(]/.test(l))r.push(s);else{if("("!==s&&r.length>0&&n.push(r.join("")),")"===s){var u=e.pop();if(2===i)try{for(var p=Ae(f(n.pop()),2),d=p[0],y=p[1],v=Ae(f(n.pop()),2),b=v[0],g=v[1],m=0,w=b;w<=d;w+=1)for(var k=g;k<=y;k+=1)n.push(h(w,k)),m+=1;n.push([u,m])}catch(t){}else if(1===i||3===i)3===i&&n.push(o),n.push([u,a]),a=1;else for(;"("!==u&&(n.push(u),!(e.length<=0));)u=e.pop();i=0}else if("="===s||">"===s||"<"===s){var O=t.charAt(c+1);o=s,"="!==O&&"-"!==O||(o+=O,c+=1),i=3}else if(":"===s)i=2;else if(","===s)3===i&&n.push(o),i=1,a+=1;else if("("===s&&r.length>0)e.push(r.join(""));else{if(e.length>0&&("+"===s||"-"===s)){var S=e[e.length-1];if("("!==S&&n.push(e.pop()),"*"===S||"/"===S)for(;e.length>0&&"("!==(S=e[e.length-1]);)n.push(e.pop())}else if(e.length>0){var x=e[e.length-1];"*"!==x&&"/"!==x||n.push(e.pop())}e.push(s)}r=[]}l=s}}for(r.length>0&&n.push(r.join(""));e.length>0;)n.push(e.pop());return n},De=function(t,e){var n=Ae(t,1)[0],r=t;if('"'===n)return t.substring(1);var i=1;if("-"===n&&(r=t.substring(1),i=-1),r[0]>="0"&&r[0]<="9")return i*Number(r);var o=Ae(f(r),2);return i*e(o[0],o[1])},Ie=function(t,e,n,r){for(var i=[],o=0;o"===l||"<"===l){var h=i.pop();Number.isNaN(h)||(h=Number(h));var p=i.pop();Number.isNaN(p)||(p=Number(p));var d=!1;"="===l?d=p===h:">"===a?d=p>h:">="===a?d=p>=h:"<"===a?d=p="a"&&l<="z"||l>="A"&&l<="Z")&&r.push(a),i.push(De(a,n)),r.pop()}}return i[0]},ze={render:function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if("="===e[0]){var o=Re(e.substring(1));return o.length<=0?e:Ie(o,n,function(e,o){return t(r(e,o),n,r,i)},i)}return e}};function He(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Me(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e3&&void 0!==arguments[3]?arguments[3]:0,i=t.cellRect(e,n),o=i.left,a=i.top,l=i.width,c=i.height;return new je(o,a+r,l,c,Ke)}function tn(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=e.sortedRowMap,a=e.rows,l=e.cols;if(!a.isHide(n)&&!l.isHide(r)){var c=n;o.has(n)&&(c=o.get(n));var s=e.getCell(c,r);if(null!==s){var u=!1;"editable"in s&&!1===s.editable&&(u=!0);var f=e.getCellStyleOrDefault(c,r),h=Qe(e,n,r,i);h.bgcolor=f.bgcolor,void 0!==f.border&&(h.setBorders(f.border),t.strokeBorders(h)),t.rect(h,function(){var i="";i=e.settings.evalPaused?s.text||"":ze.render(s.text||"",We,function(t,n){return e.getCellTextOrDefault(n,t)}),f.format&&(i=$e[f.format].render(i));var o=Object.assign({},f.font);o.size=function(t){for(var e=0;e0&&c.rows.isHide(t-1)&&(l.save(),l.attr({strokeStyle:"#c6c6c6"}),l.line([5,i+5],[n-5,i+5]),l.restore())}),l.line([0,u+h],[n,u+h]),l.line([n,h],[n,u+h])),"all"!==t&&"top"!==t||(c.colEach(e.sci,e.eci,function(t,e,n){var i=p+e,o=t;l.line([i,0],[i,r]),v<=o&&o0&&c.cols.isHide(t-1)&&(l.save(),l.attr({strokeStyle:"#c6c6c6"}),l.line([i+5,5],[i+5,r-5]),l.restore())}),l.line([f+p,0],[f+p,r]),l.line([0,r],[f+p,r])),l.restore()}function on(t,e,n,r,i){var o=t.sri,a=t.sci,l=t.eri,c=t.eci,s=t.w,u=t.h,f=this.draw,h=this.data,p=h.settings;f.save(),f.attr(Ge).translate(e+r,n+i),p.showGrid?(h.rowEach(o,l,function(t,e,n){t!==o&&f.line([0,e],[s,e]),t===l&&f.line([0,e+n],[s,e+n])}),h.colEach(a,c,function(t,e,n){t!==a&&f.line([e,0],[e,u]),t===c&&f.line([e+n,0],[e+n,u])}),f.restore()):f.restore()}var an=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.draw=new Ce(e,n.viewWidth(),n.viewHeight()),this.data=n}var e,n,r;return e=t,(n=[{key:"resetData",value:function(t){this.data=t,this.render()}},{key:"render",value:function(){var t=this.data,e=t.rows,n=t.cols.indexWidth,r=e.height;this.draw.resize(t.viewWidth(),t.viewHeight()),this.clear();var i=t.viewRange(),o=t.freezeTotalWidth(),a=t.freezeTotalHeight(),l=t.scroll,c=l.x,s=l.y;on.call(this,i,n,r,o,a),en.call(this,i,n,r,-c,-s),rn.call(this,"all",i,n,r,o,a),function(t,e){var n=this.draw;n.save(),n.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,t,e),n.restore()}.call(this,n,r);var u=Xe(t.freeze,2),f=u[0],h=u[1];if(f>0||h>0){if(f>0){var p=i.clone();p.sri=0,p.eri=f-1,p.h=a,on.call(this,p,n,r,o,0),en.call(this,p,n,r,-c,0),rn.call(this,"top",p,n,r,o,0)}if(h>0){var d=i.clone();d.sci=0,d.eci=h-1,d.w=o,on.call(this,d,n,r,0,a),rn.call(this,"left",d,n,r,0,a),en.call(this,d,n,r,0,-s)}var y=t.freezeViewRange();on.call(this,y,n,r,0,0),rn.call(this,"all",y,n,r,0,0),en.call(this,y,n,r,0,0),function(t,e,n,r){var i=this.draw,o=this.data,a=o.viewWidth()-t,l=o.viewHeight()-e;i.save().translate(t,e).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),i.line([0,r],[a,r]),i.line([n,0],[n,l]),i.restore()}.call(this,n,r,o,a)}}},{key:"clear",value:function(){this.draw.clear()}}])&&Ze(e.prototype,n),r&&Ze(e,r),t}();function ln(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1&&(h+=(l-s.w)/2);var d=0,y=0;this.contentEl.html(""),this.canvases=[];for(var v={sri:0,sci:0,eri:0,eci:0},b=function(n){var o=0,l=0,u=a("div","".concat(kt,"-canvas-card")),b=a("canvas","".concat(kt,"-canvas"));t.canvases.push(b.el);var g=new Ce(b.el,r,i);for(g.save(),g.translate(h,p),f<1&&g.scale(f,f);d<=s.eri;d+=1){var m=e.rows.getHeight(d);if(!((o+=m)1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.menuItems=bn.call(this),this.el=(n=a("div","".concat(kt,"-contextmenu"))).children.apply(n,dn(this.menuItems)).hide(),this.viewFn=e,this.itemClick=function(){},this.isHide=r,this.setMode("range")}var e,n,r;return e=t,(n=[{key:"setMode",value:function(t){var e=this.menuItems[12];"row-col"===t?e.show():e.hide()}},{key:"hide",value:function(){var t=this.el;t.hide(),bt(t)}},{key:"setPosition",value:function(t,e){if(!this.isHide){var n=this.el,r=n.show().offset().width,i=this.viewFn(),o=i.height/2,a=t;i.width-t<=r&&(a-=r),n.css("left","".concat(a,"px")),e>o?n.css("bottom","".concat(i.height-e,"px")).css("max-height","".concat(e,"px")).css("top","auto"):n.css("top","".concat(e,"px")).css("max-height","".concat(i.height-e,"px")).css("bottom","auto"),gt(n)}}}])&&yn(e.prototype,n),r&&yn(e,r),t}();function mn(t,e){for(var n=0;n4?c-4:0),u=4;u0)&&(t=this.contentEl).children.apply(t,arguments)}},{key:"setTitle",value:function(t){this.title.html(t),this.hide()}},{key:"show",value:function(){var t=this;this.contentEl.show(),this.parent().active(),gt(this.parent(),function(){t.hide()})}},{key:"hide",value:function(){this.parent().active(!1),this.contentEl.hide(),bt(this.parent())}}])&&Tn(n.prototype,r),i&&Tn(n,i),e}();function In(t){return(In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zn(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e'],["medium",''],["thick",''],["dashed",''],["dotted",'']],Kr=function(t){function e(t){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=new Gt("line-type"),o=0,l=Zr.map(function(e,n){return a("div","".concat(kt,"-item state ").concat(t===e[0]?"checked":"")).on("click",function(){l[o].toggle("checked"),l[n].toggle("checked"),o=n,r.hide(),r.change(e)}).child(a("div","".concat(kt,"-line-type")).html(e[1]))});return r=Yr(this,(n=$r(e)).call.apply(n,[this,i,"auto",!1,"bottom-left"].concat(Ur(l))))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xr(t,e)}(e,Dn),e}();function Jr(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?i.show():i.hide()}function Ta(t){var e=this,n=new wn;n.el.on("click",function(){t.onClick&&t.onClick(e.data.getData(),e.data)}),n.tip=t.tip||"";var r=t.el;if(t.icon&&(r=a("img").attr("src",t.icon)),r){var i=a("div","".concat(kt,"-icon"));i.child(r),n.el.child(i)}return n}var Pa=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.change=function(){},this.widthFn=n,this.isHide=i;var o=e.defaultStyle();this.items=[[this.undoEl=new oa,this.redoEl=new ta,new ua,this.paintformatEl=new Pi,this.clearformatEl=new xi],_a(),[this.formatEl=new jo],_a(),[this.fontEl=new ho,this.fontSizeEl=new to],_a(),[this.boldEl=new vr,this.italicEl=new kr,this.underlineEl=new Ar,this.strikeEl=new jr,this.textColorEl=new Hi(o.color)],_a(),[this.fillColorEl=new qi(o.bgcolor),this.borderEl=new hi,this.mergeEl=new Zo],_a(),[this.alignEl=new Yn(o.align),this.valignEl=new Gn(o.valign),this.textwrapEl=new ya],_a(),[this.freezeEl=new Bo,this.autofilterEl=new fr,this.formulaEl=new No]];var l=e.settings.extendToolbar,c=void 0===l?{}:l;if(c.left&&c.left.length>0){this.items.unshift(_a());var s=c.left.map(Ta.bind(this));this.items.unshift(s)}if(c.right&&c.right.length>0){this.items.push(_a());var u=c.right.map(Ta.bind(this));this.items.push(u)}this.items.push([this.moreEl=new xa]),this.el=a("div","".concat(kt,"-toolbar")),this.btns=a("div","".concat(kt,"-toolbar-btns")),this.items.forEach(function(t){Array.isArray(t)?t.forEach(function(t){r.btns.child(t.el),t.change=function(){r.change.apply(r,arguments)}}):r.btns.child(t.el)}),this.el.child(this.btns),i?this.el.hide():(this.reset(),setTimeout(function(){(function(){var t=this;this.btns2=[],this.items.forEach(function(e){if(Array.isArray(e))e.forEach(function(e){var n=e.el,r=n.box(),i=n.computedStyle(),o=i.marginLeft,a=i.marginRight;t.btns2.push([n,r.width+parseInt(o,10)+parseInt(a,10)])});else{var n=e.box(),r=e.computedStyle(),i=r.marginLeft,o=r.marginRight;t.btns2.push([e,n.width+parseInt(i,10)+parseInt(o,10)])}})}).call(r),Ca.call(r)},0),yt(window,"resize",function(){Ca.call(r)}))}var e,n,r;return e=t,(n=[{key:"paintformatActive",value:function(){return this.paintformatEl.active()}},{key:"paintformatToggle",value:function(){this.paintformatEl.toggle()}},{key:"trigger",value:function(t){this["".concat(t,"El")].click()}},{key:"resetData",value:function(t){this.data=t,this.reset()}},{key:"reset",value:function(){if(!this.isHide){var t=this.data,e=t.getSelectedCellStyle();this.undoEl.setState(!t.canUndo()),this.redoEl.setState(!t.canRedo()),this.mergeEl.setState(t.canUnmerge(),!t.selector.multiple()),this.autofilterEl.setState(!t.canAutofilter());var n=e.font,r=e.format;this.formatEl.setState(r),this.fontEl.setState(n.name),this.fontSizeEl.setState(n.size),this.boldEl.setState(n.bold),this.italicEl.setState(n.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),this.alignEl.setState(e.align),this.valignEl.setState(e.valign),this.textwrapEl.setState(e.textwrap),this.freezeEl.setState(t.freezeIsActive())}}}])&&Ea(e.prototype,n),r&&Ea(e,r),t}();function Aa(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:"600px";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.title=e,this.el=a("div","".concat(kt,"-modal")).css("width",o).children(a("div","".concat(kt,"-modal-header")).children(new Gt("close").on("click.stop",function(){return i.hide()}),this.title),(r=a("div","".concat(kt,"-modal-content"))).children.apply(r,Aa(n))).hide()}var e,n,r;return e=t,(n=[{key:"show",value:function(){var t=this;this.dimmer=a("div","".concat(kt,"-dimmer active")),document.body.appendChild(this.dimmer.el);var e=this.el.show().box(),n=e.width,r=e.height,i=document.documentElement,o=i.clientHeight,l=i.clientWidth;this.el.offset({left:(l-n)/2,top:(o-r)/3}),window.xkeydownEsc=function(e){27===e.keyCode&&t.hide()},yt(window,"keydown",window.xkeydownEsc)}},{key:"hide",value:function(){this.el.hide(),document.body.removeChild(this.dimmer.el),vt(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}])&&Ra(e.prototype,n),r&&Ra(e,r),t}();function Ia(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:function(t){return t},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.key=e,this.getTitle=o,this.vchange=function(){},this.el=a("div","".concat(kt,"-form-select")),this.suggest=new Yt(n.map(function(t){return{key:t,title:i.getTitle(t)}}),function(t){i.itemClick(t.key),l(t.key),i.vchange(t.key)},r,this.el),this.el.children(this.itemEl=a("div","input-text").html(this.getTitle(e)),this.suggest.el).on("click",function(){return i.show()})}var e,n,r;return e=t,(n=[{key:"show",value:function(){this.suggest.search("")}},{key:"itemClick",value:function(t){this.key=t,this.itemEl.html(this.getTitle(t))}},{key:"val",value:function(t){return void 0!==t?(this.key=t,this.itemEl.html(this.getTitle(t)),this):this.key}}])&&Ha(e.prototype,n),r&&Ha(e,r),t}();function Na(t,e){for(var n=0;n3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(-1!==e||-1!==n){var o=this.table,a=this.selector,l=this.toolbar,c=this.data;this.contextMenu.setMode(-1===e||-1===n?"row-col":"range");var s=c.getCell(e,n);t?(a.setEnd(e,n,i),this.trigger("cells-selected",s,a.range)):(a.set(e,n,r),this.trigger("cell-selected",s,e,n)),l.reset(),o.render()}}function il(t,e){var n=this.selector,r=this.data,i=r.rows,o=r.cols,a=el(n.indexes,2),l=a[0],c=a[1],s=n.range,u=s.eri,f=s.eci;if(t){var h=el(n.moveIndexes,2);l=h[0],c=h[1]}"left"===e?c>0&&(c-=1):"right"===e?(f!==c&&(c=f),c0&&(l-=1):"down"===e?(u!==l&&(l=u),lu.width)n.move({left:i+c-u.width});else{var f=t.freezeTotalWidth();au.height)e.move({top:o+s-u.height-1});else{var h=t.freezeTotalHeight();l0||o>0){var a=e.freezeTotalWidth(),l=e.freezeTotalHeight();n.setFreezeLengths(a,l)}t.resetAreaOffset()}.call(this),r.render(),i.reset(),o.reset()}function cl(){var t=this.data,e=this.selector;t.clearClipboard(),e.hideClipboard()}function sl(){var t=this.data,e=this.selector;"read"!==t.settings.mode&&(t.copy(),t.copyToSystemClipboard(),e.showClipboard())}function ul(){var t=this.data,e=this.selector;"read"!==t.settings.mode&&(t.cut(),e.showClipboard())}function fl(t,e){var n=this.data;if("read"!==n.settings.mode)if(n.paste(t,function(t){return Qa("Tip",t)}))ll.call(this);else if(e){var r=e.clipboardData.getData("text/plain");this.data.pasteFromText(r),ll.call(this)}}function hl(t,e){this.data.unhideRowsOrCols(t,e),ll.call(this)}function pl(t){var e=this,n=this.selector,r=this.data,i=this.table,o=this.sortFilter,a=t.offsetX,l=t.offsetY,c=t.target.className==="".concat(kt,"-selector-corner"),s=r.getCellRectByXY(a,l),u=s.left,f=s.top,h=s.width,p=s.height,d=s.ri,y=s.ci,v=r.autoFilter;if(v.includes(d,y)&&u+h-20n.height/2&&(r="bottom"),t.setOffset(e,r)}function yl(){var t=this.editor,e=this.data;"read"!==e.settings.mode&&(dl.call(this),t.setCell(e.getSelectedCell(),e.getSelectedValidator()),cl.call(this))}function vl(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finished",n=this.data,r=this.table;if("read"!==n.settings.mode){n.setSelectedCellText(t,e);var i=n.selector,o=i.ri,a=i.ci;"finished"===e?r.render():this.trigger("cell-edited",t,o,a)}}function bl(t){var e=this.data;"read"!==e.settings.mode&&("insert-row"===t?e.insert("row"):"delete-row"===t?e.delete("row"):"insert-column"===t?e.insert("column"):"delete-column"===t?e.delete("column"):"delete-cell"===t?e.deleteCell():"delete-cell-format"===t?e.deleteCell("format"):"delete-cell-text"===t?e.deleteCell("text"):"cell-printable"===t?e.setSelectedCellAttr("printable",!0):"cell-non-printable"===t?e.setSelectedCellAttr("printable",!1):"cell-editable"===t?e.setSelectedCellAttr("editable",!0):"cell-non-editable"===t&&e.setSelectedCellAttr("editable",!1),cl.call(this),ll.call(this))}function gl(t,e){var n=this.data;if("undo"===t)this.undo();else if("redo"===t)this.redo();else if("print"===t)this.print.preview();else if("paintformat"===t)!0===e?sl.call(this):cl.call(this);else if("clearformat"===t)bl.call(this,"delete-cell-format");else if("link"===t);else if("chart"===t);else if("autofilter"===t)(function(){this.data.autofilter(),ll.call(this)}).call(this);else if("freeze"===t)if(e){var r=n.selector,i=r.ri,o=r.ci;this.freeze(i,o)}else this.freeze(0,0);else n.setSelectedCellAttr(t,e),"formula"!==t||n.selector.multiple()||yl.call(this),ll.call(this)}function ml(){var t,e,n,r,i,o,a=this,l=this.selector,c=this.overlayerEl,s=this.rowResizer,u=this.colResizer,f=this.verticalScrollbar,h=this.horizontalScrollbar,p=this.editor,d=this.contextMenu,y=this.toolbar,v=this.modalValidation,b=this.sortFilter;c.on("mousemove",function(t){(function(t){if(0===t.buttons&&t.target.className!=="".concat(kt,"-resizer-hover")){var e=t.offsetX,n=t.offsetY,r=this.rowResizer,i=this.colResizer,o=this.tableEl,a=this.data,l=a.rows,c=a.cols;if(e>c.indexWidth&&n>l.height)return r.hide(),void i.hide();var s=o.box(),u=a.getCellRectByXY(t.offsetX,t.offsetY);u.ri>=0&&-1===u.ci?(u.width=c.indexWidth,r.show(u,{width:s.width}),l.isHide(u.ri-1)?r.showUnhide(u.ri):r.hideUnhide()):r.hide(),-1===u.ri&&u.ci>=0?(u.height=l.height,i.show(u,{height:s.height}),c.isHide(u.ci-1)?i.showUnhide(u.ci):i.hideUnhide()):i.hide()}}).call(a,t)}).on("mousedown",function(t){p.clear(),d.hide(),2===t.buttons?(a.data.xyInSelectedRect(t.offsetX,t.offsetY)?d.setPosition(t.offsetX,t.offsetY):(pl.call(a,t),d.setPosition(t.offsetX,t.offsetY)),t.stopPropagation()):2===t.detail?yl.call(a):pl.call(a,t)}).on("mousewheel.stop",function(t){(function(t){var e=this.verticalScrollbar,n=this.horizontalScrollbar,r=this.data,i=e.scroll().top,o=n.scroll().left,a=r.rows,l=r.cols,c=t.deltaY,s=t.deltaX,u=function(t,e){var n=t,r=0;do{r=e(n),n+=1}while(r<=0);return r},f=function(t){if(t>0){var n=r.scroll.ri+1;if(n=0){var c=u(l,function(t){return a.getHeight(t)});e.move({top:0===l?0:i-c})}}},h=Math.abs(c),p=Math.abs(s),d=Math.max(h,p);/Firefox/i.test(window.navigator.userAgent)&&nl(f(t.detail),50),d===p&&nl(function(t){if(t>0){var e=r.scroll.ci+1;if(e=0){var c=u(a,function(t){return l.getWidth(t)});n.move({left:0===a?0:o-c})}}}(s),50),d===h&&nl(f(c),50)}).call(a,t)}).on("mouseout",function(t){var e=t.offsetX;t.offsetY<=0&&u.hide(),e<=0&&s.hide()}),l.inputChange=function(t){vl.call(a,t,"input"),yl.call(a)},t=c.el,n=(e={move:function(t,e){(function(t,e){var n=this.verticalScrollbar,r=this.horizontalScrollbar,i=n.scroll().top,o=r.scroll().left;"left"===t||"right"===t?r.move({left:o-e}):"up"!==t&&"down"!==t||n.move({top:i-e})}).call(a,t,e)}}).move,r=e.end,i=0,o=0,yt(t,"touchstart",function(t){var e=t.touches[0],n=e.pageX,r=e.pageY;i=n,o=r}),yt(t,"touchmove",function(t){if(n){var e=t.changedTouches[0],r=e.pageX,a=e.pageY,l=r-i,c=a-o;(Math.abs(l)>10||Math.abs(c)>10)&&(wt(l,c,t,n),i=r,o=a),t.preventDefault()}}),yt(t,"touchend",function(t){if(r){var e=t.changedTouches[0],n=e.pageX,a=e.pageY;wt(n-i,a-o,t,r)}}),y.change=function(t,e){return gl.call(a,t,e)},b.ok=function(t,e,n,r){return function(t,e,n,r){this.data.setAutoFilter(t,e,n,r),ll.call(this)}.call(a,t,e,n,r)},s.finishedFn=function(t,e){(function(t,e){var n=t.ri,r=this.table,i=this.selector;this.data.rows.setHeight(n,e),r.render(),i.resetAreaOffset(),ol.call(this),dl.call(this)}).call(a,t,e)},u.finishedFn=function(t,e){(function(t,e){var n=t.ci,r=this.table,i=this.selector;this.data.cols.setWidth(n,e),r.render(),i.resetAreaOffset(),al.call(this),dl.call(this)}).call(a,t,e)},s.unhideFn=function(t){hl.call(a,"row",t)},u.unhideFn=function(t){hl.call(a,"col",t)},f.moveFn=function(t,e){(function(t){var e=this,n=this.data,r=this.table,i=this.selector;n.scrolly(t,function(){i.resetBRLAreaOffset(),dl.call(e),r.render()})}).call(a,t,e)},h.moveFn=function(t,e){(function(t){var e=this,n=this.data,r=this.table,i=this.selector;n.scrollx(t,function(){i.resetBRTAreaOffset(),dl.call(e),r.render()})}).call(a,t,e)},p.change=function(t,e){vl.call(a,e,t)},v.change=function(t){if("save"===t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=65&&e<=90||e>=48&&e<=57||e>=96&&e<=105||"="===t.key?(vl.call(a,t.key,"input"),yl.call(a)):113===e&&yl.call(a)}}})}var wl=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.eventMap=function(){var t=new Map;function e(e,n){var r;return t.has(e)&&(r=t.get(e),Array.isArray(r)&&r.push(n)||!1)||t.set(e,[].concat(n))}function n(e,n){var r,i;return t.has(e)&&(r=t.get(e),(i=r.indexOf(n))>=0&&r.splice(i,1)&&0===t.get(e).length&&t.delete(e))}return{get current(){return t},on:e,once:function(t,r){return e(t,function e(){for(var i=arguments.length,o=new Array(i),a=0;a1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:function(){},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};xl(this,t),this.swapFunc=r,this.updateFunc=o,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new Pl(function(t){e.clickSwap2(e.items[t])}),this.contextMenu=new Dl,this.contextMenu.itemClick=i,this.el=a("div","".concat(kt,"-bottombar")).children(this.contextMenu.el,this.menuEl=a("ul","".concat(kt,"-menu")).child(a("li","").children(new Gt("add").on("click",function(){n()}),a("span","").child(this.moreEl))))}return jl(t,[{key:"addItem",value:function(t,e){var n=this;this.dataNames.push(t);var r=a("li",e?"active":"").child(t);r.on("click",function(){n.clickSwap2(r)}).on("contextmenu",function(t){var e=t.target,i=e.offsetLeft,o=e.offsetHeight;n.contextMenu.setOffset({left:i,bottom:o+1}),n.deleteEl=r}).on("dblclick",function(){var t=r.html(),e=new za("auto","");e.val(t),e.input.on("blur",function(e){var r=e.target.value,i=n.dataNames.findIndex(function(e){return e===t});n.renameItem(i,r)}),r.html("").child(e.el),e.focus()}),e&&this.clickSwap(r),this.items.push(r),this.menuEl.child(r),this.moreEl.reset(this.dataNames)}},{key:"renameItem",value:function(t,e){this.dataNames.splice(t,1,e),this.moreEl.reset(this.dataNames),this.items[t].html("").child(e),this.updateFunc(t,e)}},{key:"clear",value:function(){var t=this;this.items.forEach(function(e){t.menuEl.removeChild(e.el)}),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}},{key:"deleteItem",value:function(){var t=this.activeEl,e=this.deleteEl;if(this.items.length>1){var n=this.items.findIndex(function(t){return t===e});if(this.items.splice(n,1),this.dataNames.splice(n,1),this.menuEl.removeChild(e.el),this.moreEl.reset(this.dataNames),t===e){var r=kl(this.items,1)[0];return this.activeEl=r,this.activeEl.toggle(),[n,0]}return[n,-1]}return[-1]}},{key:"clickSwap2",value:function(t){var e=this.items.findIndex(function(e){return e===t});this.clickSwap(t),this.activeEl.toggle(),this.swapFunc(e)}},{key:"clickSwap",value:function(t){null!==this.activeEl&&this.activeEl.toggle(),this.activeEl=t}}]),t}();n(1);function zl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Hl(t,e){var n=Object.keys(t);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(t)),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n}function Ml(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nl(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=e;this.options=function(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1],r=t||"sheet".concat(this.sheetIndex),i=new pt(r,this.options);return i.change=function(){for(var t,n=arguments.length,r=new Array(n),i=0;i=0&&(this.datas.splice(e,1),n>=0&&this.sheet.resetData(this.datas[n]))}}},{key:"loadData",value:function(t){var e=Array.isArray(t)?t:[t];if(null!==this.bottombar&&this.bottombar.clear(),this.datas=[],e.length>0)for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:0;return this.datas[r].setCellText(t,e,n,"finished"),this}},{key:"cell",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.datas[n].getCell(t,e)}},{key:"cellStyle",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.datas[n].getCellStyle(t,e)}},{key:"reRender",value:function(){return this.sheet.table.render(),this}},{key:"on",value:function(t,e){return this.sheet.on(t,e),this}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(t){return this.sheet.on("change",t),this}}])&&Nl(e.prototype,n),r&&Nl(e,r),t}(),Wl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Fl(t,e)};window&&(window.x_spreadsheet=Wl,window.x_spreadsheet.locale=function(t,e){return Y(t,e)});e.default=Fl}]); +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){},function(t,e,r){},function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:"";i(this,t),"string"==typeof e?(this.el=document.createElement(e),this.el.className=r):this.el=e,this.data={}}var e,r,o;return e=t,(r=[{key:"data",value:function(t,e){return void 0!==e?(this.data[t]=e,this):this.data[t]}},{key:"on",value:function(t,e){var r=n(t.split(".")),o=r[0],i=r.slice(1),a=o;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,(function(t){e(t);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(t)}},{key:"toggleClass",value:function(t){return this.el.classList.toggle(t)}},{key:"active",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return t?this.addClass(e):this.removeClass(e),this}},{key:"checked",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.active(t,"checked"),this}},{key:"disabled",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(t,e){var r=this;if(void 0!==e)this.el.setAttribute(t,e);else{if("string"==typeof t)return this.el.getAttribute(t);Object.keys(t).forEach((function(e){r.el.setAttribute(e,t[e])}))}return this}},{key:"removeAttr",value:function(t){return this.el.removeAttribute(t),this}},{key:"html",value:function(t){return void 0!==t?(this.el.innerHTML=t,this):this.el.innerHTML}},{key:"val",value:function(t){return void 0!==t?(this.el.value=t,this):this.el.value}},{key:"focus",value:function(){this.el.focus()}},{key:"cssRemoveKeys",value:function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:"";return new l(t,e)};r(0);function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=f.length;)r/=f.length,r-=1,e+=f[parseInt(r,10)%f.length];return e+=f[t%f.length]}function y(t){for(var e=0,r=0;r!==t.length;++r)e=26*e+t.charCodeAt(r)-64;return e-1}function p(t){for(var e="",r="",n=0;n="0"&&t.charAt(n)<="9"?r+=t.charAt(n):e+=t.charAt(n);return[y(e),parseInt(r,10)-1]}function d(t,e){return"".concat(h(t)).concat(e+1)}function v(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};if(0===e&&0===r)return t;var o=p(t),i=u(o,2),a=i[0],l=i[1];return n(a,l)?d(a+e,l+r):t}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;g(this,t),this.sri=e,this.sci=r,this.eri=n,this.eci=o,this.w=i,this.h=a}var e,r,n;return e=t,n=[{key:"valueOf",value:function(e){var r=e.split(":"),n=b(p(r[0]),2),o=n[0],i=n[1],a=i,l=o;if(r.length>1){var c=b(p(r[1]),2);l=c[0],a=c[1]}return new t(i,o,a,l)}}],(r=[{key:"set",value:function(t,e,r,n){this.sri=t,this.sci=e,this.eri=r,this.eci=n}},{key:"multiple",value:function(){return this.eri-this.sri>0||this.eci-this.sci>0}},{key:"includes",value:function(){for(var t=0,e=0,r=arguments.length,n=new Array(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:function(){return!0},r=this.sri,n=this.sci,o=this.eri,i=this.eci,a=r;a<=o;a+=1)if(e(a))for(var l=n;l<=i;l+=1)t(a,l)}},{key:"contains",value:function(t){return this.sri<=t.sri&&this.sci<=t.sci&&this.eri>=t.eri&&this.eci>=t.eci}},{key:"within",value:function(t){return this.sri>=t.sri&&this.sci>=t.sci&&this.eri<=t.eri&&this.eci<=t.eci}},{key:"disjoint",value:function(t){return this.sri>t.eri||this.sci>t.eci||t.sri>this.eri||t.sci>this.eci}},{key:"intersects",value:function(t){return this.sri<=t.eri&&this.sci<=t.eci&&t.sri<=this.eri&&t.sci<=this.eci}},{key:"union",value:function(e){var r=this.sri,n=this.sci,o=this.eri,i=this.eci;return new t(e.srio?e.eri:o,e.eci>i?e.eci:i)}},{key:"difference",value:function(e){var r=[],n=function(e,n,o,i){r.push(new t(e,n,o,i))},o=this.sri,i=this.sci,a=this.eri,l=this.eci,c=e.sri-o,u=e.sci-i,s=a-e.eri,f=l-e.eci;return c>0?(n(o,i,e.sri-1,l),s>0?(n(e.eri+1,i,a,l),u>0&&n(e.sri,i,e.eri,e.sci-1),f>0&&n(e.sri,e.eci+1,e.eri,l)):(u>0&&n(e.sri,i,a,e.sci-1),f>0&&n(e.sri,e.eci+1,a,l))):s>0&&(n(e.eri+1,i,a,l),u>0&&n(o,i,e.eri,e.sci-1),f>0&&n(o,e.eci+1,e.eri,l)),u>0?(n(o,i,a,e.sci-1),f>0?(n(o,e.eri+1,a,l),c>0&&n(o,e.sci,e.sri-1,e.eci),s>0&&n(e.sri+1,e.sci,a,e.eci)):(c>0&&n(o,e.sci,e.sri-1,l),s>0&&n(e.sri+1,e.sci,a,l))):f>0&&(n(a,e.eci+1,a,l),c>0&&n(o,i,e.sri-1,e.eci),s>0&&n(e.eri+1,i,a,e.eci)),r}},{key:"size",value:function(){return[this.eri-this.sri+1,this.eci-this.sci+1]}},{key:"toString",value:function(){var t=this.sri,e=this.sci,r=this.eri,n=this.eci,o=d(e,t);return this.multiple()&&(o="".concat(o,":").concat(d(n,r))),o}},{key:"clone",value:function(){return new t(this.sri,this.sci,this.eri,this.eci,this.w,this.h)}},{key:"equals",value:function(t){return this.eri===t.eri&&this.eci===t.eci&&this.sri===t.sri&&this.sci===t.sci}}])&&w(e.prototype,r),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function k(t,e){for(var r=0;r0}},{key:"canRedo",value:function(){return this.redoItems.length>0}},{key:"undo",value:function(t,e){var r=this.undoItems,n=this.redoItems;this.canUndo()&&(n.push(JSON.stringify(t)),e(JSON.parse(r.pop())))}},{key:"redo",value:function(t,e){var r=this.undoItems,n=this.redoItems;this.canRedo()&&(r.push(JSON.stringify(t)),e(JSON.parse(n.pop())))}}])&&P(e.prototype,r),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function R(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];B(this,t),this._=e}var e,r,n;return e=t,(r=[{key:"forEach",value:function(t){this._.forEach(t)}},{key:"deleteWithin",value:function(t){this._=this._.filter((function(e){return!e.within(t)}))}},{key:"getFirstIncludes",value:function(t,e){for(var r=0;r=e?(u.sri+=r,u.eri+=r):i=e?(u.sci+=r,u.eci+=r):a0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length,n=new Array(r>1?r-1:0),o=1;o5?l.toFixed(2):l;return l.toFixed(Math.max(n,o))}var U={cloneDeep:function(t){return JSON.parse(JSON.stringify(t))},merge:function(){for(var t=arguments.length,e=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:function(t){return t},r=0,n=0;return Object.keys(t).forEach((function(o){r+=e(t[o],o),n+=1})),[r,n]},rangeEach:function(t,e,r){for(var n=t;no);c+=1)a+=l=i(c);return[c,a-l,l]},deleteProperty:function(t,e){var r=t["".concat(e)];return delete t["".concat(e)],r},numberCalc:V};function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return q(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}},{key:"isHide",value:function(t){var e=this.get(t);return e&&e.hide}},{key:"setHide",value:function(t,e){var r=this.getOrNew(t);!0===e?r.hide=!0:delete r.hide}},{key:"setStyle",value:function(t,e){this.getOrNew(t).style=e}},{key:"sumHeight",value:function(t,e,r){var n=this;return U.rangeSum(t,e,(function(t){return r&&r.has(t)?0:n.getHeight(t)}))}},{key:"totalHeight",value:function(){return this.sumHeight(0,this.len)}},{key:"get",value:function(t){return this._[t]}},{key:"getOrNew",value:function(t){return this._[t]=this._[t]||{cells:{}},this._[t]}},{key:"getCell",value:function(t,e){var r=this.get(t);return void 0!==r&&void 0!==r.cells&&void 0!==r.cells[e]?r.cells[e]:null}},{key:"getCellMerge",value:function(t,e){var r=this.getCell(t,e);return r&&r.merge?r.merge:[0,0]}},{key:"getCellOrNew",value:function(t,e){var r=this.getOrNew(t);return r.cells[e]=r.cells[e]||{},r.cells[e]}},{key:"setCell",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"all",o=this.getOrNew(t);"all"===n?o.cells[e]=r:"text"===n?(o.cells[e]=o.cells[e]||{},o.cells[e].text=r.text):"format"===n&&(o.cells[e]=o.cells[e]||{},o.cells[e].style=r.style,r.merge&&(o.cells[e].merge=r.merge))}},{key:"setCellText",value:function(t,e,r){var n=this.getCellOrNew(t,e);!1!==n.editable&&(n.text=r)}},{key:"copyPaste",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=t.sri,a=t.sci,l=t.eri,c=t.eci,u=e.sri,s=e.sci,f=e.eri,h=e.eci,y=t.size(),p=$(y,2),d=p[0],b=p[1],m=e.size(),g=$(m,2),w=g[0],O=g[1],k=!0,S=0;(f0&&function(){var t=C.text,e=P-s+(E-u)+2;if(k||(e-=S+1),"="===t[0])C.text=t.replace(/[a-zA-Z]{1,3}\d+/g,(function(t){var r=0,n=0;return i===u?r=e-1:n=e-1,/^\d+$/.test(t)?t:v(t,r,n)}));else if(d<=1&&b>1&&(u>l||f1&&(s>c||h1&&void 0!==arguments[1]?arguments[1]:1,n={};this.each((function(o,i){var a=parseInt(o,10);a>=t&&(a+=r,e.eachCells(o,(function(e,n){n.text&&"="===n.text[0]&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(e){return v(e,0,r,(function(e,r){return r>=t}))})))}))),n[a]=i})),this._=n,this.len+=r}},{key:"delete",value:function(t,e){var r=this,n=e-t+1,o={};this.each((function(i,a){var l=parseInt(i,10);le&&(o[l-n]=a,r.eachCells(i,(function(t,r){r.text&&"="===r.text[0]&&(r.text=r.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(t){return v(t,0,-n,(function(t,r){return r>e}))})))})))})),this._=o,this.len-=n}},{key:"insertColumn",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.each((function(n,o){var i={};e.eachCells(n,(function(e,n){var o=parseInt(e,10);o>=t&&(o+=r,n.text&&"="===n.text[0]&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(e){return v(e,r,0,(function(e){return e>=t}))})))),i[o]=n})),o.cells=i}))}},{key:"deleteColumn",value:function(t,e){var r=this,n=e-t+1;this.each((function(o,i){var a={};r.eachCells(o,(function(r,o){var i=parseInt(r,10);ie&&(a[i-n]=o,o.text&&"="===o.text[0]&&(o.text=o.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(t){return v(t,-n,0,(function(t){return t>e}))}))))})),i.cells=a}))}},{key:"deleteCells",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";t.each((function(t,n){e.deleteCell(t,n,r)}))}},{key:"deleteCell",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",n=this.get(t);if(null!==n){var o=this.getCell(t,e);null!==o&&!1!==o.editable&&("all"===r?delete n.cells[e]:"text"===r?(o.text&&delete o.text,o.value&&delete o.value):"format"===r?(void 0!==o.style&&delete o.style,o.merge&&delete o.merge):"merge"===r&&o.merge&&delete o.merge)}}},{key:"maxCell",value:function(){var t=Object.keys(this._),e=t[t.length-1],r=this._[e];if(r){var n=r.cells,o=Object.keys(n),i=o[o.length-1];return[parseInt(e,10),parseInt(i,10)]}return[0,0]}},{key:"each",value:function(t){Object.entries(this._).forEach((function(e){var r=$(e,2),n=r[0],o=r[1];t(n,o)}))}},{key:"eachCells",value:function(t,e){this._[t]&&this._[t].cells&&Object.entries(this._[t].cells).forEach((function(t){var r=$(t,2),n=r[0],o=r[1];e(n,o)}))}},{key:"setData",value:function(t){t.len&&(this.len=t.len,delete t.len),this._=t}},{key:"getData",value:function(){var t=this.len;return Object.assign({len:t},this._)}}])&&L(e.prototype,r),n&&L(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function X(t,e){for(var r=0;r0&&(e-=1,this.isHide(e));)this.setHide(e,!1)}},{key:"isHide",value:function(t){var e=this._[t];return e&&e.hide}},{key:"setHide",value:function(t,e){var r=this.getOrNew(t);!0===e?r.hide=!0:delete r.hide}},{key:"setStyle",value:function(t,e){this.getOrNew(t).style=e}},{key:"sumWidth",value:function(t,e){var r=this;return U.rangeSum(t,e,(function(t){return r.getWidth(t)}))}},{key:"totalWidth",value:function(){return this.sumWidth(0,this.len)}}])&&X(e.prototype,r),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function K(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return J(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}}};function tt(t,e){if(e){var r,n=K(G);try{for(n.s();!(r=n.n()).done;){var o=r.value;if(!e[o])break;for(var i=e[o],a=t.match(/(?:\\.|[^.])+/g),l=0;l2&&void 0!==arguments[2]&&arguments[2];r?G=[t]:G.unshift(t),e&&(Q[t]=e)}function ot(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return it(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return it(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2?n-2:0),i=2;i=this.parseValue(l)&&i<=this.parseValue(c),"between",l,c)}if("nbe"===r){var u=ot(n,2),s=u[0],f=u[1];return ct(ithis.parseValue(f),"notBetween",s,f)}if("eq"===r)return ct(i===this.parseValue(n),"equal",n);if("neq"===r)return ct(i!==this.parseValue(n),"notEqual",n);if("lt"===r)return ct(ithis.parseValue(n),"greaterThan",n);if("gte"===r)return ct(i>=this.parseValue(n),"greaterThanEqual",n)}return[!0]}}])&&at(e.prototype,r),n&&at(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function st(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ft(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ft(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0})).map((function(t){return t.getData()}))}},{key:"setData",value:function(t){this._=t.map((function(t){return dt.valueOf(t)}))}}]),t}();function bt(t){return function(t){if(Array.isArray(t))return Ot(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:function(){},n=this.merges,o=e.clone(),i=t.size(),a=gt(i,2),l=a[0],c=a[1],u=e.size(),s=gt(u,2),f=s[0],h=s[1];return l>f&&(o.eri=e.sri+l-1),c>h&&(o.eci=e.sci+c-1),!n.intersects(o)||(r(et("error.pasteForMergedCell")),!1)}function jt(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.rows,i=this.merges;"all"!==r&&"format"!==r||(o.deleteCells(e,r),i.deleteWithin(e)),o.copyPaste(t,e,r,n,(function(t,e,r){if(r&&r.merge){var n=gt(r.merge,2),o=n[0],a=n[1];if(o<=0&&a<=0)return;i.add(new O(t,e,t+o,e+a))}}))}function xt(t,e){var r=this.clipboard,n=this.rows,o=this.merges;n.cutPaste(t,e),o.move(t,e.sri-t.sri,e.sci-t.sci),r.clear()}function Et(t,e,r){var n=this.styles,o=this.rows.getCellOrNew(t,e),i={};void 0!==o.style&&(i=U.cloneDeep(n[o.style])),i=U.merge(i,{border:r}),o.style=this.addStyle(i)}function Pt(t){var e=this,r=t.mode,n=t.style,o=t.color,i=this.styles,a=this.selector,l=this.rows,c=a.range,u=c.sri,s=c.sci,f=c.eri,h=c.eci,y=!this.isSingleSelected();if(y||"inside"!==r&&"horizontal"!==r&&"vertical"!==r)if("outside"!==r||y){if("none"===r)a.range.each((function(t,r){var n=l.getCell(t,r);if(n&&void 0!==n.style){var o=U.cloneDeep(i[n.style]);delete o.border,n.style=e.addStyle(o)}}));else if("all"===r||"inside"===r||"outside"===r||"horizontal"===r||"vertical"===r)!function(){for(var t=[],i=u;i<=f;i+=1)for(var a=s;a<=h;a+=1){for(var c=[],p=0;ph)break;var w=l.getCell(i,a),O=0,k=0;if(w&&w.merge){var S=gt(w.merge,2);O=S[0],k=S[1],t.push([i,a,O,k])}var j=O>0&&i+O===f,x=k>0&&a+k===h,E={};"all"===r?E={bottom:[n,o],top:[n,o],left:[n,o],right:[n,o]}:"inside"===r?(!x&&a0&&Et.call(e,i,a,E),a+=k}}();else if("top"===r||"bottom"===r)for(var p=s;p<=h;p+=1)"top"===r&&(Et.call(this,u,p,{top:[n,o]}),p+=l.getCellMerge(u,p)[1]),"bottom"===r&&(Et.call(this,f,p,{bottom:[n,o]}),p+=l.getCellMerge(f,p)[1]);else if("left"===r||"right"===r)for(var d=u;d<=f;d+=1)"left"===r&&(Et.call(this,d,s,{left:[n,o]}),d+=l.getCellMerge(d,s)[0]),"right"===r&&(Et.call(this,d,h,{right:[n,o]}),d+=l.getCellMerge(d,h)[0])}else Et.call(this,u,s,{top:[n,o],bottom:[n,o],left:[n,o],right:[n,o]})}function _t(t,e){var r=this.rows,n=this.freezeTotalHeight(),o=r.height;n+r.heightt);a+=1)i.has(a)||(l+=c=r.getHeight(a));return(l-=c)<=0?{ri:-1,top:0,height:c}:{ri:a-1,top:l,height:c}}function Rt(t,e){var r=this.cols,n=this.freezeTotalWidth(),o=r.indexWidth;n+r.indexWidth0&&void 0!==arguments[0]?arguments[0]:"all",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=this.clipboard,o=this.selector;return!n.isClear()&&!!St.call(this,n.range,o.range,r)&&(this.changeData((function(){n.isCopy()?jt.call(t,n.range,o.range,e):n.isCut()&&xt.call(t,n.range,o.range)})),!0)}},{key:"pasteFromText",value:function(t){var e=[];if((e=/\r\n/.test(t)?t.split("\r\n").map((function(t){return t.replace(/"/g,"").split("\t")})):t.split("\n").map((function(t){return t.replace(/"/g,"").split("\t")}))).length){var r=this.rows,n=this.selector;this.changeData((function(){r.paste(e,n.range)}))}}},{key:"autofill",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=this.selector.range;return!!St.call(this,o,t,n)&&(this.changeData((function(){jt.call(r,o,t,e,!0)})),!0)}},{key:"clearClipboard",value:function(){this.clipboard.clear()}},{key:"calSelectedRangeByEnd",value:function(t,e){var r=this.selector,n=this.rows,o=this.cols,i=this.merges,a=r.range,l=a.sri,c=a.sci,u=a.eri,s=a.eci,f=r.ri,h=r.ci,y=t,p=e;return t<0&&(y=n.len-1),e<0&&(p=o.len-1),y>f?(l=f,u=y):(l=y,u=f),p>h?(c=h,s=p):(c=p,s=h),r.range=i.union(new O(l,c,u,s)),r.range=i.union(r.range),r.range}},{key:"calSelectedRangeByStart",value:function(t,e){var r=this.selector,n=this.rows,o=this.cols,i=this.merges.getFirstIncludes(t,e);return null===i&&(i=new O(t,e,t,e),-1===t&&(i.sri=0,i.eri=n.len-1),-1===e&&(i.sci=0,i.eci=o.len-1)),r.range=i,i}},{key:"setSelectedCellAttr",value:function(t,e){var r=this;this.changeData((function(){var n=r.selector,o=r.styles,i=r.rows;if("merge"===t)e?r.merge():r.unmerge();else if("border"===t)Pt.call(r,e);else if("formula"===t){var a=n.ri,l=n.ci,c=n.range;if(n.multiple()){var u=gt(n.size(),2),s=u[0],f=u[1],h=c.sri,y=c.sci,p=c.eri,v=c.eci;if(s>1)for(var b=y;b<=v;b+=1)i.getCellOrNew(p+1,b).text="=".concat(e,"(").concat(d(b,h),":").concat(d(b,p),")");else f>1&&(i.getCellOrNew(a,v+1).text="=".concat(e,"(").concat(d(y,a),":").concat(d(v,a),")"))}else i.getCellOrNew(a,l).text="=".concat(e,"()")}else n.range.each((function(n,a){var l=i.getCellOrNew(n,a),c={};if(void 0!==l.style&&(c=U.cloneDeep(o[l.style])),"format"===t)c.format=e,l.style=r.addStyle(c);else if("font-bold"===t||"font-italic"===t||"font-name"===t||"font-size"===t){var u={};u[t.split("-")[1]]=e,c.font=Object.assign(c.font||{},u),l.style=r.addStyle(c)}else"strike"===t||"textwrap"===t||"underline"===t||"align"===t||"valign"===t||"color"===t||"bgcolor"===t?(c[t]=e,l.style=r.addStyle(c)):l[t]=e}))}))}},{key:"setSelectedCellText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"input",r=this.autoFilter,n=this.selector,o=this.rows,i=n.ri,a=n.ci,l=i;this.unsortedRowMap.has(i)&&(l=this.unsortedRowMap.get(i));var c=o.getCell(l,a),u=c?c.text:"";if(this.setCellText(l,a,t,e),r.active()){var s=r.getFilter(a);if(s){var f=s.value.findIndex((function(t){return t===u}));f>=0&&s.value.splice(f,1,t)}}}},{key:"getSelectedCell",value:function(){var t=this.selector,e=t.ri,r=t.ci,n=e;return this.unsortedRowMap.has(e)&&(n=this.unsortedRowMap.get(e)),this.rows.getCell(n,r)}},{key:"xyInSelectedRect",value:function(t,e){var r=this.getSelectedRect(),n=r.left,o=r.top,i=r.width,a=r.height,l=t-this.cols.indexWidth,c=e-this.rows.height;return l>n&&lo&&c0&&v>u&&(y=u),d>0&&d>s&&(p=s),{l:u,t:s,left:y,top:p,height:f,width:h,scroll:e}}},{key:"getCellRectByXY",value:function(t,e){var r=this.scroll,n=this.merges,o=this.rows,i=this.cols,a=_t.call(this,e,r.y),l=a.ri,c=a.top,u=a.height,s=Rt.call(this,t,r.x),f=s.ci,h=s.left,y=s.width;if(-1===f&&(y=i.totalWidth()),-1===l&&(u=o.totalHeight()),l>=0||f>=0){var p=n.getFirstIncludes(l,f);if(p){l=p.sri,f=p.sci;var d=this.cellRect(l,f);h=d.left,c=d.top,y=d.width,u=d.height}}return{ri:l,ci:f,left:h,top:c,width:y,height:u}}},{key:"isSingleSelected",value:function(){var t=this.selector.range,e=t.sri,r=t.sci,n=t.eri,o=t.eci,i=this.getCell(e,r);if(i&&i.merge){var a=gt(i.merge,2),l=a[0],c=a[1];if(e+l===n&&r+c===o)return!0}return!this.selector.multiple()}},{key:"canUnmerge",value:function(){var t=this.selector.range,e=t.sri,r=t.sci,n=t.eri,o=t.eci,i=this.getCell(e,r);if(i&&i.merge){var a=gt(i.merge,2),l=a[0],c=a[1];if(e+l===n&&r+c===o)return!0}return!1}},{key:"merge",value:function(){var t=this,e=this.selector,r=this.rows;if(!this.isSingleSelected()){var n=gt(e.size(),2),o=n[0],i=n[1];if(o>1||i>1){var a=e.range,l=a.sri,c=a.sci;this.changeData((function(){var n=r.getCellOrNew(l,c);n.merge=[o-1,i-1],t.merges.add(e.range),t.rows.deleteCells(e.range),t.rows.setCell(l,c,n)}))}}}},{key:"unmerge",value:function(){var t=this,e=this.selector;if(this.isSingleSelected()){var r=e.range,n=r.sri,o=r.sci;this.changeData((function(){t.rows.deleteCell(n,o,"merge"),t.merges.deleteWithin(e.range)}))}}},{key:"canAutofilter",value:function(){return!this.autoFilter.active()}},{key:"autofilter",value:function(){var t=this,e=this.autoFilter,r=this.selector;this.changeData((function(){e.active()?(e.clear(),t.exceptRowSet=new Set,t.sortedRowMap=new Map,t.unsortedRowMap=new Map):e.ref=r.range.toString()}))}},{key:"setAutoFilter",value:function(t,e,r,n){var o=this.autoFilter;o.addFilter(t,r,n),o.setSort(t,e),this.resetAutoFilter()}},{key:"resetAutoFilter",value:function(){var t=this,e=this.autoFilter,r=this.rows;if(e.active()){var n=e.sort,o=e.filteredRows((function(t,e){return r.getCell(t,e)})),i=o.rset,a=o.fset,l=Array.from(a),c=Array.from(a);n&&l.sort((function(t,e){return"asc"===n.order?t-e:"desc"===n.order?e-t:0})),this.exceptRowSet=i,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,l.forEach((function(e,r){t.sortedRowMap.set(c[r],e),t.unsortedRowMap.set(e,c[r])}))}}},{key:"deleteCell",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",r=this.selector;this.changeData((function(){t.rows.deleteCells(r.range,e),"all"!==e&&"format"!==e||t.merges.deleteWithin(r.range)}))}},{key:"insert",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.changeData((function(){var n=e.selector.range,o=n.sri,i=n.sci,a=e.rows,l=e.merges,c=e.cols,u=o;"row"===t?a.insert(o,r):"column"===t&&(a.insertColumn(i,r),u=i,c.len+=1),l.shift(t,u,r,(function(t,e,r,n){var o=a.getCell(t,e);o.merge[0]+=r,o.merge[1]+=n}))}))}},{key:"delete",value:function(t){var e=this;this.changeData((function(){var r=e.rows,n=e.merges,o=e.selector,i=e.cols,a=o.range,l=o.range,c=l.sri,u=l.sci,s=l.eri,f=l.eci,h=gt(o.range.size(),2),y=h[0],p=h[1],d=c,v=y;"row"===t?r.delete(c,s):"column"===t&&(r.deleteColumn(u,f),d=a.sci,v=p,i.len-=f-u+1),n.shift(t,d,-v,(function(t,e,n,o){var i=r.getCell(t,e);i.merge[0]+=n,i.merge[1]+=o,0===i.merge[0]&&0===i.merge[1]&&delete i.merge}))}))}},{key:"scrollx",value:function(t,e){var r=this.scroll,n=this.freeze,o=this.cols,i=gt(n,2)[1],a=gt(U.rangeReduceIf(i,o.len,0,0,t,(function(t){return o.getWidth(t)})),3),l=a[0],c=a[1],u=a[2],s=c;t>0&&(s+=u),r.x!==s&&(r.ci=t>0?l:0,r.x=s,e())}},{key:"scrolly",value:function(t,e){var r=this.scroll,n=this.freeze,o=this.rows,i=gt(n,1)[0],a=gt(U.rangeReduceIf(i,o.len,0,0,t,(function(t){return o.getHeight(t)})),3),l=a[0],c=a[1],u=a[2],s=c;t>0&&(s+=u),r.y!==s&&(r.ri=t>0?l:0,r.y=s,e())}},{key:"cellRect",value:function(t,e){var r=this.rows,n=this.cols,o=n.sumWidth(0,e),i=r.sumHeight(0,t),a=r.getCell(t,e),l=n.getWidth(e),c=r.getHeight(t);if(null!==a&&a.merge){var u=gt(a.merge,2),s=u[0],f=u[1];if(s>0)for(var h=1;h<=s;h+=1)c+=r.getHeight(t+h);if(f>0)for(var y=1;y<=f;y+=1)l+=n.getWidth(e+y)}return{left:o,top:i,width:l,height:c,cell:a}}},{key:"getCell",value:function(t,e){return this.rows.getCell(t,e)}},{key:"getCellTextOrDefault",value:function(t,e){var r=this.getCell(t,e);return r&&r.text?r.text:""}},{key:"getCellStyle",value:function(t,e){var r=this.getCell(t,e);return r&&void 0!==r.style?this.styles[r.style]:null}},{key:"getCellStyleOrDefault",value:function(t,e){var r=this.styles,n=this.rows.getCell(t,e),o=n&&void 0!==n.style?r[n.style]:{};return U.merge(this.defaultStyle(),o)}},{key:"getSelectedCellStyle",value:function(){var t=this.selector,e=t.ri,r=t.ci;return this.getCellStyleOrDefault(e,r)}},{key:"setCellText",value:function(t,e,r,n){var o=this.rows,i=this.history,a=this.validations;"finished"===n?(o.setCellText(t,e,""),i.add(this.getData()),o.setCellText(t,e,r)):(o.setCellText(t,e,r),this.change(this.getData())),a.validate(t,e,r)}},{key:"freezeIsActive",value:function(){var t=gt(this.freeze,2),e=t[0],r=t[1];return e>0||r>0}},{key:"setFreeze",value:function(t,e){var r=this;this.changeData((function(){r.freeze=[t,e]}))}},{key:"freezeTotalWidth",value:function(){return this.cols.sumWidth(0,this.freeze[1])}},{key:"freezeTotalHeight",value:function(){return this.rows.sumHeight(0,this.freeze[0])}},{key:"setRowHeight",value:function(t,e){var r=this;this.changeData((function(){r.rows.setHeight(t,e)}))}},{key:"setColWidth",value:function(t,e){var r=this;this.changeData((function(){r.cols.setWidth(t,e)}))}},{key:"viewHeight",value:function(){var t=this.settings,e=t.view,r=t.showToolbar,n=t.showBottomBar,o=e.height();return n&&(o-=41),r&&(o-=41),o}},{key:"viewWidth",value:function(){return this.settings.view.width()}},{key:"freezeViewRange",value:function(){var t=gt(this.freeze,2),e=t[0],r=t[1];return new O(0,0,e-1,r-1,this.freezeTotalWidth(),this.freezeTotalHeight())}},{key:"contentRange",value:function(){var t=this.rows,e=this.cols,r=gt(t.maxCell(),2),n=r[0],o=r[1],i=t.sumHeight(0,n+1),a=e.sumWidth(0,o+1);return new O(0,0,n,o,a,i)}},{key:"exceptRowTotalHeight",value:function(t,e){var r=this.exceptRowSet,n=this.rows,o=Array.from(r),i=0;return o.forEach((function(r){if(re){var o=n.getHeight(r);i+=o}})),i}},{key:"viewRange",value:function(){var t=this.scroll,e=this.rows,r=this.cols,n=this.freeze,o=this.exceptRowSet,i=t.ri,a=t.ci;i<=0&&(i=gt(n,1)[0]),a<=0&&(a=gt(n,2)[1]);for(var l=0,c=0,u=[e.len,r.len],s=u[0],f=u[1],h=i;hthis.viewHeight()));h+=1);for(var y=a;ythis.viewWidth()));y+=1);return new O(i,a,s,f,l,c)}},{key:"eachMergesInView",value:function(t,e){this.merges.filterIntersects(t).forEach((function(t){return e(t)}))}},{key:"hideRowsOrCols",value:function(){var t=this.rows,e=this.cols,r=this.selector,n=gt(r.size(),2),o=n[0],i=n[1],a=r.range,l=a.sri,c=a.sci,u=a.eri,s=a.eci;if(o===t.len)for(var f=c;f<=s;f+=1)e.setHide(f,!0);else if(i===e.len)for(var h=l;h<=u;h+=1)t.setHide(h,!0)}},{key:"unhideRowsOrCols",value:function(t,e){this["".concat(t,"s")].unhide(e)}},{key:"rowEach",value:function(t,e,r){for(var n=0,o=this.rows,i=this.exceptRowSet,a=bt(i),l=0,c=0;c0&&(r(u,n,s),(n+=s)>this.viewHeight()))break}}},{key:"colEach",value:function(t,e,r){for(var n=0,o=this.cols,i=t;i<=e;i+=1){var a=o.getWidth(i);if(a>0&&(r(i,n,a),(n+=a)>this.viewWidth()))break}}},{key:"defaultStyle",value:function(){return this.settings.style}},{key:"addStyle",value:function(t){for(var e=this.styles,r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rMath.abs(e)?n(t>0?"right":"left",t,r):n(e>0?"down":"up",e,r)}function Ft(){var t=new Map;function e(e,r){var n;return t.has(e)&&(n=t.get(e),Array.isArray(n)&&n.push(r)||!1)||t.set(e,[].concat(r))}function r(e,r){var n,o;return t.has(e)&&(n=t.get(e),(o=n.indexOf(r))>=0&&n.splice(o,1)&&0===t.get(e).length&&t.delete(e))}return{get current(){return t},on:e,once:function(t,n){return e(t,(function e(){for(var o=arguments.length,i=new Array(o),a=0;a=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(t.get(e));try{for(o.s();!(n=o.n()).done;){var i=n.value;i.call.apply(i,[null].concat(At(r)))}}catch(t){o.e(t)}finally{o.f()}}()},removeListener:r,removeAllListeners:function(){t.clear()}}}var Wt="x-spreadsheet";window.devicePixelRatio;function Vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ut(t,e){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0;Vt(this,t),this.moving=!1,this.vertical=r,this.el=c("div","".concat(Wt,"-resizer ").concat(r?"vertical":"horizontal")).children(this.unhideHoverEl=c("div","".concat(Wt,"-resizer-hover")).on("dblclick.stop",(function(t){return e.mousedblclickHandler(t)})).css("position","absolute").hide(),this.hoverEl=c("div","".concat(Wt,"-resizer-hover")).on("mousedown.stop",(function(t){return e.mousedownHandler(t)})),this.lineEl=c("div","".concat(Wt,"-resizer-line")).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=n,this.unhideFn=function(){}}var e,r,n;return e=t,(r=[{key:"showUnhide",value:function(t){this.unhideIndex=t,this.unhideHoverEl.show()}},{key:"hideUnhide",value:function(){this.unhideHoverEl.hide()}},{key:"show",value:function(t,e){var r=this.moving,n=this.vertical,o=this.hoverEl,i=this.lineEl,a=this.el,l=this.unhideHoverEl;if(!r){this.cRect=t;var c=t.left,u=t.top,s=t.width,f=t.height;a.offset({left:n?c+s-5:c,top:n?u:u+f-5}).show(),o.offset({width:n?5:s,height:n?f:5}),i.offset({width:n?0:e.width,height:n?e.height:0}),l.offset({left:n?5-s:c,top:n?u:5-f,width:n?5:s,height:n?f:5})}}},{key:"hide",value:function(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}},{key:"mousedblclickHandler",value:function(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}},{key:"mousedownHandler",value:function(t){var e=this,r=t,n=this.el,o=this.lineEl,i=this.cRect,a=this.vertical,l=this.minDistance,c=a?i.width:i.height;o.show(),Ht(window,(function(t){e.moving=!0,null!==r&&1===t.buttons&&(a?(c+=t.movementX)>l&&n.css("left","".concat(i.left+c,"px")):(c+=t.movementY)>l&&n.css("top","".concat(i.top+c,"px")),r=t)}),(function(){r=null,o.hide(),e.moving=!1,e.hide(),e.finishedFn&&(c0&&void 0!==arguments[0]&&arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Yt(this,t),this.useHideInput=r,this.autoFocus=n,this.inputChange=function(){},this.cornerEl=c("div","".concat(Wt,"-selector-corner")),this.areaEl=c("div","".concat(Wt,"-selector-area")).child(this.cornerEl).hide(),this.clipboardEl=c("div","".concat(Wt,"-selector-clipboard")).hide(),this.autofillEl=c("div","".concat(Wt,"-selector-autofill")).hide(),this.el=c("div","".concat(Wt,"-selector")).css("z-index","".concat(Kt)).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),r&&(this.hideInput=c("input","").on("compositionend",(function(t){e.inputChange(t.target.value)})),this.el.child(this.hideInputDiv=c("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=c("div","hide-input").child(this.hideInput))),Kt+=1}return Zt(t,[{key:"setOffset",value:function(t){return this.el.offset(t).show(),this}},{key:"hide",value:function(){return this.el.hide(),this}},{key:"setAreaOffset",value:function(t){var e=t.left,r=t.top,n={width:t.width-3+.8,height:t.height-3+.8,left:e-.8,top:r-.8};this.areaEl.offset(n).show(),this.useHideInput&&(this.hideInputDiv.offset(n),this.autoFocus?this.hideInput.val("").focus():this.hideInput.val(""))}},{key:"setClipboardOffset",value:function(t){var e=t.left,r=t.top,n=t.width,o=t.height;this.clipboardEl.offset({left:e,top:r,width:n-5,height:o-5})}},{key:"showAutofill",value:function(t){var e=t.left,r=t.top,n=t.width,o=t.height;this.autofillEl.offset({width:n-3,height:o-3,left:e,top:r}).show()}},{key:"hideAutofill",value:function(){this.autofillEl.hide()}},{key:"showClipboard",value:function(){this.clipboardEl.show()}},{key:"hideClipboard",value:function(){this.clipboardEl.hide()}}]),t}();function Gt(t){var e=this.data,r=t.left,n=t.top,o=t.width,i=t.height,a=t.scroll,l=t.l,c=t.t,u=e.freezeTotalWidth(),s=e.freezeTotalHeight(),f=r-u;u>l&&(f-=a.x);var h=n-s;return s>c&&(h-=a.y),{left:f,top:h,width:o,height:i}}function Qt(t){var e=this.data,r=t.left,n=t.width,o=t.height,i=t.l,a=t.t,l=t.scroll,c=e.freezeTotalWidth(),u=r-c;return c>i&&(u-=l.x),{left:u,top:a,width:n,height:o}}function te(t){var e=this.data,r=t.top,n=t.width,o=t.height,i=t.l,a=t.t,l=t.scroll,c=e.freezeTotalHeight(),u=r-c;return c>a&&(u-=l.y),{left:i,top:u,width:n,height:o}}function ee(t){this.br.setAreaOffset(Gt.call(this,t))}function re(t){this.tl.setAreaOffset(t)}function ne(t){this.t.setAreaOffset(Qt.call(this,t))}function oe(t){this.l.setAreaOffset(te.call(this,t))}function ie(t){this.l.setClipboardOffset(te.call(this,t))}function ae(t){this.br.setClipboardOffset(Gt.call(this,t))}function le(t){this.tl.setClipboardOffset(t)}function ce(t){this.t.setClipboardOffset(Qt.call(this,t))}function ue(t){ee.call(this,t),re.call(this,t),ne.call(this,t),oe.call(this,t)}function se(t){ae.call(this,t),le.call(this,t),ce.call(this,t),ie.call(this,t)}var fe=function(){function t(e){var r=this;Yt(this,t);var n=e.settings.autoFocus;this.inputChange=function(){},this.data=e,this.br=new Jt(!0,n),this.t=new Jt,this.l=new Jt,this.tl=new Jt,this.br.inputChange=function(t){r.inputChange(t)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=c("div","".concat(Wt,"-selectors")).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Kt+=1}return Zt(t,[{key:"resetData",value:function(t){this.data=t,this.range=t.selector.range,this.resetAreaOffset()}},{key:"hide",value:function(){this.el.hide()}},{key:"resetOffset",value:function(){var t=this.data,e=this.tl,r=this.t,n=this.l,o=this.br,i=t.freezeTotalHeight(),a=t.freezeTotalWidth();i>0||a>0?(e.setOffset({width:a,height:i}),r.setOffset({left:a,height:i}),n.setOffset({top:i,width:a}),o.setOffset({left:a,top:i})):(e.hide(),r.hide(),n.hide(),o.setOffset({left:0,top:0}))}},{key:"resetAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();ue.call(this,t),se.call(this,e),this.resetOffset()}},{key:"resetBRTAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();ee.call(this,t),ne.call(this,t),ae.call(this,e),ce.call(this,e),this.resetOffset()}},{key:"resetBRLAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();ee.call(this,t),oe.call(this,t),ae.call(this,e),ie.call(this,e),this.resetOffset()}},{key:"set",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.data,o=n.calSelectedRangeByStart(t,e),i=o.sri,a=o.sci;if(r){var l=t,c=e;t<0&&(l=0),e<0&&(c=0),n.selector.setIndexes(l,c),this.indexes=[l,c]}this.moveIndexes=[i,a],this.range=o,this.resetAreaOffset(),this.el.show()}},{key:"setEnd",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.data,o=this.lastri,i=this.lastci;if(r){if(t===o&&e===i)return;this.lastri=t,this.lastci=e}this.range=n.calSelectedRangeByEnd(t,e),ue.call(this,this.data.getSelectedRect())}},{key:"reset",value:function(){var t=this.data.selector.range,e=t.eri,r=t.eci;this.setEnd(e,r)}},{key:"showAutofill",value:function(t,e){if(-1!==t||-1!==e){var r=this.range,n=r.sri,o=r.sci,i=r.eri,a=r.eci,l=t,c=e,u=n-t,s=i-t,f=a-e;if(o-e>0)this.arange=new O(n,c,i,o-1);else if(u>0)this.arange=new O(l,o,n-1,a);else if(f<0)this.arange=new O(n,a+1,i,c);else{if(!(s<0))return void(this.arange=null);this.arange=new O(i+1,o,l,a)}if(null!==this.arange){var h=this.data.getRect(this.arange);h.width+=2,h.height+=2;var y=this.br,p=this.l,d=this.t,v=this.tl;y.showAutofill(Gt.call(this,h)),p.showAutofill(te.call(this,h)),d.showAutofill(Qt.call(this,h)),v.showAutofill(h)}}}},{key:"hideAutofill",value:function(){var t=this;["br","l","t","tl"].forEach((function(e){t[e].hideAutofill()}))}},{key:"showClipboard",value:function(){var t=this,e=this.data.getClipboardRect();se.call(this,e),["br","l","t","tl"].forEach((function(e){t[e].showClipboard()}))}},{key:"hideClipboard",value:function(){var t=this;["br","l","t","tl"].forEach((function(e){t[e].hideClipboard()}))}}]),t}();function he(t){return function(t){if(Array.isArray(t))return ye(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ye(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ye(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0&&e[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=e.length-1),e[this.itemIndex].toggle())}function be(t){t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>e.length-1&&(this.itemIndex=0),e[this.itemIndex].toggle())}function me(t){t.preventDefault();var e=this.filterItems;e.length<=0||(t.stopPropagation(),this.itemIndex<0&&(this.itemIndex=0),e[this.itemIndex].el.click(),this.hide())}function ge(t){var e=t.keyCode;switch(t.ctrlKey&&t.stopPropagation(),e){case 37:t.stopPropagation();break;case 38:ve.call(this,t);break;case 39:t.stopPropagation();break;case 40:be.call(this,t);break;case 13:case 9:me.call(this,t);break;default:t.stopPropagation()}}var we=function(){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"200px";pe(this,t),this.filterItems=[],this.items=e,this.el=c("div","".concat(Wt,"-suggest")).css("width",n).hide(),this.itemClick=r,this.itemIndex=-1}var e,r,n;return e=t,(r=[{key:"setOffset",value:function(t){this.el.cssRemoveKeys("top","bottom").offset(t)}},{key:"hide",value:function(){var t=this.el;this.filterItems=[],this.itemIndex=-1,t.hide(),Mt(this.el.parent())}},{key:"setItems",value:function(t){this.items=t}},{key:"search",value:function(t){var e,r=this,n=this.items;if(/^\s*$/.test(t)||(n=n.filter((function(e){return(e.key||e).startsWith(t.toUpperCase())}))),n=n.map((function(t){var e=t.title;e?"function"==typeof e&&(e=e()):e=t;var n=c("div","".concat(Wt,"-item")).child(e).on("click.stop",(function(){r.itemClick(t),r.hide()}));return t.label&&n.child(c("div","label").html(t.label)),n})),this.filterItems=n,!(n.length<=0)){var o=this.el;(e=o.html("")).children.apply(e,he(n)).show(),Bt(o.parent(),(function(){r.hide()}))}}},{key:"bindInputEvents",value:function(t){var e=this;t.on("keydown",(function(t){return ge.call(e,t)}))}}])&&de(e.prototype,r),n&&de(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Oe(t){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ke(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rn.width){var s=l;l>c&&(s=c,u+=parseInt(l/c,10),u+=l%c>0?1:0),r.css("width","".concat(s,"px"))}(u*=this.rowHeight)>n.height&&r.css("height","".concat(u,"px"))}}function Fe(t,e){var r=t.target,n=r.value,o=r.selectionEnd,i="".concat(n.slice(0,o)).concat(e).concat(n.slice(o));r.value=i,r.setSelectionRange(o+1,o+1),this.inputText=i,this.textlineEl.html(i),Ne.call(this)}function We(t){var e=t.keyCode,r=t.altKey;13!==e&&9!==e&&t.stopPropagation(),13===e&&r&&(Fe.call(this,t,"\n"),t.stopPropagation()),13!==e||r||t.preventDefault()}function Ve(t){var e=t.target.value,r=this.suggest,n=this.textlineEl,o=this.validator,i=this.cell;if(null!==i)if("editable"in i&&!0===i.editable||void 0===i.editable){if(this.inputText=e,o)"list"===o.type?r.search(e):r.hide();else{var a=e.lastIndexOf("=");-1!==a?r.search(e.substring(a+1)):r.hide()}n.html(e),Ne.call(this),this.change("input",e)}else t.target.value=i.text||"";else{if(this.inputText=e,o)"list"===o.type?r.search(e):r.hide();else{var l=e.lastIndexOf("=");-1!==l?r.search(e.substring(l+1)):r.hide()}n.html(e),Ne.call(this),this.change("input",e)}}function Ue(t){var e=this.textEl.el;setTimeout((function(){e.focus(),e.setSelectionRange(t,t)}),0)}function $e(t,e){var r=this.textEl,n=this.textlineEl;r.el.blur(),r.val(t),n.html(t),Ue.call(this,e)}function qe(t){var e=this.inputText,r=this.validator,n=0;if(r&&"list"===r.type)this.inputText=t,n=this.inputText.length;else{var o=e.lastIndexOf("="),i=e.substring(0,o+1),a=e.substring(o+1);a=-1!==a.indexOf(")")?a.substring(a.indexOf(")")):"",this.inputText="".concat(i+t.key,"("),n=this.inputText.length,this.inputText+=")".concat(a)}$e.call(this,this.inputText,n)}function Le(){this.suggest.setItems(this.formulas)}var Ye=function(){function t(e,r,n){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.viewFn=r,this.rowHeight=n,this.formulas=e,this.suggest=new we(e,(function(t){qe.call(o,t)})),this.datepicker=new ze,this.datepicker.change((function(t){o.setText(function(t){var e=t.getMonth()+1,r=t.getDate();return e<10&&(e="0".concat(e)),r<10&&(r="0".concat(r)),"".concat(t.getFullYear(),"-").concat(e,"-").concat(r)}(t)),o.clear()})),this.areaEl=c("div","".concat(Wt,"-editor-area")).children(this.textEl=c("textarea","").on("input",(function(t){return Ve.call(o,t)})).on("paste.stop",(function(){})).on("keydown",(function(t){return We.call(o,t)})),this.textlineEl=c("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",(function(){})).on("mousedown.stop",(function(){})),this.el=c("div","".concat(Wt,"-editor")).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=function(){}}var e,r,n;return e=t,(r=[{key:"setFreezeLengths",value:function(t,e){this.freeze.w=t,this.freeze.h=e}},{key:"clear",value:function(){""!==this.inputText&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),Le.call(this),this.datepicker.hide()}},{key:"setOffset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",r=this.textEl,n=this.areaEl,o=this.suggest,i=this.freeze,a=this.el;if(t){this.areaOffset=t;var l=t.left,c=t.top,u=t.width,s=t.height,f=t.l,h=t.t,y={left:0,top:0};i.w>f&&i.h>h||(i.wf?y.top=i.h:i.h>h&&(y.left=i.w)),a.offset(y),n.offset({left:l-y.left-.8,top:c-y.top-.8}),r.offset({width:u-9+.8,height:s-3+.8});var p={left:0};p[e]=s,o.setOffset(p),o.hide()}}},{key:"setCell",value:function(t,e){var r=this.el,n=this.datepicker,o=this.suggest;r.show(),this.cell=t;var i=t&&t.text||"";if(this.setText(i),this.validator=e,e){var a=e.type;"date"===a&&(n.show(),/^\s*$/.test(i)||n.setValue(i)),"list"===a&&(o.setItems(e.values()),o.search(""))}}},{key:"setText",value:function(t){this.inputText=t,$e.call(this,t,t.length),Ne.call(this)}}])&&Me(e.prototype,r),n&&Me(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Xe(t){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ze(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return Ke(this,i),(e=o.call(this,"div","".concat(Wt,"-button ").concat(r))).child(et("button.".concat(t))),e}return e=i,r&&Ze(e.prototype,r),n&&Ze(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(l);function rr(t){return function(t){if(Array.isArray(t))return ir(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||or(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||or(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function or(t,e){if(t){if("string"==typeof t)return ir(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(t,e):void 0}}function ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0?e-.5:.5}var yr=function(){function t(e,r,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;ar(this,t),this.x=e,this.y=r,this.width=n,this.height=o,this.padding=i,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}return cr(t,[{key:"setBorders",value:function(t){var e=t.top,r=t.bottom,n=t.left,o=t.right;e&&(this.borderTop=e),o&&(this.borderRight=o),r&&(this.borderBottom=r),n&&(this.borderLeft=n)}},{key:"innerWidth",value:function(){return this.width-2*this.padding-2}},{key:"innerHeight",value:function(){return this.height-2*this.padding-2}},{key:"textx",value:function(t){var e=this.width,r=this.padding,n=this.x;return"left"===t?n+=r:"center"===t?n+=e/2:"right"===t&&(n+=e-r),n}},{key:"texty",value:function(t,e){var r=this.height,n=this.padding,o=this.y;return"top"===t?o+=n:"middle"===t?o+=r/2-e/2:"bottom"===t&&(o+=r-n-e),o}},{key:"topxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t+this.width,e]]}},{key:"rightxys",value:function(){var t=this.x,e=this.y,r=this.width;return[[t+r,e],[t+r,e+this.height]]}},{key:"bottomxys",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[[t,e+n],[t+r,e+n]]}},{key:"leftxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t,e+this.height]]}}]),t}();function pr(t,e,r,n,o,i,a){var l={x:0,y:0};"underline"===t?l.y="bottom"===o?0:"top"===o?-(i+2):-i/2:"strike"===t&&("bottom"===o?l.y=i/2:"top"===o&&(l.y=-(i/2+2))),"center"===n?l.x=a/2:"right"===n&&(l.x=a),this.line([e-l.x,r-l.y],[e-l.x+a,r-l.y])}var dr=function(){function t(e,r,n){ar(this,t),this.el=e,this.ctx=e.getContext("2d"),this.resize(r,n),this.ctx.scale(ur(),ur())}return cr(t,[{key:"resize",value:function(t,e){this.el.style.width="".concat(t,"px"),this.el.style.height="".concat(e,"px"),this.el.width=fr(t),this.el.height=fr(e)}},{key:"clear",value:function(){var t=this.el,e=t.width,r=t.height;return this.ctx.clearRect(0,0,e,r),this}},{key:"attr",value:function(t){return Object.assign(this.ctx,t),this}},{key:"save",value:function(){return this.ctx.save(),this.ctx.beginPath(),this}},{key:"restore",value:function(){return this.ctx.restore(),this}},{key:"beginPath",value:function(){return this.ctx.beginPath(),this}},{key:"translate",value:function(t,e){return this.ctx.translate(fr(t),fr(e)),this}},{key:"scale",value:function(t,e){return this.ctx.scale(t,e),this}},{key:"clearRect",value:function(t,e,r,n){return this.ctx.clearRect(t,e,r,n),this}},{key:"fillRect",value:function(t,e,r,n){return this.ctx.fillRect(fr(t)-.5,fr(e)-.5,fr(r),fr(n)),this}},{key:"fillText",value:function(t,e,r){return this.ctx.fillText(t,fr(e),fr(r)),this}},{key:"text",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=this.ctx,a=n.align,l=n.valign,c=n.font,u=n.color,s=n.strike,f=n.underline,h=e.textx(a);i.save(),i.beginPath(),this.attr({textAlign:a,textBaseline:l,font:"".concat(c.italic?"italic":""," ").concat(c.bold?"bold":""," ").concat(fr(c.size),"px ").concat(c.name),fillStyle:u,strokeStyle:u});var y="".concat(t).split("\n"),p=e.innerWidth(),d=[];y.forEach((function(t){var e=i.measureText(t).width;if(o&&e>fr(p)){for(var r={w:0,len:0,start:0},n=0;n=fr(p)&&(d.push(t.substr(r.start,r.len)),r={w:0,len:0,start:n}),r.len+=1,r.w+=i.measureText(t[n]).width+1;r.len>0&&d.push(t.substr(r.start,r.len))}else d.push(t)}));var v=(d.length-1)*(c.size+2),b=e.texty(l,v);return d.forEach((function(t){var e=i.measureText(t).width;r.fillText(t,h,b),s&&pr.call(r,"strike",h,b,a,l,c.size,e),f&&pr.call(r,"underline",h,b,a,l,c.size,e),b+=c.size+2})),i.restore(),this}},{key:"border",value:function(t,e){var r=this.ctx;return r.lineWidth=sr,r.strokeStyle=e,"medium"===t?r.lineWidth=fr(2)-.5:"thick"===t?r.lineWidth=fr(3):"dashed"===t?r.setLineDash([fr(3),fr(2)]):"dotted"===t?r.setLineDash([fr(1),fr(1)]):"double"===t&&r.setLineDash([fr(2),0]),this}},{key:"line",value:function(){var t=this.ctx;if(arguments.length>1){t.beginPath();var e=arguments.length<=0?void 0:arguments[0],r=nr(e,2),n=r[0],o=r[1];t.moveTo(hr(n),hr(o));for(var i=1;it.length)&&(e=t.length);for(var r=0,n=new Array(e);r="a"&&u<="z")n.push(u.toUpperCase());else if(u>="0"&&u<="9"||u>="A"&&u<="Z"||"."===u)n.push(u);else if('"'===u){for(c+=1;'"'!==t.charAt(c);)n.push(t.charAt(c)),c+=1;r.push('"'.concat(n.join(""))),n=[]}else if("-"===u&&/[+\-*/,(]/.test(l))n.push(u);else{if("("!==u&&n.length>0&&r.push(n.join("")),")"===u){var s=e.pop();if(2===o)try{for(var f=gr(p(r.pop()),2),h=f[0],y=f[1],v=gr(p(r.pop()),2),b=v[0],m=v[1],g=0,w=b;w<=h;w+=1)for(var O=m;O<=y;O+=1)r.push(d(w,O)),g+=1;r.push([s,g])}catch(t){}else if(1===o||3===o)3===o&&r.push(i),r.push([s,a]),a=1;else for(;"("!==s&&(r.push(s),!(e.length<=0));)s=e.pop();o=0}else if("="===u||">"===u||"<"===u){var k=t.charAt(c+1);i=u,"="!==k&&"-"!==k||(i+=k,c+=1),o=3}else if(":"===u)o=2;else if(","===u)3===o&&r.push(i),o=1,a+=1;else if("("===u&&n.length>0)e.push(n.join(""));else{if(e.length>0&&("+"===u||"-"===u)){var S=e[e.length-1];if("("!==S&&r.push(e.pop()),"*"===S||"/"===S)for(;e.length>0&&"("!==(S=e[e.length-1]);)r.push(e.pop())}else if(e.length>0){var j=e[e.length-1];"*"!==j&&"/"!==j||r.push(e.pop())}e.push(u)}n=[]}l=u}}for(n.length>0&&r.push(n.join(""));e.length>0;)r.push(e.pop());return r},kr=function(t,e){var r=gr(t,1)[0],n=t;if('"'===r)return t.substring(1);var o=1;if("-"===r&&(n=t.substring(1),o=-1),n[0]>="0"&&n[0]<="9")return o*Number(n);var i=gr(p(n),2);return o*e(i[0],i[1])},Sr=function(t,e,r,n){for(var o=[],i=0;i"===l||"<"===l){var h=o.pop();Number.isNaN(h)||(h=Number(h));var y=o.pop();Number.isNaN(y)||(y=Number(y));var p=!1;"="===l?p=y===h:">"===a?p=y>h:">="===a?p=y>=h:"<"===a?p=y="a"&&l<="z"||l>="A"&&l<="Z")&&n.push(a),o.push(kr(a,r)),n.pop()}}return o[0]},jr=function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if("="===e[0]){var i=Or(e.substring(1));return i.length<=0?e:Sr(i,r,(function(e,i){return t(n(e,i),r,n,o)}),o)}return e};function xr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||Pr(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Er(t){return function(t){if(Array.isArray(t))return _r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Pr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pr(t,e){if(t){if("string"==typeof t)return _r(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_r(t,e):void 0}}function _r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r3&&void 0!==arguments[3]?arguments[3]:0,o=t.cellRect(e,r),i=o.left,a=o.top,l=o.width,c=o.height;return new yr(i,a+n,l,c,5)}function Yr(t,e,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=e.sortedRowMap,a=e.rows,l=e.cols;if(!a.isHide(r)&&!l.isHide(n)){var c=r;i.has(r)&&(c=i.get(r));var u=e.getCell(c,n);if(null!==u){var s=!1;"editable"in u&&!1===u.editable&&(s=!0);var f=e.getCellStyleOrDefault(c,n),h=Lr(e,r,n,o);h.bgcolor=f.bgcolor,void 0!==f.border&&(h.setBorders(f.border),t.strokeBorders(h)),t.rect(h,(function(){var o="";o=e.settings.evalPaused?u.text||"":jr(u.text||"",Ar,(function(t,r){return e.getCellTextOrDefault(r,t)})),f.format&&(o=Fr[f.format].render(o));var i=Object.assign({},f.font);i.size=mr(i.size),t.text(o,h,{align:f.align,valign:f.valign,font:i,color:f.color,strike:f.strike,underline:f.underline},f.textwrap),e.validations.getError(r,n)&&t.error(h),s&&t.frozen(h)}))}}}function Xr(t){var e=this.data,r=this.draw;if(t){var n=e.autoFilter;if(!n.active())return;var o=n.hrange();t.intersects(o)&&o.each((function(t,n){var o=Lr(e,t,n);r.dropdown(o)}))}}function Zr(t,e,r,n,o){var i=this.draw,a=this.data;i.save(),i.translate(e,r).translate(n,o);var l=a.exceptRowSet,c=a.exceptRowTotalHeight(t.sri,t.eri);i.save(),i.translate(0,-c),t.each((function(t,e){Yr(i,a,t,e)}),(function(t){return function(t){var e=l.has(t);if(e){var r=a.rows.getHeight(t);i.translate(0,-r)}return!e}(t)})),i.restore();var u=new Set;i.save(),i.translate(0,-c),a.eachMergesInView(t,(function(t){var e=t.sri,r=t.sci,n=t.eri;if(l.has(e)){if(!u.has(e)){u.add(e);var o=a.rows.sumHeight(e,n+1);i.translate(0,-o)}}else Yr(i,a,e,r)})),i.restore(),Xr.call(this,t),i.restore()}function Kr(t,e,r,n){var o=this.draw;o.save(),o.attr({fillStyle:"rgba(75, 137, 255, 0.08)"}).fillRect(t,e,r,n),o.restore()}function Jr(t,e,r,n,o,i){var a=this,l=this.draw,c=this.data,u=e.h,s=e.w,f=i+n,y=o+r;l.save(),l.attr($r),"all"!==t&&"left"!==t||l.fillRect(0,f,r,u),"all"!==t&&"top"!==t||l.fillRect(y,0,s,n);var p=c.selector.range,d=p.sri,v=p.sci,b=p.eri,m=p.eci;l.attr({textAlign:"center",textBaseline:"middle",font:"500 ".concat(fr(12),"px Source Sans Pro"),fillStyle:"#585757",lineWidth:sr(),strokeStyle:"#e6e6e6"}),"all"!==t&&"left"!==t||(c.rowEach(e.sri,e.eri,(function(t,e,n){var o=f+e,i=t;l.line([0,o],[r,o]),d<=i&&i0&&c.rows.isHide(t-1)&&(l.save(),l.attr({strokeStyle:"#c6c6c6"}),l.line([5,o+5],[r-5,o+5]),l.restore())})),l.line([0,u+f],[r,u+f]),l.line([r,f],[r,u+f])),"all"!==t&&"top"!==t||(c.colEach(e.sci,e.eci,(function(t,e,r){var o=y+e,i=t;l.line([o,0],[o,n]),v<=i&&i0&&c.cols.isHide(t-1)&&(l.save(),l.attr({strokeStyle:"#c6c6c6"}),l.line([o+5,5],[o+5,n-5]),l.restore())})),l.line([s+y,0],[s+y,n]),l.line([0,n],[s+y,n])),l.restore()}function Gr(t,e){var r=this.draw;r.save(),r.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,t,e),r.restore()}function Qr(t,e,r,n,o){var i=t.sri,a=t.sci,l=t.eri,c=t.eci,u=t.w,s=t.h,f=this.draw,h=this.data,y=h.settings;f.save(),f.attr(qr).translate(e+n,r+o),y.showGrid?(h.rowEach(i,l,(function(t,e,r){t!==i&&f.line([0,e],[u,e]),t===l&&f.line([0,e+r],[u,e+r])})),h.colEach(a,c,(function(t,e,r){t!==a&&f.line([e,0],[e,s]),t===c&&f.line([e+r,0],[e+r,s])})),f.restore()):f.restore()}function tn(t,e,r,n){var o=this.draw,i=this.data,a=i.viewWidth()-t,l=i.viewHeight()-e;o.save().translate(t,e).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),o.line([0,n],[a,n]),o.line([r,0],[r,l]),o.restore()}var en=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.draw=new dr(e,r.viewWidth(),r.viewHeight()),this.data=r}var e,r,n;return e=t,(r=[{key:"resetData",value:function(t){this.data=t,this.render()}},{key:"render",value:function(){var t=this.data,e=t.rows,r=t.cols.indexWidth,n=e.height;this.draw.resize(t.viewWidth(),t.viewHeight()),this.clear();var o=t.viewRange(),i=t.freezeTotalWidth(),a=t.freezeTotalHeight(),l=t.scroll,c=l.x,u=l.y;Qr.call(this,o,r,n,i,a),Zr.call(this,o,r,n,-c,-u),Jr.call(this,"all",o,r,n,i,a),Gr.call(this,r,n);var s=Wr(t.freeze,2),f=s[0],h=s[1];if(f>0||h>0){if(f>0){var y=o.clone();y.sri=0,y.eri=f-1,y.h=a,Qr.call(this,y,r,n,i,0),Zr.call(this,y,r,n,-c,0),Jr.call(this,"top",y,r,n,i,0)}if(h>0){var p=o.clone();p.sci=0,p.eci=h-1,p.w=i,Qr.call(this,p,r,n,0,a),Jr.call(this,"left",p,r,n,0,a),Zr.call(this,p,r,n,0,-u)}var d=t.freezeViewRange();Qr.call(this,d,r,n,0,0),Jr.call(this,"all",d,r,n,0,0),Zr.call(this,d,r,n,0,0),tn.call(this,r,n,i,a)}}},{key:"clear",value:function(){this.draw.clear()}}])&&Ur(e.prototype,r),n&&Ur(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function rn(t){return function(t){if(Array.isArray(t))return nn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return nn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nn(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&(h+=(a-u.w)/2);var p=0,d=0;this.contentEl.html(""),this.canvases=[];for(var v={sri:0,sci:0,eri:0,eci:0},b=function(r){var i=0,a=0,s=c("div","".concat(Wt,"-canvas-card")),b=c("canvas","".concat(Wt,"-canvas"));t.canvases.push(b.el);var m=new dr(b.el,n,o);for(m.save(),m.translate(h,y),f<1&&m.scale(f,f);p<=u.eri;p+=1){var g=e.rows.getHeight(p);if(!((i+=g)t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]&&arguments[1];dn(this,t),this.menuItems=gn.call(this),this.el=(r=c("div","".concat(Wt,"-contextmenu"))).children.apply(r,yn(this.menuItems)).hide(),this.viewFn=e,this.itemClick=function(){},this.isHide=n,this.setMode("range")}var e,r,n;return e=t,(r=[{key:"setMode",value:function(t){var e=this.menuItems[12];"row-col"===t?e.show():e.hide()}},{key:"hide",value:function(){var t=this.el;t.hide(),Mt(t)}},{key:"setPosition",value:function(t,e){if(!this.isHide){var r=this.el,n=r.show().offset().width,o=this.viewFn(),i=o.height/2,a=t;o.width-t<=n&&(a-=n),r.css("left","".concat(a,"px")),e>i?r.css("bottom","".concat(o.height-e,"px")).css("max-height","".concat(e,"px")).css("top","auto"):r.css("top","".concat(e,"px")).css("max-height","".concat(o.height-e,"px")).css("bottom","auto"),Bt(r)}}}])&&vn(e.prototype,r),n&&vn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function On(t,e){for(var r=0;r4?u-4:0),f=4;f0&&(t=this.contentEl).children.apply(t,arguments)}},{key:"setTitle",value:function(t){this.title.html(t),this.hide()}},{key:"show",value:function(){var t=this;this.contentEl.show(),this.parent().active(),Bt(this.parent(),(function(){t.hide()}))}},{key:"hide",value:function(){this.parent().active(!1),this.contentEl.hide(),Mt(this.parent())}}])&&zn(e.prototype,r),n&&zn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(l);function Wn(t){return(Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vn(t){return function(t){if(Array.isArray(t))return Un(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Un(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Un(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Un(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r'],["medium",''],["thick",''],["dashed",''],["dotted",'']],Pi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ki(t,e)}(i,t);var e,r,n,o=Si(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);var r=new Pe("line-type"),n=0,a=Ei.map((function(r,o){return c("div","".concat(Wt,"-item state ").concat(t===r[0]?"checked":"")).on("click",(function(){a[n].toggle("checked"),a[o].toggle("checked"),n=o,e.hide(),e.change(r)})).child(c("div","".concat(Wt,"-line-type")).html(r[1]))}));return e=o.call.apply(o,[this,r,"auto",!1,"bottom-left"].concat(gi(a)))}return e=i,r&&Oi(e.prototype,r),n&&Oi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(Fn);function _i(t){return function(t){if(Array.isArray(t))return Ai(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ci(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ri(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||Ci(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ci(t,e){if(t){if("string"==typeof t)return Ai(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ai(t,e):void 0}}function Ai(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0?o.show():o.hide()}function Jc(t){var e=this,r=new kn;r.el.on("click",(function(){t.onClick&&t.onClick(e.data.getData(),e.data)})),r.tip=t.tip||"";var n=t.el;if(t.icon&&(n=c("img").attr("src",t.icon)),n){var o=c("div","".concat(Wt,"-icon"));o.child(n),r.el.child(o)}return r}var Gc=function(){function t(e,r){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];$c(this,t),this.data=e,this.change=function(){},this.widthFn=r,this.isHide=o;var i=e.defaultStyle();this.items=[[this.undoEl=new mc,this.redoEl=new fc,new xc,this.paintformatEl=new wa,this.clearformatEl=new ya],Xc(),[this.formatEl=new _l],Xc(),[this.fontEl=new hl,this.fontSizeEl=new Ka],Xc(),[this.boldEl=new Do,this.italicEl=new Wo,this.underlineEl=new ei,this.strikeEl=new Xo,this.textColorEl=new Pa(i.color)],Xc(),[this.fillColorEl=new Da(i.bgcolor),this.borderEl=new Ki,this.mergeEl=new oc],Xc(),[this.alignEl=new ro(i.align),this.valignEl=new uo(i.valign),this.textwrapEl=new Tc],Xc(),[this.freezeEl=new Jl,this.autofilterEl=new Po,this.formulaEl=new $l]];var a=e.settings.extendToolbar,l=void 0===a?{}:a;if(l.left&&l.left.length>0){this.items.unshift(Xc());var u=l.left.map(Jc.bind(this));this.items.unshift(u)}if(l.right&&l.right.length>0){this.items.push(Xc());var s=l.right.map(Jc.bind(this));this.items.push(s)}this.items.push([this.moreEl=new Uc]),this.el=c("div","".concat(Wt,"-toolbar")),this.btns=c("div","".concat(Wt,"-toolbar-btns")),this.items.forEach((function(t){Array.isArray(t)?t.forEach((function(t){n.btns.child(t.el),t.change=function(){n.change.apply(n,arguments)}})):n.btns.child(t.el)})),this.el.child(this.btns),o?this.el.hide():(this.reset(),setTimeout((function(){Zc.call(n),Kc.call(n)}),0),Dt(window,"resize",(function(){Kc.call(n)})))}var e,r,n;return e=t,(r=[{key:"paintformatActive",value:function(){return this.paintformatEl.active()}},{key:"paintformatToggle",value:function(){this.paintformatEl.toggle()}},{key:"trigger",value:function(t){this["".concat(t,"El")].click()}},{key:"resetData",value:function(t){this.data=t,this.reset()}},{key:"reset",value:function(){if(!this.isHide){var t=this.data,e=t.getSelectedCellStyle();this.undoEl.setState(!t.canUndo()),this.redoEl.setState(!t.canRedo()),this.mergeEl.setState(t.canUnmerge(),!t.selector.multiple()),this.autofilterEl.setState(!t.canAutofilter());var r=e.font,n=e.format;this.formatEl.setState(n),this.fontEl.setState(r.name),this.fontSizeEl.setState(r.size),this.boldEl.setState(r.bold),this.italicEl.setState(r.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),this.alignEl.setState(e.align),this.valignEl.setState(e.valign),this.textwrapEl.setState(e.textwrap),this.freezeEl.setState(t.freezeIsActive())}}}])&&qc(e.prototype,r),n&&qc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qc(t){return function(t){if(Array.isArray(t))return tu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return tu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tu(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:"600px";eu(this,t),this.title=e,this.el=c("div","".concat(Wt,"-modal")).css("width",i).children(c("div","".concat(Wt,"-modal-header")).children(new Pe("close").on("click.stop",(function(){return o.hide()})),this.title),(n=c("div","".concat(Wt,"-modal-content"))).children.apply(n,Qc(r))).hide()}var e,r,n;return e=t,(r=[{key:"show",value:function(){var t=this;this.dimmer=c("div","".concat(Wt,"-dimmer active")),document.body.appendChild(this.dimmer.el);var e=this.el.show().box(),r=e.width,n=e.height,o=document.documentElement,i=o.clientHeight,a=o.clientWidth;this.el.offset({left:(a-r)/2,top:(i-n)/3}),window.xkeydownEsc=function(e){27===e.keyCode&&t.hide()},Dt(window,"keydown",window.xkeydownEsc)}},{key:"hide",value:function(){this.el.hide(),document.body.removeChild(this.dimmer.el),zt(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}])&&ru(e.prototype,r),n&&ru(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ou(t,e){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:function(t){return t},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};au(this,t),this.key=e,this.getTitle=i,this.vchange=function(){},this.el=c("div","".concat(Wt,"-form-select")),this.suggest=new we(r.map((function(t){return{key:t,title:o.getTitle(t)}})),(function(t){o.itemClick(t.key),a(t.key),o.vchange(t.key)}),n,this.el),this.el.children(this.itemEl=c("div","input-text").html(this.getTitle(e)),this.suggest.el).on("click",(function(){return o.show()}))}var e,r,n;return e=t,(r=[{key:"show",value:function(){this.suggest.search("")}},{key:"itemClick",value:function(t){this.key=t,this.itemEl.html(this.getTitle(t))}},{key:"val",value:function(t){return void 0!==t?(this.key=t,this.itemEl.html(this.getTitle(t)),this):this.key}}])&&lu(e.prototype,r),n&&lu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function uu(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rs.width)r.move({left:o+c-s.width});else{var f=t.freezeTotalWidth();as.height)e.move({top:i+u-s.height-1});else{var h=t.freezeTotalHeight();l3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(-1!==e||-1!==r){var i=this.table,a=this.selector,l=this.toolbar,c=this.data,u=this.contextMenu,s=c.getCell(e,r);t?(a.setEnd(e,r,o),this.trigger("cells-selected",s,a.range)):(a.set(e,r,n),this.trigger("cell-selected",s,e,r)),u.setMode(-1===e||-1===r?"row-col":"range"),l.reset(),i.render()}}function Tu(t,e){var r=this.selector,n=this.data,o=n.rows,i=n.cols,a=Pu(r.indexes,2),l=a[0],c=a[1],u=r.range,s=u.eri,f=u.eci;if(t){var h=Pu(r.moveIndexes,2);l=h[0],c=h[1]}"left"===e?c>0&&(c-=1):"right"===e?(f!==c&&(c=f),c0&&(l-=1):"down"===e?(s!==l&&(l=s),lc.indexWidth&&r>l.height)return n.hide(),void o.hide();var u=i.box(),s=a.getCellRectByXY(t.offsetX,t.offsetY);s.ri>=0&&-1===s.ci?(s.width=c.indexWidth,n.show(s,{width:u.width}),l.isHide(s.ri-1)?n.showUnhide(s.ri):n.hideUnhide()):n.hide(),-1===s.ri&&s.ci>=0?(s.height=l.height,o.show(s,{height:u.height}),c.isHide(s.ci-1)?o.showUnhide(s.ci):o.hideUnhide()):o.hide()}}function Du(t){var e=this.verticalScrollbar,r=this.horizontalScrollbar,n=this.data,o=e.scroll().top,i=r.scroll().left,a=n.rows,l=n.cols,c=t.deltaY,u=t.deltaX,s=function(t,e){var r=t,n=0;do{n=e(r),r+=1}while(n<=0);return n},f=function(t){if(t>0){var r=n.scroll.ri+1;if(r=0){var c=s(l,(function(t){return a.getHeight(t)}));e.move({top:0===l?0:o-c})}}},h=Math.abs(c),y=Math.abs(u),p=Math.max(h,y);/Firefox/i.test(window.navigator.userAgent)&&Ru(f(t.detail),50),p===y&&Ru(function(t){if(t>0){var e=n.scroll.ci+1;if(e=0){var c=s(a,(function(t){return l.getWidth(t)}));r.move({left:0===a?0:i-c})}}}(u),50),p===h&&Ru(f(c),50)}function zu(t,e){var r=this.verticalScrollbar,n=this.horizontalScrollbar,o=r.scroll().top,i=n.scroll().left;"left"===t||"right"===t?n.move({left:i-e}):"up"!==t&&"down"!==t||r.move({top:o-e})}function Mu(){var t=this.data,e=this.verticalScrollbar,r=this.getTableOffset().height,n=t.exceptRowTotalHeight(0,-1);e.set(r,t.rows.totalHeight()-n)}function Bu(){var t=this.data,e=this.horizontalScrollbar,r=this.getTableOffset().width;t&&e.set(r,t.cols.totalWidth())}function Hu(){var t=this.selector,e=this.data,r=this.editor,n=Pu(e.freeze,2),o=n[0],i=n[1];if(o>0||i>0){var a=e.freezeTotalWidth(),l=e.freezeTotalHeight();r.setFreezeLengths(a,l)}t.resetAreaOffset()}function Nu(){var t=this.tableEl,e=this.overlayerEl,r=this.overlayerCEl,n=this.table,o=this.toolbar,i=this.selector,a=this.el,l=this.getTableOffset(),c=this.getRect();t.attr(c),e.offset(c),r.offset(l),a.css("width","".concat(c.width,"px")),Mu.call(this),Bu.call(this),Hu.call(this),n.render(),o.reset(),i.reset()}function Fu(){var t=this.data,e=this.selector;t.clearClipboard(),e.hideClipboard()}function Wu(t){var e=this.data,r=this.selector;"read"!==e.settings.mode&&(e.copy(),e.copyToSystemClipboard(t),r.showClipboard())}function Vu(){var t=this.data,e=this.selector;"read"!==t.settings.mode&&(t.cut(),e.showClipboard())}function Uu(t,e){var r=this.data;if("read"!==r.settings.mode)if(r.paste(t,(function(t){return xu("Tip",t)})))Nu.call(this);else if(e){var n=e.clipboardData.getData("text/plain");this.data.pasteFromText(n),Nu.call(this)}}function $u(){this.data.hideRowsOrCols(),Nu.call(this)}function qu(t,e){this.data.unhideRowsOrCols(t,e),Nu.call(this)}function Lu(){this.data.autofilter(),Nu.call(this)}function Yu(){var t=this.toolbar;t.paintformatActive()&&(Uu.call(this,"format"),Fu.call(this),t.paintformatToggle())}function Xu(t){var e=this,r=this.selector,n=this.data,o=this.table,i=this.sortFilter,a=t.offsetX,l=t.offsetY,c=t.target.className==="".concat(Wt,"-selector-corner"),u=n.getCellRectByXY(a,l),s=u.left,f=u.top,h=u.width,y=u.height,p=u.ri,d=u.ci,v=n.autoFilter;if(v.includes(p,d)&&s+h-20r.height/2&&(n="bottom"),t.setOffset(e,n)}function Ku(){var t=this.editor,e=this.data;"read"!==e.settings.mode&&(Zu.call(this),t.setCell(e.getSelectedCell(),e.getSelectedValidator()),Fu.call(this))}function Ju(t){var e=this,r=this.data,n=this.table,o=this.selector;r.scrolly(t,(function(){o.resetBRLAreaOffset(),Zu.call(e),n.render()}))}function Gu(t){var e=this,r=this.data,n=this.table,o=this.selector;r.scrollx(t,(function(){o.resetBRTAreaOffset(),Zu.call(e),n.render()}))}function Qu(t,e){var r=t.ri,n=this.table,o=this.selector;this.data.rows.setHeight(r,e),n.render(),o.resetAreaOffset(),Mu.call(this),Zu.call(this)}function ts(t,e){var r=t.ci,n=this.table,o=this.selector;this.data.cols.setWidth(r,e),n.render(),o.resetAreaOffset(),Bu.call(this),Zu.call(this)}function es(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finished",r=this.data,n=this.table;if("read"!==r.settings.mode){r.setSelectedCellText(t,e);var o=r.selector,i=o.ri,a=o.ci;"finished"===e?n.render():this.trigger("cell-edited",t,i,a)}}function rs(t){var e=this.data;"read"!==e.settings.mode&&("insert-row"===t?e.insert("row"):"delete-row"===t?e.delete("row"):"insert-column"===t?e.insert("column"):"delete-column"===t?e.delete("column"):"delete-cell"===t?e.deleteCell():"delete-cell-format"===t?e.deleteCell("format"):"delete-cell-text"===t?e.deleteCell("text"):"cell-printable"===t?e.setSelectedCellAttr("printable",!0):"cell-non-printable"===t?e.setSelectedCellAttr("printable",!1):"cell-editable"===t?e.setSelectedCellAttr("editable",!0):"cell-non-editable"===t&&e.setSelectedCellAttr("editable",!1),Fu.call(this),Nu.call(this))}function ns(t,e){var r=this.data;if("undo"===t)this.undo();else if("redo"===t)this.redo();else if("print"===t)this.print.preview();else if("paintformat"===t)!0===e?Wu.call(this):Fu.call(this);else if("clearformat"===t)rs.call(this,"delete-cell-format");else if("link"===t);else if("chart"===t);else if("autofilter"===t)Lu.call(this);else if("freeze"===t)if(e){var n=r.selector,o=n.ri,i=n.ci;this.freeze(o,i)}else this.freeze(0,0);else r.setSelectedCellAttr(t,e),"formula"!==t||r.selector.multiple()||Ku.call(this),Nu.call(this)}function os(t,e,r,n){this.data.setAutoFilter(t,e,r,n),Nu.call(this)}function is(){var t,e,r,n,o,i,a=this,l=this.selector,c=this.overlayerEl,u=this.rowResizer,s=this.colResizer,f=this.verticalScrollbar,h=this.horizontalScrollbar,y=this.editor,p=this.contextMenu,d=this.toolbar,v=this.modalValidation,b=this.sortFilter;c.on("mousemove",(function(t){Iu.call(a,t)})).on("mousedown",(function(t){y.clear(),p.hide(),2===t.buttons?(a.data.xyInSelectedRect(t.offsetX,t.offsetY)||Xu.call(a,t),p.setPosition(t.offsetX,t.offsetY),t.stopPropagation()):2===t.detail?Ku.call(a):Xu.call(a,t)})).on("mousewheel.stop",(function(t){Du.call(a,t)})).on("mouseout",(function(t){var e=t.offsetX;t.offsetY<=0&&s.hide(),e<=0&&u.hide()})),l.inputChange=function(t){es.call(a,t,"input"),Ku.call(a)},t=c.el,r=(e={move:function(t,e){zu.call(a,t,e)}}).move,n=e.end,o=0,i=0,Dt(t,"touchstart",(function(t){var e=t.touches[0],r=e.pageX,n=e.pageY;o=r,i=n})),Dt(t,"touchmove",(function(t){if(r){var e=t.changedTouches[0],n=e.pageX,a=e.pageY,l=n-o,c=a-i;(Math.abs(l)>10||Math.abs(c)>10)&&(Nt(l,c,t,r),o=n,i=a),t.preventDefault()}})),Dt(t,"touchend",(function(t){if(n){var e=t.changedTouches[0],r=e.pageX,a=e.pageY;Nt(r-o,a-i,t,n)}})),d.change=function(t,e){return ns.call(a,t,e)},b.ok=function(t,e,r,n){return os.call(a,t,e,r,n)},u.finishedFn=function(t,e){Qu.call(a,t,e)},s.finishedFn=function(t,e){ts.call(a,t,e)},u.unhideFn=function(t){qu.call(a,"row",t)},s.unhideFn=function(t){qu.call(a,"col",t)},f.moveFn=function(t,e){Ju.call(a,t,e)},h.moveFn=function(t,e){Gu.call(a,t,e)},y.change=function(t,e){es.call(a,e,t)},v.change=function(t){if("save"===t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o=65&&e<=90||e>=48&&e<=57||e>=96&&e<=105||"="===t.key?(es.call(a,t.key,"input"),Ku.call(a)):113===e&&Ku.call(a)}}}))}var as=function(){function t(e,r){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.eventMap=Ft();var o=r.settings,i=o.view,a=o.showToolbar,l=o.showContextmenu;this.el=c("div","".concat(Wt,"-sheet")),this.toolbar=new Gc(r,i.width,!a),this.print=new hn(r),e.children(this.toolbar.el,this.el,this.print.el),this.data=r,this.tableEl=c("canvas","".concat(Wt,"-table")),this.rowResizer=new $t(!1,r.rows.height),this.colResizer=new $t(!0,r.cols.minWidth),this.verticalScrollbar=new Lt(!0),this.horizontalScrollbar=new Lt(!1),this.editor=new Ye(Cr,(function(){return n.getTableOffset()}),r.rows.height),this.modalValidation=new mu,this.contextMenu=new wn((function(){return n.getRect()}),!l),this.selector=new fe(r),this.overlayerCEl=c("div","".concat(Wt,"-overlayer-content")).children(this.editor.el,this.selector.el),this.overlayerEl=c("div","".concat(Wt,"-overlayer")).child(this.overlayerCEl),this.sortFilter=new ju,this.el.children(this.tableEl,this.overlayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el),this.table=new en(this.tableEl.el,r),is.call(this),Nu.call(this),Au.call(this,!1,0,0)}var e,r,n;return e=t,(r=[{key:"on",value:function(t,e){return this.eventMap.on(t,e),this}},{key:"trigger",value:function(t){for(var e=this.eventMap,r=arguments.length,n=new Array(r>1?r-1:0),o=1;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};hs(this,t),this.swapFunc=n,this.updateFunc=i,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new gs((function(t){e.clickSwap2(e.items[t])})),this.contextMenu=new Ss,this.contextMenu.itemClick=o,this.el=c("div","".concat(Wt,"-bottombar")).children(this.contextMenu.el,this.menuEl=c("ul","".concat(Wt,"-menu")).child(c("li","").children(new Pe("add").on("click",(function(){r()})),c("span","").child(this.moreEl))))}return ps(t,[{key:"addItem",value:function(t,e,r){var n=this;this.dataNames.push(t);var o=c("li",e?"active":"").child(t);o.on("click",(function(){n.clickSwap2(o)})).on("contextmenu",(function(t){if("read"!==r.mode){var e=t.target,i=e.offsetLeft,a=e.offsetHeight;n.contextMenu.setOffset({left:i,bottom:a+1}),n.deleteEl=o}})).on("dblclick",(function(){if("read"!==r.mode){var t=o.html(),e=new iu("auto","");e.val(t),e.input.on("blur",(function(e){var r=e.target.value,o=n.dataNames.findIndex((function(e){return e===t}));n.renameItem(o,r)})),o.html("").child(e.el),e.focus()}})),e&&this.clickSwap(o),this.items.push(o),this.menuEl.child(o),this.moreEl.reset(this.dataNames)}},{key:"renameItem",value:function(t,e){this.dataNames.splice(t,1,e),this.moreEl.reset(this.dataNames),this.items[t].html("").child(e),this.updateFunc(t,e)}},{key:"clear",value:function(){var t=this;this.items.forEach((function(e){t.menuEl.removeChild(e.el)})),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}},{key:"deleteItem",value:function(){var t=this.activeEl,e=this.deleteEl;if(this.items.length>1){var r=this.items.findIndex((function(t){return t===e}));if(this.items.splice(r,1),this.dataNames.splice(r,1),this.menuEl.removeChild(e.el),this.moreEl.reset(this.dataNames),t===e){var n=cs(this.items,1)[0];return this.activeEl=n,this.activeEl.toggle(),[r,0]}return[r,-1]}return[-1]}},{key:"clickSwap2",value:function(t){var e=this.items.findIndex((function(e){return e===t}));this.clickSwap(t),this.activeEl.toggle(),this.swapFunc(e)}},{key:"clickSwap",value:function(t){null!==this.activeEl&&this.activeEl.toggle(),this.activeEl=t}}]),t}();r(1);function xs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Es(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Es(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Es(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:{};Cs(this,t);var o=e;this.options=_s({showBottomBar:!0},n),this.sheetIndex=1,this.datas=[],"string"==typeof e&&(o=document.querySelector(e)),this.bottombar=this.options.showBottomBar?new js((function(){if("read"!==r.options.mode){var t=r.addSheet();r.sheet.resetData(t)}}),(function(t){var e=r.datas[t];r.sheet.resetData(e)}),(function(){r.deleteSheet()}),(function(t,e){r.datas[t].name=e,r.sheet.trigger("change")})):null,this.data=this.addSheet();var i=c("div","".concat(Wt)).on("contextmenu",(function(t){return t.preventDefault()}));o.appendChild(i.el),this.sheet=new as(i,this.data),null!==this.bottombar&&i.child(this.bottombar.el)}var e,r,n;return e=t,n=[{key:"locale",value:function(t,e){nt(t,e)}}],(r=[{key:"addSheet",value:function(t){var e=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t||"sheet".concat(this.sheetIndex),o=new Ct(n,this.options);return o.change=function(){for(var t,r=arguments.length,n=new Array(r),o=0;o=0&&(this.datas.splice(e,1),r>=0&&this.sheet.resetData(this.datas[r]),this.sheet.trigger("change"))}}},{key:"loadData",value:function(t){var e=Array.isArray(t)?t:[t];if(null!==this.bottombar&&this.bottombar.clear(),this.datas=[],e.length>0)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:0;return this.datas[n].setCellText(t,e,r,"finished"),this}},{key:"cell",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.datas[r].getCell(t,e)}},{key:"cellStyle",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.datas[r].getCellStyle(t,e)}},{key:"reRender",value:function(){return this.sheet.table.render(),this}},{key:"on",value:function(t,e){return this.sheet.on(t,e),this}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(t){return this.sheet.on("change",t),this}}])&&As(e.prototype,r),n&&As(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Is=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Ts(t,e)};window&&(window.x_spreadsheet=Is,window.x_spreadsheet.locale=function(t,e){return nt(t,e)});e.default=Ts}]); //# sourceMappingURL=xspreadsheet.js.map \ No newline at end of file diff --git a/dist/xspreadsheet.js.map b/dist/xspreadsheet.js.map index 5312ba8e..cae20869 100644 --- a/dist/xspreadsheet.js.map +++ b/dist/xspreadsheet.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/component/element.js","webpack:///./src/core/alphabet.js","webpack:///./src/core/cell_range.js","webpack:///./src/core/selector.js","webpack:///./src/core/scroll.js","webpack:///./src/core/history.js","webpack:///./src/core/clipboard.js","webpack:///./src/core/auto_filter.js","webpack:///./src/core/merge.js","webpack:///./src/core/helper.js","webpack:///./src/core/row.js","webpack:///./src/core/col.js","webpack:///./src/locale/locale.js","webpack:///./src/locale/en.js","webpack:///./src/core/validator.js","webpack:///./src/core/validation.js","webpack:///./src/core/data_proxy.js","webpack:///./src/component/event.js","webpack:///./src/config.js","webpack:///./src/component/resizer.js","webpack:///./src/component/scrollbar.js","webpack:///./src/component/selector.js","webpack:///./src/component/suggest.js","webpack:///./src/component/icon.js","webpack:///./src/component/calendar.js","webpack:///./src/component/datepicker.js","webpack:///./src/component/editor.js","webpack:///./src/component/button.js","webpack:///./src/canvas/draw.js","webpack:///./src/core/font.js","webpack:///./src/core/cell.js","webpack:///./src/core/formula.js","webpack:///./src/core/format.js","webpack:///./src/component/table.js","webpack:///./src/component/print.js","webpack:///./src/component/contextmenu.js","webpack:///./src/component/toolbar/item.js","webpack:///./src/component/tooltip.js","webpack:///./src/component/toolbar/dropdown_item.js","webpack:///./src/component/dropdown.js","webpack:///./src/component/dropdown_align.js","webpack:///./src/component/toolbar/align.js","webpack:///./src/component/toolbar/valign.js","webpack:///./src/component/toolbar/toggle_item.js","webpack:///./src/component/toolbar/autofilter.js","webpack:///./src/component/toolbar/bold.js","webpack:///./src/component/toolbar/italic.js","webpack:///./src/component/toolbar/strike.js","webpack:///./src/component/toolbar/underline.js","webpack:///./src/component/color_palette.js","webpack:///./src/component/dropdown_color.js","webpack:///./src/component/dropdown_linetype.js","webpack:///./src/component/border_palette.js","webpack:///./src/component/dropdown_border.js","webpack:///./src/component/toolbar/border.js","webpack:///./src/component/toolbar/icon_item.js","webpack:///./src/component/toolbar/clearformat.js","webpack:///./src/component/toolbar/paintformat.js","webpack:///./src/component/toolbar/text_color.js","webpack:///./src/component/toolbar/fill_color.js","webpack:///./src/component/dropdown_fontsize.js","webpack:///./src/component/toolbar/font_size.js","webpack:///./src/component/dropdown_font.js","webpack:///./src/component/toolbar/font.js","webpack:///./src/component/dropdown_format.js","webpack:///./src/component/toolbar/format.js","webpack:///./src/component/dropdown_formula.js","webpack:///./src/component/toolbar/formula.js","webpack:///./src/component/toolbar/freeze.js","webpack:///./src/component/toolbar/merge.js","webpack:///./src/component/toolbar/redo.js","webpack:///./src/component/toolbar/undo.js","webpack:///./src/component/toolbar/print.js","webpack:///./src/component/toolbar/textwrap.js","webpack:///./src/component/toolbar/more.js","webpack:///./src/component/toolbar/index.js","webpack:///./src/component/modal.js","webpack:///./src/component/form_input.js","webpack:///./src/component/form_select.js","webpack:///./src/component/form_field.js","webpack:///./src/component/modal_validation.js","webpack:///./src/component/sort_filter.js","webpack:///./src/component/message.js","webpack:///./src/component/sheet.js","webpack:///./src/component/bottombar.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Element","tag","className","arguments","length","undefined","_classCallCheck","this","el","document","createElement","data","eventNames","handler","_eventNames$split2","_toArray","split","fen","oen","slice","eventName","test","window","navigator","userAgent","addEventListener","evt","k","button","stopPropagation","_this","keys","forEach","css","concat","_this$el","top","offsetTop","left","offsetLeft","height","offsetHeight","width","offsetWidth","v","scrollLeft","scrollTop","getBoundingClientRect","parentNode","_this2","_len","eles","Array","_key","childNodes","ele","child","removeChild","arg","createTextNode","appendChild","contains","classList","add","remove","cls","toggleClass","toggle","flag","addClass","removeClass","active","_this3","setAttribute","getAttribute","removeAttribute","content","innerHTML","focus","_this4","_len2","_key2","style","removeProperty","_this5","getComputedStyle","h","alphabets","stringAt","index","str","cindex","parseInt","last","indexAt","ret","charCodeAt","exponet","Math","pow","expr2xy","src","x","y","charAt","xy2expr","expr2expr","xn","yn","condition","_expr2xy2","_slicedToArray","CellRange","sri","sci","eri","eci","w","cell_range_classCallCheck","ref","refs","_expr2xy4","cell_range_slicedToArray","_expr2xy6","ri","ci","args","_expr2xy","cb","rowFilter","j","other","addRet","push","dsr","dsc","der","dec","multiple","Selector","selector_classCallCheck","range","size","Scroll","scroll_classCallCheck","History","history_classCallCheck","undoItems","redoItems","JSON","stringify","currentd","canUndo","parse","pop","canRedo","Clipboard","clipboard_classCallCheck","state","cellRange","Filter","operator","auto_filter_classCallCheck","includes","Sort","order","AutoFilter","filters","sort","_ref","map","it","getData","filter","getFilter","set","hrange","getCell","rset","Set","fset","_this$range","cell","ctext","text","_this$range2","cnt","valueOf","Merges","merge_classCallCheck","_","cr","within","intersects","union","deleteWithin","type","cbWithin","rn","cn","it1","merges","merge","toString","mergeDeep","sources","source","isArray","digits","a","numberCalc","a1","a2","Number","isNaN","al1","al2","num1","num2","toFixed","max","helper","cloneDeep","obj","apply","equals","obj1","obj2","v1","v2","ai","arrayEquals","sum","objOrAry","total","rangeEach","min","rangeSum","getv","rangeReduceIf","inits","initv","ifv","deleteProperty","oldv","Rows","len","row_classCallCheck","isHide","row","getOrNew","idx","setHide","hide","exceptSet","has","getHeight","sumHeight","cells","what","getCellOrNew","editable","srcCellRange","dstCellRange","autofill","dsri","dsci","deri","deci","_srcCellRange$size","_srcCellRange$size2","row_slicedToArray","_dstCellRange$size","_dstCellRange$size2","drn","dcn","isAdd","dn","ii","jj","nri","nci","ncell","replace","word","result","exec","substring","setCell","ncellmm","each","eachCells","setCellText","ndata","_this6","rndata","_this7","_this8","deleteCell","col","ks","entries","_ref2","_ref3","_ref4","_ref5","assign","Cols","indexWidth","minWidth","col_classCallCheck","getWidth","sumWidth","$languages","$messages","en","toolbar","undo","redo","print","paintformat","clearformat","format","fontName","fontSize","fontBold","fontItalic","underline","strike","color","bgcolor","border","align","valign","textwrap","freeze","autofilter","formula","more","contextmenu","copy","cut","paste","pasteValue","pasteFormat","insertRow","insertColumn","deleteSheet","deleteRow","deleteColumn","deleteCellText","validation","cellprintable","cellnonprintable","celleditable","cellnoneditable","orientation","orientations","normal","number","percent","rmb","usd","eur","date","time","datetime","duration","average","_if","and","or","required","notMatch","between","notBetween","notIn","equal","notEqual","lessThan","lessThanEqual","greaterThan","greaterThanEqual","error","pasteForMergedCell","calendar","weeks","months","next","cancel","save","ok","desc","asc","empty","dataValidation","criteria","modeType","column","list","phone","email","be","nbe","lt","lte","gt","gte","eq","neq","translate","messages","_i","_$languages","lang","message","match","x_spreadsheet","tf","locale","unshift","rules","returnMessage","Validator","validator_classCallCheck","Date","values","parseValue","_value","validator_slicedToArray","_value2","Validation","validator","validation_classCallCheck","nrefs","difference","Validations","errors","Map","_v$validator$validate2","validation_slicedToArray","validate","getByValidator","addRef","defaultSettings","view","documentElement","clientHeight","clientWidth","showGrid","showToolbar","showContextmenu","showBottomBar","font","bold","italic","canPaste","dst","clone","_src$size2","data_proxy_slicedToArray","srn","scn","_dst$size2","copyPaste","rows","deleteCells","_cell$merge","cutPaste","clipboard","move","clear","setStyleBorder","bss","styles","cstyle","addStyle","DataProxy","settings","data_proxy_classCallCheck","cols","validations","hyperlinks","comments","selector","scroll","history","autoFilter","change","exceptRowSet","sortedRowMap","unsortedRowMap","changeData","_this$selector","_this$selector2","setData","copyText","rowData","cellText","String","indexOf","writeText","then","err","console","log","isClear","isCopy","isCut","txt","lines","srcRange","_selector$range2","cri","cci","getFirstIncludes","unmerge","_selector$range","isSingleSelected","mergeIndexes","_merges$ii","mri","mci","splice","_cell$merge2","mrl","mcl","bottom","right","getCellMerge","_selector$size2","nfont","oldCell","oldText","vIndex","findIndex","_this$selector3","_this$getSelectedRect","getSelectedRect","x1","y1","getRect","left0","top0","fsh","freezeTotalHeight","fsw","freezeTotalWidth","_getCellRowByY$call","scrollOffsety","frset","_getCellColByX$call","scrollOffsetx","_helper$rangeReduceIf2","totalWidth","totalHeight","_this$cellRect","cellRect","_this$selector$range","_cell$merge3","_this$selector$range2","_cell$merge4","_this9","_selector$size4","_selector$range3","_this10","_selector$range4","_this11","addFilter","setSort","resetAutoFilter","_this12","_autoFilter$filteredR","filteredRows","fary","from","oldAry","b","_this13","_this14","_this14$selector$rang","si","insert","shift","_this15","_selector$range5","_selector$range$size2","rsize","csize","fci","_helper$rangeReduceIf4","fri","_helper$rangeReduceIf6","_cell$merge5","cellStyle","defaultStyle","_this$selector4","getCellStyleOrDefault","_this$freeze","_this16","_this17","setHeight","_this18","setWidth","_this$settings","_this$freeze2","_rows$maxCell2","maxCell","exceptRows","exceptRowTH","viewHeight","viewWidth","viewRange","filterIntersects","_selector$size6","rlen","clen","_selector$range6","unhide","frary","_toConsumableArray","offset","rowHeight","colWidth","nstyle","_this19","target","fn","unbind","removeEventListener","unbindClickoutside","xclickoutside","body","bindClickoutside","detail","mouseMoveUp","movefunc","upfunc","xEvtUp","calTouchDirection","spanx","spany","abs","cssPrefix","devicePixelRatio","Resizer","vertical","minDistance","resizer_classCallCheck","moving","children","unhideHoverEl","on","mousedblclickHandler","hoverEl","mousedownHandler","lineEl","cRect","finishedFn","unhideFn","unhideIndex","show","rect","line","hideUnhide","startEvt","distance","e","buttons","movementX","movementY","Scrollbar","scrollbar_classCallCheck","moveFn","contentEl","_evt$target","contentDistance","cssKey","startZIndex","SelectorElement","useHideInput","component_selector_classCallCheck","inputChange","cornerEl","areaEl","clipboardEl","autofillEl","hideInput","hideInputDiv","of","val","calBRAreaOffset","ftwidth","ftheight","calTAreaOffset","calLAreaOffset","setBRAreaOffset","br","setAreaOffset","setTAreaOffset","setLAreaOffset","setLClipboardOffset","setClipboardOffset","setBRClipboardOffset","setTClipboardOffset","setAllAreaOffset","tl","setAllClipboardOffset","areaOffset","indexes","arange","lastri","lastci","resetAreaOffset","freezeHeight","freezeWidth","setOffset","coffset","getClipboardRect","resetOffset","indexesUpdated","calSelectedRangeByStart","setIndexes","moveIndexes","calSelectedRangeByEnd","_this$data$selector$r","setEnd","ern","ecn","showAutofill","hideAutofill","showClipboard","hideClipboard","inputEnter","preventDefault","filterItems","itemIndex","click","Suggest","items","itemClick","suggest_classCallCheck","cssRemoveKeys","parent","_el$html","startsWith","toUpperCase","title","item","label","html","suggest_toConsumableArray","input","keyCode","ctrlKey","Icon","icon_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","iconNameEl","addMonth","step","setMonth","getMonth","weekday","setDate","getDay","Calendar","_h","calendar_classCallCheck","cvalue","headerLeftEl","bodyEl","buildAll","prev","calendar_toConsumableArray","week","selectChange","buildHeaderLeft","buildBody","getFullYear","_bodyEl$html","trs","year","month","cdate","startDate","datess","disabled","getDate","monthDays","_h2","tds","Datepicker","datepicker_classCallCheck","setValue","RegExp","resetTextareaSize","inputText","textlineEl","textEl","txts","maxTxtSize","editor_toConsumableArray","fontWidth","tlineWidth","maxWidth","viewFn","h1","twidth","keydownEventHandler","altKey","itxt","selectionEnd","ntxt","setSelectionRange","setText","position","blur","setTimeout","Editor","formulas","editor_classCallCheck","suggest","start","lastIndexOf","sit","eit","datepicker","dateFormat","search","bindInputEvents","setItems","suggestPosition","elOffset","sOffset","Button","button_classCallCheck","button_possibleConstructorReturn","button_getPrototypeOf","dpr","thinLineWidth","npx","px","npxLine","DrawBox","padding","draw_classCallCheck","borderTop","borderRight","borderBottom","borderLeft","drawFontLine","tx","ty","blheight","blwidth","floffset","Draw","ctx","getContext","resize","scale","clearRect","options","beginPath","restore","fillRect","fillText","mtxt","box","attr","textWrap","textx","textAlign","textBaseline","fillStyle","strokeStyle","biw","innerWidth","ntxts","txtWidth","measureText","textLine","substr","txtHeight","texty","lineWidth","setLineDash","draw_slicedToArray","moveTo","lineTo","stroke","draw_toConsumableArray","topxys","rightxys","bottomxys","leftxys","sx","sy","closePath","fill","dtextcb","clip","baseFonts","fontSizes","pt","infixExprToSuffixExpr","operatorStack","stack","subStrs","fnArgType","fnArgOperator","fnArgsLen","oldc","join","c1","cell_slicedToArray","ex","ey","rangelen","nc","evalSubExpr","subExpr","cellRender","fl","expr","evalSuffixExpr","srcStack","formulaMap","cellList","fc","_expr","params","render","reverse","core_cell","getCellText","baseFormulas","ary","reduce","formula_toConsumableArray","formula_slicedToArray","f","every","some","formulam","formatStringRender","formatNumberRender","_v1$split2","format_toArray","first","parts","format_toConsumableArray","baseFormats","formatm","cellPaddingWidth","tableFixedHeaderCleanStyle","tableGridStyle","getDrawBox","rindex","yoffset","_data$cellRect","renderCell","draw","nrindex","frozen","dbox","setBorders","strokeBorders","evalPaused","_cell","getCellTextOrDefault","getFontSizePxByPt","getError","renderContent","fw","fh","exceptRowTotalHeight","filteredTranslateFunc","eachMergesInView","afRange","dropdown","renderSelectedHeaderCell","renderFixedHeaders","nty","ntx","_data$selector$range","rowEach","colEach","renderContentGrid","ch","cw","Table","table_classCallCheck","_data$scroll","_data$freeze","table_slicedToArray","vr","freezeViewRange","ftw","fth","theight","PAGER_SIZES","PAGER_ORIENTATIONS","inches2px","inc","btnClick","toPrint","Print","print_classCallCheck","paper","print_toConsumableArray","ps","preview","iwidth","iheight","contentRange","pages","canvases","mViewRange","_loop","th","yo","wrap","canvas","rh","yof","contentWindow","idoc","head","cloneNode","drawImage","menuItems","buildMenu","ContextMenu","contextmenu_classCallCheck","contextmenu_toConsumableArray","setMode","hideEl","vhf","Item","shortcut","item_classCallCheck","tip","element","_target$getBoundingCl","elBox","tooltip","DropdownItem","dd","getValue","_get","dropdown_item_getPrototypeOf","setTitle","Dropdown","showArrow","placement","dropdown_classCallCheck","dropdown_possibleConstructorReturn","dropdown_getPrototypeOf","headerClick","setContentChildren","headerEl","_this$contentEl","DropdownAlign","aligns","_getPrototypeOf2","dropdown_align_classCallCheck","icon","naligns","iconName","dropdown_align_possibleConstructorReturn","dropdown_align_getPrototypeOf","dropdown_align_toConsumableArray","setName","Align","align_classCallCheck","align_possibleConstructorReturn","align_getPrototypeOf","Valign","valign_classCallCheck","valign_possibleConstructorReturn","valign_getPrototypeOf","ToggleItem","toggle_item_get","toggle_item_getPrototypeOf","hasClass","Autofilter","autofilter_classCallCheck","autofilter_possibleConstructorReturn","autofilter_getPrototypeOf","Bold","bold_classCallCheck","bold_possibleConstructorReturn","bold_getPrototypeOf","Italic","italic_classCallCheck","italic_possibleConstructorReturn","italic_getPrototypeOf","Strike","strike_classCallCheck","strike_possibleConstructorReturn","strike_getPrototypeOf","Underline","underline_classCallCheck","underline_possibleConstructorReturn","underline_getPrototypeOf","themeColorPlaceHolders","themeColors","standardColors","buildTd","ColorPalette","_h4","color_palette_classCallCheck","table","color_palette_toConsumableArray","_h3","DropdownColor","dropdown_color_classCallCheck","colorPalette","dropdown_color_possibleConstructorReturn","dropdown_color_getPrototypeOf","lineTypes","DropdownLineType","dropdown_linetype_classCallCheck","beforei","lineTypeEls","iti","dropdown_linetype_possibleConstructorReturn","dropdown_linetype_getPrototypeOf","dropdown_linetype_toConsumableArray","buildTable","BorderPalette","border_palette_classCallCheck","ddColor","ddType","border_palette_slicedToArray","border_palette_toConsumableArray","DropdownBorder","dropdown_border_classCallCheck","borderPalette","dropdown_border_possibleConstructorReturn","dropdown_border_getPrototypeOf","Border","border_classCallCheck","border_possibleConstructorReturn","border_getPrototypeOf","IconItem","icon_item_get","icon_item_getPrototypeOf","Clearformat","clearformat_classCallCheck","clearformat_possibleConstructorReturn","clearformat_getPrototypeOf","Paintformat","paintformat_classCallCheck","paintformat_possibleConstructorReturn","paintformat_getPrototypeOf","TextColor","text_color_classCallCheck","text_color_possibleConstructorReturn","text_color_getPrototypeOf","FillColor","fill_color_classCallCheck","fill_color_possibleConstructorReturn","fill_color_getPrototypeOf","DropdownFontSize","dropdown_fontsize_classCallCheck","nfontSizes","dropdown_fontsize_possibleConstructorReturn","dropdown_fontsize_getPrototypeOf","dropdown_fontsize_toConsumableArray","Format","font_size_classCallCheck","font_size_possibleConstructorReturn","font_size_getPrototypeOf","DropdownFontsize","DropdownFont","dropdown_font_classCallCheck","nfonts","dropdown_font_possibleConstructorReturn","dropdown_font_getPrototypeOf","dropdown_font_toConsumableArray","Font","font_classCallCheck","font_possibleConstructorReturn","font_getPrototypeOf","DropdownFormat","dropdown_format_classCallCheck","nformats","dropdown_format_possibleConstructorReturn","dropdown_format_getPrototypeOf","dropdown_format_toConsumableArray","format_classCallCheck","format_possibleConstructorReturn","format_getPrototypeOf","DropdownFormula","dropdown_formula_classCallCheck","nformulas","dropdown_formula_possibleConstructorReturn","dropdown_formula_getPrototypeOf","dropdown_formula_toConsumableArray","formula_classCallCheck","formula_possibleConstructorReturn","formula_getPrototypeOf","Freeze","freeze_classCallCheck","freeze_possibleConstructorReturn","freeze_getPrototypeOf","Merge","toolbar_merge_classCallCheck","merge_possibleConstructorReturn","merge_getPrototypeOf","Redo","redo_classCallCheck","redo_possibleConstructorReturn","redo_getPrototypeOf","Undo","undo_classCallCheck","undo_possibleConstructorReturn","undo_getPrototypeOf","toolbar_print_classCallCheck","print_possibleConstructorReturn","print_getPrototypeOf","Textwrap","textwrap_classCallCheck","textwrap_possibleConstructorReturn","textwrap_getPrototypeOf","DropdownMore","more_classCallCheck","moreBtns","more_possibleConstructorReturn","more_getPrototypeOf","More","buildDivider","moreResize","_btns$html","_moreBtns$html","btns","moreEl","btns2","_moreEl$dd","widthFn","sumWidth2","list1","list2","toolbar_slicedToArray","genBtn","btn","onClick","Toolbar","toolbar_classCallCheck","undoEl","redoEl","paintformatEl","clearformatEl","formatEl","fontEl","fontSizeEl","FontSize","boldEl","italicEl","underlineEl","strikeEl","textColorEl","fillColorEl","borderEl","mergeEl","alignEl","valignEl","textwrapEl","freezeEl","autofilterEl","formulaEl","Formula","_data$settings$extend","extendToolbar","reset","_el$computedStyle","computedStyle","marginLeft","marginRight","_it$computedStyle","getSelectedCellStyle","setState","canUnmerge","canAutofilter","freezeIsActive","Modal","modal_classCallCheck","modal_toConsumableArray","dimmer","_this$el$show$box","_document$documentEle","xkeydownEsc","FormInput","hint","form_input_classCallCheck","vchange","FormSelect","getTitle","form_select_classCallCheck","itemEl","patterns","FormField","rule","labelWidth","form_field_classCallCheck","pattern","fieldLabelWidth","ModalValidation","modal_validation_classCallCheck","mf","rf","cf","criteriaSelected","criteriaOperatorSelected","minvf","maxvf","svf","vf","modal_validation_possibleConstructorReturn","modal_validation_getPrototypeOf","action","attrs","field","isShow","clsName","buildSortItem","resetFilterHeader","filterhEl","filterValues","checked","SortFilter","sort_filter_classCallCheck","filterbEl","filterClick","sortAscEl","sortDescEl","sortDesc","tindex","xtoast","_el$box","throttle","func","wait","timeout","that","selectorSet","contextMenu","trigger","selectorMove","direction","_selector$indexes","sheet_slicedToArray","_selector$moveIndexes","verticalScrollbar","horizontalScrollbar","_data$getSelectedRect","tableOffset","getTableOffset","verticalScrollbarSet","erth","horizontalScrollbarSet","sheetReset","tableEl","overlayerEl","overlayerCEl","tOffset","vRect","editor","fwidth","fheight","setFreezeLengths","clearClipboard","copyToSystemClipboard","msg","cdata","clipboardData","pasteFromText","unhideRowsOrCols","overlayerMousedown","sortFilter","offsetX","offsetY","isAutofillEl","getCellRectByXY","getSort","shiftKey","_data$getCellRectByXY","paintformatActive","paintformatToggle","editorSetOffset","sPosition","editorSet","getSelectedCell","getSelectedValidator","dataSetCellText","setSelectedCellText","_data$selector","insertDeleteRowColumn","setSelectedCellAttr","toolbarChange","_data$selector2","sheetInitEvents","end","startx","starty","rowResizer","colResizer","modalValidation","tRect","showUnhide","xyInSelectedRect","setPosition","deltaY","deltaX","loopValue","vFunc","moveY","tempY","tempX","temp","horizontal","moveX","_evt$touches$","touches","pageX","pageY","_evt$changedTouches$","changedTouches","_evt$changedTouches$2","setAutoFilter","scrolly","resetBRLAreaOffset","scrollx","resetBRTAreaOffset","itext","_this5$data","addValidation","removeValidation","getSelectedValidation","hideRowsOrCols","reload","focusing","which","metaKey","Sheet","targetEl","sheet_classCallCheck","eventMap","listeners","callback","currentListener","removeListener","current","once","execCalllback","fire","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","iterator","done","event_toConsumableArray","removeAllListeners","createEventEmitter","_data$settings","_len3","_key3","resetData","setFreeze","_this$data","_this$getRect","bottombar_classCallCheck","bottombar_possibleConstructorReturn","bottombar_getPrototypeOf","contentClick","bottombar_toConsumableArray","_h$css","Bottombar","addFunc","swapFunc","deleteFunc","updateFunc","dataNames","activeEl","deleteEl","clickSwap2","menuEl","nindex","renameItem","clickSwap","bottombar_slicedToArray","Spreadsheet","selectors","src_classCallCheck","_objectSpread","sheetIndex","datas","querySelector","bottombar","addSheet","sheet","rootEl","_this2$sheet","addItem","_this$bottombar$delet2","src_slicedToArray","deleteItem","oldIndex","ds","nd","getCellStyle","spreadsheet"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OA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v9C,OAAO2Y,cAAcE,OAAS,SAACL,EAAMC,GAAP,OAAmBI,EAAOL,EAAMC,KAGjD0jC","file":"xspreadsheet.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","/* global document */\n/* global window */\nclass Element {\n constructor(tag, className = '') {\n if (typeof tag === 'string') {\n this.el = document.createElement(tag);\n this.el.className = className;\n } else {\n this.el = tag;\n }\n this.data = {};\n }\n\n data(key, value) {\n if (value !== undefined) {\n this.data[key] = value;\n return this;\n }\n return this.data[key];\n }\n\n on(eventNames, handler) {\n const [fen, ...oen] = eventNames.split('.');\n let eventName = fen;\n if (eventName === 'mousewheel' && /Firefox/i.test(window.navigator.userAgent)) {\n eventName = 'DOMMouseScroll';\n }\n this.el.addEventListener(eventName, (evt) => {\n handler(evt);\n for (let i = 0; i < oen.length; i += 1) {\n const k = oen[i];\n if (k === 'left' && evt.button !== 0) {\n return;\n }\n if (k === 'right' && evt.button !== 2) {\n return;\n }\n if (k === 'stop') {\n evt.stopPropagation();\n }\n }\n });\n return this;\n }\n\n offset(value) {\n if (value !== undefined) {\n Object.keys(value).forEach((k) => {\n this.css(k, `${value[k]}px`);\n });\n return this;\n }\n const {\n offsetTop, offsetLeft, offsetHeight, offsetWidth,\n } = this.el;\n return {\n top: offsetTop,\n left: offsetLeft,\n height: offsetHeight,\n width: offsetWidth,\n };\n }\n\n scroll(v) {\n const { el } = this;\n if (v !== undefined) {\n if (v.left !== undefined) {\n el.scrollLeft = v.left;\n }\n if (v.top !== undefined) {\n el.scrollTop = v.top;\n }\n }\n return { left: el.scrollLeft, top: el.scrollTop };\n }\n\n box() {\n return this.el.getBoundingClientRect();\n }\n\n parent() {\n return new Element(this.el.parentNode);\n }\n\n children(...eles) {\n if (arguments.length === 0) {\n return this.el.childNodes;\n }\n eles.forEach(ele => this.child(ele));\n return this;\n }\n\n removeChild(el) {\n this.el.removeChild(el);\n }\n\n /*\n first() {\n return this.el.firstChild;\n }\n\n last() {\n return this.el.lastChild;\n }\n\n remove(ele) {\n return this.el.removeChild(ele);\n }\n\n prepend(ele) {\n const { el } = this;\n if (el.children.length > 0) {\n el.insertBefore(ele, el.firstChild);\n } else {\n el.appendChild(ele);\n }\n return this;\n }\n\n prev() {\n return this.el.previousSibling;\n }\n\n next() {\n return this.el.nextSibling;\n }\n */\n\n child(arg) {\n let ele = arg;\n if (typeof arg === 'string') {\n ele = document.createTextNode(arg);\n } else if (arg instanceof Element) {\n ele = arg.el;\n }\n this.el.appendChild(ele);\n return this;\n }\n\n contains(ele) {\n return this.el.contains(ele);\n }\n\n className(v) {\n if (v !== undefined) {\n this.el.className = v;\n return this;\n }\n return this.el.className;\n }\n\n addClass(name) {\n this.el.classList.add(name);\n return this;\n }\n\n hasClass(name) {\n return this.el.classList.contains(name);\n }\n\n removeClass(name) {\n this.el.classList.remove(name);\n return this;\n }\n\n toggle(cls = 'active') {\n return this.toggleClass(cls);\n }\n\n toggleClass(name) {\n return this.el.classList.toggle(name);\n }\n\n active(flag = true, cls = 'active') {\n if (flag) this.addClass(cls);\n else this.removeClass(cls);\n return this;\n }\n\n checked(flag = true) {\n this.active(flag, 'checked');\n return this;\n }\n\n disabled(flag = true) {\n if (flag) this.addClass('disabled');\n else this.removeClass('disabled');\n return this;\n }\n\n // key, value\n // key\n // {k, v}...\n attr(key, value) {\n if (value !== undefined) {\n this.el.setAttribute(key, value);\n } else {\n if (typeof key === 'string') {\n return this.el.getAttribute(key);\n }\n Object.keys(key).forEach((k) => {\n this.el.setAttribute(k, key[k]);\n });\n }\n return this;\n }\n\n removeAttr(key) {\n this.el.removeAttribute(key);\n return this;\n }\n\n html(content) {\n if (content !== undefined) {\n this.el.innerHTML = content;\n return this;\n }\n return this.el.innerHTML;\n }\n\n val(v) {\n if (v !== undefined) {\n this.el.value = v;\n return this;\n }\n return this.el.value;\n }\n\n focus() {\n this.el.focus();\n }\n\n cssRemoveKeys(...keys) {\n keys.forEach(k => this.el.style.removeProperty(k));\n return this;\n }\n\n // css( propertyName )\n // css( propertyName, value )\n // css( properties )\n css(name, value) {\n if (value === undefined && typeof name !== 'string') {\n Object.keys(name).forEach((k) => {\n this.el.style[k] = name[k];\n });\n return this;\n }\n if (value !== undefined) {\n this.el.style[name] = value;\n return this;\n }\n return this.el.style[name];\n }\n\n computedStyle() {\n return window.getComputedStyle(this.el, null);\n }\n\n show() {\n this.css('display', 'block');\n return this;\n }\n\n hide() {\n this.css('display', 'none');\n return this;\n }\n}\n\nconst h = (tag, className = '') => new Element(tag, className);\n\nexport {\n Element,\n h,\n};\n","import './_.prototypes';\n\nconst alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];\n\n/** index number 2 letters\n * @example stringAt(26) ==> 'AA'\n * @date 2019-10-10\n * @export\n * @param {number} index\n * @returns {string}\n */\nexport function stringAt(index) {\n let str = '';\n let cindex = index;\n while (cindex >= alphabets.length) {\n cindex /= alphabets.length;\n cindex -= 1;\n str += alphabets[parseInt(cindex, 10) % alphabets.length];\n }\n const last = index % alphabets.length;\n str += alphabets[last];\n return str;\n}\n\n/** translate letter in A1-tag to number\n * @date 2019-10-10\n * @export\n * @param {string} str \"AA\" in A1-tag \"AA1\"\n * @returns {number}\n */\nexport function indexAt(str) {\n let ret = 0;\n for (let i = 0; i < str.length - 1; i += 1) {\n const cindex = str.charCodeAt(i) - 65;\n const exponet = str.length - 1 - i;\n ret += (alphabets.length ** exponet) + (alphabets.length * cindex);\n }\n ret += str.charCodeAt(str.length - 1) - 65;\n return ret;\n}\n\n// B10 => x,y\n/** translate A1-tag to XY-tag\n * @date 2019-10-10\n * @export\n * @param {tagA1} src\n * @returns {tagXY}\n */\nexport function expr2xy(src) {\n let x = '';\n let y = '';\n for (let i = 0; i < src.length; i += 1) {\n if (src.charAt(i) >= '0' && src.charAt(i) <= '9') {\n y += src.charAt(i);\n } else {\n x += src.charAt(i);\n }\n }\n return [indexAt(x), parseInt(y, 10) - 1];\n}\n\n/** translate XY-tag to A1-tag\n * @example x,y => B10\n * @date 2019-10-10\n * @export\n * @param {number} x\n * @param {number} y\n * @returns {tagA1}\n */\nexport function xy2expr(x, y) {\n return `${stringAt(x)}${y + 1}`;\n}\n\n/** translate A1-tag src by (xn, yn)\n * @date 2019-10-10\n * @export\n * @param {tagA1} src\n * @param {number} xn\n * @param {number} yn\n * @returns {tagA1}\n */\nexport function expr2expr(src, xn, yn, condition = () => true) {\n if (xn === 0 && yn === 0) return src;\n const [x, y] = expr2xy(src);\n if (!condition(x, y)) return src;\n return xy2expr(x + xn, y + yn);\n}\n\nexport default {\n stringAt,\n indexAt,\n expr2xy,\n xy2expr,\n expr2expr,\n};\n","import { xy2expr, expr2xy } from './alphabet';\n\nclass CellRange {\n constructor(sri, sci, eri, eci, w = 0, h = 0) {\n this.sri = sri;\n this.sci = sci;\n this.eri = eri;\n this.eci = eci;\n this.w = w;\n this.h = h;\n }\n\n set(sri, sci, eri, eci) {\n this.sri = sri;\n this.sci = sci;\n this.eri = eri;\n this.eci = eci;\n }\n\n multiple() {\n return this.eri - this.sri > 0 || this.eci - this.sci > 0;\n }\n\n // cell-index: ri, ci\n // cell-ref: A10\n includes(...args) {\n let [ri, ci] = [0, 0];\n if (args.length === 1) {\n [ci, ri] = expr2xy(args[0]);\n } else if (args.length === 2) {\n [ri, ci] = args;\n }\n const {\n sri, sci, eri, eci,\n } = this;\n return sri <= ri && ri <= eri && sci <= ci && ci <= eci;\n }\n\n each(cb, rowFilter = () => true) {\n const {\n sri, sci, eri, eci,\n } = this;\n for (let i = sri; i <= eri; i += 1) {\n if (rowFilter(i)) {\n for (let j = sci; j <= eci; j += 1) {\n cb(i, j);\n }\n }\n }\n }\n\n contains(other) {\n return this.sri <= other.sri\n && this.sci <= other.sci\n && this.eri >= other.eri\n && this.eci >= other.eci;\n }\n\n // within\n within(other) {\n return this.sri >= other.sri\n && this.sci >= other.sci\n && this.eri <= other.eri\n && this.eci <= other.eci;\n }\n\n // disjoint\n disjoint(other) {\n return this.sri > other.eri\n || this.sci > other.eci\n || other.sri > this.eri\n || other.sci > this.eci;\n }\n\n // intersects\n intersects(other) {\n return this.sri <= other.eri\n && this.sci <= other.eci\n && other.sri <= this.eri\n && other.sci <= this.eci;\n }\n\n // union\n union(other) {\n const {\n sri, sci, eri, eci,\n } = this;\n return new CellRange(\n other.sri < sri ? other.sri : sri,\n other.sci < sci ? other.sci : sci,\n other.eri > eri ? other.eri : eri,\n other.eci > eci ? other.eci : eci,\n );\n }\n\n // intersection\n // intersection(other) {}\n\n // Returns Array that represents that part of this that does not intersect with other\n // difference\n difference(other) {\n const ret = [];\n const addRet = (sri, sci, eri, eci) => {\n ret.push(new CellRange(sri, sci, eri, eci));\n };\n const {\n sri, sci, eri, eci,\n } = this;\n const dsr = other.sri - sri;\n const dsc = other.sci - sci;\n const der = eri - other.eri;\n const dec = eci - other.eci;\n if (dsr > 0) {\n addRet(sri, sci, other.sri - 1, eci);\n if (der > 0) {\n addRet(other.eri + 1, sci, eri, eci);\n if (dsc > 0) {\n addRet(other.sri, sci, other.eri, other.sci - 1);\n }\n if (dec > 0) {\n addRet(other.sri, other.eci + 1, other.eri, eci);\n }\n } else {\n if (dsc > 0) {\n addRet(other.sri, sci, eri, other.sci - 1);\n }\n if (dec > 0) {\n addRet(other.sri, other.eci + 1, eri, eci);\n }\n }\n } else if (der > 0) {\n addRet(other.eri + 1, sci, eri, eci);\n if (dsc > 0) {\n addRet(sri, sci, other.eri, other.sci - 1);\n }\n if (dec > 0) {\n addRet(sri, other.eci + 1, other.eri, eci);\n }\n }\n if (dsc > 0) {\n addRet(sri, sci, eri, other.sci - 1);\n if (dec > 0) {\n addRet(sri, other.eri + 1, eri, eci);\n if (dsr > 0) {\n addRet(sri, other.sci, other.sri - 1, other.eci);\n }\n if (der > 0) {\n addRet(other.sri + 1, other.sci, eri, other.eci);\n }\n } else {\n if (dsr > 0) {\n addRet(sri, other.sci, other.sri - 1, eci);\n }\n if (der > 0) {\n addRet(other.sri + 1, other.sci, eri, eci);\n }\n }\n } else if (dec > 0) {\n addRet(eri, other.eci + 1, eri, eci);\n if (dsr > 0) {\n addRet(sri, sci, other.sri - 1, other.eci);\n }\n if (der > 0) {\n addRet(other.eri + 1, sci, eri, other.eci);\n }\n }\n return ret;\n }\n\n size() {\n return [\n this.eri - this.sri + 1,\n this.eci - this.sci + 1,\n ];\n }\n\n toString() {\n const {\n sri, sci, eri, eci,\n } = this;\n let ref = xy2expr(sci, sri);\n if (this.multiple()) {\n ref = `${ref}:${xy2expr(eci, eri)}`;\n }\n return ref;\n }\n\n clone() {\n const {\n sri, sci, eri, eci, w, h,\n } = this;\n return new CellRange(sri, sci, eri, eci, w, h);\n }\n\n /*\n toJSON() {\n return this.toString();\n }\n */\n\n equals(other) {\n return this.eri === other.eri\n && this.eci === other.eci\n && this.sri === other.sri\n && this.sci === other.sci;\n }\n\n static valueOf(ref) {\n // B1:B8, B1 => 1 x 1 cell range\n const refs = ref.split(':');\n const [sci, sri] = expr2xy(refs[0]);\n let [eri, eci] = [sri, sci];\n if (refs.length > 1) {\n [eci, eri] = expr2xy(refs[1]);\n }\n return new CellRange(sri, sci, eri, eci);\n }\n}\n\nexport default CellRange;\n\nexport {\n CellRange,\n};\n","import { CellRange } from './cell_range';\n\nexport default class Selector {\n constructor() {\n this.range = new CellRange(0, 0, 0, 0);\n this.ri = 0;\n this.ci = 0;\n }\n\n multiple() {\n return this.range.multiple();\n }\n\n setIndexes(ri, ci) {\n this.ri = ri;\n this.ci = ci;\n }\n\n size() {\n return this.range.size();\n }\n}\n","export default class Scroll {\n constructor() {\n this.x = 0; // left\n this.y = 0; // top\n this.ri = 0; // cell row-index\n this.ci = 0; // cell col-index\n }\n}\n","// import helper from '../helper';\n\nexport default class History {\n constructor() {\n this.undoItems = [];\n this.redoItems = [];\n }\n\n add(data) {\n this.undoItems.push(JSON.stringify(data));\n this.redoItems = [];\n }\n\n canUndo() {\n return this.undoItems.length > 0;\n }\n\n canRedo() {\n return this.redoItems.length > 0;\n }\n\n undo(currentd, cb) {\n const { undoItems, redoItems } = this;\n if (this.canUndo()) {\n redoItems.push(JSON.stringify(currentd));\n cb(JSON.parse(undoItems.pop()));\n }\n }\n\n redo(currentd, cb) {\n const { undoItems, redoItems } = this;\n if (this.canRedo()) {\n undoItems.push(JSON.stringify(currentd));\n cb(JSON.parse(redoItems.pop()));\n }\n }\n}\n","export default class Clipboard {\n constructor() {\n this.range = null; // CellRange\n this.state = 'clear';\n }\n\n copy(cellRange) {\n this.range = cellRange;\n this.state = 'copy';\n return this;\n }\n\n cut(cellRange) {\n this.range = cellRange;\n this.state = 'cut';\n return this;\n }\n\n isCopy() {\n return this.state === 'copy';\n }\n\n isCut() {\n return this.state === 'cut';\n }\n\n isClear() {\n return this.state === 'clear';\n }\n\n clear() {\n this.range = null;\n this.state = 'clear';\n }\n}\n","import { CellRange } from './cell_range';\n// operator: all|eq|neq|gt|gte|lt|lte|in|be\n// value:\n// in => []\n// be => [min, max]\nclass Filter {\n constructor(ci, operator, value) {\n this.ci = ci;\n this.operator = operator;\n this.value = value;\n }\n\n set(operator, value) {\n this.operator = operator;\n this.value = value;\n }\n\n includes(v) {\n const { operator, value } = this;\n if (operator === 'all') {\n return true;\n }\n if (operator === 'in') {\n return value.includes(v);\n }\n return false;\n }\n\n vlength() {\n const { operator, value } = this;\n if (operator === 'in') {\n return value.length;\n }\n return 0;\n }\n\n getData() {\n const { ci, operator, value } = this;\n return { ci, operator, value };\n }\n}\n\nclass Sort {\n constructor(ci, order) {\n this.ci = ci;\n this.order = order;\n }\n\n asc() {\n return this.order === 'asc';\n }\n\n desc() {\n return this.order === 'desc';\n }\n}\n\nexport default class AutoFilter {\n constructor() {\n this.ref = null;\n this.filters = [];\n this.sort = null;\n }\n\n setData({ ref, filters, sort }) {\n if (ref != null) {\n this.ref = ref;\n this.filters = filters.map(it => new Filter(it.ci, it.operator, it.value));\n if (sort) {\n this.sort = new Sort(sort.ci, sort.order);\n }\n }\n }\n\n getData() {\n if (this.active()) {\n const { ref, filters, sort } = this;\n return { ref, filters: filters.map(it => it.getData()), sort };\n }\n return {};\n }\n\n addFilter(ci, operator, value) {\n const filter = this.getFilter(ci);\n if (filter == null) {\n this.filters.push(new Filter(ci, operator, value));\n } else {\n filter.set(operator, value);\n }\n }\n\n setSort(ci, order) {\n this.sort = order ? new Sort(ci, order) : null;\n }\n\n includes(ri, ci) {\n if (this.active()) {\n return this.hrange().includes(ri, ci);\n }\n return false;\n }\n\n getSort(ci) {\n const { sort } = this;\n if (sort && sort.ci === ci) {\n return sort;\n }\n return null;\n }\n\n getFilter(ci) {\n const { filters } = this;\n for (let i = 0; i < filters.length; i += 1) {\n if (filters[i].ci === ci) {\n return filters[i];\n }\n }\n return null;\n }\n\n filteredRows(getCell) {\n // const ary = [];\n // let lastri = 0;\n const rset = new Set();\n const fset = new Set();\n if (this.active()) {\n const { sri, eri } = this.range();\n const { filters } = this;\n for (let ri = sri + 1; ri <= eri; ri += 1) {\n for (let i = 0; i < filters.length; i += 1) {\n const filter = filters[i];\n const cell = getCell(ri, filter.ci);\n const ctext = cell ? cell.text : '';\n if (!filter.includes(ctext)) {\n rset.add(ri);\n break;\n } else {\n fset.add(ri);\n }\n }\n }\n }\n return { rset, fset };\n }\n\n items(ci, getCell) {\n const m = {};\n if (this.active()) {\n const { sri, eri } = this.range();\n for (let ri = sri + 1; ri <= eri; ri += 1) {\n const cell = getCell(ri, ci);\n if (cell !== null && !/^\\s*$/.test(cell.text)) {\n const key = cell.text;\n const cnt = (m[key] || 0) + 1;\n m[key] = cnt;\n } else {\n m[''] = (m[''] || 0) + 1;\n }\n }\n }\n return m;\n }\n\n range() {\n return CellRange.valueOf(this.ref);\n }\n\n hrange() {\n const r = this.range();\n r.eri = r.sri;\n return r;\n }\n\n clear() {\n this.ref = null;\n this.filters = [];\n this.sort = null;\n }\n\n active() {\n return this.ref !== null;\n }\n}\n","import { CellRange } from './cell_range';\n\nclass Merges {\n constructor(d = []) {\n this._ = d;\n }\n\n forEach(cb) {\n this._.forEach(cb);\n }\n\n deleteWithin(cr) {\n this._ = this._.filter(it => !it.within(cr));\n }\n\n getFirstIncludes(ri, ci) {\n for (let i = 0; i < this._.length; i += 1) {\n const it = this._[i];\n if (it.includes(ri, ci)) {\n return it;\n }\n }\n return null;\n }\n\n filterIntersects(cellRange) {\n return new Merges(this._.filter(it => it.intersects(cellRange)));\n }\n\n intersects(cellRange) {\n for (let i = 0; i < this._.length; i += 1) {\n const it = this._[i];\n if (it.intersects(cellRange)) {\n // console.log('intersects');\n return true;\n }\n }\n return false;\n }\n\n union(cellRange) {\n let cr = cellRange;\n this._.forEach((it) => {\n if (it.intersects(cr)) {\n cr = it.union(cr);\n }\n });\n return cr;\n }\n\n add(cr) {\n this.deleteWithin(cr);\n this._.push(cr);\n }\n\n // type: row | column\n shift(type, index, n, cbWithin) {\n this._.forEach((cellRange) => {\n const {\n sri, sci, eri, eci,\n } = cellRange;\n const range = cellRange;\n if (type === 'row') {\n if (sri >= index) {\n range.sri += n;\n range.eri += n;\n } else if (sri < index && index <= eri) {\n range.eri += n;\n cbWithin(sri, sci, n, 0);\n }\n } else if (type === 'column') {\n if (sci >= index) {\n range.sci += n;\n range.eci += n;\n } else if (sci < index && index <= eci) {\n range.eci += n;\n cbWithin(sri, sci, 0, n);\n }\n }\n });\n }\n\n move(cellRange, rn, cn) {\n this._.forEach((it1) => {\n const it = it1;\n if (it.within(cellRange)) {\n it.eri += rn;\n it.sri += rn;\n it.sci += cn;\n it.eci += cn;\n }\n });\n }\n\n setData(merges) {\n this._ = merges.map(merge => CellRange.valueOf(merge));\n return this;\n }\n\n getData() {\n return this._.map(merge => merge.toString());\n }\n}\n\nexport default {};\nexport {\n Merges,\n};\n","/* eslint-disable no-param-reassign */\nfunction cloneDeep(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n\nconst mergeDeep = (object = {}, ...sources) => {\n sources.forEach((source) => {\n Object.keys(source).forEach((key) => {\n const v = source[key];\n // console.log('k:', key, ', v:', source[key], typeof v, v instanceof Object);\n if (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') {\n object[key] = v;\n } else if (typeof v !== 'function' && !Array.isArray(v) && v instanceof Object) {\n object[key] = object[key] || {};\n mergeDeep(object[key], v);\n } else {\n object[key] = v;\n }\n });\n });\n // console.log('::', object);\n return object;\n};\n\nfunction equals(obj1, obj2) {\n const keys = Object.keys(obj1);\n if (keys.length !== Object.keys(obj2).length) return false;\n for (let i = 0; i < keys.length; i += 1) {\n const k = keys[i];\n const v1 = obj1[k];\n const v2 = obj2[k];\n if (v2 === undefined) return false;\n if (typeof v1 === 'string' || typeof v1 === 'number' || typeof v1 === 'boolean') {\n if (v1 !== v2) return false;\n } else if (Array.isArray(v1)) {\n if (v1.length !== v2.length) return false;\n for (let ai = 0; ai < v1.length; ai += 1) {\n if (!equals(v1[ai], v2[ai])) return false;\n }\n } else if (typeof v1 !== 'function' && !Array.isArray(v1) && v1 instanceof Object) {\n if (!equals(v1, v2)) return false;\n }\n }\n return true;\n}\n\n/*\n objOrAry: obejct or Array\n cb: (value, index | key) => { return value }\n*/\nconst sum = (objOrAry, cb = value => value) => {\n let total = 0;\n let size = 0;\n Object.keys(objOrAry).forEach((key) => {\n total += cb(objOrAry[key], key);\n size += 1;\n });\n return [total, size];\n};\n\nfunction deleteProperty(obj, property) {\n const oldv = obj[`${property}`];\n delete obj[`${property}`];\n return oldv;\n}\n\nfunction rangeReduceIf(min, max, inits, initv, ifv, getv) {\n let s = inits;\n let v = initv;\n let i = min;\n for (; i < max; i += 1) {\n if (s > ifv) break;\n v = getv(i);\n s += v;\n }\n return [i, s - v, v];\n}\n\nfunction rangeSum(min, max, getv) {\n let s = 0;\n for (let i = min; i < max; i += 1) {\n s += getv(i);\n }\n return s;\n}\n\nfunction rangeEach(min, max, cb) {\n for (let i = min; i < max; i += 1) {\n cb(i);\n }\n}\n\nfunction arrayEquals(a1, a2) {\n if (a1.length === a2.length) {\n for (let i = 0; i < a1.length; i += 1) {\n if (a1[i] !== a2[i]) return false;\n }\n } else return false;\n return true;\n}\n\nfunction digits(a) {\n const v = `${a}`;\n let ret = 0;\n let flag = false;\n for (let i = 0; i < v.length; i += 1) {\n if (flag === true) ret += 1;\n if (v.charAt(i) === '.') flag = true;\n }\n return ret;\n}\n\nexport function numberCalc(type, a1, a2) {\n if (Number.isNaN(a1) || Number.isNaN(a2)) {\n return a1 + type + a2;\n }\n const al1 = digits(a1);\n const al2 = digits(a2);\n const num1 = Number(a1);\n const num2 = Number(a2);\n let ret = 0;\n if (type === '-') {\n ret = num1 - num2;\n } else if (type === '+') {\n ret = num1 + num2;\n } else if (type === '*') {\n ret = num1 * num2;\n } else if (type === '/') {\n ret = num1 / num2;\n if (digits(ret) > 5) return ret.toFixed(2);\n return ret;\n }\n return ret.toFixed(Math.max(al1, al2));\n}\n\nexport default {\n cloneDeep,\n merge: (...sources) => mergeDeep({}, ...sources),\n equals,\n arrayEquals,\n sum,\n rangeEach,\n rangeSum,\n rangeReduceIf,\n deleteProperty,\n numberCalc,\n};\n","import helper from './helper';\nimport { expr2expr } from './alphabet';\n\nclass Rows {\n constructor({ len, height }) {\n this._ = {};\n this.len = len;\n // default row height\n this.height = height;\n }\n\n getHeight(ri) {\n if (this.isHide(ri)) return 0;\n const row = this.get(ri);\n if (row && row.height) {\n return row.height;\n }\n return this.height;\n }\n\n setHeight(ri, v) {\n const row = this.getOrNew(ri);\n row.height = v;\n }\n\n unhide(idx) {\n let index = idx;\n while (index > 0) {\n index -= 1;\n if (this.isHide(index)) {\n this.setHide(index, false);\n } else break;\n }\n }\n\n isHide(ri) {\n const row = this.get(ri);\n return row && row.hide;\n }\n\n setHide(ri, v) {\n const row = this.getOrNew(ri);\n if (v === true) row.hide = true;\n else delete row.hide;\n }\n\n setStyle(ri, style) {\n const row = this.getOrNew(ri);\n row.style = style;\n }\n\n sumHeight(min, max, exceptSet) {\n return helper.rangeSum(min, max, (i) => {\n if (exceptSet && exceptSet.has(i)) return 0;\n return this.getHeight(i);\n });\n }\n\n totalHeight() {\n return this.sumHeight(0, this.len);\n }\n\n get(ri) {\n return this._[ri];\n }\n\n getOrNew(ri) {\n this._[ri] = this._[ri] || { cells: {} };\n return this._[ri];\n }\n\n getCell(ri, ci) {\n const row = this.get(ri);\n if (row !== undefined && row.cells !== undefined && row.cells[ci] !== undefined) {\n return row.cells[ci];\n }\n return null;\n }\n\n getCellMerge(ri, ci) {\n const cell = this.getCell(ri, ci);\n if (cell && cell.merge) return cell.merge;\n return [0, 0];\n }\n\n getCellOrNew(ri, ci) {\n const row = this.getOrNew(ri);\n row.cells[ci] = row.cells[ci] || {};\n return row.cells[ci];\n }\n\n // what: all | text | format\n setCell(ri, ci, cell, what = 'all') {\n const row = this.getOrNew(ri);\n if (what === 'all') {\n row.cells[ci] = cell;\n } else if (what === 'text') {\n row.cells[ci] = row.cells[ci] || {};\n row.cells[ci].text = cell.text;\n } else if (what === 'format') {\n row.cells[ci] = row.cells[ci] || {};\n row.cells[ci].style = cell.style;\n if (cell.merge) row.cells[ci].merge = cell.merge;\n }\n }\n\n setCellText(ri, ci, text) {\n const cell = this.getCellOrNew(ri, ci);\n if (cell.editable !== false) cell.text = text;\n }\n\n // what: all | format | text\n copyPaste(srcCellRange, dstCellRange, what, autofill = false, cb = () => {}) {\n const {\n sri, sci, eri, eci,\n } = srcCellRange;\n const dsri = dstCellRange.sri;\n const dsci = dstCellRange.sci;\n const deri = dstCellRange.eri;\n const deci = dstCellRange.eci;\n const [rn, cn] = srcCellRange.size();\n const [drn, dcn] = dstCellRange.size();\n // console.log(srcIndexes, dstIndexes);\n let isAdd = true;\n let dn = 0;\n if (deri < sri || deci < sci) {\n isAdd = false;\n if (deri < sri) dn = drn;\n else dn = dcn;\n }\n for (let i = sri; i <= eri; i += 1) {\n if (this._[i]) {\n for (let j = sci; j <= eci; j += 1) {\n if (this._[i].cells && this._[i].cells[j]) {\n for (let ii = dsri; ii <= deri; ii += rn) {\n for (let jj = dsci; jj <= deci; jj += cn) {\n const nri = ii + (i - sri);\n const nci = jj + (j - sci);\n const ncell = helper.cloneDeep(this._[i].cells[j]);\n // ncell.text\n if (autofill && ncell && ncell.text && ncell.text.length > 0) {\n const { text } = ncell;\n let n = (jj - dsci) + (ii - dsri) + 2;\n if (!isAdd) {\n n -= dn + 1;\n }\n if (text[0] === '=') {\n ncell.text = text.replace(/[a-zA-Z]{1,3}\\d+/g, (word) => {\n let [xn, yn] = [0, 0];\n if (sri === dsri) {\n xn = n - 1;\n // if (isAdd) xn -= 1;\n } else {\n yn = n - 1;\n }\n if (/^\\d+$/.test(word)) return word;\n return expr2expr(word, xn, yn);\n });\n } else if ((rn <= 1 && cn > 1 && (dsri > eri || deri < sri))\n || (cn <= 1 && rn > 1 && (dsci > eci || deci < sci))\n || (rn <= 1 && cn <= 1)) {\n const result = /[\\\\.\\d]+$/.exec(text);\n // console.log('result:', result);\n if (result !== null) {\n const index = Number(result[0]) + n - 1;\n ncell.text = text.substring(0, result.index) + index;\n }\n }\n }\n this.setCell(nri, nci, ncell, what);\n cb(nri, nci, ncell);\n }\n }\n }\n }\n }\n }\n }\n\n cutPaste(srcCellRange, dstCellRange) {\n const ncellmm = {};\n this.each((ri) => {\n this.eachCells(ri, (ci) => {\n let nri = parseInt(ri, 10);\n let nci = parseInt(ci, 10);\n if (srcCellRange.includes(ri, ci)) {\n nri = dstCellRange.sri + (nri - srcCellRange.sri);\n nci = dstCellRange.sci + (nci - srcCellRange.sci);\n }\n ncellmm[nri] = ncellmm[nri] || { cells: {} };\n ncellmm[nri].cells[nci] = this._[ri].cells[ci];\n });\n });\n this._ = ncellmm;\n }\n\n // src: Array>\n paste(src, dstCellRange) {\n if (src.length <= 0) return;\n const { sri, sci } = dstCellRange;\n src.forEach((row, i) => {\n const ri = sri + i;\n row.forEach((cell, j) => {\n const ci = sci + j;\n this.setCellText(ri, ci, cell);\n });\n });\n }\n\n insert(sri, n = 1) {\n const ndata = {};\n this.each((ri, row) => {\n let nri = parseInt(ri, 10);\n if (nri >= sri) {\n nri += n;\n this.eachCells(ri, (ci, cell) => {\n if (cell.text && cell.text[0] === '=') {\n cell.text = cell.text.replace(/[a-zA-Z]{1,3}\\d+/g, word => expr2expr(word, 0, n, (x, y) => y >= sri));\n }\n });\n }\n ndata[nri] = row;\n });\n this._ = ndata;\n this.len += n;\n }\n\n delete(sri, eri) {\n const n = eri - sri + 1;\n const ndata = {};\n this.each((ri, row) => {\n const nri = parseInt(ri, 10);\n if (nri < sri) {\n ndata[nri] = row;\n } else if (ri > eri) {\n ndata[nri - n] = row;\n this.eachCells(ri, (ci, cell) => {\n if (cell.text && cell.text[0] === '=') {\n cell.text = cell.text.replace(/[a-zA-Z]{1,3}\\d+/g, word => expr2expr(word, 0, -n, (x, y) => y > eri));\n }\n });\n }\n });\n this._ = ndata;\n this.len -= n;\n }\n\n insertColumn(sci, n = 1) {\n this.each((ri, row) => {\n const rndata = {};\n this.eachCells(ri, (ci, cell) => {\n let nci = parseInt(ci, 10);\n if (nci >= sci) {\n nci += n;\n if (cell.text && cell.text[0] === '=') {\n cell.text = cell.text.replace(/[a-zA-Z]{1,3}\\d+/g, word => expr2expr(word, n, 0, x => x >= sci));\n }\n }\n rndata[nci] = cell;\n });\n row.cells = rndata;\n });\n }\n\n deleteColumn(sci, eci) {\n const n = eci - sci + 1;\n this.each((ri, row) => {\n const rndata = {};\n this.eachCells(ri, (ci, cell) => {\n const nci = parseInt(ci, 10);\n if (nci < sci) {\n rndata[nci] = cell;\n } else if (nci > eci) {\n rndata[nci - n] = cell;\n if (cell.text && cell.text[0] === '=') {\n cell.text = cell.text.replace(/[a-zA-Z]{1,3}\\d+/g, word => expr2expr(word, -n, 0, x => x > eci));\n }\n }\n });\n row.cells = rndata;\n });\n }\n\n // what: all | text | format | merge\n deleteCells(cellRange, what = 'all') {\n cellRange.each((i, j) => {\n this.deleteCell(i, j, what);\n });\n }\n\n // what: all | text | format | merge\n deleteCell(ri, ci, what = 'all') {\n const row = this.get(ri);\n if (row !== null) {\n const cell = this.getCell(ri, ci);\n if (cell !== null && cell.editable !== false) {\n if (what === 'all') {\n delete row.cells[ci];\n } else if (what === 'text') {\n if (cell.text) delete cell.text;\n if (cell.value) delete cell.value;\n } else if (what === 'format') {\n if (cell.style !== undefined) delete cell.style;\n if (cell.merge) delete cell.merge;\n } else if (what === 'merge') {\n if (cell.merge) delete cell.merge;\n }\n }\n }\n }\n\n maxCell() {\n const keys = Object.keys(this._);\n const ri = keys[keys.length - 1];\n const col = this._[ri];\n if (col) {\n const { cells } = col;\n const ks = Object.keys(cells);\n const ci = ks[ks.length - 1];\n return [parseInt(ri, 10), parseInt(ci, 10)];\n }\n return [0, 0];\n }\n\n each(cb) {\n Object.entries(this._).forEach(([ri, row]) => {\n cb(ri, row);\n });\n }\n\n eachCells(ri, cb) {\n if (this._[ri] && this._[ri].cells) {\n Object.entries(this._[ri].cells).forEach(([ci, cell]) => {\n cb(ci, cell);\n });\n }\n }\n\n setData(d) {\n if (d.len) {\n this.len = d.len;\n delete d.len;\n }\n this._ = d;\n }\n\n getData() {\n const { len } = this;\n return Object.assign({ len }, this._);\n }\n}\n\nexport default {};\nexport {\n Rows,\n};\n","import helper from './helper';\n\nclass Cols {\n constructor({\n len, width, indexWidth, minWidth,\n }) {\n this._ = {};\n this.len = len;\n this.width = width;\n this.indexWidth = indexWidth;\n this.minWidth = minWidth;\n }\n\n setData(d) {\n if (d.len) {\n this.len = d.len;\n delete d.len;\n }\n this._ = d;\n }\n\n getData() {\n const { len } = this;\n return Object.assign({ len }, this._);\n }\n\n getWidth(i) {\n if (this.isHide(i)) return 0;\n const col = this._[i];\n if (col && col.width) {\n return col.width;\n }\n return this.width;\n }\n\n getOrNew(ci) {\n this._[ci] = this._[ci] || {};\n return this._[ci];\n }\n\n setWidth(ci, width) {\n const col = this.getOrNew(ci);\n col.width = width;\n }\n\n unhide(idx) {\n let index = idx;\n while (index > 0) {\n index -= 1;\n if (this.isHide(index)) {\n this.setHide(index, false);\n } else break;\n }\n }\n\n isHide(ci) {\n const col = this._[ci];\n return col && col.hide;\n }\n\n setHide(ci, v) {\n const col = this.getOrNew(ci);\n if (v === true) col.hide = true;\n else delete col.hide;\n }\n\n setStyle(ci, style) {\n const col = this.getOrNew(ci);\n col.style = style;\n }\n\n sumWidth(min, max) {\n return helper.rangeSum(min, max, i => this.getWidth(i));\n }\n\n totalWidth() {\n return this.sumWidth(0, this.len);\n }\n}\n\nexport default {};\nexport {\n Cols,\n};\n","/* global window */\nimport en from './en';\n\n// Defines the fallback language as English\nlet $languages = ['en'];\nconst $messages = {\n en,\n};\n\nfunction translate(key, messages) {\n if (messages) {\n // Return the translation from the first language in the languages array\n // that has a value for the provided key.\n for (const lang of $languages) {\n if (!messages[lang]) break;\n\n let message = messages[lang];\n\n // Splits the key at '.' except where escaped as '\\.'\n const keys = key.match(/(?:\\\\.|[^.])+/g);\n\n for (let i = 0; i < keys.length; i += 1) {\n const property = keys[i];\n const value = message[property];\n\n // If value doesn't exist, try next language\n if (!value) break;\n\n if (i === keys.length - 1) return value;\n\n // Move down to the next level of the messages object\n message = value;\n }\n }\n }\n\n return undefined;\n}\n\nfunction t(key) {\n let v = translate(key, $messages);\n if (!v && window && window.x_spreadsheet && window.x_spreadsheet.$messages) {\n v = translate(key, window.x_spreadsheet.$messages);\n }\n return v || '';\n}\n\nfunction tf(key) {\n return () => t(key);\n}\n\n// If clearLangList is set to false, lang will be added to the front of the\n// languages array. The languages in the language array are searched in order\n// to find a translation. This allows the use of other languages as a fallback\n// if lang is missing some keys. The language array is preloaded with English.\n// To set the languages array to only include lang, set clearLangList to true.\nfunction locale(lang, message, clearLangList = false) {\n if (clearLangList) {\n $languages = [lang];\n } else {\n // Append to front of array.\n // Translation method will use the first language in the list that has a\n // matching key.\n $languages.unshift(lang);\n }\n\n if (message) {\n $messages[lang] = message;\n }\n}\n\nexport default {\n t,\n};\n\nexport {\n locale,\n t,\n tf,\n};\n","export default {\n toolbar: {\n undo: 'Undo',\n redo: 'Redo',\n print: 'Print',\n paintformat: 'Paint format',\n clearformat: 'Clear format',\n format: 'Format',\n fontName: 'Font',\n fontSize: 'Font size',\n fontBold: 'Font bold',\n fontItalic: 'Font italic',\n underline: 'Underline',\n strike: 'Strike',\n color: 'Text color',\n bgcolor: 'Fill color',\n border: 'Borders',\n merge: 'Merge cells',\n align: 'Horizontal align',\n valign: 'Vertical align',\n textwrap: 'Text wrapping',\n freeze: 'Freeze cell',\n autofilter: 'Filter',\n formula: 'Functions',\n more: 'More',\n },\n contextmenu: {\n copy: 'Copy',\n cut: 'Cut',\n paste: 'Paste',\n pasteValue: 'Paste values only',\n pasteFormat: 'Paste format only',\n hide: 'Hide',\n insertRow: 'Insert row',\n insertColumn: 'Insert column',\n deleteSheet: 'Delete',\n deleteRow: 'Delete row',\n deleteColumn: 'Delete column',\n deleteCell: 'Delete cell',\n deleteCellText: 'Delete cell text',\n validation: 'Data validations',\n cellprintable: 'Enable export',\n cellnonprintable: 'Disable export',\n celleditable: 'Enable editing',\n cellnoneditable: 'Disable editing',\n },\n print: {\n size: 'Paper size',\n orientation: 'Page orientation',\n orientations: ['Landscape', 'Portrait'],\n },\n format: {\n normal: 'Normal',\n text: 'Plain Text',\n number: 'Number',\n percent: 'Percent',\n rmb: 'RMB',\n usd: 'USD',\n eur: 'EUR',\n date: 'Date',\n time: 'Time',\n datetime: 'Date time',\n duration: 'Duration',\n },\n formula: {\n sum: 'Sum',\n average: 'Average',\n max: 'Max',\n min: 'Min',\n _if: 'IF',\n and: 'AND',\n or: 'OR',\n concat: 'Concat',\n },\n validation: {\n required: 'it must be required',\n notMatch: 'it not match its validation rule',\n between: 'it is between {} and {}',\n notBetween: 'it is not between {} and {}',\n notIn: 'it is not in list',\n equal: 'it equal to {}',\n notEqual: 'it not equal to {}',\n lessThan: 'it less than {}',\n lessThanEqual: 'it less than or equal to {}',\n greaterThan: 'it greater than {}',\n greaterThanEqual: 'it greater than or equal to {}',\n },\n error: {\n pasteForMergedCell: 'Unable to do this for merged cells',\n },\n calendar: {\n weeks: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n },\n button: {\n next: 'Next',\n cancel: 'Cancel',\n remove: 'Remove',\n save: 'Save',\n ok: 'OK',\n },\n sort: {\n desc: 'Sort Z -> A',\n asc: 'Sort A -> Z',\n },\n filter: {\n empty: 'empty',\n },\n dataValidation: {\n mode: 'Mode',\n range: 'Cell Range',\n criteria: 'Criteria',\n modeType: {\n cell: 'Cell',\n column: 'Colun',\n row: 'Row',\n },\n type: {\n list: 'List',\n number: 'Number',\n date: 'Date',\n phone: 'Phone',\n email: 'Email',\n },\n operator: {\n be: 'between',\n nbe: 'not betwwen',\n lt: 'less than',\n lte: 'less than or equal to',\n gt: 'greater than',\n gte: 'greater than or equal to',\n eq: 'equal to',\n neq: 'not equal to',\n },\n },\n};\n","import { t } from '../locale/locale';\nimport helper from './helper';\n\nconst rules = {\n phone: /^[1-9]\\d{10}$/,\n email: /w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/,\n};\n\nfunction returnMessage(flag, key, ...arg) {\n let message = '';\n if (!flag) {\n message = t(`validation.${key}`, ...arg);\n }\n return [flag, message];\n}\n\nexport default class Validator {\n // operator: b|nb|eq|neq|lt|lte|gt|gte\n // type: date|number|list|phone|email\n constructor(type, required, value, operator) {\n this.required = required;\n this.value = value;\n this.type = type;\n this.operator = operator;\n this.message = '';\n }\n\n parseValue(v) {\n const { type } = this;\n if (type === 'date') {\n return new Date(v);\n }\n if (type === 'number') {\n return Number(v);\n }\n return v;\n }\n\n equals(other) {\n let flag = this.type === other.type\n && this.required === other.required\n && this.operator === other.operator;\n if (flag) {\n if (Array.isArray(this.value)) {\n flag = helper.arrayEquals(this.value, other.value);\n } else {\n flag = this.value === other.value;\n }\n }\n return flag;\n }\n\n values() {\n return this.value.split(',');\n }\n\n validate(v) {\n const {\n required, operator, value, type,\n } = this;\n if (required && /^\\s*$/.test(v)) {\n return returnMessage(false, 'required');\n }\n if (/^\\s*$/.test(v)) return [true];\n if (rules[type] && !rules[type].test(v)) {\n return returnMessage(false, 'notMatch');\n }\n if (type === 'list') {\n return returnMessage(this.values().includes(v), 'notIn');\n }\n if (operator) {\n const v1 = this.parseValue(v);\n if (operator === 'be') {\n const [min, max] = value;\n return returnMessage(\n v1 >= this.parseValue(min) && v1 <= this.parseValue(max),\n 'between',\n min,\n max,\n );\n }\n if (operator === 'nbe') {\n const [min, max] = value;\n return returnMessage(\n v1 < this.parseValue(min) || v1 > this.parseValue(max),\n 'notBetween',\n min,\n max,\n );\n }\n if (operator === 'eq') {\n return returnMessage(\n v1 === this.parseValue(value),\n 'equal',\n value,\n );\n }\n if (operator === 'neq') {\n return returnMessage(\n v1 !== this.parseValue(value),\n 'notEqual',\n value,\n );\n }\n if (operator === 'lt') {\n return returnMessage(\n v1 < this.parseValue(value),\n 'lessThan',\n value,\n );\n }\n if (operator === 'lte') {\n return returnMessage(\n v1 <= this.parseValue(value),\n 'lessThanEqual',\n value,\n );\n }\n if (operator === 'gt') {\n return returnMessage(\n v1 > this.parseValue(value),\n 'greaterThan',\n value,\n );\n }\n if (operator === 'gte') {\n return returnMessage(\n v1 >= this.parseValue(value),\n 'greaterThanEqual',\n value,\n );\n }\n }\n return [true];\n }\n}\n","import Validator from './validator';\nimport { CellRange } from './cell_range';\n\nclass Validation {\n constructor(mode, refs, validator) {\n this.refs = refs;\n this.mode = mode; // cell\n this.validator = validator;\n }\n\n includes(ri, ci) {\n const { refs } = this;\n for (let i = 0; i < refs.length; i += 1) {\n const cr = CellRange.valueOf(refs[i]);\n if (cr.includes(ri, ci)) return true;\n }\n return false;\n }\n\n addRef(ref) {\n this.remove(CellRange.valueOf(ref));\n this.refs.push(ref);\n }\n\n remove(cellRange) {\n const nrefs = [];\n this.refs.forEach((it) => {\n const cr = CellRange.valueOf(it);\n if (cr.intersects(cellRange)) {\n const crs = cr.difference(cellRange);\n crs.forEach(it1 => nrefs.push(it1.toString()));\n } else {\n nrefs.push(it);\n }\n });\n this.refs = nrefs;\n }\n\n getData() {\n const { refs, mode, validator } = this;\n const {\n type, required, operator, value,\n } = validator;\n return {\n refs, mode, type, required, operator, value,\n };\n }\n\n static valueOf({\n refs, mode, type, required, operator, value,\n }) {\n return new Validation(mode, refs, new Validator(type, required, value, operator));\n }\n}\nclass Validations {\n constructor() {\n this._ = [];\n // ri_ci: errMessage\n this.errors = new Map();\n }\n\n getError(ri, ci) {\n return this.errors.get(`${ri}_${ci}`);\n }\n\n validate(ri, ci, text) {\n const v = this.get(ri, ci);\n const key = `${ri}_${ci}`;\n const { errors } = this;\n if (v !== null) {\n const [flag, message] = v.validator.validate(text);\n if (!flag) {\n errors.set(key, message);\n } else {\n errors.delete(key);\n }\n } else {\n errors.delete(key);\n }\n return true;\n }\n\n // type: date|number|phone|email|list\n // validator: { required, value, operator }\n add(mode, ref, {\n type, required, value, operator,\n }) {\n const validator = new Validator(\n type, required, value, operator,\n );\n const v = this.getByValidator(validator);\n if (v !== null) {\n v.addRef(ref);\n } else {\n this._.push(new Validation(mode, [ref], validator));\n }\n }\n\n getByValidator(validator) {\n for (let i = 0; i < this._.length; i += 1) {\n const v = this._[i];\n if (v.validator.equals(validator)) {\n return v;\n }\n }\n return null;\n }\n\n get(ri, ci) {\n for (let i = 0; i < this._.length; i += 1) {\n const v = this._[i];\n if (v.includes(ri, ci)) return v;\n }\n return null;\n }\n\n remove(cellRange) {\n this.each((it) => {\n it.remove(cellRange);\n });\n }\n\n each(cb) {\n this._.forEach(it => cb(it));\n }\n\n getData() {\n return this._.filter(it => it.refs.length > 0).map(it => it.getData());\n }\n\n setData(d) {\n this._ = d.map(it => Validation.valueOf(it));\n }\n}\n\nexport default {};\nexport {\n Validations,\n};\n","/* global document */\n\nimport Selector from './selector';\nimport Scroll from './scroll';\nimport History from './history';\nimport Clipboard from './clipboard';\nimport AutoFilter from './auto_filter';\nimport { Merges } from './merge';\nimport helper from './helper';\nimport { Rows } from './row';\nimport { Cols } from './col';\nimport { Validations } from './validation';\nimport { CellRange } from './cell_range';\nimport { expr2xy, xy2expr } from './alphabet';\nimport { t } from '../locale/locale';\n\n// private methods\n/*\n * {\n * name: ''\n * freeze: [0, 0],\n * formats: [],\n * styles: [\n * {\n * bgcolor: '',\n * align: '',\n * valign: '',\n * textwrap: false,\n * strike: false,\n * underline: false,\n * color: '',\n * format: 1,\n * border: {\n * left: [style, color],\n * right: [style, color],\n * top: [style, color],\n * bottom: [style, color],\n * },\n * font: {\n * name: 'Helvetica',\n * size: 10,\n * bold: false,\n * italic: false,\n * }\n * }\n * ],\n * merges: [\n * 'A1:F11',\n * ...\n * ],\n * rows: {\n * 1: {\n * height: 50,\n * style: 1,\n * cells: {\n * 1: {\n * style: 2,\n * type: 'string',\n * text: '',\n * value: '', // cal result\n * }\n * }\n * },\n * ...\n * },\n * cols: {\n * 2: { width: 100, style: 1 }\n * }\n * }\n */\nconst defaultSettings = {\n mode: 'edit', // edit | read\n view: {\n height: () => document.documentElement.clientHeight,\n width: () => document.documentElement.clientWidth,\n },\n showGrid: true,\n showToolbar: true,\n showContextmenu: true,\n showBottomBar: true,\n row: {\n len: 100,\n height: 25,\n },\n col: {\n len: 26,\n width: 100,\n indexWidth: 60,\n minWidth: 60,\n },\n style: {\n bgcolor: '#ffffff',\n align: 'left',\n valign: 'middle',\n textwrap: false,\n strike: false,\n underline: false,\n color: '#0a0a0a',\n font: {\n name: 'Arial',\n size: 10,\n bold: false,\n italic: false,\n },\n format: 'normal',\n },\n};\n\nconst toolbarHeight = 41;\nconst bottombarHeight = 41;\n\n\n// Utility functions\nconst hasOwnProperty = (obj, name) => Object.prototype.hasOwnProperty.call(obj, name);\n\n\n// src: cellRange\n// dst: cellRange\nfunction canPaste(src, dst, error = () => {}) {\n const { merges } = this;\n const cellRange = dst.clone();\n const [srn, scn] = src.size();\n const [drn, dcn] = dst.size();\n if (srn > drn) {\n cellRange.eri = dst.sri + srn - 1;\n }\n if (scn > dcn) {\n cellRange.eci = dst.sci + scn - 1;\n }\n if (merges.intersects(cellRange)) {\n error(t('error.pasteForMergedCell'));\n return false;\n }\n return true;\n}\nfunction copyPaste(srcCellRange, dstCellRange, what, autofill = false) {\n const { rows, merges } = this;\n // delete dest merge\n if (what === 'all' || what === 'format') {\n rows.deleteCells(dstCellRange, what);\n merges.deleteWithin(dstCellRange);\n }\n rows.copyPaste(srcCellRange, dstCellRange, what, autofill, (ri, ci, cell) => {\n if (cell && cell.merge) {\n // console.log('cell:', ri, ci, cell);\n const [rn, cn] = cell.merge;\n if (rn <= 0 && cn <= 0) return;\n merges.add(new CellRange(ri, ci, ri + rn, ci + cn));\n }\n });\n}\n\nfunction cutPaste(srcCellRange, dstCellRange) {\n const { clipboard, rows, merges } = this;\n rows.cutPaste(srcCellRange, dstCellRange);\n merges.move(srcCellRange,\n dstCellRange.sri - srcCellRange.sri,\n dstCellRange.sci - srcCellRange.sci);\n clipboard.clear();\n}\n\n// bss: { top, bottom, left, right }\nfunction setStyleBorder(ri, ci, bss) {\n const { styles, rows } = this;\n const cell = rows.getCellOrNew(ri, ci);\n let cstyle = {};\n if (cell.style !== undefined) {\n cstyle = helper.cloneDeep(styles[cell.style]);\n }\n cstyle = helper.merge(cstyle, { border: bss });\n cell.style = this.addStyle(cstyle);\n}\n\nfunction setStyleBorders({ mode, style, color }) {\n const { styles, selector, rows } = this;\n const {\n sri, sci, eri, eci,\n } = selector.range;\n const multiple = !this.isSingleSelected();\n if (!multiple) {\n if (mode === 'inside' || mode === 'horizontal' || mode === 'vertical') {\n return;\n }\n }\n if (mode === 'outside' && !multiple) {\n setStyleBorder.call(this, sri, sci, {\n top: [style, color], bottom: [style, color], left: [style, color], right: [style, color],\n });\n } else if (mode === 'none') {\n selector.range.each((ri, ci) => {\n const cell = rows.getCell(ri, ci);\n if (cell && cell.style !== undefined) {\n const ns = helper.cloneDeep(styles[cell.style]);\n delete ns.border;\n // ['bottom', 'top', 'left', 'right'].forEach((prop) => {\n // if (ns[prop]) delete ns[prop];\n // });\n cell.style = this.addStyle(ns);\n }\n });\n } else if (mode === 'all' || mode === 'inside' || mode === 'outside'\n || mode === 'horizontal' || mode === 'vertical') {\n const merges = [];\n for (let ri = sri; ri <= eri; ri += 1) {\n for (let ci = sci; ci <= eci; ci += 1) {\n // jump merges -- start\n const mergeIndexes = [];\n for (let ii = 0; ii < merges.length; ii += 1) {\n const [mri, mci, rn, cn] = merges[ii];\n if (ri === mri + rn + 1) mergeIndexes.push(ii);\n if (mri <= ri && ri <= mri + rn) {\n if (ci === mci) {\n ci += cn + 1;\n break;\n }\n }\n }\n mergeIndexes.forEach(it => merges.splice(it, 1));\n if (ci > eci) break;\n // jump merges -- end\n const cell = rows.getCell(ri, ci);\n let [rn, cn] = [0, 0];\n if (cell && cell.merge) {\n [rn, cn] = cell.merge;\n merges.push([ri, ci, rn, cn]);\n }\n const mrl = rn > 0 && ri + rn === eri;\n const mcl = cn > 0 && ci + cn === eci;\n let bss = {};\n if (mode === 'all') {\n bss = {\n bottom: [style, color],\n top: [style, color],\n left: [style, color],\n right: [style, color],\n };\n } else if (mode === 'inside') {\n if (!mcl && ci < eci) bss.right = [style, color];\n if (!mrl && ri < eri) bss.bottom = [style, color];\n } else if (mode === 'horizontal') {\n if (!mrl && ri < eri) bss.bottom = [style, color];\n } else if (mode === 'vertical') {\n if (!mcl && ci < eci) bss.right = [style, color];\n } else if (mode === 'outside' && multiple) {\n if (sri === ri) bss.top = [style, color];\n if (mrl || eri === ri) bss.bottom = [style, color];\n if (sci === ci) bss.left = [style, color];\n if (mcl || eci === ci) bss.right = [style, color];\n }\n if (Object.keys(bss).length > 0) {\n setStyleBorder.call(this, ri, ci, bss);\n }\n ci += cn;\n }\n }\n } else if (mode === 'top' || mode === 'bottom') {\n for (let ci = sci; ci <= eci; ci += 1) {\n if (mode === 'top') {\n setStyleBorder.call(this, sri, ci, { top: [style, color] });\n ci += rows.getCellMerge(sri, ci)[1];\n }\n if (mode === 'bottom') {\n setStyleBorder.call(this, eri, ci, { bottom: [style, color] });\n ci += rows.getCellMerge(eri, ci)[1];\n }\n }\n } else if (mode === 'left' || mode === 'right') {\n for (let ri = sri; ri <= eri; ri += 1) {\n if (mode === 'left') {\n setStyleBorder.call(this, ri, sci, { left: [style, color] });\n ri += rows.getCellMerge(ri, sci)[0];\n }\n if (mode === 'right') {\n setStyleBorder.call(this, ri, eci, { right: [style, color] });\n ri += rows.getCellMerge(ri, eci)[0];\n }\n }\n }\n}\n\nfunction getCellRowByY(y, scrollOffsety) {\n const { rows } = this;\n const fsh = this.freezeTotalHeight();\n // console.log('y:', y, ', fsh:', fsh);\n let inits = rows.height;\n if (fsh + rows.height < y) inits -= scrollOffsety;\n\n // handle ri in autofilter\n const frset = this.exceptRowSet;\n\n let ri = 0;\n let top = inits;\n let { height } = rows;\n for (; ri < rows.len; ri += 1) {\n if (top > y) break;\n if (!frset.has(ri)) {\n height = rows.getHeight(ri);\n top += height;\n }\n }\n top -= height;\n // console.log('ri:', ri, ', top:', top, ', height:', height);\n\n if (top <= 0) {\n return { ri: -1, top: 0, height };\n }\n\n return { ri: ri - 1, top, height };\n}\n\nfunction getCellColByX(x, scrollOffsetx) {\n const { cols } = this;\n const fsw = this.freezeTotalWidth();\n let inits = cols.indexWidth;\n if (fsw + cols.indexWidth < x) inits -= scrollOffsetx;\n const [ci, left, width] = helper.rangeReduceIf(\n 0,\n cols.len,\n inits,\n cols.indexWidth,\n x,\n i => cols.getWidth(i),\n );\n if (left <= 0) {\n return { ci: -1, left: 0, width: cols.indexWidth };\n }\n return { ci: ci - 1, left, width };\n}\n\nexport default class DataProxy {\n constructor(name, settings) {\n this.settings = helper.merge(defaultSettings, settings || {});\n // save data begin\n this.name = name || 'sheet';\n this.freeze = [0, 0];\n this.styles = []; // Array