handsontable 13.1.0-next-f35a363-20230828 → 13.1.0-next-ea584ca-20230830

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,11 +25,11 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 13.1.0-next-f35a363-20230828
29
- * Release date: 31/08/2023 (built at 28/08/2023 09:46:15)
28
+ * Version: 13.1.0-next-ea584ca-20230830
29
+ * Release date: 31/08/2023 (built at 30/08/2023 14:29:38)
30
30
  */
31
31
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):e.Handsontable=t(e.DOMPurify,e.Pikaday,e.moment,e.numbro)}("undefined"!=typeof self?self:this,((e,t,o,s)=>(()=>{var n={54150:()=>{},54894:(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let r,i=0,l=0;for(;e.length>0&&r!==e.length;)if(r=e.length,e.match(n))e=e.replace(n,""),i+=1,t[l][i]="";else if(e.match(o))e=e.replace(o,""),i=0,l+=1,t[l]=[""];else{let o="";if(e.startsWith('"')){let t=0,s=!0;for(;s;){const n=e.slice(0,1);'"'===n&&(t+=1),o+=n,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(s=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(s);o=t?t[0]:"",e=e.slice(o.length)}t[l][i]=o}return t},t.stringify=function(e){let t,o,s,n,r,i="";for(t=0,o=e.length;t<o;t+=1){for(n=e[t].length,s=0;s<n;s+=1)s>0&&(i+="\t"),r=e[t][s],"string"==typeof r?r.indexOf("\n")>-1?i+=`"${r.replace(/"/g,'""')}"`:i+=r:i+=null==r?"":r;t!==o-1&&(i+="\n")}return i};const o=/^(\r\n|\n\r|\r|\n)/,s=/^[^\t\r\n]+/,n=/^\t/},29270:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54894);t.parse=s.parse,t.stringify=s.stringify},13698:(e,t)=>{"use strict";t.__esModule=!0,t.autoResize=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},o=document.body,s=document.createTextNode(""),n=document.createElement("SPAN"),r=function(e,t,o){e.addEventListener(t,o,!1)},i=function(e,t,o){e.removeEventListener(t,o,!1)},l=function(r){var i,l;r?/^[a-zA-Z \.,\\\/\|0-9]$/.test(r)||(r="."):r="",void 0!==s.textContent?s.textContent=e.value+r:s.data=e.value+r,n.style.position="absolute",n.style.fontSize=d(e).fontSize,n.style.fontFamily=d(e).fontFamily,n.style.whiteSpace="pre",o.appendChild(n),i=n.clientWidth+2,o.removeChild(n),e.style.height=t.minHeight+"px",t.minWidth>i?e.style.width=t.minWidth+"px":i>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=i+"px",l=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>l?e.style.height=t.minHeight+"px":t.maxHeight<l?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=l+"px"},a=function(){window.setTimeout(l,0)},h=function(o,i,h){e=o,function(o){if(o&&o.minHeight)if("inherit"==o.minHeight)t.minHeight=e.clientHeight;else{var r=parseInt(o.minHeight);isNaN(r)||(t.minHeight=r)}if(o&&o.maxHeight)if("inherit"==o.maxHeight)t.maxHeight=e.clientHeight;else{var i=parseInt(o.maxHeight);isNaN(i)||(t.maxHeight=i)}if(o&&o.minWidth)if("inherit"==o.minWidth)t.minWidth=e.clientWidth;else{var l=parseInt(o.minWidth);isNaN(l)||(t.minWidth=l)}if(o&&o.maxWidth)if("inherit"==o.maxWidth)t.maxWidth=e.clientWidth;else{var a=parseInt(o.maxWidth);isNaN(a)||(t.maxWidth=a)}n.firstChild||(n.className="autoResize",n.style.display="inline-block",n.appendChild(s))}(i),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),h&&(r(e,"change",l),r(e,"cut",a),r(e,"paste",a),r(e,"drop",a),r(e,"keydown",a),r(e,"focus",l),r(e,"compositionstart",a),r(e,"compositionupdate",a),r(e,"compositionend",a)),l()};function d(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,o){h(e,t,o)},unObserve:function(){i(e,"change",l),i(e,"cut",a),i(e,"paste",a),i(e,"drop",a),i(e,"keydown",a),i(e,"focus",l),i(e,"compositionstart",a),i(e,"compositionupdate",a),i(e,"compositionend",a)},resize:l}}},95881:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13698);t.autoResize=s.autoResize},18959:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(24449),r=o(22232),i=o(37595);var l=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle={width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,n.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,r=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(n){var i;((i=n).clientY<Math.floor(r.top)||i.clientY>Math.ceil(r.top+r.height)||i.clientX<Math.floor(r.left)||i.clientX>Math.ceil(r.left+r.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let n=0;n<5;n++){const r=o[n],i=t.createElement("div");i.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),s=i.style,s.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,s.height=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,s.width=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,this.main.appendChild(i)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,i.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:n}=this.wot;let r=n.bordersHolder;r||(r=t.createElement("div"),r.className="htBorders",n.bordersHolder=r,n.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,r.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,r.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selections.createOrGetArea();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,n,r){const i=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:d}=this.selectionHandles.styles,c=parseInt(l.borderWidth,10),u=parseInt(l.width,10),g=parseInt(a.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();l.top=`${parseInt(o-u-1,10)}px`,l[i]=`${parseInt(s-u-1,10)}px`,a.top=`${parseInt(o-g/4*3,10)}px`,a[i]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+n,10),f-u-2*c),C=Math.min(parseInt(s+n-g/4,10),f-g-2*c);h[i]=`${m}px`,d[i]=`${C}px`;const w=Math.min(parseInt(o+r,10),p-u-2*c),y=Math.min(parseInt(o+r-g/4,10),p-g-2*c);h.top=`${w}px`,d.top=`${y}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",d.display="none"):(h.display="block",d.display="block")):(l.display="none",h.display="none",a.display="none",d.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:n}=this.wot;let r,l,a,h,d,c;const u=t.getRenderedRowsCount();for(let o=0;o<u;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){r=s,d=e[0];break}}for(let o=u-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){l=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){a=s,c=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===r||void 0===a)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(r,a));const p=r!==l||a!==h,m=p?t.getCell(this.wot.createCellCoords(l,h)):f,C=(0,s.offset)(f),w=p?(0,s.offset)(m):C,y=(0,s.offset)(t.TABLE),v=(0,s.outerWidth)(t.TABLE),E=C.top,S=C.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,T=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-y.left-v;T=S+e-w.left,b=n.innerWidth-S-e-t-1}else T=w.left+(0,s.outerWidth)(m)-S,b=S-y.left-1;if(this.isEntireColumnSelected(r,l)){const e=this.getDimensionsFromHeader("columns",a,h,d,y);let t=null;e&&([t,b,T]=e),t&&(f=t)}let _=E-y.top-1,O=w.top+(0,s.outerHeight)(m)-E;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",r,l,c,y);let t=null;e&&([t,_,O]=e),t&&(f=t)}const M=(0,s.getComputedStyle)(f,n);parseInt(M.borderTopWidth,10)>0&&(_+=1,O=O>0?O-1:0),parseInt(M[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,T=T>0?T-1:0);const I=R?"right":"left";this.topStyle.top=`${_}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${T}px`,this.topStyle.display="block",this.startStyle.top=`${_}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${O}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=_+O-N+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${T}px`,this.bottomStyle.display="block",this.endStyle.top=`${_}px`,this.endStyle[I]=b+T-N+"px",this.endStyle.height=`${O+1}px`,this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"==typeof A?A(this.settings.layerLevel):A;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[x,D]=[l,h];if(P&&Array.isArray(P)&&([,,x,D]=P),(0,i.isMobileBrowser)()||!A||this.isPartRange(x,D))this.cornerStyle.display="none";else{this.cornerStyle.top=_+O+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+T+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const r=e===n;r&&(e=o.documentElement);const i=parseInt(this.cornerDefaultStyle.width,10)/2,a=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=r?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,n=0;R?(n=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=n<0):(n=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=n>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+T+this.cornerCenterPointOffset-i)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(l===this.wot.getSetting("totalRows")-1){(r?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(_+O+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(l,h,_,b,T,O)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,n,r){const{wtTable:i}=this.wot,l=i.wtRootElement.parentNode;let a=null,h=null,d=null,c=null,u=null,g=null,f=null,p=null;switch(e){case"rows":a=function(){return i.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},d="ht__selection--rows",g="top";break;case"columns":a=function(){return i.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},d="ht__selection--columns",g="left"}if(l.classList.contains(d)){const e=this.wot.getSetting("columnHeaders").length;if(f=a(t,e-n),p=a(o,e-n),!f||!p)return!1;const i=(0,s.offset)(f),l=(0,s.offset)(p);return f&&p&&(c=i[g]-r[g]-1,u=l[g]+h(p)-i[g]),[f,c,u]}return!1}changeBorderStyle(e,t){const o=this[e].style,n=t[e];!n||n.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=n.color,"top"!==e&&"bottom"!==e||(o.height=`${n.width}px`),"start"!==e&&"end"!==e||(o.width=`${n.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,i.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}};t.default=l},17137:(e,t)=>{"use strict";t.__esModule=!0;t.RENDER_TYPE=1;t.FULLY_VISIBLE_TYPE=2;t.PARTIALLY_VISIBLE_TYPE=3},46003:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},r=s(o(65658));t.ViewportColumnsCalculator=r.default;var i=s(o(36107));t.ViewportRowsCalculator=i.default;var l=o(17137);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},65658:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988),o(58259);var s=o(17137);const n=new WeakMap;class r{static get DEFAULT_WIDTH(){return 50}constructor(){let{viewportSize:e,scrollOffset:t,totalItems:o,itemSizeFn:s,overrideFn:r,calculationType:i,stretchMode:l,stretchingItemWidthFn:a=(e=>e),inlineStartOffset:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.set(this,{viewportWidth:e,scrollOffset:t,totalColumns:o,columnWidthFn:s,overrideFn:r,calculationType:i,stretchingColumnWidthFn:a,inlineStartOffset:h}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=l,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}calculate(){let e=0,t=!0;const o=[];let r,i=0,l=0;const a=n.get(this),h=a.calculationType,d=a.overrideFn,c=a.scrollOffset,u=Math.max(a.scrollOffset,0),g=a.totalColumns,f=a.viewportWidth,p=u>0?f+1:f;for(let n=0;n<g;n++)if(r=this._getColumnWidth(n),e<=u&&h!==s.FULLY_VISIBLE_TYPE&&(this.startColumn=n,i=r),e>=u&&e+(h===s.FULLY_VISIBLE_TYPE?r:0)<=u+p&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=n,i=r),this.endColumn=n),o.push(e),e+=r,l=r,h!==s.FULLY_VISIBLE_TYPE&&(this.endColumn=n),e>=u+f){t=!1;break}const m=c+f-p,C=h===s.FULLY_VISIBLE_TYPE?0:l,w=h===s.FULLY_VISIBLE_TYPE?i:0;if(m<-1*a.inlineStartOffset||c>o.at(-1)+C||-1*a.scrollOffset-a.viewportWidth>-1*w?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===g-1&&t)for(this.startColumn=this.endColumn;this.startColumn>0;){const e=o[this.endColumn]+r-o[this.startColumn-1];if((e<=f||h!==s.FULLY_VISIBLE_TYPE)&&(this.startColumn-=1),e>f)break}h===s.RENDER_TYPE&&null!==this.startColumn&&d&&d(this),this.startPosition=o[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),g<this.endColumn&&(this.endColumn=g-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}refreshStretching(e){if("none"===this.stretch)return;let t=e;this.totalTargetWidth=t;const o=n.get(this),s=o.totalColumns;let r=0;for(let e=0;e<s;e++){const s=this._getColumnWidth(e),n=o.stretchingColumnWidthFn(void 0,e);"number"==typeof n?t-=n:r+=s}const i=t-r;if("all"===this.stretch&&i>0)this.stretchAllRatio=t/r,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){const e=this._getColumnWidth(s-1),t=i+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let o=null;return"all"===this.stretch&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o}_getStretchedAllColumnWidth(e,t){let o=0;const s=n.get(this),r=s.totalColumns;if(!this.stretchAllColumnsWidth[e]){const o=Math.round(t*this.stretchAllRatio),n=s.stretchingColumnWidthFn(o,e);this.stretchAllColumnsWidth[e]=void 0===n?o:isNaN(n)?this._getColumnWidth(e):n}if(this.stretchAllColumnsWidth.length===r&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)o+=this.stretchAllColumnsWidth[e];o!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-o)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===n.get(this).totalColumns-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=n.get(this).columnWidthFn(e);return isNaN(t)&&(t=r.DEFAULT_WIDTH),t}}var i=r;t.default=i},36107:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988),o(58259);var s=o(17137);const n=new WeakMap;class r{static get DEFAULT_HEIGHT(){return 23}constructor(){let{viewportSize:e,scrollOffset:t,totalItems:o,itemSizeFn:s,overrideFn:r,calculationType:i,scrollbarHeight:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.set(this,{viewportHeight:e,scrollOffset:t,totalRows:o,rowHeightFn:s,overrideFn:r,calculationType:i,horizontalScrollbarHeight:l}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1,this.calculate()}calculate(){const e=n.get(this),t=e.calculationType,o=e.overrideFn,i=e.rowHeightFn,l=e.scrollOffset,a=Math.max(e.scrollOffset,0),h=e.totalRows,d=e.viewportHeight,c=e.horizontalScrollbarHeight||0;let u=0,g=!0;const f=[];let p,m=0,C=0;for(let e=0;e<h;e++)if(p=i(e),isNaN(p)&&(p=r.DEFAULT_HEIGHT),u<=a&&t!==s.FULLY_VISIBLE_TYPE&&(this.startRow=e,m=p),u>=a&&u+(t===s.FULLY_VISIBLE_TYPE?p:0)<=a+d-c&&(null===this.startRow&&(this.startRow=e,m=p),this.endRow=e),f.push(u),u+=p,C=p,t!==s.FULLY_VISIBLE_TYPE&&(this.endRow=e),u>=a+d-c){g=!1;break}const w=l+d-c,y=t===s.FULLY_VISIBLE_TYPE?m:0,v=t===s.FULLY_VISIBLE_TYPE?0:C;if(w<y||l>f.at(-1)+v?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===h-1&&g)for(this.startRow=this.endRow;this.startRow>0;){const e=f[this.endRow]+p-f[this.startRow-1];if((e<=d-c||t!==s.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),e>=d-c)break}t===s.RENDER_TYPE&&null!==this.startRow&&o&&o(this),this.startPosition=f[this.startRow],void 0===this.startPosition&&(this.startPosition=null),h<this.endRow&&(this.endRow=h-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}var i=r;t.default=i},82325:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=s(o(42538)),i=s(o(48427));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var a=new WeakMap;class h{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,n.default)(this,"row",null),(0,n.default)(this,"col",null),l(this,a,{writable:!0,value:!1}),(0,i.default)(this,a,o),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){return!(this.row<0||this.col<0)&&!(this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isSouthEastOf(e){return this.row>=e.row&&((0,r.default)(this,a)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&((0,r.default)(this,a)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&((0,r.default)(this,a)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&((0,r.default)(this,a)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}clone(){return new h(this.row,this.col,(0,r.default)(this,a))}toObject(){return{row:this.row,col:this.col}}}var d=h;t.default=d},2961:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(93231)),r=s(o(42538)),i=s(o(48427)),l=s(o(82325));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class d{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(0,n.default)(this,"highlight",null),(0,n.default)(this,"from",null),(0,n.default)(this,"to",null),a(this,h,{writable:!0,value:!1}),this.highlight=e.clone().normalize(),this.from=t.clone(),this.to=o.clone(),(0,i.default)(this,h,s)}setHighlight(e){return this.highlight=e.clone().normalize(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:o}=e,s=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return s.row<=t&&n.row>=t&&s.col<=o&&n.col>=o}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopRightCorner().col>=e.getOuterTopLeftCorner().col&&this.getOuterTopRightCorner().col<=e.getOuterTopRightCorner().col||this.getOuterTopLeftCorner().col<=e.getOuterTopRightCorner().col&&this.getOuterTopLeftCorner().col>=e.getOuterTopLeftCorner().col}isOverlappingVertically(e){return this.getOuterBottomRightCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomRightCorner().row<=e.getOuterBottomRightCorner().row||this.getOuterTopRightCorner().row<=e.getOuterBottomRightCorner().row&&this.getOuterTopRightCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0)}expandByRange(e){if(this.includesRange(e)||!this.overlaps(e))return!1;const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),s=this.getDirection(),n=e.getOuterTopStartCorner(),r=e.getOuterBottomEndCorner(),i=Math.min(t.row,n.row),l=Math.min(t.col,n.col),a=Math.max(o.row,r.row),h=Math.max(o.col,r.col),d=this._createCellCoords(i,l),c=this._createCellCoords(a,h);return this.from=d,this.to=c,this.setDirection(s),this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return(0,r.default)(this,h)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return(0,r.default)(this,h)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return(0,r.default)(this,h)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return(0,r.default)(this,h)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return(0,r.default)(this,h)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return(0,r.default)(this,h)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return(0,r.default)(this,h)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return(0,r.default)(this,h)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e,t){return!!(t&&t.includes(e)&&(this.getOuterTopLeftCorner().isEqual(this._createCellCoords(t.from.row,t.from.col))||this.getOuterTopRightCorner().isEqual(this._createCellCoords(t.from.row,t.to.col))||this.getOuterBottomLeftCorner().isEqual(this._createCellCoords(t.to.row,t.from.col))||this.getOuterBottomRightCorner().isEqual(this._createCellCoords(t.to.row,t.to.col))))||(e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner()))}getOppositeCorner(e,t){if(!(e instanceof l.default))return!1;if(t){const{from:o,to:s}=t;if(t.includes(e)){if(this.getOuterTopStartCorner().isEqual(this._createCellCoords(o.row,o.col)))return this.getOuterBottomEndCorner();if(this.getOuterTopEndCorner().isEqual(this._createCellCoords(o.row,s.col)))return this.getOuterBottomStartCorner();if(this.getOuterBottomStartCorner().isEqual(this._createCellCoords(s.row,o.col)))return this.getOuterTopEndCorner();if(this.getOuterBottomEndCorner().isEqual(this._createCellCoords(s.row,s.col)))return this.getOuterTopStartCorner()}}return e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t=Math.min(this.from.row,this.to.row),o=Math.max(this.from.row,this.to.row),s=Math.min(this.from.col,this.to.col),n=Math.max(this.from.col,this.to.col),r=Math.min(e.from.row,e.to.row),i=Math.max(e.from.row,e.to.row),l=Math.min(e.from.col,e.to.col),a=Math.max(e.from.col,e.to.col),h=[];return t===r&&h.push("top"),n===a&&h.push("right"),o===i&&h.push("bottom"),s===l&&h.push("left"),h}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let n=e.col;n<=t.col;n++)this.from.row===s&&this.from.col===n||this.to.row===s&&this.to.col===n||o.push(this._createCellCoords(s,n));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let n=e.col;n<=t.col;n++)e.row===s&&e.col===n?o.push(e):t.row===s&&t.col===n?o.push(t):o.push(this._createCellCoords(s,n));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let s=t.row;s<=o.row;s++)for(let n=t.col;n<=o.col;n++){if(!1===e(s,n))return}}clone(){return new d(this.highlight,this.from,this.to,(0,r.default)(this,h))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new l.default(e,t,(0,r.default)(this,h))}}var c=d;t.default=c},25984:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(93231)),r=o(83302),i=o(18609),l=s(o(75244)),a=s(o(52188)),h=s(o(82325)),d=s(o(2961));t.default=class{get eventManager(){return new l.default(this)}constructor(e,t){(0,n.default)(this,"wtTable",void 0),(0,n.default)(this,"wtScroll",void 0),(0,n.default)(this,"wtViewport",void 0),(0,n.default)(this,"wtOverlays",void 0),(0,n.default)(this,"selections",void 0),(0,n.default)(this,"wtEvent",void 0),(0,n.default)(this,"guid",`wt_${(0,i.randomString)()}`),(0,n.default)(this,"drawInterrupted",!1),(0,n.default)(this,"drawn",!1),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new a.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){(0,r.fastInnerText)(o,e[t])}])}}createCellCoords(e,t){return new h.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new d.default(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),n=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<o&&e.col<n)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<n&&e.row>=t-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<n)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o,s,n){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,o)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selections(){return e.selections},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count}}}}},49755:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=s(o(83154)),i=s(o(25984));class l extends i.default{constructor(e,t,o){super(e,t),(0,n.default)(this,"cloneSource",void 0),(0,n.default)(this,"cloneOverlay",void 0);const s=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),s,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selections=o.selections,this.wtEvent=new r.default(s,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selections,o.event),this.findOriginalHeaders()}}t.default=l},59189:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(83154)),r=s(o(87831)),i=s(o(64057)),l=s(o(94915)),a=s(o(57293)),h=s(o(25984)),d=o(22232),c=o(83302);class u extends h.default{constructor(e,t){super(e,new i.default(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new l.default(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new a.default(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selections=this.wtSettings.getSetting("selections"),this.wtEvent=new n.default(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selections),this.wtOverlays=new r.default(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,d.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((o,s)=>{this.wtSettings.getSetting(s).length&&t.push(o),e.push(o)})),(0,c.removeClass)(this.wtTable.wtRootElement.parentNode,e),(0,c.addClass)(this.wtTable.wtRootElement.parentNode,t)}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}t.default=u},83154:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(85015),r=o(7374),i=o(37595),l=o(93315);const a=new WeakMap;var h=class{constructor(e,t,o,s,n,r){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;this.wtSettings=o,this.domBindings=t,this.wtTable=n,this.selections=r,this.parent=i,this.eventManager=s,this.facadeGetter=e,a.set(this,{selectedCellBeforeTouchEnd:void 0,dblClickTimeout:[null,null],dblClickOrigin:[null,null]}),this.registerEvents()}registerEvents(){this.eventManager.addEventListener(this.wtTable.holder,"contextmenu",(e=>this.onContextMenu(e))),this.eventManager.addEventListener(this.wtTable.TABLE,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(this.wtTable.TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{this.eventManager.addEventListener(this.wtTable.holder,"touchstart",(e=>this.onTouchStart(e))),this.eventManager.addEventListener(this.wtTable.holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),this.eventManager.addEventListener(this.wtTable.holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||this.wtSettings.getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,this.wtSettings.getSetting("onAfterMomentumScroll"))}),200)}))},t=()=>{this.eventManager.addEventListener(this.wtTable.holder,"mouseup",(e=>this.onMouseUp(e))),this.eventManager.addEventListener(this.wtTable.holder,"mousedown",(e=>this.onMouseDown(e)))};(0,i.isMobileBrowser)()?e():((0,r.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=a.get(this),o=this.parentCell(e).coords;if(t.selectedCellBeforeTouchEnd&&o){const[e,s]=[o.row,t.selectedCellBeforeTouchEnd.from.row],[n,r]=[o.col,t.selectedCellBeforeTouchEnd.from.col];return e===s&&n===r}return!1}parentCell(e){const t={},o=this.wtTable.TABLE,n=(0,s.closestDown)(e,["TD","TH"],o);return n?(t.coords=this.wtTable.getCoords(n),t.TD=n):(0,s.hasClass)(e,"wtBorder")&&(0,s.hasClass)(e,"current")?(t.coords=this.selections.getCell().cellRange.highlight,t.TD=this.wtTable.getCell(t.coords)):(0,s.hasClass)(e,"wtBorder")&&(0,s.hasClass)(e,"area")&&this.selections.createOrGetArea().cellRange&&(t.coords=this.selections.createOrGetArea().cellRange.to,t.TD=this.wtTable.getCell(t.coords)),t}onMouseDown(e){const t=a.get(this),o=this.domBindings.rootDocument.activeElement,r=(0,n.partial)(s.getParent,e.target),i=e.target;if(i===o||r(0)===o||r(1)===o)return;const l=this.parentCell(i);(0,s.hasClass)(i,"corner")?this.wtSettings.getSetting("onCellCornerMouseDown",e,i):l.TD&&this.wtSettings.has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,l.coords,l.TD),(0===e.button||this.touchApplied)&&l.TD&&(t.dblClickOrigin[0]=l.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout((()=>{t.dblClickOrigin[0]=null}),1e3))}onContextMenu(e){if(this.wtSettings.has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!this.wtSettings.has("onCellMouseOver"))return;const t=this.wtTable.TABLE,o=(0,s.closestDown)(e.target,["TD","TH"],t),n=this.parent||this;o&&o!==n.lastMouseOver&&(0,s.isChildOf)(o,t)&&(n.lastMouseOver=o,this.callListener("onCellMouseOver",e,this.wtTable.getCoords(o),o))}onMouseOut(e){if(!this.wtSettings.has("onCellMouseOut"))return;const t=this.wtTable.TABLE,o=(0,s.closestDown)(e.target,["TD","TH"],t),n=(0,s.closestDown)(e.relatedTarget,["TD","TH"],t),r=this.parent||this;o&&o!==n&&(0,s.isChildOf)(o,t)&&(this.callListener("onCellMouseOut",e,this.wtTable.getCoords(o),o),null===n&&(r.lastMouseOver=null))}onMouseUp(e){const t=a.get(this),o=this.parentCell(e.target);o.TD&&this.wtSettings.has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&(o.TD===t.dblClickOrigin[0]&&o.TD===t.dblClickOrigin[1]?((0,s.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,o.coords,o.TD):this.callListener("onCellDblClick",e,o.coords,o.TD),t.dblClickOrigin[0]=null,t.dblClickOrigin[1]=null):o.TD===t.dblClickOrigin[0]&&(t.dblClickOrigin[1]=o.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout((()=>{t.dblClickOrigin[1]=null}),500)))}onTouchStart(e){a.get(this).selectedCellBeforeTouchEnd=this.selections.getCell().cellRange,this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const o=e.target,s=null===(t=this.parentCell(o))||void 0===t?void 0:t.coords,n=(0,l.isDefined)(s)&&s.row>=0&&s.col>=0;if(e.cancelable&&n&&this.wtSettings.getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,i.isIOS)()&&((0,i.isChromeWebKit)()||(0,i.isFirefoxWebKit)())&&this.selectedCellWasTouched(o)&&!t.includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,o,s){const n=this.wtSettings.getSettingPure(e);n&&n(t,o,s,this.facadeGetter())}destroy(){const e=a.get(this);clearTimeout(e.dblClickTimeout[0]),clearTimeout(e.dblClickTimeout[1]),this.eventManager.destroy()}};t.default=h},70559:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(59189)),r=s(o(25984));class i{constructor(e){e instanceof r.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new i(e);return()=>t},this._wot=new n.default(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selections(){return this._wot.selections}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,o){return this._wot.createCellRange(e,t,o)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,o,s,n){return this._wot.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return this._wot.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wot.scrollViewportVertically(e,t,o)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,o,s,n){return this._wot.wtSettings.getSetting(e,t,o,s,n)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=i},65946:(e,t)=>{"use strict";t.__esModule=!0;var o=class{constructor(e,t,o){this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}};t.default=o},22350:(e,t)=>{"use strict";t.__esModule=!0;var o=class{constructor(e,t,o){this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}};t.default=o},21280:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(65658));t.ViewportColumnsCalculator=n.default;var r=s(o(36107));t.ViewportRowsCalculator=r.default;var i=s(o(82325));t.CellCoords=i.default;var l=s(o(2961));t.CellRange=l.default;var a=s(o(70559));t.default=a.default,t.Core=a.default;var h=s(o(39055));t.Selection=h.default;var d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(96649));t.Renderer=d;var c=o(1909);t.OrderView=c.OrderView,t.SharedOrderView=c.SharedOrderView;var u=o(75244);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}t.getListenersCounter=u.getListenersCounter},75391:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(93231)),r=o(83302),i=o(22232),l=o(50095),a=o(69173),h=o(3984),d=s(o(49755));t.Overlay=class{constructor(e,t,o,s,l){(0,n.default)(this,"wtSettings",null),(0,i.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=l,this.facadeGetter=t,this.wtSettings=s;const{TABLE:a,hider:h,spreader:d,holder:c,wtRootElement:u}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=a,this.hider=h,this.spreader=d,this.holder=c,this.wtRootElement=u,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,a.warn)(`The provided element is not a child of the ${this.type} overlay`);const s=this.mainTableScrollableElement===this.domBindings.rootWindow,n=o<this.wtSettings.getSetting("fixedColumnsStart"),r=t<this.wtSettings.getSetting("fixedRowsTop"),i=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(l),top:l.offsetTop},d={start:this.getRelativeStartPosition(e),top:e.offsetTop};let c=null;return c=s?this.getRelativeCellPositionWithinWindow(r,n,d,h):this.getRelativeCellPositionWithinHolder(r,i,n,d,h),c}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,s){const n=this.wot.wtTable.wtRootElement.getBoundingClientRect();let i=0,l=0;if(t){let e=n.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(n.left+n.width+(0,r.getScrollbarWidth)())),i=e<=0?-1*e:0}else i=s.start;if(e){l=this.clone.wtTable.TABLE.getBoundingClientRect().top-n.top}else l=s.top;return{start:o.start+i,top:o.top+l}}getRelativeCellPositionWithinHolder(e,t,o,s,n){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),i=this.wot.wtOverlays.topOverlay.getScrollPosition();let l=0,a=0;if(o||(l=r-n.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();a=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(a=i-n.top);return{start:s.start-l,top:s.top-a}}makeClone(){if(-1===h.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=t.createElement("DIV"),n=t.createElement("TABLE"),i=e.wtRootElement.parentNode;s.className=`${h.CLONE_CLASS_NAMES.get(this.type)} handsontable`,s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,n.className=e.TABLE.className,s.appendChild(n),i.appendChild(s);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===h.CLONE_TOP||"vertical"===l&&this.type===h.CLONE_INLINE_START?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(i).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE),new d.default(n,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selections:this.wot.selections})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,s=t.style,n=e.parentNode.style;(0,l.arrayEach)([o,s,n],(e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},99260:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(93231)),r=o(83302),i=s(o(86363)),l=o(75391),a=o(3984);class h extends l.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_BOTTOM,o,s),(0,n.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const s=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||s&&"vertical"===s?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),t.style.bottom=`${o}px`);const n=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),n}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let n=0;t.hasVerticalScroll()||(n+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(n+=(0,r.getScrollbarWidth)(o)),s.style.bottom=`${n}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:s}=this.wot,n=s.getSetting("defaultRowHeight");let r=e,i=0;for(;r<t;){const e=o.getRowHeight(r);i+=void 0===e?n:e,r+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,n=(0,r.getScrollbarWidth)(o),i=this.clone.wtTable.holder.parentNode.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==s||"horizontal"===l){let o=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(o-=n),o=Math.min(o,e.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),i.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let n=0;t&&s.offsetHeight!==s.clientHeight&&(n=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=n,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),s=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-s+e,0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,s=this.wtSettings.getSetting("columnHeaders");let n=!1;if((o||0===t)&&s.length>0){const t=this.wot.wtTable.holder.parentNode,o=(0,r.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(t,"innerBorderBottom"),n=!o):((0,r.removeClass)(t,"innerBorderBottom"),n=o)}return n}}t.BottomOverlay=h},79720:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(58654)),i=o(75391),l=o(3984);class a extends i.Overlay{constructor(e,t,o,s,n,r){super(e,t,l.CLONE_BOTTOM_INLINE_START_CORNER,o,s),this.bottomOverlay=n,this.inlineStartOverlay=r}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),o=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${e}px`,t.style.bottom=`${o}px`}else(0,n.resetCssTransform)(t),this.repositionOverlay();let o=(0,n.outerHeight)(this.clone.wtTable.TABLE);const s=(0,n.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${s}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let r=0;t.hasVerticalScroll()||(r+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(r+=(0,n.getScrollbarWidth)(o)),s.style.bottom=`${r}px`}}t.BottomInlineStartCornerOverlay=a},3984:(e,t)=>{"use strict";t.__esModule=!0;const o="top";t.CLONE_TOP=o;const s="bottom";t.CLONE_BOTTOM=s;const n="inline_start";t.CLONE_INLINE_START=n;const r="top_inline_start_corner";t.CLONE_TOP_INLINE_START_CORNER=r;const i="bottom_inline_start_corner";t.CLONE_BOTTOM_INLINE_START_CORNER=i;const l=[o,s,n,r,i];t.CLONE_TYPES=l;const a=new Map([[o,`ht_clone_${o}`],[s,`ht_clone_${s}`],[n,`ht_clone_${n} ht_clone_left`],[r,`ht_clone_${r} ht_clone_top_left_corner`],[i,`ht_clone_${i} ht_clone_bottom_left_corner`]]);t.CLONE_CLASS_NAMES=a},89381:(e,t,o)=>{"use strict";t.__esModule=!0;var s={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},n=o(79720);t.BottomInlineStartCornerOverlay=n.BottomInlineStartCornerOverlay;var r=o(99260);t.BottomOverlay=r.BottomOverlay;var i=o(34170);t.InlineStartOverlay=i.InlineStartOverlay;var l=o(75391);t.Overlay=l.Overlay;var a=o(40387);t.TopInlineStartCornerOverlay=a.TopInlineStartCornerOverlay;var h=o(82148);t.TopOverlay=h.TopOverlay;var d=o(3984);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===d[e]||(t[e]=d[e]))}))},34170:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=o(83302),r=s(o(32173)),i=o(75391),l=o(3984);class a extends i.Overlay{constructor(e,t,o,s){super(e,t,l.CLONE_INLINE_START,o,s)}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,s=this.wtSettings.getSetting("preventOverflow");let r=0;this.trimmingContainer!==t||s&&"horizontal"===s?(r=this.getScrollPosition(),(0,n.resetCssTransform)(o)):(r=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,n.setOverlayPosition)(o,`${r}px`,"0px"));const i=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),i}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,n.getWindowScrollTop)(t)),o=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let s=e,n=0;for(;s<t;)n+=this.wot.wtTable.getStretchedColumnWidth(s)||o,s+=1;return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,n.getScrollbarWidth)(t),r=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===i){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=s),t=Math.min(t,e.wtRootElement.scrollHeight),r.height=`${t}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const l=(0,n.outerWidth)(this.clone.wtTable.TABLE);r.width=`${l}px`}adjustRootChildrenSize(){var e;const{holder:t}=this.clone.wtTable,{selections:o}=this.wot,s=this.facadeGetter(),n=Math.abs(null!==(e=null==o?void 0:o.getCell().getBorder(s).cornerCenterPointOffset)&&void 0!==e?e:0);this.clone.wtTable.hider.style.height=this.hider.style.height,t.style.height=t.parentNode.style.height,t.style.width=`${parseInt(t.parentNode.style.width,10)+n}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&s.offsetWidth!==s.clientWidth&&(r=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportWidth()):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),o+=r,this.setScrollPosition(o)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,n.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,o=this.wtSettings.getSetting("rowHeaders"),s=this.wtSettings.getSetting("fixedColumnsStart");this.wtSettings.getSetting("totalRows")?(0,n.removeClass)(t,"emptyRows"):(0,n.addClass)(t,"emptyRows");let r=!1;if(s&&!o.length)(0,n.addClass)(t,"innerBorderLeft innerBorderInlineStart");else if(!s&&o.length){const o=(0,n.hasClass)(t,"innerBorderInlineStart");e?((0,n.addClass)(t,"innerBorderLeft innerBorderInlineStart"),r=!o):((0,n.removeClass)(t,"innerBorderLeft innerBorderInlineStart"),r=o)}return r}}t.InlineStartOverlay=a},82148:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(93231)),r=o(83302),i=s(o(85043)),l=o(75391),a=o(3984);class h extends l.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_TOP,o,s),(0,n.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let s=0,n=!1;if(this.trimmingContainer!==t||o&&"vertical"===o)s=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{const{wtTable:t}=this.wot,o=t.hider.getBoundingClientRect();n=Math.ceil(o.bottom)===e.offsetHeight,s=this.getOverlayOffset(),(0,r.setOverlayPosition)(e,"0px",`${s}px`)}const i=this.adjustHeaderBordersPosition(s,n);return this.adjustElementsSize(),i}setScrollPosition(e){const t=this.domBindings.rootWindow;let o=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultRowHeight");let s=e,n=0;for(;s<t;){const e=this.wot.wtTable.getRowHeight(s);n+=void 0===e?o:e,s+=1}return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,r.getScrollbarWidth)(t),n=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===i){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=s),t=Math.min(t,e.wtRootElement.scrollWidth),n.width=`${t}px`}else n.width="";this.clone.wtTable.holder.style.width=n.width;let l=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),n.height=`${l}px`}adjustRootChildrenSize(){var e;const{holder:t}=this.clone.wtTable,{selections:o}=this.wot,s=this.facadeGetter(),n=Math.abs(null!==(e=null==o?void 0:o.getCell().getBorder(s).cornerCenterPointOffset)&&void 0!==e?e:0);this.clone.wtTable.hider.style.width=this.hider.style.width,t.style.width=t.parentNode.style.width,t.style.height=`${parseInt(t.parentNode.style.height,10)+n}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:s}=this,n=(o.cloneSource?o.cloneSource:o).wtTable.holder;let i=this.getTableParentOffset(),l=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&n.offsetHeight!==n.clientHeight&&(l=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=s.getSetting("fixedRowsBottom"),n=s.getSetting("totalRows");i+=this.sumCellSizes(0,e+1),i-=o.wtViewport.getViewportHeight()-this.sumCellSizes(n-t,n),i+=1}else i+=this.sumCellSizes(s.getSetting("fixedRowsTop"),e);return i+=l,this.setScrollPosition(i)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.wot.wtTable.holder.parentNode;this.wtSettings.getSetting("totalColumns")?(0,r.removeClass)(o,"emptyColumns"):(0,r.addClass)(o,"emptyColumns");let s=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),n=this.cachedFixedRowsTop!==t,i=this.wtSettings.getSetting("columnHeaders");if((n||0===t)&&i.length>0){const t=(0,r.hasClass)(o,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(o,"innerBorderTop"),s=!t):((0,r.removeClass)(o,"innerBorderTop"),s=t)}}return s}}t.TopOverlay=h},40387:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302),i=s(o(56754)),l=o(75391),a=o(3984);class h extends l.Overlay{constructor(e,t,o,s,r,i){super(e,t,a.CLONE_TOP_INLINE_START_CORNER,o,s),(0,n.default)(this,"topOverlay",void 0),(0,n.default)(this,"inlineStartOverlay",void 0),this.topOverlay=r,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,r.setOverlayPosition)(e,`${t}px`,`${o}px`)}else(0,r.resetCssTransform)(e);let t=(0,r.outerHeight)(this.clone.wtTable.TABLE);const o=(0,r.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}}t.TopInlineStartCornerOverlay=h},87831:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(93231)),r=o(83302),i=o(7374),l=o(50095),a=o(80151),h=o(37595),d=o(89381);var c=class{constructor(e,t,o,s,l,a){(0,n.default)(this,"wot",null),(0,n.default)(this,"topOverlay",null),(0,n.default)(this,"bottomOverlay",null),(0,n.default)(this,"inlineStartOverlay",null),(0,n.default)(this,"topInlineStartCornerOverlay",null),(0,n.default)(this,"bottomInlineStartCornerOverlay",null),(0,n.default)(this,"browserLineHeight",void 0),(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"resizeObserver",new ResizeObserver((e=>{(0,i.requestAnimationFrame)((()=>{Array.isArray(e)&&e.length&&this.wtSettings.getSetting("onContainerElementResize")}))}))),this.wot=e,this.wtSettings=s,this.domBindings=o,this.facadeGetter=t,this.wtTable=a;const{rootDocument:h,rootWindow:d}=this.domBindings;this.instance=this.wot,this.eventManager=l,this.scrollbarSize=(0,r.getScrollbarWidth)(h);const c="hidden"===d.getComputedStyle(a.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=c?a.holder:(0,r.getScrollableElement)(a.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=d.scrollX,this.lastScrollY=d.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,o=e.getComputedStyle(t.body),s=parseInt(o.lineHeight,10),n=1.2*parseInt(o.fontSize,10);this.browserLineHeight=s||n}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new d.TopOverlay(...e),this.bottomOverlay=new d.BottomOverlay(...e),this.inlineStartOverlay=new d.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new d.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new d.BottomInlineStartCornerOverlay(...e,this.bottomOverlay,this.inlineStartOverlay)}updateStateOfRendering(){let e=this.topOverlay.updateStateOfRendering();return e=this.bottomOverlay.updateStateOfRendering()||e,e=this.inlineStartOverlay.updateStateOfRendering()||e,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(e=this.topInlineStartCornerOverlay.updateStateOfRendering()||e),this.bottomOverlay.needFullRender&&(e=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||e)),e}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:s}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",(e=>this.onKeyDown(e))),this.eventManager.addEventListener(e.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(e,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(o,"scroll",(e=>this.onTableScroll(e)),{passive:!0}),o!==s&&this.eventManager.addEventListener(s,"scroll",(e=>this.onTableScroll(e)),{passive:!0});const n=t.devicePixelRatio&&t.devicePixelRatio>1,r=this.scrollableElement===t,i=this.wtSettings.getSetting("preventWheel"),l={passive:r};(i||n||!(0,h.isChrome)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,i)),l);let a;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",(e=>this.onCloneWheel(e,i)),l)}})),this.eventManager.addEventListener(t,"resize",(()=>{clearTimeout(a),a=setTimeout((()=>{this.wtSettings.getSetting("onWindowResize")}),200)})),r||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,n=e.target;this.keyPressed&&(s!==t&&n!==t&&!e.target.contains(s)||o!==t&&n!==t&&!e.target.contains(o))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:o}=this.domBindings,s=this.inlineStartOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,r=e.target,i=n!==o&&r!==o&&!r.contains(n),l=s!==o&&r!==o&&!r.contains(s);if(this.keyPressed&&(i||l))return;const a=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==o&&a)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,a.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,o=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(o+=o*this.browserLineHeight,t+=t*this.browserLineHeight);const s=this.scrollVertically(t),n=this.scrollHorizontally(o);return s||n}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,o=this.inlineStartOverlay.clone.wtTable.holder,[s,n]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==s||this.lastScrollX!==e.scrollX,this.verticalScrolling=o.scrollTop!==n||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=s;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=s)}this.verticalScrolling&&(o.scrollTop=n),this.refreshAll()}syncScrollWithMaster(){const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:o}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=(0,r.getScrollableElement)(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,o=e.clientHeight,s=t!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return s&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=o),s}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtViewport:t}=this.wot,{wtTable:o}=this,s=this.wtSettings.getSetting("totalColumns"),n=this.wtSettings.getSetting("totalRows"),r=t.getRowHeaderWidth(),i=t.getColumnHeaderHeight(),l=o.hider.style;if(l.width=`${r+this.inlineStartOverlay.sumCellSizes(0,s)}px`,l.height=`${i+this.topOverlay.sumCellSizes(0,n)+1}px`,this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:t}=o.wtRootElement,{scrollHeight:s,scrollWidth:n}=o.holder;this.hasScrollbarRight=e<s,this.hasScrollbarBottom=t<n,this.hasScrollbarRight&&o.hider.scrollWidth+this.scrollbarSize>t?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&o.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.inlineStartOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return(0,l.arrayEach)(t,(t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(o=t.clone)})),o}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,l.arrayEach)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}};t.default=c},46593:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(94191));t.default=class{constructor(e,t){this.nodesPool="string"==typeof e?new n.default(e):null,this.nodeType=e,this.rootNode=t,this.table=null,this.renderedNodes=0}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}},91767:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=o(1909),i=s(o(46593));class l extends i.default{constructor(){super("TD"),this.orderViews=new WeakMap,this.sourceRowIndex=0}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new r.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:s}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),i=o.getRenderedNode(r);this.sourceRowIndex=e;const l=this.obtainOrderView(i),a=s.obtainOrderView(i);l.prependView(a).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){l.render();const t=l.getCurrentNode(),s=this.table.renderedColumnToSource(o);(0,n.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),this.table.cellRenderer(e,s,t)}l.end()}}}t.default=l},84888:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(46593)),r=o(83302);class i extends n.default{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,o=e+t;for(;this.renderedNodes<o;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>o;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),o=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${o}px`}for(let o=0;o<e;o++){const e=this.table.renderedColumnToSource(o),s=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[o+t].style.width=`${s}px`}const o=this.rootNode.firstChild;o&&(0,r.addClass)(o,"rowHeader")}}t.default=i},90802:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(46593));class i extends r.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let o=this.rootNode.firstChild;if(e){const{columnsToRender:s}=this.table,n=s+t;for(let t=0,s=e;t<s;t++){for(o=this.rootNode.childNodes[t],o||(o=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(o)),this.renderedNodes=o.childNodes.length;this.renderedNodes<n;)o.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>n;)o.removeChild(o.lastChild),this.renderedNodes-=1}const r=this.rootNode.childNodes.length;if(r>e)for(let t=e;t<r;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else o&&(0,n.empty)(o)}render(){const{columnHeadersCount:e}=this.table;for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:s}=this.table,n=this.rootNode.childNodes[t];for(let r=-1*s;r<o;r+=1){const o=this.table.renderedColumnToSource(r),i=n.childNodes[r+s];i.className="",i.removeAttribute("style"),e[t](o,i,t)}}}}t.default=i},96649:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(68384));t.RowHeadersRenderer=n.default;var r=s(o(90802));t.ColumnHeadersRenderer=r.default;var i=s(o(84888));t.ColGroupRenderer=i.default;var l=s(o(77267));t.RowsRenderer=l.default;var a=s(o(91767));t.CellsRenderer=a.default;var h=s(o(46538));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:o,TBODY:s,rowUtils:d,columnUtils:c,cellRenderer:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new h.default(e,{cellRenderer:u}),this.renderer.setRenderers({rowHeaders:new n.default,columnHeaders:new r.default(t),colGroup:new i.default(o),rows:new l.default(s),cells:new a.default}),this.renderer.setAxisUtils(d,c)}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}},68384:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(1909),r=s(o(46593));class i extends r.default{constructor(){super("TH"),this.orderViews=new WeakMap,this.sourceRowIndex=0}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new n.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:o,rows:s,cells:n}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),i=s.getRenderedNode(r);this.sourceRowIndex=e;const l=this.obtainOrderView(i),a=n.obtainOrderView(i);l.appendView(a).setSize(o).setOffset(this.table.renderedColumnToSource(0)).start();for(let s=0;s<o;s++){l.render();const o=l.getCurrentNode();o.className="",o.removeAttribute("style"),t[s](e,o,s)}l.end()}}}t.default=i},77267:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(69173),r=o(28236),i=o(1909),l=s(o(46593));let a=!1;class h extends l.default{constructor(e){super("TR",e),this.orderView=new i.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!a&&e>1e3&&(a=!0,(0,n.warn)(r.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\x20
32
- the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let t=0;t<e;t++)this.orderView.render();this.orderView.end()}}t.default=h},46538:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),n.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=n}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeight(t);e.firstChild.style.height=s?s-1+"px":""}}}}},52188:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302);var i=class{constructor(e){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"lastScrolledColumnPos",-1),(0,n.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,o,s,n){const r=this.scrollViewportHorizontally(e.col,o,n),i=this.scrollViewportVertically(e.row,t,s);return r||i}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleColumn(),i=this.getLastVisibleColumn(),l=void 0===t&&void 0===o,{fixedColumnsStart:a,inlineStartOverlay:h}=this.dataAccessObject;if(l&&e<a)return!1;let d=!1;return-1===r?d=h.scrollTo(e,l?e>this.lastScrolledColumnPos:t):(l&&(e<r||e>i)||!l)&&(d=h.scrollTo(e,l?e>i:t)),d&&(this.lastScrolledColumnPos=e),d}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),l=void 0===t&&void 0===o,{fixedRowsBottom:a,fixedRowsTop:h,topOverlay:d}=this.dataAccessObject;if(l&&(e<h||e>n-a-1))return!1;let c=!1;return-1===r?c=d.scrollTo(e,l?e>this.lastScrolledRowPos:o):(l&&(e<r||e>i)||!l)&&(c=d.scrollTo(e,l?e>i:o)),c&&(this.lastScrolledRowPos=e),c}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,fixedRowsTop:n,rootWindow:i}=this.dataAccessObject;let l=t.getFirstVisibleRow();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),h=(0,r.innerHeight)(t.hider),d=(0,r.innerHeight)(i),c=(0,r.getScrollTop)(i,i);if(a.top+h-d<=c){let t=o.getColumnHeaderHeight();t+=e.sumCellSizes(0,n);for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),a.top+h-t<=c){l=o;break}}}return l}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,rootWindow:n}=this.dataAccessObject;let i=t.getLastVisibleRow();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.getScrollTop)(n,n);if(l.top>a){const t=(0,r.innerHeight)(n);let h=o.getColumnHeaderHeight();for(let o=1;o<=s;o++)if(h+=e.sumCellSizes(o-1,o),l.top+h-a>=t){i=o-2;break}}}return i}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:o,totalColumns:s,rootWindow:n}=this.dataAccessObject;let i=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.innerWidth)(t.hider),h=(0,r.innerWidth)(n),d=Math.abs((0,r.getScrollLeft)(n,n));if(l.left+a-h<=d){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.left+a-t<=d){i=o;break}}}return i}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:s,totalColumns:n,rootWindow:i}=this.dataAccessObject;let l=o.getLastVisibleColumn();if(t.mainTableScrollableElement===i){let a=null;if(e.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(e.right-t)}else{a=(0,r.offset)(o.wtRootElement).left}const h=Math.abs((0,r.getScrollLeft)(i,i));if(a>h){const e=(0,r.innerWidth)(i);let o=s.getRowHeaderWidth();for(let s=1;s<=n;s++)if(o+=t.sumCellSizes(s-1,s),a+o-h>=e){l=s-2;break}}}return l}};t.default=i},39055:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(83302),r=s(o(18959));var i=class{constructor(e,t){this.settings=e,this.cellRange=t||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}getBorder(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new r.default(e,this.settings)),this.instanceBorders[e.guid]}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}addClassAtCoords(e,t,o,s){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=e.wtTable.getCell(this.settings.createCellCoords(t,o));if("object"==typeof i){let e=s;r&&(e=this.classNameGenerator(i),this.classNames.includes(e)||this.classNames.push(e)),(0,n.addClass)(i,e)}return this}linearClassNameGenerator(e,t){return function o(s){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===r)return e;let i=r>=0?r:t,l=e;i-=1;const a=0===i?e:`${e}-${i}`;if((0,n.hasClass)(s,a)){l=`${e}-${i+1}`}else l=o(s,i);return l}}draw(e){if(this.isEmpty())return void(this.settings.border&&this.getBorder(e).disappear());const t=e.wtTable.getRenderedRowsCount(),o=e.wtTable.getRenderedColumnsCount(),s=this.getCorners(),[r,i,l,a]=s,{highlightHeaderClassName:h,highlightColumnClassName:d,highlightRowClassName:c,highlightOnlyClosestHeader:u,selectionType:g}=this.settings,f=void 0===g||["active-header","header"].includes(g);if(f&&null!==i&&null!==a){let t=0;for(let s=0;s<o;s+=1){const o=e.wtTable.columnFilter.renderedToSource(s);if(o>=i&&o<=a){let s=e.wtTable.getColumnHeaders(o);const r=s.length-1;u&&s.length>1&&(s=[s[r]]);for(let l=0;l<s.length;l+=1){const c=[];let f=s[l];h&&c.push(h),d&&c.push(d),l=u?r:l;const p=e.getSetting("onBeforeHighlightingColumnHeader",o,l,{selectionType:g,columnCursor:t,selectionWidth:a-i+1,classNames:c});p!==o&&(f=e.wtTable.getColumnHeader(p,l)),(0,n.addClass)(f,c)}t+=1}}}if(null!==r&&null!==l){let s=0;for(let p=0;p<t;p+=1){const t=e.wtTable.rowFilter.renderedToSource(p);if(f&&t>=r&&t<=l){let o=e.wtTable.getRowHeaders(t);const i=o.length-1;u&&o.length>1&&(o=[o[i]]);for(let a=0;a<o.length;a+=1){const d=[];let f=o[a];h&&d.push(h),c&&d.push(c),a=u?i:a;const p=e.getSetting("onBeforeHighlightingRowHeader",t,a,{selectionType:g,rowCursor:s,selectionHeight:l-r+1,classNames:d});p!==t&&(f=e.wtTable.getRowHeader(p,a)),(0,n.addClass)(f,d)}s+=1}if(null!==i&&null!==a)for(let s=0;s<o;s+=1){const o=e.wtTable.columnFilter.renderedToSource(s);t>=r&&t<=l&&o>=i&&o<=a?this.settings.className&&this.addClassAtCoords(e,t,o,this.settings.className,this.settings.markIntersections):t>=r&&t<=l?c&&this.addClassAtCoords(e,t,o,c):o>=i&&o<=a&&d&&this.addClassAtCoords(e,t,o,d);const n=e.getSetting("onAfterDrawSelection",t,o,this.settings.layerLevel);"string"==typeof n&&this.addClassAtCoords(e,t,o,n)}}}e.getSetting("onBeforeDrawBorders",s,this.settings.className),this.settings.border&&this.getBorder(e).appear(s)}destroy(){Object.values(this.instanceBorders).forEach((e=>e.destroy()))}};t.default=i},64057:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(93231)),r=o(83302),i=o(22232);t.default=class{constructor(e){(0,n.default)(this,"settings",{}),(0,n.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,i.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,r.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1}}update(e,t){return void 0===t?(0,i.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,n){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,n):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},45460:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988),o(60740);var n=s(o(93231)),r=o(83302),i=o(85015),l=s(o(65946)),a=s(o(22350)),h=o(96649),d=s(o(35863)),c=s(o(72772)),u=o(89381);var g=class{constructor(e,t,o,s,i){(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"TBODY",null),(0,n.default)(this,"THEAD",null),(0,n.default)(this,"COLGROUP",null),(0,n.default)(this,"hasTableHeight",!0),(0,n.default)(this,"hasTableWidth",!0),(0,n.default)(this,"isTableVisible",!1),(0,n.default)(this,"tableOffset",0),(0,n.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===i,this.name=i,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,r.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const l=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(l))),this.rowUtils=new c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new d.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr")),o.appendChild(e)),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,n=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),d=h.length,c=t.getSetting("columnHeaders"),g=c.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),d&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(f=o.updateStateOfRendering()),p)this.isMaster&&s.createVisibleCalculators(),o&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,r.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=n>0?this.getFirstRenderedRow():0,t=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new a.default(e,n,g),this.columnFilter=new l.default(t,i,d);let o=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),o=!0!==e.skipRender}if(o){let e;if(this.tableRenderer.setHeaderContentRenderers(h,c),(this.is(u.CLONE_BOTTOM)||this.is(u.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(u.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,r.outerWidth)(this.hider),o=(0,r.outerWidth)(this.TABLE);0!==t&&o!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(u.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(m=o.bottomOverlay.resetFixedPosition()||m),m=o.inlineStartOverlay.resetFixedPosition()||m,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(o.refreshAll(),o.adjustElementsSize()):this.refreshSelections(p),f&&o.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let n,i,l;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,n=this.getColumnHeaderHeight(o),i=this.getColumnHeader(t,o),i&&(l=(0,r.innerHeight)(i),(!n&&s<l||n<l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),Array.isArray(a)?null!==a[o]&&void 0!==a[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(a[o]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]||a))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,n=e.getSetting("columnHeaders").length;s<n;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(u.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}removeClassFromCells(e){const t=this.TABLE.querySelectorAll(`.${e}`);for(let o=0,s=t.length;o<s;o++)(0,r.removeClass)(t[o],e)}refreshSelections(e){const{wtSettings:t}=this,{selections:o}=this.dataAccessObject;if(!o)return;const s=Array.from(o),n=s.length;if(e){const e=[];for(let t=0;t<n;t++){const{highlightHeaderClassName:o,highlightRowClassName:n,highlightColumnClassName:r}=s[t].settings,i=s[t].classNames,l=i.length;for(let t=0;t<l;t++)e.includes(i[t])||e.push(i[t]);o&&!e.includes(o)&&e.push(o),n&&!e.includes(n)&&e.push(n),r&&!e.includes(r)&&e.push(r)}const o=t.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(o))for(let t=0;t<o.length;t++)e.push(o[t]);const r=e.length;for(let t=0;t<r;t++)this.removeClassFromCells(e[t])}for(let t=0;t<n;t++)s[t].draw(this.facadeGetter(),e)}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const n=this.getRow(t);if(!n&&t>=0)throw new Error("TR was expected to be rendered but is not");const r=n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!r&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return r}getRow(e){let t=null,o=null;var s,n;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return null==o?void 0:o.childNodes[t]}getRowHeaders(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return[];const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],n=null==o?void 0:o.childNodes[s];n&&t.push(n)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let n=(0,r.index)(o),i=t.cellIndex;if((0,r.overlayContainsElement)(u.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(n-=s.childNodes.length);else if((0,r.overlayContainsElement)(u.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_BOTTOM,t,this.wtRootElement)){n=this.wtSettings.getSetting("totalRows")-s.childNodes.length+n}else n=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(n):this.rowFilter.renderedToSource(n);return i=(0,r.overlayContainsElement)(u.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_INLINE_START,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),this.wot.createCellCoords(n,i)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,n,i;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,r.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),n=this.getTrForRow(s),i=n.querySelector("th"),o=i?(0,r.innerHeight)(i):(0,r.innerHeight)(n)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,r.outerWidth)(this.TABLE)}getHeight(){return(0,r.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,r.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,r.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,r.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,i.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}};t.default=g},86363:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(92117)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},58654:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(6214)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},32173:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(37610)),i=s(o(6214)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_INLINE_START)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},94915:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(45460)),i=s(o(37610)),l=s(o(92117)),a=o(22232);class h extends r.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,n.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,n.getStyle)(e,"height",t),r=(0,n.getStyle)(e,"overflow",t),i=this.holder.style,{scrollWidth:l,scrollHeight:a}=e;let{width:h,height:d}=e.getBoundingClientRect();if(o&&["auto","hidden","scroll"].includes(r)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const r=parseInt((0,n.getComputedStyle)(s,t).height,10);o.removeChild(s),0===r&&(d=0)}d=Math.min(d,a),i.height="auto"===s?"auto":`${d}px`,h=Math.min(h,l),i.width=`${h}px`,i.overflow="",this.hasTableHeight="auto"===i.height||d>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const n=e.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*n;e<r;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,l.default);var d=h;t.default=d},92117:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var n=s;t.default=n},37610:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var n=s;t.default=n},6214:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});var n=s;t.default=n},6271:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var n=s;t.default=n},15491:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var n=s;t.default=n},85043:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(92117)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},56754:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(6214)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},35863:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302);t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t,this.headerWidths=new Map}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let o=this.getWidth(e);if(t){const s=t.getStretchedColumnWidth(e,o);s&&(o=s)}return o}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:o,cloneSource:n}=this.dataAccessObject,r=n?n.wtTable.holder:t.holder,i=r.offsetHeight<r.scrollHeight?(0,s.getScrollbarWidth)():0;let l=e.getSetting("rowHeaderWidth");if(o.columnsRenderCalculator.refreshStretching(o.getViewportWidth()-i),l=e.getSetting("onModifyRowHeaderWidth",l),null!=l){const t=e.getSetting("rowHeaders").length,o=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(l)?l[e]:l;t=null==t?o:t,this.headerWidths.set(e,t)}}}}},94191:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},81787:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0;t.WORKING_SPACE_TOP=1;t.WORKING_SPACE_BOTTOM=2},1909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));t.OrderView=n.default;var r=s(o(52025));t.SharedOrderView=r.default},52025:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));class r extends n.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=r},55407:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(81787),r=s(o(96747));t.default=class{constructor(e,t,o){this.rootNode=e,this.nodesPool=t,this.sizeSet=new r.default,this.childNodeType=o.toUpperCase(),this.visualIndex=0,this.collectedNodes=[]}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(n.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let r=this.getRenderedChildCount();for(;r<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(n.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),r+=1}const i=o&&t.isPlaceOn(n.WORKING_SPACE_TOP);for(;r>s;)e.removeChild(i?e.firstChild:e.lastChild),r-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(n.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},79193:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},96747:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(79193)),r=o(81787);t.default=class{constructor(){this.size=new n.default,this.workingSpace=r.WORKING_SPACE_ALL,this.sharedSize=null}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof n.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=r.WORKING_SPACE_TOP,e.workingSpace=r.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=r.WORKING_SPACE_BOTTOM,e.workingSpace=r.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},72772:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}}},57293:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(22232),r=o(46003);var i=class{constructor(e,t,o,s,n){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=n,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer,r=t.documentElement.offsetWidth,i=e.getSetting("totalColumns"),l=e.getSetting("preventOverflow"),a=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),d=r-(a?h.right-r:h.left);let c,u;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(d,r):Math.min(this.getContainerFillWidth(),d,r),n===o&&i>0&&this.sumColumnWidths(0,i-1)>c)return t.documentElement.clientWidth;if(n!==o&&(u=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===u||"hidden"===u||"auto"===u))return Math.max(c,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?c:Math.max(c,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=t.length;o<n;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n,i,l;this.rowHeaderWidth=NaN,n=t.getSetting("renderAllRows")&&e===r.RENDER_TYPE?1/0:this.getViewportHeight();let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),d=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return h&&a>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=l,n-=l),d&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(c-d,c),n-=l),i=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new r.ViewportRowsCalculator({viewportSize:n,scrollOffset:a,totalItems:t.getSetting("totalRows"),itemSizeFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,scrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const l=t.getSetting("fixedColumnsStart");if(l&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);i+=e,n-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new r.ViewportColumnsCalculator({viewportSize:n,scrollOffset:i,totalItems:t.getSetting("totalColumns"),itemSizeFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingItemWidthFn:(e,o)=>t.getSetting("onBeforeStretchingColumnWidth",e,o),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),o=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(r.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(r.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startRow:n,endRow:r}=this.rowsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startColumn:n,endColumn:r}=this.columnsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,n.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}};t.default=i},73596:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(16247),o(25671),o(97796),o(36662);var n=s(o(78900)),r=o(45433),i=o(3177),l=s(o(56307)),a=o(22489),h=o(65324),d=o(57924),c=o(48253),u=o(21280);function g(e,t){const o=new n.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=u.CellCoords,t.CellRange=u.CellRange,(0,h.registerCellType)(d.TextCellType),g.editors={BaseEditor:c.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,i.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=u.CellCoords,g.CellRange=u.CellRange,g.packageName="handsontable",g.buildDate="28/08/2023 09:46:15",g.version="13.1.0-next-f35a363-20230828",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};var f=g;t.default=f},78380:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25815),n=o(16124),r=o(67156);const i="autocomplete";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator};t.AutocompleteCellType=l},83954:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78380);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},30749:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63729),n=o(8877);const r="checkbox";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:n.checkboxRenderer};t.CheckboxCellType=i},42855:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30749);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},24259:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58437),n=o(16124),r=o(82951);const i="date";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.DateEditor,renderer:n.autocompleteRenderer,validator:r.dateValidator};t.DateCellType=l},56844:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24259);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},72061:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9535),n=o(16124),r=o(67156);const i="dropdown";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.DropdownEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator};t.DropdownCellType=l},65867:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72061);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},85334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93273),n=o(16124);const r="handsontable";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:n.autocompleteRenderer};t.HandsontableCellType=i},243:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85334);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},74319:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,u.registerCellType)(s.AutocompleteCellType),(0,u.registerCellType)(n.CheckboxCellType),(0,u.registerCellType)(r.DateCellType),(0,u.registerCellType)(i.DropdownCellType),(0,u.registerCellType)(l.HandsontableCellType),(0,u.registerCellType)(a.NumericCellType),(0,u.registerCellType)(h.PasswordCellType),(0,u.registerCellType)(d.TextCellType),(0,u.registerCellType)(c.TimeCellType)};var s=o(83954);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(42855);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var r=o(56844);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var i=o(65867);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var l=o(243);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(68683);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(81762);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var d=o(57924);t.TextCellType=d.TextCellType,t.TEXT_TYPE=d.CELL_TYPE;var c=o(8228);t.TimeCellType=c.TimeCellType,t.TIME_TYPE=c.CELL_TYPE;var u=o(65324);t.registerCellType=u.registerCellType,t.getCellType=u.getCellType,t.getRegisteredCellTypeNames=u.getRegisteredCellTypeNames,t.getRegisteredCellTypes=u.getRegisteredCellTypes,t.hasCellType=u.hasCellType},68683:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79486);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},79486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97130),n=o(78416),r=o(71);const i="numeric";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.NumericEditor,renderer:n.numericRenderer,validator:r.numericValidator,dataType:"number"};t.NumericCellType=l},81762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40229);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},40229:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63630),n=o(76978);const r="password";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1};t.PasswordCellType=i},65324:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCellType=function(e){if(!d(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:n}=t;o&&(0,r.registerEditor)(e,o);s&&(0,i.registerRenderer)(e,s);n&&(0,l.registerValidator)(e,n);a(e,t)},o(60740);var n=s(o(63800)),r=o(83605),i=o(7462),l=o(80239);const{register:a,getItem:h,hasItem:d,getNames:c,getValues:u}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=u,t.getRegisteredCellTypeNames=c,t.hasCellType=d},57924:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80617);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},80617:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(50695);const r="text";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.TextEditor,renderer:n.textRenderer};t.TextCellType=i},8228:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90214);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},90214:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65930),n=o(43853),r=o(85342);const i="time";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.TimeEditor,renderer:n.timeRenderer,validator:r.timeValidator};t.TimeCellType=l},78900:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t){var o;let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],D=!1,H=this;const L=new h.default(H);let k,V,F,W,B=!0;(0,R.hasValidParameter)(s)&&(0,R.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const U=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",j=["rtl","ltr"].includes(U)?U:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",j),this.isRtl=function(){return"rtl"===j},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const Y=new I.MetaManager(H,t,[I.DynamicCellMetaMod,I.ExtendMetaPropertiesMod]),G=Y.getTableMeta(),z=Y.getGlobalMeta(),K=(0,N.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,R.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterRowSequenceChange",e)})),V=new v.default(H),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const $=e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?H.columnIndexMapper.getRenderableFromVisualIndex(o):o)};let X=new M.Selection(G,{rowIndexMapper:()=>H.rowIndexMapper,columnIndexMapper:()=>H.columnIndexMapper,countCols:()=>H.countCols(),countRows:()=>H.countRows(),propToCol:e=>k.propToCol(e),isEditorOpened:()=>!!H.getActiveEditor()&&H.getActiveEditor().isOpened(),countColsTranslated:()=>this.view.countRenderableColumns(),countRowsTranslated:()=>this.view.countRenderableRows(),getShortcutManager:()=>H.getShortcutManager(),createCellCoords:(e,t)=>H._createCellCoords(e,t),createCellRange:(e,t,o)=>H._createCellRange(e,t,o),visualToRenderableCoords:$,renderableToVisualCoords:e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?H.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>H.getCellMeta(e,t).disableVisualSelection});this.selection=X;const q=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function Q(e){const t=(0,O.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(H.runHooks("beforeLanguageChange",t),z.language=t,H.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function J(e,t){const o="className"===e?H.rootElement:H.table;if(B)(0,n.addClass)(o,t);else{let s=[],r=[];z[e]&&(s=Array.isArray(z[e])?z[e]:(0,c.stringToArray)(z[e])),t&&(r=Array.isArray(t)?t:(0,c.stringToArray)(t));const i=(0,c.getDifferenceOfArrays)(s,r),l=(0,c.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}z[e]=t}function Z(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ee(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function te(e,t,o){if(!e.length)return;const s=H.getActiveEditor(),r=new Z;let i=!0;r.onQueueEmpty=e=>{s&&i&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,l,,a]=e[o],h=k.propToCol(l),d=H.getCellMeta(s,h);"numeric"===d.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[o][3]=ee(a)),H.getCellValidator(d)&&(r.addValidatorToQueue(),H.validateCell(e[o][3],d,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){i=!1,e.splice(t,1),o.valid=!0;const s=H.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,G.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,d),t))}r.checkIfQueueIsEmpty()}function oe(e,t){let o=e.length-1;if(o<0)return;for(;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(G.allowInsertRow)for(;e[o][0]>H.countRows()-1;){const{delta:e}=k.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===H.dataType&&(!G.columns||0===G.columns.length)&&G.allowInsertColumn)for(;k.propToCol(e[o][1])>H.countCols()-1;){const{delta:e}=k.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||k.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}H.forceFullRender=!0,F.adjustRowsAndCols(),H.runHooks("beforeChangeRender",e,t),W.lockEditor(),H._refreshBorders(null),W.unlockEditor(),H.view.adjustElementsSize(),H.runHooks("afterChange",e,t||"edit");const s=H.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function se(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ne(e,t){const o=H.getActiveEditor(),s=H.runHooks("beforeChange",e,t||"edit"),n=e.filter((e=>null!==e));return!1===s||0===n.length?(o&&o.cancelChanges(),[]):n}this.columnIndexMapper.addLocalHook("cacheUpdated",q),this.rowIndexMapper.addLocalHook("cacheUpdated",q),this.selection.addLocalHook("beforeSetRangeStart",(e=>{this.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(e=>{this.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(e=>{this.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=this.view._wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=this.view._wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,d.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),i=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,i),this.runHooks("afterSelectionByProp",s.row,H.colToProp(s.col),r.row,H.colToProp(r.col),t,i);const l=this.selection.isSelectedByAnyHeader(),a=this.selection.selectedRange.current();let h=!0;D&&(h=!1),t.isTouched()&&(h=!t.value);const c=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();!1!==h&&(l?c?this.view.scrollViewportVertically(H.rowIndexMapper.getRenderableFromVisualIndex(e.row)):u&&this.view.scrollViewportHorizontally(H.columnIndexMapper.getRenderableFromVisualIndex(e.col)):a&&!this.selection.isMultiple()?this.view.scrollViewport($(a.from)):this.view.scrollViewport($(e))),c&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):u?((0,n.removeClass)(this.rootElement,"ht__selection--rows"),(0,n.addClass)(this.rootElement,"ht__selection--columns")):(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,H.colToProp(o.col),s.row,H.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(e=>{this.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",((e,t,o)=>{this.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(e=>{this.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",((e,t,o)=>{this.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(()=>{W.destroyEditor(),this._refreshBorders(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(e=>{this.alter("insert_row_above",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(e=>{this.alter("insert_col_start",e,1,"auto")})),F={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const a=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,c.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[r,i]=n,l=r+i;if(o<=l){const e=Math.max(s-(l-o),0);n[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const l=H.countSourceRows();if(G.maxRows===l)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?l:0;const{delta:d,startPhysicalIndex:u}=k.createRow(t,n,{source:r,mode:h});if(d){const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=H.toVisualRow(u);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;X.isSelectedByRowHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(o+d,r),!0),X.setRangeEnd(H._createCellCoords(s+d,n))}else H._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?H.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=k.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray(G.colHeaders)){const e=[H.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(G.colHeaders,e)}const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=H.toVisualColumn(p);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;X.isSelectedByColumnHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(r,o+f),!0),X.setRangeEnd(H._createCellCoords(s,n+f))}else H._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeRow(o,s,r))return;const l=H.countRows(),a=G.fixedRowsTop;a>=n+1&&(G.fixedRowsTop-=Math.min(s,a-n));const h=G.fixedRowsBottom;h&&n>=l-h&&(G.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countCols()-1:Math.max(o-t,0);let l=H.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeCol(o,s,r))return;const a=G.fixedColumnsStart;a>=n+1&&(G.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(G.colHeaders)&&(void 0===l&&(l=-1),G.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||F.adjustRowsAndCols()},adjustRowsAndCols(){const e=G.minRows,t=G.minSpareRows,o=G.minCols,s=G.minSpareCols;if(0===H.countRows()&&0===H.countCols()&&X.deselect(),e){const t=H.countRows();t<e&&k.createRow(t,e-t,{source:"auto"})}if(t){const e=H.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,G.maxRows-H.countSourceRows());k.createRow(H.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=H.countEmptyCols(!0));let t=H.countCols();if(o&&!G.columns&&t<o){const s=o-t;e+=s,k.createCol(t,s,{source:"auto"})}if(s&&!G.columns&&"array"===H.dataType&&e<s){t=H.countCols();const o=s-e,n=Math.min(o,G.maxCols-t);k.createCol(t,n,{source:"auto"})}}if(X.isSelected()){const e=H.countRows(),t=H.countCols();(0,c.arrayEach)(X.selectedRange,(o=>{let s=!1,n=o.from.row,r=o.from.col,i=o.to.row,l=o.to.col;n>e-1?(n=e-1,s=!0,i>n&&(i=n)):i>e-1&&(i=e-1,s=!0,n>i&&(n=i)),r>t-1?(r=t-1,s=!0,l>r&&(l=r)):l>t-1&&(l=t-1,s=!0,r>l&&(r=l)),s&&H.selectCell(n,r,i,l)}))}H.view&&H.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,d.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,c.pivot)(t),w=n.length,y=Math.max(w,m),v=H.getData().slice(f),E=(0,c.pivot)(v).slice(p,p+y);for(l=0;l<y;l+=1)if(l<w){for(r=0,i=n[l].length;r<C-i;r+=1)n[l].push(n[l][r%i]);l<E.length?g.push(n[l].concat(E[l])):g.push(n[l].concat(new Array(v.length).fill(null)))}else g.push(n[l%w].concat(E[l]));H.populateFromArray(f,p,(0,c.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,C),b=H.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<S){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(b[r]));H.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let T,_=0,O=0,M=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(i=o?A:Math.max(N,A),r=0;r<i&&!(o&&u.row>o.row&&A>N||!G.allowInsertRow&&u.row>H.countRows()-1||u.row>=G.maxRows);r++){const t=r-_,n=I(t).length,c=o?o.col-e.col+1:0;if(a=o?c:Math.max(n,c),u.col=e.col,T=H.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!T.skipRowOnPaste){for(O=0,l=0;l<a&&!(o&&u.col>o.col&&c>n||!G.allowInsertColumn&&u.col>H.countCols()-1||u.col>=G.maxCols);l++){if(T=H.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&T.skipColumnOnPaste){O+=1,u.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-O),o=H.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)M=!1;else{const t=(0,d.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,d.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,d.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,d.deepClone)(e):M=!1}else null!==o&&"object"==typeof o&&(M=!1);M&&h.push([u.row,u.col,e]),M=!0,u.col+=1}u.row+=1}else _+=1,u.row+=1,i+=1}H.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){V.setData(G.data),H.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(H.rootElement,"mobile"),this.updateSettings(G,!0),this.view=new y.default(this),W=a.default.getInstance(H,G,X),H.runHooks("init"),this.forceFullRender=!0,this.view.render(),B&&null===H.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(H.rootElement,(()=>{H.view._wt.wtOverlays.updateLastSpreaderSize(),H.render(),H.view.adjustElementsSize()})),"object"==typeof B&&(H.runHooks("afterChange",B[0],B[1]),B=!1),H.runHooks("afterInit")},this._createCellCoords=function(e,t){return H.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return H.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=H.getCellValidator(t);function l(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,n=t.visualRow,r=H.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=H.rowIndexMapper.getRenderableFromVisualIndex(n),t=H.columnIndexMapper.getRenderableFromVisualIndex(s);H.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var a;(0,i.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,r.isFunction)(n)?(e=H.runHooks("beforeValidate",e,t.visualRow,t.prop,s),H._registerImmediate((()=>{n.call(t,e,(o=>{H&&(o=H.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),H.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):H._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a,h=s;for(i=0,l=n.length;i<l;i++){if("object"!=typeof n[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[i][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=n[i][1]>=this.countCols()?n[i][1]:k.colToProp(n[i][1]),r.push([n[i][0],a,V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const d=ne(r,s);H.runHooks("afterSetDataAtCell",d,h),te(d,h,(()=>{oe(d,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a=s;for(i=0,l=n.length;i<l;i++)r.push([n[i][0],n[i][1],V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=ne(r,s);H.runHooks("afterSetDataAtRowProp",h,a),te(h,a,(()=>{oe(h,a)}))},this.listen=function(){H&&!H.isListening()&&(x=H.guid,H.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(x=null,H.runHooks("afterUnlisten"))},this.isListening=function(){return x===H.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];H._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,n,r,i){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof s?H._createCellCoords(s,n):null;return F.populateFromArray(H._createCellCoords(e,t),o,l,r,i)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceRow(e,t,o,...n)},this.getSelected=function(){if(X.isSelected())return(0,c.arrayMap)(X.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(X.isSelected())return Array.from(X.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!X.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,c.arrayEach)(X.getSelectedRange(),(e=>{const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,w.rangeEach)(o.row,s.row,(e=>{(0,w.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(W.lockEditor(),this._refreshBorders(null),W.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!H.view)return;const{width:e,height:t}=H.view.getLastSize(),{width:o,height:s}=H.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===H.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||H.view._wt.wtOverlays.scrollableElement===H.rootWindow)&&(H.view.setLastSize(o,s),H.render()),H.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(e=>{k=e,H.columnIndexMapper.fitToLength(this.getInitialColumnCount()),H.rowIndexMapper.fitToLength(this.countSourceRows()),F.adjustRowsAndCols()}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"updateData",source:t,metaManager:Y,firstRun:B})},this.loadData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(()=>{Y.clearCellsCache(),H.initIndexMappers(),F.adjustRowsAndCols(),B&&(B=[null,"loadData"])}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"loadData",source:t,metaManager:Y,firstRun:B})},this.getInitialColumnCount=function(){const e=G.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===H.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==H.dataType&&"function"!==H.dataType||(t=k.colToPropCache.length);else if((0,i.isDefined)(G.dataSchema)){const e=k.getSchema();t=Array.isArray(e)?e.length:(0,d.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,i.isUndefined)(e)?k.getAll():k.getRange(H._createCellCoords(e,t),H._createCellCoords(o,s),k.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return k.getCopyableText(H._createCellCoords(e,t),H._createCellCoords(o,s))},this.getCopyableData=function(e,t){return k.getCopyable(e,k.colToProp(t))},this.getSchema=function(){return k.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(B?H.loadData:H.updateData).bind(this);let s,n,l=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?Q(e.language):"className"===s?J("className",e.className):"tableClassName"===s&&H.table?(J("tableClassName",e.tableClassName),H.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,H.addHook(s,e[s])):!t&&(0,d.hasOwnProperty)(e,s)&&(z[s]=e[s]));void 0===e.data&&void 0===G.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(k.createMap(),H.initIndexMappers());const a=H.countCols(),h=G.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||Y.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&Y.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,d.objectEach)(e.cell,(e=>{H.setCellMetaObject(e.row,e.col,e)})),H.runHooks("afterCellMetaReset");let c=H.rootElement.style.height;""!==c&&(c=parseInt(H.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){H.rootElement.getAttribute("style")&&H.rootElement.setAttribute("data-initialstyle",H.rootElement.getAttribute("style"))}if(null===u){const e=H.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?H.rootElement.setAttribute("style",e):(H.rootElement.style.height="",H.rootElement.style.overflow="")}else void 0!==u&&(H.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,H.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),H.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(H.view&&(H.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),H.view._wt.exportSettingsAsClassNames()),H.runHooks("afterUpdateSettings",e)),F.adjustRowsAndCols(),H.view&&!B&&(H.forceFullRender=!0,W.lockEditor(),H._refreshBorders(null),H.view._wt.wtOverlays.adjustElementsSize(),W.unlockEditor()),t||!H.view||""!==c&&""!==u&&void 0!==u||c===u||H.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=H.getSelectedLast();if(G.getValue){if((0,r.isFunction)(G.getValue))return G.getValue.call(H);if(e)return H.getData()[e[0][0]][G.getValue]}else if(e)return H.getDataAtCell(e[0],e[1])},this.getSettings=function(){return G},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){F.alter(e,t,o,s,n)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,n=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;n=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===s?null:H.view.getCellAtCoords(H._createCellCoords(n,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let n=o,r=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),H._createCellCoords(n,r)},this.colToProp=function(e){return k.colToProp(e)},this.propToCol=function(e){return k.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return k.get(e,k.colToProp(t))},this.getDataAtRowProp=function(e,t){return k.get(e,t)},this.getDataAtCol=function(e){const t=[],o=k.getRange(H._createCellCoords(0,e),H._createCellCoords(G.data.length-1,e),k.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=k.getRange(H._createCellCoords(0,k.propToCol(e)),H._createCellCoords(G.data.length-1,k.propToCol(e)),k.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let n;return n=void 0===e?V.getData():V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?V.getData(!0):V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return V.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,V.getAtCell(t,o),s])})),(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;V.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=H.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return V.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return V.getAtCell(e,t)},this.getDataAtRow=function(e){return k.getRange(H._createCellCoords(e,0),H._createCellCoords(e,this.countCols()-1),k.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const n=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[r,i]=n;let[,,l,a]=n,h=null,d=null;void 0===l&&(l=r),void 0===a&&(a=i);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return d=s.type,h?t=h===d:h=d,t})),c=t?d:"mixed",t})),c},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=Y.getCellMetaKeyValue(s,n,o);!1!==H.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(Y.removeCellMeta(s,n,o),H.runHooks("afterRemoveCellMeta",e,t,o,r)),r=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),n=2;n<o;n++)s[n-2]=arguments[n];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&Y.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,c.arrayEach)(s.reverse(),(t=>{Y.createRow(this.toPhysicalRow(e)),(0,c.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),H.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,d.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===H.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,r=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),Y.setCellMeta(n,r,o,s),H.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return Y.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),Y.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return Y.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===H.dataType||G.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,f.getRenderer)(o):(0,i.isUndefined)(o)?(0,f.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,p.getEditor)(o):(0,i.isUndefined)(o)?(0,p.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,m.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new Z;e&&(s.onQueueEmpty=e);let n=H.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=H.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),H.validateCell(H.getDataAtCell(n,e),H.getCellMeta(n,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;n-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=G.rowHeaders,o=e;return void 0!==o&&(o=H.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,w.rangeEach)(H.countRows()-1,(e=>{t.push(H.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!G.rowHeaders},this.hasColHeaders=function(){if(void 0!==G.colHeaders&&null!==G.colHeaders)return!!G.colHeaders;for(let e=0,t=H.countCols();e<t;e++)if(H.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=H.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=H.countCols();for(let o=0;o<t;o++)e.push(H.getColHeader(o));return e}let s=G.colHeaders;const n=H.toPhysicalColumn(o),i=function(e){const t=[],o=H.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(G.columns)&&G.columns(s)&&t.push(s);return t[e]}(n);return!1===G.colHeaders?s=null:G.columns&&(0,r.isFunction)(G.columns)&&G.columns(i)&&G.columns(i).title?s=G.columns(i).title:G.columns&&G.columns[n]&&G.columns[n].title?s=G.columns[n].title:Array.isArray(G.colHeaders)&&void 0!==G.colHeaders[n]?s=G.colHeaders[n]:(0,r.isFunction)(G.colHeaders)?s=G.colHeaders(n):G.colHeaders&&"string"!=typeof G.colHeaders&&"number"!=typeof G.colHeaders&&(s=(0,E.spreadsheetColumnLabel)(o)),s=H.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=H.getCellMeta(0,e).width}if(void 0!==t&&t!==G.width||(t=G.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=H._getColWidthFromSettings(e);return t=H.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=G.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=H._getRowHeightFromSettings(e);return t=H.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return V.countRows()},this.countSourceCols=function(){return V.countFirstRowKeys()},this.countRows=function(){return k.getLength()},this.countCols=function(){const e=G.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(H.countRows()-1,(o=>{if(H.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(H.countCols()-1,(o=>{if(H.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return G.isEmptyRow.call(H,e)},this.isEmptyCol=function(e){return G.isEmptyCol.call(H,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,r)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(D=!0);const o=X.selectCells(e);return o&&t&&H.listen(),D=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectColumns(e,t)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectRows(e,t)},this.deselectCell=function(){X.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e&&this.hasRowHeaders(),o=e&&this.hasColHeaders();D=!0,X.selectAll(t,o),D=!1};const re=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=!o,r=!s;let i=e,l=t;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){const o=Number.isInteger(e),s=Number.isInteger(t),n=o?re(this.rowIndexMapper,e):void 0,r=s?re(this.columnIndexMapper,t):void 0;if(null===n||null===r)return!1;i=o?H.rowIndexMapper.getRenderableFromVisualIndex(n):void 0,l=s?H.columnIndexMapper.getRenderableFromVisualIndex(r):void 0}const a=Number.isInteger(i),h=Number.isInteger(l);return a&&h?H.view.scrollViewport(H._createCellCoords(i,l),n,s,o,r):a&&!1===h?H.view.scrollViewportVertically(i,n,o):!(!h||!1!==a)&&H.view.scrollViewportHorizontally(l,s,r)},this.destroy=function(){if(H._clearTimeouts(),H._clearImmediates(),H.view&&H.view.destroy(),V&&V.destroy(),V=null,this.getShortcutManager().destroy(),Y.clearCache(),(0,R.isRootInstance)(H)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(H.rootElement),L.destroy(),W&&W.destroy(),H.batchExecution((()=>{H.rowIndexMapper.unregisterAll(),H.columnIndexMapper.unregisterAll(),K.getItems().forEach((e=>{let[,t]=e;t.destroy()})),K.clear(),H.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(H),(0,d.objectEach)(H,((e,t,o)=>{var s;(0,r.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),H.isDestroyed=!0,k&&k.destroy(),k=null,F=null,X=null,W=null,H=null},this.getActiveEditor=function(){return W.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:K.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:K.getId(e)},this.getInstance=function(){return H},this.addHook=function(e,t){T.default.getSingleton().add(e,t,H)},this.hasHook=function(e){return T.default.getSingleton().has(e,H)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,H)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,H)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(H,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)(G.language,e,t)},this.toHTML=()=>(0,u.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,u.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,c.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,c.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W.destroyEditor(e),H.view.render(),t&&X.isSelected()&&W.prepareEditor()},this.isRtl=function(){return"rtl"===H.rootWindow.getComputedStyle(H.rootElement).direction},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1};const ie=(0,A.createShortcutManager)({handleEvent(e){const t=H.isListening(),o=void 0!==(null==e?void 0:e.key);return t&&o},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||H.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ie.releasePressedKeys()})),this.getShortcutManager=function(){return ie};const le=ie.addContext("grid"),ae={runOnlyIf:()=>(0,i.isDefined)(H.getSelected())&&H.countRenderedRows()>0&&H.countRenderedCols()>0,group:P};ie.setActiveContextName("grid"),le.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>{H.selectAll()}},{keys:[["Control/Meta","Enter"]],callback:()=>{const e=H.getSelectedRange(),{row:t,col:o}=e[e.length-1].highlight,s=H.getDataAtCell(t,o),n=new Map;for(let r=0;r<e.length;r++)e[r].forAll(((e,r)=>{if(e>=0&&r>=0&&(e!==t||r!==o)){const{readOnly:t}=H.getCellMeta(e,r);t||n.set(`${e}x${r}`,[e,r,s])}}));H.setDataAtCell(Array.from(n.values()))},runOnlyIf:()=>H.getSelectedRangeLast().getCellsCount()>1},{keys:[["ArrowUp"]],callback:()=>{X.transformStart(-1,0)}},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(0,1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowUp","Shift"]],callback:()=>{X.transformEnd(-1,0)}},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(0,1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>{X.transformStart(1,0)}},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowDown","Shift"]],callback:()=>{X.transformEnd(1,0)}},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>{X.transformStart(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowLeft","Shift"]],callback:()=>{X.transformEnd(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>{X.transformStart(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowRight","Shift"]],callback:()=>{X.transformEnd(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedColumnsStart,10),t=H.getSelectedRangeLast().highlight.row,o=H.columnIndexMapper.getNearestNotHiddenIndex(e,1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(0,1)))}},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsTop,10),t=parseInt(H.getSettings().fixedColumnsStart,10),o=H.rowIndexMapper.getNearestNotHiddenIndex(e,1),s=H.columnIndexMapper.getNearestNotHiddenIndex(t,1);X.setRangeStart(H._createCellCoords(o,s))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.getSelectedRangeLast().highlight.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))}},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsBottom,10),t=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-e-1,-1),o=H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>{X.transformStart(-H.countVisibleRows(),0)}},{keys:[["PageUp","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.max(e.row-H.countVisibleRows(),0),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.max(t.row-s,0);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["PageDown"]],callback:()=>{X.transformStart(H.countVisibleRows(),0)}},{keys:[["PageDown","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.min(e.row+H.countVisibleRows(),H.countRows()-1),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,-1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.min(t.row-s,H.countRows()-1);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(t.row,t.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(-t.row,-t.col)}}],ae),(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);K.addItem(e,new t(this))})),T.default.getSingleton().run(H,"construct")},o(95988),o(60740),o(6282);var n=o(83302),r=o(85015),i=o(93315),l=o(37595),a=s(o(6116)),h=s(o(75244)),d=o(22232),c=o(50095),u=o(52870),g=o(52036),f=o(7462),p=o(83605),m=o(80239),C=o(18609),w=o(68145),y=s(o(54833)),v=s(o(43951)),E=o(65320),S=o(33165),R=o(45433),b=o(21280),T=s(o(56307)),_=o(22489),O=o(8222),M=o(69167),I=o(3177),N=o(42386),A=o(47152);const P="gridDefault";let x=null;new Set},85631:(e,t,o)=>{"use strict";t.__esModule=!0,o(60740),o(95988);var s=o(29270),n=o(65320),r=o(22232),i=o(50095),l=o(68145),a=o(93315);class h{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){this.instance=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,n=0,i=!1;if("function"==typeof t){const t=(0,r.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=i?t(o):t[o];if((0,r.isObject)(e)){if(void 0!==e.data){const t=i?n:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}n+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,n=t,i=o;return void 0===n&&(n=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,r.objectEach)(e,((e,t)=>{null===e?(s=i+t,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):n=this.recursiveDuckColumns(e,n,`${t}.`)})),n}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.instance.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,a.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,a.isDefined)(t))return this.instance.toVisualColumn(t);const o=this.instance.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,r.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.instance.countSourceRows();let i=n,a=0,h=e;("number"!=typeof h||h>=n)&&(h=n),h<this.instance.countRows()&&(i=this.instance.toPhysicalRow(h));if(!1===this.instance.runHooks("beforeCreateRow",h,t,o)||null===i)return{delta:0};const d=this.tableMeta.maxRows,c=this.getSchema().length,u=[];for(;a<t&&n+a<d;){let e=null;"array"===this.instance.dataType?this.tableMeta.dataSchema?e=(0,r.deepClone)(this.getSchema()):(e=[],(0,l.rangeEach)(c-1,(()=>e.push(null)))):"function"===this.instance.dataType?e=this.tableMeta.dataSchema(h+a):(e={},(0,r.deepExtend)(e,this.getSchema())),u.push(e),a+=1}this.instance.rowIndexMapper.insertIndexes(h,a),"below"===s&&(i=Math.min(i+1,n)),this.spliceData(i,0,u);const g=this.instance.toVisualRow(i);return this.instance.countSourceRows()===u.length&&this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount()),a>0&&(null==e?this.metaManager.createRow(null,a):"auto"!==o&&this.metaManager.createRow(i,t)),this.instance.runHooks("afterCreateRow",g,a,o),this.instance.forceFullRender=!0,{delta:a,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const n=this.dataSource,r=this.tableMeta.maxCols,i=this.instance.countSourceCols();let l=e;("number"!=typeof l||l>=i)&&(l=i);if(!1===this.instance.runHooks("beforeCreateCol",l,t,o))return{delta:0};let a=i;l<this.instance.countCols()&&(a=this.instance.toPhysicalColumn(l));const h=this.instance.countSourceRows();let d=this.instance.countCols(),c=0,u=a;"end"===s&&(u=Math.min(u+1,i));const g=u;for(;c<t&&d<r;){if("number"!=typeof l||l>=d)if(h>0)for(let e=0;e<h;e+=1)void 0===n[e]&&(n[e]=[]),n[e].push(null);else n.push([null]);else for(let e=0;e<h;e++)n[e].splice(u,0,null);c+=1,u+=1,d+=1}this.instance.columnIndexMapper.insertIndexes(l,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.instance.toVisualColumn(g);return this.instance.runHooks("afterCreateCol",f,c,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const n=this.visualRowsToPhysical(s,t),r=this.instance.countSourceRows();s=(r+s)%r;if(!1===this.instance.runHooks("beforeRemoveRow",s,n.length,n,o))return!1;const i=n.length;if(this.filterData(s,i,n),s<this.instance.countRows()){this.instance.rowIndexMapper.removeIndexes(n);const e=(0,a.isDefined)(this.tableMeta.columns)||(0,a.isDefined)(this.tableMeta.dataSchema);0===this.instance.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.instance.columnIndexMapper.setIndexesSequence([])}return n.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.instance.runHooks("afterRemoveRow",s,i,n,o),this.instance.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.instance.countCols()+s)%this.instance.countCols();const n=this.visualColumnsToPhysical(s,t),r=n.slice(0).sort(((e,t)=>t-e));if(!1===this.instance.runHooks("beforeRemoveCol",s,t,n,o))return!1;let i=!0;const l=r.length,a=this.dataSource;for(let e=0;e<l;e++)i&&n[0]!==n[e]-e&&(i=!1);if(i)for(let e=0,o=this.instance.countSourceRows();e<o;e++)a[e].splice(n[0],t),0===e&&this.metaManager.removeColumn(n[0],t);else for(let e=0,t=this.instance.countSourceRows();e<t;e++)for(let t=0;t<l;t++)a[e].splice(r[t],1),0===e&&this.metaManager.removeColumn(r[t],1);return s<this.instance.countCols()&&(this.instance.columnIndexMapper.removeIndexes(n),0===this.instance.columnIndexMapper.getNotTrimmedIndexesLength()&&this.instance.rowIndexMapper.setIndexesSequence([])),this.instance.runHooks("afterRemoveCol",s,t,n,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.instance.getDataAtCol(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let d=0;for(;d<o;)a.push(null),d+=1;return(0,i.to2dArray)(a),this.instance.populateFromArray(t,e,a,null,null,"spliceCol"),n}spliceRow(e,t,o){const s=this.instance.getSourceDataAtRow(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let d=0;for(;d<o;)a.push(null),d+=1;return this.instance.populateFromArray(e,t,[a],null,null,"spliceRow"),n}spliceData(e,t,o){if(!1!==this.instance.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.instance.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.instance.toPhysicalRow(e);let s=this.dataSource[o];const n=this.instance.runHooks("modifyRowData",o);s=isNaN(n)?n:s;let i=null;if(s&&s.hasOwnProperty&&(0,r.hasOwnProperty)(s,t))i=s[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o=s;if(!o)return null;for(let t=0,s=e.length;t<s;t++)if(o=o[e[t]],void 0===o)return null;i=o}else"function"==typeof t&&(i=t(this.dataSource.slice(o,o+1)[0]));if(this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(i);this.instance.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(i=e.value)}return i}getCopyable(e,t){return this.instance.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.instance.toPhysicalRow(e);let n=o,i=this.dataSource[s];const l=this.instance.runHooks("modifyRowData",s);if(i=isNaN(l)?l:i,this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(n);this.instance.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}if(i&&i.hasOwnProperty&&(0,r.hasOwnProperty)(i,t))i[t]=n;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o,s=i,r=0;for(r=0,o=e.length-1;r<o;r++)void 0===s[e[r]]&&(s[e[r]]={}),s=s[e[r]];s[e[r]]=n}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],n):i[t]=n}visualRowsToPhysical(e,t){const o=this.instance.countSourceRows(),s=[];let n,r=(o+e)%o,i=t;for(;r<o&&i;)n=this.instance.toPhysicalRow(r),s.push(n),i-=1,r+=1;return s}visualColumnsToPhysical(e,t){const o=this.instance.countCols(),s=[];let n=(o+e)%o,r=t;for(;n<o&&r;){const e=this.instance.toPhysicalColumn(n);s.push(e),r-=1,n+=1}return s}clear(){for(let e=0;e<this.instance.countSourceRows();e++)for(let t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.instance.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.instance.countRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,h.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let n,r,i;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const d=o===h.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max(a-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=c;n++){i=[];const o=n>=0?this.instance.toPhysicalRow(n):n;for(r=Math.min(e.col,t.col);r<=u&&null!==o;r++)i.push(d.call(this,n,this.colToProp(r)));null!==o&&s.push(i)}return s}getText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.instance=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var d=h;t.default=d},43951:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=o(22232),n=o(65320),r=o(50095),i=o(68145),l=o(85015);var a=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.hot=e,this.data=t,this.dataType="array",this.colToProp=()=>{},this.propToCol=()=>{}}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,r.arrayEach)(this.data,((o,s)=>{const n=this.getAtCell(s,e);t.push(n)})),t}getAtRow(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=void 0===t&&void 0===o;let a=null,h=null;if(a=this.modifyRowData(e),Array.isArray(a))h=[],r?a.forEach(((t,o)=>{h[o]=this.getAtPhysicalCell(e,o,a)})):(0,i.rangeEach)(t,o,(o=>{h[o-t]=this.getAtPhysicalCell(e,o,a)}));else if((0,s.isObject)(a)||(0,l.isFunction)(a))if(h=n?[]:{},!r||n){const r=0,l=this.countFirstRowKeys()-1;(0,i.rangeEach)(r,l,(i=>{const d=this.colToProp(i);if(i>=(t||r)&&i<=(o||l)&&!Number.isInteger(d)){const t=this.getAtPhysicalCell(e,d,a);n?h.push(t):(0,s.setProperty)(h,d,t)}}))}else(0,s.objectEach)(a,((t,o)=>{(0,s.setProperty)(h,o,this.getAtPhysicalCell(e,o,a))}));return h}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,s.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(o=n.value)}Number.isInteger(t)?this.data[e][t]=o:(0,s.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let n=null;if(o&&(n="string"==typeof t?(0,s.getProperty)(o,t):"function"==typeof t?t(o):o[t]),this.hot.hasHook("modifySourceData")){const o=(0,s.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(n=o.value)}return n}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,n=null,r=null,l=null,a=null;null===e||null===t?(s=!0,n=0,l=this.countRows()-1):(n=Math.min(e.row,t.row),r=Math.min(e.col,t.col),l=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const h=[];return(0,i.rangeEach)(n,l,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,r,a,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}};t.default=a},3177:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(85631));t.DataMap=n.default;var r=s(o(10146));t.MetaManager=r.default;var i=s(o(87574));t.metaSchemaFactory=i.default;var l=o(73046);t.replaceData=l.replaceData;var a=o(24298);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(63511);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},10146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(23373)),r=s(o(34624)),i=s(o(22142)),l=s(o(7083)),a=s(o(65718)),h=o(22232);class d{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new n.default(e),this.tableMeta=new r.default(this.globalMeta),this.columnMeta=new i.default(this.globalMeta),this.cellMeta=new l.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:n}=o;const r=this.cellMeta.getMeta(e,t);return r.visualRow=s,r.visualCol=n,r.row=e,r.col=t,this.runLocalHooks("afterGetCellMeta",r),r}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=d,(0,h.mixin)(d,a.default)},32156:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=o(50095),n=o(8972);class r{constructor(e){this.valueFactory=e,this.data=[],this.index=[],this.holes=new Set}obtain(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const r=(0,n.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,r),...o,...this.index.slice(r)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,n.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,s.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}t.default=r},7083:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(22232),r=o(8972),i=s(o(32156));t.default=class{constructor(e){this.columnMeta=e,this.metas=new i.default((()=>this._createRow()))}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,n.extend)(s,o),(0,r.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var n;const r=this.metas.obtain(e).obtain(t);null===(n=r._automaticallyAssignedMetaProps)||void 0===n||n.delete(o),r[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)e.push(...t[o].values());return e}getMetasAtRow(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new i.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},22142:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(32156));const l=["data","width"];t.default=class{constructor(e){this.globalMeta=e,this.metas=new i.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,n.extend)(o,t),(0,r.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,r.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},23373:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(87574));t.default=class{constructor(e){this.metaCtor=class{},this.meta=this.metaCtor.prototype,(0,n.extend)(this.meta,(0,i.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,n.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},34624:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22232),n=o(8972);t.default=class{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,s.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,e,e)}}},87574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93315),n=o(22232);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",isEmptyCol(e){let t,o,n;for(t=0,o=this.countRows();t<o;t++)if(n=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(n))return!1;return!0},isEmptyRow(e){let t,o,r,i;for(t=0,o=this.countCols();t<o;t++)if(r=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(r))return"object"==typeof r&&(i=this.getCellMeta(e,t),(0,n.isObjectEqual)(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},24298:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(56307)),r=o(22232),i=o(85015);t.DynamicCellMetaMod=class{constructor(e){this.metaManager=e,this.metaSyncMemo=new Map,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),n.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:n,visualCol:l}=e,a=this.metaManager.hot,h=a.colToProp(l);e.prop=h,a.runHooks("beforeGetCellMeta",n,l,e);const d=(0,r.hasOwnProperty)(e,"type")?e.type:null;let c=(0,i.isFunction)(e.cells)?e.cells(o,s,h):null;var u;d&&(c?c.type=null!==(u=c.type)&&void 0!==u?u:d:c={type:d});c&&this.metaManager.updateCellMeta(o,s,c),a.runHooks("afterGetCellMeta",n,l,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},63511:(e,t,o)=>{"use strict";t.__esModule=!0,o(60740);t.ExtendMetaPropertiesMod=class{constructor(e){this.metaManager=e,this.usageTracker=new Set,this.propDescriptors=new Map([["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]]),this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:o,onChange:s=(()=>{})}=e,n="string"==typeof o,r=n?o:t,i=`_${r}`;this.metaManager.globalMeta.meta[i]=this.metaManager.globalMeta.meta[r],this.installPropWatcher(t,i,s),n&&this.installPropWatcher(o,i,s)}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(n){const r=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,n,r),this[t]=n},enumerable:!0,configurable:!0})}}},8972:(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,n.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(r))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};(0,s.objectEach)(r,((t,n)=>{var r;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(n,o)&&(i[n]=t,null===(r=e._automaticallyAssignedMetaProps)||void 0===r||r.add(n))})),(0,s.extend)(e,i)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(60740);var s=o(22232),n=o(65324)},73046:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:a,dataMap:h,dataSource:d,internalSource:c,source:u,metaManager:g,firstRun:f}=s,p=(0,n.toUpperCaseFirst)(c),m=a.getSettings();Array.isArray(m.dataSchema)?a.dataType="array":(0,r.isFunction)(m.dataSchema)?a.dataType="function":a.dataType="object";h&&h.destroy();e=a.runHooks(`before${p}`,e,f,u);const C=new i.default(a,e,g);if(t(C),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${c} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=C.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=m.startRows;s<n;s++)if("object"!==a.dataType&&"function"!==a.dataType||!m.dataSchema)if("array"===a.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=m.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(a.dataType="array");m.data=e,C.dataSource=e,d.data=e,d.dataType=a.dataType,d.colToProp=C.colToProp.bind(C),d.propToCol=C.propToCol.bind(C),d.countCachedColumns=C.countCachedColumns.bind(C),o(C),a.runHooks(`after${p}`,e,f,u),f||(a.runHooks("afterChange",null,c),a.render())},o(95988),o(60740);var n=o(18609),r=o(85015),i=s(o(85631)),l=o(22232)},6116:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(80151),r=o(24449),i=o(83302),l=o(83605),a=s(o(75244)),h=o(93315);const d="editorManager.navigation";t.SHORTCUTS_GROUP_NAVIGATION=d;const c="editorManager.handlingEditor";t.SHORTCUTS_GROUP_EDITOR=c;class u{constructor(e,t,o){this.instance=e,this.tableMeta=t,this.selection=o,this.eventManager=new a.default(e),this.destroyed=!1,this.lock=!1,this.activeEditor=void 0,this.cellProperties=void 0;this.instance.getShortcutManager().addContext("editor"),this.registerShortcuts(),this.instance.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.instance.isListening()&&this.openEditor("",e)})),this.instance.view._wt.update("onCellDblClick",((e,t,o)=>this.onCellDblClick(e,t,o)))}registerShortcuts(){const e=this.instance.getShortcutManager(),t=e.getContext("grid"),o=e.getContext("editor"),s={group:c};o.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:(t,o)=>{this.closeEditorAndSaveChanges(e.isCtrlPressed()),this.moveSelectionAfterEnter(o.includes("shift"))}},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>{this.closeEditorAndRestoreOriginalValue(e.isCtrlPressed()),this.activeEditor.focus()}}],s),t.addShortcuts([{keys:[["F2"]],callback:e=>{this.openEditor(null,e,!0)}},{keys:[["Backspace"],["Delete"]],callback:()=>{this.instance.emptySelectedCells(),this.prepareEditor()}},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>{this.instance.getSettings().enterBeginsEditing?this.cellProperties.readOnly?this.moveSelectionAfterEnter():this.openEditor(null,e,!0):this.moveSelectionAfterEnter(t.includes("shift")),(0,r.stopImmediatePropagation)(e)}}],{...s,runOnlyIf:()=>(0,h.isDefined)(this.instance.getSelected())})}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const{row:e,col:t}=this.instance.getSelectedRangeLast().highlight,o=this.instance.runHooks("modifyGetCellCoords",e,t);let s=e,n=t;Array.isArray(o)&&([s,n]=o),this.cellProperties=this.instance.getCellMeta(s,n);const{activeElement:r}=this.instance.rootDocument;if(r&&(0,i.isOutsideInput)(r)&&r.blur(),!this.isCellEditable())return void this.clearActiveEditor();const a=this.instance.getCell(e,t,!0);if(a){const o=this.instance.getCellEditor(this.cellProperties),r=this.instance.colToProp(n),i=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(s),n);this.activeEditor=(0,l.getEditorInstance)(o,this.instance),this.activeEditor.prepare(e,t,r,a,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.isCellEditable()){if(!this.activeEditor){const{row:e,col:t}=this.instance.getSelectedRangeLast().highlight,o=this.instance.rowIndexMapper.getRenderableFromVisualIndex(e),s=this.instance.columnIndexMapper.getRenderableFromVisualIndex(t);this.instance.view.scrollViewport(this.instance._createCellCoords(o,s)),this.instance.view.render(),this.prepareEditor()}this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))}else this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.instance.getCellEditor(this.cellProperties),{row:t,col:o}=this.instance.getSelectedRangeLast().highlight,{rowIndexMapper:s,columnIndexMapper:n}=this.instance,r=s.isHidden(this.instance.toPhysicalRow(t))||n.isHidden(this.instance.toPhysicalColumn(o));return!(this.cellProperties.readOnly||!e||r)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}onAfterDocumentKeyDown(e){if(!this.instance.isListening())return;const{keyCode:t}=e;if(!this.selection.isSelected())return;const o=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,n.isFunctionKey)(t)||(0,n.isCtrlMetaKey)(t)||o||this.isEditorOpened())){const t=this.instance.getShortcutManager().getContext("editor"),o={runOnlyIf:()=>(0,h.isDefined)(this.instance.getSelected()),group:d};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.instance.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.instance.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.instance.selection.transformStart(0,-1*this.instance.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.instance.selection.transformStart(0,this.instance.getDirectionFactor())}}],o),this.openEditor("",e)}}onCellDblClick(e,t,o){"TD"===o.nodeName&&this.openEditor(null,e,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}const g=new WeakMap;u.getInstance=function(e,t,o){let s=g.get(e);return s||(s=new u(e,t,o),g.set(e,s)),s};var f=u;t.default=f},87857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(93231)),r=o(93273),i=o(50095),l=o(83302),a=o(93315),h=o(18609),d=o(80151),c=o(50695);const u=new WeakMap,g="autocomplete";t.EDITOR_TYPE=g;class f extends r.HandsontableEditor{static get EDITOR_TYPE(){return g}constructor(e){super(e),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],r=e.length;let i,l,d,c,u=t.length;if(0===r){for(d=0;d<u;d++)n.push(d);return n}for(d=0;d<u;d++){if(l=(0,h.stripTags)((0,a.stringify)(t[d])),o)c=l.indexOf(e);else{const t=this.cellProperties.locale;c=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(i=l.length-c-r,s.push({baseIndex:d,index:c,charsLeft:i,value:l}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),d=0,u=s.length;d<u;d++)n.push(s[d].baseIndex);return n})),this.query=null,this.strippedChoices=[],this.rawChoices=[],u.set(this,{skipOne:!1,isMacOS:this.hot.rootWindow.navigator.platform.indexOf("Mac")>-1})}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,a.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll")}open(){const e=u.get(this);super.open();const t=this.htEditor.getInstance(),o=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();let s=(0,l.getScrollbarWidth)();0===s&&e.isMacOS&&(s+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),t.updateSettings({colWidths:o?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:o?(0,l.outerWidth)(this.TEXTAREA)+s:void 0,renderer:(e,t,o,s,n,r,i)=>{(0,c.textRenderer)(e,t,o,s,n,r,i);const{filteringCaseSensitive:l,allowHtml:h,locale:d}=this.cellProperties,u=this.query;let g,f,p=(0,a.stringify)(r);p&&!h&&(g=!0===l?p.indexOf(u):p.toLocaleLowerCase(d).indexOf(u.toLocaleLowerCase(d)),-1!==g&&(f=p.substr(g,u.length),p=p.replace(f,`<strong>${f}</strong>`))),t.innerHTML=p},autoColumnSize:!0}),e.skipOne&&(e.skipOne=!1),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close()}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,n=this.cellProperties.filter;let r=null,a=null,h=e;s&&(r=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const d=Array.isArray(r)?r.length:0;if(!1===n)d&&(a=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&d<=t);t++)d?e.push(h[r[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,i.pivot)([h])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),n=(0,l.outerHeight)(this.TEXTAREA),r=this.getDropdownHeight(),i=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),d=s.top-h.top-a+i,c=e.scrollHeight-d-a-n,u=r>c&&d>c;return u?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(u?d:c,r),u}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,n=0,r=null;do{n=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=n,s+=1}while(o<e);r=o-n,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-r+"px"),this.setDropdownHeight(o-n)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,i.arrayMap)(e,(e=>(0,a.stringify)(e)));return(0,i.arrayMap)(o,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===d.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===d.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){const t=u.get(this);if(t.skipOne=!1,(0,d.isPrintableChar)(e.keyCode)||e.keyCode===d.KEY_CODES.BACKSPACE||e.keyCode===d.KEY_CODES.DELETE||e.keyCode===d.KEY_CODES.INSERT){let o=10;if(e.keyCode===d.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(o+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value),t.skipOne=!0}),o)}}}t.AutocompleteEditor=f},25815:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(87857);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},97296:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=o(93315),r=o(22232),i=o(6116),l=s(o(4748)),a=o(83302);const h="base";t.EDITOR_TYPE=h;const d=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});t.EDITOR_STATE=d;const c="baseEditor";t.SHORTCUTS_GROUP_EDITOR=c;class u{static get EDITOR_TYPE(){return h}constructor(e){this.hot=e,this.instance=e,this.state=d.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,n,r){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=n,this.cellProperties=r,this.state=d.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,r,i;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),r=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[o,s,r,i]=[this.row,this.col,null,null];const l=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(l)&&([o,s]=l);const a=this.hot.getShortcutManager().getContext("editor"),h={runOnlyIf:()=>(0,n.isDefined)(this.hot.getSelected()),group:c};this.isInFullEditMode()&&a.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],h),this.hot.populateFromArray(o,s,e,r,i,"edit")}beginEditing(e,t){if(this.state!==d.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),r=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,r)),this.state=d.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,n.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(this.isWaiting())return;const n=this.hot.getShortcutManager().getContext("editor");if(n.removeShortcutsByGroup(c),n.removeShortcutsByGroup(i.SHORTCUTS_GROUP_NAVIGATION),this.state!==d.VIRGIN){if(this.state===d.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=d.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=d.FINISHED,this.discardEditor(e)})):(this.state=d.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=d.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===d.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=d.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=d.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===d.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,n=this.hot.rootWindow,r=(0,a.offset)(t),i=(0,a.outerWidth)(t),l=(0,a.offset)(this.hot.rootElement),h=(0,a.outerWidth)(this.hot.rootElement),d=o.topOverlay.holder,c=o.inlineStartOverlay.holder,u=d!==n?d.scrollTop:0,g=c!==n?c.scrollLeft:0,f=n.innerWidth-l.left-h,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,C=["master","inline_start"].includes(m)?u:0,w=["master","top","bottom"].includes(m)?g:0,y=r.top===l.top?0:1;let v=r.top-l.top-y-C,E=0;E=this.hot.isRtl()?n.innerWidth-r.left-i-f-1+w:r.left-l.left-1-w,["top","top_inline_start_corner"].includes(m)&&(v+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(E+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),T=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===T)&&(v+=1),b<=0&&(E+=1);const _=s.rowsRenderCalculator.startPosition,O=s.columnsRenderCalculator.startPosition,M=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),N=(0,a.getScrollbarWidth)(this.hot.rootDocument),A=t.offsetTop+_-I;let P=0;if(this.hot.isRtl()){const e=t.offsetLeft;P=e>=0?p.getWidth()-t.offsetLeft:Math.abs(e),P+=O-M-i}else P=t.offsetLeft+O-M;const x=(0,a.getComputedStyle)(this.TD,this.hot.rootWindow),D=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",H=parseInt(x[D],10)>0?0:1,L=parseInt(x.borderTopWidth,10)>0?0:1,k=(0,a.outerWidth)(t)+H,V=(0,a.outerHeight)(t)+L,F=(0,a.hasVerticalScrollbar)(d)?N:0,W=(0,a.hasHorizontalScrollbar)(c)?N:0,B=this.hot.view.maximumVisibleElementWidth(P)-F+H;return{top:v,start:E,height:V,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-W+L,23),width:k,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=u,(0,r.mixin)(u,l.default)},48253:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97296);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},99935:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302);const r="checkbox";t.EDITOR_TYPE=r;class i extends s.BaseEditor{static get EDITOR_TYPE(){return r}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,n.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=i},63729:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99935);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},23330:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(33034)),r=s(o(32134)),i=o(5071),l=s(o(75244)),a=o(83302),h=o(22232),d=o(80151);o(54150);const c="date";t.EDITOR_TYPE=c;const u="dateEditor";class g extends i.TextEditor{static get EDITOR_TYPE(){return c}constructor(e){super(e),this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,this.$datePicker=null}init(){if("function"!=typeof n.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof r.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.instance.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,a.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);new l.default(this).addEventListener(this.datePicker,"mousedown",(e=>e.stopPropagation()))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:u})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.instance._registerTimeout((()=>{this.instance._refreshBorders()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(u),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const e=this.originalValue;void 0!==e&&this.setValue(e)}super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,s=this.instance.view.isMouseDown(),i=!!e&&(0,d.isFunctionKey)(e.keyCode);let l;this.datePicker.style.display="block",this.$datePicker=new r.default(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,a.outerHeight)(this.TD)}px`;let h=this.hot.rootWindow.pageXOffset;h=this.hot.isRtl()?t.right-(0,a.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${h}px`,this.originalValue?(l=this.originalValue,(0,n.default)(l,o,!0).isValid()&&this.$datePicker.setMoment((0,n.default)(l,o),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),i||s||this.setValue("")):this.cellProperties.defaultDate?(l=this.cellProperties.defaultDate,(0,n.default)(l,o,!0).isValid()&&this.$datePicker.setMoment((0,n.default)(l,o),!0),i||s||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,h.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,n.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),this.hideDatepicker(),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=g},58437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23330);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},14733:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(25815),r=s(o(56307));const i="dropdown";t.EDITOR_TYPE=i;class l extends n.AutocompleteEditor{static get EDITOR_TYPE(){return i}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=l,r.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.getCellMeta(t,this.propToCol(o));s.editor===l&&void 0===s.strict&&(s.filter=!1,s.strict=!0)}))},9535:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14733);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},95567:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302),r=o(24449),i=o(22232),l=o(6116);const a="handsontableEditor",h="handsontable";t.EDITOR_TYPE=h;class d extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,n.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r);const l=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&l.setValue(o),l.instance.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,i.extend)(a,r.handsontable),this.htOptions=a}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getInstance().getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:a,relativeToGroup:l.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor.getInstance();if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,r.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor.getInstance();let s,n;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(n=t.getSelectedLast()[0],s=Math.max(0,n-1)):(n=t.getSelectedLast()[0],s=n-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor.getInstance();let s,n;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;n=t.getSelectedLast()[0],s=Math.min(e,n+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.HandsontableEditor=d},93273:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95567);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},74465:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(n.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(r.CheckboxEditor),(0,f.registerEditor)(i.DateEditor),(0,f.registerEditor)(l.DropdownEditor),(0,f.registerEditor)(a.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(d.PasswordEditor),(0,f.registerEditor)(c.SelectEditor),(0,f.registerEditor)(u.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(25815);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(48253);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var r=o(63729);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var i=o(58437);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var l=o(9535);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(93273);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(97130);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var d=o(63630);t.PasswordEditor=d.PasswordEditor,t.PASSWORD_EDITOR=d.EDITOR_TYPE;var c=o(93333);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var u=o(5071);t.TextEditor=u.TextEditor,t.TEXT_EDITOR=u.EDITOR_TYPE;var g=o(65930);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(83605);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},97130:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47427);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},47427:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n="numeric";t.EDITOR_TYPE=n;class r extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=r},63630:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35356);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},35356:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302);const r="password";t.EDITOR_TYPE=r;class i extends s.TextEditor{static get EDITOR_TYPE(){return r}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,n.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=i},83605:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.RegisteredEditor=u,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)i.get(e)||g(null,e),o=i.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=a(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()},t.registerEditor=g,o(60740);var n=s(o(56307)),r=s(o(63800));const i=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:d,getValues:c}=(0,r.default)("editors");function u(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},n.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new u(t);"string"==typeof e&&l(e,o),i.set(t,o)}t.getRegisteredEditors=c,t.getRegisteredEditorNames=d,t.hasEditor=h},93333:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},82854:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302),r=o(22232);const i="ht_editor_visible",l="selectEditor",a="select";t.EDITOR_TYPE=a;class h extends s.BaseEditor{static get EDITOR_TYPE(){return a}init(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,n.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,n.hasClass)(this.select,i)&&(0,n.removeClass)(this.select,i),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,i,l){super.prepare(e,t,o,s,i,l);const a=this.cellProperties.selectOptions;let h;h="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),(0,n.empty)(this.select),(0,r.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,n.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:r}=this.getEditedCellRect(),l=this.select.style;l.height=`${r}px`,l.width=`${o}px`,l.top=`${e}px`,l[this.hot.isRtl()?"right":"left"]=`${t}px`,l.margin="0px",(0,n.addClass)(this.select,i)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};!1!==this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=h},67547:(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),n=t.value.split("\n");let r=o,i=0;for(let t=0;t<n.length;t++){const s=n[t];0!==t&&(i+=n[t-1].length+1);const l=i+s.length;if("home"===e?r=i:"end"===e&&(r=l),o<=l)break}(0,s.setCaretPosition)(t,r)};var s=o(83302)},5071:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48917);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},48917:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(48253),r=s(o(75244)),i=o(37595),l=o(83302),a=o(68145),h=o(80151),d=o(95881),c=o(93315),u=o(6116),g=o(97296),f=o(67547);const p="ht_editor_hidden",m="textEditor",C="text";t.EDITOR_TYPE=C;class w extends n.BaseEditor{static get EDITOR_TYPE(){return C}constructor(e){super(e),this.eventManager=new r.default(this),this.autoResize=(0,d.autoResize)(),this.TEXTAREA=void 0,this.textareaStyle=void 0,this.TEXTAREA_PARENT=void 0,this.textareaParentStyle=void 0,this.layerClass=void 0,this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement();this.hot.getShortcutManager().setActiveContextName("editor"),this.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.registerShortcuts()}close(){this.autoResize.unObserve(),this.hot.rootDocument.activeElement===this.TEXTAREA&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,o,s,r,l){const a=this.state;if(super.prepare(e,t,o,s,r,l),!l.readOnly){this.refreshDimensions(!0);const{allowInvalid:e,fragmentSelection:t}=l;e&&(this.TEXTAREA.value=""),a!==n.EDITOR_STATE.FINISHED&&this.hideEditableElement();!t&&!(0,i.isMobileBrowser)()&&this.focus()}}beginEditing(e,t){this.state===n.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.tabIndex=-1,(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,p),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,i.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,p)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,a.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,l.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,p)&&(0,l.removeClass)(this.TEXTAREA_PARENT,p),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==n.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:r,height:i,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const h=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=h.fontSize,this.TEXTAREA.style.fontFamily=h.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const d=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(d.paddingLeft,10)+parseInt(d.paddingRight,10),u=parseInt(d.paddingTop,10)+parseInt(d.paddingBottom,10),g=s-c,f=i-u,p=r-c,m=a-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){this.eventManager.addEventListener(this.TEXTAREA,"cut",(e=>e.stopPropagation())),this.eventManager.addEventListener(this.TEXTAREA,"paste",(e=>e.stopPropagation())),(0,i.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:m},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Tab"]],callback:e=>{const t=this.hot.getSettings(),o="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(o.row,o.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t=this.hot.getSettings(),o="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(-o.row,-o.col)}},{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey,relativeToGroup:u.SHORTCUTS_GROUP_EDITOR,position:"before"},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple(),relativeToGroup:u.SHORTCUTS_GROUP_EDITOR,position:"before"},{keys:[["Alt","Enter"]],callback:()=>(o(),!1),relativeToGroup:u.SHORTCUTS_GROUP_EDITOR,position:"before"},{keys:[["PageUp"]],callback:()=>{this.hot.selection.transformStart(-this.hot.countVisibleRows(),0)}},{keys:[["PageDown"]],callback:()=>{this.hot.selection.transformStart(this.hot.countVisibleRows(),0)}},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["Control/Meta","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}},{keys:[["Control/Meta","Shift","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}}],t)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(u.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(m),e.removeShortcutsByGroup(g.SHORTCUTS_GROUP_EDITOR)}onAfterDocumentKeyDown(e){-1===[h.KEY_CODES.ARROW_UP,h.KEY_CODES.ARROW_RIGHT,h.KEY_CODES.ARROW_DOWN,h.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}t.TextEditor=w},65930:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45952);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},45952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n="time";t.EDITOR_TYPE=n;class r extends s.TextEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r),this.TEXTAREA.dir="ltr"}}t.TimeEditor=r},75244:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListenersCounter=function(){return n},o(95988);var s=o(24449);let n=0;var r=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,s.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:i,options:r,eventManager:this}),e.addEventListener(t,i,r),n+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,s=this.context.eventListeners[i],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(r&&s.eventManager!==this)continue;this.context.eventListeners.splice(i,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),n-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),n-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const n={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||o.body.parentNode)):r=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}};t.default=r},50095:(e,t,o)=>{"use strict";function s(e,t,o,s){let n=-1,r=e,i=o;Array.isArray(e)||(r=Array.from(e));const l=r.length;for(s&&l&&(n+=1,i=r[n]),n+=1;n<l;)i=t(i,r[n],n,r),n+=1;return i}function n(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length;for(;o<n&&!1!==t(s[o],o,s);)o+=1;return e}function r(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return r(e)/e.length},t.arrayEach=n,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,r=[];let i=-1;for(;o<n;){const e=s[o];t(e,o,s)&&(i+=1,r[i]=e),o+=1}return r},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,r=[];let i=-1;for(;o<n;){const e=s[o];i+=1,r[i]=t(e,o,s),o+=1}return r},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=r,t.arrayUnique=function(e){const t=[];return n(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let i=s;return n(r,(e=>{i=i.filter((t=>!e.includes(t)))})),i},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let i=s;return n(r,(e=>{i=i.filter((t=>e.includes(t)))})),i},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t],i=new Set(s);return n(r,(e=>{n(e,(e=>{i.has(e)||i.add(e)}))})),Array.from(i)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let n=0;n<o;n++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][n]=e[n][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(95988)},37595:(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return r.chrome.value},t.isChromeWebKit=function(){return r.chromeWebKit.value},t.isEdge=function(){return r.edge.value},t.isEdgeWebKit=function(){return r.edgeWebKit.value},t.isFirefox=function(){return r.firefox.value},t.isFirefoxWebKit=function(){return r.firefoxWebKit.value},t.isIOS=function(){return i.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&i.mac.value},t.isLinuxOS=function(){return i.linux.value},t.isMacOS=function(){return i.mac.value},t.isMobileBrowser=function(){return r.mobile.value},t.isSafari=function(){return r.safari.value},t.isWindowsOS=function(){return i.win.value},t.setBrowserMeta=l,t.setPlatformMeta=a;var s=o(22232);const n=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},r={chrome:n(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:n((e=>/CriOS/.test(e))),edge:n((e=>/Edge/.test(e))),edgeWebKit:n((e=>/EdgiOS/.test(e))),firefox:n((e=>/Firefox/.test(e))),firefoxWebKit:n((e=>/FxiOS/.test(e))),mobile:n((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:n(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},i={mac:n((e=>/^Mac/.test(e))),win:n((e=>/^Win/.test(e))),linux:n((e=>/^Linux/.test(e))),ios:n((e=>/iPhone|iPad|iPod/i.test(e)))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(r,(o=>{let{test:s}=o;s(e,t)}))}function a(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(i,(t=>{let{test:o}=t;o(e)}))}l(),a()},69173:(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(93315)},65320:(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let n=0;n<e;n++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e=[];for(n=0;n<t;n++)e.push(i(n)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e={};for(n=0;n<t;n++)e[`prop${n}`]=i(n)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,n)=>{s.push([o+t,n,e])})):Object.keys(e).forEach((n=>{s.push([o+t,n,e[n]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=r**s*(n.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=i,o(95988);var s=o(22232);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=n.length;function i(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%r,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/r,10);return s}},48150:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},83302:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.add(...t)},t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=r,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=r(n,t,o),n&&(!o||o.contains(n)));)s.push(n),n=n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.host:n.parentNode;const i=s.length;return i?s[i-1]:null},t.empty=l,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:h(e,t)},t.fastInnerText=h,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=u,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=n,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,n=e;for(;null!==n;){if(o===t){s=n;break}n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n=n.host:(o+=1,n=n.parentNode)}return s},t.getParentWindow=function(e){return n(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return c(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return d(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let n=e.parentNode;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:r}=n.style;if([e,t,r].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(r))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(r)||s.includes(e)))return n;if(n.clientWidth<=n.scrollWidth+1&&(s.includes(t)||s.includes(e)))return n;n=n.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===g&&(g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let n=t.offsetWidth;s===n&&(n=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-n}(e));return g},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const n=u(e,o);if(""!==n[t]&&void 0!==n[t])return n[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=u(s,o),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(r)||t.includes(i))return s;s=s.parentNode}return o},t.getWindowScrollLeft=c,t.getWindowScrollTop=d,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=f,t.isOutsideInput=p,t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if(s.style&&"none"===s.style.display)return!1;s=s.parentNode}return!0},t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let n,r,i,l=e;n=l.offsetLeft,r=l.offsetTop,i=l;for(;(l=l.offsetParent)&&l!==t.body;)n+=l.offsetLeft,r+=l.offsetTop,i=l;i&&"fixed"===i.style.position&&(n+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:n,top:r}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.remove(...t)},t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.selectElementIfAllowed=function(e){p(e.ownerDocument.activeElement)||e.select()},t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const n=e.parentNode,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(95988),o(60740);var s=o(18609);function n(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:n}=Node;let r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:i}=r;r=i&&e===n?i:r.parentNode}return null}function i(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const a=/(<(.*)>|&(.*);)/;function h(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(l(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function d(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let g;function f(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function p(e){return f(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=a},24449:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},7374:(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},85015:(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const l=s.concat(r);let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const l=s.concat(r.reverse());let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,r)}),o),t}},t.fastCall=function(e,t,o,s,r,i,l,a){if((0,n.isDefined)(a))return e.call(t,o,s,r,i,l,a);if((0,n.isDefined)(l))return e.call(t,o,s,r,i,l);if((0,n.isDefined)(i))return e.call(t,o,s,r,i);if((0,n.isDefined)(r))return e.call(t,o,s,r);if((0,n.isDefined)(s))return e.call(t,o,s);if((0,n.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[n,...r]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(r,((e,t)=>t(e)),n.apply(this,t))}},t.throttle=r,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=r(e,t);let n=o;function i(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return n?(n-=1,e.apply(this,o)):s.apply(this,o)}return i.clearHits=function(){n=o},i};var s=o(50095),n=o(93315);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let n=null;return function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];const a=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=a,h=!0);const d=t-(a-o);return h?(s.lastCallThrottled=!1,e.apply(this,i)):(n&&clearTimeout(n),n=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,i),o=0,n=void 0}),d)),s}}},93315:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="13.1.0-next-f35a363-20230828";let i,y="invalid",v="invalid";const E=function(e){let t=[][a],o=t;if(e[a]!==u("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=u(s.shift());n;n=u(s.shift()||"A"))--n<""[a]?o|=(d(`${d(h(t)+(h(c(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||E)if(E){const t=(0,n.default)("31/08/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);i=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(y="expired",v="expired"):(y="valid",v="valid")}else s?(y="non_commercial",v="valid"):(y="invalid",v="invalid");else y="missing",v="missing";p()&&(y="valid",v="valid");if(!m&&"valid"!==y){C[y]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===y?"info":"warn"](C[y]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==v&&t.parentNode){if(w[v]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[v]({keyValidityDate:i,hotVersion:r}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=i,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var n=s(o(33034)),r=o(28236);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),c=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(c(g(e),h("12"),u("F")))/(h(c(g(e),u("B"),~~![][a]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const C={invalid:()=>r.toSingleLine`
32
+ the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let t=0;t<e;t++)this.orderView.render();this.orderView.end()}}t.default=h},46538:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),n.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=n}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeight(t);e.firstChild.style.height=s?s-1+"px":""}}}}},52188:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302);var i=class{constructor(e){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"lastScrolledColumnPos",-1),(0,n.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,o,s,n){const r=this.scrollViewportHorizontally(e.col,o,n),i=this.scrollViewportVertically(e.row,t,s);return r||i}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleColumn(),i=this.getLastVisibleColumn(),l=void 0===t&&void 0===o,{fixedColumnsStart:a,inlineStartOverlay:h}=this.dataAccessObject;if(l&&e<a)return!1;let d=!1;return-1===r?d=h.scrollTo(e,l?e>this.lastScrolledColumnPos:t):(l&&(e<r||e>i)||!l)&&(d=h.scrollTo(e,l?e>i:t)),d&&(this.lastScrolledColumnPos=e),d}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),l=void 0===t&&void 0===o,{fixedRowsBottom:a,fixedRowsTop:h,topOverlay:d}=this.dataAccessObject;if(l&&(e<h||e>n-a-1))return!1;let c=!1;return-1===r?c=d.scrollTo(e,l?e>this.lastScrolledRowPos:o):(l&&(e<r||e>i)||!l)&&(c=d.scrollTo(e,l?e>i:o)),c&&(this.lastScrolledRowPos=e),c}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,fixedRowsTop:n,rootWindow:i}=this.dataAccessObject;let l=t.getFirstVisibleRow();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),h=(0,r.innerHeight)(t.hider),d=(0,r.innerHeight)(i),c=(0,r.getScrollTop)(i,i);if(a.top+h-d<=c){let t=o.getColumnHeaderHeight();t+=e.sumCellSizes(0,n);for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),a.top+h-t<=c){l=o;break}}}return l}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,rootWindow:n}=this.dataAccessObject;let i=t.getLastVisibleRow();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.getScrollTop)(n,n);if(l.top>a){const t=(0,r.innerHeight)(n);let h=o.getColumnHeaderHeight();for(let o=1;o<=s;o++)if(h+=e.sumCellSizes(o-1,o),l.top+h-a>=t){i=o-2;break}}}return i}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:o,totalColumns:s,rootWindow:n}=this.dataAccessObject;let i=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.innerWidth)(t.hider),h=(0,r.innerWidth)(n),d=Math.abs((0,r.getScrollLeft)(n,n));if(l.left+a-h<=d){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.left+a-t<=d){i=o;break}}}return i}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:s,totalColumns:n,rootWindow:i}=this.dataAccessObject;let l=o.getLastVisibleColumn();if(t.mainTableScrollableElement===i){let a=null;if(e.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(e.right-t)}else{a=(0,r.offset)(o.wtRootElement).left}const h=Math.abs((0,r.getScrollLeft)(i,i));if(a>h){const e=(0,r.innerWidth)(i);let o=s.getRowHeaderWidth();for(let s=1;s<=n;s++)if(o+=t.sumCellSizes(s-1,s),a+o-h>=e){l=s-2;break}}}return l}};t.default=i},39055:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(83302),r=s(o(18959));var i=class{constructor(e,t){this.settings=e,this.cellRange=t||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}getBorder(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new r.default(e,this.settings)),this.instanceBorders[e.guid]}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}addClassAtCoords(e,t,o,s){let r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=e.wtTable.getCell(this.settings.createCellCoords(t,o));if("object"==typeof i){let e=s;r&&(e=this.classNameGenerator(i),this.classNames.includes(e)||this.classNames.push(e)),(0,n.addClass)(i,e)}return this}linearClassNameGenerator(e,t){return function o(s){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===r)return e;let i=r>=0?r:t,l=e;i-=1;const a=0===i?e:`${e}-${i}`;if((0,n.hasClass)(s,a)){l=`${e}-${i+1}`}else l=o(s,i);return l}}draw(e){if(this.isEmpty())return void(this.settings.border&&this.getBorder(e).disappear());const t=e.wtTable.getRenderedRowsCount(),o=e.wtTable.getRenderedColumnsCount(),s=this.getCorners(),[r,i,l,a]=s,{highlightHeaderClassName:h,highlightColumnClassName:d,highlightRowClassName:c,highlightOnlyClosestHeader:u,selectionType:g}=this.settings,f=void 0===g||["active-header","header"].includes(g);if(f&&null!==i&&null!==a){let t=0;for(let s=0;s<o;s+=1){const o=e.wtTable.columnFilter.renderedToSource(s);if(o>=i&&o<=a){let s=e.wtTable.getColumnHeaders(o);const r=s.length-1;u&&s.length>1&&(s=[s[r]]);for(let l=0;l<s.length;l+=1){const c=[];let f=s[l];h&&c.push(h),d&&c.push(d),l=u?r:l;const p=e.getSetting("onBeforeHighlightingColumnHeader",o,l,{selectionType:g,columnCursor:t,selectionWidth:a-i+1,classNames:c});p!==o&&(f=e.wtTable.getColumnHeader(p,l)),(0,n.addClass)(f,c)}t+=1}}}if(null!==r&&null!==l){let s=0;for(let p=0;p<t;p+=1){const t=e.wtTable.rowFilter.renderedToSource(p);if(f&&t>=r&&t<=l){let o=e.wtTable.getRowHeaders(t);const i=o.length-1;u&&o.length>1&&(o=[o[i]]);for(let a=0;a<o.length;a+=1){const d=[];let f=o[a];h&&d.push(h),c&&d.push(c),a=u?i:a;const p=e.getSetting("onBeforeHighlightingRowHeader",t,a,{selectionType:g,rowCursor:s,selectionHeight:l-r+1,classNames:d});p!==t&&(f=e.wtTable.getRowHeader(p,a)),(0,n.addClass)(f,d)}s+=1}if(null!==i&&null!==a)for(let s=0;s<o;s+=1){const o=e.wtTable.columnFilter.renderedToSource(s);t>=r&&t<=l&&o>=i&&o<=a?this.settings.className&&this.addClassAtCoords(e,t,o,this.settings.className,this.settings.markIntersections):t>=r&&t<=l?c&&this.addClassAtCoords(e,t,o,c):o>=i&&o<=a&&d&&this.addClassAtCoords(e,t,o,d);const n=e.getSetting("onAfterDrawSelection",t,o,this.settings.layerLevel);"string"==typeof n&&this.addClassAtCoords(e,t,o,n)}}}e.getSetting("onBeforeDrawBorders",s,this.settings.className),this.settings.border&&this.getBorder(e).appear(s)}destroy(){Object.values(this.instanceBorders).forEach((e=>e.destroy()))}};t.default=i},64057:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(93231)),r=o(83302),i=o(22232);t.default=class{constructor(e){(0,n.default)(this,"settings",{}),(0,n.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,i.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,r.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1}}update(e,t){return void 0===t?(0,i.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,n){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,n):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},45460:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988),o(60740);var n=s(o(93231)),r=o(83302),i=o(85015),l=s(o(65946)),a=s(o(22350)),h=o(96649),d=s(o(35863)),c=s(o(72772)),u=o(89381);var g=class{constructor(e,t,o,s,i){(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"TBODY",null),(0,n.default)(this,"THEAD",null),(0,n.default)(this,"COLGROUP",null),(0,n.default)(this,"hasTableHeight",!0),(0,n.default)(this,"hasTableWidth",!0),(0,n.default)(this,"isTableVisible",!1),(0,n.default)(this,"tableOffset",0),(0,n.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===i,this.name=i,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,r.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const l=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(l))),this.rowUtils=new c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new d.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr")),o.appendChild(e)),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,n=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),d=h.length,c=t.getSetting("columnHeaders"),g=c.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),d&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(f=o.updateStateOfRendering()),p)this.isMaster&&s.createVisibleCalculators(),o&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,r.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=n>0?this.getFirstRenderedRow():0,t=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new a.default(e,n,g),this.columnFilter=new l.default(t,i,d);let o=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),o=!0!==e.skipRender}if(o){let e;if(this.tableRenderer.setHeaderContentRenderers(h,c),(this.is(u.CLONE_BOTTOM)||this.is(u.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(u.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,r.outerWidth)(this.hider),o=(0,r.outerWidth)(this.TABLE);0!==t&&o!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(u.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(m=o.bottomOverlay.resetFixedPosition()||m),m=o.inlineStartOverlay.resetFixedPosition()||m,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(o.refreshAll(),o.adjustElementsSize()):this.refreshSelections(p),f&&o.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let n,i,l;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,n=this.getColumnHeaderHeight(o),i=this.getColumnHeader(t,o),i&&(l=(0,r.innerHeight)(i),(!n&&s<l||n<l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),Array.isArray(a)?null!==a[o]&&void 0!==a[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(a[o]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]||a))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,n=e.getSetting("columnHeaders").length;s<n;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(u.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}removeClassFromCells(e){const t=this.TABLE.querySelectorAll(`.${e}`);for(let o=0,s=t.length;o<s;o++)(0,r.removeClass)(t[o],e)}refreshSelections(e){const{wtSettings:t}=this,{selections:o}=this.dataAccessObject;if(!o)return;const s=Array.from(o),n=s.length;if(e){const e=[];for(let t=0;t<n;t++){const{highlightHeaderClassName:o,highlightRowClassName:n,highlightColumnClassName:r}=s[t].settings,i=s[t].classNames,l=i.length;for(let t=0;t<l;t++)e.includes(i[t])||e.push(i[t]);o&&!e.includes(o)&&e.push(o),n&&!e.includes(n)&&e.push(n),r&&!e.includes(r)&&e.push(r)}const o=t.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(o))for(let t=0;t<o.length;t++)e.push(o[t]);const r=e.length;for(let t=0;t<r;t++)this.removeClassFromCells(e[t])}for(let t=0;t<n;t++)s[t].draw(this.facadeGetter(),e)}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const n=this.getRow(t);if(!n&&t>=0)throw new Error("TR was expected to be rendered but is not");const r=n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!r&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return r}getRow(e){let t=null,o=null;var s,n;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return null==o?void 0:o.childNodes[t]}getRowHeaders(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return[];const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],n=null==o?void 0:o.childNodes[s];n&&t.push(n)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let n=(0,r.index)(o),i=t.cellIndex;if((0,r.overlayContainsElement)(u.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(n-=s.childNodes.length);else if((0,r.overlayContainsElement)(u.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_BOTTOM,t,this.wtRootElement)){n=this.wtSettings.getSetting("totalRows")-s.childNodes.length+n}else n=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(n):this.rowFilter.renderedToSource(n);return i=(0,r.overlayContainsElement)(u.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_INLINE_START,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),this.wot.createCellCoords(n,i)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,n,i;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,r.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),n=this.getTrForRow(s),i=n.querySelector("th"),o=i?(0,r.innerHeight)(i):(0,r.innerHeight)(n)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,r.outerWidth)(this.TABLE)}getHeight(){return(0,r.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,r.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,r.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,r.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,i.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}};t.default=g},86363:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(92117)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},58654:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(6214)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},32173:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(37610)),i=s(o(6214)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_INLINE_START)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},94915:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(45460)),i=s(o(37610)),l=s(o(92117)),a=o(22232);class h extends r.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,n.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,n.getStyle)(e,"height",t),r=(0,n.getStyle)(e,"overflow",t),i=this.holder.style,{scrollWidth:l,scrollHeight:a}=e;let{width:h,height:d}=e.getBoundingClientRect();if(o&&["auto","hidden","scroll"].includes(r)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const r=parseInt((0,n.getComputedStyle)(s,t).height,10);o.removeChild(s),0===r&&(d=0)}d=Math.min(d,a),i.height="auto"===s?"auto":`${d}px`,h=Math.min(h,l),i.width=`${h}px`,i.overflow="",this.hasTableHeight="auto"===i.height||d>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const n=e.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*n;e<r;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,l.default);var d=h;t.default=d},92117:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var n=s;t.default=n},37610:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var n=s;t.default=n},6214:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});var n=s;t.default=n},6271:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var n=s;t.default=n},15491:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var n=s;t.default=n},85043:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(92117)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},56754:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(6214)),l=o(22232),a=o(89381);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var d=h;t.default=d},35863:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302);t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t,this.headerWidths=new Map}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let o=this.getWidth(e);if(t){const s=t.getStretchedColumnWidth(e,o);s&&(o=s)}return o}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:o,cloneSource:n}=this.dataAccessObject,r=n?n.wtTable.holder:t.holder,i=r.offsetHeight<r.scrollHeight?(0,s.getScrollbarWidth)():0;let l=e.getSetting("rowHeaderWidth");if(o.columnsRenderCalculator.refreshStretching(o.getViewportWidth()-i),l=e.getSetting("onModifyRowHeaderWidth",l),null!=l){const t=e.getSetting("rowHeaders").length,o=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(l)?l[e]:l;t=null==t?o:t,this.headerWidths.set(e,t)}}}}},94191:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},81787:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0;t.WORKING_SPACE_TOP=1;t.WORKING_SPACE_BOTTOM=2},1909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));t.OrderView=n.default;var r=s(o(52025));t.SharedOrderView=r.default},52025:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));class r extends n.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=r},55407:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(81787),r=s(o(96747));t.default=class{constructor(e,t,o){this.rootNode=e,this.nodesPool=t,this.sizeSet=new r.default,this.childNodeType=o.toUpperCase(),this.visualIndex=0,this.collectedNodes=[]}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(n.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let r=this.getRenderedChildCount();for(;r<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(n.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),r+=1}const i=o&&t.isPlaceOn(n.WORKING_SPACE_TOP);for(;r>s;)e.removeChild(i?e.firstChild:e.lastChild),r-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(n.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},79193:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},96747:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(79193)),r=o(81787);t.default=class{constructor(){this.size=new n.default,this.workingSpace=r.WORKING_SPACE_ALL,this.sharedSize=null}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof n.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=r.WORKING_SPACE_TOP,e.workingSpace=r.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=r.WORKING_SPACE_BOTTOM,e.workingSpace=r.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},72772:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}}},57293:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(22232),r=o(46003);var i=class{constructor(e,t,o,s,n){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=n,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer,r=t.documentElement.offsetWidth,i=e.getSetting("totalColumns"),l=e.getSetting("preventOverflow"),a=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),d=r-(a?h.right-r:h.left);let c,u;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(d,r):Math.min(this.getContainerFillWidth(),d,r),n===o&&i>0&&this.sumColumnWidths(0,i-1)>c)return t.documentElement.clientWidth;if(n!==o&&(u=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===u||"hidden"===u||"auto"===u))return Math.max(c,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?c:Math.max(c,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=t.length;o<n;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n,i,l;this.rowHeaderWidth=NaN,n=t.getSetting("renderAllRows")&&e===r.RENDER_TYPE?1/0:this.getViewportHeight();let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),d=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return h&&a>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=l,n-=l),d&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(c-d,c),n-=l),i=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new r.ViewportRowsCalculator({viewportSize:n,scrollOffset:a,totalItems:t.getSetting("totalRows"),itemSizeFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,scrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const l=t.getSetting("fixedColumnsStart");if(l&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);i+=e,n-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new r.ViewportColumnsCalculator({viewportSize:n,scrollOffset:i,totalItems:t.getSetting("totalColumns"),itemSizeFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingItemWidthFn:(e,o)=>t.getSetting("onBeforeStretchingColumnWidth",e,o),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),o=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(r.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(r.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startRow:n,endRow:r}=this.rowsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startColumn:n,endColumn:r}=this.columnsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,n.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}};t.default=i},73596:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(16247),o(25671),o(97796),o(36662);var n=s(o(78900)),r=o(45433),i=o(3177),l=s(o(56307)),a=o(22489),h=o(65324),d=o(57924),c=o(48253),u=o(21280);function g(e,t){const o=new n.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=u.CellCoords,t.CellRange=u.CellRange,(0,h.registerCellType)(d.TextCellType),g.editors={BaseEditor:c.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,i.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=u.CellCoords,g.CellRange=u.CellRange,g.packageName="handsontable",g.buildDate="30/08/2023 14:29:38",g.version="13.1.0-next-ea584ca-20230830",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};var f=g;t.default=f},78380:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25815),n=o(16124),r=o(67156);const i="autocomplete";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator};t.AutocompleteCellType=l},83954:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78380);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},30749:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63729),n=o(8877);const r="checkbox";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:n.checkboxRenderer};t.CheckboxCellType=i},42855:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30749);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},24259:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58437),n=o(16124),r=o(82951);const i="date";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.DateEditor,renderer:n.autocompleteRenderer,validator:r.dateValidator};t.DateCellType=l},56844:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24259);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},72061:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9535),n=o(16124),r=o(67156);const i="dropdown";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.DropdownEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator};t.DropdownCellType=l},65867:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72061);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},85334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93273),n=o(16124);const r="handsontable";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:n.autocompleteRenderer};t.HandsontableCellType=i},243:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85334);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},74319:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,u.registerCellType)(s.AutocompleteCellType),(0,u.registerCellType)(n.CheckboxCellType),(0,u.registerCellType)(r.DateCellType),(0,u.registerCellType)(i.DropdownCellType),(0,u.registerCellType)(l.HandsontableCellType),(0,u.registerCellType)(a.NumericCellType),(0,u.registerCellType)(h.PasswordCellType),(0,u.registerCellType)(d.TextCellType),(0,u.registerCellType)(c.TimeCellType)};var s=o(83954);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(42855);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var r=o(56844);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var i=o(65867);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var l=o(243);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(68683);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(81762);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var d=o(57924);t.TextCellType=d.TextCellType,t.TEXT_TYPE=d.CELL_TYPE;var c=o(8228);t.TimeCellType=c.TimeCellType,t.TIME_TYPE=c.CELL_TYPE;var u=o(65324);t.registerCellType=u.registerCellType,t.getCellType=u.getCellType,t.getRegisteredCellTypeNames=u.getRegisteredCellTypeNames,t.getRegisteredCellTypes=u.getRegisteredCellTypes,t.hasCellType=u.hasCellType},68683:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79486);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},79486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97130),n=o(78416),r=o(71);const i="numeric";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.NumericEditor,renderer:n.numericRenderer,validator:r.numericValidator,dataType:"number"};t.NumericCellType=l},81762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40229);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},40229:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63630),n=o(76978);const r="password";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1};t.PasswordCellType=i},65324:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCellType=function(e){if(!d(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:n}=t;o&&(0,r.registerEditor)(e,o);s&&(0,i.registerRenderer)(e,s);n&&(0,l.registerValidator)(e,n);a(e,t)},o(60740);var n=s(o(63800)),r=o(83605),i=o(7462),l=o(80239);const{register:a,getItem:h,hasItem:d,getNames:c,getValues:u}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=u,t.getRegisteredCellTypeNames=c,t.hasCellType=d},57924:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80617);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},80617:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(50695);const r="text";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.TextEditor,renderer:n.textRenderer};t.TextCellType=i},8228:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90214);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},90214:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65930),n=o(43853),r=o(85342);const i="time";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.TimeEditor,renderer:n.timeRenderer,validator:r.timeValidator};t.TimeCellType=l},78900:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t){var o;let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],D=!1,H=this;const L=new h.default(H);let k,V,F,W,B=!0;(0,R.hasValidParameter)(s)&&(0,R.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const U=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",j=["rtl","ltr"].includes(U)?U:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",j),this.isRtl=function(){return"rtl"===j},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const Y=new I.MetaManager(H,t,[I.DynamicCellMetaMod,I.ExtendMetaPropertiesMod]),G=Y.getTableMeta(),z=Y.getGlobalMeta(),K=(0,N.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,R.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{H.runHooks("afterRowSequenceChange",e)})),V=new v.default(H),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const $=e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?H.columnIndexMapper.getRenderableFromVisualIndex(o):o)};let X=new M.Selection(G,{rowIndexMapper:()=>H.rowIndexMapper,columnIndexMapper:()=>H.columnIndexMapper,countCols:()=>H.countCols(),countRows:()=>H.countRows(),propToCol:e=>k.propToCol(e),isEditorOpened:()=>!!H.getActiveEditor()&&H.getActiveEditor().isOpened(),countColsTranslated:()=>this.view.countRenderableColumns(),countRowsTranslated:()=>this.view.countRenderableRows(),getShortcutManager:()=>H.getShortcutManager(),createCellCoords:(e,t)=>H._createCellCoords(e,t),createCellRange:(e,t,o)=>H._createCellRange(e,t,o),visualToRenderableCoords:$,renderableToVisualCoords:e=>{const{row:t,col:o}=e;return H._createCellCoords(t>=0?H.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?H.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>H.getCellMeta(e,t).disableVisualSelection});this.selection=X;const q=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function Q(e){const t=(0,O.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(H.runHooks("beforeLanguageChange",t),z.language=t,H.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function J(e,t){const o="className"===e?H.rootElement:H.table;if(B)(0,n.addClass)(o,t);else{let s=[],r=[];z[e]&&(s=Array.isArray(z[e])?z[e]:(0,c.stringToArray)(z[e])),t&&(r=Array.isArray(t)?t:(0,c.stringToArray)(t));const i=(0,c.getDifferenceOfArrays)(s,r),l=(0,c.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}z[e]=t}function Z(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ee(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function te(e,t,o){if(!e.length)return;const s=H.getActiveEditor(),r=new Z;let i=!0;r.onQueueEmpty=e=>{s&&i&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,l,,a]=e[o],h=k.propToCol(l),d=H.getCellMeta(s,h);"numeric"===d.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[o][3]=ee(a)),H.getCellValidator(d)&&(r.addValidatorToQueue(),H.validateCell(e[o][3],d,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){i=!1,e.splice(t,1),o.valid=!0;const s=H.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,G.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,d),t))}r.checkIfQueueIsEmpty()}function oe(e,t){let o=e.length-1;if(o<0)return;for(;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(G.allowInsertRow)for(;e[o][0]>H.countRows()-1;){const{delta:e}=k.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===H.dataType&&(!G.columns||0===G.columns.length)&&G.allowInsertColumn)for(;k.propToCol(e[o][1])>H.countCols()-1;){const{delta:e}=k.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||k.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}H.forceFullRender=!0,F.adjustRowsAndCols(),H.runHooks("beforeChangeRender",e,t),W.lockEditor(),H._refreshBorders(null),W.unlockEditor(),H.view.adjustElementsSize(),H.runHooks("afterChange",e,t||"edit");const s=H.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function se(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ne(e,t){const o=H.getActiveEditor(),s=H.runHooks("beforeChange",e,t||"edit"),n=e.filter((e=>null!==e));return!1===s||0===n.length?(o&&o.cancelChanges(),[]):n}this.columnIndexMapper.addLocalHook("cacheUpdated",q),this.rowIndexMapper.addLocalHook("cacheUpdated",q),this.selection.addLocalHook("beforeSetRangeStart",(e=>{this.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(e=>{this.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(e=>{this.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=this.view._wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=this.view._wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,d.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),i=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,i),this.runHooks("afterSelectionByProp",s.row,H.colToProp(s.col),r.row,H.colToProp(r.col),t,i);const l=this.selection.isSelectedByAnyHeader(),a=this.selection.selectedRange.current();let h=!0;D&&(h=!1),t.isTouched()&&(h=!t.value);const c=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();!1!==h&&(l?c?this.view.scrollViewportVertically(H.rowIndexMapper.getRenderableFromVisualIndex(e.row)):u&&this.view.scrollViewportHorizontally(H.columnIndexMapper.getRenderableFromVisualIndex(e.col)):a&&!this.selection.isMultiple()?this.view.scrollViewport($(a.from)):this.view.scrollViewport($(e))),c&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):u?((0,n.removeClass)(this.rootElement,"ht__selection--rows"),(0,n.addClass)(this.rootElement,"ht__selection--columns")):(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,H.colToProp(o.col),s.row,H.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(e=>{this.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",((e,t,o)=>{this.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(e=>{this.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",((e,t,o)=>{this.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(()=>{W.destroyEditor(),this._refreshBorders(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(e=>{this.alter("insert_row_above",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(e=>{this.alter("insert_col_start",e,1,"auto")})),F={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const a=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,c.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[r,i]=n,l=r+i;if(o<=l){const e=Math.max(s-(l-o),0);n[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const l=H.countSourceRows();if(G.maxRows===l)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?l:0;const{delta:d,startPhysicalIndex:u}=k.createRow(t,n,{source:r,mode:h});if(d){const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=H.toVisualRow(u);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;X.isSelectedByRowHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(o+d,r),!0),X.setRangeEnd(H._createCellCoords(s+d,n))}else H._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?H.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=k.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray(G.colHeaders)){const e=[H.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(G.colHeaders,e)}const e=X.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=H.toVisualColumn(p);if(X.isSelectedByCorner())H.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;X.isSelectedByColumnHeader()&&(r=-1),X.getSelectedRange().pop(),X.setRangeStartOnly(H._createCellCoords(r,o+f),!0),X.setRangeEnd(H._createCellCoords(s,n+f))}else H._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeRow(o,s,r))return;const l=H.countRows(),a=G.fixedRowsTop;a>=n+1&&(G.fixedRowsTop-=Math.min(s,a-n));const h=G.fixedRowsBottom;h&&n>=l-h&&(G.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?H.countCols()-1:Math.max(o-t,0);let l=H.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!k.removeCol(o,s,r))return;const a=G.fixedColumnsStart;a>=n+1&&(G.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(G.colHeaders)&&(void 0===l&&(l=-1),G.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),F.adjustRowsAndCols(),H._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||F.adjustRowsAndCols()},adjustRowsAndCols(){const e=G.minRows,t=G.minSpareRows,o=G.minCols,s=G.minSpareCols;if(0===H.countRows()&&0===H.countCols()&&X.deselect(),e){const t=H.countRows();t<e&&k.createRow(t,e-t,{source:"auto"})}if(t){const e=H.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,G.maxRows-H.countSourceRows());k.createRow(H.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=H.countEmptyCols(!0));let t=H.countCols();if(o&&!G.columns&&t<o){const s=o-t;e+=s,k.createCol(t,s,{source:"auto"})}if(s&&!G.columns&&"array"===H.dataType&&e<s){t=H.countCols();const o=s-e,n=Math.min(o,G.maxCols-t);k.createCol(t,n,{source:"auto"})}}if(X.isSelected()){const e=H.countRows(),t=H.countCols();(0,c.arrayEach)(X.selectedRange,(o=>{let s=!1,n=o.from.row,r=o.from.col,i=o.to.row,l=o.to.col;n>e-1?(n=e-1,s=!0,i>n&&(i=n)):i>e-1&&(i=e-1,s=!0,n>i&&(n=i)),r>t-1?(r=t-1,s=!0,l>r&&(l=r)):l>t-1&&(l=t-1,s=!0,r>l&&(r=l)),s&&H.selectCell(n,r,i,l)}))}H.view&&H.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,d.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,c.pivot)(t),w=n.length,y=Math.max(w,m),v=H.getData().slice(f),E=(0,c.pivot)(v).slice(p,p+y);for(l=0;l<y;l+=1)if(l<w){for(r=0,i=n[l].length;r<C-i;r+=1)n[l].push(n[l][r%i]);l<E.length?g.push(n[l].concat(E[l])):g.push(n[l].concat(new Array(v.length).fill(null)))}else g.push(n[l%w].concat(E[l]));H.populateFromArray(f,p,(0,c.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,C),b=H.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<S){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(b[r]));H.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let T,_=0,O=0,M=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(i=o?A:Math.max(N,A),r=0;r<i&&!(o&&u.row>o.row&&A>N||!G.allowInsertRow&&u.row>H.countRows()-1||u.row>=G.maxRows);r++){const t=r-_,n=I(t).length,c=o?o.col-e.col+1:0;if(a=o?c:Math.max(n,c),u.col=e.col,T=H.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!T.skipRowOnPaste){for(O=0,l=0;l<a&&!(o&&u.col>o.col&&c>n||!G.allowInsertColumn&&u.col>H.countCols()-1||u.col>=G.maxCols);l++){if(T=H.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&T.skipColumnOnPaste){O+=1,u.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-O),o=H.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)M=!1;else{const t=(0,d.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,d.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,d.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,d.deepClone)(e):M=!1}else null!==o&&"object"==typeof o&&(M=!1);M&&h.push([u.row,u.col,e]),M=!0,u.col+=1}u.row+=1}else _+=1,u.row+=1,i+=1}H.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){V.setData(G.data),H.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(H.rootElement,"mobile"),this.updateSettings(G,!0),this.view=new y.default(this),W=a.default.getInstance(H,G,X),H.runHooks("init"),this.forceFullRender=!0,this.view.render(),B&&null===H.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(H.rootElement,(()=>{H.view._wt.wtOverlays.updateLastSpreaderSize(),H.render(),H.view.adjustElementsSize()})),"object"==typeof B&&(H.runHooks("afterChange",B[0],B[1]),B=!1),H.runHooks("afterInit")},this._createCellCoords=function(e,t){return H.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return H.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=H.getCellValidator(t);function l(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,n=t.visualRow,r=H.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=H.rowIndexMapper.getRenderableFromVisualIndex(n),t=H.columnIndexMapper.getRenderableFromVisualIndex(s);H.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var a;(0,i.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,r.isFunction)(n)?(e=H.runHooks("beforeValidate",e,t.visualRow,t.prop,s),H._registerImmediate((()=>{n.call(t,e,(o=>{H&&(o=H.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),H.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):H._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a,h=s;for(i=0,l=n.length;i<l;i++){if("object"!=typeof n[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[i][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=n[i][1]>=this.countCols()?n[i][1]:k.colToProp(n[i][1]),r.push([n[i][0],a,V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const d=ne(r,s);H.runHooks("afterSetDataAtCell",d,h),te(d,h,(()=>{oe(d,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=se(e,t,o),r=[];let i,l,a=s;for(i=0,l=n.length;i<l;i++)r.push([n[i][0],n[i][1],V.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=ne(r,s);H.runHooks("afterSetDataAtRowProp",h,a),te(h,a,(()=>{oe(h,a)}))},this.listen=function(){H&&!H.isListening()&&(x=H.guid,H.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(x=null,H.runHooks("afterUnlisten"))},this.isListening=function(){return x===H.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];H._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,n,r,i){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof s?H._createCellCoords(s,n):null;return F.populateFromArray(H._createCellCoords(e,t),o,l,r,i)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return k.spliceRow(e,t,o,...n)},this.getSelected=function(){if(X.isSelected())return(0,c.arrayMap)(X.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(X.isSelected())return Array.from(X.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!X.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,c.arrayEach)(X.getSelectedRange(),(e=>{const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,w.rangeEach)(o.row,s.row,(e=>{(0,w.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(W.lockEditor(),this._refreshBorders(null),W.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!H.view)return;const{width:e,height:t}=H.view.getLastSize(),{width:o,height:s}=H.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===H.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||H.view._wt.wtOverlays.scrollableElement===H.rootWindow)&&(H.view.setLastSize(o,s),H.render()),H.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(e=>{k=e,H.columnIndexMapper.fitToLength(this.getInitialColumnCount()),H.rowIndexMapper.fitToLength(this.countSourceRows()),F.adjustRowsAndCols()}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"updateData",source:t,metaManager:Y,firstRun:B})},this.loadData=function(e,t){(0,I.replaceData)(e,(e=>{k=e}),(()=>{Y.clearCellsCache(),H.initIndexMappers(),F.adjustRowsAndCols(),B&&(B=[null,"loadData"])}),{hotInstance:H,dataMap:k,dataSource:V,internalSource:"loadData",source:t,metaManager:Y,firstRun:B})},this.getInitialColumnCount=function(){const e=G.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===H.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==H.dataType&&"function"!==H.dataType||(t=k.colToPropCache.length);else if((0,i.isDefined)(G.dataSchema)){const e=k.getSchema();t=Array.isArray(e)?e.length:(0,d.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,i.isUndefined)(e)?k.getAll():k.getRange(H._createCellCoords(e,t),H._createCellCoords(o,s),k.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return k.getCopyableText(H._createCellCoords(e,t),H._createCellCoords(o,s))},this.getCopyableData=function(e,t){return k.getCopyable(e,k.colToProp(t))},this.getSchema=function(){return k.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(B?H.loadData:H.updateData).bind(this);let s,n,l=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?Q(e.language):"className"===s?J("className",e.className):"tableClassName"===s&&H.table?(J("tableClassName",e.tableClassName),H.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,H.addHook(s,e[s])):!t&&(0,d.hasOwnProperty)(e,s)&&(z[s]=e[s]));void 0===e.data&&void 0===G.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(k.createMap(),H.initIndexMappers());const a=H.countCols(),h=G.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||Y.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&Y.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,d.objectEach)(e.cell,(e=>{H.setCellMetaObject(e.row,e.col,e)})),H.runHooks("afterCellMetaReset");let c=H.rootElement.style.height;""!==c&&(c=parseInt(H.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){H.rootElement.getAttribute("style")&&H.rootElement.setAttribute("data-initialstyle",H.rootElement.getAttribute("style"))}if(null===u){const e=H.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?H.rootElement.setAttribute("style",e):(H.rootElement.style.height="",H.rootElement.style.overflow="")}else void 0!==u&&(H.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,H.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),H.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(H.view&&(H.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),H.view._wt.exportSettingsAsClassNames()),H.runHooks("afterUpdateSettings",e)),F.adjustRowsAndCols(),H.view&&!B&&(H.forceFullRender=!0,W.lockEditor(),H._refreshBorders(null),H.view._wt.wtOverlays.adjustElementsSize(),W.unlockEditor()),t||!H.view||""!==c&&""!==u&&void 0!==u||c===u||H.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=H.getSelectedLast();if(G.getValue){if((0,r.isFunction)(G.getValue))return G.getValue.call(H);if(e)return H.getData()[e[0][0]][G.getValue]}else if(e)return H.getDataAtCell(e[0],e[1])},this.getSettings=function(){return G},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){F.alter(e,t,o,s,n)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,n=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;n=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===s?null:H.view.getCellAtCoords(H._createCellCoords(n,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let n=o,r=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),H._createCellCoords(n,r)},this.colToProp=function(e){return k.colToProp(e)},this.propToCol=function(e){return k.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return k.get(e,k.colToProp(t))},this.getDataAtRowProp=function(e,t){return k.get(e,t)},this.getDataAtCol=function(e){const t=[],o=k.getRange(H._createCellCoords(0,e),H._createCellCoords(G.data.length-1,e),k.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=k.getRange(H._createCellCoords(0,k.propToCol(e)),H._createCellCoords(G.data.length-1,k.propToCol(e)),k.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let n;return n=void 0===e?V.getData():V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?V.getData(!0):V.getByRange(H._createCellCoords(e,t),H._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return V.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=se(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,V.getAtCell(t,o),s])})),(0,c.arrayEach)(n,(e=>{let[t,o,s]=e;V.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=H.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return V.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return V.getAtCell(e,t)},this.getDataAtRow=function(e){return k.getRange(H._createCellCoords(e,0),H._createCellCoords(e,this.countCols()-1),k.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const n=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[r,i]=n;let[,,l,a]=n,h=null,d=null;void 0===l&&(l=r),void 0===a&&(a=i);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return d=s.type,h?t=h===d:h=d,t})),c=t?d:"mixed",t})),c},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=Y.getCellMetaKeyValue(s,n,o);!1!==H.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(Y.removeCellMeta(s,n,o),H.runHooks("afterRemoveCellMeta",e,t,o,r)),r=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),n=2;n<o;n++)s[n-2]=arguments[n];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&Y.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,c.arrayEach)(s.reverse(),(t=>{Y.createRow(this.toPhysicalRow(e)),(0,c.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),H.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,d.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===H.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,r=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),Y.setCellMeta(n,r,o,s),H.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return Y.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),Y.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return Y.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===H.dataType||G.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,f.getRenderer)(o):(0,i.isUndefined)(o)?(0,f.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,p.getEditor)(o):(0,i.isUndefined)(o)?(0,p.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?H.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,m.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new Z;e&&(s.onQueueEmpty=e);let n=H.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=H.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),H.validateCell(H.getDataAtCell(n,e),H.getCellMeta(n,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;n-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=G.rowHeaders,o=e;return void 0!==o&&(o=H.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,w.rangeEach)(H.countRows()-1,(e=>{t.push(H.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!G.rowHeaders},this.hasColHeaders=function(){if(void 0!==G.colHeaders&&null!==G.colHeaders)return!!G.colHeaders;for(let e=0,t=H.countCols();e<t;e++)if(H.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=H.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=H.countCols();for(let o=0;o<t;o++)e.push(H.getColHeader(o));return e}let s=G.colHeaders;const n=H.toPhysicalColumn(o),i=function(e){const t=[],o=H.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(G.columns)&&G.columns(s)&&t.push(s);return t[e]}(n);return!1===G.colHeaders?s=null:G.columns&&(0,r.isFunction)(G.columns)&&G.columns(i)&&G.columns(i).title?s=G.columns(i).title:G.columns&&G.columns[n]&&G.columns[n].title?s=G.columns[n].title:Array.isArray(G.colHeaders)&&void 0!==G.colHeaders[n]?s=G.colHeaders[n]:(0,r.isFunction)(G.colHeaders)?s=G.colHeaders(n):G.colHeaders&&"string"!=typeof G.colHeaders&&"number"!=typeof G.colHeaders&&(s=(0,E.spreadsheetColumnLabel)(o)),s=H.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=H.getCellMeta(0,e).width}if(void 0!==t&&t!==G.width||(t=G.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=H._getColWidthFromSettings(e);return t=H.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=G.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=H._getRowHeightFromSettings(e);return t=H.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return V.countRows()},this.countSourceCols=function(){return V.countFirstRowKeys()},this.countRows=function(){return k.getLength()},this.countCols=function(){const e=G.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return H.view._wt.drawn?H.view._wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(H.countRows()-1,(o=>{if(H.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(H.countCols()-1,(o=>{if(H.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return G.isEmptyRow.call(H,e)},this.isEmptyCol=function(e){return G.isEmptyCol.call(H,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,r)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(D=!0);const o=X.selectCells(e);return o&&t&&H.listen(),D=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectColumns(e,t)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return X.selectRows(e,t)},this.deselectCell=function(){X.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e&&this.hasRowHeaders(),o=e&&this.hasColHeaders();D=!0,X.selectAll(t,o),D=!1};const re=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=!o,r=!s;let i=e,l=t;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){const o=Number.isInteger(e),s=Number.isInteger(t),n=o?re(this.rowIndexMapper,e):void 0,r=s?re(this.columnIndexMapper,t):void 0;if(null===n||null===r)return!1;i=o?H.rowIndexMapper.getRenderableFromVisualIndex(n):void 0,l=s?H.columnIndexMapper.getRenderableFromVisualIndex(r):void 0}const a=Number.isInteger(i),h=Number.isInteger(l);return a&&h?H.view.scrollViewport(H._createCellCoords(i,l),n,s,o,r):a&&!1===h?H.view.scrollViewportVertically(i,n,o):!(!h||!1!==a)&&H.view.scrollViewportHorizontally(l,s,r)},this.destroy=function(){if(H._clearTimeouts(),H._clearImmediates(),H.view&&H.view.destroy(),V&&V.destroy(),V=null,this.getShortcutManager().destroy(),Y.clearCache(),(0,R.isRootInstance)(H)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(H.rootElement),L.destroy(),W&&W.destroy(),H.batchExecution((()=>{H.rowIndexMapper.unregisterAll(),H.columnIndexMapper.unregisterAll(),K.getItems().forEach((e=>{let[,t]=e;t.destroy()})),K.clear(),H.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(H),(0,d.objectEach)(H,((e,t,o)=>{var s;(0,r.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),H.isDestroyed=!0,k&&k.destroy(),k=null,F=null,X=null,W=null,H=null},this.getActiveEditor=function(){return W.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:K.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:K.getId(e)},this.getInstance=function(){return H},this.addHook=function(e,t){T.default.getSingleton().add(e,t,H)},this.hasHook=function(e){return T.default.getSingleton().has(e,H)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,H)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,H)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(H,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)(G.language,e,t)},this.toHTML=()=>(0,u.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,u.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,c.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,c.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W.destroyEditor(e),H.view.render(),t&&X.isSelected()&&W.prepareEditor()},this.isRtl=function(){return"rtl"===H.rootWindow.getComputedStyle(H.rootElement).direction},this.isLtr=function(){return!H.isRtl()},this.getDirectionFactor=function(){return H.isLtr()?1:-1};const ie=(0,A.createShortcutManager)({handleEvent(e){const t=H.isListening(),o=void 0!==(null==e?void 0:e.key);return t&&o},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||H.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ie.releasePressedKeys()})),this.getShortcutManager=function(){return ie};const le=ie.addContext("grid"),ae={runOnlyIf:()=>(0,i.isDefined)(H.getSelected())&&H.countRenderedRows()>0&&H.countRenderedCols()>0,group:P};ie.setActiveContextName("grid"),le.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>{H.selectAll()}},{keys:[["Control/Meta","Enter"]],callback:()=>{const e=H.getSelectedRange(),{row:t,col:o}=e[e.length-1].highlight,s=H.getDataAtCell(t,o),n=new Map;for(let r=0;r<e.length;r++)e[r].forAll(((e,r)=>{if(e>=0&&r>=0&&(e!==t||r!==o)){const{readOnly:t}=H.getCellMeta(e,r);t||n.set(`${e}x${r}`,[e,r,s])}}));H.setDataAtCell(Array.from(n.values()))},runOnlyIf:()=>H.getSelectedRangeLast().getCellsCount()>1},{keys:[["ArrowUp"]],callback:()=>{X.transformStart(-1,0)}},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(0,1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowUp","Shift"]],callback:()=>{X.transformEnd(-1,0)}},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(0,1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>{X.transformStart(1,0)}},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1),H.getSelectedRangeLast().highlight.col))}},{keys:[["ArrowDown","Shift"]],callback:()=>{X.transformEnd(1,0)}},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-1,-1);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(o,t.col))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>{X.transformStart(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowLeft","Shift"]],callback:()=>{X.transformEnd(0,-1*H.getDirectionFactor())}},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[H.countCols()-1,-1]:[0,1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>{X.transformStart(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=H.getSelectedRangeLast().highlight.row,t=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(H._createCellCoords(e,t))}},{keys:[["ArrowRight","Shift"]],callback:()=>{X.transformEnd(0,H.getDirectionFactor())}},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>{const{from:e,to:t}=H.getSelectedRangeLast(),o=H.columnIndexMapper.getNearestNotHiddenIndex(...H.isRtl()?[0,1]:[H.countCols()-1,-1]);X.setRangeStart(e.clone()),X.setRangeEnd(H._createCellCoords(t.row,o))},runOnlyIf:()=>!(H.selection.isSelectedByCorner()||H.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedColumnsStart,10),t=H.getSelectedRangeLast().highlight.row,o=H.columnIndexMapper.getNearestNotHiddenIndex(e,1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(0,1)))}},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsTop,10),t=parseInt(H.getSettings().fixedColumnsStart,10),o=H.rowIndexMapper.getNearestNotHiddenIndex(e,1),s=H.columnIndexMapper.getNearestNotHiddenIndex(t,1);X.setRangeStart(H._createCellCoords(o,s))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>{X.setRangeStart(H._createCellCoords(H.getSelectedRangeLast().highlight.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>{X.setRangeEnd(H._createCellCoords(X.selectedRange.current().from.row,H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1)))}},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>{const e=parseInt(H.getSettings().fixedRowsBottom,10),t=H.rowIndexMapper.getNearestNotHiddenIndex(H.countRows()-e-1,-1),o=H.columnIndexMapper.getNearestNotHiddenIndex(H.countCols()-1,-1);X.setRangeStart(H._createCellCoords(t,o))},runOnlyIf:()=>H.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>{X.transformStart(-H.countVisibleRows(),0)}},{keys:[["PageUp","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.max(e.row-H.countVisibleRows(),0),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.max(t.row-s,0);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["PageDown"]],callback:()=>{X.transformStart(H.countVisibleRows(),0)}},{keys:[["PageDown","Shift"]],callback:()=>{const{to:e}=H.getSelectedRangeLast(),t=Math.min(e.row+H.countVisibleRows(),H.countRows()-1),o=H.rowIndexMapper.getNearestNotHiddenIndex(t,-1);if(null!==o){const t=H._createCellCoords(o,e.col),s=e.row-H.view.getFirstFullyVisibleRow(),n=Math.min(t.row-s,H.countRows()-1);X.setRangeEnd(t),H.scrollViewportTo(n)}}},{keys:[["Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(t.row,t.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t="function"==typeof G.tabMoves?G.tabMoves(e):G.tabMoves;X.transformStart(-t.row,-t.col)}}],ae),(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);K.addItem(e,new t(this))})),T.default.getSingleton().run(H,"construct")},o(95988),o(60740),o(6282);var n=o(83302),r=o(85015),i=o(93315),l=o(37595),a=s(o(6116)),h=s(o(75244)),d=o(22232),c=o(50095),u=o(52870),g=o(52036),f=o(7462),p=o(83605),m=o(80239),C=o(18609),w=o(68145),y=s(o(54833)),v=s(o(43951)),E=o(65320),S=o(33165),R=o(45433),b=o(21280),T=s(o(56307)),_=o(22489),O=o(8222),M=o(69167),I=o(3177),N=o(42386),A=o(47152);const P="gridDefault";let x=null;new Set},85631:(e,t,o)=>{"use strict";t.__esModule=!0,o(60740),o(95988);var s=o(29270),n=o(65320),r=o(22232),i=o(50095),l=o(68145),a=o(93315);class h{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){this.instance=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,n=0,i=!1;if("function"==typeof t){const t=(0,r.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=i?t(o):t[o];if((0,r.isObject)(e)){if(void 0!==e.data){const t=i?n:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}n+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,n=t,i=o;return void 0===n&&(n=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,r.objectEach)(e,((e,t)=>{null===e?(s=i+t,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):n=this.recursiveDuckColumns(e,n,`${t}.`)})),n}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.instance.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,a.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,a.isDefined)(t))return this.instance.toVisualColumn(t);const o=this.instance.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,r.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.instance.countSourceRows();let i=n,a=0,h=e;("number"!=typeof h||h>=n)&&(h=n),h<this.instance.countRows()&&(i=this.instance.toPhysicalRow(h));if(!1===this.instance.runHooks("beforeCreateRow",h,t,o)||null===i)return{delta:0};const d=this.tableMeta.maxRows,c=this.getSchema().length,u=[];for(;a<t&&n+a<d;){let e=null;"array"===this.instance.dataType?this.tableMeta.dataSchema?e=(0,r.deepClone)(this.getSchema()):(e=[],(0,l.rangeEach)(c-1,(()=>e.push(null)))):"function"===this.instance.dataType?e=this.tableMeta.dataSchema(h+a):(e={},(0,r.deepExtend)(e,this.getSchema())),u.push(e),a+=1}this.instance.rowIndexMapper.insertIndexes(h,a),"below"===s&&(i=Math.min(i+1,n)),this.spliceData(i,0,u);const g=this.instance.toVisualRow(i);return this.instance.countSourceRows()===u.length&&this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount()),a>0&&(null==e?this.metaManager.createRow(null,a):"auto"!==o&&this.metaManager.createRow(i,t)),this.instance.runHooks("afterCreateRow",g,a,o),this.instance.forceFullRender=!0,{delta:a,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const n=this.dataSource,r=this.tableMeta.maxCols,i=this.instance.countSourceCols();let l=e;("number"!=typeof l||l>=i)&&(l=i);if(!1===this.instance.runHooks("beforeCreateCol",l,t,o))return{delta:0};let a=i;l<this.instance.countCols()&&(a=this.instance.toPhysicalColumn(l));const h=this.instance.countSourceRows();let d=this.instance.countCols(),c=0,u=a;"end"===s&&(u=Math.min(u+1,i));const g=u;for(;c<t&&d<r;){if("number"!=typeof l||l>=d)if(h>0)for(let e=0;e<h;e+=1)void 0===n[e]&&(n[e]=[]),n[e].push(null);else n.push([null]);else for(let e=0;e<h;e++)n[e].splice(u,0,null);c+=1,u+=1,d+=1}this.instance.columnIndexMapper.insertIndexes(l,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.instance.toVisualColumn(g);return this.instance.runHooks("afterCreateCol",f,c,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const n=this.visualRowsToPhysical(s,t),r=this.instance.countSourceRows();s=(r+s)%r;if(!1===this.instance.runHooks("beforeRemoveRow",s,n.length,n,o))return!1;const i=n.length;if(this.filterData(s,i,n),s<this.instance.countRows()){this.instance.rowIndexMapper.removeIndexes(n);const e=(0,a.isDefined)(this.tableMeta.columns)||(0,a.isDefined)(this.tableMeta.dataSchema);0===this.instance.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.instance.columnIndexMapper.setIndexesSequence([])}return n.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.instance.runHooks("afterRemoveRow",s,i,n,o),this.instance.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.instance.countCols()+s)%this.instance.countCols();const n=this.visualColumnsToPhysical(s,t),r=n.slice(0).sort(((e,t)=>t-e));if(!1===this.instance.runHooks("beforeRemoveCol",s,t,n,o))return!1;let i=!0;const l=r.length,a=this.dataSource;for(let e=0;e<l;e++)i&&n[0]!==n[e]-e&&(i=!1);if(i)for(let e=0,o=this.instance.countSourceRows();e<o;e++)a[e].splice(n[0],t),0===e&&this.metaManager.removeColumn(n[0],t);else for(let e=0,t=this.instance.countSourceRows();e<t;e++)for(let t=0;t<l;t++)a[e].splice(r[t],1),0===e&&this.metaManager.removeColumn(r[t],1);return s<this.instance.countCols()&&(this.instance.columnIndexMapper.removeIndexes(n),0===this.instance.columnIndexMapper.getNotTrimmedIndexesLength()&&this.instance.rowIndexMapper.setIndexesSequence([])),this.instance.runHooks("afterRemoveCol",s,t,n,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.instance.getDataAtCol(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let d=0;for(;d<o;)a.push(null),d+=1;return(0,i.to2dArray)(a),this.instance.populateFromArray(t,e,a,null,null,"spliceCol"),n}spliceRow(e,t,o){const s=this.instance.getSourceDataAtRow(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let d=0;for(;d<o;)a.push(null),d+=1;return this.instance.populateFromArray(e,t,[a],null,null,"spliceRow"),n}spliceData(e,t,o){if(!1!==this.instance.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.instance.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.instance.toPhysicalRow(e);let s=this.dataSource[o];const n=this.instance.runHooks("modifyRowData",o);s=isNaN(n)?n:s;let i=null;if(s&&s.hasOwnProperty&&(0,r.hasOwnProperty)(s,t))i=s[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o=s;if(!o)return null;for(let t=0,s=e.length;t<s;t++)if(o=o[e[t]],void 0===o)return null;i=o}else"function"==typeof t&&(i=t(this.dataSource.slice(o,o+1)[0]));if(this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(i);this.instance.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(i=e.value)}return i}getCopyable(e,t){return this.instance.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.instance.toPhysicalRow(e);let n=o,i=this.dataSource[s];const l=this.instance.runHooks("modifyRowData",s);if(i=isNaN(l)?l:i,this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(n);this.instance.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}if(i&&i.hasOwnProperty&&(0,r.hasOwnProperty)(i,t))i[t]=n;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o,s=i,r=0;for(r=0,o=e.length-1;r<o;r++)void 0===s[e[r]]&&(s[e[r]]={}),s=s[e[r]];s[e[r]]=n}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],n):i[t]=n}visualRowsToPhysical(e,t){const o=this.instance.countSourceRows(),s=[];let n,r=(o+e)%o,i=t;for(;r<o&&i;)n=this.instance.toPhysicalRow(r),s.push(n),i-=1,r+=1;return s}visualColumnsToPhysical(e,t){const o=this.instance.countCols(),s=[];let n=(o+e)%o,r=t;for(;n<o&&r;){const e=this.instance.toPhysicalColumn(n);s.push(e),r-=1,n+=1}return s}clear(){for(let e=0;e<this.instance.countSourceRows();e++)for(let t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.instance.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.instance.countRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,h.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let n,r,i;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const d=o===h.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max(a-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=c;n++){i=[];const o=n>=0?this.instance.toPhysicalRow(n):n;for(r=Math.min(e.col,t.col);r<=u&&null!==o;r++)i.push(d.call(this,n,this.colToProp(r)));null!==o&&s.push(i)}return s}getText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.instance=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var d=h;t.default=d},43951:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=o(22232),n=o(65320),r=o(50095),i=o(68145),l=o(85015);var a=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.hot=e,this.data=t,this.dataType="array",this.colToProp=()=>{},this.propToCol=()=>{}}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,r.arrayEach)(this.data,((o,s)=>{const n=this.getAtCell(s,e);t.push(n)})),t}getAtRow(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=void 0===t&&void 0===o;let a=null,h=null;if(a=this.modifyRowData(e),Array.isArray(a))h=[],r?a.forEach(((t,o)=>{h[o]=this.getAtPhysicalCell(e,o,a)})):(0,i.rangeEach)(t,o,(o=>{h[o-t]=this.getAtPhysicalCell(e,o,a)}));else if((0,s.isObject)(a)||(0,l.isFunction)(a))if(h=n?[]:{},!r||n){const r=0,l=this.countFirstRowKeys()-1;(0,i.rangeEach)(r,l,(i=>{const d=this.colToProp(i);if(i>=(t||r)&&i<=(o||l)&&!Number.isInteger(d)){const t=this.getAtPhysicalCell(e,d,a);n?h.push(t):(0,s.setProperty)(h,d,t)}}))}else(0,s.objectEach)(a,((t,o)=>{(0,s.setProperty)(h,o,this.getAtPhysicalCell(e,o,a))}));return h}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,s.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(o=n.value)}Number.isInteger(t)?this.data[e][t]=o:(0,s.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let n=null;if(o&&(n="string"==typeof t?(0,s.getProperty)(o,t):"function"==typeof t?t(o):o[t]),this.hot.hasHook("modifySourceData")){const o=(0,s.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(n=o.value)}return n}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,n=null,r=null,l=null,a=null;null===e||null===t?(s=!0,n=0,l=this.countRows()-1):(n=Math.min(e.row,t.row),r=Math.min(e.col,t.col),l=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const h=[];return(0,i.rangeEach)(n,l,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,r,a,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}};t.default=a},3177:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(85631));t.DataMap=n.default;var r=s(o(10146));t.MetaManager=r.default;var i=s(o(87574));t.metaSchemaFactory=i.default;var l=o(73046);t.replaceData=l.replaceData;var a=o(24298);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(63511);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},10146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(23373)),r=s(o(34624)),i=s(o(22142)),l=s(o(7083)),a=s(o(65718)),h=o(22232);class d{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new n.default(e),this.tableMeta=new r.default(this.globalMeta),this.columnMeta=new i.default(this.globalMeta),this.cellMeta=new l.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:n}=o;const r=this.cellMeta.getMeta(e,t);return r.visualRow=s,r.visualCol=n,r.row=e,r.col=t,this.runLocalHooks("afterGetCellMeta",r),r}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=d,(0,h.mixin)(d,a.default)},32156:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=o(50095),n=o(8972);class r{constructor(e){this.valueFactory=e,this.data=[],this.index=[],this.holes=new Set}obtain(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const r=(0,n.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,r),...o,...this.index.slice(r)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,n.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,s.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}t.default=r},7083:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(22232),r=o(8972),i=s(o(32156));t.default=class{constructor(e){this.columnMeta=e,this.metas=new i.default((()=>this._createRow()))}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,n.extend)(s,o),(0,r.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var n;const r=this.metas.obtain(e).obtain(t);null===(n=r._automaticallyAssignedMetaProps)||void 0===n||n.delete(o),r[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)e.push(...t[o].values());return e}getMetasAtRow(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new i.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},22142:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(32156));const l=["data","width"];t.default=class{constructor(e){this.globalMeta=e,this.metas=new i.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,n.extend)(o,t),(0,r.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,r.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},23373:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(87574));t.default=class{constructor(e){this.metaCtor=class{},this.meta=this.metaCtor.prototype,(0,n.extend)(this.meta,(0,i.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,n.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},34624:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22232),n=o(8972);t.default=class{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,s.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,e,e)}}},87574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93315),n=o(22232);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",isEmptyCol(e){let t,o,n;for(t=0,o=this.countRows();t<o;t++)if(n=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(n))return!1;return!0},isEmptyRow(e){let t,o,r,i;for(t=0,o=this.countCols();t<o;t++)if(r=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(r))return"object"==typeof r&&(i=this.getCellMeta(e,t),(0,n.isObjectEqual)(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},24298:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(56307)),r=o(22232),i=o(85015);t.DynamicCellMetaMod=class{constructor(e){this.metaManager=e,this.metaSyncMemo=new Map,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),n.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:n,visualCol:l}=e,a=this.metaManager.hot,h=a.colToProp(l);e.prop=h,a.runHooks("beforeGetCellMeta",n,l,e);const d=(0,r.hasOwnProperty)(e,"type")?e.type:null;let c=(0,i.isFunction)(e.cells)?e.cells(o,s,h):null;var u;d&&(c?c.type=null!==(u=c.type)&&void 0!==u?u:d:c={type:d});c&&this.metaManager.updateCellMeta(o,s,c),a.runHooks("afterGetCellMeta",n,l,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},63511:(e,t,o)=>{"use strict";t.__esModule=!0,o(60740);t.ExtendMetaPropertiesMod=class{constructor(e){this.metaManager=e,this.usageTracker=new Set,this.propDescriptors=new Map([["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]]),this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:o,onChange:s=(()=>{})}=e,n="string"==typeof o,r=n?o:t,i=`_${r}`;this.metaManager.globalMeta.meta[i]=this.metaManager.globalMeta.meta[r],this.installPropWatcher(t,i,s),n&&this.installPropWatcher(o,i,s)}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(n){const r=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,n,r),this[t]=n},enumerable:!0,configurable:!0})}}},8972:(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,n.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(r))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};(0,s.objectEach)(r,((t,n)=>{var r;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(n,o)&&(i[n]=t,null===(r=e._automaticallyAssignedMetaProps)||void 0===r||r.add(n))})),(0,s.extend)(e,i)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(60740);var s=o(22232),n=o(65324)},73046:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:a,dataMap:h,dataSource:d,internalSource:c,source:u,metaManager:g,firstRun:f}=s,p=(0,n.toUpperCaseFirst)(c),m=a.getSettings();Array.isArray(m.dataSchema)?a.dataType="array":(0,r.isFunction)(m.dataSchema)?a.dataType="function":a.dataType="object";h&&h.destroy();e=a.runHooks(`before${p}`,e,f,u);const C=new i.default(a,e,g);if(t(C),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${c} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=C.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=m.startRows;s<n;s++)if("object"!==a.dataType&&"function"!==a.dataType||!m.dataSchema)if("array"===a.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=m.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(a.dataType="array");m.data=e,C.dataSource=e,d.data=e,d.dataType=a.dataType,d.colToProp=C.colToProp.bind(C),d.propToCol=C.propToCol.bind(C),d.countCachedColumns=C.countCachedColumns.bind(C),o(C),a.runHooks(`after${p}`,e,f,u),f||(a.runHooks("afterChange",null,c),a.render())},o(95988),o(60740);var n=o(18609),r=o(85015),i=s(o(85631)),l=o(22232)},6116:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(80151),r=o(24449),i=o(83302),l=o(83605),a=s(o(75244)),h=o(93315);const d="editorManager.navigation";t.SHORTCUTS_GROUP_NAVIGATION=d;const c="editorManager.handlingEditor";t.SHORTCUTS_GROUP_EDITOR=c;class u{constructor(e,t,o){this.instance=e,this.tableMeta=t,this.selection=o,this.eventManager=new a.default(e),this.destroyed=!1,this.lock=!1,this.activeEditor=void 0,this.cellProperties=void 0;this.instance.getShortcutManager().addContext("editor"),this.registerShortcuts(),this.instance.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.instance.isListening()&&this.openEditor("",e)})),this.instance.view._wt.update("onCellDblClick",((e,t,o)=>this.onCellDblClick(e,t,o)))}registerShortcuts(){const e=this.instance.getShortcutManager(),t=e.getContext("grid"),o=e.getContext("editor"),s={group:c};o.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:(t,o)=>{this.closeEditorAndSaveChanges(e.isCtrlPressed()),this.moveSelectionAfterEnter(o.includes("shift"))}},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>{this.closeEditorAndRestoreOriginalValue(e.isCtrlPressed()),this.activeEditor.focus()}}],s),t.addShortcuts([{keys:[["F2"]],callback:e=>{this.openEditor(null,e,!0)}},{keys:[["Backspace"],["Delete"]],callback:()=>{this.instance.emptySelectedCells(),this.prepareEditor()}},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>{this.instance.getSettings().enterBeginsEditing?this.cellProperties.readOnly?this.moveSelectionAfterEnter():this.openEditor(null,e,!0):this.moveSelectionAfterEnter(t.includes("shift")),(0,r.stopImmediatePropagation)(e)}}],{...s,runOnlyIf:()=>(0,h.isDefined)(this.instance.getSelected())})}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const{row:e,col:t}=this.instance.getSelectedRangeLast().highlight,o=this.instance.runHooks("modifyGetCellCoords",e,t);let s=e,n=t;Array.isArray(o)&&([s,n]=o),this.cellProperties=this.instance.getCellMeta(s,n);const{activeElement:r}=this.instance.rootDocument;if(r&&(0,i.isOutsideInput)(r)&&r.blur(),!this.isCellEditable())return void this.clearActiveEditor();const a=this.instance.getCell(e,t,!0);if(a){const o=this.instance.getCellEditor(this.cellProperties),r=this.instance.colToProp(n),i=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(s),n);this.activeEditor=(0,l.getEditorInstance)(o,this.instance),this.activeEditor.prepare(e,t,r,a,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.isCellEditable()){if(!this.activeEditor){const{row:e,col:t}=this.instance.getSelectedRangeLast().highlight,o=this.instance.rowIndexMapper.getRenderableFromVisualIndex(e),s=this.instance.columnIndexMapper.getRenderableFromVisualIndex(t);this.instance.view.scrollViewport(this.instance._createCellCoords(o,s)),this.instance.view.render(),this.prepareEditor()}this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))}else this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.instance.getCellEditor(this.cellProperties),{row:t,col:o}=this.instance.getSelectedRangeLast().highlight,{rowIndexMapper:s,columnIndexMapper:n}=this.instance,r=s.isHidden(this.instance.toPhysicalRow(t))||n.isHidden(this.instance.toPhysicalColumn(o));return!(this.cellProperties.readOnly||!e||r)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}onAfterDocumentKeyDown(e){if(!this.instance.isListening())return;const{keyCode:t}=e;if(!this.selection.isSelected())return;const o=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,n.isFunctionKey)(t)||(0,n.isCtrlMetaKey)(t)||o||this.isEditorOpened())){const t=this.instance.getShortcutManager().getContext("editor"),o={runOnlyIf:()=>(0,h.isDefined)(this.instance.getSelected()),group:d};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.instance.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.instance.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.instance.selection.transformStart(0,-1*this.instance.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.instance.selection.transformStart(0,this.instance.getDirectionFactor())}}],o),this.openEditor("",e)}}onCellDblClick(e,t,o){"TD"===o.nodeName&&this.openEditor(null,e,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}const g=new WeakMap;u.getInstance=function(e,t,o){let s=g.get(e);return s||(s=new u(e,t,o),g.set(e,s)),s};var f=u;t.default=f},87857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(93231)),r=o(93273),i=o(50095),l=o(83302),a=o(93315),h=o(18609),d=o(80151),c=o(50695);const u=new WeakMap,g="autocomplete";t.EDITOR_TYPE=g;class f extends r.HandsontableEditor{static get EDITOR_TYPE(){return g}constructor(e){super(e),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],r=e.length;let i,l,d,c,u=t.length;if(0===r){for(d=0;d<u;d++)n.push(d);return n}for(d=0;d<u;d++){if(l=(0,h.stripTags)((0,a.stringify)(t[d])),o)c=l.indexOf(e);else{const t=this.cellProperties.locale;c=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(i=l.length-c-r,s.push({baseIndex:d,index:c,charsLeft:i,value:l}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),d=0,u=s.length;d<u;d++)n.push(s[d].baseIndex);return n})),this.query=null,this.strippedChoices=[],this.rawChoices=[],u.set(this,{skipOne:!1,isMacOS:this.hot.rootWindow.navigator.platform.indexOf("Mac")>-1})}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,a.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll")}open(){const e=u.get(this);super.open();const t=this.htEditor.getInstance(),o=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();let s=(0,l.getScrollbarWidth)();0===s&&e.isMacOS&&(s+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),t.updateSettings({colWidths:o?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:o?(0,l.outerWidth)(this.TEXTAREA)+s:void 0,renderer:(e,t,o,s,n,r,i)=>{(0,c.textRenderer)(e,t,o,s,n,r,i);const{filteringCaseSensitive:l,allowHtml:h,locale:d}=this.cellProperties,u=this.query;let g,f,p=(0,a.stringify)(r);p&&!h&&(g=!0===l?p.indexOf(u):p.toLocaleLowerCase(d).indexOf(u.toLocaleLowerCase(d)),-1!==g&&(f=p.substr(g,u.length),p=p.replace(f,`<strong>${f}</strong>`))),t.innerHTML=p},autoColumnSize:!0}),e.skipOne&&(e.skipOne=!1),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close()}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,n=this.cellProperties.filter;let r=null,a=null,h=e;s&&(r=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const d=Array.isArray(r)?r.length:0;if(!1===n)d&&(a=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&d<=t);t++)d?e.push(h[r[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,i.pivot)([h])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),n=(0,l.outerHeight)(this.TEXTAREA),r=this.getDropdownHeight(),i=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),d=s.top-h.top-a+i,c=e.scrollHeight-d-a-n,u=r>c&&d>c;return u?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(u?d:c,r),u}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,n=0,r=null;do{n=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=n,s+=1}while(o<e);r=o-n,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-r+"px"),this.setDropdownHeight(o-n)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,i.arrayMap)(e,(e=>(0,a.stringify)(e)));return(0,i.arrayMap)(o,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===d.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===d.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){const t=u.get(this);if(t.skipOne=!1,(0,d.isPrintableChar)(e.keyCode)||e.keyCode===d.KEY_CODES.BACKSPACE||e.keyCode===d.KEY_CODES.DELETE||e.keyCode===d.KEY_CODES.INSERT){let o=10;if(e.keyCode===d.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(o+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value),t.skipOne=!0}),o)}}}t.AutocompleteEditor=f},25815:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(87857);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},97296:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=o(93315),r=o(22232),i=o(6116),l=s(o(4748)),a=o(83302);const h="base";t.EDITOR_TYPE=h;const d=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});t.EDITOR_STATE=d;const c="baseEditor";t.SHORTCUTS_GROUP_EDITOR=c;class u{static get EDITOR_TYPE(){return h}constructor(e){this.hot=e,this.instance=e,this.state=d.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,n,r){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=n,this.cellProperties=r,this.state=d.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,r,i;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),r=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[o,s,r,i]=[this.row,this.col,null,null];const l=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(l)&&([o,s]=l);const a=this.hot.getShortcutManager().getContext("editor"),h={runOnlyIf:()=>(0,n.isDefined)(this.hot.getSelected()),group:c};this.isInFullEditMode()&&a.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],h),this.hot.populateFromArray(o,s,e,r,i,"edit")}beginEditing(e,t){if(this.state!==d.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),r=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,r)),this.state=d.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,n.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(this.isWaiting())return;const n=this.hot.getShortcutManager().getContext("editor");if(n.removeShortcutsByGroup(c),n.removeShortcutsByGroup(i.SHORTCUTS_GROUP_NAVIGATION),this.state!==d.VIRGIN){if(this.state===d.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=d.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=d.FINISHED,this.discardEditor(e)})):(this.state=d.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=d.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===d.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=d.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=d.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===d.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,n=this.hot.rootWindow,r=(0,a.offset)(t),i=(0,a.outerWidth)(t),l=(0,a.offset)(this.hot.rootElement),h=(0,a.outerWidth)(this.hot.rootElement),d=o.topOverlay.holder,c=o.inlineStartOverlay.holder,u=d!==n?d.scrollTop:0,g=c!==n?c.scrollLeft:0,f=n.innerWidth-l.left-h,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,C=["master","inline_start"].includes(m)?u:0,w=["master","top","bottom"].includes(m)?g:0,y=r.top===l.top?0:1;let v=r.top-l.top-y-C,E=0;E=this.hot.isRtl()?n.innerWidth-r.left-i-f-1+w:r.left-l.left-1-w,["top","top_inline_start_corner"].includes(m)&&(v+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(E+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),T=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===T)&&(v+=1),b<=0&&(E+=1);const _=s.rowsRenderCalculator.startPosition,O=s.columnsRenderCalculator.startPosition,M=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),N=(0,a.getScrollbarWidth)(this.hot.rootDocument),A=t.offsetTop+_-I;let P=0;if(this.hot.isRtl()){const e=t.offsetLeft;P=e>=0?p.getWidth()-t.offsetLeft:Math.abs(e),P+=O-M-i}else P=t.offsetLeft+O-M;const x=(0,a.getComputedStyle)(this.TD,this.hot.rootWindow),D=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",H=parseInt(x[D],10)>0?0:1,L=parseInt(x.borderTopWidth,10)>0?0:1,k=(0,a.outerWidth)(t)+H,V=(0,a.outerHeight)(t)+L,F=(0,a.hasVerticalScrollbar)(d)?N:0,W=(0,a.hasHorizontalScrollbar)(c)?N:0,B=this.hot.view.maximumVisibleElementWidth(P)-F+H;return{top:v,start:E,height:V,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-W+L,23),width:k,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=u,(0,r.mixin)(u,l.default)},48253:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97296);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},99935:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302);const r="checkbox";t.EDITOR_TYPE=r;class i extends s.BaseEditor{static get EDITOR_TYPE(){return r}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,n.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=i},63729:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99935);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},23330:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(60740);var n=s(o(33034)),r=s(o(32134)),i=o(5071),l=s(o(75244)),a=o(83302),h=o(22232),d=o(80151);o(54150);const c="date";t.EDITOR_TYPE=c;const u="dateEditor";class g extends i.TextEditor{static get EDITOR_TYPE(){return c}constructor(e){super(e),this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,this.$datePicker=null}init(){if("function"!=typeof n.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof r.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.instance.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,a.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);new l.default(this).addEventListener(this.datePicker,"mousedown",(e=>e.stopPropagation()))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:u})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.instance._registerTimeout((()=>{this.instance._refreshBorders()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(u),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const e=this.originalValue;void 0!==e&&this.setValue(e)}super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,s=this.instance.view.isMouseDown(),i=!!e&&(0,d.isFunctionKey)(e.keyCode);let l;this.datePicker.style.display="block",this.$datePicker=new r.default(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,a.outerHeight)(this.TD)}px`;let h=this.hot.rootWindow.pageXOffset;h=this.hot.isRtl()?t.right-(0,a.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${h}px`,this.originalValue?(l=this.originalValue,(0,n.default)(l,o,!0).isValid()&&this.$datePicker.setMoment((0,n.default)(l,o),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),i||s||this.setValue("")):this.cellProperties.defaultDate?(l=this.cellProperties.defaultDate,(0,n.default)(l,o,!0).isValid()&&this.$datePicker.setMoment((0,n.default)(l,o),!0),i||s||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,h.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,n.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),this.hideDatepicker(),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=g},58437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23330);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},14733:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(25815),r=s(o(56307));const i="dropdown";t.EDITOR_TYPE=i;class l extends n.AutocompleteEditor{static get EDITOR_TYPE(){return i}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=l,r.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.getCellMeta(t,this.propToCol(o));s.editor===l&&void 0===s.strict&&(s.filter=!1,s.strict=!0)}))},9535:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14733);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},95567:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302),r=o(24449),i=o(22232),l=o(6116);const a="handsontableEditor",h="handsontable";t.EDITOR_TYPE=h;class d extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,n.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r);const l=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&l.setValue(o),l.instance.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,i.extend)(a,r.handsontable),this.htOptions=a}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getInstance().getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:a,relativeToGroup:l.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor.getInstance();if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,r.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor.getInstance();let s,n;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(n=t.getSelectedLast()[0],s=Math.max(0,n-1)):(n=t.getSelectedLast()[0],s=n-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor.getInstance();let s,n;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;n=t.getSelectedLast()[0],s=Math.min(e,n+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.HandsontableEditor=d},93273:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95567);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},74465:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(n.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(r.CheckboxEditor),(0,f.registerEditor)(i.DateEditor),(0,f.registerEditor)(l.DropdownEditor),(0,f.registerEditor)(a.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(d.PasswordEditor),(0,f.registerEditor)(c.SelectEditor),(0,f.registerEditor)(u.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(25815);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(48253);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var r=o(63729);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var i=o(58437);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var l=o(9535);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(93273);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(97130);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var d=o(63630);t.PasswordEditor=d.PasswordEditor,t.PASSWORD_EDITOR=d.EDITOR_TYPE;var c=o(93333);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var u=o(5071);t.TextEditor=u.TextEditor,t.TEXT_EDITOR=u.EDITOR_TYPE;var g=o(65930);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(83605);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},97130:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47427);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},47427:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n="numeric";t.EDITOR_TYPE=n;class r extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=r},63630:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35356);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},35356:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302);const r="password";t.EDITOR_TYPE=r;class i extends s.TextEditor{static get EDITOR_TYPE(){return r}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,n.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=i},83605:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.RegisteredEditor=u,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)i.get(e)||g(null,e),o=i.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=a(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()},t.registerEditor=g,o(60740);var n=s(o(56307)),r=s(o(63800));const i=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:d,getValues:c}=(0,r.default)("editors");function u(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},n.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new u(t);"string"==typeof e&&l(e,o),i.set(t,o)}t.getRegisteredEditors=c,t.getRegisteredEditorNames=d,t.hasEditor=h},93333:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},82854:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302),r=o(22232);const i="ht_editor_visible",l="selectEditor",a="select";t.EDITOR_TYPE=a;class h extends s.BaseEditor{static get EDITOR_TYPE(){return a}init(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,n.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,n.hasClass)(this.select,i)&&(0,n.removeClass)(this.select,i),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,i,l){super.prepare(e,t,o,s,i,l);const a=this.cellProperties.selectOptions;let h;h="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),(0,n.empty)(this.select),(0,r.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,n.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:r}=this.getEditedCellRect(),l=this.select.style;l.height=`${r}px`,l.width=`${o}px`,l.top=`${e}px`,l[this.hot.isRtl()?"right":"left"]=`${t}px`,l.margin="0px",(0,n.addClass)(this.select,i)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};!1!==this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=h},67547:(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),n=t.value.split("\n");let r=o,i=0;for(let t=0;t<n.length;t++){const s=n[t];0!==t&&(i+=n[t-1].length+1);const l=i+s.length;if("home"===e?r=i:"end"===e&&(r=l),o<=l)break}(0,s.setCaretPosition)(t,r)};var s=o(83302)},5071:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48917);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},48917:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(48253),r=s(o(75244)),i=o(37595),l=o(83302),a=o(68145),h=o(80151),d=o(95881),c=o(93315),u=o(6116),g=o(97296),f=o(67547);const p="ht_editor_hidden",m="textEditor",C="text";t.EDITOR_TYPE=C;class w extends n.BaseEditor{static get EDITOR_TYPE(){return C}constructor(e){super(e),this.eventManager=new r.default(this),this.autoResize=(0,d.autoResize)(),this.TEXTAREA=void 0,this.textareaStyle=void 0,this.TEXTAREA_PARENT=void 0,this.textareaParentStyle=void 0,this.layerClass=void 0,this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement();this.hot.getShortcutManager().setActiveContextName("editor"),this.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.registerShortcuts()}close(){this.autoResize.unObserve(),this.hot.rootDocument.activeElement===this.TEXTAREA&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,o,s,r,l){const a=this.state;if(super.prepare(e,t,o,s,r,l),!l.readOnly){this.refreshDimensions(!0);const{allowInvalid:e,fragmentSelection:t}=l;e&&(this.TEXTAREA.value=""),a!==n.EDITOR_STATE.FINISHED&&this.hideEditableElement();!t&&!(0,i.isMobileBrowser)()&&this.focus()}}beginEditing(e,t){this.state===n.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.tabIndex=-1,(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,p),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,i.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,p)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,a.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,l.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,p)&&(0,l.removeClass)(this.TEXTAREA_PARENT,p),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==n.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:r,height:i,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const h=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=h.fontSize,this.TEXTAREA.style.fontFamily=h.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const d=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(d.paddingLeft,10)+parseInt(d.paddingRight,10),u=parseInt(d.paddingTop,10)+parseInt(d.paddingBottom,10),g=s-c,f=i-u,p=r-c,m=a-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){this.eventManager.addEventListener(this.TEXTAREA,"cut",(e=>e.stopPropagation())),this.eventManager.addEventListener(this.TEXTAREA,"paste",(e=>e.stopPropagation())),(0,i.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:m},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Tab"]],callback:e=>{const t=this.hot.getSettings(),o="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(o.row,o.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t=this.hot.getSettings(),o="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(-o.row,-o.col)}},{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey,relativeToGroup:u.SHORTCUTS_GROUP_EDITOR,position:"before"},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple(),relativeToGroup:u.SHORTCUTS_GROUP_EDITOR,position:"before"},{keys:[["Alt","Enter"]],callback:()=>(o(),!1),relativeToGroup:u.SHORTCUTS_GROUP_EDITOR,position:"before"},{keys:[["PageUp"]],callback:()=>{this.hot.selection.transformStart(-this.hot.countVisibleRows(),0)}},{keys:[["PageDown"]],callback:()=>{this.hot.selection.transformStart(this.hot.countVisibleRows(),0)}},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["Control/Meta","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}},{keys:[["Control/Meta","Shift","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}}],t)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(u.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(m),e.removeShortcutsByGroup(g.SHORTCUTS_GROUP_EDITOR)}onAfterDocumentKeyDown(e){-1===[h.KEY_CODES.ARROW_UP,h.KEY_CODES.ARROW_RIGHT,h.KEY_CODES.ARROW_DOWN,h.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}t.TextEditor=w},65930:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45952);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},45952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n="time";t.EDITOR_TYPE=n;class r extends s.TextEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r),this.TEXTAREA.dir="ltr"}}t.TimeEditor=r},75244:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListenersCounter=function(){return n},o(95988);var s=o(24449);let n=0;var r=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,s.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:i,options:r,eventManager:this}),e.addEventListener(t,i,r),n+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,s=this.context.eventListeners[i],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(r&&s.eventManager!==this)continue;this.context.eventListeners.splice(i,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),n-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),n-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const n={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||o.body.parentNode)):r=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}};t.default=r},50095:(e,t,o)=>{"use strict";function s(e,t,o,s){let n=-1,r=e,i=o;Array.isArray(e)||(r=Array.from(e));const l=r.length;for(s&&l&&(n+=1,i=r[n]),n+=1;n<l;)i=t(i,r[n],n,r),n+=1;return i}function n(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length;for(;o<n&&!1!==t(s[o],o,s);)o+=1;return e}function r(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return r(e)/e.length},t.arrayEach=n,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,r=[];let i=-1;for(;o<n;){const e=s[o];t(e,o,s)&&(i+=1,r[i]=e),o+=1}return r},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,r=[];let i=-1;for(;o<n;){const e=s[o];i+=1,r[i]=t(e,o,s),o+=1}return r},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=r,t.arrayUnique=function(e){const t=[];return n(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let i=s;return n(r,(e=>{i=i.filter((t=>!e.includes(t)))})),i},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let i=s;return n(r,(e=>{i=i.filter((t=>e.includes(t)))})),i},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t],i=new Set(s);return n(r,(e=>{n(e,(e=>{i.has(e)||i.add(e)}))})),Array.from(i)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let n=0;n<o;n++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][n]=e[n][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(95988)},37595:(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return r.chrome.value},t.isChromeWebKit=function(){return r.chromeWebKit.value},t.isEdge=function(){return r.edge.value},t.isEdgeWebKit=function(){return r.edgeWebKit.value},t.isFirefox=function(){return r.firefox.value},t.isFirefoxWebKit=function(){return r.firefoxWebKit.value},t.isIOS=function(){return i.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&i.mac.value},t.isLinuxOS=function(){return i.linux.value},t.isMacOS=function(){return i.mac.value},t.isMobileBrowser=function(){return r.mobile.value},t.isSafari=function(){return r.safari.value},t.isWindowsOS=function(){return i.win.value},t.setBrowserMeta=l,t.setPlatformMeta=a;var s=o(22232);const n=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},r={chrome:n(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:n((e=>/CriOS/.test(e))),edge:n((e=>/Edge/.test(e))),edgeWebKit:n((e=>/EdgiOS/.test(e))),firefox:n((e=>/Firefox/.test(e))),firefoxWebKit:n((e=>/FxiOS/.test(e))),mobile:n((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:n(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},i={mac:n((e=>/^Mac/.test(e))),win:n((e=>/^Win/.test(e))),linux:n((e=>/^Linux/.test(e))),ios:n((e=>/iPhone|iPad|iPod/i.test(e)))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(r,(o=>{let{test:s}=o;s(e,t)}))}function a(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(i,(t=>{let{test:o}=t;o(e)}))}l(),a()},69173:(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(93315)},65320:(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let n=0;n<e;n++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e=[];for(n=0;n<t;n++)e.push(i(n)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e={};for(n=0;n<t;n++)e[`prop${n}`]=i(n)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,n)=>{s.push([o+t,n,e])})):Object.keys(e).forEach((n=>{s.push([o+t,n,e[n]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=r**s*(n.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=i,o(95988);var s=o(22232);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=n.length;function i(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%r,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/r,10);return s}},48150:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},83302:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.add(...t)},t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=r,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=r(n,t,o),n&&(!o||o.contains(n)));)s.push(n),n=n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.host:n.parentNode;const i=s.length;return i?s[i-1]:null},t.empty=l,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:h(e,t)},t.fastInnerText=h,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=u,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=n,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,n=e;for(;null!==n;){if(o===t){s=n;break}n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n=n.host:(o+=1,n=n.parentNode)}return s},t.getParentWindow=function(e){return n(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return c(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return d(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let n=e.parentNode;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:r}=n.style;if([e,t,r].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(r))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(r)||s.includes(e)))return n;if(n.clientWidth<=n.scrollWidth+1&&(s.includes(t)||s.includes(e)))return n;n=n.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===g&&(g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let n=t.offsetWidth;s===n&&(n=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-n}(e));return g},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const n=u(e,o);if(""!==n[t]&&void 0!==n[t])return n[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=u(s,o),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(r)||t.includes(i))return s;s=s.parentNode}return o},t.getWindowScrollLeft=c,t.getWindowScrollTop=d,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=f,t.isOutsideInput=p,t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if(s.style&&"none"===s.style.display)return!1;s=s.parentNode}return!0},t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let n,r,i,l=e;n=l.offsetLeft,r=l.offsetTop,i=l;for(;(l=l.offsetParent)&&l!==t.body;)n+=l.offsetLeft,r+=l.offsetTop,i=l;i&&"fixed"===i.style.position&&(n+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:n,top:r}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.remove(...t)},t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.selectElementIfAllowed=function(e){p(e.ownerDocument.activeElement)||e.select()},t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const n=e.parentNode,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(95988),o(60740);var s=o(18609);function n(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:n}=Node;let r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:i}=r;r=i&&e===n?i:r.parentNode}return null}function i(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const a=/(<(.*)>|&(.*);)/;function h(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(l(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function d(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let g;function f(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function p(e){return f(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=a},24449:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},7374:(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},85015:(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const l=s.concat(r);let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const l=s.concat(r.reverse());let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,r)}),o),t}},t.fastCall=function(e,t,o,s,r,i,l,a){if((0,n.isDefined)(a))return e.call(t,o,s,r,i,l,a);if((0,n.isDefined)(l))return e.call(t,o,s,r,i,l);if((0,n.isDefined)(i))return e.call(t,o,s,r,i);if((0,n.isDefined)(r))return e.call(t,o,s,r);if((0,n.isDefined)(s))return e.call(t,o,s);if((0,n.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[n,...r]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(r,((e,t)=>t(e)),n.apply(this,t))}},t.throttle=r,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=r(e,t);let n=o;function i(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return n?(n-=1,e.apply(this,o)):s.apply(this,o)}return i.clearHits=function(){n=o},i};var s=o(50095),n=o(93315);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let n=null;return function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];const a=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=a,h=!0);const d=t-(a-o);return h?(s.lastCallThrottled=!1,e.apply(this,i)):(n&&clearTimeout(n),n=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,i),o=0,n=void 0}),d)),s}}},93315:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="13.1.0-next-ea584ca-20230830";let i,y="invalid",v="invalid";const E=function(e){let t=[][a],o=t;if(e[a]!==u("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=u(s.shift());n;n=u(s.shift()||"A"))--n<""[a]?o|=(d(`${d(h(t)+(h(c(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||E)if(E){const t=(0,n.default)("31/08/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);i=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(y="expired",v="expired"):(y="valid",v="valid")}else s?(y="non_commercial",v="valid"):(y="invalid",v="invalid");else y="missing",v="missing";p()&&(y="valid",v="valid");if(!m&&"valid"!==y){C[y]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===y?"info":"warn"](C[y]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==v&&t.parentNode){if(w[v]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[v]({keyValidityDate:i,hotVersion:r}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=i,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var n=s(o(33034)),r=o(28236);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),c=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(c(g(e),h("12"),u("F")))/(h(c(g(e),u("B"),~~![][a]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const C={invalid:()=>r.toSingleLine`
33
33
  The license key for Handsontable is invalid.\x20
34
34
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:o}=e;return r.toSingleLine`
35
35
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -68,7 +68,7 @@
68
68
  \`disjunction\` and \`conjunction\`.`);const f=this.getConditions(e);0===f.length?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:u,args:l,func:(0,a.getCondition)(u,l)}]},s):f.push({name:u,args:l,func:(0,a.getCondition)(u,l)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,o;return null!==(t=null===(o=this.filteringStates.getValueAtIndex(e))||void 0===o?void 0:o.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return(0,n.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[o,{operation:s,conditions:r}]=t;return e.push({column:o,operation:s,conditions:(0,n.arrayMap)(r,(e=>{let{name:t,args:o}=e;return{name:t,args:o}}))}),e}),[])}importAllConditions(e){this.clean(),(0,n.arrayEach)(e,(e=>{(0,n.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const o=this.getConditions(e);return t?o.some((e=>e.name===t)):o.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(g),this.filteringStates=null,this.clearLocalHooks()}}(0,r.mixin)(f,l.default);var p=f;t.default=p},53407:(e,t,o)=>{"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:o,descriptor:n}=s[e];let r=t;n.inputValuesDecorator&&(r=n.inputValuesDecorator(r));return function(e){return o.apply(e.meta.instance,[].concat([e],[r]))}},t.getConditionDescriptor=function(e){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);return s[e].descriptor},t.registerCondition=function(e,t,o){o.key=e,s[e]={condition:t,descriptor:o}},o(60740);const s={};t.conditions=s},86949:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(50095),r=o(22232),i=o(85015),l=s(o(65718)),a=s(o(20833)),h=s(o(24009)),d=o(94427);class c{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.conditionCollection.addLocalHook("beforeRemove",(e=>this._onConditionBeforeModify(e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>this._onConditionBeforeClean())),this.conditionCollection.addLocalHook("afterClean",(()=>this._onConditionAfterClean()))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,n.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}_onConditionBeforeModify(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}updateStatesAtColumn(e,t){var o=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const s=this.conditionCollection.exportAllConditions();let r=this.conditionCollection.getColumnStackPosition(e);-1===r&&(r=this.latestEditedColumnPosition);const l=s.slice(0,r),c=s.slice(r);c.length&&c[0].column===e&&c.shift();const u=(0,i.curry)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=new a.default(o.hot,!1),i=[].concat(e,s);r.importAllConditions(i);const l=o.columnDataFactory(t);let c;c=r.isEmpty()?l:new h.default(r,(e=>o.columnDataFactory(e))).filter(),c=(0,n.arrayMap)(c,(e=>e.meta.visualRow));const u=(0,d.createArrayAssertion)(c);return r.destroy(),(0,n.arrayFilter)(l,(e=>u(e.meta.visualRow)))}))(l),g=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:g},dependentConditionStacks:c,filteredRowsFactory:u,conditionArgsChange:t})}_onConditionBeforeClean(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}_onConditionAfterClean(){(0,n.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}destroy(){this.clearLocalHooks(),(0,r.objectEach)(this,((e,t)=>{this[t]=null}))}}(0,r.mixin)(c,l.default);var u=c;t.default=u},97160:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];let o=e;L[o]||(o=D);return(0,n.arrayEach)(L[o],(e=>{let o;o=e===r.SEPARATOR?{name:r.SEPARATOR}:(0,s.clone)((0,i.getConditionDescriptor)(e)),t.push(o)})),t},o(95988);var s=o(22232),n=o(50095),r=o(11428),i=o(53407),l=o(14757);t.CONDITION_NONE=l.CONDITION_NAME;var a=o(668);t.CONDITION_EMPTY=a.CONDITION_NAME;var h=o(33337);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var d=o(43741);t.CONDITION_EQUAL=d.CONDITION_NAME;var c=o(67229);t.CONDITION_NOT_EQUAL=c.CONDITION_NAME;var u=o(87941);t.CONDITION_GREATER_THAN=u.CONDITION_NAME;var g=o(45980);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var f=o(9561);t.CONDITION_LESS_THAN=f.CONDITION_NAME;var p=o(8201);t.CONDITION_LESS_THAN_OR_EQUAL=p.CONDITION_NAME;var m=o(31644);t.CONDITION_BETWEEN=m.CONDITION_NAME;var C=o(16e3);t.CONDITION_NOT_BETWEEN=C.CONDITION_NAME;var w=o(81773);t.CONDITION_BEGINS_WITH=w.CONDITION_NAME;var y=o(49030);t.CONDITION_ENDS_WITH=y.CONDITION_NAME;var v=o(88199);t.CONDITION_CONTAINS=v.CONDITION_NAME;var E=o(10884);t.CONDITION_NOT_CONTAINS=E.CONDITION_NAME;var S=o(26189);t.CONDITION_DATE_BEFORE=S.CONDITION_NAME;var R=o(67444);t.CONDITION_DATE_AFTER=R.CONDITION_NAME;var b=o(98756);t.CONDITION_TOMORROW=b.CONDITION_NAME;var T=o(960);t.CONDITION_TODAY=T.CONDITION_NAME;var _=o(74467);t.CONDITION_YESTERDAY=_.CONDITION_NAME;var O=o(7765);t.CONDITION_BY_VALUE=O.CONDITION_NAME;var M=o(49807);t.CONDITION_TRUE=M.CONDITION_NAME;var I=o(47003);t.CONDITION_FALSE=I.CONDITION_NAME;var N=o(97413);t.OPERATION_AND=N.OPERATION_ID;var A=o(60171);t.OPERATION_OR=A.OPERATION_ID;var P=o(63462);t.OPERATION_OR_THEN_VARIABLE=P.OPERATION_ID;const x="numeric";t.TYPE_NUMERIC=x;const D="text";t.TYPE_TEXT=D;const H="date";t.TYPE_DATE=H;const L={[x]:[l.CONDITION_NAME,r.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,d.CONDITION_NAME,c.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,g.CONDITION_NAME,f.CONDITION_NAME,p.CONDITION_NAME,m.CONDITION_NAME,C.CONDITION_NAME],[D]:[l.CONDITION_NAME,r.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,d.CONDITION_NAME,c.CONDITION_NAME,r.SEPARATOR,w.CONDITION_NAME,y.CONDITION_NAME,r.SEPARATOR,v.CONDITION_NAME,E.CONDITION_NAME],[H]:[l.CONDITION_NAME,r.SEPARATOR,a.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,d.CONDITION_NAME,c.CONDITION_NAME,r.SEPARATOR,S.CONDITION_NAME,R.CONDITION_NAME,m.CONDITION_NAME,r.SEPARATOR,b.CONDITION_NAME,T.CONDITION_NAME,_.CONDITION_NAME]};t.TYPES=L},24009:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=o(50095);var n=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,s.arrayEach)(this.conditionCollection.getFilteredColumns(),((t,o)=>{let s=this.columnDataFactory(t);o&&(s=this._getIntersectData(s,e)),e=this.filterByColumn(t,s)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];return(0,s.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&o.push(t)})),o}_getIntersectData(e,t){const o=[];return(0,s.arrayEach)(t,(t=>{const s=t.meta.visualRow;void 0!==e[s]&&(o[s]=e[s])})),o}};t.default=n},59427:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=o(50095),i=o(28236),l=o(69173),a=o(68145),h=s(o(75244)),d=o(83302),c=o(11428),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=R(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(77516)),g=s(o(17209)),f=s(o(3246)),p=s(o(6379)),m=s(o(78873)),C=s(o(20833)),w=s(o(24009)),y=s(o(86949)),v=o(94427),E=o(97160),S=o(33165);function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(R=function(e){return e?o:t})(e)}o(30352);const b="filters";t.PLUGIN_KEY=b;t.PLUGIN_PRIORITY=250;class T extends n.BasePlugin{static get PLUGIN_KEY(){return b}static get PLUGIN_PRIORITY(){return 250}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){super(e),this.eventManager=new h.default(this),this.dropdownMenuPlugin=null,this.conditionCollection=null,this.conditionUpdateObserver=null,this.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),this.filtersRowsMap=null,this.hot.addHook("afterGetColHeader",((e,t)=>this.onAfterGetColHeader(e,t)))}isEnabled(){return!!this.hot.getSettings()[b]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new S.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,o=e=>(e.addLocalHook("accept",(()=>this.onActionBarSubmit("accept"))),e.addLocalHook("cancel",(()=>this.onActionBarSubmit("cancel"))),e.addLocalHook("change",(t=>this.onComponentChange(e,t))),e),s=()=>`${this.hot.getTranslatedPhrase(u.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,n=()=>`${this.hot.getTranslatedPhrase(u.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new g.default(this.hot,{id:"filter_by_condition",name:s,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",(()=>this.onSelectUIClosed())),this.components.set("filter_by_condition",o(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new f.default(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new g.default(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",(()=>this.onSelectUIClosed())),this.components.set("filter_by_condition2",o(e))}this.components.get("filter_by_value")||this.components.set("filter_by_value",o(new p.default(this.hot,{id:"filter_by_value",name:n}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new m.default(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new C.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new y.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>this.updateComponents(e)))),this.components.forEach((e=>e.show())),this.addHook("beforeDropdownMenuSetItems",(e=>this.onBeforeDropdownMenuSetItems(e))),this.addHook("afterDropdownMenuDefaultOptions",(e=>this.onAfterDropdownMenuDefaultOptions(e))),this.addHook("afterDropdownMenuShow",(()=>this.onAfterDropdownMenuShow())),this.addHook("afterDropdownMenuHide",(()=>this.onAfterDropdownMenuHide())),this.addHook("afterChange",(e=>this.onAfterChange(e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));super.disablePlugin()}addCondition(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:E.OPERATION_AND;const n=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(n,{command:{key:t},args:o},s)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const e=this._createDataFilter(),t=!this.conditionCollection.isEmpty();let o=[];const s=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",s))if(t){const t=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),o=(0,r.arrayMap)(e.filter(),(e=>e.meta.visualRow));const s=(0,v.createArrayAssertion)(o);(0,a.rangeEach)(this.hot.countSourceRows()-1,(e=>{s(e)||t.push(e)})),(0,r.arrayEach)(t,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),o.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",s),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.clearColumnSelection()}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}clearColumnSelection(){const e=this.getSelectedColumn();null!==e&&this.hot.selectCell(0,e.visualIndex)}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),o=[];return(0,r.arrayEach)(this.hot.getSourceDataAtCol(t),((e,s)=>{var n;const{row:r,col:i,visualCol:l,visualRow:a,type:h,instance:d,dateFormat:c,locale:u}=this.hot.getCellMeta(s,t),g=null!==(n=this.hot.getDataAtCell(this.hot.toVisualRow(s),t))&&void 0!==n?n:e;o.push({meta:{row:r,col:i,visualCol:l,visualRow:a,type:h,instance:d,dateFormat:c,locale:u},value:(0,v.toEmptyString)(g)})})),o}onAfterChange(e){e&&(0,r.arrayEach)(e,(e=>{const[,t]=e,o=this.hot.propToCol(t);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),o=(0,v.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,o)}restoreComponents(e){var t;const o=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(o)})),this.updateDependentComponentsVisibility()}onAfterDropdownMenuShow(){this.restoreComponents(Array.from(this.components.values()))}onAfterDropdownMenuHide(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}onBeforeDropdownMenuSetItems(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.menu.addLocalHook("afterOpen",(()=>{this.dropdownMenuPlugin.menu.hotMenu.updateSettings({hiddenRows:!0})}))}onAfterDropdownMenuDefaultOptions(e){e.items.push({name:c.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}getOperationBasedOnArguments(e,t,o,s){let n=e;return n===E.OPERATION_OR&&t.command.key!==E.CONDITION_NONE&&o.command.key!==E.CONDITION_NONE&&s.command.key!==E.CONDITION_NONE?n=E.OPERATION_OR_THEN_VARIABLE:s.command.key!==E.CONDITION_NONE&&(t.command.key!==E.CONDITION_NONE&&o.command.key!==E.CONDITION_NONE||(n=E.OPERATION_AND)),n}onActionBarSubmit(e){var t;if("accept"===e){const e=this.getSelectedColumn();var o;if(null===e)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:t}=e,s=this.components.get("filter_by_condition").getState(),n=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),i=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),s,n,r);this.conditionUpdateObserver.groupChanges();let l=this.conditionCollection.getColumnStackPosition(t);-1===l&&(l=void 0),this.conditionCollection.removeConditions(t),s.command.key!==E.CONDITION_NONE&&(this.conditionCollection.addCondition(t,s,i,l),n.command.key!==E.CONDITION_NONE&&this.conditionCollection.addCondition(t,n,i,l)),r.command.key!==E.CONDITION_NONE&&this.conditionCollection.addCondition(t,r,i,l),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}onComponentChange(e,t){this.updateDependentComponentsVisibility(),e.constructor!==g.default||t.inputsCount||this.setListeningDropdownMenu()}onSelectUIClosed(){this.setListeningDropdownMenu()}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}onAfterGetColHeader(e,t){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)?(0,d.addClass)(t,"htFiltersActive"):(0,d.removeClass)(t,"htFiltersActive")}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new w.default(e,(e=>this.getDataMapAtColumn(e)))}updateComponents(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:o,column:s}}=e,n=o.filter((e=>e.name===E.CONDITION_BY_VALUE)),r=o.filter((e=>e.name!==E.CONDITION_BY_VALUE));if(n.length>=2||r.length>=3)(0,l.warn)(i.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
69
69
  The overall amount of conditions exceed the capability of the dropdown menu.\x20
70
70
  For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(s);this.components.get("filter_by_condition").updateState(r[0],s),this.components.get("filter_by_condition2").updateState(r[1],s),this.components.get("filter_operators").updateState(t,s),this.components.get("filter_by_value").updateState(e)}}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var o=arguments.length,s=new Array(o),n=0;n<o;n++)s[n]=arguments[n];return(0,r.arrayEach)(s,(o=>{(0,r.arrayEach)(t.menuItems,((t,s)=>{t.key===o.getMenuItemDescriptor().key&&e.push(s)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,o=t.getPlugin("hiddenRows");for(var s=arguments.length,n=new Array(s>1?s-1:0),r=1;r<s;r++)n[r-1]=arguments[r];const i=this.getIndexesOfComponents(...n);e?o.showRows(i):o.hideRows(i),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}t.Filters=T},30905:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59427);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Filters=s.Filters},74607:(e,t,o)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!s[e])throw Error(`Operation with id "${e}" does not exist.`);const t=s[e].func;return function(e,o){return t(e,o)}},t.getOperationName=function(e){return s[e].name},t.registerOperation=function(e,t,o){s[e]={name:t,func:o}},o(60740);const s={};t.operations=s},97413:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516)),n=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const i="conjunction";t.OPERATION_ID=i;const l=s.FILTERS_LABELS_CONJUNCTION;function a(e,t){return e.every((e=>e.func(t)))}t.SHORT_NAME_FOR_COMPONENT=l,(0,n.registerOperation)(i,l,a)},60171:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516)),n=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const i="disjunction";t.OPERATION_ID=i;const l=s.FILTERS_LABELS_DISJUNCTION;function a(e,t){return e.some((e=>e.func(t)))}t.SHORT_NAME_FOR_COMPONENT=l,(0,n.registerOperation)(i,l,a)},63462:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=a,o(60740);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516)),n=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const i="disjunctionWithExtraCondition";t.OPERATION_ID=i;const l=s.FILTERS_LABELS_DISJUNCTION;function a(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}t.SHORT_NAME_FOR_COMPONENT=l,(0,n.registerOperation)(i,l,a)},96633:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=s(o(65718)),i=s(o(75244)),l=o(83302),a=o(50095),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(77516));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}const c="built",u="building",g=["click","input","keydown","keypress","keyup","focus","blur","change"];class f{static get DEFAULTS(){return(0,n.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){this.hot=e,this.eventManager=new i.default(this),this.options=(0,n.extend)(f.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=null}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===u?this._element:this.buildState===c?(this.update(),this._element):(this.buildState=u,this.build(),this.buildState=c,this._element)}isBuilt(){return this.buildState===c}translateIfPossible(e){return"string"==typeof e&&e.startsWith(h.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=u),this.options.className&&(0,l.addClass)(this._element,this.options.className),this.options.children.length)(0,a.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);(0,n.objectEach)(this.options,((e,o)=>{void 0!==t[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(t[o]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,a.arrayEach)(g,(o=>e(t,o)))}else(0,a.arrayEach)(g,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}(0,n.mixin)(f,r.default);var p=f;t.default=p},79857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=o(22232),i=s(o(96633));const l=new WeakMap;class a extends i.default{static get DEFAULTS(){return(0,r.clone)({placeholder:"",type:"text",tagName:"input"})}constructor(e,t){super(e,(0,r.extend)(a.DEFAULTS,t)),l.set(this,{}),this.registerHooks()}registerHooks(){this.addLocalHook("click",(()=>this.onClick())),this.addLocalHook("keyup",(e=>this.onKeyup(e)))}build(){super.build();const e=l.get(this),t=this.hot.rootDocument.createElement("div");e.input=this._element.firstChild,(0,n.addClass)(this._element,"htUIInput"),(0,n.addClass)(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}update(){if(!this.isBuilt())return;const e=l.get(this).input;e.type=this.options.type,e.placeholder=this.translateIfPossible(this.options.placeholder),e.value=this.translateIfPossible(this.options.value)}focus(){this.isBuilt()&&l.get(this).input.focus()}onClick(){}onKeyup(e){this.options.value=e.target.value}}var h=a;t.default=h},40980:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=s(o(96633));const i=new WeakMap;class l extends r.default{static get DEFAULTS(){return(0,n.clone)({href:"#",tagName:"a"})}constructor(e,t){super(e,(0,n.extend)(l.DEFAULTS,t)),i.set(this,{})}build(){super.build();i.get(this).link=this._element.firstChild}update(){this.isBuilt()&&(i.get(this).link.textContent=this.translateIfPossible(this.options.textContent))}}var a=l;t.default=a},89409:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(83302),r=o(22232),i=o(50095),l=o(80151),a=o(85015),h=o(65320),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(77516)),c=o(24449),u=s(o(96633)),g=s(o(79857)),f=s(o(40980)),p=o(94427);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}const C=new WeakMap;class w extends u.default{static get DEFAULTS(){return(0,r.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,(0,r.extend)(w.DEFAULTS,t)),C.set(this,{}),this.searchInput=new g.default(this.hot,{placeholder:d.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"}),this.selectAllUI=new f.default(this.hot,{textContent:d.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"}),this.clearAllUI=new f.default(this.hot,{textContent:d.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"}),this.items=[],this.itemsBox=null,this.registerHooks()}registerHooks(){this.searchInput.addLocalHook("keydown",(e=>this.onInputKeyDown(e))),this.searchInput.addLocalHook("input",(e=>this.onInput(e))),this.selectAllUI.addLocalHook("click",(e=>this.onSelectAllClick(e))),this.clearAllUI.addLocalHook("click",(e=>this.onClearAllClick(e)))}setItems(e){this.items=e,this.itemsBox&&this.itemsBox.loadData(this.items)}setLocale(e){this.locale=e}getLocale(){return this.locale}getItems(){return[...this.items]}getValue(){return function(e){const t=[];return(0,i.arrayEach)(e,(e=>{e.checked&&t.push(e.value)})),t}(this.items)}isSelectedAllValues(){return this.items.length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),o=new u.default(this.hot,{className:"htUISelectionControls",children:[this.selectAllUI,this.clearAllUI]});this._element.appendChild(this.searchInput.element),this._element.appendChild(o.element),this._element.appendChild(t);const s=t=>{if(!this._element)return;this.itemsBox&&this.itemsBox.destroy(),(0,n.addClass)(t,"htUIMultipleSelectHot"),this.itemsBox=new this.hot.constructor(t,{data:this.items,columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,o,s,n,r)=>{e.title=r.instance.getDataAtRowProp(t,r.label.property)},maxCols:1,autoWrapCol:!0,height:110,colWidths:()=>this.itemsBox.container.scrollWidth-(0,n.getScrollbarWidth)(e),copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"}),this.itemsBox.init();this.itemsBox.getShortcutManager().getContext("grid").addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:"multipleSelect.itemBox"})};s(t),setTimeout((()=>s(t)),100)}reset(){this.searchInput.reset(),this.selectAllUI.reset(),this.clearAllUI.reset()}update(){this.isBuilt()&&(this.itemsBox.loadData(function(e,t){const o=(0,p.createArrayAssertion)(t);return(0,i.arrayMap)(e,(e=>(e.checked=o(e.value),e)))}(this.items,this.options.value)),super.update())}destroy(){this.itemsBox&&this.itemsBox.destroy(),this.searchInput.destroy(),this.clearAllUI.destroy(),this.selectAllUI.destroy(),this.searchInput=null,this.clearAllUI=null,this.selectAllUI=null,this.itemsBox=null,this.items=null,super.destroy()}onInput(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let o;o=""===t?[...this.items]:(0,i.arrayFilter)(this.items,(e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),this.itemsBox.loadData(o)}onInputKeyDown(e){this.runLocalHooks("keydown",e,this);(0,a.partial)(l.isKey,e.keyCode)("ARROW_DOWN|TAB")&&!this.itemsBox.isListening()&&((0,c.stopImmediatePropagation)(e),this.itemsBox.listen(),this.itemsBox.selectCell(0,0))}onSelectAllClick(e){const t=[];e.preventDefault(),(0,i.arrayEach)(this.itemsBox.getSourceData(),((e,o)=>{e.checked=!0,t.push((0,h.dataRowToChangesArray)(e,o)[0])})),this.itemsBox.setSourceDataAtCell(t)}onClearAllClick(e){const t=[];e.preventDefault(),(0,i.arrayEach)(this.itemsBox.getSourceData(),((e,o)=>{e.checked=!1,t.push((0,h.dataRowToChangesArray)(e,o)[0])})),this.itemsBox.setSourceDataAtCell(t)}}var y=w;t.default=y},87255:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=s(o(96633));const i=new WeakMap;class l extends r.default{static get DEFAULTS(){return(0,n.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,n.extend)(l.DEFAULTS,t)),i.set(this,{})}build(){super.build();const e=i.get(this);e.input=this._element.firstChild;const t=this.hot.rootDocument.createElement("label");t.textContent=this.translateIfPossible(this.options.label.textContent),t.htmlFor=this.translateIfPossible(this.options.label.htmlFor),e.label=t,this._element.appendChild(t),this.update()}update(){if(!this.isBuilt())return;const e=i.get(this);e.input.checked=this.options.checked,e.label.textContent=this.translateIfPossible(this.options.label.textContent)}isChecked(){return this.options.checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.checked=e,this.update()}focus(){this.isBuilt()&&i.get(this).input.focus()}}var a=l;t.default=a},44854:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(30343)),r=o(22232),i=o(50095),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(77516)),a=o(11428),h=s(o(96633));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}const c=new WeakMap;class u extends h.default{static get DEFAULTS(){return(0,r.clone)({className:"htUISelect",wrapIt:!1})}constructor(e,t){super(e,(0,r.extend)(u.DEFAULTS,t)),c.set(this,{}),this.menu=null,this.items=[],this.registerHooks()}registerHooks(){this.addLocalHook("click",(()=>this.onClick()))}setItems(e){this.items=this.translateNames(e),this.menu&&this.menu.setMenuItems(this.items)}translateNames(e){return(0,i.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),this.menu=new n.default(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer}),this.menu.setMenuItems(this.items);const e=new h.default(this.hot,{className:"htUISelectCaption"}),t=new h.default(this.hot,{className:"htUISelectDropdown"}),o=c.get(this);o.caption=e,o.captionElement=e.element,o.dropdown=t,(0,i.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),this.menu.addLocalHook("select",(e=>this.onMenuSelect(e))),this.menu.addLocalHook("afterClose",(()=>this.onMenuClosed())),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:this.menu.hot.getTranslatedPhrase(l.FILTERS_CONDITIONS_NONE),c.get(this).captionElement.textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();this.menu&&(this.menu.open(),this.menu.setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}))}closeOptions(){this.menu&&this.menu.close()}onMenuSelect(e){e.name!==a.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}onMenuClosed(){this.runLocalHooks("afterClose")}onClick(){this.openOptions()}destroy(){this.menu&&(this.menu.destroy(),this.menu=null);const{caption:e,dropdown:t}=c.get(this);e&&e.destroy(),t&&t.destroy(),super.destroy()}}var g=u;t.default=g},94427:(e,t,o)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=h,t.intersectValues=function(e,t,o,s){const r=[],l=e===t;let a;l||(a=h(t));return(0,n.arrayEach)(e,(e=>{let t=!1;(l||a(e))&&(t=!0);const n={checked:t,value:e,visualValue:i(e,o)};s&&s(n),r.push(n)})),r},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return r(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=i,t.unifyColumnValues=function(e){let t=e;t=a?Array.from(new Set(t)):(0,n.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},o(95988);var s=o(7374),n=o(50095);const r=(0,s.getComparisonFunction)();function i(e,t){let o=e;return""===o&&(o=`(${t})`),o}const l=new Set([1]).has(1),a=l&&"function"==typeof Array.from;function h(e){let t=e;return l&&(t=new Set(t)),function(e){let o;return o=l?t.has(e):!!~t.indexOf(e),o}}},33423:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const o=c(),s=0===o.size?[]:Array.from(null!==(t=o.get(e))&&void 0!==t?t:[]);return new Map(s.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=f,t.registerEngine=g,t.registerLanguage=p,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),o=t[h.PLUGIN_KEY],s=null==o?void 0:o.engine;if(!0===o)return null;if((0,r.isUndefined)(s))return null;var n;if("function"==typeof s.hyperformula||"function"==typeof s)return g(null!==(n=s.hyperformula)&&void 0!==n?n:s,t,e);if("object"==typeof s&&(0,r.isUndefined)(s.hyperformula)){const t=c(),o=u().get(s);return t.has(s)||t.set(s,[]),t.get(s).push(e),o&&o.push(e.guid),s.getConfig().licenseKey||s.updateConfig({licenseKey:d.DEFAULT_LICENSE_KEY}),s.getConfig().leapYear1900===d.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,a.isObjectEqual)(s.getConfig().nullDate,d.DEFAULT_SETTINGS.nullDate)||(0,l.warn)(i.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
71
- settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,r.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=c(),s=o.get(e),n=u(),r=n.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(n.delete(e),e.destroy()))}},o(95988);var n=s(o(63800)),r=o(93315),i=o(28236),l=o(69173),a=o(22232),h=o(11870),d=o(61205);function c(){const e="engine_relationship",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function u(){const e="shared_engine_usage",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function g(e,t,o){const s=t[h.PLUGIN_KEY],n=(0,d.getEngineSettingsWithDefaultsAndOverrides)(t),r=c(),i=u();f(e,s.functions),p(e,s.language);const l=e.buildEmpty(n);return r.set(l,[o]),i.set(l,[o.guid]),m(l,s.namedExpressions),l.on("sheetAdded",(()=>{l.rebuildAndRecalculate()})),l.on("sheetRemoved",(()=>{l.rebuildAndRecalculate()})),l}function f(e,t){t&&t.forEach((t=>{const{name:o,plugin:s,translations:n}=t;try{e.registerFunction(o,s,n)}catch(e){(0,l.warn)(e.message)}}))}function p(e,t){if(t){const{langCode:o}=t;try{e.registerLanguage(o,t)}catch(e){(0,l.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:o,expression:s,scope:n,options:r}=t;try{e.addNamedExpression(o,s,n,r)}catch(e){(0,l.warn)(e.message)}})),e.resumeEvaluation())}},61205:(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=i,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),a=i(e);return{...r,...n,...a}},t.getEngineSettingsWithOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),r=i(e);return{...n,...r}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(11870);const n="internal-use-in-handsontable";t.DEFAULT_LICENSE_KEY=n;const r={licenseKey:n,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function i(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[s.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function l(e){return Object.keys(e).reduce(((t,o)=>("hyperformula"!==o&&(t[o]=e[o]),t)),{})}t.DEFAULT_SETTINGS=r},11870:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95735),o(95988);var n=s(o(93231)),r=s(o(48427)),i=s(o(42538)),l=o(36026),a=s(o(63800)),h=o(69173),d=o(68145),c=o(93315),u=o(33423),g=o(54484),f=o(61205),p=o(65320),m=o(18609),C=s(o(56307)),w=s(o(9424));function y(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const v="formulas";t.PLUGIN_KEY=v;const E=["maxRows","maxColumns","language"];t.SETTING_KEYS=E;t.PLUGIN_PRIORITY=260,C.default.getSingleton().register("afterNamedExpressionAdded"),C.default.getSingleton().register("afterNamedExpressionRemoved"),C.default.getSingleton().register("afterSheetAdded"),C.default.getSingleton().register("afterSheetRemoved"),C.default.getSingleton().register("afterSheetRenamed"),C.default.getSingleton().register("afterFormulasValuesUpdate");const S=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var R=new WeakMap,b=new WeakMap,T=new WeakMap;class _ extends l.BasePlugin{constructor(){var e;super(...arguments),e=this,y(this,R,{writable:!0,value:!1}),y(this,b,{writable:!0,value:!1}),y(this,T,{writable:!0,value:[["valuesUpdated",function(){return e.onEngineValuesUpdated(...arguments)}],["namedExpressionAdded",function(){return e.onEngineNamedExpressionsAdded(...arguments)}],["namedExpressionRemoved",function(){return e.onEngineNamedExpressionsRemoved(...arguments)}],["sheetAdded",function(){return e.onEngineSheetAdded(...arguments)}],["sheetRenamed",function(){return e.onEngineSheetRenamed(...arguments)}],["sheetRemoved",function(){return e.onEngineSheetRemoved(...arguments)}]]}),(0,n.default)(this,"staticRegister",(0,a.default)("formulas")),(0,n.default)(this,"engine",null),(0,n.default)(this,"sheetName",null),(0,n.default)(this,"indexSyncer",null),(0,n.default)(this,"rowAxisSyncer",null),(0,n.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[v,...E]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,u.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){return t.onBeforeLoadData(...arguments)})),this.addHook("afterLoadData",(function(){return t.onAfterLoadData(...arguments)})),this.addHook("beforeUpdateData",(function(){return t.onBeforeLoadData(...arguments)})),this.addHook("afterUpdateData",(function(){return t.onAfterLoadData(...arguments)})),this.addHook("modifyData",(function(){return t.onModifyData(...arguments)})),this.addHook("modifySourceData",(function(){return t.onModifySourceData(...arguments)})),this.addHook("beforeValidate",(function(){return t.onBeforeValidate(...arguments)})),this.addHook("afterSetSourceDataAtCell",(function(){return t.onAfterSetSourceDataAtCell(...arguments)})),this.addHook("afterSetDataAtCell",(function(){return t.onAfterSetDataAtCell(...arguments)})),this.addHook("afterSetDataAtRowProp",(function(){return t.onAfterSetDataAtCell(...arguments)})),this.addHook("beforeCreateRow",(function(){return t.onBeforeCreateRow(...arguments)})),this.addHook("beforeCreateCol",(function(){return t.onBeforeCreateCol(...arguments)})),this.addHook("afterCreateRow",(function(){return t.onAfterCreateRow(...arguments)})),this.addHook("afterCreateCol",(function(){return t.onAfterCreateCol(...arguments)})),this.addHook("beforeRemoveRow",(function(){return t.onBeforeRemoveRow(...arguments)})),this.addHook("beforeRemoveCol",(function(){return t.onBeforeRemoveCol(...arguments)})),this.addHook("afterRemoveRow",(function(){return t.onAfterRemoveRow(...arguments)})),this.addHook("afterRemoveCol",(function(){return t.onAfterRemoveCol(...arguments)})),this.indexSyncer=new w.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,o,s)=>{this.rowAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("beforeColumnMove",((e,t,o,s)=>{this.columnAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("afterRowMove",((e,t,o,s,n)=>{this.rowAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("afterColumnMove",((e,t,o,s,n)=>{this.columnAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){return t.onAfterCellMetaReset(...arguments)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){return t.onAfterDetachChild(...arguments)})),this.addHook("beforeAutofill",(function(){return t.onBeforeAutofill(...arguments)})),(0,i.default)(this,T).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,h.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){(0,i.default)(this,T).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,u.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,f.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,f.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[v];if((0,c.isDefined)(o)&&(0,c.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[v].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){(0,i.default)(this,T).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),(0,r.default)(this,T,null),(0,u.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,c.isDefined)(t)&&!(0,p.isArrayOfArrays)(t))return(0,h.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,h.warn)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(e){return(0,h.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,h.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,m.toUpperCaseFirst)(v)}.switchSheet`)}getCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const s=this.hot.toPhysicalRow(e),n=this.hot.toPhysicalColumn(t);return null!==s&&null!==n?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;e.forEach((e=>{var t;const s=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==s&&(o.has(s)||o.add(s))})),(0,u.getRegisteredHotInstances)(this.engine).forEach(((e,s)=>{var n;(t||s!==this.sheetId)&&o.has(s)&&(e.render(),null===(n=e.view)||void 0===n||n.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:o,col:s,sheet:n}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,c.isDefined)(n)?`${n}:${o}x${s}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var s,n;const{row:r,col:i}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,c.isDefined)(r)||!1===(0,c.isDefined)(i)||r>=this.hot.countRows()||i>=this.hot.countCols())return;const l=null==e||null===(n=e.address)||void 0===n?void 0:n.sheet,a=t(e);if(void 0!==l&&!o.has(a)){const e=(0,u.getRegisteredHotInstances)(this.engine).get(l);if(!e)return;e.validateCell(e.getDataAtCell(r,i),e.getCellMeta(r,i),(()=>{}))}}))}syncChangeWithEngine(e,t,o){const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(s))return void(0,h.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const n=this.hot.getCellMeta(e,t);return(0,g.isDate)(o,n.type)&&((0,g.isDateValid)(o,n.dateFormat)?o=(0,g.getDateInHfFormat)(o,n.dateFormat):!1===(0,g.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}onBeforeValidate(e,t,o){const s=this.hot.propToCol(o);if(this.isFormulaCellType(t,s)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},o=this.hot.getCellMeta(t,s);let n=this.engine.getCellValue(e);return"date"===o.type&&(0,d.isNumeric)(n)&&(n=(0,g.getDateFromExcelDate)(n,o.dateFormat)),"object"==typeof n&&null!==n?n.value:n}return e}onBeforeAutofill(e,t,o){const{row:s,col:n}=t.getTopStartCorner(),{row:r,col:i}=t.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:d}=o.getBottomEndCorner(),c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId}},u={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(l),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(d),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(u))return!1;const f=this.engine.getFillRangeData(c,u),{row:p,col:m}=c.start,{row:C,col:w}=c.end,y=C-p+1,v=w-m+1;for(let e=0;e<f.length;e+=1)for(let t=0;t<f[e].length;t+=1){const o=f[e][t],s=e%y,n=t%v,r=this.hot.getCellMeta(s,n);(0,g.isDate)(o,r.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,n,this.sheetId)&&(f[e][t]=(0,g.getDateInHotFormat)(o,r.dateFormat)))}return f}onBeforeLoadData(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(v))||(0,r.default)(this,b,(0,c.isUndefined)(this.hot.getSettings().data))}onAfterCellMetaReset(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,n)=>{const r=this.hot.getCellMeta(s,n),i=r.dateFormat;(0,g.isDate)(o,r.type)&&(t=!0,(0,g.isDateValid)(o,i)?e[s][n]=(0,g.getDateInHfFormat)(o,i):!1===this.isFormulaCellType(s,n)&&(e[s][n]=`'${o}`))}))})),!0===t&&((0,r.default)(this,R,!0),this.engine.setSheetContent(this.sheetId,e),(0,r.default)(this,R,!1))}onAfterLoadData(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(v)))if(this.sheetName=(0,u.setupSheet)(this.engine,this.hot.getSettings()[v].sheetName),(0,i.default)(this,b))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){(0,r.default)(this,R,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),(0,r.default)(this,R,!1)}}}onModifyData(e,t,o,s){if("get"!==s||(0,i.default)(this,R)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e);if(null===n||null===t)return;if(!this.isFormulaCellType(n,t)){if("ARRAY"!==this.getCellType(n,t))return void((0,g.isEscapedFormulaExpression)(o.value)&&(o.value=(0,g.unescapeFormulaExpression)(o.value)))}const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let l=this.engine.getCellValue(r);const a=this.hot.getCellMeta(n,t);"date"===a.type&&(0,d.isNumeric)(l)&&(l=(0,g.getDateFromExcelDate)(l,a.dateFormat));const h="object"==typeof l&&null!==l?l.value:l;o.value=h}onModifySourceData(e,t,o,s){if("get"!==s||(0,i.default)(this,R)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e),r=this.hot.propToCol(t);if(null===n||null===r)return;if(!this.isFormulaCellType(n,r)){if("ARRAY"!==this.getCellType(n,r))return}const l=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===l.width&&0===l.height)return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};o.value=this.engine.getCellSerialized(a)}onAfterSetDataAtCell(e,t){if(S(t))return;const o=[],s=[],n=this.engine.batch((()=>{e.forEach((e=>{let[t,n,,r]=e;const i=this.hot.propToCol(n),l=this.hot.toPhysicalRow(t),a=this.hot.toPhysicalColumn(i),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};null!==l&&null!==a?this.syncChangeWithEngine(t,i,r):o.push([t,i,r]),s.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{o.forEach((e=>{let[t,o,s]=e;this.syncChangeWithEngine(t,o,s)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(n),this.validateDependentCells(n,s)}onAfterSetSourceDataAtCell(e,t){if(S(t))return;const o=[],s=[];e.forEach((e=>{let[t,n,,r]=e;const i=this.hot.propToCol(n);if(!(0,d.isNumeric)(i))return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(l)?(s.push({address:l}),o.push(...this.engine.setCellContents(l,r))):(0,h.warn)(`Not possible to set source cell data at ${JSON.stringify(l)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}onBeforeCreateRow(e,t){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,t]))return!1}onBeforeCreateCol(e,t){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,t]))return!1}onBeforeRemoveRow(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}onBeforeRemoveCol(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}onAfterCreateRow(e,t,o){if(S(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}onAfterCreateCol(e,t,o){if(S(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}onAfterRemoveRow(e,t,o,s){if(S(s))return;const n=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}onAfterRemoveCol(e,t,o,s){if(S(s))return;const n=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}onAfterDetachChild(e,t,o){var s;(0,r.default)(this,R,!0);const n=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());(0,r.default)(this,R,!1),n.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}onEngineValuesUpdated(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}onEngineNamedExpressionsAdded(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}onEngineNamedExpressionsRemoved(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}onEngineSheetAdded(e){this.hot.runHooks("afterSheetAdded",e)}onEngineSheetRenamed(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}onEngineSheetRemoved(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}}t.Formulas=_},83264:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11870);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},23657:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(42538)),r=s(o(48427)),i=o(18609);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:[]}),l(this,u,{writable:!0,value:[]}),l(this,g,{writable:!0,value:void 0}),l(this,f,{writable:!0,value:[]}),(0,r.default)(this,a,e),(0,r.default)(this,h,t),(0,r.default)(this,d,o)}setRemovedHfIndexes(e){return(0,r.default)(this,f,e.map((e=>{const t=(0,n.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,n.default)(this,f)}getRemovedHfIndexes(){return(0,n.default)(this,f)}getHfIndexFromVisualIndex(e){const t=(0,n.default)(this,h).getIndexesSequence(),o=(0,n.default)(this,h).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}s`;(0,n.default)(this,d).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&(0,n.default)(this,d).getEngine()[t]((0,n.default)(this,d).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&((0,r.default)(this,u,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,r.default)(this,g,this.getHfIndexFromVisualIndex(t)))}getMoveLine(e,t){const o=(0,n.default)(this,h).getNumberOfIndexes(),s=Array.from(Array(o).keys()).filter((t=>!1===e.includes(t)));var r;return 0===t?null!==(r=s[t])&&void 0!==r?r:0:s[t-1]+1}getInitiallyCalculatedMoves(e,t){let o=this.getMoveLine(e,t);const s=[];return e.forEach((e=>{const t={from:e,to:o};s.forEach((e=>{const o=e.from>e.to,s=e.to<=t.from;e.from>t.from&&s&&o&&(t.from+=1)})),t.from>=o&&(o+=1),s.push(t)})),s}adjustedCalculatedMoves(e){return e.forEach(((t,o)=>{e.slice(o+1).forEach((e=>{const o=e.from<e.to;e.from>t.from&&o&&(e.from-=1)}))})),e}calculateAndSyncMoves(e,t){if((0,n.default)(this,d).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=this.adjustedCalculatedMoves(this.getInitiallyCalculatedMoves((0,n.default)(this,u),(0,n.default)(this,g)));null===(0,n.default)(this,d).getSheetId()?(0,n.default)(this,d).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}Order`;return t=>{if((0,n.default)(this,d).isPerformingUndoRedo())return;const o=(0,n.default)(this,h).getIndexesSequence();if("update"===t){const t=(0,n.default)(this,c).map((e=>o.indexOf(e))),s=(0,n.default)(this,d).getEngine().getSheetDimensions((0,n.default)(this,d).getSheetId());let r;r="row"===(0,n.default)(this,a)?s.height:s.width;for(let e=t.length;e<r;e+=1)t.push(e);(0,n.default)(this,d).getEngine()[e]((0,n.default)(this,d).getSheetId(),t)}(0,r.default)(this,c,o)}}init(){(0,r.default)(this,c,(0,n.default)(this,h).getIndexesSequence())}};t.default=p},9424:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=s(o(23657));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:!1}),l(this,u,{writable:!0,value:!1}),l(this,g,{writable:!0,value:null}),l(this,f,{writable:!0,value:null}),(0,r.default)(this,a,new i.default("row",e,this)),(0,r.default)(this,h,new i.default("column",t,this)),(0,r.default)(this,d,o)}getForAxis(e){return"row"===e?(0,n.default)(this,a):(0,n.default)(this,h)}setPerformUndo(e){(0,r.default)(this,c,e)}setPerformRedo(e){(0,r.default)(this,u,e)}isPerformingUndoRedo(){return(0,n.default)(this,c)||(0,n.default)(this,u)}getSheetId(){return(0,n.default)(this,f)}getEngine(){return(0,n.default)(this,g)}getPostponeAction(){return(0,n.default)(this,d)}setupSyncEndpoint(e,t){(0,r.default)(this,g,e),(0,r.default)(this,f,t),(0,n.default)(this,a).init(),(0,n.default)(this,h).init()}};t.default=p},54484:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const o=new Date(Date.UTC(0,0,e+-1));return(0,n.default)(o).format(t)},t.getDateInHfFormat=function(e,t){return(0,n.default)(e,t,!0).format(r)},t.getDateInHotFormat=function(e,t){return(0,n.default)(e,r,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,n.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=i,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return i(e)?e.substr(1):e};var n=s(o(33034));const r="DD/MM/YYYY";function i(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},81870:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.col,o.col),0),n=Math.max(t.col,o.col),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideColumns(r);const i=r[r.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(95988);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},89917:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],r=t[t.length-1];n=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countCols()||this.selectColumns(n,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),r=n.getTopStartCorner().col,i=n.getBottomEndCorner().col,l=this.columnIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countCols()));else{const e=this.countCols()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(95988);var s=o(50095),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},80923:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(42538)),r=s(o(48427)),i=o(36026),l=o(83302),a=o(68145),h=o(50095),d=o(22232),c=o(93315),u=o(11428),g=s(o(56307)),f=s(o(81870)),p=s(o(89917)),m=o(33165);function C(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}o(52097),g.default.getSingleton().register("beforeHideColumns"),g.default.getSingleton().register("afterHideColumns"),g.default.getSingleton().register("beforeUnhideColumns"),g.default.getSingleton().register("afterUnhideColumns");const w="hiddenColumns";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=310;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 310}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("afterGetColHeader",(function(){return e.onAfterGetColHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,s,o&&i,o&&s.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,n.default)(this,v).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,s,o,o&&s.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideColumns(t)}getHiddenColumns(){return(0,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,n.default)(this,v).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}onModifyColWidth(e,t){return this.isHidden(t)?0:(0,n.default)(this,y).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).copyPasteEnabled&&this.isHidden(t)&&(o.skipColumnOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.rangeEach)(e.startCol,e.endCol,(n=>{this.isHidden(n)?(t||o(e.startRow,e.endRow,s,n-1),t=!0):(t&&(s=n),n===e.endCol&&o(e.startRow,e.endRow,s,n),t=!1)}))})),t}onAfterGetColHeader(e,t){if(!(0,n.default)(this,y).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&o.push("beforeHiddenColumn"),(0,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).columns)&&this.hideColumns((0,n.default)(this,y).columns)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenColumns=E},16083:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80923);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},71294:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.row,o.row),0),n=Math.max(t.row,o.row),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideRows(r);const i=r[r.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(95988);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},70029:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],r=t[t.length-1];n=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countRows()||this.selectRows(n,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),r=n.getTopStartCorner().row,i=n.getBottomEndCorner().row,l=this.rowIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countRows()));else{const e=this.countRows()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(95988);var s=o(50095),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},48894:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(42538)),r=s(o(48427)),i=o(36026),l=o(83302),a=o(68145),h=o(50095),d=o(22232),c=o(93315),u=o(11428),g=s(o(56307)),f=s(o(71294)),p=s(o(70029)),m=o(33165);function C(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}o(25972),g.default.getSingleton().register("beforeHideRows"),g.default.getSingleton().register("afterHideRows"),g.default.getSingleton().register("beforeUnhideRows"),g.default.getSingleton().register("afterUnhideRows");const w="hiddenRows";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=320;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 320}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.addHook("afterGetRowHeader",(function(){return e.onAfterGetRowHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),this.hot.runHooks("afterUnhideRows",t,s,o&&i,o&&s.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,n.default)(this,v).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,s,o,o&&s.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideRows(t)}getHiddenRows(){return(0,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,n.default)(this,v).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}onModifyRowHeight(e,t){return this.isHidden(t)?0:e}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).copyPasteEnabled&&this.isHidden(e)&&(o.skipRowOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.rangeEach)(e.startRow,e.endRow,(n=>{this.isHidden(n)?(t||o(s,n-1,e.startCol,e.endCol),t=!0):(t&&(s=n),n===e.endRow&&o(s,n,e.startCol,e.endCol),t=!1)}))})),t}onAfterGetRowHeader(e,t){if(!(0,n.default)(this,y).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&o.push("beforeHiddenRow"),(0,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).rows)&&this.hideRows((0,n.default)(this,y).rows)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenRows=E},51124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48894);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},40106:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,k.registerPlugin)(s.AutoColumnSize),(0,k.registerPlugin)(n.Autofill),(0,k.registerPlugin)(r.AutoRowSize),(0,k.registerPlugin)(l.BindRowsWithHeaders),(0,k.registerPlugin)(a.CollapsibleColumns),(0,k.registerPlugin)(h.ColumnSorting),(0,k.registerPlugin)(d.ColumnSummary),(0,k.registerPlugin)(c.Comments),(0,k.registerPlugin)(u.ContextMenu),(0,k.registerPlugin)(g.CopyPaste),(0,k.registerPlugin)(f.CustomBorders),(0,k.registerPlugin)(p.DragToScroll),(0,k.registerPlugin)(m.DropdownMenu),(0,k.registerPlugin)(C.ExportFile),(0,k.registerPlugin)(w.Filters),(0,k.registerPlugin)(y.Formulas),(0,k.registerPlugin)(v.HiddenColumns),(0,k.registerPlugin)(E.HiddenRows),(0,k.registerPlugin)(S.ManualColumnFreeze),(0,k.registerPlugin)(R.ManualColumnMove),(0,k.registerPlugin)(b.ManualColumnResize),(0,k.registerPlugin)(T.ManualRowMove),(0,k.registerPlugin)(_.ManualRowResize),(0,k.registerPlugin)(O.MergeCells),(0,k.registerPlugin)(M.MultiColumnSorting),(0,k.registerPlugin)(I.MultipleSelectionHandles),(0,k.registerPlugin)(N.NestedHeaders),(0,k.registerPlugin)(A.NestedRows),(0,k.registerPlugin)(P.PersistentState),(0,k.registerPlugin)(x.Search),(0,k.registerPlugin)(D.TouchScroll),(0,k.registerPlugin)(H.TrimRows),(0,k.registerPlugin)(L.UndoRedo)};var s=o(21215);t.AutoColumnSize=s.AutoColumnSize;var n=o(62080);t.Autofill=n.Autofill;var r=o(60687);t.AutoRowSize=r.AutoRowSize;var i=o(36026);t.BasePlugin=i.BasePlugin;var l=o(85939);t.BindRowsWithHeaders=l.BindRowsWithHeaders;var a=o(55994);t.CollapsibleColumns=a.CollapsibleColumns;var h=o(1902);t.ColumnSorting=h.ColumnSorting;var d=o(68918);t.ColumnSummary=d.ColumnSummary;var c=o(76076);t.Comments=c.Comments;var u=o(86738);t.ContextMenu=u.ContextMenu;var g=o(77708);t.CopyPaste=g.CopyPaste;var f=o(3455);t.CustomBorders=f.CustomBorders;var p=o(72919);t.DragToScroll=p.DragToScroll;var m=o(74123);t.DropdownMenu=m.DropdownMenu;var C=o(83281);t.ExportFile=C.ExportFile;var w=o(30905);t.Filters=w.Filters;var y=o(83264);t.Formulas=y.Formulas;var v=o(16083);t.HiddenColumns=v.HiddenColumns;var E=o(51124);t.HiddenRows=E.HiddenRows;var S=o(58125);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=o(19640);t.ManualColumnMove=R.ManualColumnMove;var b=o(35350);t.ManualColumnResize=b.ManualColumnResize;var T=o(60734);t.ManualRowMove=T.ManualRowMove;var _=o(15702);t.ManualRowResize=_.ManualRowResize;var O=o(95896);t.MergeCells=O.MergeCells;var M=o(13620);t.MultiColumnSorting=M.MultiColumnSorting;var I=o(98481);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var N=o(37499);t.NestedHeaders=N.NestedHeaders;var A=o(93363);t.NestedRows=A.NestedRows;var P=o(94870);t.PersistentState=P.PersistentState;var x=o(27885);t.Search=x.Search;var D=o(30450);t.TouchScroll=D.TouchScroll;var H=o(95128);t.TrimRows=H.TrimRows;var L=o(77137);t.UndoRedo=L.UndoRedo;var k=o(52036);t.registerPlugin=k.registerPlugin,t.getPlugin=k.getPlugin,t.getPluginsNames=k.getPluginsNames},64618:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.freezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},76969:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.unfreezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},58125:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(75017);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},75017:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=s(o(56307)),i=s(o(64618)),l=s(o(76969));o(18633),r.default.getSingleton().register("beforeColumnFreeze"),r.default.getSingleton().register("afterColumnFreeze"),r.default.getSingleton().register("beforeColumnUnfreeze"),r.default.getSingleton().register("afterColumnUnfreeze");const a="manualColumnFreeze";t.PLUGIN_KEY=a;t.PLUGIN_PRIORITY=110;const h=new WeakMap;class d extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return 110}constructor(e){super(e),h.set(this,{afterFirstUse:!1})}isEnabled(){return!!this.hot.getSettings()[a]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>this.addContextMenuEntry(e))),this.addHook("beforeColumnMove",((e,t)=>this.onBeforeColumnMove(e,t))),super.enablePlugin())}disablePlugin(){h.get(this).afterFirstUse=!1,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart<this.hot.countCols()&&e>o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,s)&&(s&&(this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart),o._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,s))}unfreezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart>0&&e<=o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,s)&&(s&&(o._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,s))}addContextMenuEntry(e){e.items.push({name:"---------"},(0,i.default)(this),(0,l.default)(this))}onBeforeColumnMove(e,t){if(h.get(this).afterFirstUse){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}}t.ManualColumnFreeze=d},19640:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47507);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},47507:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=s(o(56307)),i=o(50095),l=o(83302),a=o(68145),h=s(o(75244)),d=s(o(53277)),c=s(o(4588));o(36881),r.default.getSingleton().register("beforeColumnMove"),r.default.getSingleton().register("afterColumnMove");const u="manualColumnMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=120;const g=new WeakMap,f="ht__manualColumnMove",p="show-ui",m="on-moving--columns",C="after-selection--columns";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 120}constructor(e){super(e),g.set(this,{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollVertically",(()=>this.onAfterScrollVertically())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeColumnMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=n&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,s,n,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let s=0;for(let n=e;n<=t;n+=1){const e=o.getRenderableFromVisualIndex(n);n<0?s+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[u];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const o=[];return(0,a.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=g.get(this),t=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(e.hoveredColumn)&&t>0&&this.hot.scrollViewportTo(void 0,this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1));const o=this.hot.view._wt.wtTable,s=this.hot.view._wt.wtOverlays.scrollableElement,n="number"==typeof s.scrollX?s.scrollX:s.scrollLeft;let r=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.hoveredColumn-1);const i=o.hider.offsetWidth,a=o.TBODY.offsetLeft,h=this.backlight.getOffset().start,d=this.backlight.getSize().width;let c=0,u=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,o=(0,l.outerWidth)(this.hot.rootElement),r=t.innerWidth-e.rootElementOffset-o;u=t.innerWidth-e.target.eventPageX-r-(void 0===s.scrollX?n:0)}else u=e.target.eventPageX-(e.rootElementOffset-(void 0===s.scrollX?n:0));if(e.hasRowHeaders&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(e.hoveredColumn)&&(r+=n),r+=c,e.hoveredColumn<0)e.fixedColumnsStart>0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+r<=u){const t=e.hoveredColumn>=e.countCols?e.countCols-1:e.hoveredColumn;e.target.col=t+1,r+=e.target.TD.offsetWidth}else e.target.col=e.hoveredColumn;let f=u,p=r;u+d+h>=i?f=i-d-h:u+h<a+c&&(f=a+c+Math.abs(h)),r>=i-1?p=i-1:0===p?p=1:void 0!==s.scrollX&&e.hoveredColumn<e.fixedColumnsStart&&(p-=e.rootElementOffset<=s.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,f),this.guideline.setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const n=this.hot.view._wt.wtTable,r=this.hot.selection.isSelectedByColumnHeader(),i=this.hot.getSelectedRangeLast(),a=g.get(this),h=(0,l.hasClass)(e.target,"sortAction");if(!i||!r||a.pressed||0!==e.button||h)return a.pressed=!1,a.columnsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=i,w=Math.min(u.col,f.col),y=Math.max(u.col,f.col);if(t.row<0&&t.col>=w&&t.col<=y){s.column=!0,a.pressed=!0,a.target.eventPageX=e.pageX,a.target.eventOffsetX=e.offsetX,a.hoveredColumn=t.col,a.target.TD=o,a.target.col=t.col,a.columnsToMove=this.prepareColumnsToMoving(w,y),a.hasRowHeaders=!!this.hot.getSettings().rowHeaders,a.countCols=this.hot.countCols(),a.fixedColumnsStart=this.hot.getSettings().fixedColumnsStart,a.rootElementOffset=(0,l.offset)(this.hot.rootElement).left;const r=a.hasRowHeaders?-1:0,i=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,h=t.col<a.fixedColumnsStart,d=Math.abs(this.hot.view._wt.wtOverlays.inlineStartOverlay.getScrollPosition()),c=Math.abs(e.offsetX-(this.hot.isRtl()?e.target.offsetWidth:0)),u=this.getColumnsWidth(w,t.col-1)+c,g=this.getColumnsWidth(r,w-1)+(h?d:0)+u;this.backlight.setPosition(i,g),this.backlight.setSize(this.getColumnsWidth(w,y),n.hider.offsetHeight-i),this.backlight.setOffset(null,-u),(0,l.addClass)(this.hot.rootElement,m)}else(0,l.removeClass)(this.hot.rootElement,C),a.pressed=!1,a.columnsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout((function(){this.backlight.setPosition(e)}))}t.target.eventPageX=e.pageX,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.columnsToMove.indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.hoveredColumn=t.col,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.col,o=e.columnsToMove.length;if(e.hoveredColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.columnsToMove[0],n=this.hot.toPhysicalColumn(s),r=this.dragColumns(e.columnsToMove,t);if(e.columnsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(n),t=e+o-1;this.hot.selectColumns(e,t)}}onAfterScrollVertically(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualColumnMove=w},50715:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(68145),n=o(18609);const r="px";var i=class{constructor(e){this.hot=e,this._element=null,this.state=0,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,s.isNumeric)(e)&&(this._element.style.top=e+r),(0,s.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+r)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,s.isNumeric)(e)&&(this._element.style.width=e+r),(0,s.isNumeric)(t)&&(this._element.style.height=t+r)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,s.isNumeric)(e)&&(this._element.style.marginTop=e+r),(0,s.isNumeric)(t)&&(this._element.style[`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`]=t+r)}getOffset(){const e=this._element.style,t=`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}};t.default=i},53277:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(50715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--backlight")}}var l=i;t.default=l},4588:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(50715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--guideline")}}var l=i;t.default=l},35350:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35426);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},35426:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=o(83302),i=s(o(75244)),l=o(50095),a=o(68145),h=o(33165);const d="manualColumnResize";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=130;const c="manualColumnWidths",u=new WeakMap;class g extends n.BasePlugin{static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 130}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentCol=null,this.selectedCols=[],this.currentWidth=null,this.newSize=null,this.startY=null,this.startWidth=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.columnWidthsMap=void 0,u.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualColumnResizer"),(0,r.addClass)(this.guide,"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[d]}enablePlugin(){this.enabled||(this.columnWidthsMap=new h.PhysicalIndexToValueMap,this.columnWidthsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,this.columnWidthsMap),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>this.onBeforeStretchingColumnWidth(e,t))),this.addHook("beforeColumnResize",((e,t,o)=>this.onBeforeColumnResize(e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){u.get(this).config=this.columnWidthsMap.getValues(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",c,this.columnWidthsMap.getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",c,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return this.columnWidthsMap.setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(t,null)}onMapInit(){const e=u.get(this),t=this.hot.getSettings()[d],o=this.loadManualColumnWidths();void 0!==o?this.hot.batchExecution((()=>{o.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0):Array.isArray(t)?(this.hot.batchExecution((()=>{t.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0),e.config=t):!0===t&&Array.isArray(e.config)&&this.hot.batchExecution((()=>{e.config.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0)}setupHandlePosition(e){if(!e.parentNode)return;this.currentTH=e;const t=this.hot.rootElement;if(!1===(0,r.overlayContainsElement)("top_inline_start_corner",this.currentTH,t)&&!1===(0,r.overlayContainsElement)("top",this.currentTH,t))return;const{_wt:o}=this.hot.view,s=o.wtTable.getCoords(this.currentTH),n=s.col;if(n<0)return;const i=(0,r.outerHeight)(this.currentTH),h=this.currentTH.getBoundingClientRect();let d;n<o.getSetting("fixedColumnsStart")&&(d=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),d||(d=o.wtOverlays.topOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentCol=this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),this.selectedCols=[];const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&c){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,a.rangeEach)(t,o,(e=>{this.selectedCols.includes(e)||this.selectedCols.push(e)}))}))}this.selectedCols.includes(this.currentCol)||(this.selectedCols=[this.currentCol]),this.startOffset=d.start-6,this.startWidth=parseInt(h.width,10),this.handle.style.top=`${d.top}px`,this.handle.style[this.inlineDir]=`${this.startOffset+this.startWidth}px`,this.handle.style.height=`${i}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style[this.inlineDir]=`${this.startOffset+this.currentWidth}px`}setupGuidePosition(){const e=parseInt((0,r.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=`${t}px`,this.refreshGuidePosition(),this.guide.style.height=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style[this.inlineDir]=this.handle.style[this.inlineDir]}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfColumnHeader(e){return!!(0,r.closest)(e,["THEAD"],this.hot.rootElement)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||this.pressed||this.setupHandlePosition(t)}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",this.newSize,t,!0);void 0!==s&&(this.newSize=s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,this.newSize),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!0),o&&e()};if(this.dblclick>=2){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=e.pageX,this.newSize=this.startWidth)}onMouseMove(e){if(this.pressed){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();this.currentWidth=this.startWidth+t,(0,l.arrayEach)(this.selectedCols,(e=>{this.newSize=this.setManualSize(e,this.currentWidth)})),this.refreshHandlePosition(),this.refreshGuidePosition()}}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",this.newSize,t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(t,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyColWidth(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=this.columnWidthsMap.getValueAtIndex(e);this.hot.getSettings()[d]&&s&&(o=s)}return o}onBeforeStretchingColumnWidth(e,t){let o=this.columnWidthsMap.getValueAtIndex(t);return null===o&&(o=e),o}onBeforeColumnResize(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}destroy(){super.destroy()}}t.ManualColumnResize=g},60734:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52030);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},52030:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=s(o(56307)),i=o(50095),l=o(83302),a=o(68145),h=s(o(75244)),d=s(o(81005)),c=s(o(67648));o(83988),r.default.getSingleton().register("beforeRowMove"),r.default.getSingleton().register("afterRowMove");const u="manualRowMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=140;const g=new WeakMap,f="ht__manualRowMove",p="show-ui",m="on-moving--rows",C="after-selection--rows";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 140}constructor(e){super(e),g.set(this,{rowsToMove:[],pressed:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollHorizontally",(()=>this.onAfterScrollHorizontally())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeRowMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=n&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,s,n,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let s=0;for(let n=e;n<=t;n++){const e=o.getRenderableFromVisualIndex(n);null!==e&&(s+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[u];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:o,to:s}=e,n=Math.min(o.row,s.row),r=Math.max(o.row,s.row);return(0,a.rangeEach)(n,r,(e=>{t.push(e)})),t}refreshPositions(){const e=g.get(this),t=e.target.coords,o=this.hot.view.getFirstFullyVisibleRow(),s=this.hot.view.getLastFullyVisibleRow(),n=this.hot.countRows();this.isFixedRowTop(t.row)&&o>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1)),this.isFixedRowBottom(t.row)&&s<n&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(s+1,1),void 0,!0);const r=this.hot.view._wt.wtTable,i=e.target.TD,a=this.hot.rootElement,h=(0,l.offset)(a),d=(0,l.getTrimmingContainer)(a),c=r.holder.scrollTop;let u;u=this.hot.rootWindow===d?d.scrollY:d.scrollTop;const f=h.top-u,p=e.target.eventPageY-f+c,m=r.hider.offsetHeight,C=r.TBODY.offsetTop,w=this.backlight.getOffset().top,y=this.backlight.getSize().height,v=i.offsetHeight/2,E=i.offsetHeight;let S=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const R=p>=S+v;this.isFixedRowTop(t.row)&&(S+=r.holder.scrollTop),t.row<0?e.target.row=o>0?o-1:o:R?(e.target.row=t.row+1,S+=0===t.row?E-1:E):e.target.row=t.row;let b=p,T=S;p+y+w>=m?b=m-y-w:p+w<C&&(b=C+Math.abs(w)),S>=m-1&&(T=m-1),this.backlight.setPosition(b),this.guideline.setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const{wtTable:n,wtViewport:r}=this.hot.view._wt,i=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast(),h=g.get(this);if(!a||!i||h.pressed||0!==e.button)return h.pressed=!1,h.rowsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=a,w=Math.min(u.row,f.row),y=Math.max(u.row,f.row);if(t.col<0&&t.row>=w&&t.row<=y){s.row=!0,h.pressed=!0,h.target.eventPageY=e.pageY,h.target.coords=t,h.target.TD=o,h.rowsToMove=this.prepareRowsToMoving();const i=n.holder.scrollLeft+r.getRowHeaderWidth();this.backlight.setPosition(null,i),this.backlight.setSize(n.hider.offsetWidth-i,this.getRowsHeight(w,y)),this.backlight.setOffset(-1*(this.getRowsHeight(w,t.row-1)+e.offsetY),null),(0,l.addClass)(this.hot.rootElement,m),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,C),h.pressed=!1,h.rowsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout((function(){this.backlight.setPosition(null,e)}))}t.target.eventPageY=e.pageY,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.rowsToMove.indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.target.coords=t,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.row,o=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.rowsToMove[0],n=this.hot.toPhysicalRow(s),r=this.dragRows(e.rowsToMove,t);if(e.rowsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(n),t=e+o-1;this.hot.selectRows(e,t)}}onAfterScrollHorizontally(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualRowMove=w},32715:(e,t)=>{"use strict";t.__esModule=!0;const o="px";var s=class{constructor(e){this.hot=e,this._element=null,this.state=0}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+o),void 0!==t&&(this._element.style.left=t+o)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+o),t&&(this._element.style.height=t+o)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+o),t&&(this._element.style.marginLeft=t+o)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}};t.default=s},81005:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(32715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--backlight")}}var l=i;t.default=l},67648:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(32715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--guideline")}}var l=i;t.default=l},15702:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13524);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},13524:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=o(83302),i=s(o(75244)),l=o(50095),a=o(68145),h=o(33165),d=o(21280);const c="manualRowResize";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=30;const u="manualRowHeights",g=new WeakMap;class f extends n.BasePlugin{static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 30}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentRow=null,this.selectedRows=[],this.currentHeight=null,this.newSize=null,this.startY=null,this.startHeight=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.rowHeightsMap=void 0,g.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualRowResizer"),(0,r.addClass)(this.guide,"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){this.enabled||(this.rowHeightsMap=new h.PhysicalIndexToValueMap,this.rowHeightsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,this.rowHeightsMap),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){g.get(this).config=this.rowHeightsMap.getValues(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",u,this.rowHeightsMap.getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",u,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,d.ViewportRowsCalculator.DEFAULT_HEIGHT);return this.rowHeightsMap.setValueAtIndex(o,s),s}setupHandlePosition(e){this.currentTH=e;const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords(this.currentTH),n=s.row;if(n<0)return;const i=(0,r.outerWidth)(this.currentTH),h=this.currentTH.getBoundingClientRect(),d=n<o.getSetting("fixedRowsTop"),c=n>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let u;d?u=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col):c&&(u=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),u||(u=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentRow=this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.selectedRows=[];const g=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&g){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,a.rangeEach)(t,o,(e=>{this.selectedRows.includes(e)||this.selectedRows.push(e)}))}))}this.selectedRows.includes(this.currentRow)||(this.selectedRows=[this.currentRow]),this.startOffset=u.top-6,this.startHeight=parseInt(h.height,10),this.handle.style.top=`${this.startOffset+this.startHeight}px`,this.handle.style[this.inlineDir]=`${u.start}px`,this.handle.style.width=`${i}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style.top=`${this.startOffset+this.currentHeight}px`}setupGuidePosition(){const e=parseInt((0,r.outerWidth)(this.handle),10),t=parseInt(this.handle.style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style[this.inlineDir]=`${t}px`,this.guide.style.width=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style.top=this.handle.style.top}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfRowHeader(e){var t;return(0,r.closest)(e,["TH"],this.hot.rootElement)&&"TBODY"===(null===(t=e.parentNode)||void 0===t||null===(t=t.parentNode)||void 0===t?void 0:t.tagName)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&this.newSize<t?t:this.newSize}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&(this.newSize=s),this.setManualSize(t,this.newSize),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if(this.dblclick>=2){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=e.pageY,this.newSize=this.startHeight)}onMouseMove(e){this.pressed&&(this.currentHeight=this.startHeight+(e.pageY-this.startY),(0,l.arrayEach)(this.selectedRows,(e=>{this.newSize=this.setManualSize(e,this.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(e,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(t,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(t,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyRowHeight(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=this.rowHeightsMap.getValueAtIndex(e);this.hot.getSettings()[c]&&s&&(o=s)}return o}onMapInit(){const e=g.get(this),t=this.hot.getSettings()[c],o=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==o?o.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})):Array.isArray(t)?(t.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})),e.config=t):!0===t&&Array.isArray(e.config)&&e.config.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)}))}),!0)}destroy(){super.destroy()}}t.ManualRowResize=f},86805:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22232),n=o(50095);var r=class{constructor(e){this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection,this.currentFillData=null}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let o=null;return o=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",o}snapDragArea(e,t,o,s){const n=t.slice(0),r=this.getAutofillSize(e,t,o),[i,l,a,h]=e,d=["up","down"].indexOf(o)>-1?a-i+1:h-l+1,c=r-Math.floor(r/d)*d,u=this.getFarthestCollection(e,t,o,s);if(u)if("down"===o){const e=u.row+u.rowspan-i-c;n[2]+e>=this.plugin.hot.countRows()?n[2]-=c:n[2]+=c?e:0}else if("right"===o){const e=u.col+u.colspan-l-c;n[3]+e>=this.plugin.hot.countCols()?n[3]-=c:n[3]+=c?e:0}else if("up"===o){const e=a-c-u.row+1;n[0]+e<0?n[0]+=c:n[0]-=c?e:0}else if("left"===o){const e=h-c-u.col+1;n[1]+e<0?n[1]+=c:n[1]-=c?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:s,fillSize:r,dragArea:n,cycleLength:d}),n}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,s.extend)(this.currentFillData,e)}getAutofillSize(e,t,o){const[s,n,r,i]=e,[l,a,h,d]=t;switch(o){case"up":return s-l;case"down":return h-r;case"left":return n-a;case"right":return d-i;default:return null}}getDragArea(e,t,o){const[s,n,r,i]=e,[l,a,h,d]=t;switch(o){case"up":return[l,a,s-1,i];case"down":return[r+1,n,h,i];case"left":return[l,a,r,n-1];case"right":return[s,i+1,h,d];default:return null}}getFarthestCollection(e,t,o,s){const[r,i,l,a]=e,h=["up","down"].indexOf(o)>-1,d=h?l:a,c=h?r:i,u=this.getAutofillSize(e,t,o),g=h?l-r+1:a-i+1,f=u-Math.floor(u/g)*g;let p=null,m=null,C=null;switch(o){case"up":p="includesVertically",C=d-f+1;break;case"left":p="includesHorizontally",C=d-f+1;break;case"down":p="includesVertically",C=c+f-1;break;case"right":p="includesHorizontally",C=c+f-1}return(0,n.arrayEach)(s,(e=>{e[p](C)&&e.isFarther(m,o)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,s=this.currentFillData.dragDirection,n=(e,o)=>{switch(s){case"up":return e.row-o>=t.from.row;case"down":return e.row+e.rowspan-1+o<=t.to.row;case"left":return e.col-o>=t.from.column;case"right":return e.col+e.colspan-1+o<=t.to.column;default:return null}};let r=0,i=null,l=1;do{for(let e=0;e<o.length;e+=1){if(i=o[e],r=l*this.currentFillData.cycleLength,n(i,r))switch(s){case"up":this.plugin.mergedCellsCollection.add({row:i.row-r,rowspan:i.rowspan,col:i.col,colspan:i.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:i.row+r,rowspan:i.rowspan,col:i.col,colspan:i.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:i.row,rowspan:i.rowspan,col:i.col-r,colspan:i.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:i.row,rowspan:i.rowspan,col:i.col+r,colspan:i.colspan})}e===o.length-1&&(l+=1)}}while(n(i,r));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return(0,n.arrayEach)(e,(e=>{const s=e[0],n=this.plugin.hot.propToCol(e[1]);(null===t.min||s<t.min)&&(t.min=s),(null===t.max||s>t.max)&&(t.max=s),(null===o.min||n<o.min)&&(o.min=n),(null===o.max||n>o.max)&&(o.max=n)})),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const s=this.getDragArea(e,t,o),[n,r,i,l]=s,a=this.plugin.hot._createCellCoords(n,r),h=this.plugin.hot._createCellCoords(i,l),d=this.plugin.hot._createCellRange(a,a,h);return!!this.mergedCellsCollection.getWithinRange(d,!0)}};t.default=r},21989:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=class{constructor(e){this.plugin=e,this.hot=e.hot,this.fullySelectedMergedCellClassName="fullySelectedMergedCell"}snapDelta(e,t,o){const s=t.to,n=s.row+e.row,r=s.col+e.col;e.row?this.jumpOverMergedCell(e,o,n):e.col&&this.jumpOverMergedCell(e,o,r)}jumpOverMergedCell(e,t,o){let s=e.row||e.col,n=null,r=null,i=null;e.row?(n=t.includesVertically(o),r=t.row,i=t.getLastRow()):e.col&&(n=t.includesHorizontally(o),r=t.col,i=t.getLastColumn()),0!==s&&(s>0?n&&o!==r&&(s+=i-o+1):n&&o!==i&&(s-=o-r+1),e.row?e.row=s:e.col&&(e.col=s))}getUpdatedSelectionRange(e,t){return this.hot._createCellRange(e.highlight,e.from,this.hot._createCellCoords(e.to.row+t.row,e.to.col+t.col))}getSelectedMergedCellClassName(e,t,o,s){const n=Math.min(o[0],o[2]),r=Math.min(o[1],o[3]),i=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(void 0===s)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const a=this.plugin.mergedCellsCollection.get(e,t);if(!a)return;const h=a.getLastRow(),d=a.getLastColumn();return n<=a.row&&r<=a.col&&i>=h&&l>=d?`${this.fullySelectedMergedCellClassName}-${s}`:this.plugin.selectionCalculations.isMergeCellFullySelected(a,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+t,e.col+s));for(let e=0;e<o.length;e+=1){const s=[];for(let n=0;n<t.length;n+=1)s[n]=t[n].includes(o[e]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}};t.default=s},22951:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(28236);var n=class{constructor(e,t,o,s,n,r){this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.removed=!1,this.cellCoordsFactory=n,this.cellRangeFactory=r}static NEGATIVE_VALUES_WARNING(e){return s.toSingleLine`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
71
+ settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,r.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=c(),s=o.get(e),n=u(),r=n.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(n.delete(e),e.destroy()))}},o(95988);var n=s(o(63800)),r=o(93315),i=o(28236),l=o(69173),a=o(22232),h=o(11870),d=o(61205);function c(){const e="engine_relationship",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function u(){const e="shared_engine_usage",t=(0,n.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function g(e,t,o){const s=t[h.PLUGIN_KEY],n=(0,d.getEngineSettingsWithDefaultsAndOverrides)(t),r=c(),i=u();f(e,s.functions),p(e,s.language);const l=e.buildEmpty(n);return r.set(l,[o]),i.set(l,[o.guid]),m(l,s.namedExpressions),l.on("sheetAdded",(()=>{l.rebuildAndRecalculate()})),l.on("sheetRemoved",(()=>{l.rebuildAndRecalculate()})),l}function f(e,t){t&&t.forEach((t=>{const{name:o,plugin:s,translations:n}=t;try{e.registerFunction(o,s,n)}catch(e){(0,l.warn)(e.message)}}))}function p(e,t){if(t){const{langCode:o}=t;try{e.registerLanguage(o,t)}catch(e){(0,l.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:o,expression:s,scope:n,options:r}=t;try{e.addNamedExpression(o,s,n,r)}catch(e){(0,l.warn)(e.message)}})),e.resumeEvaluation())}},61205:(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=i,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),a=i(e);return{...r,...n,...a}},t.getEngineSettingsWithOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],n=l(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),r=i(e);return{...n,...r}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(11870);const n="internal-use-in-handsontable";t.DEFAULT_LICENSE_KEY=n;const r={licenseKey:n,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function i(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[s.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function l(e){return Object.keys(e).reduce(((t,o)=>("hyperformula"!==o&&(t[o]=e[o]),t)),{})}t.DEFAULT_SETTINGS=r},11870:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95735),o(95988);var n=s(o(93231)),r=s(o(48427)),i=s(o(42538)),l=o(36026),a=s(o(63800)),h=o(69173),d=o(68145),c=o(93315),u=o(33423),g=o(54484),f=o(61205),p=o(65320),m=o(18609),C=s(o(56307)),w=s(o(9424));function y(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const v="formulas";t.PLUGIN_KEY=v;const E=["maxRows","maxColumns","language"];t.SETTING_KEYS=E;t.PLUGIN_PRIORITY=260,C.default.getSingleton().register("afterNamedExpressionAdded"),C.default.getSingleton().register("afterNamedExpressionRemoved"),C.default.getSingleton().register("afterSheetAdded"),C.default.getSingleton().register("afterSheetRemoved"),C.default.getSingleton().register("afterSheetRenamed"),C.default.getSingleton().register("afterFormulasValuesUpdate");const S=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var R=new WeakMap,b=new WeakMap,T=new WeakMap;class _ extends l.BasePlugin{constructor(){var e;super(...arguments),e=this,y(this,R,{writable:!0,value:!1}),y(this,b,{writable:!0,value:!1}),y(this,T,{writable:!0,value:[["valuesUpdated",function(){return e.onEngineValuesUpdated(...arguments)}],["namedExpressionAdded",function(){return e.onEngineNamedExpressionsAdded(...arguments)}],["namedExpressionRemoved",function(){return e.onEngineNamedExpressionsRemoved(...arguments)}],["sheetAdded",function(){return e.onEngineSheetAdded(...arguments)}],["sheetRenamed",function(){return e.onEngineSheetRenamed(...arguments)}],["sheetRemoved",function(){return e.onEngineSheetRemoved(...arguments)}]]}),(0,n.default)(this,"staticRegister",(0,a.default)("formulas")),(0,n.default)(this,"engine",null),(0,n.default)(this,"sheetName",null),(0,n.default)(this,"indexSyncer",null),(0,n.default)(this,"rowAxisSyncer",null),(0,n.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[v,...E]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,u.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){return t.onBeforeLoadData(...arguments)})),this.addHook("afterLoadData",(function(){return t.onAfterLoadData(...arguments)})),this.addHook("beforeUpdateData",(function(){return t.onBeforeLoadData(...arguments)})),this.addHook("afterUpdateData",(function(){return t.onAfterLoadData(...arguments)})),this.addHook("modifyData",(function(){return t.onModifyData(...arguments)})),this.addHook("modifySourceData",(function(){return t.onModifySourceData(...arguments)})),this.addHook("beforeValidate",(function(){return t.onBeforeValidate(...arguments)})),this.addHook("afterSetSourceDataAtCell",(function(){return t.onAfterSetSourceDataAtCell(...arguments)})),this.addHook("afterSetDataAtCell",(function(){return t.onAfterSetDataAtCell(...arguments)})),this.addHook("afterSetDataAtRowProp",(function(){return t.onAfterSetDataAtCell(...arguments)})),this.addHook("beforeCreateRow",(function(){return t.onBeforeCreateRow(...arguments)})),this.addHook("beforeCreateCol",(function(){return t.onBeforeCreateCol(...arguments)})),this.addHook("afterCreateRow",(function(){return t.onAfterCreateRow(...arguments)})),this.addHook("afterCreateCol",(function(){return t.onAfterCreateCol(...arguments)})),this.addHook("beforeRemoveRow",(function(){return t.onBeforeRemoveRow(...arguments)})),this.addHook("beforeRemoveCol",(function(){return t.onBeforeRemoveCol(...arguments)})),this.addHook("afterRemoveRow",(function(){return t.onAfterRemoveRow(...arguments)})),this.addHook("afterRemoveCol",(function(){return t.onAfterRemoveCol(...arguments)})),this.indexSyncer=new w.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,o,s)=>{this.rowAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("beforeColumnMove",((e,t,o,s)=>{this.columnAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("afterRowMove",((e,t,o,s,n)=>{this.rowAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("afterColumnMove",((e,t,o,s,n)=>{this.columnAxisSyncer.calculateAndSyncMoves(s,n)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){return t.onAfterCellMetaReset(...arguments)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){return t.onAfterDetachChild(...arguments)})),this.addHook("beforeAutofill",(function(){return t.onBeforeAutofill(...arguments)})),(0,i.default)(this,T).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,h.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){(0,i.default)(this,T).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,u.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,f.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,f.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[v];if((0,c.isDefined)(o)&&(0,c.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[v].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){(0,i.default)(this,T).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),(0,r.default)(this,T,null),(0,u.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,c.isDefined)(t)&&!(0,p.isArrayOfArrays)(t))return(0,h.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,h.warn)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(e){return(0,h.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,h.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,m.toUpperCaseFirst)(v)}.switchSheet`)}getCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const s=this.hot.toPhysicalRow(e),n=this.hot.toPhysicalColumn(t);return null!==s&&null!==n?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;e.forEach((e=>{var t;const s=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==s&&(o.has(s)||o.add(s))})),(0,u.getRegisteredHotInstances)(this.engine).forEach(((e,s)=>{var n;(t||s!==this.sheetId)&&o.has(s)&&(e.render(),null===(n=e.view)||void 0===n||n.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:o,col:s,sheet:n}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,c.isDefined)(n)?`${n}:${o}x${s}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var s,n;const{row:r,col:i}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,c.isDefined)(r)||!1===(0,c.isDefined)(i)||r>=this.hot.countRows()||i>=this.hot.countCols())return;const l=null==e||null===(n=e.address)||void 0===n?void 0:n.sheet,a=t(e);if(void 0!==l&&!o.has(a)){const e=(0,u.getRegisteredHotInstances)(this.engine).get(l);if(!e)return;e.validateCell(e.getDataAtCell(r,i),e.getCellMeta(r,i),(()=>{}))}}))}syncChangeWithEngine(e,t,o){const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(s))return void(0,h.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const n=this.hot.getCellMeta(e,t);return(0,g.isDate)(o,n.type)&&((0,g.isDateValid)(o,n.dateFormat)?o=(0,g.getDateInHfFormat)(o,n.dateFormat):!1===(0,g.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}onBeforeValidate(e,t,o){const s=this.hot.propToCol(o);if(this.isFormulaCellType(t,s)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},o=this.hot.getCellMeta(t,s);let n=this.engine.getCellValue(e);return"date"===o.type&&(0,d.isNumeric)(n)&&(n=(0,g.getDateFromExcelDate)(n,o.dateFormat)),"object"==typeof n&&null!==n?n.value:n}return e}onBeforeAutofill(e,t,o){const{row:s,col:n}=t.getTopStartCorner(),{row:r,col:i}=t.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:d}=o.getBottomEndCorner(),c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId}},u={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(l),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(a),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(d),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(u))return!1;const f=this.engine.getFillRangeData(c,u),{row:p,col:m}=c.start,{row:C,col:w}=c.end,y=C-p+1,v=w-m+1;for(let e=0;e<f.length;e+=1)for(let t=0;t<f[e].length;t+=1){const o=f[e][t],s=e%y,n=t%v,r=this.hot.getCellMeta(s,n);(0,g.isDate)(o,r.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,n,this.sheetId)&&(f[e][t]=(0,g.getDateInHotFormat)(o,r.dateFormat)))}return f}onBeforeLoadData(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(v))||(0,r.default)(this,b,(0,c.isUndefined)(this.hot.getSettings().data))}onAfterCellMetaReset(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,n)=>{const r=this.hot.getCellMeta(s,n),i=r.dateFormat;(0,g.isDate)(o,r.type)&&(t=!0,(0,g.isDateValid)(o,i)?e[s][n]=(0,g.getDateInHfFormat)(o,i):!1===this.isFormulaCellType(s,n)&&(e[s][n]=`'${o}`))}))})),!0===t&&((0,r.default)(this,R,!0),this.engine.setSheetContent(this.sheetId,e),(0,r.default)(this,R,!1))}onAfterLoadData(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(v)))if(this.sheetName=(0,u.setupSheet)(this.engine,this.hot.getSettings()[v].sheetName),(0,i.default)(this,b))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){(0,r.default)(this,R,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),(0,r.default)(this,R,!1)}}}onModifyData(e,t,o,s){if("get"!==s||(0,i.default)(this,R)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e);if(null===n||null===t)return;if(!this.isFormulaCellType(n,t)){if("ARRAY"!==this.getCellType(n,t))return void((0,g.isEscapedFormulaExpression)(o.value)&&(o.value=(0,g.unescapeFormulaExpression)(o.value)))}const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let l=this.engine.getCellValue(r);const a=this.hot.getCellMeta(n,t);"date"===a.type&&(0,d.isNumeric)(l)&&(l=(0,g.getDateFromExcelDate)(l,a.dateFormat));const h="object"==typeof l&&null!==l?l.value:l;o.value=h}onModifySourceData(e,t,o,s){if("get"!==s||(0,i.default)(this,R)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const n=this.hot.toVisualRow(e),r=this.hot.propToCol(t);if(null===n||null===r)return;if(!this.isFormulaCellType(n,r)){if("ARRAY"!==this.getCellType(n,r))return}const l=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===l.width&&0===l.height)return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};o.value=this.engine.getCellSerialized(a)}onAfterSetDataAtCell(e,t){if(S(t))return;const o=[],s=[],n=this.engine.batch((()=>{e.forEach((e=>{let[t,n,,r]=e;const i=this.hot.propToCol(n),l=this.hot.toPhysicalRow(t),a=this.hot.toPhysicalColumn(i),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};null!==l&&null!==a?this.syncChangeWithEngine(t,i,r):o.push([t,i,r]),s.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{o.forEach((e=>{let[t,o,s]=e;this.syncChangeWithEngine(t,o,s)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(n),this.validateDependentCells(n,s)}onAfterSetSourceDataAtCell(e,t){if(S(t))return;const o=[],s=[];e.forEach((e=>{let[t,n,,r]=e;const i=this.hot.propToCol(n);if(!(0,d.isNumeric)(i))return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(l)?(s.push({address:l}),o.push(...this.engine.setCellContents(l,r))):(0,h.warn)(`Not possible to set source cell data at ${JSON.stringify(l)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}onBeforeCreateRow(e,t){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,t]))return!1}onBeforeCreateCol(e,t){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,t]))return!1}onBeforeRemoveRow(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}onBeforeRemoveCol(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}onAfterCreateRow(e,t,o){if(S(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}onAfterCreateCol(e,t,o){if(S(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}onAfterRemoveRow(e,t,o,s){if(S(s))return;const n=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}onAfterRemoveCol(e,t,o,s){if(S(s))return;const n=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{n.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}onAfterDetachChild(e,t,o){var s;(0,r.default)(this,R,!0);const n=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());(0,r.default)(this,R,!1),n.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}onEngineValuesUpdated(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}onEngineNamedExpressionsAdded(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}onEngineNamedExpressionsRemoved(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}onEngineSheetAdded(e){this.hot.runHooks("afterSheetAdded",e)}onEngineSheetRenamed(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}onEngineSheetRemoved(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}}t.Formulas=_},83264:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11870);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},23657:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(42538)),r=s(o(48427)),i=o(18609);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:[]}),l(this,u,{writable:!0,value:[]}),l(this,g,{writable:!0,value:void 0}),l(this,f,{writable:!0,value:[]}),(0,r.default)(this,a,e),(0,r.default)(this,h,t),(0,r.default)(this,d,o)}setRemovedHfIndexes(e){return(0,r.default)(this,f,e.map((e=>{const t=(0,n.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,n.default)(this,f)}getRemovedHfIndexes(){return(0,n.default)(this,f)}getHfIndexFromVisualIndex(e){const t=(0,n.default)(this,h).getIndexesSequence(),o=(0,n.default)(this,h).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}s`;(0,n.default)(this,d).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&(0,n.default)(this,d).getEngine()[t]((0,n.default)(this,d).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&((0,r.default)(this,u,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,r.default)(this,g,this.getHfIndexFromVisualIndex(t)))}getMoveLine(e,t){const o=(0,n.default)(this,h).getNumberOfIndexes(),s=Array.from(Array(o).keys()).filter((t=>!1===e.includes(t)));var r;return 0===t?null!==(r=s[t])&&void 0!==r?r:0:s[t-1]+1}getInitiallyCalculatedMoves(e,t){let o=this.getMoveLine(e,t);const s=[];return e.forEach((e=>{const t={from:e,to:o};s.forEach((e=>{const o=e.from>e.to,s=e.to<=t.from;e.from>t.from&&s&&o&&(t.from+=1)})),t.from>=o&&(o+=1),s.push(t)})),s}adjustedCalculatedMoves(e){return e.forEach(((t,o)=>{e.slice(o+1).forEach((e=>{const o=e.from<e.to;e.from>t.from&&o&&(e.from-=1)}))})),e}calculateAndSyncMoves(e,t){if((0,n.default)(this,d).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=this.adjustedCalculatedMoves(this.getInitiallyCalculatedMoves((0,n.default)(this,u),(0,n.default)(this,g)));null===(0,n.default)(this,d).getSheetId()?(0,n.default)(this,d).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,i.toUpperCaseFirst)((0,n.default)(this,a))}Order`;return t=>{if((0,n.default)(this,d).isPerformingUndoRedo())return;const o=(0,n.default)(this,h).getIndexesSequence();if("update"===t){const t=(0,n.default)(this,c).map((e=>o.indexOf(e))),s=(0,n.default)(this,d).getEngine().getSheetDimensions((0,n.default)(this,d).getSheetId());let r;r="row"===(0,n.default)(this,a)?s.height:s.width;for(let e=t.length;e<r;e+=1)t.push(e);(0,n.default)(this,d).getEngine()[e]((0,n.default)(this,d).getSheetId(),t)}(0,r.default)(this,c,o)}}init(){(0,r.default)(this,c,(0,n.default)(this,h).getIndexesSequence())}};t.default=p},9424:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=s(o(23657));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var a=new WeakMap,h=new WeakMap,d=new WeakMap,c=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap;var p=class{constructor(e,t,o){l(this,a,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:!1}),l(this,u,{writable:!0,value:!1}),l(this,g,{writable:!0,value:null}),l(this,f,{writable:!0,value:null}),(0,r.default)(this,a,new i.default("row",e,this)),(0,r.default)(this,h,new i.default("column",t,this)),(0,r.default)(this,d,o)}getForAxis(e){return"row"===e?(0,n.default)(this,a):(0,n.default)(this,h)}setPerformUndo(e){(0,r.default)(this,c,e)}setPerformRedo(e){(0,r.default)(this,u,e)}isPerformingUndoRedo(){return(0,n.default)(this,c)||(0,n.default)(this,u)}getSheetId(){return(0,n.default)(this,f)}getEngine(){return(0,n.default)(this,g)}getPostponeAction(){return(0,n.default)(this,d)}setupSyncEndpoint(e,t){(0,r.default)(this,g,e),(0,r.default)(this,f,t),(0,n.default)(this,a).init(),(0,n.default)(this,h).init()}};t.default=p},54484:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const o=new Date(Date.UTC(0,0,e+-1));return(0,n.default)(o).format(t)},t.getDateInHfFormat=function(e,t){return(0,n.default)(e,t,!0).format(r)},t.getDateInHotFormat=function(e,t){return(0,n.default)(e,r,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,n.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=i,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return i(e)?e.substr(1):e};var n=s(o(33034));const r="DD/MM/YYYY";function i(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},81870:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.col,o.col),0),n=Math.max(t.col,o.col),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideColumns(r);const i=r[r.length-1],l=this.columnIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectColumns(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(95988);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},89917:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],r=t[t.length-1];n=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countCols()||this.selectColumns(n,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),r=n.getTopStartCorner().col,i=n.getBottomEndCorner().col,l=this.columnIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countCols()));else{const e=this.countCols()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(95988);var s=o(50095),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},80923:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(42538)),r=s(o(48427)),i=o(36026),l=o(83302),a=o(68145),h=o(50095),d=o(22232),c=o(93315),u=o(11428),g=s(o(56307)),f=s(o(81870)),p=s(o(89917)),m=o(33165);function C(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}o(52097),g.default.getSingleton().register("beforeHideColumns"),g.default.getSingleton().register("afterHideColumns"),g.default.getSingleton().register("beforeUnhideColumns"),g.default.getSingleton().register("afterUnhideColumns");const w="hiddenColumns";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=310;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 310}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("afterGetColHeader",(function(){return e.onAfterGetColHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,s,o&&i,o&&s.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,n.default)(this,v).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,s,o,o&&s.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideColumns(t)}getHiddenColumns(){return(0,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,n.default)(this,v).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}onModifyColWidth(e,t){return this.isHidden(t)?0:(0,n.default)(this,y).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).copyPasteEnabled&&this.isHidden(t)&&(o.skipColumnOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.rangeEach)(e.startCol,e.endCol,(n=>{this.isHidden(n)?(t||o(e.startRow,e.endRow,s,n-1),t=!0):(t&&(s=n),n===e.endCol&&o(e.startRow,e.endRow,s,n),t=!1)}))})),t}onAfterGetColHeader(e,t){if(!(0,n.default)(this,y).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&o.push("beforeHiddenColumn"),(0,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).columns)&&this.hideColumns((0,n.default)(this,y).columns)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenColumns=E},16083:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80923);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},71294:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.row,o.row),0),n=Math.max(t.row,o.row),r=[];for(let e=s;e<=n;e+=1)r.push(e);e.hideRows(r);const i=r[r.length-1],l=this.rowIndexMapper.getNearestNotHiddenIndex(i,1,!0);Number.isInteger(l)&&l>=0?this.selectRows(l):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(95988);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},70029:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var o,s;if(0===t.length)return;let n=t[0],r=t[t.length-1];n=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1))&&void 0!==o?o:0,r=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);r-n+1===this.countRows()||this.selectRows(n,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const n=this.getSelectedRangeLast(),r=n.getTopStartCorner().row,i=n.getBottomEndCorner().row,l=this.rowIndexMapper,a=l.getRenderableFromVisualIndex(r),h=l.getRenderableFromVisualIndex(i),d=l.getNotTrimmedIndexes(),c=[];if(r!==i){if(i-r+1>h-a+1){const e=d.slice(r,i+1);c.push(...e.filter((e=>o.includes(e))))}}else if(0===a&&a<r)c.push(...d.slice(0,r));else if(null===a)c.push(...d.slice(0,this.countRows()));else{const e=this.countRows()-1;h===l.getRenderableFromVisualIndex(l.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...d.slice(i+1))}return(0,s.arrayEach)(c,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(95988);var s=o(50095),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},48894:(e,t,o)=>{"use strict";o(60740);var s=o(73203);t.__esModule=!0,o(95988);var n=s(o(42538)),r=s(o(48427)),i=o(36026),l=o(83302),a=o(68145),h=o(50095),d=o(22232),c=o(93315),u=o(11428),g=s(o(56307)),f=s(o(71294)),p=s(o(70029)),m=o(33165);function C(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}o(25972),g.default.getSingleton().register("beforeHideRows"),g.default.getSingleton().register("afterHideRows"),g.default.getSingleton().register("beforeUnhideRows"),g.default.getSingleton().register("afterUnhideRows");const w="hiddenRows";t.PLUGIN_KEY=w;t.PLUGIN_PRIORITY=320;var y=new WeakMap,v=new WeakMap;class E extends i.BasePlugin{constructor(){super(...arguments),C(this,y,{writable:!0,value:{}}),C(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return 320}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];(0,d.isObject)(t)&&((0,r.default)(this,y,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,v,new m.HidingMap),(0,n.default)(this,v).addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,n.default)(this,v)),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetCellMeta",((e,t,o)=>this.onAfterGetCellMeta(e,t,o))),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.addHook("afterGetRowHeader",(function(){return e.onAfterGetRowHeader(...arguments)})),this.addHook("modifyCopyableRange",(e=>this.onModifyCopyableRange(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,y,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const r=(0,n.default)(this,v).getValues().slice(),i=e.length>0;if(o&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&i)&&(o&&i&&(0,n.default)(this,v).setValues(r),this.hot.runHooks("afterUnhideRows",t,s,o&&i,o&&s.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,n.default)(this,v).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,s,o,o&&s.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideRows(t)}getHiddenRows(){return(0,h.arrayMap)((0,n.default)(this,v).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,n.default)(this,v).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}onModifyRowHeight(e,t){return this.isHidden(t)?0:e}onAfterGetCellMeta(e,t,o){if(!1===(0,n.default)(this,y).copyPasteEnabled&&this.isHidden(e)&&(o.skipRowOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}onModifyCopyableRange(e){if((0,n.default)(this,y).copyPasteEnabled)return e;const t=[],o=(e,o,s,n)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:n})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,a.rangeEach)(e.startRow,e.endRow,(n=>{this.isHidden(n)?(t||o(s,n-1,e.startCol,e.endCol),t=!0):(t&&(s=n),n===e.endRow&&o(s,n,e.startCol,e.endCol),t=!1)}))})),t}onAfterGetRowHeader(e,t){if(!(0,n.default)(this,y).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&o.push("beforeHiddenRow"),(0,l.addClass)(t,o)}onAfterContextMenuDefaultOptions(e){e.items.push({name:u.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}onMapInit(){Array.isArray((0,n.default)(this,y).rows)&&this.hideRows((0,n.default)(this,y).rows)}destroy(){(0,r.default)(this,y,null),(0,r.default)(this,v,null),super.destroy()}}t.HiddenRows=E},51124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48894);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},40106:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,k.registerPlugin)(s.AutoColumnSize),(0,k.registerPlugin)(n.Autofill),(0,k.registerPlugin)(r.AutoRowSize),(0,k.registerPlugin)(l.BindRowsWithHeaders),(0,k.registerPlugin)(a.CollapsibleColumns),(0,k.registerPlugin)(h.ColumnSorting),(0,k.registerPlugin)(d.ColumnSummary),(0,k.registerPlugin)(c.Comments),(0,k.registerPlugin)(u.ContextMenu),(0,k.registerPlugin)(g.CopyPaste),(0,k.registerPlugin)(f.CustomBorders),(0,k.registerPlugin)(p.DragToScroll),(0,k.registerPlugin)(m.DropdownMenu),(0,k.registerPlugin)(C.ExportFile),(0,k.registerPlugin)(w.Filters),(0,k.registerPlugin)(y.Formulas),(0,k.registerPlugin)(v.HiddenColumns),(0,k.registerPlugin)(E.HiddenRows),(0,k.registerPlugin)(S.ManualColumnFreeze),(0,k.registerPlugin)(R.ManualColumnMove),(0,k.registerPlugin)(b.ManualColumnResize),(0,k.registerPlugin)(T.ManualRowMove),(0,k.registerPlugin)(_.ManualRowResize),(0,k.registerPlugin)(O.MergeCells),(0,k.registerPlugin)(M.MultiColumnSorting),(0,k.registerPlugin)(I.MultipleSelectionHandles),(0,k.registerPlugin)(N.NestedHeaders),(0,k.registerPlugin)(A.NestedRows),(0,k.registerPlugin)(P.PersistentState),(0,k.registerPlugin)(x.Search),(0,k.registerPlugin)(D.TouchScroll),(0,k.registerPlugin)(H.TrimRows),(0,k.registerPlugin)(L.UndoRedo)};var s=o(21215);t.AutoColumnSize=s.AutoColumnSize;var n=o(62080);t.Autofill=n.Autofill;var r=o(60687);t.AutoRowSize=r.AutoRowSize;var i=o(36026);t.BasePlugin=i.BasePlugin;var l=o(85939);t.BindRowsWithHeaders=l.BindRowsWithHeaders;var a=o(55994);t.CollapsibleColumns=a.CollapsibleColumns;var h=o(1902);t.ColumnSorting=h.ColumnSorting;var d=o(68918);t.ColumnSummary=d.ColumnSummary;var c=o(76076);t.Comments=c.Comments;var u=o(86738);t.ContextMenu=u.ContextMenu;var g=o(77708);t.CopyPaste=g.CopyPaste;var f=o(3455);t.CustomBorders=f.CustomBorders;var p=o(72919);t.DragToScroll=p.DragToScroll;var m=o(74123);t.DropdownMenu=m.DropdownMenu;var C=o(83281);t.ExportFile=C.ExportFile;var w=o(30905);t.Filters=w.Filters;var y=o(83264);t.Formulas=y.Formulas;var v=o(16083);t.HiddenColumns=v.HiddenColumns;var E=o(51124);t.HiddenRows=E.HiddenRows;var S=o(58125);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=o(19640);t.ManualColumnMove=R.ManualColumnMove;var b=o(35350);t.ManualColumnResize=b.ManualColumnResize;var T=o(60734);t.ManualRowMove=T.ManualRowMove;var _=o(15702);t.ManualRowResize=_.ManualRowResize;var O=o(95896);t.MergeCells=O.MergeCells;var M=o(13620);t.MultiColumnSorting=M.MultiColumnSorting;var I=o(98481);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var N=o(37499);t.NestedHeaders=N.NestedHeaders;var A=o(93363);t.NestedRows=A.NestedRows;var P=o(94870);t.PersistentState=P.PersistentState;var x=o(27885);t.Search=x.Search;var D=o(30450);t.TouchScroll=D.TouchScroll;var H=o(95128);t.TrimRows=H.TrimRows;var L=o(77137);t.UndoRedo=L.UndoRedo;var k=o(52036);t.registerPlugin=k.registerPlugin,t.getPlugin=k.getPlugin,t.getPluginsNames=k.getPluginsNames},64618:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.freezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},76969:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.unfreezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},58125:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(75017);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},75017:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=s(o(56307)),i=s(o(64618)),l=s(o(76969));o(18633),r.default.getSingleton().register("beforeColumnFreeze"),r.default.getSingleton().register("afterColumnFreeze"),r.default.getSingleton().register("beforeColumnUnfreeze"),r.default.getSingleton().register("afterColumnUnfreeze");const a="manualColumnFreeze";t.PLUGIN_KEY=a;t.PLUGIN_PRIORITY=110;const h=new WeakMap;class d extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return 110}constructor(e){super(e),h.set(this,{afterFirstUse:!1})}isEnabled(){return!!this.hot.getSettings()[a]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>this.addContextMenuEntry(e))),this.addHook("beforeColumnMove",((e,t)=>this.onBeforeColumnMove(e,t))),super.enablePlugin())}disablePlugin(){h.get(this).afterFirstUse=!1,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart<this.hot.countCols()&&e>o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,s)&&(s&&(this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart),o._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,s))}unfreezeColumn(e){const t=h.get(this),o=this.hot.getSettings(),s=o.fixedColumnsStart>0&&e<=o.fixedColumnsStart-1;t.afterFirstUse||(t.afterFirstUse=!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,s)&&(s&&(o._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,o.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,s))}addContextMenuEntry(e){e.items.push({name:"---------"},(0,i.default)(this),(0,l.default)(this))}onBeforeColumnMove(e,t){if(h.get(this).afterFirstUse){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}}t.ManualColumnFreeze=d},19640:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47507);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},47507:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=s(o(56307)),i=o(50095),l=o(83302),a=o(68145),h=s(o(75244)),d=s(o(53277)),c=s(o(4588));o(36881),r.default.getSingleton().register("beforeColumnMove"),r.default.getSingleton().register("afterColumnMove");const u="manualColumnMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=120;const g=new WeakMap,f="ht__manualColumnMove",p="show-ui",m="on-moving--columns",C="after-selection--columns";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 120}constructor(e){super(e),g.set(this,{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollVertically",(()=>this.onAfterScrollVertically())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeColumnMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=n&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,s,n,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let s=0;for(let n=e;n<=t;n+=1){const e=o.getRenderableFromVisualIndex(n);n<0?s+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[u];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const o=[];return(0,a.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=g.get(this),t=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(e.hoveredColumn)&&t>0&&this.hot.scrollViewportTo(void 0,this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1));const o=this.hot.view._wt.wtTable,s=this.hot.view._wt.wtOverlays.scrollableElement,n="number"==typeof s.scrollX?s.scrollX:s.scrollLeft;let r=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.hoveredColumn-1);const i=o.hider.offsetWidth,a=o.TBODY.offsetLeft,h=this.backlight.getOffset().start,d=this.backlight.getSize().width;let c=0,u=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,o=(0,l.outerWidth)(this.hot.rootElement),r=t.innerWidth-e.rootElementOffset-o;u=t.innerWidth-e.target.eventPageX-r-(void 0===s.scrollX?n:0)}else u=e.target.eventPageX-(e.rootElementOffset-(void 0===s.scrollX?n:0));if(e.hasRowHeaders&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(e.hoveredColumn)&&(r+=n),r+=c,e.hoveredColumn<0)e.fixedColumnsStart>0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+r<=u){const t=e.hoveredColumn>=e.countCols?e.countCols-1:e.hoveredColumn;e.target.col=t+1,r+=e.target.TD.offsetWidth}else e.target.col=e.hoveredColumn;let f=u,p=r;u+d+h>=i?f=i-d-h:u+h<a+c&&(f=a+c+Math.abs(h)),r>=i-1?p=i-1:0===p?p=1:void 0!==s.scrollX&&e.hoveredColumn<e.fixedColumnsStart&&(p-=e.rootElementOffset<=s.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,f),this.guideline.setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const n=this.hot.view._wt.wtTable,r=this.hot.selection.isSelectedByColumnHeader(),i=this.hot.getSelectedRangeLast(),a=g.get(this),h=(0,l.hasClass)(e.target,"sortAction");if(!i||!r||a.pressed||0!==e.button||h)return a.pressed=!1,a.columnsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=i,w=Math.min(u.col,f.col),y=Math.max(u.col,f.col);if(t.row<0&&t.col>=w&&t.col<=y){s.column=!0,a.pressed=!0,a.target.eventPageX=e.pageX,a.target.eventOffsetX=e.offsetX,a.hoveredColumn=t.col,a.target.TD=o,a.target.col=t.col,a.columnsToMove=this.prepareColumnsToMoving(w,y),a.hasRowHeaders=!!this.hot.getSettings().rowHeaders,a.countCols=this.hot.countCols(),a.fixedColumnsStart=this.hot.getSettings().fixedColumnsStart,a.rootElementOffset=(0,l.offset)(this.hot.rootElement).left;const r=a.hasRowHeaders?-1:0,i=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,h=t.col<a.fixedColumnsStart,d=Math.abs(this.hot.view._wt.wtOverlays.inlineStartOverlay.getScrollPosition()),c=Math.abs(e.offsetX-(this.hot.isRtl()?e.target.offsetWidth:0)),u=this.getColumnsWidth(w,t.col-1)+c,g=this.getColumnsWidth(r,w-1)+(h?d:0)+u;this.backlight.setPosition(i,g),this.backlight.setSize(this.getColumnsWidth(w,y),n.hider.offsetHeight-i),this.backlight.setOffset(null,-u),(0,l.addClass)(this.hot.rootElement,m)}else(0,l.removeClass)(this.hot.rootElement,C),a.pressed=!1,a.columnsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout((function(){this.backlight.setPosition(e)}))}t.target.eventPageX=e.pageX,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.columnsToMove.indexOf(t.col)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.hoveredColumn=t.col,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.col,o=e.columnsToMove.length;if(e.hoveredColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByColumnHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.columnsToMove[0],n=this.hot.toPhysicalColumn(s),r=this.dragColumns(e.columnsToMove,t);if(e.columnsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(n),t=e+o-1;this.hot.selectColumns(e,t)}}onAfterScrollVertically(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualColumnMove=w},50715:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(68145),n=o(18609);const r="px";var i=class{constructor(e){this.hot=e,this._element=null,this.state=0,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,s.isNumeric)(e)&&(this._element.style.top=e+r),(0,s.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+r)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,s.isNumeric)(e)&&(this._element.style.width=e+r),(0,s.isNumeric)(t)&&(this._element.style.height=t+r)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,s.isNumeric)(e)&&(this._element.style.marginTop=e+r),(0,s.isNumeric)(t)&&(this._element.style[`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`]=t+r)}getOffset(){const e=this._element.style,t=`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}};t.default=i},53277:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(50715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--backlight")}}var l=i;t.default=l},4588:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(50715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--guideline")}}var l=i;t.default=l},35350:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35426);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},35426:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=o(83302),i=s(o(75244)),l=o(50095),a=o(68145),h=o(33165);const d="manualColumnResize";t.PLUGIN_KEY=d;t.PLUGIN_PRIORITY=130;const c="manualColumnWidths",u=new WeakMap;class g extends n.BasePlugin{static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return 130}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentCol=null,this.selectedCols=[],this.currentWidth=null,this.newSize=null,this.startY=null,this.startWidth=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.columnWidthsMap=void 0,u.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualColumnResizer"),(0,r.addClass)(this.guide,"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[d]}enablePlugin(){this.enabled||(this.columnWidthsMap=new h.PhysicalIndexToValueMap,this.columnWidthsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.columnIndexMapper.registerMap(this.pluginName,this.columnWidthsMap),this.addHook("modifyColWidth",((e,t)=>this.onModifyColWidth(e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>this.onBeforeStretchingColumnWidth(e,t))),this.addHook("beforeColumnResize",((e,t,o)=>this.onBeforeColumnResize(e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){u.get(this).config=this.columnWidthsMap.getValues(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",c,this.columnWidthsMap.getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",c,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return this.columnWidthsMap.setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(t,null)}onMapInit(){const e=u.get(this),t=this.hot.getSettings()[d],o=this.loadManualColumnWidths();void 0!==o?this.hot.batchExecution((()=>{o.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0):Array.isArray(t)?(this.hot.batchExecution((()=>{t.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0),e.config=t):!0===t&&Array.isArray(e.config)&&this.hot.batchExecution((()=>{e.config.forEach(((e,t)=>{this.columnWidthsMap.setValueAtIndex(t,e)}))}),!0)}setupHandlePosition(e){if(!e.parentNode)return;this.currentTH=e;const{_wt:t}=this.hot.view,o=t.wtTable.getCoords(this.currentTH),s=o.col;if(s<0)return;const n=(0,r.outerHeight)(this.currentTH),i=this.currentTH.getBoundingClientRect();let h;s<t.getSetting("fixedColumnsStart")&&(h=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col)),h||(h=t.wtOverlays.topOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col)),this.currentCol=this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.selectedCols=[];const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,a.rangeEach)(t,o,(e=>{this.selectedCols.includes(e)||this.selectedCols.push(e)}))}))}this.selectedCols.includes(this.currentCol)||(this.selectedCols=[this.currentCol]),this.startOffset=h.start-6,this.startWidth=parseInt(i.width,10),this.handle.style.top=`${h.top}px`,this.handle.style[this.inlineDir]=`${this.startOffset+this.startWidth}px`,this.handle.style.height=`${n}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style[this.inlineDir]=`${this.startOffset+this.currentWidth}px`}setupGuidePosition(){const e=parseInt((0,r.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=`${t}px`,this.refreshGuidePosition(),this.guide.style.height=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style[this.inlineDir]=this.handle.style[this.inlineDir]}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfColumnHeader(e){return!!(0,r.closest)(e,["THEAD"],this.hot.rootElement)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||this.pressed||this.setupHandlePosition(t)}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",this.newSize,t,!0);void 0!==s&&(this.newSize=s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,this.newSize),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!0),o&&e()};if(this.dblclick>=2){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=e.pageX,this.newSize=this.startWidth)}onMouseMove(e){if(this.pressed){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();this.currentWidth=this.startWidth+t,(0,l.arrayEach)(this.selectedCols,(e=>{this.newSize=this.setManualSize(e,this.currentWidth)})),this.refreshHandlePosition(),this.refreshGuidePosition()}}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",this.newSize,t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.newSize,t,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth){this.selectedCols.length>1?((0,l.arrayEach)(this.selectedCols,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedCols,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(t,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyColWidth(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=this.columnWidthsMap.getValueAtIndex(e);this.hot.getSettings()[d]&&s&&(o=s)}return o}onBeforeStretchingColumnWidth(e,t){let o=this.columnWidthsMap.getValueAtIndex(t);return null===o&&(o=e),o}onBeforeColumnResize(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}destroy(){super.destroy()}}t.ManualColumnResize=g},60734:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52030);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},52030:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=s(o(56307)),i=o(50095),l=o(83302),a=o(68145),h=s(o(75244)),d=s(o(81005)),c=s(o(67648));o(83988),r.default.getSingleton().register("beforeRowMove"),r.default.getSingleton().register("afterRowMove");const u="manualRowMove";t.PLUGIN_KEY=u;t.PLUGIN_PRIORITY=140;const g=new WeakMap,f="ht__manualRowMove",p="show-ui",m="on-moving--rows",C="after-selection--rows";class w extends n.BasePlugin{static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return 140}constructor(e){super(e),g.set(this,{rowsToMove:[],pressed:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0},cachedDropIndex:void 0}),this.eventManager=new h.default(this),this.backlight=new d.default(e),this.guideline=new c.default(e)}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeOnCellMouseOver",(function(){return e.onBeforeOnCellMouseOver(...arguments)})),this.addHook("afterScrollHorizontally",(()=>this.onAfterScrollHorizontally())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.buildPluginUI(),this.registerEvents(),(0,l.addClass)(this.hot.rootElement,f),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,l.removeClass)(this.hot.rootElement,f),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=g.get(this),s=o.cachedDropIndex,n=this.isMovePossible(e,t),r=this.hot.runHooks("beforeRowMove",e,t,s,n);if(o.cachedDropIndex=void 0,!1===r)return;n&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=n&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,s,n,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return g.get(this).cachedDropIndex=t,this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,n=t<0,r=e.some((e=>e<0)),i=e.some((e=>e>=o));return!(s||n||r||i)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,i.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let s=0;for(let n=e;n<=t;n++){const e=o.getRenderableFromVisualIndex(n);null!==e&&(s+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[u];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:o,to:s}=e,n=Math.min(o.row,s.row),r=Math.max(o.row,s.row);return(0,a.rangeEach)(n,r,(e=>{t.push(e)})),t}refreshPositions(){const e=g.get(this),t=e.target.coords,o=this.hot.view.getFirstFullyVisibleRow(),s=this.hot.view.getLastFullyVisibleRow(),n=this.hot.countRows();this.isFixedRowTop(t.row)&&o>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1)),this.isFixedRowBottom(t.row)&&s<n&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(s+1,1),void 0,!0);const r=this.hot.view._wt.wtTable,i=e.target.TD,a=this.hot.rootElement,h=(0,l.offset)(a),d=(0,l.getTrimmingContainer)(a),c=r.holder.scrollTop;let u;u=this.hot.rootWindow===d?d.scrollY:d.scrollTop;const f=h.top-u,p=e.target.eventPageY-f+c,m=r.hider.offsetHeight,C=r.TBODY.offsetTop,w=this.backlight.getOffset().top,y=this.backlight.getSize().height,v=i.offsetHeight/2,E=i.offsetHeight;let S=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const R=p>=S+v;this.isFixedRowTop(t.row)&&(S+=r.holder.scrollTop),t.row<0?e.target.row=o>0?o-1:o:R?(e.target.row=t.row+1,S+=0===t.row?E-1:E):e.target.row=t.row;let b=p,T=S;p+y+w>=m?b=m-y-w:p+w<C&&(b=C+Math.abs(w)),S>=m-1&&(T=m-1),this.backlight.setPosition(b),this.guideline.setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()))}unregisterEvents(){this.eventManager.clear()}onBeforeOnCellMouseDown(e,t,o,s){const{wtTable:n,wtViewport:r}=this.hot.view._wt,i=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeLast(),h=g.get(this);if(!a||!i||h.pressed||0!==e.button)return h.pressed=!1,h.rowsToMove.length=0,void(0,l.removeClass)(this.hot.rootElement,[m,p]);const d=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();d&&c&&(this.guideline.appendTo(n.hider),this.backlight.appendTo(n.hider));const{from:u,to:f}=a,w=Math.min(u.row,f.row),y=Math.max(u.row,f.row);if(t.col<0&&t.row>=w&&t.row<=y){s.row=!0,h.pressed=!0,h.target.eventPageY=e.pageY,h.target.coords=t,h.target.TD=o,h.rowsToMove=this.prepareRowsToMoving();const i=n.holder.scrollLeft+r.getRowHeaderWidth();this.backlight.setPosition(null,i),this.backlight.setSize(n.hider.offsetWidth-i,this.getRowsHeight(w,y)),this.backlight.setOffset(-1*(this.getRowsHeight(w,t.row-1)+e.offsetY),null),(0,l.addClass)(this.hot.rootElement,m),this.refreshPositions()}else(0,l.removeClass)(this.hot.rootElement,C),h.pressed=!1,h.rowsToMove.length=0}onMouseMove(e){const t=g.get(this);if(t.pressed){if(e.target===this.backlight.element){const e=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout((function(){this.backlight.setPosition(null,e)}))}t.target.eventPageY=e.pageY,this.refreshPositions()}}onBeforeOnCellMouseOver(e,t,o,s){const n=this.hot.getSelectedRangeLast(),r=g.get(this);n&&r.pressed&&(r.rowsToMove.indexOf(t.row)>-1?(0,l.removeClass)(this.hot.rootElement,p):(0,l.addClass)(this.hot.rootElement,p),s.row=!0,s.column=!0,s.cell=!0,r.target.coords=t,r.target.TD=o)}onMouseUp(){const e=g.get(this),t=e.target.row,o=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,l.removeClass)(this.hot.rootElement,[m,p,C]),this.hot.selection.isSelectedByRowHeader()&&(0,l.addClass)(this.hot.rootElement,C),o<1||void 0===t)return;const s=e.rowsToMove[0],n=this.hot.toPhysicalRow(s),r=this.dragRows(e.rowsToMove,t);if(e.rowsToMove.length=0,!0===r){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(n),t=e+o-1;this.hot.selectRows(e,t)}}onAfterScrollHorizontally(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}buildPluginUI(){this.backlight.build(),this.guideline.build()}onAfterLoadData(){this.moveBySettingsOrLoad()}destroy(){this.backlight.destroy(),this.guideline.destroy(),super.destroy()}}t.ManualRowMove=w},32715:(e,t)=>{"use strict";t.__esModule=!0;const o="px";var s=class{constructor(e){this.hot=e,this._element=null,this.state=0}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+o),void 0!==t&&(this._element.style.left=t+o)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+o),t&&(this._element.style.height=t+o)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+o),t&&(this._element.style.marginLeft=t+o)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}};t.default=s},81005:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(32715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--backlight")}}var l=i;t.default=l},67648:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(32715)),r=o(83302);class i extends n.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--guideline")}}var l=i;t.default=l},15702:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13524);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},13524:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(95988);var n=o(36026),r=o(83302),i=s(o(75244)),l=o(50095),a=o(68145),h=o(33165),d=o(21280);const c="manualRowResize";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=30;const u="manualRowHeights",g=new WeakMap;class f extends n.BasePlugin{static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 30}constructor(e){super(e);const{rootDocument:t}=this.hot;this.currentTH=null,this.currentRow=null,this.selectedRows=[],this.currentHeight=null,this.newSize=null,this.startY=null,this.startHeight=null,this.startOffset=null,this.handle=t.createElement("DIV"),this.guide=t.createElement("DIV"),this.eventManager=new i.default(this),this.pressed=null,this.isTriggeredByRMB=!1,this.dblclick=0,this.autoresizeTimeout=null,this.rowHeightsMap=void 0,g.set(this,{config:void 0}),(0,r.addClass)(this.handle,"manualRowResizer"),(0,r.addClass)(this.guide,"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){this.enabled||(this.rowHeightsMap=new h.PhysicalIndexToValueMap,this.rowHeightsMap.addLocalHook("init",(()=>this.onMapInit())),this.hot.rowIndexMapper.registerMap(this.pluginName,this.rowHeightsMap),this.addHook("modifyRowHeight",((e,t)=>this.onModifyRowHeight(e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){g.get(this).config=this.rowHeightsMap.getValues(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",u,this.rowHeightsMap.getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",u,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,d.ViewportRowsCalculator.DEFAULT_HEIGHT);return this.rowHeightsMap.setValueAtIndex(o,s),s}setupHandlePosition(e){this.currentTH=e;const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords(this.currentTH),n=s.row;if(n<0)return;const i=(0,r.outerWidth)(this.currentTH),h=this.currentTH.getBoundingClientRect(),d=n<o.getSetting("fixedRowsTop"),c=n>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let u;d?u=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col):c&&(u=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),u||(u=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(this.currentTH,s.row,s.col)),this.currentRow=this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.selectedRows=[];const g=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&g){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,a.rangeEach)(t,o,(e=>{this.selectedRows.includes(e)||this.selectedRows.push(e)}))}))}this.selectedRows.includes(this.currentRow)||(this.selectedRows=[this.currentRow]),this.startOffset=u.top-6,this.startHeight=parseInt(h.height,10),this.handle.style.top=`${this.startOffset+this.startHeight}px`,this.handle.style[this.inlineDir]=`${u.start}px`,this.handle.style.width=`${i}px`,this.hot.rootElement.appendChild(this.handle)}refreshHandlePosition(){this.handle.style.top=`${this.startOffset+this.currentHeight}px`}setupGuidePosition(){const e=parseInt((0,r.outerWidth)(this.handle),10),t=parseInt(this.handle.style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,r.addClass)(this.handle,"active"),(0,r.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style[this.inlineDir]=`${t}px`,this.guide.style.width=o-e+"px",this.hot.rootElement.appendChild(this.guide)}refreshGuidePosition(){this.guide.style.top=this.handle.style.top}hideHandleAndGuide(){(0,r.removeClass)(this.handle,"active"),(0,r.removeClass)(this.guide,"active")}checkIfRowHeader(e){var t;return(0,r.closest)(e,["TH"],this.hot.rootElement)&&"TBODY"===(null===(t=e.parentNode)||void 0===t||null===(t=t.parentNode)||void 0===t?void 0:t.tagName)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&this.newSize<t?t:this.newSize}onMouseOver(e){if(!(0,r.isDetached)(e.target)&&!0!==this.isTriggeredByRMB&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&(this.newSize=s),this.setManualSize(t,this.newSize),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if(this.dblclick>=2){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.dblclick=0,this.autoresizeTimeout=null}onMouseDown(e){(0,r.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((()=>this.afterMouseDownTimeout()),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=e.pageY,this.newSize=this.startHeight)}onMouseMove(e){this.pressed&&(this.currentHeight=this.startHeight+(e.pageY-this.startY),(0,l.arrayEach)(this.selectedRows,(e=>{this.newSize=this.setManualSize(e,this.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}onMouseUp(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight){this.selectedRows.length>1?((0,l.arrayEach)(this.selectedRows,(e=>{t(e)})),e()):(0,l.arrayEach)(this.selectedRows,(e=>{t(e,!0)}))}this.setupHandlePosition(this.currentTH)}}onContextMenu(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(this.handle),this.hot.rootElement.removeChild(this.guide),this.pressed=!1,this.isTriggeredByRMB=!0,this.hot._registerImmediate((()=>{this.isTriggeredByRMB=!1}))}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(e,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(t,"mousemove",(e=>this.onMouseMove(e))),this.eventManager.addEventListener(t,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(this.handle,"contextmenu",(()=>this.onContextMenu()))}onModifyRowHeight(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=this.rowHeightsMap.getValueAtIndex(e);this.hot.getSettings()[c]&&s&&(o=s)}return o}onMapInit(){const e=g.get(this),t=this.hot.getSettings()[c],o=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==o?o.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})):Array.isArray(t)?(t.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)})),e.config=t):!0===t&&Array.isArray(e.config)&&e.config.forEach(((e,t)=>{this.rowHeightsMap.setValueAtIndex(t,e)}))}),!0)}destroy(){super.destroy()}}t.ManualRowResize=f},86805:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22232),n=o(50095);var r=class{constructor(e){this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection,this.currentFillData=null}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let o=null;return o=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",o}snapDragArea(e,t,o,s){const n=t.slice(0),r=this.getAutofillSize(e,t,o),[i,l,a,h]=e,d=["up","down"].indexOf(o)>-1?a-i+1:h-l+1,c=r-Math.floor(r/d)*d,u=this.getFarthestCollection(e,t,o,s);if(u)if("down"===o){const e=u.row+u.rowspan-i-c;n[2]+e>=this.plugin.hot.countRows()?n[2]-=c:n[2]+=c?e:0}else if("right"===o){const e=u.col+u.colspan-l-c;n[3]+e>=this.plugin.hot.countCols()?n[3]-=c:n[3]+=c?e:0}else if("up"===o){const e=a-c-u.row+1;n[0]+e<0?n[0]+=c:n[0]-=c?e:0}else if("left"===o){const e=h-c-u.col+1;n[1]+e<0?n[1]+=c:n[1]-=c?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:s,fillSize:r,dragArea:n,cycleLength:d}),n}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,s.extend)(this.currentFillData,e)}getAutofillSize(e,t,o){const[s,n,r,i]=e,[l,a,h,d]=t;switch(o){case"up":return s-l;case"down":return h-r;case"left":return n-a;case"right":return d-i;default:return null}}getDragArea(e,t,o){const[s,n,r,i]=e,[l,a,h,d]=t;switch(o){case"up":return[l,a,s-1,i];case"down":return[r+1,n,h,i];case"left":return[l,a,r,n-1];case"right":return[s,i+1,h,d];default:return null}}getFarthestCollection(e,t,o,s){const[r,i,l,a]=e,h=["up","down"].indexOf(o)>-1,d=h?l:a,c=h?r:i,u=this.getAutofillSize(e,t,o),g=h?l-r+1:a-i+1,f=u-Math.floor(u/g)*g;let p=null,m=null,C=null;switch(o){case"up":p="includesVertically",C=d-f+1;break;case"left":p="includesHorizontally",C=d-f+1;break;case"down":p="includesVertically",C=c+f-1;break;case"right":p="includesHorizontally",C=c+f-1}return(0,n.arrayEach)(s,(e=>{e[p](C)&&e.isFarther(m,o)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,s=this.currentFillData.dragDirection,n=(e,o)=>{switch(s){case"up":return e.row-o>=t.from.row;case"down":return e.row+e.rowspan-1+o<=t.to.row;case"left":return e.col-o>=t.from.column;case"right":return e.col+e.colspan-1+o<=t.to.column;default:return null}};let r=0,i=null,l=1;do{for(let e=0;e<o.length;e+=1){if(i=o[e],r=l*this.currentFillData.cycleLength,n(i,r))switch(s){case"up":this.plugin.mergedCellsCollection.add({row:i.row-r,rowspan:i.rowspan,col:i.col,colspan:i.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:i.row+r,rowspan:i.rowspan,col:i.col,colspan:i.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:i.row,rowspan:i.rowspan,col:i.col-r,colspan:i.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:i.row,rowspan:i.rowspan,col:i.col+r,colspan:i.colspan})}e===o.length-1&&(l+=1)}}while(n(i,r));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return(0,n.arrayEach)(e,(e=>{const s=e[0],n=this.plugin.hot.propToCol(e[1]);(null===t.min||s<t.min)&&(t.min=s),(null===t.max||s>t.max)&&(t.max=s),(null===o.min||n<o.min)&&(o.min=n),(null===o.max||n>o.max)&&(o.max=n)})),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const s=this.getDragArea(e,t,o),[n,r,i,l]=s,a=this.plugin.hot._createCellCoords(n,r),h=this.plugin.hot._createCellCoords(i,l),d=this.plugin.hot._createCellRange(a,a,h);return!!this.mergedCellsCollection.getWithinRange(d,!0)}};t.default=r},21989:(e,t,o)=>{"use strict";t.__esModule=!0,o(95988);var s=class{constructor(e){this.plugin=e,this.hot=e.hot,this.fullySelectedMergedCellClassName="fullySelectedMergedCell"}snapDelta(e,t,o){const s=t.to,n=s.row+e.row,r=s.col+e.col;e.row?this.jumpOverMergedCell(e,o,n):e.col&&this.jumpOverMergedCell(e,o,r)}jumpOverMergedCell(e,t,o){let s=e.row||e.col,n=null,r=null,i=null;e.row?(n=t.includesVertically(o),r=t.row,i=t.getLastRow()):e.col&&(n=t.includesHorizontally(o),r=t.col,i=t.getLastColumn()),0!==s&&(s>0?n&&o!==r&&(s+=i-o+1):n&&o!==i&&(s-=o-r+1),e.row?e.row=s:e.col&&(e.col=s))}getUpdatedSelectionRange(e,t){return this.hot._createCellRange(e.highlight,e.from,this.hot._createCellCoords(e.to.row+t.row,e.to.col+t.col))}getSelectedMergedCellClassName(e,t,o,s){const n=Math.min(o[0],o[2]),r=Math.min(o[1],o[3]),i=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(void 0===s)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const a=this.plugin.mergedCellsCollection.get(e,t);if(!a)return;const h=a.getLastRow(),d=a.getLastColumn();return n<=a.row&&r<=a.col&&i>=h&&l>=d?`${this.fullySelectedMergedCellClassName}-${s}`:this.plugin.selectionCalculations.isMergeCellFullySelected(a,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+t,e.col+s));for(let e=0;e<o.length;e+=1){const s=[];for(let n=0;n<t.length;n+=1)s[n]=t[n].includes(o[e]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}};t.default=s},22951:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(28236);var n=class{constructor(e,t,o,s,n,r){this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.removed=!1,this.cellCoordsFactory=n,this.cellRangeFactory=r}static NEGATIVE_VALUES_WARNING(e){return s.toSingleLine`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
72
72
  rowspan: ${e.rowspan}, colspan: ${e.colspan}} contains negative values, which is\x20
73
73
  not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){return s.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] is positioned\x20
74
74
  (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){return s.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] has both "rowspan"\x20