handsontable.min.js 606 KB

1234567891011121314151617181920212223242526272829
  1. /*!
  2. * (The MIT License)
  3. *
  4. * Copyright (c) 2012-2014 Marcin Warpechowski
  5. * Copyright (c) 2015 Handsoncode sp. z o.o. <[email protected]>
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining
  8. * a copy of this software and associated documentation files (the
  9. * 'Software'), to deal in the Software without restriction, including
  10. * without limitation the rights to use, copy, modify, merge, publish,
  11. * distribute, sublicense, and/or sell copies of the Software, and to
  12. * permit persons to whom the Software is furnished to do so, subject to
  13. * the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be
  16. * included in all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  19. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  21. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  22. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  23. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  24. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. *
  26. * Version: 2.0.0
  27. * Release date: 11/04/2018 (built at 10/04/2018 11:41:59)
  28. */
  29. !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("numbro"),require("pikaday")):"function"==typeof define&&define.amd?define("Handsontable",["moment","numbro","pikaday"],t):"object"==typeof exports?exports.Handsontable=t(require("moment"),require("numbro"),require("pikaday")):e.Handsontable=t(e.moment,e.numbro,e.Pikaday)}("undefined"!=typeof self?self:this,function(e,t,n){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=206)}([function(e,t,n){"use strict";function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,o=null;null!=e;){if(n===t){o=e;break}e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e=e.host:(n++,e=e.parentNode)}return o}function r(e,t,n){for(;null!=e&&e!==n;){if(e.nodeType===Node.ELEMENT_NODE&&(t.indexOf(e.nodeName)>-1||t.indexOf(e)>-1))return e;e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode}return null}function i(e,t,n){for(var o=[];e&&(e=r(e,t,n))&&(!n||n.contains(e));)o.push(e),e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode;var i=o.length;return i?o[i-1]:null}function s(e,t){var n=e.parentNode,o=[];for("string"==typeof t?o=Array.prototype.slice.call(document.querySelectorAll(t),0):o.push(t);null!=n;){if(o.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function a(e){function t(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===o.toUpperCase()}var n,o="hot-table",r=!1;for(n=l(e);null!=n;){if(t(n)){r=!0;break}if(n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r=t(n.host))break;n=n.host}n=n.parentNode}return r}function l(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function u(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function c(e){var t=0;if(e.previousSibling)for(;e=e.previousSibling;)++t;return t}function h(e,t){var n=document.querySelector(".ht_clone_"+e);return n?n.contains(t):null}function f(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n++;return t}function d(e,t){return q(e,t)}function p(e,t){return J(e,t)}function g(e,t){return Q(e,t)}function v(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var n=e.childNodes,o=n.length-1;o>=0;o--)v(n[o],e)}function y(e){for(var t;t=e.lastChild;)e.removeChild(t)}function m(e,t){re.test(t)?e.innerHTML=t:w(e,t)}function w(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?ie?n.textContent=t:n.data=t:(y(e),e.appendChild(document.createTextNode(t)))}function C(e){for(var t=e;u(t)!==document.documentElement;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return C(t.host.impl);if(t.host)return C(t.host);throw Error("Lost in Web Components world")}return!1}if("none"===t.style.display)return!1;t=t.parentNode}return!0}function b(e){var t,n,o,r,i;if(r=document.documentElement,(0,Z.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return i=e.getBoundingClientRect(),{top:i.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:i.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)};for(t=e.offsetLeft,n=e.offsetTop,o=e;(e=e.offsetParent)&&e!==document.body;)t+=e.offsetLeft,n+=e.offsetTop,o=e;return o&&"fixed"===o.style.position&&(t+=window.pageXOffset||r.scrollLeft,n+=window.pageYOffset||r.scrollTop),{left:t,top:n}}function E(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function S(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function O(e){return e===window?E():e.scrollTop}function T(e){return e===window?S():e.scrollLeft}function _(e){for(var t,n,o,r=e.parentNode,i=["auto","scroll"],s="",a="",l="",u="";r&&r.style&&document.body!==r;){if(t=r.style.overflow,n=r.style.overflowX,o=r.style.overflowY,"scroll"==t||"scroll"==n||"scroll"==o)return r;if(window.getComputedStyle&&(s=window.getComputedStyle(r),a=s.getPropertyValue("overflow"),l=s.getPropertyValue("overflow-y"),u=s.getPropertyValue("overflow-x"),"scroll"===a||"scroll"===u||"scroll"===l))return r;if(r.scrollHeight+1>=r.clientHeight&&(-1!==i.indexOf(o)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(l)))return r;if(r.scrollWidth+1>=r.clientWidth&&(-1!==i.indexOf(n)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(u)))return r;r=r.parentNode}return window}function R(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var n=window.getComputedStyle(t);if("visible"!==n.getPropertyValue("overflow")&&""!==n.getPropertyValue("overflow"))return t}t=t.parentNode}return window}function k(e,t){if(e){if(e!==window){var n,o=e.style[t];return""!==o&&void 0!==o?o:(n=M(e),""!==n[t]&&void 0!==n[t]?n[t]:void 0)}if("width"===t)return window.innerWidth+"px";if("height"===t)return window.innerHeight+"px"}}function M(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function A(e){return e.offsetWidth}function N(e){return(0,Z.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function P(e){return e.clientHeight||e.innerHeight}function H(e){return e.clientWidth||e.innerWidth}function L(e,t,n){window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function D(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function x(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange(),o=n.duplicate();return n.moveToBookmark(t.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0}function I(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;return e.createTextRange().text.indexOf(t.text)+t.text.length}return 0}function j(){var e="";return window.getSelection?e=""+window.getSelection():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e}function B(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var o=e.parentNode,r=o.style.display;o.style.display="block",e.setSelectionRange(t,n),o.style.display=r}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}}function F(){var e=document.createElement("div");e.style.height="200px",e.style.width="100%";var t=document.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var o=e.offsetWidth;return n==o&&(o=t.clientWidth),(document.body||document.documentElement).removeChild(t),n-o}function W(){return void 0===oe&&(oe=F()),oe}function V(e){return e.offsetWidth!==e.clientWidth}function U(e){return e.offsetHeight!==e.clientHeight}function z(e,t,n){(0,$.isIE8)()||(0,$.isIE9)()?(e.style.top=n,e.style.left=t):(0,$.isSafari)()?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)"}function Y(e){var t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function G(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function K(e){var t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function X(e){return K(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")}t.__esModule=!0,t.HTML_CHARACTERS=void 0,t.getParent=o,t.closest=r,t.closestDown=i,t.isChildOf=s,t.isChildOfWebComponentTable=a,t.polymerWrap=l,t.polymerUnwrap=u,t.index=c,t.overlayContainsElement=h,t.hasClass=d,t.addClass=p,t.removeClass=g,t.removeTextNodes=v,t.empty=y,t.fastInnerHTML=m,t.fastInnerText=w,t.isVisible=C,t.offset=b,t.getWindowScrollTop=E,t.getWindowScrollLeft=S,t.getScrollTop=O,t.getScrollLeft=T,t.getScrollableElement=_,t.getTrimmingContainer=R,t.getStyle=k,t.getComputedStyle=M,t.outerWidth=A,t.outerHeight=N,t.innerHeight=P,t.innerWidth=H,t.addEvent=L,t.removeEvent=D,t.getCaretPosition=x,t.getSelectionEndPosition=I,t.getSelectionText=j,t.setCaretPosition=B,t.getScrollbarWidth=W,t.hasVerticalScrollbar=V,t.hasHorizontalScrollbar=U,t.setOverlayPosition=z,t.getCssTransform=Y,t.resetCssTransform=G,t.isInput=K,t.isOutsideInput=X;var q,J,Q,$=n(27),Z=n(40),ee=!!document.documentElement.classList;if(ee){var te=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();q=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},J=function(e,t){if("string"==typeof t&&(t=t.split(" ")),t=f(t),t.length>0)if(te)e.classList.add.apply(e.classList,t);else for(var n=0;t&&t[n];)e.classList.add(t[n]),n++},Q=function(e,t){if("string"==typeof t&&(t=t.split(" ")),t=f(t),t.length>0)if(te)e.classList.remove.apply(e.classList,t);else for(var n=0;t&&t[n];)e.classList.remove(t[n]),n++}}else{var ne=function(e){return RegExp("(\\s|^)"+e+"(\\s|$)")};q=function(e,t){return void 0!==e.className&&ne(t).test(e.className)},J=function(e,t){var n=0,o=e.className;if("string"==typeof t&&(t=t.split(" ")),""===o)o=t.join(" ");else for(;t&&t[n];)ne(t[n]).test(o)||(o+=" "+t[n]),n++;e.className=o},Q=function(e,t){var n=0,o=e.className;for("string"==typeof t&&(t=t.split(" "));t&&t[n];)o=o.replace(ne(t[n])," ").trim(),n++;e.className!==o&&(e.className=o)}}var oe,re=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,ie=!!document.createTextNode("test").textContent},function(e,t,n){"use strict";function o(e){for(var t=0,n=e.length;n>t;)e[t]=[e[t]],t++}function r(e,t){for(var n=0,o=t.length;o>n;)e.push(t[n]),n++}function i(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,o=e[0].length,r=0;n>r;r++)for(var i=0;o>i;i++)t[i]||(t[i]=[]),t[i][r]=e[r][i];return t}function s(e,t,n,o){var r=-1,i=e;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(o&&s&&(n=i[++r]);++r<s;)n=t(n,i[r],r,i);return n}function a(e,t){var n=-1,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length,i=[],s=-1;++n<r;){var a=o[n];t(a,n,o)&&(i[++s]=a)}return i}function l(e,t){var n=-1,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length,i=[],s=-1;++n<r;){var a=o[n];i[++s]=t(a,n,o)}return i}function u(e,t){var n=-1,o=e;Array.isArray(e)||(o=Array.from(e));for(var r=o.length;++n<r&&!1!==t(o[n],n,o););return e}function c(e){return s(e,function(e,t){return e+t},0)}function h(e){return s(e,function(e,t){return e>t?e:t},Array.isArray(e)?e[0]:void 0)}function f(e){return s(e,function(e,t){return t>e?e:t},Array.isArray(e)?e[0]:void 0)}function d(e){return e.length?c(e)/e.length:0}function p(e){return s(e,function(e,t){return e.concat(Array.isArray(t)?p(t):t)},[])}function g(e){var t=[];return u(e,function(e){-1===t.indexOf(e)&&t.push(e)}),t}t.__esModule=!0,t.to2dArray=o,t.extendArray=r,t.pivot=i,t.arrayReduce=s,t.arrayFilter=a,t.arrayMap=l,t.arrayEach=u,t.arraySum=c,t.arrayMax=h,t.arrayMin=f,t.arrayAvg=d,t.arrayFlatten=p,t.arrayUnique=g},function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){var t;return Array.isArray(e)?t=[]:(t={},p(e,function(e,n){"__children"!==n&&(t[n]=e&&"object"===(void 0===e?"undefined":w(e))&&!Array.isArray(e)?r(e):Array.isArray(e)?e.length&&"object"===w(e[0])&&!Array.isArray(e[0])?[r(e[0])]:[]:null)})),t}function i(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function s(e,t){return p(t,function(t,n){e[n]=t}),e}function a(e,t){p(t,function(n,o){t[o]&&"object"===w(t[o])?(e[o]||(e[o]=Array.isArray(t[o])?[]:"[object Date]"===Object.prototype.toString.call(t[o])?t[o]:{}),a(e[o],t[o])):e[o]=t[o]})}function l(e){return"object"===(void 0===e?"undefined":w(e))?JSON.parse(JSON.stringify(e)):e}function u(e){var t={};return p(e,function(e,n){t[n]=e}),t}function c(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return(0,C.arrayEach)(n,function(t){e.MIXINS.push(t.MIXIN_NAME),p(t,function(t,n){if(void 0!==e.prototype[n])throw Error("Mixin conflict. Property '"+n+"' already exist and cannot be overwritten.");if("function"==typeof t)e.prototype[n]=t;else{Object.defineProperty(e.prototype,n,{get:function(e,t){e="_"+e;var n=function(e){return(Array.isArray(e)||f(e))&&(e=l(e)),e};return function(){return void 0===this[e]&&(this[e]=n(t)),this[e]}}(n,t),set:function(e){return e="_"+e,function(t){this[e]=t}}(n),configurable:!0})}})}),e}function h(e,t){return JSON.stringify(e)===JSON.stringify(t)}function f(e){return"[object Object]"==Object.prototype.toString.call(e)}function d(e,t,n,o){o.value=n,o.writable=!1!==o.writable,o.enumerable=!1!==o.enumerable,o.configurable=!1!==o.configurable,Object.defineProperty(e,t,o)}function p(e,t){for(var n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}function g(e,t){var n=t.split("."),o=e;return p(n,function(e){if(void 0===(o=o[e]))return o=void 0,!1}),o}function v(e){if(!f(e))return 0;return function e(t){var n=0;return f(t)?p(t,function(t){n+=e(t)}):n++,n}(e)}function y(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r="_"+n,i=(t={_touched:!1},o(t,r,e),o(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(i,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),i}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.__esModule=!0;var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.duckSchema=r,t.inherit=i,t.extend=s,t.deepExtend=a,t.deepClone=l,t.clone=u,t.mixin=c,t.isObjectEqual=h,t.isObject=f,t.defineGetter=d,t.objectEach=p,t.getProperty=g,t.deepObjectSize=v,t.createObjectPropListener=y,t.hasOwnProperty=m;var C=n(1)},function(e,t,n){var o=n(14),r=n(44),i=n(31),s=n(30),a=n(32),l=function(e,t,n){var u,c,h,f,d=e&l.F,p=e&l.G,g=e&l.S,v=e&l.P,y=e&l.B,m=p?o:g?o[t]||(o[t]={}):(o[t]||{}).prototype,w=p?r:r[t]||(r[t]={}),C=w.prototype||(w.prototype={});p&&(n=t);for(u in n)c=!d&&m&&void 0!==m[u],h=(c?m:n)[u],f=y&&c?a(h,o):v&&"function"==typeof h?a(Function.call,h):h,m&&s(m,u,h,e&l.U),w[u]!=h&&i(w,u,f),v&&C[u]!=h&&(C[u]=h)};o.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Viewport=t.TableRenderer=t.Table=t.Settings=t.Selection=t.Scroll=t.Overlays=t.Event=t.Core=t.default=t.Border=t.TopLeftCornerOverlay=t.TopOverlay=t.LeftOverlay=t.DebugOverlay=t.RowFilter=t.ColumnFilter=t.CellRange=t.CellCoords=t.ViewportRowsCalculator=t.ViewportColumnsCalculator=void 0,n(96),n(111),n(112),n(116),n(117),n(119),n(122),n(123),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(141),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(85),n(156),n(157),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(167),n(168),n(169),n(172),n(173),n(174);var r=n(175),i=o(r),s=n(176),a=o(s),l=n(54),u=o(l),c=n(86),h=o(c),f=n(177),d=o(f),p=n(178),g=o(p),v=n(228),y=o(v),m=n(229),w=o(m),C=n(230),b=o(C),E=n(231),S=o(E),O=n(187),T=o(O),_=n(179),R=o(_),k=n(180),M=o(k),A=n(181),N=o(A),P=n(182),H=o(P),L=n(232),D=o(L),x=n(183),I=o(x),j=n(184),B=o(j),F=n(185),W=o(F),V=n(186),U=o(V);t.ViewportColumnsCalculator=i.default,t.ViewportRowsCalculator=a.default,t.CellCoords=u.default,t.CellRange=h.default,t.ColumnFilter=d.default,t.RowFilter=g.default,t.DebugOverlay=y.default,t.LeftOverlay=w.default,t.TopOverlay=b.default,t.TopLeftCornerOverlay=S.default,t.Border=T.default,t.default=R.default,t.Core=R.default,t.Event=M.default,t.Overlays=N.default,t.Scroll=H.default,t.Selection=D.default,t.Settings=I.default,t.Table=B.default,t.TableRenderer=W.default,t.Viewport=U.default},function(e,t,n){"use strict";function o(e){var t=void 0===e?"undefined":a(e);return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}function r(e,t,n){var o=-1;for("function"==typeof t?(n=t,t=e):o=e-1;++o<=t&&!1!==n(o););}function i(e,t,n){var o=e+1;for("function"==typeof t&&(n=t,t=0);--o>=t&&!1!==n(o););}function s(e,t){return t=parseInt((""+t).replace("%",""),10),t=parseInt(e*t/100,10)}t.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isNumeric=o,t.rangeEach=r,t.rangeEachReverse=i,t.valueAccordingPercent=s},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){var n=void 0,o=void 0,r=void 0,i=void 0,s=void 0,h=void 0;if(t.isTargetWebComponent=!1,t.realTarget=t.target,h=t.stopImmediatePropagation,t.stopImmediatePropagation=function(){h.apply(this),(0,c.stopImmediatePropagation)(this)},!f.isHotTableEnv)return t;for(t=(0,a.polymerWrap)(t),s=t.path?t.path.length:0;s--;){if("HOT-TABLE"===t.path[s].nodeName)n=!0;else if(n&&t.path[s].shadowRoot){i=t.path[s];break}0!==s||i||(i=t.path[s])}return i||(i=t.target),t.isTargetWebComponent=!0,(0,u.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,l.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,l.hasOwnProperty)(e,"hot")?o=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?o=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(o=e.wtTable.TABLE.parentNode.parentNode),r=(0,a.closest)(t.target,["HOT-TABLE"],o),t.realTarget=r?o.querySelector("HOT-TABLE")||t.target:t.target),Object.defineProperty(t,"target",{get:function(){return(0,a.polymerWrap)(i)},enumerable:!0,configurable:!0}),t}function i(){return h}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.getListenersCounter=i;var a=n(0),l=n(2),u=n(40),c=n(12),h=0,f=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return s(e,[{key:"addEventListener",value:function(e,t,n){function o(e){e=r(s,e),n.call(this,e)}var i=this,s=this.context;return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:o}),window.addEventListener?e.addEventListener(t,o,!1):e.attachEvent("on"+t,o),h++,function(){i.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var o=this.context.eventListeners.length,r=void 0;o--;)if(r=this.context.eventListeners[o],r.event==t&&r.element==e){if(n&&n!=r.callback)continue;this.context.eventListeners.splice(o,1),r.element.removeEventListener?r.element.removeEventListener(r.event,r.callbackProxy,!1):r.element.detachEvent("on"+r.event,r.callbackProxy),h--}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e--;){var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n,o={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};document.createEvent?(n=document.createEvent("MouseEvents"),n.initMouseEvent(t,o.bubbles,o.cancelable,o.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,o.ctrlKey,o.altKey,o.shiftKey,o.metaKey,o.button,o.relatedTarget||document.body.parentNode)):n=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+t,n)}}]),e}();t.default=f},function(e,t,n){"use strict";t.__esModule=!0;var o=t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items",r=(t.CONTEXTMENU_ITEMS_ROW_ABOVE=o+".insertRowAbove",t.CONTEXTMENU_ITEMS_ROW_BELOW=o+".insertRowBelow",t.CONTEXTMENU_ITEMS_INSERT_LEFT=o+".insertColumnOnTheLeft",t.CONTEXTMENU_ITEMS_INSERT_RIGHT=o+".insertColumnOnTheRight",t.CONTEXTMENU_ITEMS_REMOVE_ROW=o+".removeRow",t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=o+".removeColumn",t.CONTEXTMENU_ITEMS_UNDO=o+".undo",t.CONTEXTMENU_ITEMS_REDO=o+".redo",t.CONTEXTMENU_ITEMS_READ_ONLY=o+".readOnly",t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=o+".clearColumn",t.CONTEXTMENU_ITEMS_COPY=o+".copy",t.CONTEXTMENU_ITEMS_CUT=o+".cut",t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=o+".freezeColumn",t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=o+".unfreezeColumn",t.CONTEXTMENU_ITEMS_MERGE_CELLS=o+".mergeCells",t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=o+".unmergeCells",t.CONTEXTMENU_ITEMS_ADD_COMMENT=o+".addComment",t.CONTEXTMENU_ITEMS_EDIT_COMMENT=o+".editComment",t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=o+".removeComment",t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=o+".readOnlyComment",t.CONTEXTMENU_ITEMS_ALIGNMENT=o+".align",t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=o+".align.left",t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=o+".align.center",t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=o+".align.right",t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=o+".align.justify",t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=o+".align.top",t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=o+".align.middle",t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=o+".align.bottom",t.CONTEXTMENU_ITEMS_BORDERS=o+".borders",t.CONTEXTMENU_ITEMS_BORDERS_TOP=o+".borders.top",t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=o+".borders.right",t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=o+".borders.bottom",t.CONTEXTMENU_ITEMS_BORDERS_LEFT=o+".borders.left",t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=o+".borders.remove",t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=o+".nestedHeaders.insertChildRow",t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=o+".nestedHeaders.detachFromParent",t.CONTEXTMENU_ITEMS_HIDE_COLUMN=o+".hideColumn",t.CONTEXTMENU_ITEMS_SHOW_COLUMN=o+".showColumn",t.CONTEXTMENU_ITEMS_HIDE_ROW=o+".hideRow",t.CONTEXTMENU_ITEMS_SHOW_ROW=o+".showRow",t.FILTERS_NAMESPACE="Filters:"),i=t.FILTERS_CONDITIONS_NAMESPACE=r+"conditions";t.FILTERS_CONDITIONS_NONE=i+".none",t.FILTERS_CONDITIONS_EMPTY=i+".isEmpty",t.FILTERS_CONDITIONS_NOT_EMPTY=i+".isNotEmpty",t.FILTERS_CONDITIONS_EQUAL=i+".isEqualTo",t.FILTERS_CONDITIONS_NOT_EQUAL=i+".isNotEqualTo",t.FILTERS_CONDITIONS_BEGINS_WITH=i+".beginsWith",t.FILTERS_CONDITIONS_ENDS_WITH=i+".endsWith",t.FILTERS_CONDITIONS_CONTAINS=i+".contains",t.FILTERS_CONDITIONS_NOT_CONTAIN=i+".doesNotContain",t.FILTERS_CONDITIONS_BY_VALUE=i+".byValue",t.FILTERS_CONDITIONS_GREATER_THAN=i+".greaterThan",t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=i+".greaterThanOrEqualTo",t.FILTERS_CONDITIONS_LESS_THAN=i+".lessThan",t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=i+".lessThanOrEqualTo",t.FILTERS_CONDITIONS_BETWEEN=i+".isBetween",t.FILTERS_CONDITIONS_NOT_BETWEEN=i+".isNotBetween",t.FILTERS_CONDITIONS_AFTER=i+".after",t.FILTERS_CONDITIONS_BEFORE=i+".before",t.FILTERS_CONDITIONS_TODAY=i+".today",t.FILTERS_CONDITIONS_TOMORROW=i+".tomorrow",t.FILTERS_CONDITIONS_YESTERDAY=i+".yesterday",t.FILTERS_DIVS_FILTER_BY_CONDITION=r+"labels.filterByCondition",t.FILTERS_DIVS_FILTER_BY_VALUE=r+"labels.filterByValue",t.FILTERS_LABELS_CONJUNCTION=r+"labels.conjunction",t.FILTERS_LABELS_DISJUNCTION=r+"labels.disjunction",t.FILTERS_VALUES_BLANK_CELLS=r+"values.blankCells",t.FILTERS_BUTTONS_SELECT_ALL=r+"buttons.selectAll",t.FILTERS_BUTTONS_CLEAR=r+"buttons.clear",t.FILTERS_BUTTONS_OK=r+"buttons.ok",t.FILTERS_BUTTONS_CANCEL=r+"buttons.cancel",t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=r+"buttons.placeholder.search",t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=r+"buttons.placeholder.value",t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=r+"buttons.placeholder.secondValue"},function(e,t,n){"use strict";function o(e,t){e=(0,c.toUpperCaseFirst)(e),l.default.getSingleton().add("construct",function(){var n=void 0;h.has(this)||h.set(this,{}),n=h.get(this),n[e]||(n[e]=new t(this))}),l.default.getSingleton().add("afterDestroy",function(){if(h.has(this)){var e=h.get(this);(0,u.objectEach)(e,function(e){return e.destroy()}),h.delete(this)}})}function r(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,c.toUpperCaseFirst)(t);if(h.has(e)&&h.get(e)[n])return h.get(e)[n]}function i(e){return h.has(e)?Object.keys(h.get(e)):[]}function s(e,t){var n=null;return h.has(e)&&(0,u.objectEach)(h.get(e),function(e,o){e===t&&(n=o)}),n}t.__esModule=!0,t.getPluginName=t.getRegistredPluginNames=t.getPlugin=t.registerPlugin=void 0;var a=n(15),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=n(2),c=n(36),h=new WeakMap;t.registerPlugin=o,t.getPlugin=r,t.getRegistredPluginNames=i,t.getPluginName=s},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(2),s=n(1),a=n(193),l=n(8),u=new WeakMap,c=null;t.default=function(){function e(t){var n=this;o(this,e),(0,i.defineGetter)(this,"hot",t,{writable:!1}),(0,i.defineGetter)(this,"t",(0,a.getTranslator)(t),{writable:!1}),u.set(this,{hooks:{}}),c=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",function(){return n.onAfterPluginsInitialized()}),this.hot.addHook("afterUpdateSettings",function(){return n.onUpdateSettings()}),this.hot.addHook("beforeInit",function(){return n.init()})}return r(e,[{key:"init",value:function(){this.pluginName=(0,l.getPluginName)(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),c||(c=(0,l.getRegistredPluginNames)(this.hot)),0>c.indexOf(this.pluginName)||c.splice(c.indexOf(this.pluginName),1),c.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,t){u.get(this).hooks[e]=u.get(this).hooks[e]||[];var n=u.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),u.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;(0,s.arrayEach)(u.get(this).hooks[e]||[],function(n){t.hot.removeHook(e,n)})}},{key:"clearHooks",value:function(){var e=this,t=u.get(this).hooks;(0,i.objectEach)(t,function(t,n){return e.removeHooks(n)}),t.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){(0,s.arrayEach)(this.pluginsInitializedCallbacks,function(e){return e()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,i.objectEach)(this,function(t,n){"hot"!==n&&"t"!==n&&(e[n]=null)}),delete this.t,delete this.hot}}]),e}()},function(e,t,n){var o=n(77)("wks"),r=n(48),i=n(14).Symbol,s="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=s&&i[e]||(s?i:r)("Symbol."+e))}).store=o},function(e,t,n){"use strict";function o(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function r(e){return!1===e.isImmediatePropagationEnabled}function i(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function s(e){return e.pageX?e.pageX:e.clientX+(0,c.getWindowScrollLeft)()}function a(e){return e.pageY?e.pageY:e.clientY+(0,c.getWindowScrollTop)()}function l(e){return 2===e.button}function u(e){return 0===e.button}t.__esModule=!0,t.stopImmediatePropagation=o,t.isImmediatePropagationStopped=r,t.stopPropagation=i,t.pageX=s,t.pageY=a,t.isRightClick=l,t.isLeftClick=u;var c=n(0)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if("function"==typeof e)return e;if(!O(e))throw Error('No registered renderer found under "'+e+'" name');return S(e)}t.__esModule=!0,t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.getRenderer=t.registerRenderer=void 0;var i=n(39),s=o(i),a=n(242),l=o(a),u=n(243),c=o(u),h=n(244),f=o(h),d=n(245),p=o(d),g=n(246),v=o(g),y=n(248),m=o(y),w=n(249),C=o(w),b=(0,s.default)("renderers"),E=b.register,S=b.getItem,O=b.hasItem,T=b.getNames,_=b.getValues;E("base",l.default),E("autocomplete",c.default),E("checkbox",f.default),E("html",p.default),E("numeric",v.default),E("password",m.default),E("text",C.default),t.registerRenderer=E,t.getRenderer=r,t.hasRenderer=O,t.getRegisteredRendererNames=T,t.getRegisteredRenderers=_},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(1),s=n(2),a=["afterCellMetaReset","afterChange","afterChangesObserved","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","afterRender","beforeRenderer","afterRenderer","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyCol","unmodifyCol","unmodifyRow","modifyColHeader","modifyColWidth","modifyRow","modifyRowHeader","modifyRowHeight","modifyData","modifyRowData","modifyGetCellCoords","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnMove","afterColumnMove","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","modifyColumnHeaderHeight","beforeUndo","afterUndo","beforeRedo","afterRedo","modifyRowHeaderWidth","beforeAutofillInsidePopulate","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","manualRowHeights","skipLengthCache","afterTrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","hiddenRow","hiddenColumn","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten"],l=function(){function e(){o(this,e),this.globalBucket=this.createEmptyBucket()}return r(e,null,[{key:"getSingleton",value:function(){return u}}]),r(e,[{key:"createEmptyBucket",value:function(){var e=Object.create(null);return(0,i.arrayEach)(a,function(t){return e[t]=[]}),e}},{key:"getBucket",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,i.arrayEach)(t,function(t){return n.add(e,t,o)});else{var r=this.getBucket(o);if(void 0===r[e]&&(this.register(e),r[e]=[]),t.skip=!1,-1===r[e].indexOf(t)){var s=!1;t.initialHook&&(0,i.arrayEach)(r[e],function(n,o){if(n.initialHook)return r[e][o]=t,s=!0,!1}),s||r[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,i.arrayEach)(t,function(t){return n.once(e,t,o)}):(t.runOnce=!0,this.add(e,t,o))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=this.getBucket(n);return void 0!==o[e]&&o[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,o,r,i,s,a){var l=this.globalBucket[t],u=-1,c=l?l.length:0;if(c)for(;++u<c;)if(l[u]&&!l[u].skip){var h=l[u].call(e,n,o,r,i,s,a);void 0!==h&&(n=h),l[u]&&l[u].runOnce&&this.remove(t,l[u])}var f=this.getBucket(e)[t],d=-1,p=f?f.length:0;if(p)for(;++d<p;)if(f[d]&&!f[d].skip){var g=f[d].call(e,n,o,r,i,s,a);void 0!==g&&(n=g),f[d]&&f[d].runOnce&&this.remove(t,f[d],e)}return n}},{key:"destroy",value:function(){(0,s.objectEach)(this.getBucket(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),function(e,t,n){return n[t].length=0})}},{key:"register",value:function(e){this.isRegistered(e)||a.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&a.splice(a.indexOf(e),1)}},{key:"isRegistered",value:function(e){return a.indexOf(e)>=0}},{key:"getRegistered",value:function(){return a}}]),e}(),u=new l;t.default=l},function(e,t,n){"use strict";function o(e){var t=void 0;switch(void 0===e?"undefined":c(e)){case"string":case"number":t=""+e;break;case"object":t=null===e?"":""+e;break;case"undefined":t="";break;default:t=""+e}return t}function r(e){return void 0!==e}function i(e){return void 0===e}function s(e){return null===e||""===e||i(e)}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function l(e,t){e=C(e||"");var n="",o=!0,r=u(e),i=E(),a=s(e)||"trial"===e;if(a||r)if(r){var l=Math.floor((0,d.default)("11/04/2018","DD/MM/YYYY").toDate().getTime()/864e5),c=b(e);(c>45e3||c!==parseInt(c,10))&&(n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly."),n||(l>c+1&&(n=(0,p.toSingleLine)(h)),o=l>c+15)}else n="Evaluation version of Handsontable Pro. Not licensed for use in a production environment.";else n="The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.";if(i&&(n=!1,o=!1),n&&!S&&(console[a?"info":"warn"](n),S=!0),o&&t.parentNode){var f=document.createElement("div");f.id="hot-display-license-info",f.appendChild(document.createTextNode("Evaluation version of Handsontable Pro.")),f.appendChild(document.createElement("br")),f.appendChild(document.createTextNode("Not licensed for production use.")),t.parentNode.insertBefore(f,t.nextSibling)}}function u(e){var t=[][g],n=t;if(e[g]!==w("Z"))return!1;for(var o="",r="B<H4P+".split(""),i=w(r.shift());i;i=w(r.shift()||"A"))--i<""[g]?n|=(y(""+y(v(o)+(v(m(e,Math.abs(i),2))+[]).padStart(2,"0")))%97||2)>>1:o=m(e,i,i?1===r[g]?9:8:6);return n===t}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n Your license key of Handsontable Pro has expired.‌‌‌‌ \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "],["\n Your license key of Handsontable Pro has expired.‌‌‌‌\\x20\n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n "]);t.stringify=o,t.isDefined=r,t.isUndefined=i,t.isEmpty=s,t.isRegExp=a,t._injectProductInfo=l;var f=n(55),d=function(e){return e&&e.__esModule?e:{default:e}}(f),p=n(41),g="length",v=function(e){return parseInt(e,16)},y=function(e){return parseInt(e,10)},m=function(e,t,n){return e.substr(t,n)},w=function(e){return e.codePointAt(0)-65},C=function(e){return(""+e).replace(/\-/g,"")},b=function(e){return v(m(C(e),v("12"),w("F")))/(v(m(C(e),w("B"),~~![][g]))||9)},E=function(){return"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)},S=!1},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},h.default.getSingleton().add("afterDestroy",function(){t={}})}function i(e,t){var n=void 0;if("function"==typeof e)P.get(e)||a(null,e),n=P.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=D(e)}if(!n)throw Error('No editor registered under name "'+e+'"');return n.getInstance(t)}function s(e){if(!x(e))throw Error('No registered editor found under "'+e+'" name');return D(e).getConstructor()}function a(e,t){var n=new r(t);"string"==typeof e&&L(e,n),P.set(t,n)}t.__esModule=!0,t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=t.getEditorInstance=t.getEditor=t.registerEditor=void 0,t.RegisteredEditor=r,t._getEditorInstance=i;var l=n(39),u=o(l),c=n(15),h=o(c),f=n(53),d=o(f),p=n(188),g=o(p),v=n(234),y=o(v),m=n(235),w=o(m),C=n(238),b=o(C),E=n(189),S=o(E),O=n(239),T=o(O),_=n(240),R=o(_),k=n(241),M=o(k),A=n(57),N=o(A),P=new WeakMap,H=(0,u.default)("editors"),L=H.register,D=H.getItem,x=H.hasItem,I=H.getNames,j=H.getValues;a("base",d.default),a("autocomplete",g.default),a("checkbox",y.default),a("date",w.default),a("dropdown",b.default),a("handsontable",S.default),a("numeric",T.default),a("password",R.default),a("select",M.default),a("text",N.default),t.registerEditor=a,t.getEditor=s,t.getEditorInstance=i,t.hasEditor=x,t.getRegisteredEditorNames=I,t.getRegisteredEditors=j},function(e,t,n){var o=n(9);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";function o(e){return(0,b.arrayMap)(e,function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}})}function r(e){return(0,E.hasClass)(e,"htSeparator")}function i(e){return(0,E.hasClass)(e,"htSubmenu")}function s(e){return(0,E.hasClass)(e,"htDisabled")}function a(e){return(0,E.hasClass)(e,"htSelectionDisabled")}function l(e){var t=e.getSelected();return t?0>t[0]?null:t:null}function u(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),e+=" "+t)}function c(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),e+=" "+t)}function h(e,t){var n={};return(0,b.arrayEach)(e,function(e){for(var o=e.from,r=e.to,i=o.row;r.row>=i;i++)for(var s=o.col;r.col>=s;s++)n[i]||(n[i]=[]),n[i][s]=t(i,s)}),n}function f(e,t,n,o,r){(0,b.arrayEach)(e,function(e){var i=e.from,s=e.to;if(i.row==s.row&&i.col==s.col)d(i.row,i.col,t,n,o,r);else for(var a=i.row;s.row>=a;a++)for(var l=i.col;s.col>=l;l++)d(a,l,t,n,o,r)})}function d(e,t,n,o,r,i){var s=r(e,t),a=o;s.className&&(a="vertical"===n?u(s.className,o):c(s.className,o)),i(e,t,"className",a)}function p(e,t){var n=!1;return Array.isArray(e)&&(0,b.arrayEach)(e,function(e){return e.forAll(function(e,o){if(t(e,o))return n=!0,!1}),n}),n}function g(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+e}function v(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}function y(e,t){for(var n=e.slice(0);n.length>0&&n[0].name===t;)n.shift();return n}function m(e,t){var n=e.slice(0);return n.reverse(),n=y(n,t),n.reverse(),n}function w(e){var t=[];return(0,b.arrayEach)(e,function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S.KEY,n=e.slice(0);return n=y(n,t),n=m(n,t),n=w(n)}t.__esModule=!0,t.normalizeSelection=o,t.isSeparator=r,t.hasSubMenu=i,t.isDisabled=s,t.isSelectionDisabled=a,t.getValidSelection=l,t.prepareVerticalAlignClass=u,t.prepareHorizontalAlignClass=c,t.getAlignmentClasses=h,t.align=f,t.checkSelectionConsistency=p,t.markLabelAsSelected=g,t.isItemHidden=v,t.filterSeparators=C;var b=n(1),E=(n(5),n(0)),S=n(93)},function(e,t,n){var o=n(18),r=n(98),i=n(73),s=Object.defineProperty;t.f=n(22)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";function o(e){return 32==e||e>=48&&57>=e||e>=96&&111>=e||e>=186&&192>=e||e>=219&&222>=e||e>=226||e>=65&&90>=e}function r(e){return-1!==[u.ARROW_DOWN,u.ARROW_UP,u.ARROW_LEFT,u.ARROW_RIGHT,u.HOME,u.END,u.DELETE,u.BACKSPACE,u.F1,u.F2,u.F3,u.F4,u.F5,u.F6,u.F7,u.F8,u.F9,u.F10,u.F11,u.F12,u.TAB,u.PAGE_DOWN,u.PAGE_UP,u.ENTER,u.ESCAPE,u.SHIFT,u.CAPS_LOCK,u.ALT].indexOf(e)}function i(e){var t=[];return window.navigator.platform.includes("Mac")?t.push(u.COMMAND_LEFT,u.COMMAND_RIGHT,u.COMMAND_FIREFOX):t.push(u.CONTROL),t.includes(e)}function s(e){return[u.CONTROL,u.COMMAND_LEFT,u.COMMAND_RIGHT,u.COMMAND_FIREFOX].includes(e)}function a(e,t){var n=t.split("|"),o=!1;return(0,l.arrayEach)(n,function(t){if(e===u[t])return o=!0,!1}),o}t.__esModule=!0,t.KEY_CODES=void 0,t.isPrintableChar=o,t.isMetaKey=r,t.isCtrlKey=i,t.isCtrlMetaKey=s,t.isKey=a;var l=n(1),u=t.KEY_CODES={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},function(e,t,n){e.exports=!n(23)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(75),r=n(38);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(59),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(3),r=n(44),i=n(23);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],s={};s[e]=t(n),o(o.S+o.F*i(function(){n(1)}),"Object",s)}},function(e,t,n){"use strict";function o(){return l}function r(){return u}function i(){return c}function s(){return h}function a(e){return e||(e=navigator.userAgent),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}t.__esModule=!0,t.isIE8=o,t.isIE9=r,t.isSafari=i,t.isChrome=s,t.isMobileBrowser=a;var l=!document.createTextNode("test").textContent,u=!!document.documentMode,c=/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor),h=/Chrome/.test(navigator.userAgent)&&/Google/.test(navigator.vendor)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if("function"==typeof e)return e;if(!m(e))throw Error('No registered validator found under "'+e+'" name');return y(e)}t.__esModule=!0,t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=t.getValidator=t.registerValidator=void 0;var i=n(39),s=o(i),a=n(250),l=o(a),u=n(251),c=o(u),h=n(252),f=o(h),d=n(253),p=o(d),g=(0,s.default)("validators"),v=g.register,y=g.getItem,m=g.hasItem,w=g.getNames,C=g.getValues;v("autocomplete",l.default),v("date",c.default),v("numeric",f.default),v("time",p.default),t.registerValidator=v,t.getValidator=r,t.hasValidator=m,t.getRegisteredValidatorNames=w,t.getRegisteredValidators=C},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(14),r=n(31),i=n(29),s=n(48)("src"),a=Function.toString,l=(""+a).split("toString");n(44).inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var u="function"==typeof n;u&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(u&&(i(n,s)||r(n,s,e[t]?""+e[t]:l.join(t+""))),e===o?e[t]=n:a?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(e,t,n){var o=n(20),r=n(49);e.exports=n(22)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(62);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var o=n(38);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(48)("meta"),r=n(9),i=n(29),s=n(20).f,a=0,l=Object.isExtensible||function(){return!0},u=!n(23)(function(){return l(Object.preventExtensions({}))}),c=function(e){s(e,o,{value:{i:"O"+ ++a,w:{}}})},h=function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,o)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[o].i},f=function(e,t){if(!i(e,o)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[o].w},d=function(e){return u&&p.NEED&&l(e)&&!i(e,o)&&c(e),e},p=e.exports={KEY:o,NEED:!1,fastKey:h,getWeak:f,onFreeze:d}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(0),a=n(2),l=n(1),u=n(6),c=o(u),h=n(179),f=o(h),d={};t.default=function(){function e(t){r(this,e),(0,a.defineGetter)(this,"wot",t,{writable:!1}),this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=this.wot.wtTable.TABLE,this.hider=this.wot.wtTable.hider,this.spreader=this.wot.wtTable.spreader,this.holder=this.wot.wtTable.holder,this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=(0,s.getTrimmingContainer)(this.hider.parentNode.parentNode),this.areElementSizesAdjusted=!1,this.updateStateOfRendering()}return i(e,null,[{key:"registerOverlay",value:function(t,n){if(-1===e.CLONE_TYPES.indexOf(t))throw Error("Unsupported overlay ("+t+").");d[t]=n}},{key:"createOverlay",value:function(e,t){return new d[e](t)}},{key:"hasOverlay",value:function(e){return void 0!==d[e]}},{key:"isOverlayTypeOf",value:function(e,t){return!(!e||!d[t])&&e instanceof d[t]}},{key:"CLONE_TOP",get:function(){return"top"}},{key:"CLONE_BOTTOM",get:function(){return"bottom"}},{key:"CLONE_LEFT",get:function(){return"left"}},{key:"CLONE_TOP_LEFT_CORNER",get:function(){return"top_left_corner"}},{key:"CLONE_BOTTOM_LEFT_CORNER",get:function(){return"bottom_left_corner"}},{key:"CLONE_DEBUG",get:function(){return"debug"}},{key:"CLONE_TYPES",get:function(){return[e.CLONE_TOP,e.CLONE_BOTTOM,e.CLONE_LEFT,e.CLONE_TOP_LEFT_CORNER,e.CLONE_BOTTOM_LEFT_CORNER,e.CLONE_DEBUG]}}]),i(e,[{key:"updateStateOfRendering",value:function(){var e=this.needFullRender;this.needFullRender=this.shouldBeRendered();var t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}},{key:"shouldBeRendered",value:function(){return!0}},{key:"updateTrimmingContainer",value:function(){this.trimmingContainer=(0,s.getTrimmingContainer)(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){this.mainTableScrollableElement=(0,s.getScrollableElement)(this.wot.wtTable.TABLE)}},{key:"makeClone",value:function(t){if(-1===e.CLONE_TYPES.indexOf(t))throw Error('Clone type "'+t+'" is not supported.');var n=document.createElement("DIV"),o=document.createElement("TABLE");n.className="ht_clone_"+t+" handsontable",n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.overflow="hidden",o.className=this.wot.wtTable.TABLE.className,n.appendChild(o),this.type=t,this.wot.wtTable.wtRootElement.parentNode.appendChild(n);var r=this.wot.getSetting("preventOverflow");return this.mainTableScrollableElement=!0===r||"horizontal"===r&&this.type===e.CLONE_TOP||"vertical"===r&&this.type===e.CLONE_LEFT?window:(0,s.getScrollableElement)(this.wot.wtTable.TABLE),new f.default({cloneSource:this.wot,cloneOverlay:this,table:o})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder;(0,l.arrayEach)([e.style,this.clone.wtTable.hider.style,e.parentNode.style],function(e){e.width="",e.height=""})}}},{key:"destroy",value:function(){new c.default(this.clone).destroy()}}]),e}()},function(e,t,n){"use strict";function o(e){return e[0].toUpperCase()+e.substr(1)}function r(){for(var e=[],t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];for(var r=n.length;r--;){var i=(0,u.stringify)(n[r]).toLowerCase();-1===e.indexOf(i)&&e.push(i)}return 1===e.length}function i(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function s(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]})}function l(e){return e+="",e.replace(c,"")}t.__esModule=!0,t.toUpperCaseFirst=o,t.equalsIgnoreCase=r,t.randomString=i,t.isPercentValue=s,t.substitute=a,t.stripTags=l;var u=n(16),c=(n(5),/<\/?\w+\/?>|<\w+[\s|\/][^>]*>/gi)},function(e,t,n){var o=n(99),r=n(78);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function r(){function e(e,t){l.set(e,t)}function t(e){return l.get(e)}function n(e){return l.has(e)}function r(){return[].concat(o(l.keys()))}function s(){return[].concat(o(l.values()))}var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";i.has(a)||i.set(a,new Map);var l=i.get(a);return{register:e,getItem:t,hasItem:n,getNames:r,getValues:s}}t.__esModule=!0,t.default=r;var i=t.collection=new Map},function(e,t,n){"use strict";function o(e){return d.call(window,e)}function r(e){p.call(window,e)}function i(){return"ontouchstart"in window}function s(){var e=document.createElement("div");return!(!e.createShadowRoot||!(""+e.createShadowRoot).match(/\[native code\]/))}function a(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var n=document.createElement("CAPTION");n.innerHTML="c<br>c<br>c<br>c",n.style.padding=0,n.style.margin=0,e.insertBefore(n,t),document.body.appendChild(e),v=2*e.lastChild.offsetHeight>e.offsetHeight,document.body.removeChild(e)}function l(){return void 0===v&&a(),v}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y||(y="object"===("undefined"==typeof Intl?"undefined":c(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return(""+e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})}t.__esModule=!0;var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.requestAnimationFrame=o,t.cancelAnimationFrame=r,t.isTouchSupported=i,t.isWebComponentSupportedNatively=s,t.hasCaptionProblem=l,t.getComparisonFunction=u;for(var h=0,f=["ms","moz","webkit","o"],d=window.requestAnimationFrame,p=window.cancelAnimationFrame,g=0;4>g&&!d;++g)d=window[f[g]+"RequestAnimationFrame"],p=window[f[g]+"CancelAnimationFrame"]||window[f[g]+"CancelRequestAnimationFrame"];d||(d=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-h)),o=window.setTimeout(function(){e(t+n)},n);return h=t+n,o}),p||(p=function(e){clearTimeout(e)});var v,y=void 0},function(e,t,n){"use strict";function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return(0,r.arrayReduce)(e,function(e,t,o){return e+t.replace(/(?:\r?\n\s+)/g,"")+(n[o]?n[o]:"")},"").trim()}t.__esModule=!0,t.toSingleLine=o;var r=n(1)},function(e,t,n){"use strict";function o(e){return"function"==typeof e}function r(e){function t(){var t=this,s=arguments,a=Date.now(),l=!1;r.lastCallThrottled=!0,o||(o=a,l=!0);var u=n-(a-o);return l?(r.lastCallThrottled=!1,e.apply(this,s)):(i&&clearTimeout(i),i=setTimeout(function(){r.lastCallThrottled=!1,e.apply(t,s),o=0,i=void 0},u)),r}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0,r={lastCallThrottled:!0},i=null;return t}function i(e){function t(){a=i}function n(){return a?(a--,e.apply(this,arguments)):s.apply(this,arguments)}var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,s=r(e,o),a=i;return n.clearHits=t,n}function s(e){function t(){var t=this,i=arguments;return o&&clearTimeout(o),o=setTimeout(function(){r=e.apply(t,i)},n),r}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=null,r=void 0;return t}function a(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var o=t[0],r=t.slice(1);return function(){return(0,h.arrayReduce)(r,function(e,t){return t(e)},o.apply(this,arguments))}}function l(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),r=0;t>r;r++)o[r]=arguments[r];return e.apply(this,n.concat(o))}}function u(e){function t(o){return function(){for(var r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];var a=o.concat(i);return n>a.length?t(a):e.apply(this,a)}}var n=e.length;return t([])}function c(e){function t(o){return function(){for(var r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];var a=o.concat(i.reverse());return n>a.length?t(a):e.apply(this,a)}}var n=e.length;return t([])}t.__esModule=!0,t.isFunction=o,t.throttle=r,t.throttleAfterHits=i,t.debounce=s,t.pipe=a,t.partial=l,t.curry=u,t.curryRight=c;var h=n(1)},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var o=n(11)("unscopables"),r=Array.prototype;void 0==r[o]&&n(31)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){"use strict";function o(e,t){return"border_row"+e+"col"+t}function r(){return{width:1,color:"#000"}}function i(){return{hide:!0}}function s(){return{width:1,color:"#000",cornerVisible:!1}}function a(e,t){return{className:o(e,t),border:s(),row:e,col:t,top:i(),right:i(),bottom:i(),left:i()}}function l(e,t){return(0,h.hasOwnProperty)(t,"border")&&(e.border=t.border),(0,h.hasOwnProperty)(t,"top")&&(e.top=t.top),(0,h.hasOwnProperty)(t,"right")&&(e.right=t.right),(0,h.hasOwnProperty)(t,"bottom")&&(e.bottom=t.bottom),(0,h.hasOwnProperty)(t,"left")&&(e.left=t.left),e}function u(e,t){var n=!1;return(0,f.arrayEach)(e.getSelectedRange(),function(o){o.forAll(function(o,r){var i=e.getCellMeta(o,r).borders;if(i){if(!t)return n=!0,!1;if(!(0,h.hasOwnProperty)(i[t],"hide"))return n=!0,!1}})}),n}function c(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+e}t.__esModule=!0,t.createClassName=o,t.createDefaultCustomBorder=r,t.createSingleEmptyBorder=i,t.createDefaultHtBorder=s,t.createEmptyBorders=a,t.extendDefaultBorder=l,t.checkSelectionBorders=u,t.markSelected=c;var h=n(2),f=n(1)},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){var o=n(20).f,r=n(29),i=n(11)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";function o(e){this.instance=e,this.state=s.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}t.__esModule=!0,t.EditorState=void 0;var r=n(4),i=n(16),s=t.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};o.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},o.prototype.init=function(){},o.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},o.prototype.setValue=function(e){throw Error("Editor setValue() method unimplemented")},o.prototype.open=function(){throw Error("Editor open() method unimplemented")},o.prototype.close=function(){throw Error("Editor close() method unimplemented")},o.prototype.prepare=function(e,t,n,o,r,i){this.TD=o,this.row=e,this.col=t,this.prop=n,this.originalValue=r,this.cellProperties=i,this.state=s.VIRGIN},o.prototype.extend=function(){function e(){t.apply(this,arguments)}var t=this.constructor;return function(e,t){function n(){}return n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e}(e,t)},o.prototype.saveValue=function(e,t){var n=void 0,o=void 0;t?(n=this.instance.getSelectedLast(),n[0]>n[2]&&(o=n[0],n[0]=n[2],n[2]=o),n[1]>n[3]&&(o=n[1],n[1]=n[3],n[3]=o)):n=[this.row,this.col,null,null],this.instance.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")},o.prototype.beginEditing=function(e,t){this.state===s.VIRGIN&&(this.instance.view.scrollViewport(new r.CellCoords(this.row,this.col)),this.instance.view.render(),this.state=s.EDITING,e="string"==typeof e?e:this.originalValue,this.setValue((0,i.stringify)(e)),this.open(t),this._opened=!0,this.focus(),this.instance.view.render(),this.instance.runHooks("afterBeginEditing",this.row,this.col))},o.prototype.finishEditing=function(e,t,n){var o,r=this;if(n){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),n(e),r.instance.view.render()}}if(!this.isWaiting()){if(this.state==s.VIRGIN)return void this.instance._registerTimeout(setTimeout(function(){r._fireCallbacks(!0)},0));if(this.state==s.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();var a=this.getValue();o=this.instance.getSettings().trimWhitespace?[["string"==typeof a?String.prototype.trim.call(a||""):a]]:[[a]],this.state=s.WAITING,this.saveValue(o,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){r.state=s.FINISHED,r.discardEditor(e)}):(this.state=s.FINISHED,this.discardEditor(!0))}}},o.prototype.cancelChanges=function(){this.state=s.FINISHED,this.discardEditor()},o.prototype.discardEditor=function(e){this.state===s.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=s.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=s.VIRGIN,this._fireCallbacks(!0)))},o.prototype.enableFullEditMode=function(){this._fullEditMode=!0},o.prototype.isInFullEditMode=function(){return this._fullEditMode},o.prototype.isOpened=function(){return this._opened},o.prototype.isWaiting=function(){return this.state===s.WAITING},o.prototype.checkEditorSection=function(){var e=this.instance.countRows(),t="";return this.row<this.instance.getSettings().fixedRowsTop?t=this.col<this.instance.getSettings().fixedColumnsLeft?"top-left-corner":"top":this.instance.getSettings().fixedRowsBottom&&this.row>=e-this.instance.getSettings().fixedRowsBottom?t=this.col<this.instance.getSettings().fixedColumnsLeft?"bottom-left-corner":"bottom":this.col<this.instance.getSettings().fixedColumnsLeft&&(t="left"),t},t.default=o},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.default=function(){function e(t,n){o(this,e),void 0!==t&&void 0!==n?(this.row=t,this.col=n):(this.row=null,this.col=null)}return r(e,[{key:"isValid",value:function(e){return this.row>=0&&this.col>=0&&(this.row<e.getSetting("totalRows")&&this.col<e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return e.row>=this.row&&e.col>=this.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&e.col>=this.col}},{key:"isNorthEastOf",value:function(e){return e.row>=this.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),e}()},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(){if((0,a.isDefined)(console)){var e;(e=console).log.apply(e,arguments)}}function r(){if((0,a.isDefined)(console)){var e;(e=console).warn.apply(e,arguments)}}function i(){if((0,a.isDefined)(console)){var e;(e=console).info.apply(e,arguments)}}function s(){if((0,a.isDefined)(console)){var e;(e=console).error.apply(e,arguments)}}t.__esModule=!0,t.log=o,t.warn=r,t.info=i,t.error=s;var a=n(16)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(0),i=n(233),s=o(i),a=n(53),l=o(a),u=n(6),c=o(u),h=n(21),f=n(12),d=l.default.prototype.extend();d.prototype.init=function(){var e=this;this.createElements(),this.eventManager=new c.default(this),this.bindEvents(),this.autoResize=(0,s.default)(),this.instance.addHook("afterDestroy",function(){e.destroy()})},d.prototype.getValue=function(){return this.TEXTAREA.value},d.prototype.setValue=function(e){this.TEXTAREA.value=e};var p=function(e){var t,n=this,o=n.getActiveEditor();if(t=(e.ctrlKey||e.metaKey)&&!e.altKey,e.target===o.TEXTAREA&&!(0,f.isImmediatePropagationStopped)(e)){if(17===e.keyCode||224===e.keyCode||91===e.keyCode||93===e.keyCode)return void(0,f.stopImmediatePropagation)(e);switch(e.keyCode){case h.KEY_CODES.ARROW_RIGHT:case h.KEY_CODES.ARROW_LEFT:o.isInFullEditMode()&&(!o.isWaiting()&&!o.allowKeyEventPropagation||!o.isWaiting()&&o.allowKeyEventPropagation&&!o.allowKeyEventPropagation(e.keyCode))&&(0,f.stopImmediatePropagation)(e);break;case h.KEY_CODES.ARROW_UP:case h.KEY_CODES.ARROW_DOWN:o.isInFullEditMode()&&(!o.isWaiting()&&!o.allowKeyEventPropagation||!o.isWaiting()&&o.allowKeyEventPropagation&&!o.allowKeyEventPropagation(e.keyCode))&&(0,f.stopImmediatePropagation)(e);break;case h.KEY_CODES.ENTER:var i=this.selection.isMultiple();if(t&&!i||e.altKey){if(o.isOpened()){var s=(0,r.getCaretPosition)(o.TEXTAREA),a=o.getValue();o.setValue(a.slice(0,s)+"\n"+a.slice(s)),(0,r.setCaretPosition)(o.TEXTAREA,s+1)}else o.beginEditing(o.originalValue+"\n");(0,f.stopImmediatePropagation)(e)}e.preventDefault();break;case h.KEY_CODES.A:case h.KEY_CODES.X:case h.KEY_CODES.C:case h.KEY_CODES.V:t&&(0,f.stopImmediatePropagation)(e);break;case h.KEY_CODES.BACKSPACE:case h.KEY_CODES.DELETE:case h.KEY_CODES.HOME:case h.KEY_CODES.END:(0,f.stopImmediatePropagation)(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)&&o.autoResize.resize(String.fromCharCode(e.keyCode))}};d.prototype.open=function(){this.refreshDimensions(),this.instance.addHook("beforeKeyDown",p)},d.prototype.close=function(e){this.textareaParentStyle.display="none",this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.instance.removeHook("beforeKeyDown",p)},d.prototype.focus=function(){this.TEXTAREA.focus(),(0,r.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)},d.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),(0,r.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),(0,r.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.top=0,this.textareaParentStyle.left=0,this.textareaParentStyle.display="none",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);var e=this;this.instance._registerTimeout(setTimeout(function(){e.refreshDimensions()},0))},d.prototype.getEditedCell=function(){var e,t=this.checkEditorSection();switch(t){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=101;break;case"top-left-corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"bottom-left-corner":e=this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;case"bottom":e=this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.textareaParentStyle.zIndex=""}return-1!=e&&-2!=e?e:void 0},d.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},d.prototype.refreshDimensions=function(){if(this.state===a.EditorState.EDITING){if(!(this.TD=this.getEditedCell()))return void this.close(!0);var e=(0,r.offset)(this.TD),t=(0,r.offset)(this.instance.rootElement),n=this.instance.view.wt.wtOverlays.topOverlay.mainTableScrollableElement,o=this.instance.countRows(),i=n!==window?n.scrollTop:0,s=n!==window?n.scrollLeft:0,l=this.checkEditorSection(),u=["","left"].includes(l)?i:0,c=["","top","bottom"].includes(l)?s:0,h=e.top===t.top?0:1,f=this.instance.getSettings(),d=(this.instance.hasRowHeaders(),this.instance.hasColHeaders()),p=this.TD.style.backgroundColor,g=e.top-t.top-h-u,v=e.left-t.left-1-c,y=void 0;switch(l){case"top":y=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":y=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":y=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":y=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":y=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(d&&0===this.instance.getSelectedLast()[0]||f.fixedRowsBottom&&this.instance.getSelectedLast()[0]===o-f.fixedRowsBottom)&&(g+=1),0===this.instance.getSelectedLast()[1]&&(v+=1),y&&-1!=y?this.textareaParentStyle[y[0]]=y[1]:(0,r.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top=g+"px",this.textareaParentStyle.left=v+"px";var m=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,w=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,C=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),b=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),E=(0,r.getScrollbarWidth)(),S=this.TD.offsetTop+m-b,O=this.TD.offsetLeft+w-C,T=(0,r.innerWidth)(this.TD)-8,_=(0,r.hasVerticalScrollbar)(n)?E:0,R=(0,r.hasHorizontalScrollbar)(n)?E:0,k=this.instance.view.maximumVisibleElementWidth(O)-9-_,M=this.TD.scrollHeight+1,A=Math.max(this.instance.view.maximumVisibleElementHeight(S)-R,23),N=(0,r.getComputedStyle)(this.TD);this.TEXTAREA.style.fontSize=N.fontSize,this.TEXTAREA.style.fontFamily=N.fontFamily,this.TEXTAREA.style.backgroundColor="",this.TEXTAREA.style.backgroundColor=p||(0,r.getComputedStyle)(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(M,A),maxHeight:A,minWidth:Math.min(T,k),maxWidth:k},!0),this.textareaParentStyle.display="block"}},d.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){(0,f.stopPropagation)(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){(0,f.stopPropagation)(e)}),this.instance.addHook("afterScrollHorizontally",function(){e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.destroy()})},d.prototype.destroy=function(){this.eventManager.destroy()},t.default=d},function(e,t,n){"use strict";t.__esModule=!0;var o=n(1),r=n(2),i={_localHooks:Object.create(null),addLocalHook:function(e,t){this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t)},runLocalHooks:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;n>i;i++)r[i-1]=arguments[i];this._localHooks[e]&&(0,o.arrayEach)(this._localHooks[e],function(e){return e.apply(t,r)})},clearLocalHooks:function(){this._localHooks={}}};(0,r.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1}),t.default=i},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(59),r=Math.max,i=Math.min;e.exports=function(e,t){return e=o(e),0>e?r(e+t,0):i(e,t)}},function(e,t,n){var o=n(30);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var o=n(32),r=n(102),i=n(103),s=n(18),a=n(25),l=n(104),u={},c={},t=e.exports=function(e,t,n,h,f){var d,p,g,v,y=f?function(){return e}:l(e),m=o(n,h,t?2:1),w=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(d=a(e.length);d>w;w++)if((v=t?m(s(p=e[w])[0],p[1]):m(e[w]))===u||v===c)return v}else for(g=y.call(e);!(p=g.next()).done;)if((v=r(g,m,p.value,t))===u||v===c)return v};t.BREAK=u,t.RETURN=c},function(e,t){e.exports=!1},function(e,t,n){"use strict";var o=n(14),r=n(3),i=n(30),s=n(61),a=n(34),l=n(64),u=n(63),c=n(9),h=n(23),f=n(79),d=n(51),p=n(209);e.exports=function(e,t,n,g,v,y){var m=o[e],w=m,C=v?"set":"add",b=w&&w.prototype,E={},S=function(e){var t=b[e];i(b,e,"delete"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof w&&(y||b.forEach&&!h(function(){(new w).entries().next()}))){var O=new w,T=O[C](y?{}:-0,1)!=O,_=h(function(){O.has(1)}),R=f(function(e){new w(e)}),k=!y&&h(function(){for(var e=new w,t=5;t--;)e[C](t,t);return!e.has(-0)});R||(w=t(function(t,n){u(t,w,e);var o=p(new m,t,w);return void 0!=n&&l(n,v,o[C],o),o}),w.prototype=b,b.constructor=w),(_||k)&&(S("delete"),S("has"),v&&S("get")),(k||T)&&S(C),y&&b.clear&&delete b.clear}else w=g.getConstructor(t,e,v,C),s(w.prototype,n),a.NEED=!0;return d(w,e),E[e]=w,r(r.G+r.W+r.F*(w!=m),E),y||g.setStrong(w,e,v),w}},function(e,t,n){var o=n(52),r=n(49),i=n(24),s=n(73),a=n(29),l=n(98),u=Object.getOwnPropertyDescriptor;t.f=n(22)?u:function(e,t){if(e=i(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(a(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(32),r=n(75),i=n(33),s=n(25),a=n(210);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,h=6==e,f=5==e||h,d=t||a;return function(t,a,p){for(var g,v,y=i(t),m=r(y),w=o(a,p,3),C=s(m.length),b=0,E=n?d(t,C):l?d(t,0):void 0;C>b;b++)if((f||b in m)&&(g=m[b],v=w(g,b,y),e))if(n)E[b]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return b;case 2:E.push(g)}else if(c)return!1;return h?-1:u||c?c:E}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(31),r=n(30),i=n(23),s=n(38),a=n(11);e.exports=function(e,t,n){var l=a(e),u=n(s,l,""[e]),c=u[0],h=u[1];i(function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})&&(r(String.prototype,e,c),o(RegExp.prototype,l,2==t?function(e,t){return h.call(e,this,t)}:function(e){return h.call(e,this)}))}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=e;return(0,c.isObject)(e)&&(t=e,n=t.languageCode),l(n,t),m(n,(0,c.deepClone)(t)),(0,c.deepClone)(t)}function i(e){return s(e)?(0,c.deepClone)(w(e)):null}function s(e){return C(e)}function a(){return g.default}function l(e,t){e!==v&&(0,h.extendNotExistingKeys)(t,w(v))}function u(){return b()}t.__esModule=!0,t.DEFAULT_LANGUAGE_CODE=t.getLanguagesDictionaries=t.getDefaultLanguageDictionary=t.hasLanguageDictionary=t.getLanguageDictionary=t.registerLanguageDictionary=void 0;var c=n(2),h=n(197),f=n(39),d=o(f),p=n(269),g=o(p),v=g.default.languageCode,y=(0,d.default)("languagesDictionaries"),m=y.register,w=y.getItem,C=y.hasItem,b=y.getValues;t.registerLanguageDictionary=r,t.getLanguageDictionary=i,t.hasLanguageDictionary=s,t.getDefaultLanguageDictionary=a,t.getLanguagesDictionaries=u,t.DEFAULT_LANGUAGE_CODE=v,r(g.default)},function(e,t,n){var o=n(9),r=n(14).document,i=o(r)&&o(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},function(e,t,n){var o=n(9);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(18),r=n(207),i=n(78),s=n(76)("IE_PROTO"),a=function(){},l=function(){var e,t=n(72)("iframe"),o=i.length;for(t.style.display="none",n(101).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;o--;)delete l.prototype[i[o]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=o(e),n=new a,a.prototype=null,n[s]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(43);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t,n){var o=n(77)("keys"),r=n(48);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(14),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var o=n(11)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],s=i[o]();s.next=function(){return{done:n=!0}},i[o]=function(){return s},e(i)}catch(e){}return n}},function(e,t,n){var o,r,i,s=n(32),a=n(213),l=n(101),u=n(72),c=n(14),h=c.process,f=c.setImmediate,d=c.clearImmediate,p=c.MessageChannel,g=c.Dispatch,v=0,y={},m=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},w=function(e){m.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++v]=function(){a("function"==typeof e?e:Function(e),t)},o(v),v},d=function(e){delete y[e]},"process"==n(43)(h)?o=function(e){h.nextTick(s(m,e,1))}:g&&g.now?o=function(e){g.now(s(m,e,1))}:p?(r=new p,i=r.port2,r.port1.onmessage=w,o=s(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(o=function(e){c.postMessage(e+"","*")},c.addEventListener("message",w,!1)):o="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(s(m,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){var o=n(99),r=n(78).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){var o=n(142),r=n(38);e.exports=function(e,t,n){if(o(t))throw TypeError("String#"+n+" doesn't accept regex!");return r(e)+""}},function(e,t,n){var o=n(11)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var o=n(20),r=n(49);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){"use strict";var o=n(46),r=n(108),i=n(50),s=n(24);e.exports=n(106)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return e&&e.length>n?"keys"==t?r(0,n):"values"==t?r(0,e[n]):r(0,[n,e[n]]):(this._t=void 0,r(1))},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(54),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;o(this,e),this.highlight=t,this.from=n,this.to=r}return r(e,[{key:"setHighlight",value:function(e){return this.highlight=e,this}},{key:"setFrom",value:function(e){return this.from=e,this}},{key:"setTo",value:function(e){return this.to=e,this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row===this.to.row&&this.from.col===this.to.col}},{key:"getHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"includes",value:function(e){var t=e.row,n=e.col,o=this.getTopLeftCorner(),r=this.getBottomRightCorner();return!(o.row>t||t>r.row||o.col>n||n>r.col)}},{key:"includesRange",value:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}},{key:"isEqual",value:function(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)}},{key:"overlaps",value:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getTopRightCorner().col>=e.getTopLeftCorner().col&&this.getTopRightCorner().col<=e.getTopRightCorner().col||this.getTopLeftCorner().col<=e.getTopRightCorner().col&&this.getTopLeftCorner().col>=e.getTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getBottomRightCorner().row>=e.getTopRightCorner().row&&this.getBottomRightCorner().row<=e.getBottomRightCorner().row||this.getTopRightCorner().row<=e.getBottomRightCorner().row&&this.getTopRightCorner().row>=e.getTopRightCorner().row}},{key:"expand",value:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(t.row>e.row||t.col>e.col||e.row>n.row||e.col>n.col)&&(this.from=new s.default(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new s.default(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=this.getDirection(),r=e.getTopLeftCorner(),i=e.getBottomRightCorner(),a=Math.min(t.row,r.row),l=Math.min(t.col,r.col),u=Math.max(n.row,i.row),c=Math.max(n.col,i.col),h=new s.default(a,l),f=new s.default(u,c);return this.from=h,this.to=f,this.setDirection(o),this.highlight.row===this.getBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value:function(){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}},{key:"getVerticalDirection",value:function(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}},{key:"setDirection",value:function(e){switch(e){case"NW-SE":var t=[this.getTopLeftCorner(),this.getBottomRightCorner()];this.from=t[0],this.to=t[1];break;case"NE-SW":var n=[this.getTopRightCorner(),this.getBottomLeftCorner()];this.from=n[0],this.to=n[1];break;case"SE-NW":var o=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=o[0],this.to=o[1];break;case"SW-NE":var r=[this.getBottomLeftCorner(),this.getTopRightCorner()];this.from=r[0],this.to=r[1]}}},{key:"flipDirectionVertically",value:function(){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")}}},{key:"flipDirectionHorizontally",value:function(){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")}}},{key:"getTopLeftCorner",value:function(){return new s.default(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new s.default(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new s.default(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new s.default(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new s.default(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new s.default(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new s.default(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new s.default(t.to.row,t.to.col))))||(e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner()))}},{key:"getOppositeCorner",value:function(e,t){if(!(e instanceof s.default))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new s.default(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new s.default(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new s.default(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new s.default(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},n={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},o=[];return t.top==n.top&&o.push("top"),t.right==n.right&&o.push("right"),t.bottom==n.bottom&&o.push("bottom"),t.left==n.left&&o.push("left"),o}},{key:"getInner",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;t.row>=o;o++)for(var r=e.col;t.col>=r;r++)this.from.row===o&&this.from.col===r||this.to.row===o&&this.to.col===r||n.push(new s.default(o,r));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;t.row>=o;o++)for(var r=e.col;t.col>=r;r++)n.push(e.row===o&&e.col===r?e:t.row===o&&t.col===r?t:new s.default(o,r));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=t.row;n.row>=o;o++)for(var r=t.col;n.col>=r;r++){var i=e(o,r);if(!1===i)return}}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}]),e}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(!P(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 "Handsontable.cellTypes.registerCellType" method');return N(e)}function i(e,t){var n=t.editor,o=t.renderer,r=t.validator;n&&(0,l.registerEditor)(e,n),o&&(0,u.registerRenderer)(e,o),r&&(0,c.registerValidator)(e,r),A(e,t)}t.__esModule=!0,t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=t.getCellType=t.registerCellType=void 0;var s=n(39),a=o(s),l=n(17),u=n(13),c=n(28),h=n(254),f=o(h),d=n(255),p=o(d),g=n(256),v=o(g),y=n(257),m=o(y),w=n(258),C=o(w),b=n(259),E=o(b),S=n(260),O=o(S),T=n(261),_=o(T),R=n(262),k=o(R),M=(0,a.default)("cellTypes"),A=M.register,N=M.getItem,P=M.hasItem,H=M.getNames,L=M.getValues;i("autocomplete",f.default),i("checkbox",p.default),i("date",v.default),i("dropdown",m.default),i("handsontable",C.default),i("numeric",E.default),i("password",O.default),i("text",_.default),i("time",k.default),t.registerCellType=i,t.getCellType=r,t.hasCellType=P,t.getRegisteredCellTypeNames=H,t.getRegisteredCellTypes=L},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){function n(e){var t=(0,z.normalizeLanguageCode)(e);(0,U.hasLanguageDictionary)(t)?(ee.runHooks("beforeLanguageChange",t),te.prototype.language=t,ee.runHooks("afterLanguageChange",t)):(0,z.warnUserAboutLanguageRegistration)(e)}function o(){var e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue++,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=0>this.validatorsInQueue-1?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(e){},checkIfQueueIsEmpty:function(){0==this.validatorsInQueue&&0==e&&(e=!0,this.onQueueEmpty(this.valid))}}}function i(e){var t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function g(e,t,n){function r(){var o;e.length&&(o=ee.runHooks("beforeChange",e,t||"edit"),(0,h.isFunction)(o)?(0,f.warn)("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed)."):!1===o&&e.splice(0,e.length)),n()}var s=new o;s.onQueueEmpty=r;for(var l=e.length-1;l>=0;l--)if(null===e[l])e.splice(l,1);else{var c=a(e[l],4),d=c[0],p=c[1],g=c[3],v=B.propToCol(p),y=ee.getCellMeta(d,v);"numeric"===y.type&&"string"==typeof g&&function(e){return e.length>0&&/^-?[\d\s]*(\.|,)?\d*$/.test(e)}(g)&&(e[l][3]=i(g)),ee.getCellValidator(y)&&(s.addValidatorToQueue(),ee.validateCell(e[l][3],y,function(t,n){return function(o){if("boolean"!=typeof o)throw Error("Validation error: result is not boolean");if(!1===o&&!1===n.allowInvalid){e.splice(t,1),n.valid=!0;var r=ee.getCell(n.visualRow,n.visualCol);(0,u.removeClass)(r,ee.getSettings().invalidCellClassName),--t}s.removeValidatorFormQueue()}}(l,y),t))}s.checkIfQueueIsEmpty()}function y(e,t){var n=e.length-1;if(n>=0){for(;n>=0;n--){var o=!1;if(null!==e[n]){if(null!=e[n][2]||null!=e[n][3]){if(I.settings.allowInsertRow)for(;e[n][0]>ee.countRows()-1;){var r=B.createRow(void 0,void 0,t);if(0===r){o=!0;break}}if(!o){if("array"===ee.dataType&&(!I.settings.columns||0===I.settings.columns.length)&&I.settings.allowInsertColumn)for(;B.propToCol(e[n][1])>ee.countCols()-1;)B.createCol(void 0,void 0,t);B.set(e[n][0],e[n][1],e[n][3])}}}else e.splice(n,1)}ee.forceFullRender=!0,q.adjustRowsAndCols(),ee.runHooks("beforeChangeRender",e,t),J.lockEditor(),ee._refreshBorders(null),J.unlockEditor(),ee.view.wt.wtOverlays.adjustElementsSize(),ee.runHooks("afterChange",e,t||"edit");var i=ee.getActiveEditor();i&&(0,d.isDefined)(i.refreshValue)&&i.refreshValue()}}function w(e,t,n){return"object"===(void 0===e?"undefined":s(e))?e:[[e,t,n]]}function M(e){if((0,b.hasOwnProperty)(e,"type")){var t,n={};"object"===s(e.type)?t=e.type:"string"==typeof e.type&&(t=(0,W.getCellType)(e.type));for(var o in t)(0,b.hasOwnProperty)(t,o)&&!(0,b.hasOwnProperty)(e,o)&&(n[o]=t[o]);return n}}function N(){throw Error("This method cannot be called because this Handsontable instance has been destroyed")}var I,B,X,q,J,Q=this,$=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Z=!1,ee=this,te=function(){},ne=new C.default(ee);(0,b.extend)(te.prototype,F.default.prototype),(0,b.extend)(te.prototype,t),(0,b.extend)(te.prototype,M(t)),(0,z.applyLanguageSetting)(te.prototype,t.language),(0,D.hasValidParameter)($)&&(0,D.registerAsRootInstance)(this),(0,Y.startObserving)(),this.rootElement=e,this.isHotTableEnv=(0,u.isChildOfWebComponentTable)(this.rootElement),C.default.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),this.guid="ht_"+(0,R.randomString)();var oe=(0,L.getTranslator)(ee);X=new P.default(ee),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),I={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new te,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var re=new G.Selection(I.settings,{countCols:function(){return ee.countCols()},countRows:function(){return ee.countRows()},propToCol:function(e){return B.propToCol(e)},isEditorOpened:function(){return!!ee.getActiveEditor()&&ee.getActiveEditor().isOpened()}});this.selection=re,this.selection.addLocalHook("beforeSetRangeStart",function(e){Q.runHooks("beforeSetRangeStart",e)}),this.selection.addLocalHook("beforeSetRangeStartOnly",function(e){Q.runHooks("beforeSetRangeStartOnly",e)}),this.selection.addLocalHook("beforeSetRangeEnd",function(e){Q.runHooks("beforeSetRangeEnd",e),0>e.row&&(e.row=Q.view.wt.wtTable.getFirstVisibleRow()),0>e.col&&(e.col=Q.view.wt.wtTable.getFirstVisibleColumn())}),this.selection.addLocalHook("afterSetRangeEnd",function(e){var t=(0,b.createObjectPropListener)(!1),n=Q.selection.getSelectedRange(),o=n.current(),r=o.from,i=o.to,s=n.size()-1;Q.runHooks("afterSelection",r.row,r.col,i.row,i.col,t,s),Q.runHooks("afterSelectionByProp",r.row,ee.colToProp(r.col),i.row,ee.colToProp(i.col),t,s);var a=Q.selection.isSelectedByAnyHeader(),l=Q.selection.selectedRange.current(),c=!0;Z&&(c=!1),t.isTouched()&&(c=!t.value),!1===c||a||Q.view.scrollViewport(l&&!Q.selection.isMultiple()?l.from:e);var h=Q.selection.isSelectedByRowHeader(),f=Q.selection.isSelectedByColumnHeader();h&&f?(0,u.addClass)(Q.rootElement,["ht__selection--rows","ht__selection--columns"]):h?((0,u.removeClass)(Q.rootElement,"ht__selection--columns"),(0,u.addClass)(Q.rootElement,"ht__selection--rows")):f?((0,u.removeClass)(Q.rootElement,"ht__selection--rows"),(0,u.addClass)(Q.rootElement,"ht__selection--columns")):(0,u.removeClass)(Q.rootElement,["ht__selection--rows","ht__selection--columns"]),Q._refreshBorders(null)}),this.selection.addLocalHook("afterSelectionFinished",function(e){var t=e.length-1,n=e[t],o=n.from,r=n.to;Q.runHooks("afterSelectionEnd",o.row,o.col,r.row,r.col,t),Q.runHooks("afterSelectionEndByProp",o.row,ee.colToProp(o.col),r.row,ee.colToProp(r.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",function(e){var t=Q.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("beforeModifyTransformStart",function(e){Q.runHooks("modifyTransformStart",e)}),this.selection.addLocalHook("afterModifyTransformStart",function(e,t,n){Q.runHooks("afterModifyTransformStart",e,t,n)}),this.selection.addLocalHook("beforeModifyTransformEnd",function(e){Q.runHooks("modifyTransformEnd",e)}),this.selection.addLocalHook("afterModifyTransformEnd",function(e,t,n){Q.runHooks("afterModifyTransformEnd",e,t,n)}),this.selection.addLocalHook("afterDeselect",function(){J.destroyEditor(),Q._refreshBorders(),(0,u.removeClass)(Q.rootElement,["ht__selection--rows","ht__selection--columns"]),Q.runHooks("afterDeselect")}),this.selection.addLocalHook("insertRowRequire",function(e){Q.alter("insert_row",e,1,"auto")}),this.selection.addLocalHook("insertColRequire",function(e){Q.alter("insert_col",e,1,"auto")}),q={alter:function(e,t,n,o,i){function s(e,t,n,o){var i=function(){var e=void 0;return"array"===o?e=[]:"object"===o&&(e={}),e},s=(0,E.arrayMap)(Array(n),function(){return i()});s.unshift(t,0),e.splice.apply(e,r(s))}var l;n=n||1;var u=function(e){if(0===e.length)return[];var t=[].concat(r(e));return t.sort(function(e,t){var n=a(e,1),o=n[0],r=a(t,1),i=r[0];return o===i?0:o>i?1:-1}),(0,E.arrayReduce)(t,function(e,t){var n=a(t,2),o=n[0],r=n[1],i=e[e.length-1],s=a(i,2),l=s[0],u=s[1],c=l+u;if(c<o)e.push([o,r]);else{i[1]+=Math.max(r-(c-o),0)}return e},[t[0]])};switch(e){case"insert_row":var c=ee.countSourceRows();if(ee.getSettings().maxRows===c)return;t=(0,d.isDefined)(t)?t:c,l=B.createRow(t,n,o),s(I.cellSettings,t,n,"array"),l&&(re.isSelected()&&re.selectedRange.current().from.row>=t?(re.selectedRange.current().from.row+=l,re.transformEnd(l,0)):ee._refreshBorders());break;case"insert_col":l=B.createCol(t,n,o);for(var h=0,f=ee.countSourceRows();f>h;h++)I.cellSettings[h]&&s(I.cellSettings[h],t,n);if(l){if(Array.isArray(ee.getSettings().colHeaders)){var p=[t,0];p.length+=l,Array.prototype.splice.apply(ee.getSettings().colHeaders,p)}re.isSelected()&&re.selectedRange.current().from.col>=t?(re.selectedRange.current().from.col+=l,re.transformEnd(0,l)):ee._refreshBorders()}break;case"remove_row":var g=function(e){var t=0;(0,E.arrayEach)(e,function(e){var n=a(e,2),r=n[0],i=n[1],s=(0,d.isEmpty)(r)?ee.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0)),B.removeRow(r,i,o),I.cellSettings.splice(s,i);var l=ee.countRows(),u=ee.getSettings().fixedRowsTop;s+1>u||(ee.getSettings().fixedRowsTop-=Math.min(i,u-s));var c=ee.getSettings().fixedRowsBottom;c&&s>=l-c&&(ee.getSettings().fixedRowsBottom-=Math.min(i,c)),t+=i})};g(Array.isArray(t)?u(t):[[t,n]]),q.adjustRowsAndCols(),ee._refreshBorders();break;case"remove_col":var v=function(e){var t=0;(0,E.arrayEach)(e,function(e){var n=a(e,2),r=n[0],i=n[1],s=(0,d.isEmpty)(r)?ee.countCols()-1:Math.max(r-t,0),l=oe.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0)),B.removeCol(r,i,o);for(var u=0,c=ee.countSourceRows();c>u;u++)I.cellSettings[u]&&I.cellSettings[u].splice(l,i);var h=ee.getSettings().fixedColumnsLeft;s+1>h||(ee.getSettings().fixedColumnsLeft-=Math.min(i,h-s)),Array.isArray(ee.getSettings().colHeaders)&&(void 0===l&&(l=-1),ee.getSettings().colHeaders.splice(l,i)),t+=i})};v(Array.isArray(t)?u(t):[[t,n]]),q.adjustRowsAndCols(),ee._refreshBorders();break;default:throw Error('There is no such action "'+e+'"')}i||q.adjustRowsAndCols()},adjustRowsAndCols:function(){if(I.settings.minRows){var e=ee.countRows();if(I.settings.minRows>e)for(var t=0,n=I.settings.minRows;n-e>t;t++)B.createRow(ee.countRows(),1,"auto")}if(I.settings.minSpareRows){var o=ee.countEmptyRows(!0);if(I.settings.minSpareRows>o)for(;I.settings.minSpareRows>o&&ee.countSourceRows()<I.settings.maxRows;o++)B.createRow(ee.countRows(),1,"auto")}var r=void 0;if((I.settings.minCols||I.settings.minSpareCols)&&(r=ee.countEmptyCols(!0)),I.settings.minCols&&!I.settings.columns&&ee.countCols()<I.settings.minCols)for(;ee.countCols()<I.settings.minCols;r++)B.createCol(ee.countCols(),1,"auto");if(I.settings.minSpareCols&&!I.settings.columns&&"array"===ee.dataType&&I.settings.minSpareCols>r)for(;I.settings.minSpareCols>r&&ee.countCols()<I.settings.maxCols;r++)B.createCol(ee.countCols(),1,"auto");var i=ee.countRows(),s=ee.countCols();0!==i&&0!==s||re.deselect(),re.isSelected()&&(0,E.arrayEach)(re.selectedRange,function(e){var t=!1,n=e.from.row,o=e.from.col,r=e.to.row,a=e.to.col;n>i-1?(n=i-1,t=!0,r>n&&(r=n)):r>i-1&&(r=i-1,t=!0,n>r&&(n=r)),o>s-1?(o=s-1,t=!0,a>o&&(a=o)):a>s-1&&(a=s-1,t=!0,o>a&&(o=a)),t&&ee.selectCell(n,o,r,a)}),ee.view&&ee.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,n,o,i,a,l){var u,c,h,f,p=[],g={};if(0===(c=t.length))return!1;var v,y,m,w;switch(i){case"shift_down":for(v=n?n.col-e.col+1:0,y=n?n.row-e.row+1:0,t=(0,H.translateRowsToColumns)(t),h=0,f=t.length,m=Math.max(f,v);m>h;h++)if(f>h){var C;for(u=0,c=t[h].length;y-c>u;u++)t[h].push(t[h][u%c]);t[h].unshift(e.col+h,e.row,0),(C=ee).spliceCol.apply(C,r(t[h]))}else{var E;t[h%f][0]=e.col+h,(E=ee).spliceCol.apply(E,r(t[h%f]))}break;case"shift_right":for(v=n?n.col-e.col+1:0,y=n?n.row-e.row+1:0,u=0,c=t.length,w=Math.max(c,y);w>u;u++)if(c>u){var S;for(h=0,f=t[u].length;v-f>h;h++)t[u].push(t[u][h%f]);t[u].unshift(e.row+u,e.col,0),(S=ee).spliceRow.apply(S,r(t[u]))}else{var O;t[u%c][0]=e.row+u,(O=ee).spliceRow.apply(O,r(t[u%c]))}break;case"overwrite":default:g.row=e.row,g.col=e.col;var T={row:n&&e?n.row-e.row+1:1,col:n&&e?n.col-e.col+1:1},_=0,R=0,k=!0,M=void 0,A=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=t[e%t.length];return null!==n?o[n%o.length]:o},N=t.length,P=n?n.row-e.row+1:0;for(c=n?P:Math.max(N,P),u=0;c>u&&(!(n&&g.row>n.row&&P>N||!I.settings.allowInsertRow&&g.row>ee.countRows()-1)&&g.row<I.settings.maxRows);u++){var L=u-_,D=A(L).length,x=n?n.col-e.col+1:0;if(f=n?x:Math.max(D,x),g.col=e.col,M=ee.getCellMeta(g.row,g.col),"CopyPaste.paste"!==o&&"Autofill.autofill"!==o||!M.skipRowOnPaste){for(R=0,h=0;f>h&&(!(n&&g.col>n.col&&x>D||!I.settings.allowInsertColumn&&g.col>ee.countCols()-1)&&g.col<I.settings.maxCols);h++)if(M=ee.getCellMeta(g.row,g.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!M.skipColumnOnPaste)if(M.readOnly)g.col++;else{var j=h-R,B=A(L,j),F=ee.getDataAtCell(g.row,g.col),W={row:L,col:j};if("Autofill.fill"===o){var V=ee.runHooks("beforeAutofillInsidePopulate",W,a,t,l,{},T);V&&(B=(0,d.isUndefined)(V.value)?B:V.value)}if(null!==B&&"object"===(void 0===B?"undefined":s(B)))if(null===F||"object"!==(void 0===F?"undefined":s(F)))k=!1;else{var U=(0,b.duckSchema)(F[0]||F),z=(0,b.duckSchema)(B[0]||B);(0,b.isObjectEqual)(U,z)?B=(0,b.deepClone)(B):k=!1}else null!==F&&"object"===(void 0===F?"undefined":s(F))&&(k=!1);k&&p.push([g.row,g.col,B]),k=!0,g.col++}else R++,g.col++,f++;g.row++}else _++,g.row++,c++}ee.setDataAtCell(p,null,null,o||"populateFromArray")}}},this.init=function(){X.setData(I.settings.data),ee.runHooks("beforeInit"),(0,p.isMobileBrowser)()&&(0,u.addClass)(ee.rootElement,"mobile"),this.updateSettings(I.settings,!0),this.view=new A.default(this),J=m.default.getInstance(ee,I,re,B),this.forceFullRender=!0,ee.runHooks("init"),this.view.render(),"object"===s(I.firstRun)&&(ee.runHooks("afterChange",I.firstRun[0],I.firstRun[1]),I.firstRun=!1),ee.runHooks("afterInit")},this.validateCell=function(e,t,n,o){function r(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!0===t.hidden)return void n(e);var o=t.visualCol,r=t.visualRow,i=ee.getCell(r,o,!0);i&&"TH"!=i.nodeName&&ee.view.wt.wtSettings.settings.cellRenderer(r,o,i),n(e)}var i=ee.getCellValidator(t);(0,d.isRegExp)(i)&&(i=function(e){return function(t,n){n(e.test(t))}}(i)),(0,h.isFunction)(i)?(e=ee.runHooks("beforeValidate",e,t.visualRow,t.prop,o),ee._registerTimeout(setTimeout(function(){i.call(t,e,function(n){n=ee.runHooks("afterValidate",n,e,t.visualRow,t.prop,o),t.valid=n,r(n),ee.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,o)})},0))):ee._registerTimeout(setTimeout(function(){t.valid=!0,r(t.valid,!1)},0))},this.setDataAtCell=function(e,t,n,o){var r,i,a,l=w(e,t,n),u=[];for(r=0,i=l.length;i>r;r++){if("object"!==s(l[r]))throw Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof l[r][1])throw Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=B.colToProp(l[r][1]),u.push([l[r][0],a,X.getAtCell(oe.toPhysicalRow(l[r][0]),l[r][1]),l[r][2]])}o||"object"!==(void 0===e?"undefined":s(e))||(o=t),ee.runHooks("afterSetDataAtCell",u,o),g(u,o,function(){y(u,o)})},this.setDataAtRowProp=function(e,t,n,o){var r,i,a=w(e,t,n),l=[];for(r=0,i=a.length;i>r;r++)l.push([a[r][0],a[r][1],X.getAtCell(oe.toPhysicalRow(a[r][0]),a[r][1]),a[r][2]]);o||"object"!==(void 0===e?"undefined":s(e))||(o=t),ee.runHooks("afterSetDataAtRowProp",l,o),g(l,o,function(){y(l,o)})},this.listen=function(){if(0>=arguments.length||void 0===arguments[0]||arguments[0]){var e=!document.activeElement||document.activeElement&&void 0===document.activeElement.nodeName;document.activeElement&&document.activeElement!==document.body&&!e?document.activeElement.blur():e&&document.body.focus()}ee&&!ee.isListening()&&(K=ee.guid,ee.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(K=null,ee.runHooks("afterUnlisten"))},this.isListening=function(){return K===ee.guid},this.destroyEditor=function(e){ee._refreshBorders(e)},this.populateFromArray=function(e,t,n,o,r,i,a,l,u){var c;if("object"!==(void 0===n?"undefined":s(n))||"object"!==s(n[0]))throw Error("populateFromArray parameter `input` must be an array of arrays");return c="number"==typeof o?new x.CellCoords(o,r):null,q.populateFromArray(new x.CellCoords(e,t),n,c,i,a,l,u)},this.spliceCol=function(e,t,n){var o;return(o=B).spliceCol.apply(o,arguments)},this.spliceRow=function(e,t,n){var o;return(o=B).spliceRow.apply(o,arguments)},this.getSelected=function(){if(re.isSelected())return(0,E.arrayMap)(re.getSelectedRange(),function(e){var t=e.from,n=e.to;return[t.row,t.col,n.row,n.col]})},this.getSelectedLast=function(){var e=this.getSelected(),t=void 0;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(re.isSelected())return Array.from(re.getSelectedRange())},this.getSelectedRangeLast=function(){var e=this.getSelectedRange(),t=void 0;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(){var e=this;if(re.isSelected()){var t=[];(0,E.arrayEach)(re.getSelectedRange(),function(n){var o=n.getTopLeftCorner(),r=n.getBottomRightCorner();(0,k.rangeEach)(o.row,r.row,function(n){(0,k.rangeEach)(o.col,r.col,function(o){e.getCellMeta(n,o).readOnly||t.push([n,o,""])})})}),t.length>0&&this.setDataAtCell(t)}},this.render=function(){ee.view&&(ee.renderCall=!0,ee.forceFullRender=!0,J.lockEditor(),ee._refreshBorders(null),J.unlockEditor())},this.loadData=function(e){if(ee.dataType=Array.isArray(I.settings.dataSchema)?"array":(0,h.isFunction)(I.settings.dataSchema)?"function":"object",B&&B.destroy(),B=new v.default(ee,I,te),"object"===(void 0===e?"undefined":s(e))&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw Error("loadData only accepts array of objects or array of arrays ("+(void 0===e?"undefined":s(e))+" given)");e=[];var t,n=0,o=0,r=B.getSchema();for(n=0,o=I.settings.startRows;o>n;n++)if("object"!==ee.dataType&&"function"!==ee.dataType||!I.settings.dataSchema)if("array"===ee.dataType)t=(0,b.deepClone)(r[0]),e.push(t);else{t=[];for(var i=0,a=I.settings.startCols;a>i;i++)t.push(null);e.push(t)}else t=(0,b.deepClone)(r),e.push(t)}I.isPopulated=!1,te.prototype.data=e,Array.isArray(e[0])&&(ee.dataType="array"),B.dataSource=e,X.data=e,X.dataType=ee.dataType,X.colToProp=B.colToProp.bind(B),X.propToCol=B.propToCol.bind(B),function(){I.cellSettings.length=0}(),q.adjustRowsAndCols(),ee.runHooks("afterLoadData",I.firstRun),I.firstRun?I.firstRun=[null,"loadData"]:(ee.runHooks("afterChange",null,"loadData"),ee.render()),I.isPopulated=!0},this.getData=function(e,t,n,o){return(0,d.isUndefined)(e)?B.getAll():B.getRange(new x.CellCoords(e,t),new x.CellCoords(n,o),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,o){return B.getCopyableText(new x.CellCoords(e,t),new x.CellCoords(n,o))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e,t){var o=!1,r=void 0,i=void 0,s=void 0;if((0,d.isDefined)(e.rows))throw Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if((0,d.isDefined)(e.cols))throw Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(r in e)"data"!==r&&("language"!==r?j.default.getSingleton().getRegistered().indexOf(r)>-1?((0,h.isFunction)(e[r])||Array.isArray(e[r]))&&(e[r].initialHook=!0,ee.addHook(r,e[r])):!t&&(0,b.hasOwnProperty)(e,r)&&(te.prototype[r]=e[r]):n(e.language));void 0===e.data&&void 0===I.settings.data?ee.loadData(null):void 0!==e.data?ee.loadData(e.data):void 0!==e.columns&&B.createMap(),s=ee.countCols();var a=e.columns||te.prototype.columns;if(a&&(0,h.isFunction)(a)&&(s=ee.countSourceCols(),o=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(I.cellSettings.length=0),s>0){var l=void 0,f=void 0;for(r=0,i=0;s>r;r++)o&&!a(r)||(I.columnSettings[i]=(0,c.columnFactory)(te,I.columnsSettingConflicts),l=I.columnSettings[i].prototype,a&&(f=o?a(r):a[i])&&((0,b.extend)(l,f),(0,b.extend)(l,M(f))),i++)}if((0,d.isDefined)(e.cell))for(var p in e.cell)if((0,b.hasOwnProperty)(e.cell,p)){var g=e.cell[p];ee.setCellMetaObject(g.row,g.col,g)}ee.runHooks("afterCellMetaReset"),(0,d.isDefined)(e.className)&&(te.prototype.className&&(0,u.removeClass)(ee.rootElement,te.prototype.className),e.className&&(0,u.addClass)(ee.rootElement,e.className));var v=ee.rootElement.style.height;""!==v&&(v=parseInt(ee.rootElement.style.height,10));var y=e.height;if((0,h.isFunction)(y)&&(y=y()),t){ee.rootElement.getAttribute("style")&&ee.rootElement.setAttribute("data-initialstyle",ee.rootElement.getAttribute("style"))}if(null===y){var m=ee.rootElement.getAttribute("data-initialstyle");m&&(m.indexOf("height")>-1||m.indexOf("overflow")>-1)?ee.rootElement.setAttribute("style",m):(ee.rootElement.style.height="",ee.rootElement.style.overflow="")}else void 0!==y&&(ee.rootElement.style.height=y+"px",ee.rootElement.style.overflow="hidden");if(void 0!==e.width){var w=e.width;(0,h.isFunction)(w)&&(w=w()),ee.rootElement.style.width=w+"px"}t||(B.clearLengthCache(),ee.view&&ee.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),ee.runHooks("afterUpdateSettings",e)),q.adjustRowsAndCols(),ee.view&&!I.firstRun&&(ee.forceFullRender=!0,J.lockEditor(),ee._refreshBorders(null),J.unlockEditor()),t||!ee.view||""!==v&&""!==y&&void 0!==y||v===y||ee.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=ee.getSelectedLast();if(te.prototype.getValue){if((0,h.isFunction)(te.prototype.getValue))return te.prototype.getValue.call(ee);if(e)return ee.getData()[e[0][0]][te.prototype.getValue]}else if(e)return ee.getDataAtCell(e[0],e[1])},this.getSettings=function(){return I.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,o,r){q.alter(e,t,n,o,r)},this.getCell=function(e,t,n){return ee.view.getCellAtCoords(new x.CellCoords(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=function(e){return oe.toVisualRow(e)},this.toVisualColumn=function(e){return oe.toVisualColumn(e)},this.toPhysicalRow=function(e){return oe.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return oe.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){var t=[];return t.concat.apply(t,r(B.getRange(new x.CellCoords(0,e),new x.CellCoords(I.settings.data.length-1,e),B.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,n=[];return t=B.getRange(new x.CellCoords(0,B.propToCol(e)),new x.CellCoords(I.settings.data.length-1,B.propToCol(e)),B.DESTINATION_RENDERER),n.concat.apply(n,r(t))},this.getSourceData=function(e,t,n,o){return void 0===e?X.getData():X.getByRange(new x.CellCoords(e,t),new x.CellCoords(n,o))},this.getSourceDataArray=function(e,t,n,o){return void 0===e?X.getData(!0):X.getByRange(new x.CellCoords(e,t),new x.CellCoords(n,o),!0)},this.getSourceDataAtCol=function(e){return X.getAtColumn(e)},this.getSourceDataAtRow=function(e){return X.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return X.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(new x.CellCoords(e,0),new x.CellCoords(e,this.countCols()-1),B.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,o){var r=this,i=null,s=null;void 0===e&&(e=0,n=this.countRows(),t=0,o=this.countCols()),void 0===n&&(n=e),void 0===o&&(o=t);var a="mixed";return(0,k.rangeEach)(Math.min(e,n),Math.max(e,n),function(e){var n=!0;return(0,k.rangeEach)(Math.min(t,o),Math.max(t,o),function(t){var o=r.getCellMeta(e,t);return s=o.type,i?n=i===s:i=s,n}),a=n?s:"mixed",n}),a},this.removeCellMeta=function(e,t,n){var o=oe.toPhysical(e,t),r=a(o,2),i=r[0],s=r[1],l=I.cellSettings[i][s][n];!1!==ee.runHooks("beforeRemoveCellMeta",e,t,n,l)&&(delete I.cellSettings[i][s][n],ee.runHooks("afterRemoveCellMeta",e,t,n,l)),l=null},this.spliceCellsMeta=function(e,t){for(var n,o=arguments.length,r=Array(o>2?o-2:0),i=2;o>i;i++)r[i-2]=arguments[i];(n=I.cellSettings).splice.apply(n,[e,t].concat(r))},this.setCellMetaObject=function(e,t,n){if("object"===(void 0===n?"undefined":s(n)))for(var o in n)if((0,b.hasOwnProperty)(n,o)){var r=n[o];this.setCellMeta(e,t,o,r)}},this.setCellMeta=function(e,t,n,o){var r=oe.toPhysical(e,t),i=a(r,2),s=i[0],l=i[1];I.columnSettings[l]||(I.columnSettings[l]=(0,c.columnFactory)(te,I.columnsSettingConflicts)),I.cellSettings[s]||(I.cellSettings[s]=[]),I.cellSettings[s][l]||(I.cellSettings[s][l]=new I.columnSettings[l]),I.cellSettings[s][l][n]=o,ee.runHooks("afterSetCellMeta",e,t,n,o)},this.getCellsMeta=function(){return(0,E.arrayFlatten)(I.cellSettings)},this.getCellMeta=function(e,t){var n=B.colToProp(t),o=void 0,r=oe.toPhysical(e,t),i=a(r,2),s=i[0],l=i[1];if(null===s&&(s=e),I.columnSettings[l]||(I.columnSettings[l]=(0,c.columnFactory)(te,I.columnsSettingConflicts)),I.cellSettings[s]||(I.cellSettings[s]=[]),I.cellSettings[s][l]||(I.cellSettings[s][l]=new I.columnSettings[l]),o=I.cellSettings[s][l],o.row=s,o.col=l,o.visualRow=e,o.visualCol=t,o.prop=n,o.instance=ee,ee.runHooks("beforeGetCellMeta",e,t,o),(0,b.extend)(o,M(o)),o.cells){var u=o.cells.call(o,s,l,n);u&&((0,b.extend)(o,u),(0,b.extend)(o,M(u)))}return ee.runHooks("afterGetCellMeta",e,t,o),o},this.getCellMetaAtRow=function(e){return I.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===ee.dataType||ee.getSettings().columns)};var ie=(0,H.cellMethodLookupFactory)("renderer");this.getCellRenderer=function(e,t){return(0,T.getRenderer)(ie.call(this,e,t))},this.getCellEditor=(0,H.cellMethodLookupFactory)("editor");var se=(0,H.cellMethodLookupFactory)("validator");this.getCellValidator=function(e,t){var n=se.call(this,e,t);return"string"==typeof n&&(n=(0,_.getValidator)(n)),n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){var r=new o;e&&(r.onQueueEmpty=e);for(var i=ee.countRows()-1;i>=0;)if(void 0===t||-1!==t.indexOf(i)){for(var s=ee.countCols()-1;s>=0;)void 0===n||-1!==n.indexOf(s)?(r.addValidatorToQueue(),ee.validateCell(ee.getDataAtCell(i,s),ee.getCellMeta(i,s),function(e){if("boolean"!=typeof e)throw Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells"),s--):s--;i--}else i--;r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=I.settings.rowHeaders;return void 0!==e&&(e=ee.runHooks("modifyRowHeader",e)),void 0===e?(t=[],(0,k.rangeEach)(ee.countRows()-1,function(e){t.push(ee.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[e]?t=t[e]:(0,h.isFunction)(t)?t=t(e):t&&"string"!=typeof t&&"number"!=typeof t&&(t=e+1),t},this.hasRowHeaders=function(){return!!I.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==I.settings.colHeaders&&null!==I.settings.colHeaders)return!!I.settings.colHeaders;for(var e=0,t=ee.countCols();t>e;e++)if(ee.getColHeader(e))return!0;return!1},this.getColHeader=function(e){var t=I.settings.columns&&(0,h.isFunction)(I.settings.columns),n=I.settings.colHeaders;if(void 0===(e=ee.runHooks("modifyColHeader",e))){for(var o=[],r=t?ee.countSourceCols():ee.countCols(),i=0;r>i;i++)o.push(ee.getColHeader(i));n=o}else{var s=e;e=ee.runHooks("modifyCol",e);var a=function(e){for(var t=[],n=ee.countSourceCols(),o=0;n>o;o++)(0,h.isFunction)(ee.getSettings().columns)&&ee.getSettings().columns(o)&&t.push(o);return t[e]}(e);I.settings.columns&&(0,h.isFunction)(I.settings.columns)&&I.settings.columns(a)&&I.settings.columns(a).title?n=I.settings.columns(a).title:I.settings.columns&&I.settings.columns[e]&&I.settings.columns[e].title?n=I.settings.columns[e].title:Array.isArray(I.settings.colHeaders)&&void 0!==I.settings.colHeaders[e]?n=I.settings.colHeaders[e]:(0,h.isFunction)(I.settings.colHeaders)?n=I.settings.colHeaders(e):I.settings.colHeaders&&"string"!=typeof I.settings.colHeaders&&"number"!=typeof I.settings.colHeaders&&(n=(0,H.spreadsheetColumnLabel)(s))}return n},this._getColWidthFromSettings=function(e){var t=ee.getCellMeta(0,e),n=t.width;if(void 0!==n&&n!==I.settings.width||(n=t.colWidths),void 0!==n&&null!==n){switch(void 0===n?"undefined":s(n)){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return n},this.getColWidth=function(e){var t=ee._getColWidthFromSettings(e);return t=ee.runHooks("modifyColWidth",t,e),void 0===t&&(t=x.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){var t=I.settings.rowHeights;if(void 0!==t&&null!==t){switch(void 0===t?"undefined":s(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){var t=ee._getRowHeightFromSettings(e);return t=ee.runHooks("modifyRowHeight",t,e)},this.countSourceRows=function(){return ee.runHooks("modifySourceLength")||(ee.getSourceData()?ee.getSourceData().length:0)},this.countSourceCols=function(){var e=ee.getSourceData()&&ee.getSourceData()[0]?ee.getSourceData()[0]:[];return(0,b.isObject)(e)?(0,b.deepObjectSize)(e):e.length||0},this.countRows=function(){return B.getLength()},this.countCols=function(){var e=this.getSettings().maxCols,t=!1,n=0;if("array"===ee.dataType&&(t=I.settings.data&&I.settings.data[0]&&I.settings.data[0].length),t&&(n=I.settings.data[0].length),I.settings.columns){if((0,h.isFunction)(I.settings.columns))if("array"===ee.dataType){for(var o=0,r=0;n>r;r++)I.settings.columns(r)&&o++;n=o}else"object"!==ee.dataType&&"function"!==ee.dataType||(n=B.colToPropCache.length);else n=I.settings.columns.length}else"object"!==ee.dataType&&"function"!==ee.dataType||(n=B.colToPropCache.length);return Math.min(e,n)},this.rowOffset=function(){return ee.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return ee.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return ee.view.wt.drawn?ee.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return ee.view.wt.drawn?ee.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return ee.view.wt.drawn?ee.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return ee.view.wt.drawn?ee.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(e){var t=0;return(0,k.rangeEachReverse)(ee.countRows()-1,function(n){if(ee.isEmptyRow(n))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(e){if(1>ee.countRows())return 0;var t=0;return(0,k.rangeEachReverse)(ee.countCols()-1,function(n){if(ee.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return I.settings.isEmptyRow.call(ee,e)},this.isEmptyCol=function(e){return I.settings.isEmptyCol.call(ee,e)},this.selectCell=function(e,t,n,o){var r=4>=arguments.length||void 0===arguments[4]||arguments[4],i=5>=arguments.length||void 0===arguments[5]||arguments[5];return!(0,d.isUndefined)(e)&&!(0,d.isUndefined)(t)&&this.selectCells([[e,t,n,o]],r,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=1>=arguments.length||void 0===arguments[1]||arguments[1],n=2>=arguments.length||void 0===arguments[2]||arguments[2];!1===t&&(Z=!0);var o=re.selectCells(e);return o&&n&&ee.listen(),Z=!1,o},this.selectCellByProp=function(e,t,n,o){var r=4>=arguments.length||void 0===arguments[4]||arguments[4],i=5>=arguments.length||void 0===arguments[5]||arguments[5];return(0,f.warn)((0,S.toSingleLine)(l)),this.selectCells([[e,t,n,o]],r,i)},this.selectColumns=function(e){return re.selectColumns(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e)},this.selectRows=function(e){return re.selectRows(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:e)},this.deselectCell=function(){re.deselect()},this.selectAll=function(){Z=!0,re.selectAll(),Z=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e&&(0>e||e>=ee.countRows()))return!1;if(void 0!==t&&(0>t||t>=ee.countCols()))return!1;var r=!1;return void 0!==e&&void 0!==t&&(ee.view.wt.wtOverlays.topOverlay.scrollTo(e,n),ee.view.wt.wtOverlays.leftOverlay.scrollTo(t,o),r=!0),"number"==typeof e&&"number"!=typeof t&&(ee.view.wt.wtOverlays.topOverlay.scrollTo(e,n),r=!0),"number"==typeof t&&"number"!=typeof e&&(ee.view.wt.wtOverlays.leftOverlay.scrollTo(t,o),r=!0),r},this.destroy=function(){ee._clearTimeouts(),ee.view&&ee.view.destroy(),X&&X.destroy(),X=null,(0,Y.stopObserving)();(0,u.empty)(ee.rootElement),ne.destroy(),J&&J.destroy(),ee.runHooks("afterDestroy"),j.default.getSingleton().destroy(ee);for(var e in ee)(0,b.hasOwnProperty)(ee,e)&&((0,h.isFunction)(ee[e])?ee[e]=N:"guid"!==e&&(ee[e]=null));B&&B.destroy(),B=null,I=null,q=null,re=null,J=null,ee=null,te=null},this.getActiveEditor=function(){return J.getActiveEditor()},this.getPlugin=function(e){return(0,O.getPlugin)(this,e)},this.getInstance=function(){return ee},this.addHook=function(e,t){j.default.getSingleton().add(e,t,ee)},this.hasHook=function(e){return j.default.getSingleton().has(e,ee)},this.addHookOnce=function(e,t){j.default.getSingleton().once(e,t,ee)},this.removeHook=function(e,t){j.default.getSingleton().remove(e,t,ee)},this.runHooks=function(e,t,n,o,r,i,s){return j.default.getSingleton().run(ee,e,t,n,o,r,i,s)},this.getTranslatedPhrase=function(e,t){return(0,V.getTranslatedPhrase)(I.settings.language,e,t)},this.timeouts=[],this._registerTimeout=function(e){this.timeouts.push(e)},this._clearTimeouts=function(){for(var e=0,t=this.timeouts.length;t>e;e++)clearTimeout(this.timeouts[e])},this._refreshBorders=function(e){J.destroyEditor(e),ee.view.render(),re.isSelected()&&J.prepareEditor()},j.default.getSingleton().run(ee,"construct")}t.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["Deprecation warning: This method is going to be removed in the next release. \n If you want to select a cell using props, please use the `selectCell` method."],["Deprecation warning: This method is going to be removed in the next release.\\x20\n If you want to select a cell using props, please use the \\`selectCell\\` method."]);t.default=i;var u=n(0),c=n(89),h=n(42),f=n(56),d=n(16),p=n(27),g=n(263),v=o(g),y=n(266),m=o(y),w=n(6),C=o(w),b=n(2),E=n(1),S=n(41),O=n(8),T=n(13),_=n(28),R=n(36),k=n(5),M=n(267),A=o(M),N=n(268),P=o(N),H=n(90),L=n(193),D=n(194),x=n(4),I=n(15),j=o(I),B=n(195),F=o(B),W=n(87),V=n(196),U=n(71),z=n(197),Y=n(198),G=n(272),K=null},function(e,t,n){"use strict";function o(e,t){function n(){}(0,r.inherit)(n,e);for(var o=0,i=t.length;i>o;o++)n.prototype[t[o]]=void 0;return n}t.__esModule=!0,t.columnFactory=o;var r=n(2)},function(e,t,n){"use strict";function o(e){for(var t=e+1,n="",o=void 0;t>0;)o=(t-1)%d,n=String.fromCharCode(65+o)+n,t=parseInt((t-o)/d,10);return n}function r(e){var t=0;if(e)for(var n=0,o=e.length-1;e.length>n;n+=1,o-=1)t+=Math.pow(d,o)*(f.indexOf(e[n])+1);return--t}function i(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,i=[];for(e=0;n>e;e++){var s=[];for(t=0;r>t;t++)s.push(o(t)+(e+1));i.push(s)}return i}function s(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,i=[];for(e=0;n>e;e++){var s={};for(t=0;r>t;t++)s["prop"+t]=o(t)+(e+1);i.push(s)}return i}function a(e,t){for(var n=[],o=void 0,r=0;e>r;r++){o=[];for(var i=0;t>i;i++)o.push("");n.push(o)}return n}function l(e){var t,n,o,r,i=[],s=0;for(t=0,n=e.length;n>t;t++)for(o=0,r=e[t].length;r>o;o++)o==s&&(i.push([]),s++),i[o].push(e[t][o]);return i}function u(e,t){return t=void 0===t||t,function(n,o){return function n(o){if(o){if((0,h.hasOwnProperty)(o,e)&&void 0!==o[e])return o[e];if((0,h.hasOwnProperty)(o,"type")&&o.type){var r;if("string"!=typeof o.type)throw Error("Cell type must be a string ");if(r=(0,c.getCellType)(o.type),(0,h.hasOwnProperty)(r,e))return r[e];if(t)return}return n(Object.getPrototypeOf(o))}}("number"==typeof n?this.getCellMeta(n,o):n)}}t.__esModule=!0,t.spreadsheetColumnLabel=o,t.spreadsheetColumnIndex=r,t.createSpreadsheetData=i,t.createSpreadsheetObjectData=s,t.createEmptySpreadsheetData=a,t.translateRowsToColumns=l,t.cellMethodLookupFactory=u;var c=n(87),h=n(2),f="ABCDEFGHIJKLMNOPQRSTUVWXYZ",d=f.length},function(e,t,n){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;if(t!==w&&t!==C)throw Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),r=t===w,i=d;if(n){var s=e[0];if(0===e.length)i=p;else if(r&&s instanceof c.CellRange)i=v;else if(r&&Array.isArray(s))i=o(s,C);else if(e.length>=2&&4>=e.length){var a=!e.some(function(e,t){return!m[t].includes(void 0===e?"undefined":u(e))});a&&(i=g)}}return i}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,o=void 0!==n&&n,r=t.propToCol;if(!y.includes(e))throw Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===v,i=n?t.from.row:t[0],s=n?t.from.col:t[1],a=n?t.to.row:t[2],l=n?t.to.col:t[3];if("function"==typeof r&&("string"==typeof s&&(s=r(s)),"string"==typeof l&&(l=r(l))),(0,f.isUndefined)(a)&&(a=i),(0,f.isUndefined)(l)&&(l=s),!o){var u=i,c=s,h=a,d=l;i=Math.min(u,h),s=Math.min(c,d),a=Math.max(u,h),l=Math.max(c,d)}return[i,s,a,l]}}function i(e){var t=o(e);if(t===d||t===p)return[];var n=r(t),i=new Set;(0,h.arrayEach)(e,function(e){var t=n(e),o=l(t,4),r=o[1],s=o[3],a=s-r+1;(0,h.arrayEach)(Array.from(Array(a),function(e,t){return r+t}),function(e){i.has(e)||i.add(e)})});var s=Array.from(i).sort(function(e,t){return e-t});return(0,h.arrayReduce)(s,function(e,t,n,o){return 0!==n&&t===o[n-1]+1?e[e.length-1][1]++:e.push([t,1]),e},[])}function s(e){var t=o(e);if(t===d||t===p)return[];var n=r(t),i=new Set;(0,h.arrayEach)(e,function(e){var t=n(e),o=l(t,3),r=o[0],s=o[2],a=s-r+1;(0,h.arrayEach)(Array.from(Array(a),function(e,t){return r+t}),function(e){i.has(e)||i.add(e)})});var s=Array.from(i).sort(function(e,t){return e-t});return(0,h.arrayReduce)(s,function(e,t,n,o){return 0!==n&&t===o[n-1]+1?e[e.length-1][1]++:e.push([t,1]),e},[])}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&t>e}t.__esModule=!0,t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var l=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.detectSelectionType=o,t.normalizeSelectionFactory=r,t.transformSelectionToColumnDistance=i,t.transformSelectionToRowDistance=s,t.isValidCoord=a;var c=n(4),h=n(1),f=n(16),d=t.SELECTION_TYPE_UNRECOGNIZED=0,p=t.SELECTION_TYPE_EMPTY=1,g=t.SELECTION_TYPE_ARRAY=2,v=t.SELECTION_TYPE_OBJECT=3,y=t.SELECTION_TYPES=[v,g],m=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],w=Symbol("root"),C=Symbol("child")},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),s=n(1);t.default=function(){function e(t){o(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return r(e,[{key:"addRow",value:function(e,t){if(this.columns.length)throw Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"addColumnHeadersRow",value:function(e){if(null!=this.hot.getColHeader(0)){var t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tHead.appendChild(this.createColumnHeadersRow()),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}},{key:"addColumn",value:function(e,t){if(this.rows.length)throw Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"getHeights",value:function(e){this.injected||this.injectTable(),(0,s.arrayEach)(this.rows,function(t){e(t.row,(0,i.outerHeight)(t.table)-1)})}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,s.arrayEach)(this.columns,function(t){e(t.col,(0,i.outerWidth)(t.table))})}},{key:"setSettings",value:function(e){this.settings=e}},{key:"setSetting",value:function(e,t){this.settings||(this.settings={}),this.settings[e]=t}},{key:"getSettings",value:function(){return this.settings}},{key:"getSetting",value:function(e){return this.settings?this.settings[e]:null}},{key:"createColGroupsCol",value:function(){var e=this,t=document,n=t.createDocumentFragment();return this.hot.hasRowHeaders()&&n.appendChild(this.createColElement(-1)),this.samples.forEach(function(t){(0,s.arrayEach)(t.strings,function(t){n.appendChild(e.createColElement(t.col))})}),n}},{key:"createRow",value:function(e){var t=this,n=document,o=n.createDocumentFragment(),r=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),o.appendChild(r)),this.samples.forEach(function(r){(0,s.arrayEach)(r.strings,function(r){var i=r.col,s=t.hot.getCellMeta(e,i);s.col=i,s.row=e;var a=t.hot.getCellRenderer(s),l=n.createElement("td");a(t.hot,l,e,i,t.hot.colToProp(i),r.value,s),o.appendChild(l)})}),o}},{key:"createColumnHeadersRow",value:function(){var e=this,t=document,n=t.createDocumentFragment();if(this.hot.hasRowHeaders()){var o=t.createElement("th");this.hot.view.appendColHeader(-1,o),n.appendChild(o)}return this.samples.forEach(function(o){(0,s.arrayEach)(o.strings,function(o){var r=o.col,i=t.createElement("th");e.hot.view.appendColHeader(r,i),n.appendChild(i)})}),n}},{key:"createCol",value:function(e){var t=this,n=document,o=n.createDocumentFragment();return this.samples.forEach(function(r){(0,s.arrayEach)(r.strings,function(r){var i=r.row,s=t.hot.getCellMeta(i,e);s.col=e,s.row=i;var a=t.hot.getCellRenderer(s),l=n.createElement("td"),u=n.createElement("tr");a(t.hot,l,i,e,t.hot.colToProp(e),r.value,s),u.appendChild(l),o.appendChild(u)})}),o}},{key:"clean",value:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}},{key:"injectTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(e){var t=document,n=t.createElement("col");return n.style.width=this.hot.view.wt.wtTable.getStretchedColumnWidth(e)+"px",n}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document,n=t.createDocumentFragment(),o=t.createElement("table"),r=t.createElement("thead"),s=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&o.appendChild(a),this.isHorizontal()&&(l.appendChild(u),r.appendChild(l),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(r),this.isVertical()&&s.appendChild(l),o.appendChild(s),(0,i.addClass)(o,e),n.appendChild(o),{fragment:n,table:o,tHead:r,tBody:s,colGroup:a,tr:l,th:u}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document,n=t.createDocumentFragment(),o=t.createElement("div");return e="htGhostTable htAutoSize "+e.trim(),(0,i.addClass)(o,e),n.appendChild(o),{fragment:n,container:o}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),e}()},function(e,t,n){"use strict";function o(){return{name:r}}t.__esModule=!0,t.default=o;var r=t.KEY="---------"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){var e={};return(0,C.objectEach)(L,function(t,n){e[n]=t()}),e}function s(e,t){-1===H.indexOf(e)&&(L[e]=t)}t.__esModule=!0,t.ITEMS=t.UNDO=t.SEPARATOR=t.ROW_BELOW=t.ROW_ABOVE=t.REMOVE_ROW=t.REMOVE_COLUMN=t.REDO=t.READ_ONLY=t.COLUMN_RIGHT=t.COLUMN_LEFT=t.CLEAR_COLUMN=t.ALIGNMENT=void 0;var a,l=n(300);Object.defineProperty(t,"ALIGNMENT",{enumerable:!0,get:function(){return l.KEY}});var u=n(301);Object.defineProperty(t,"CLEAR_COLUMN",{enumerable:!0,get:function(){return u.KEY}});var c=n(302);Object.defineProperty(t,"COLUMN_LEFT",{enumerable:!0,get:function(){return c.KEY}});var h=n(303);Object.defineProperty(t,"COLUMN_RIGHT",{enumerable:!0,get:function(){return h.KEY}});var f=n(304);Object.defineProperty(t,"READ_ONLY",{enumerable:!0,get:function(){return f.KEY}});var d=n(305);Object.defineProperty(t,"REDO",{enumerable:!0,get:function(){return d.KEY}});var p=n(306);Object.defineProperty(t,"REMOVE_COLUMN",{enumerable:!0,get:function(){return p.KEY}});var g=n(307);Object.defineProperty(t,"REMOVE_ROW",{enumerable:!0,get:function(){return g.KEY}});var v=n(308);Object.defineProperty(t,"ROW_ABOVE",{enumerable:!0,get:function(){return v.KEY}});var y=n(309);Object.defineProperty(t,"ROW_BELOW",{enumerable:!0,get:function(){return y.KEY}});var m=n(93);Object.defineProperty(t,"SEPARATOR",{enumerable:!0,get:function(){return m.KEY}});var w=n(310);Object.defineProperty(t,"UNDO",{enumerable:!0,get:function(){return w.KEY}}),t.predefinedItems=i,t.addItem=s;var C=n(2),b=o(l),E=o(u),S=o(c),O=o(h),T=o(f),_=o(d),R=o(p),k=o(g),M=o(v),A=o(y),N=o(m),P=o(w),H=t.ITEMS=[v.KEY,y.KEY,c.KEY,h.KEY,u.KEY,g.KEY,p.KEY,w.KEY,d.KEY,f.KEY,l.KEY,m.KEY],L=(a={},r(a,m.KEY,N.default),r(a,v.KEY,M.default),r(a,y.KEY,A.default),r(a,c.KEY,S.default),r(a,h.KEY,O.default),r(a,u.KEY,E.default),r(a,g.KEY,k.default),r(a,p.KEY,R.default),r(a,w.KEY,P.default),r(a,d.KEY,_.default),r(a,f.KEY,T.default),r(a,l.KEY,b.default),a)},function(e,t,n){"use strict";function o(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=o(["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."],["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."]),a=o(["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."],["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."]),l=o(["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.']),u=o(["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.'],["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.']),c=n(4),h=n(41);t.default=function(){function e(t,n,o,i){r(this,e),this.row=t,this.col=n,this.rowspan=o,this.colspan=i,this.removed=!1}return i(e,[{key:"normalize",value:function(e){var t=e.countRows(),n=e.countCols();0>this.row?this.row=0:this.row>t-1&&(this.row=t-1),0>this.col?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col)}},{key:"includes",value:function(e,t){return!(this.row>e||this.col>t||e>this.row+this.rowspan-1||t>this.col+this.colspan-1)}},{key:"includesHorizontally",value:function(e){return e>=this.col&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return e>=this.row&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,t){var n=e[0]||e[1],o=t+Math.abs(e[0]||e[1])-1,r=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",s=Math.min(t,o),a=Math.max(t,o),l=this[i],u=this[i]+this[r]-1;if(t>l||(this[i]+=n),n>0)u>=t&&t>l&&(this[r]+=n);else if(0>n){if(l>=s&&a>=u)return this.removed=!0,!1;if(l<s||a<l)if(s<l||u<a){if(s>=l&&u>=s&&a>u){var c=u-s+1;this[r]-=c}}else this[r]+=n;else{var h=a-l+1,f=Math.abs(n)-h;this[i]-=f+n,this[r]-=h}}return!0}},{key:"isFarther",value:function(e,t){return!e||("down"===t?this.row+this.rowspan-1>e.row+e.rowspan-1:"up"===t?e.row>this.row:"right"===t?this.col+this.colspan-1>e.col+e.colspan-1:"left"===t?e.col>this.col:null)}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return new c.CellRange(new c.CellCoords(this.row,this.col),new c.CellCoords(this.row,this.col),new c.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,h.toSingleLine)(s,e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,h.toSingleLine)(a,e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,h.toSingleLine)(l,e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,h.toSingleLine)(u,e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return 0>e.row||0>e.col||0>e.rowspan||0>e.colspan}},{key:"isSingleCell",value:function(e){return 1===e.colspan&&1===e.rowspan}},{key:"containsZeroSpan",value:function(e){return 0===e.colspan||0===e.rowspan}},{key:"isOutOfBounds",value:function(e,t,n){return 0>e.row||0>e.col||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}]),e}()},function(e,t,n){"use strict";var o=n(97),r=n(45);e.exports=n(66)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=o.getEntry(r(this,"Map"),e);return t&&t.v},set:function(e,t){return o.def(r(this,"Map"),0===e?0:e,t)}},o,!0)},function(e,t,n){"use strict";var o=n(20).f,r=n(74),i=n(61),s=n(32),a=n(63),l=n(64),u=n(106),c=n(108),h=n(109),f=n(22),d=n(34).fastKey,p=n(45),g=f?"_s":"size",v=function(e,t){var n,o=d(t);if("F"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e(function(e,o){a(e,c,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[g]=0,void 0!=o&&l(o,n,e[u],e)});return i(c.prototype,{clear:function(){for(var e=p(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=p(this,t),o=v(n,e);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[g]--}return!!o},forEach:function(e){p(this,t);for(var n,o=s(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(p(this,t),e)}}),f&&o(c.prototype,"size",{get:function(){return p(this,t)[g]}}),c},def:function(e,t,n){var o,r,i=v(e,t);return i?i.v=n:(e._l=i={i:r=d(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[g]++,"F"!==r&&(e._i[r]=i)),e},getEntry:v,setStrong:function(e,t,n){u(e,t,function(e,n){this._t=p(e,t),this._k=n,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?c(0,n.k):"values"==t?c(0,n.v):c(0,[n.k,n.v]):(e._t=void 0,c(1))},n?"entries":"values",!n,!0),h(t)}}},function(e,t,n){e.exports=!n(22)&&!n(23)(function(){return 7!=Object.defineProperty(n(72)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var o=n(29),r=n(24),i=n(100)(!1),s=n(76)("IE_PROTO");e.exports=function(e,t){var n,a=r(e),l=0,u=[];for(n in a)n!=s&&o(a,n)&&u.push(n);for(;t.length>l;)o(a,n=t[l++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){var o=n(24),r=n(25),i=n(60);e.exports=function(e){return function(t,n,s){var a,l=o(t),u=r(l.length),c=i(s,u);if(e&&n!=n){for(;u>c;)if((a=l[c++])!=a)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var o=n(14).document;e.exports=o&&o.documentElement},function(e,t,n){var o=n(18);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(50),r=n(11)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){var o=n(105),r=n(11)("iterator"),i=n(50);e.exports=n(44).getIteratorMethod=function(e){if(void 0!=e)return e[r]||e["@@iterator"]||i[o(e)]}},function(e,t,n){var o=n(43),r=n(11)("toStringTag"),i="Arguments"==o(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=s(t=Object(e),r))?n:i?o(t):"Object"==(a=o(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var o=n(65),r=n(3),i=n(30),s=n(31),a=n(50),l=n(208),u=n(51),c=n(107),h=n(11)("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,p,g,v,y){l(n,t,p);var m,w,C,b=function(e){if(!f&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",S="values"==g,O=!1,T=e.prototype,_=T[h]||T["@@iterator"]||g&&T[g],R=_||b(g),k=g?S?b("entries"):R:void 0,M="Array"==t?T.entries||_:_;if(M&&(C=c(M.call(new e)))!==Object.prototype&&C.next&&(u(C,E,!0),o||"function"==typeof C[h]||s(C,h,d)),S&&_&&"values"!==_.name&&(O=!0,R=function(){return _.call(this)}),o&&!y||!f&&!O&&T[h]||s(T,h,R),a[t]=R,a[E]=d,g)if(m={values:S?R:b("values"),keys:v?R:b("keys"),entries:k},y)for(w in m)w in T||i(T,w,m[w]);else r(r.P+r.F*(f||O),t,m);return m}},function(e,t,n){var o=n(29),r=n(33),i=n(76)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var o=n(14),r=n(20),i=n(22),s=n(11)("species");e.exports=function(e){var t=o[e];i&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var o=n(9),r=n(18),i=function(e,t){if(r(e),!o(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,o){try{o=n(32)(Function.call,n(67).f(Object.prototype,"__proto__").set,2),o(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:o(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){"use strict";var o=n(97),r=n(45);e.exports=n(66)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return o.def(r(this,"Set"),e=0===e?0:e,e)}},o)},function(e,t,n){"use strict";var o,r=n(68)(0),i=n(30),s=n(34),a=n(114),l=n(115),u=n(9),c=n(23),h=n(45),f=s.getWeak,d=Object.isExtensible,p=l.ufstore,g={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(u(e)){var t=f(e);return!0===t?p(h(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(h(this,"WeakMap"),e,t)}},m=e.exports=n(66)("WeakMap",v,y,l,!0,!0);c(function(){return 7!=(new m).set((Object.freeze||Object)(g),7).get(g)})&&(o=l.getConstructor(v,"WeakMap"),a(o.prototype,y),s.NEED=!0,r(["delete","has","get","set"],function(e){var t=m.prototype,n=t[e];i(t,e,function(t,r){if(u(t)&&!d(t)){this._f||(this._f=new o);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)})}))},function(e,t,n){var o=n(43);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(37),r=n(69),i=n(52),s=n(33),a=n(75),l=Object.assign;e.exports=!l||n(23)(function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=o})?function(e,t){for(var n=s(e),l=arguments.length,u=1,c=r.f,h=i.f;l>u;)for(var f,d=a(arguments[u++]),p=c?o(d).concat(c(d)):o(d),g=p.length,v=0;g>v;)h.call(d,f=p[v++])&&(n[f]=d[f]);return n}:l},function(e,t,n){"use strict";var o=n(61),r=n(34).getWeak,i=n(18),s=n(9),a=n(63),l=n(64),u=n(68),c=n(29),h=n(45),f=u(5),d=u(6),p=0,g=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return f(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var u=e(function(e,o){a(e,u,t,"_i"),e._t=t,e._i=p++,e._l=void 0,void 0!=o&&l(o,n,e[i],e)});return o(u.prototype,{delete:function(e){if(!s(e))return!1;var n=r(e);return!0===n?g(h(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!s(e))return!1;var n=r(e);return!0===n?g(h(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var o=r(i(t),!0);return!0===o?g(e).set(t,n):o[e._i]=n,e},ufstore:g}},function(e,t,n){"use strict";var o=n(115),r=n(45);n(66)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return o.def(r(this,"WeakSet"),e,!0)}},o,!1,!0)},function(e,t,n){"use strict";var o,r,i,s,a=n(65),l=n(14),u=n(32),c=n(105),h=n(3),f=n(9),d=n(62),p=n(63),g=n(64),v=n(212),y=n(80).set,m=n(214)(),w=n(118),C=n(215),b=n(216),E=l.TypeError,S=l.process,O=l.Promise,T="process"==c(S),_=function(){},R=r=w.f,k=!!function(){try{var e=O.resolve(1),t=(e.constructor={})[n(11)("species")]=function(e){e(_,_)};return(T||"function"==typeof PromiseRejectionEvent)&&e.then(_)instanceof t}catch(e){}}(),M=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},A=function(e,t){if(!e._n){e._n=!0;var n=e._c;m(function(){for(var o=e._v,r=1==e._s,i=0;n.length>i;)!function(t){var n,i,s,a=r?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{a?(r||(2==e._h&&H(e),e._h=1),!0===a?n=o:(c&&c.enter(),n=a(o),c&&(c.exit(),s=!0)),n===t.promise?u(E("Promise-chain cycle")):(i=M(n))?i.call(n,l,u):l(n)):u(o)}catch(e){c&&!s&&c.exit(),u(e)}}(n[i++]);e._c=[],e._n=!1,t&&!e._h&&N(e)})}},N=function(e){y.call(l,function(){var t,n,o,r=e._v,i=P(e);if(i&&(t=C(function(){T?S.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",r)}),e._h=T||P(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},P=function(e){return 1!==e._h&&0===(e._a||e._c).length},H=function(e){y.call(l,function(){var t;T?S.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},L=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),A(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw E("Promise can't be resolved itself");(t=M(e))?m(function(){var o={_w:n,_d:!1};try{t.call(e,u(D,o,1),u(L,o,1))}catch(e){L.call(o,e)}}):(n._v=e,n._s=1,A(n,!1))}catch(e){L.call({_w:n,_d:!1},e)}}};k||(O=function(e){p(this,O,"Promise","_h"),d(e),o.call(this);try{e(u(D,this,1),u(L,this,1))}catch(e){L.call(this,e)}},o=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},o.prototype=n(61)(O.prototype,{then:function(e,t){var n=R(v(this,O));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=T?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new o;this.promise=e,this.resolve=u(D,e,1),this.reject=u(L,e,1)},w.f=R=function(e){return e===O||e===s?new i(e):r(e)}),h(h.G+h.W+h.F*!k,{Promise:O}),n(51)(O,"Promise"),n(109)("Promise"),s=n(44).Promise,h(h.S+h.F*!k,"Promise",{reject:function(e){var t=R(this);return(0,t.reject)(e),t.promise}}),h(h.S+h.F*(a||!k),"Promise",{resolve:function(e){return b(a&&this===s?O:this,e)}}),h(h.S+h.F*!(k&&n(79)(function(e){O.all(e).catch(_)})),"Promise",{all:function(e){var t=this,n=R(t),o=n.resolve,r=n.reject,i=C(function(){var n=[],i=0,s=1;g(e,!1,function(e){var a=i++,l=!1;n.push(void 0),s++,t.resolve(e).then(function(e){l||(l=!0,n[a]=e,--s||o(n))},r)}),--s||o(n)});return i.e&&r(i.v),n.promise},race:function(e){var t=this,n=R(t),o=n.reject,r=C(function(){g(e,!1,function(e){t.resolve(e).then(n.resolve,o)})});return r.e&&o(r.v),n.promise}})},function(e,t,n){"use strict";function o(e){var t,n;this.promise=new e(function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o}),this.resolve=r(t),this.reject=r(n)}var r=n(62);e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";var o=n(14),r=n(29),i=n(22),s=n(3),a=n(30),l=n(34).KEY,u=n(23),c=n(77),h=n(51),f=n(48),d=n(11),p=n(120),g=n(217),v=n(218),y=n(113),m=n(18),w=n(9),C=n(24),b=n(73),E=n(49),S=n(74),O=n(121),T=n(67),_=n(20),R=n(37),k=T.f,M=_.f,A=O.f,N=o.Symbol,P=o.JSON,H=P&&P.stringify,L=d("_hidden"),D=d("toPrimitive"),x={}.propertyIsEnumerable,I=c("symbol-registry"),j=c("symbols"),B=c("op-symbols"),F=Object.prototype,W="function"==typeof N,V=o.QObject,U=!V||!V.prototype||!V.prototype.findChild,z=i&&u(function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(e,t,n){var o=k(F,t);o&&delete F[t],M(e,t,n),o&&e!==F&&M(F,t,o)}:M,Y=function(e){var t=j[e]=S(N.prototype);return t._k=e,t},G=W&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},K=function(e,t,n){return e===F&&K(B,t,n),m(e),t=b(t,!0),m(n),r(j,t)?(n.enumerable?(r(e,L)&&e[L][t]&&(e[L][t]=!1),n=S(n,{enumerable:E(0,!1)})):(r(e,L)||M(e,L,E(1,{})),e[L][t]=!0),z(e,t,n)):M(e,t,n)},X=function(e,t){m(e);for(var n,o=v(t=C(t)),r=0,i=o.length;i>r;)K(e,n=o[r++],t[n]);return e},q=function(e,t){return void 0===t?S(e):X(S(e),t)},J=function(e){var t=x.call(this,e=b(e,!0));return!(this===F&&r(j,e)&&!r(B,e))&&(!(t||!r(this,e)||!r(j,e)||r(this,L)&&this[L][e])||t)},Q=function(e,t){if(e=C(e),t=b(t,!0),e!==F||!r(j,t)||r(B,t)){var n=k(e,t);return!n||!r(j,t)||r(e,L)&&e[L][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=A(C(e)),o=[],i=0;n.length>i;)r(j,t=n[i++])||t==L||t==l||o.push(t);return o},Z=function(e){for(var t,n=e===F,o=A(n?B:C(e)),i=[],s=0;o.length>s;)!r(j,t=o[s++])||n&&!r(F,t)||i.push(j[t]);return i};W||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(B,n),r(this,L)&&r(this[L],e)&&(this[L][e]=!1),z(this,e,E(1,n))};return i&&U&&z(F,e,{configurable:!0,set:t}),Y(e)},a(N.prototype,"toString",function(){return this._k}),T.f=Q,_.f=K,n(81).f=O.f=$,n(52).f=J,n(69).f=Z,i&&!n(65)&&a(F,"propertyIsEnumerable",J,!0),p.f=function(e){return Y(d(e))}),s(s.G+s.W+s.F*!W,{Symbol:N});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)d(ee[te++]);for(var ne=R(d.store),oe=0;ne.length>oe;)g(ne[oe++]);s(s.S+s.F*!W,"Symbol",{for:function(e){return r(I,e+="")?I[e]:I[e]=N(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){U=!0},useSimple:function(){U=!1}}),s(s.S+s.F*!W,"Object",{create:q,defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:$,getOwnPropertySymbols:Z}),P&&s(s.S+s.F*(!W||u(function(){var e=N();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))})),"JSON",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(w(t)||void 0!==e)&&!G(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),o[1]=t,H.apply(P,o)}}),N.prototype[D]||n(31)(N.prototype,D,N.prototype.valueOf),h(N,"Symbol"),h(Math,"Math",!0),h(o.JSON,"JSON",!0)},function(e,t,n){t.f=n(11)},function(e,t,n){var o=n(24),r=n(81).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return r(e)}catch(e){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==i.call(e)?a(e):r(o(e))}},function(e,t,n){var o=n(9),r=n(34).onFreeze;n(26)("freeze",function(e){return function(t){return e&&o(t)?e(r(t)):t}})},function(e,t,n){var o=n(9),r=n(34).onFreeze;n(26)("seal",function(e){return function(t){return e&&o(t)?e(r(t)):t}})},function(e,t,n){var o=n(9),r=n(34).onFreeze;n(26)("preventExtensions",function(e){return function(t){return e&&o(t)?e(r(t)):t}})},function(e,t,n){var o=n(9);n(26)("isFrozen",function(e){return function(t){return!o(t)||!!e&&e(t)}})},function(e,t,n){var o=n(9);n(26)("isSealed",function(e){return function(t){return!o(t)||!!e&&e(t)}})},function(e,t,n){var o=n(9);n(26)("isExtensible",function(e){return function(t){return!!o(t)&&(!e||e(t))}})},function(e,t,n){var o=n(24),r=n(67).f;n(26)("getOwnPropertyDescriptor",function(){return function(e,t){return r(o(e),t)}})},function(e,t,n){var o=n(33),r=n(107);n(26)("getPrototypeOf",function(){return function(e){return r(o(e))}})},function(e,t,n){var o=n(33),r=n(37);n(26)("keys",function(){return function(e){return r(o(e))}})},function(e,t,n){n(26)("getOwnPropertyNames",function(){return n(121).f})},function(e,t,n){var o=n(3);o(o.S+o.F,"Object",{assign:n(114)})},function(e,t,n){var o=n(3);o(o.S,"Object",{is:n(219)})},function(e,t,n){var o=n(3);o(o.S,"Object",{setPrototypeOf:n(110).set})},function(e,t,n){var o=n(20).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(22)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){var o=n(3),r=n(24),i=n(25);o(o.S,"String",{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,s=[],a=0;n>a;)s.push(t[a++]+""),o>a&&s.push(arguments[a]+"");return s.join("")}})},function(e,t,n){var o=n(3),r=n(60),i=String.fromCharCode,s=String.fromCodePoint;o(o.S+o.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,s=0;o>s;){if(t=+arguments[s++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(65536>t?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var o=n(3),r=n(220)(!1);o(o.P,"String",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){var o=n(3);o(o.P,"String",{repeat:n(140)})},function(e,t,n){"use strict";var o=n(59),r=n(38);e.exports=function(e){var t=r(this)+"",n="",i=o(e);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";var o=n(3),r=n(25),i=n(82),s="".startsWith;o(o.P+o.F*n(83)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=e+"";return s?s.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){var o=n(9),r=n(43),i=n(11)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(3),r=n(25),i=n(82),s="".endsWith;o(o.P+o.F*n(83)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),a=void 0===n?o:Math.min(r(n),o),l=e+"";return s?s.call(t,l,a):t.slice(a-l.length,a)===l}})},function(e,t,n){"use strict";var o=n(3),r=n(82);o(o.P+o.F*n(83)("includes"),"String",{includes:function(e){return!!~r(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(22)&&"g"!=/./g.flags&&n(20).f(RegExp.prototype,"flags",{configurable:!0,get:n(221)})},function(e,t,n){n(70)("match",1,function(e,t,n){return[function(n){"use strict";var o=e(this),r=void 0==n?void 0:n[t];return void 0!==r?r.call(n,o):RegExp(n)[t](o+"")},n]})},function(e,t,n){n(70)("replace",2,function(e,t,n){return[function(o,r){"use strict";var i=e(this),s=void 0==o?void 0:o[t];return void 0!==s?s.call(o,i,r):n.call(i+"",o,r)},n]})},function(e,t,n){n(70)("split",2,function(e,t,o){"use strict";var r=n(142),i=o,s=[].push,a="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[a]||2!="ab".split(/(?:ab)*/)[a]||4!=".".split(/(.?)(.?)/)[a]||".".split(/()()/)[a]>1||"".split(/.?/)[a]){var l=void 0===/()??/.exec("")[1];o=function(e,t){var n=this+"";if(void 0===e&&0===t)return[];if(!r(e))return i.call(n,e,t);var o,u,c,h,f,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,v=void 0===t?4294967295:t>>>0,y=RegExp(e.source,p+"g");for(l||(o=RegExp("^"+y.source+"$(?!\\s)",p));(u=y.exec(n))&&((c=u.index+u[0][a])<=g||(d.push(n.slice(g,u.index)),!l&&u[a]>1&&u[0].replace(o,function(){for(f=1;arguments[a]-2>f;f++)void 0===arguments[f]&&(u[f]=void 0)}),u[a]>1&&n[a]>u.index&&s.apply(d,u.slice(1)),h=u[0][a],g=c,v>d[a]));)y.lastIndex===u.index&&y.lastIndex++;return g===n[a]?!h&&y.test("")||d.push(""):d.push(n.slice(g)),d[a]>v?d.slice(0,v):d}}else"0".split(void 0,0)[a]&&(o=function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)});return[function(n,r){var i=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,i,r):o.call(i+"",n,r)},o]})},function(e,t,n){n(70)("search",1,function(e,t,n){return[function(n){"use strict";var o=e(this),r=void 0==n?void 0:n[t];return void 0!==r?r.call(n,o):RegExp(n)[t](o+"")},n]})},function(e,t,n){"use strict";var o=n(32),r=n(3),i=n(33),s=n(102),a=n(103),l=n(25),u=n(84),c=n(104);r(r.S+r.F*!n(79)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,h,f=i(e),d="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g,y=0,m=c(f);if(v&&(g=o(g,p>2?arguments[2]:void 0,2)),void 0==m||d==Array&&a(m))for(t=l(f.length),n=new d(t);t>y;y++)u(n,y,v?g(f[y],y):f[y]);else for(h=m.call(f),n=new d;!(r=h.next()).done;y++)u(n,y,v?s(h,g,[r.value,y],!0):r.value);return n.length=y,n}})},function(e,t,n){"use strict";var o=n(3),r=n(84);o(o.S+o.F*n(23)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){var o=n(3);o(o.P,"Array",{copyWithin:n(222)}),n(46)("copyWithin")},function(e,t,n){"use strict";var o=n(3),r=n(68)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),o(o.P+o.F*i,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("find")},function(e,t,n){"use strict";var o=n(3),r=n(68)(6),i="findIndex",s=!0;i in[]&&Array(1)[i](function(){s=!1}),o(o.P+o.F*s,"Array",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)(i)},function(e,t,n){var o=n(3);o(o.P,"Array",{fill:n(223)}),n(46)("fill")},function(e,t,n){var o=n(3),r=n(14).isFinite;o(o.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){var o=n(3);o(o.S,"Number",{isInteger:n(158)})},function(e,t,n){var o=n(9),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){var o=n(3),r=n(158),i=Math.abs;o(o.S,"Number",{isSafeInteger:function(e){return r(e)&&9007199254740991>=i(e)}})},function(e,t,n){var o=n(3);o(o.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(3);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(3);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(3);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";var o=n(3),r=n(100)(!0);o(o.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(46)("includes")},function(e,t,n){var o=n(3),r=n(166)(!1);o(o.S,"Object",{values:function(e){return r(e)}})},function(e,t,n){var o=n(37),r=n(24),i=n(52).f;e.exports=function(e){return function(t){for(var n,s=r(t),a=o(s),l=a.length,u=0,c=[];l>u;)i.call(s,n=a[u++])&&c.push(e?[n,s[n]]:s[n]);return c}}},function(e,t,n){var o=n(3),r=n(166)(!0);o(o.S,"Object",{entries:function(e){return r(e)}})},function(e,t,n){var o=n(3),r=n(224),i=n(24),s=n(67),a=n(84);o(o.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),l=s.f,u=r(o),c={},h=0;u.length>h;)void 0!==(n=l(o,t=u[h++]))&&a(c,t,n);return c}})},function(e,t,n){"use strict";var o=n(3),r=n(170);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(n(171)),"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var o=n(25),r=n(140),i=n(38);e.exports=function(e,t,n,s){var a=i(e)+"",l=a.length,u=void 0===n?" ":n+"",c=o(t);if(l>=c||""==u)return a;var h=c-l,f=r.call(u,Math.ceil(h/u.length));return f.length>h&&(f=f.slice(0,h)),s?f+a:a+f}},function(e,t,n){var o=n(14),r=o.navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var o=n(3),r=n(170);o(o.P+o.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(n(171)),"String",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){var o=n(3),r=n(80);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(85),r=n(37),i=n(30),s=n(14),a=n(31),l=n(50),u=n(11),c=u("iterator"),h=u("toStringTag"),f=l.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=r(d),g=0;p.length>g;g++){var v,y=p[g],m=d[y],w=s[y],C=w&&w.prototype;if(C&&(C[c]||a(C,c,f),C[h]||a(C,h,y),l[y]=f,m))for(v in o)C[v]||i(C,v,o[v],!0)}},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=new WeakMap;t.default=function(){function e(t,n,r,s,a,l,u){var c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:function(e){return e};o(this,e),i.set(this,{viewportWidth:t,scrollOffset:n,totalColumns:r,columnWidthFn:s,overrideFn:a,onlyFullyVisible:l,stretchingColumnWidthFn:c}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=u,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}return r(e,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),r(e,[{key:"calculate",value:function(){for(var e=0,t=!0,n=[],o=void 0,r=i.get(this),s=r.onlyFullyVisible,a=r.overrideFn,l=r.scrollOffset,u=r.totalColumns,c=r.viewportWidth,h=0;u>h;h++){o=this._getColumnWidth(h),e>l||s||(this.startColumn=h);var f=l>0?c+1:c;if(l>e||e+o>l+f||(null==this.startColumn&&(this.startColumn=h),this.endColumn=h),n.push(e),e+=o,s||(this.endColumn=h),e>=l+c){t=!1;break}}if(this.endColumn===u-1&&t)for(this.startColumn=this.endColumn;this.startColumn>0;){var d=n[this.endColumn]+o-n[this.startColumn-1];if(d>c&&s||this.startColumn--,d>c)break}null!==this.startColumn&&a&&a(this),this.startPosition=n[this.startColumn],void 0==this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}},{key:"refreshStretching",value:function(e){if("none"!==this.stretch){this.totalTargetWidth=e;for(var t=i.get(this),n=t.totalColumns,o=0,r=0;n>r;r++){var s=this._getColumnWidth(r),a=t.stretchingColumnWidthFn(void 0,r);"number"==typeof a?e-=a:o+=s}var l=e-o;if("all"===this.stretch&&l>0)this.stretchAllRatio=e/o,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&e!==1/0){var u=this._getColumnWidth(n-1),c=l+u;this.stretchLastWidth=0>c?u:c}}}},{key:"getStretchedColumnWidth",value:function(e,t){var n=null;return"all"===this.stretch&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}},{key:"_getStretchedAllColumnWidth",value:function(e,t){var n=0,o=i.get(this),r=o.totalColumns;if(!this.stretchAllColumnsWidth[e]){var s=Math.round(t*this.stretchAllRatio),a=o.stretchingColumnWidthFn(s,e);this.stretchAllColumnsWidth[e]=void 0===a?s:isNaN(a)?this._getColumnWidth(e):a}if(this.stretchAllColumnsWidth.length===r&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var l=0;this.stretchAllColumnsWidth.length>l;l++)n+=this.stretchAllColumnsWidth[l];n!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-n)}return this.stretchAllColumnsWidth[e]}},{key:"_getStretchedLastColumnWidth",value:function(e){return e===i.get(this).totalColumns-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(t){var n=i.get(this).columnWidthFn(t);return void 0===n&&(n=e.DEFAULT_WIDTH),n}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=new WeakMap;t.default=function(){function e(t,n,r,s,a,l,u){o(this,e),i.set(this,{viewportHeight:t,scrollOffset:n,totalRows:r,rowHeightFn:s,overrideFn:a,onlyFullyVisible:l,horizontalScrollbarHeight:u}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()}return r(e,null,[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),r(e,[{key:"calculate",value:function(){for(var t=0,n=!0,o=[],r=i.get(this),s=r.onlyFullyVisible,a=r.overrideFn,l=r.rowHeightFn,u=r.scrollOffset,c=r.totalRows,h=r.viewportHeight,f=r.horizontalScrollbarHeight||0,d=void 0,p=0;c>p;p++)if(d=l(p),void 0===d&&(d=e.DEFAULT_HEIGHT),t>u||s||(this.startRow=p),u>t||t+d>u+h-f||(null===this.startRow&&(this.startRow=p),this.endRow=p),o.push(t),t+=d,s||(this.endRow=p),t>=u+h-f){n=!1;break}if(this.endRow===c-1&&n)for(this.startRow=this.endRow;this.startRow>0;){var g=o[this.endRow]+d-o[this.startRow-1];if(g>h-f&&s||this.startRow--,g>=h-f)break}null!==this.startRow&&a&&a(this),this.startPosition=o[this.startRow],void 0==this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.default=function(){function e(t,n,r){o(this,e),this.offset=t,this.total=n,this.countTH=r}return r(e,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleRowHeadedColumnToSourceColumn",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceColumnToVisibleRowHeadedColumn",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.default=function(){function e(t,n,r){o(this,e),this.offset=t,this.total=n,this.countTH=r}return r(e,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleColHeadedRowToSourceRow",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceRowToVisibleColHeadedRow",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),e}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(0),a=n(2),l=n(36),u=n(180),c=o(u),h=n(181),f=o(h),d=n(182),p=o(d),g=n(183),v=o(g),y=n(184),m=o(y),w=n(186),C=o(w);t.default=function(){function e(t){r(this,e);var n=[];if(this.guid="wt_"+(0,l.randomString)(),t.cloneSource?(this.cloneSource=t.cloneSource,this.cloneOverlay=t.cloneOverlay,this.wtSettings=t.cloneSource.wtSettings,this.wtTable=new m.default(this,t.table,t.wtRootElement),this.wtScroll=new p.default(this),this.wtViewport=t.cloneSource.wtViewport,this.wtEvent=new c.default(this),this.selections=this.cloneSource.selections):(this.wtSettings=new v.default(this,t),this.wtTable=new m.default(this,t.table),this.wtScroll=new p.default(this),this.wtViewport=new C.default(this),this.wtEvent=new c.default(this),this.selections=this.getSetting("selections"),this.wtOverlays=new f.default(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var o=0,i=this.wtTable.THEAD.childNodes[0].childNodes.length;i>o;o++)n.push(this.wtTable.THEAD.childNodes[0].childNodes[o].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,t){(0,s.fastInnerText)(t,n[e])}])}this.drawn=!1,this.drawInterrupted=!1}return i(e,[{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||(0,s.isVisible)(this.wtTable.TABLE)?this.wtTable.draw(e):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e){if(1>=arguments.length||void 0===arguments[1]||!arguments[1])return this.wtTable.getCell(e);var t=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),o=this.wtSettings.getSetting("fixedRowsBottom"),r=this.wtSettings.getSetting("fixedColumnsLeft");if(n>e.row&&r>e.col)return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e);if(n>e.row)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(r>e.col&&e.row>=t-o){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(r>e.col)return this.wtOverlays.leftOverlay.clone.wtTable.getCell(e);if(t>e.row&&e.row>t-o&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}},{key:"update",value:function(e,t){return this.wtSettings.update(e,t)}},{key:"scrollVertical",value:function(e){return this.wtOverlays.topOverlay.scrollTo(e),this.getSetting("onScrollVertically"),this}},{key:"scrollHorizontal",value:function(e){return this.wtOverlays.leftOverlay.scrollTo(e),this.getSetting("onScrollHorizontally"),this}},{key:"scrollViewport",value:function(e){return this.wtScroll.scrollViewport(e),this}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"getOverlayName",value:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"}},{key:"isOverlayName",value:function(e){return!!this.cloneOverlay&&this.cloneOverlay.type===e}},{key:"exportSettingsAsClassNames",value:function(){var e=this,t={rowHeaders:["array"],columnHeaders:["array"]},n=[],o=[];(0,a.objectEach)(t,function(t,r){t.indexOf("array")>-1&&e.getSetting(r).length&&o.push("ht"+(0,l.toUpperCaseFirst)(r)),n.push("ht"+(0,l.toUpperCaseFirst)(r))}),(0,s.removeClass)(this.wtTable.wtRootElement.parentNode,n),(0,s.addClass)(this.wtTable.wtRootElement.parentNode,o)}},{key:"getSetting",value:function(e,t,n,o,r){return this.wtSettings.getSetting(e,t,n,o,r)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}]),e}()},function(e,t,n){"use strict";function o(e){var t=this,n=new l.default(e),o=void 0;this.instance=e;var a=[null,null];this.dblClickTimeout=[null,null];var u=function(e){var n=document.activeElement,o=(0,i.partial)(r.getParent,e.realTarget),s=e.realTarget;if(s!==n&&o(0)!==n&&o(1)!==n){var l=t.parentCell(s);(0,r.hasClass)(s,"corner")?t.instance.getSetting("onCellCornerMouseDown",e,s):l.TD&&t.instance.hasSetting("onCellMouseDown")&&t.instance.getSetting("onCellMouseDown",e,l.coords,l.TD,t.instance),2!==e.button&&l.TD&&(a[0]=l.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout(function(){a[0]=null},1e3))}},c=function(e){t.instance.touchMoving=!0},h=function(e){n.addEventListener(this,"touchmove",c),t.checkIfTouchMove=setTimeout(function(){!0===t.instance.touchMoving&&(t.instance.touchMoving=void 0,n.removeEventListener("touchmove",c,!1)),u(e)},30)},f=function(e){var n,o,i;t.instance.hasSetting("onCellMouseOver")&&(n=t.instance.wtTable.TABLE,o=(0,r.closestDown)(e.realTarget,["TD","TH"],n),i=t.instance.cloneSource||t.instance,o&&o!==i.lastMouseOver&&(0,r.isChildOf)(o,n)&&(i.lastMouseOver=o,t.instance.getSetting("onCellMouseOver",e,t.instance.wtTable.getCoords(o),o,t.instance)))},d=function(e){var n=void 0,o=void 0,i=void 0;t.instance.hasSetting("onCellMouseOut")&&(n=t.instance.wtTable.TABLE,o=(0,r.closestDown)(e.realTarget,["TD","TH"],n),i=(0,r.closestDown)(e.relatedTarget,["TD","TH"],n),o&&o!==i&&(0,r.isChildOf)(o,n)&&t.instance.getSetting("onCellMouseOut",e,t.instance.wtTable.getCoords(o),o,t.instance))},p=function(e){if(2!==e.button){var n=t.parentCell(e.realTarget);n.TD===a[0]&&n.TD===a[1]?((0,r.hasClass)(e.realTarget,"corner")?t.instance.getSetting("onCellCornerDblClick",e,n.coords,n.TD,t.instance):t.instance.getSetting("onCellDblClick",e,n.coords,n.TD,t.instance),a[0]=null,a[1]=null):n.TD===a[0]?(t.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,t.instance),a[1]=n.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout(function(){a[1]=null},500)):n.TD&&t.instance.hasSetting("onCellMouseUp")&&t.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,t.instance)}},g=function(e){var n=t.parentCell(e),r=n.coords;if(o&&r){var i=[r.row,o.from.row],s=i[0],a=i[1],l=[r.col,o.from.col],u=l[0],c=l[1];return s===a&&u===c}return!1},v=function(e){var t=["A","BUTTON","INPUT"],n=e.target;!1!==g(n)&&!1!==t.includes(n.tagName)||(e.preventDefault(),p(e))};if(n.addEventListener(this.instance.wtTable.holder,"mousedown",u),n.addEventListener(this.instance.wtTable.TABLE,"mouseover",f),n.addEventListener(this.instance.wtTable.TABLE,"mouseout",d),n.addEventListener(this.instance.wtTable.holder,"mouseup",p),this.instance.wtTable.holder.parentNode.parentNode&&(0,s.isMobileBrowser)()&&!t.instance.wtTable.isWorkingOnClone()){var y="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");n.addEventListener(this.instance.wtTable.holder,"touchstart",function(n){o=e.selections.getCell().cellRange,t.instance.touchApplied=!0,(0,r.isChildOf)(n.target,y)&&h.call(n.target,n)}),n.addEventListener(this.instance.wtTable.holder,"touchend",function(e){t.instance.touchApplied=!1,(0,r.isChildOf)(e.target,y)&&v.call(e.target,e)}),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),n.addEventListener(this.instance.wtTable.holder,"scroll",function(e){clearTimeout(t.instance.momentumScrolling._timeout),t.instance.momentumScrolling.ongoing||t.instance.getSetting("onBeforeTouchScroll"),t.instance.momentumScrolling.ongoing=!0,t.instance.momentumScrolling._timeout=setTimeout(function(){t.instance.touchApplied||(t.instance.momentumScrolling.ongoing=!1,t.instance.getSetting("onAfterMomentumScroll"))},200)})}n.addEventListener(window,"resize",function(){"none"!==t.instance.getSetting("stretchH")&&t.instance.draw()}),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),n.destroy()}}t.__esModule=!0;var r=n(0),i=n(42),s=n(27),a=n(6),l=function(e){return e&&e.__esModule?e:{default:e}}(a);o.prototype.parentCell=function(e){var t={},n=this.instance.wtTable.TABLE,o=(0,r.closestDown)(e,["TD","TH"],n);return o?(t.coords=this.instance.wtTable.getCoords(o),t.TD=o):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"current")?(t.coords=this.instance.selections.getCell().cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):(0,r.hasClass)(e,"wtBorder")&&(0,r.hasClass)(e,"area")&&this.instance.selections.createOrGetArea().cellRange&&(t.coords=this.instance.selections.createOrGetArea().cellRange.to,t.TD=this.instance.wtTable.getCell(t.coords)),t},t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(0),a=n(1),l=n(21),u=n(27),c=n(6),h=o(c),f=n(35),d=o(f);t.default=function(){function e(t){r(this,e);var n=parseInt(getComputedStyle(document.body).lineHeight,10),o=1.2*parseInt(getComputedStyle(document.body).fontSize,10);this.wot=t,this.instance=this.wot,this.eventManager=new h.default(this.wot),this.wot.update("scrollbarWidth",(0,s.getScrollbarWidth)()),this.wot.update("scrollbarHeight",(0,s.getScrollbarWidth)()),this.scrollableElement=(0,s.getScrollableElement)(this.wot.wtTable.TABLE),this.prepareOverlays(),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},bottom:{top:null,left:0},left:{top:0,left:null}},this.pendingScrollCallbacks={master:{top:0,left:0},top:{left:0},bottom:{left:0},left:{top:0}},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.delegatedScrollCallback=!1,this.registeredListeners=[],this.browserLineHeight=n||o,this.registerListeners()}return i(e,[{key:"prepareOverlays",value:function(){var e=!1;return this.topOverlay?e=this.topOverlay.updateStateOfRendering()||e:this.topOverlay=d.default.createOverlay(d.default.CLONE_TOP,this.wot),d.default.hasOverlay(d.default.CLONE_BOTTOM)||(this.bottomOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),d.default.hasOverlay(d.default.CLONE_BOTTOM_LEFT_CORNER)||(this.bottomLeftCornerOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),this.bottomOverlay?e=this.bottomOverlay.updateStateOfRendering()||e:this.bottomOverlay=d.default.createOverlay(d.default.CLONE_BOTTOM,this.wot),this.leftOverlay?e=this.leftOverlay.updateStateOfRendering()||e:this.leftOverlay=d.default.createOverlay(d.default.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay?e=this.topLeftCornerOverlay.updateStateOfRendering()||e:this.topLeftCornerOverlay=d.default.createOverlay(d.default.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.bottomLeftCornerOverlay?e=this.bottomLeftCornerOverlay.updateStateOfRendering()||e:this.bottomLeftCornerOverlay=d.default.createOverlay(d.default.CLONE_BOTTOM_LEFT_CORNER,this.wot)),this.wot.getSetting("debug")&&!this.debug&&(this.debug=d.default.createOverlay(d.default.CLONE_DEBUG,this.wot)),e}},{key:"refreshAll",value:function(){if(this.wot.drawn){if(!this.wot.wtTable.holder.parentNode)return void this.destroy();this.wot.draw(!0),this.verticalScrolling&&this.leftOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1}}},{key:"registerListeners",value:function(){var e=this,t=this.topOverlay.mainTableScrollableElement,n=this.leftOverlay.mainTableScrollableElement,o=[];o.push([document.documentElement,"keydown",function(t){return e.onKeyDown(t)}]),o.push([document.documentElement,"keyup",function(){return e.onKeyUp()}]),o.push([document,"visibilitychange",function(){return e.onKeyUp()}]),o.push([t,"scroll",function(t){return e.onTableScroll(t)}]),t!==n&&o.push([n,"scroll",function(t){return e.onTableScroll(t)}]);var r=window.devicePixelRatio&&window.devicePixelRatio>1;for(r||!(0,u.isChrome)()?o.push([this.instance.wtTable.wtRootElement.parentNode,"wheel",function(t){return e.onCloneWheel(t)}]):(this.topOverlay.needFullRender&&o.push([this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomOverlay.needFullRender&&o.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.leftOverlay.needFullRender&&o.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&o.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&o.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onCloneWheel(t)}])),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&o.push([window,"wheel",function(t){var n=void 0,o=t.wheelDeltaY||t.deltaY,r=t.wheelDeltaX||t.deltaX;e.topOverlay.clone.wtTable.holder.contains(t.realTarget)?n="top":e.bottomOverlay.clone&&e.bottomOverlay.clone.wtTable.holder.contains(t.realTarget)?n="bottom":e.leftOverlay.clone.wtTable.holder.contains(t.realTarget)?n="left":e.topLeftCornerOverlay&&e.topLeftCornerOverlay.clone&&e.topLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)?n="topLeft":e.bottomLeftCornerOverlay&&e.bottomLeftCornerOverlay.clone&&e.bottomLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)&&(n="bottomLeft"),("top"===n&&0!==o||"left"===n&&0!==r||"bottom"===n&&0!==o||("topLeft"===n||"bottomLeft"===n)&&(0!==o||0!==r))&&t.preventDefault()}]);o.length;){var i=o.pop();this.eventManager.addEventListener(i[0],i[1],i[2]),this.registeredListeners.push(i)}}},{key:"deregisterListeners",value:function(){for(;this.registeredListeners.length;){var e=this.registeredListeners.pop();this.eventManager.removeEventListener(e[0],e[1],e[2])}}},{key:"onTableScroll",value:function(e){var t=this.leftOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,o=e.target;this.keyPressed&&(n!==window&&o!==window&&!e.target.contains(n)||t!==window&&o!==window&&!e.target.contains(t))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e){this.scrollableElement!==window&&e.preventDefault();var t=this.leftOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,o=e.target,r=n!==window&&o!==window&&!e.target.contains(n),i=t!==window&&o!==window&&!e.target.contains(t);this.keyPressed&&(r||i)||this.translateMouseWheelToScroll(e)}},{key:"onKeyDown",value:function(e){this.keyPressed=(0,l.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,n=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;return 1===e.deltaMode&&(n+=n*this.browserLineHeight,t+=t*this.browserLineHeight),this.scrollVertically(t),this.scrollHorizontally(n),!1}},{key:"scrollVertically",value:function(e){if(0===e)return 0;this.scrollableElement.scrollTop+=e}},{key:"scrollHorizontally",value:function(e){if(0===e)return 0;this.scrollableElement.scrollLeft+=e}},{key:"syncScrollPositions",value:function(e){if(!this.destroyed){var t=this.topOverlay.clone.wtTable.holder,n=this.leftOverlay.clone.wtTable.holder,o=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],r=o[0],i=o[1];this.horizontalScrolling=t.scrollLeft!==r,this.verticalScrolling=n.scrollTop!==i,this.horizontalScrolling&&(t.scrollLeft=r),this.verticalScrolling&&(n.scrollTop=i,this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=r)),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,t=e.scrollLeft,n=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement(),this.scrollableElement=(0,s.getScrollableElement)(this.wot.wtTable.TABLE),this.registerListeners()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,o=t.clientHeight;n===this.spreaderLastSize.width&&o===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,this.spreaderLastSize.height=o,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot.getSetting("totalColumns"),n=this.wot.getSetting("totalRows"),o=this.wot.wtViewport.getRowHeaderWidth(),r=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width=o+this.leftOverlay.sumCellSizes(0,t)+"px",i.height=r+this.topOverlay.sumCellSizes(0,n)+1+"px",this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.clone&&this.bottomOverlay.adjustElementsSize(e)}},{key:"applyToDOM",value:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{key:"getParentOverlay",value:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return(0,a.arrayEach)(t,function(t,o){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)}),n}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),s=n(5);t.default=function(){function e(t){o(this,e),this.wot=t,this.instance=t}return r(e,[{key:"scrollViewport",value:function(e){if(this.wot.drawn){var t=this._getVariables(),n=t.topOverlay,o=t.leftOverlay,r=t.totalRows,i=t.totalColumns,s=t.fixedRowsTop,a=t.fixedRowsBottom,l=t.fixedColumnsLeft;if(0>e.row||e.row>Math.max(r-1,0))throw Error("row "+e.row+" does not exist");if(0>e.col||e.col>Math.max(i-1,0))throw Error("column "+e.col+" does not exist");e.row>=s&&e.row<this.getFirstVisibleRow()?n.scrollTo(e.row):e.row>this.getLastVisibleRow()&&r-a>e.row&&n.scrollTo(e.row,!0),e.col>=l&&e.col<this.getFirstVisibleColumn()?o.scrollTo(e.col):e.col>this.getLastVisibleColumn()&&o.scrollTo(e.col,!0)}}},{key:"getFirstVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,o=e.wtViewport,r=e.totalRows,a=e.fixedRowsTop,l=n.getFirstVisibleRow();if(t.mainTableScrollableElement===window){var u=(0,i.offset)(n.wtRootElement),c=(0,i.innerHeight)(n.hider),h=(0,i.innerHeight)(window),f=(0,i.getScrollTop)(window);if(f>=u.top+c-h){var d=o.getColumnHeaderHeight();d+=t.sumCellSizes(0,a),(0,s.rangeEachReverse)(r,1,function(e){if(d+=t.sumCellSizes(e-1,e),f>=u.top+c-d)return l=e,!1})}}return l}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,o=e.wtViewport,r=e.totalRows,a=n.getLastVisibleRow();if(t.mainTableScrollableElement===window){var l=(0,i.offset)(n.wtRootElement),u=(0,i.innerHeight)(window),c=(0,i.getScrollTop)(window);if(l.top>c){var h=o.getColumnHeaderHeight();(0,s.rangeEach)(1,r,function(e){if(h+=t.sumCellSizes(e-1,e),l.top+h-c>=u)return a=e-2,!1})}}return a}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,o=e.wtViewport,r=e.totalColumns,a=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===window){var l=(0,i.offset)(n.wtRootElement),u=(0,i.innerWidth)(n.hider),c=(0,i.innerWidth)(window),h=(0,i.getScrollLeft)(window);if(h>=l.left+u-c){var f=o.getRowHeaderWidth();(0,s.rangeEachReverse)(r,1,function(e){if(f+=t.sumCellSizes(e-1,e),h>=l.left+u-f)return a=e,!1})}}return a}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,o=e.wtViewport,r=e.totalColumns,a=n.getLastVisibleColumn();if(t.mainTableScrollableElement===window){var l=(0,i.offset)(n.wtRootElement),u=(0,i.innerWidth)(window),c=(0,i.getScrollLeft)(window);if(l.left>c){var h=o.getRowHeaderWidth();(0,s.rangeEach)(1,r,function(e){if(h+=t.sumCellSizes(e-1,e),l.left+h-c>=u)return a=e-2,!1})}}return a}},{key:"_getVariables",value:function(){var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),s=n(2);t.default=function(){function e(t,n){var r=this;o(this,e),this.wot=t,this.instance=t,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},data:void 0,freezeOverlays:!1,fixedColumnsLeft:0,fixedRowsTop:0,fixedRowsBottom:0,minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,n){var o=r.getSetting("data",e,t);(0,i.fastInnerText)(n,void 0===o||null===o?"":o)},columnWidth:function(e){},rowHeight:function(e){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown: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:function(e){return e},onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null},this.settings={};for(var a in this.defaults)if((0,s.hasOwnProperty)(this.defaults,a))if(void 0!==n[a])this.settings[a]=n[a];else{if(void 0===this.defaults[a])throw Error('A required setting "'+a+'" was not provided');this.settings[a]=this.defaults[a]}}return r(e,[{key:"update",value:function(e,t){if(void 0===t)for(var n in e)(0,s.hasOwnProperty)(e,n)&&(this.settings[n]=e[n]);else this.settings[e]=t;return this.wot}},{key:"getSetting",value:function(e,t,n,o,r){return"function"==typeof this.settings[e]?this.settings[e](t,n,o,r):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}},{key:"has",value:function(e){return!!this.settings[e]}}]),e}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(0),c=n(42),h=n(54),f=o(h),d=n(86),p=(o(d),n(177)),g=o(p),v=n(178),y=o(v),m=n(185),w=o(m),C=n(35),b=o(C);t.default=function(){function e(t,n){var o=this;i(this,e),this.wot=t,this.instance=this.wot,this.TABLE=n,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,(0,u.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.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var r=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return o._modifyRowHeaderWidth(r)}}return l(e,[{key:"fixTableDomTree",value:function(){this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=document.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=document.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=document.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(document.createElement("TR"))}},{key:"createSpreader",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,u.hasClass)(t,"wtHolder")||(n=document.createElement("div"),n.className="wtSpreader",t&&t.insertBefore(n,e),n.appendChild(e)),n.style.position="relative",n}},{key:"createHider",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,u.hasClass)(t,"wtHolder")||(n=document.createElement("div"),n.className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),n}},{key:"createHolder",value:function(e){var t=e.parentNode,n=void 0;return t&&1===t.nodeType&&(0,u.hasClass)(t,"wtHolder")||(n=document.createElement("div"),n.style.position="relative",n.className="wtHolder",t&&t.insertBefore(n,e),this.isWorkingOnClone()||(n.parentNode.className+="ht_master handsontable"),n.appendChild(e)),n}},{key:"alignOverlaysWithTrimmingContainer",value:function(){var e=(0,u.getTrimmingContainer)(this.wtRootElement);if(!this.isWorkingOnClone())if(this.holder.parentNode.style.position="relative",e===window){var t=this.wot.getSetting("preventOverflow");t||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else this.holder.style.width=(0,u.getStyle)(e,"width"),this.holder.style.height=(0,u.getStyle)(e,"height"),this.holder.style.overflow=""}},{key:"isWorkingOnClone",value:function(){return!!this.wot.cloneSource}},{key:"draw",value:function(e){var t=this.wot,n=t.wtOverlays,o=t.wtViewport,r=this.instance.getSetting("totalRows"),i=this.wot.getSetting("rowHeaders").length,s=this.wot.getSetting("columnHeaders").length,a=!1;if(!this.isWorkingOnClone()&&(this.holderOffset=(0,u.offset)(this.holder),e=o.createRenderCalculators(e),i&&!this.wot.getSetting("fixedColumnsLeft"))){var l=n.leftOverlay.getScrollPosition(),c=this.correctHeaderWidth;this.correctHeaderWidth=l>0,c!==this.correctHeaderWidth&&(e=!1)}if(this.isWorkingOnClone()||(a=n.prepareOverlays()),e)this.isWorkingOnClone()||o.createVisibleCalculators(),n&&n.refresh(!0);else{this.tableOffset=this.isWorkingOnClone()?this.wot.cloneSource.wtTable.tableOffset:(0,u.offset)(this.TABLE);var h=void 0;h=b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_DEBUG)||b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_TOP)||b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_TOP_LEFT_CORNER)?0:b.default.isOverlayTypeOf(this.instance.cloneOverlay,b.default.CLONE_BOTTOM)||b.default.isOverlayTypeOf(this.instance.cloneOverlay,b.default.CLONE_BOTTOM_LEFT_CORNER)?Math.max(r-this.wot.getSetting("fixedRowsBottom"),0):o.rowsRenderCalculator.startRow;var f=void 0;f=b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_DEBUG)||b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_LEFT)||b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_TOP_LEFT_CORNER)||b.default.isOverlayTypeOf(this.wot.cloneOverlay,b.default.CLONE_BOTTOM_LEFT_CORNER)?0:o.columnsRenderCalculator.startColumn,this.rowFilter=new y.default(h,r,s),this.columnFilter=new g.default(f,this.wot.getSetting("totalColumns"),i),this.alignOverlaysWithTrimmingContainer(),this._doDraw()}return this.refreshSelections(e),this.isWorkingOnClone()||(n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&n.bottomOverlay.resetFixedPosition(),n.leftOverlay.resetFixedPosition(),n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition()),a&&n.syncScrollWithMaster(),this.wot.drawn=!0,this}},{key:"_doDraw",value:function(){new w.default(this).render()}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll("."+e),n=0,o=t.length;o>n;n++)(0,u.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){if(this.wot.selections){var t=Array.from(this.wot.selections),n=t.length;if(e){for(var o=[],r=0;n>r;r++){for(var i=t[r].settings,s=i.highlightHeaderClassName,a=i.highlightRowClassName,l=i.highlightColumnClassName,u=t[r].classNames,c=u.length,h=0;c>h;h++)o.includes(u[h])||o.push(u[h]);s&&!o.includes(s)&&o.push(s),a&&!o.includes(a)&&o.push(a),l&&!o.includes(l)&&o.push(l)}var f=this.wot.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(f))for(var d=0;f.length>d;d++)o.push(f[d]);for(var p=o.length,g=0;p>g;g++)this.removeClassFromCells(o[g])}for(var v=0;n>v;v++)t[v].draw(this.wot,e)}}},{key:"getCell",value:function(e){var t=e.row,n=e.col,o=this.wot.getSetting("onModifyGetCellCoords",t,n);if(o&&Array.isArray(o)){var r=a(o,2);t=r[0],n=r[1]}if(this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;var i=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)];return i?i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)]:void 0}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];if(n)return n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getRowHeader",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0}},{key:"getCoords",value:function(e){if("TD"!==e.nodeName&&"TH"!==e.nodeName&&(e=(0,u.closest)(e,["TD","TH"])),null===e)return null;var t=e.parentNode,n=t.parentNode,o=(0,u.index)(t),r=e.cellIndex;return(0,u.overlayContainsElement)(b.default.CLONE_TOP_LEFT_CORNER,e)||(0,u.overlayContainsElement)(b.default.CLONE_TOP,e)?"THEAD"===n.nodeName&&(o-=n.childNodes.length):o=n===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter.renderedToSource(o),r=(0,u.overlayContainsElement)(b.default.CLONE_TOP_LEFT_CORNER,e)||(0,u.overlayContainsElement)(b.default.CLONE_LEFT,e)?this.columnFilter.offsettedTH(r):this.columnFilter.visibleRowHeadedColumnToSourceColumn(r),new f.default(o,r)}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"getFirstRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.startRow}},{key:"getFirstVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.startRow}},{key:"getFirstRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.startColumn}},{key:"getFirstVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.startColumn}},{key:"getLastRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.endRow}},{key:"getLastVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.endRow}},{key:"getLastRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.endColumn}},{key:"getLastVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.endColumn}},{key:"isRowBeforeRenderedRows",value:function(e){return this.rowFilter&&0>this.rowFilter.sourceToRendered(e)&&e>=0}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&0>this.columnFilter.sourceToRendered(e)&&e>=0}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastVisibleColumn()}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"getRenderedColumnsCount",value:function(){var e=this.wot.wtViewport.columnsRenderCalculator.count,t=this.wot.getSetting("totalColumns");if(this.wot.isOverlayName(b.default.CLONE_DEBUG))e=t;else if(this.wot.isOverlayName(b.default.CLONE_LEFT)||this.wot.isOverlayName(b.default.CLONE_TOP_LEFT_CORNER)||this.wot.isOverlayName(b.default.CLONE_BOTTOM_LEFT_CORNER))return Math.min(this.wot.getSetting("fixedColumnsLeft"),t);return e}},{key:"getRenderedRowsCount",value:function(){var e=this.wot.wtViewport.rowsRenderCalculator.count,t=this.wot.getSetting("totalRows");return this.wot.isOverlayName(b.default.CLONE_DEBUG)?e=t:this.wot.isOverlayName(b.default.CLONE_TOP)||this.wot.isOverlayName(b.default.CLONE_TOP_LEFT_CORNER)?e=Math.min(this.wot.getSetting("fixedRowsTop"),t):(this.wot.isOverlayName(b.default.CLONE_BOTTOM)||this.wot.isOverlayName(b.default.CLONE_BOTTOM_LEFT_CORNER))&&(e=Math.min(this.wot.getSetting("fixedRowsBottom"),t)),e}},{key:"getVisibleRowsCount",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")==this.getVisibleRowsCount()}},{key:"getRowHeight",value:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),n=this.wot.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}},{key:"getColumnHeaderHeight",value:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,n=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}},{key:"getVisibleColumnsCount",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")==this.getVisibleColumnsCount()}},{key:"getColumnWidth",value:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"===(void 0===t?"undefined":s(t))&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getColumnWidth(e),n=null==t?this.instance.wtSettings.settings.defaultColumnWidth:t,o=this.wot.wtViewport.columnsRenderCalculator;if(o){var r=o.getStretchedColumnWidth(e,n);r&&(n=r)}return n}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,c.isFunction)(e)?e():null;return Array.isArray(t)?(t=[].concat(r(t)),t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){return"number"!=typeof e&&(e=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&e++,e}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){var n=document.createElement("TH");return t.insertBefore(n,e),t.removeChild(e),n}function i(e,t){var n=document.createElement("TD");return t.insertBefore(n,e),t.removeChild(e),n}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number \n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.'],['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number \n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.']),l=n(0),u=n(56),c=n(41),h=n(35),f=function(e){return e&&e.__esModule?e:{default:e}}(h),d=!1;t.default=function(){function e(t){o(this,e),this.wtTable=t,this.wot=t.instance,this.instance=t.instance,this.rowFilter=t.rowFilter,this.columnFilter=t.columnFilter,this.TABLE=t.TABLE,this.THEAD=t.THEAD,this.TBODY=t.TBODY,this.COLGROUP=t.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0,this.fixedRowsBottom=0}return s(e,[{key:"render",value:function(){if(!this.wtTable.isWorkingOnClone()){var e={};if(this.wot.getSetting("beforeDraw",!0,e),!0===e.skipRender)return}this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.fixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var t=this.wtTable.getRenderedColumnsCount(),n=this.wtTable.getRenderedRowsCount(),o=this.wot.getSetting("totalColumns"),r=this.wot.getSetting("totalRows"),i=void 0,s=!1;if((f.default.isOverlayTypeOf(this.wot.cloneOverlay,f.default.CLONE_BOTTOM)||f.default.isOverlayTypeOf(this.wot.cloneOverlay,f.default.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),0>o||(this.adjustAvailableNodes(),s=!0,this.renderColumnHeaders(),this.renderRows(r,n,t),this.wtTable.isWorkingOnClone()||(i=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(t),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),s||this.adjustAvailableNodes(),this.removeRedundantRows(n),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(f.default.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(f.default.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var a=(0,l.outerWidth)(this.wtTable.hider),u=(0,l.outerWidth)(this.wtTable.TABLE);if(0!==a&&u!==a&&this.adjustColumnWidths(t),i!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var c=this.wtTable.getFirstRenderedColumn(),h=this.wtTable.getLastRenderedColumn(),d=this.wot.getSetting("defaultColumnWidth"),p=this.wot.getSetting("rowHeaderWidth");if(null!=(p=this.instance.getSetting("onModifyRowHeaderWidth",p)))for(var g=0;this.rowHeaderCount>g;g++){var v=Array.isArray(p)?p[g]:p;v=null==v?d:v,this.COLGROUP.childNodes[g].style.width=v+"px"}for(var y=c;h>y;y++){var m=this.wtTable.getStretchedColumnWidth(y);this.COLGROUP.childNodes[this.columnFilter.sourceToRendered(y)+this.rowHeaderCount].style.width=m+"px"}}this.wot.getSetting("onDraw",!0)}}},{key:"removeRedundantRows",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--}},{key:"renderRows",value:function(e,t,n){for(var o=void 0,r=0,i=this.rowFilter.renderedToSource(r),s=this.wtTable.isWorkingOnClone();e>i&&i>=0&&(!d&&r>1e3&&(d=!0,(0,u.warn)((0,c.toSingleLine)(a))),void 0===t||r!==t);){if(o=this.getOrCreateTrForRow(r,o),this.renderRowHeaders(i,o),this.adjustColumns(o,n+this.rowHeaderCount),this.renderCells(i,o,n),s&&!this.wot.isOverlayName(f.default.CLONE_BOTTOM)||this.resetOversizedRow(i),o.firstChild){var l=this.wot.wtTable.getRowHeight(i);l?(l--,o.firstChild.style.height=l+"px"):o.firstChild.style.height=""}r++,i=this.rowFilter.renderedToSource(r)}}},{key:"resetOversizedRow",value:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e=this.instance.wtTable.TBODY.childNodes.length,t=e*this.instance.wtSettings.settings.defaultRowHeight,n=(0,l.innerHeight)(this.instance.wtTable.TBODY)-1,o=void 0,r=void 0,i=void 0,s=void 0,a=void 0;this.instance.getSetting("totalRows");if(t!==n||this.instance.getSetting("fixedRowsBottom"))for(;e;)e--,i=this.instance.wtTable.rowFilter.renderedToSource(e),o=this.instance.wtTable.getRowHeight(i),s=this.instance.wtTable.getTrForRow(i),a=s.querySelector("th"),r=a?(0,l.innerHeight)(a):(0,l.innerHeight)(s)-1,(!o&&r>this.instance.wtSettings.settings.defaultRowHeight||r>o)&&(this.instance.wtViewport.oversizedRows[i]=++r)}}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot.getOverlayName();if(this.columnHeaderCount&&!this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]&&!this.wtTable.isWorkingOnClone()){for(var t=this.wtTable.getRenderedColumnsCount(),n=0;this.columnHeaderCount>n;n++)for(var o=-1*this.rowHeaderCount;t>o;o++)this.markIfOversizedColumnHeader(o);this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]=!0}}},{key:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot.getSetting("columnHeaders"),t=this.wot.wtTable.THEAD.childNodes,n=this.wot.wtViewport.oversizedColumnHeaders,o=0,r=e.length;r>o;o++)if(n[o]){if(!t[o]||0===t[o].childNodes.length)return;t[o].childNodes[0].style.height=n[o]+"px"}}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t=this.wot.wtTable.columnFilter.renderedToSource(e),n=this.columnHeaderCount,o=this.wot.wtSettings.settings.defaultRowHeight,r=void 0,i=void 0,s=void 0,a=this.wot.getSetting("columnHeaderHeight")||[];n;)n--,r=this.wot.wtTable.getColumnHeaderHeight(n),(i=this.wot.wtTable.getColumnHeader(t,n))&&(s=(0,l.innerHeight)(i),(!r&&s>o||s>r)&&(this.wot.wtViewport.oversizedColumnHeaders[n]=s),Array.isArray(a)?null!=a[n]&&(this.wot.wtViewport.oversizedColumnHeaders[n]=a[n]):isNaN(a)||(this.wot.wtViewport.oversizedColumnHeaders[n]=a),(a[n]||a)>this.wot.wtViewport.oversizedColumnHeaders[n]&&(this.wot.wtViewport.oversizedColumnHeaders[n]=a[n]||a))}},{key:"renderCells",value:function(e,t,n){for(var o=void 0,r=void 0,s=0;n>s;s++)r=this.columnFilter.renderedToSource(s),o=0===s?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)]:o.nextSibling,"TH"==o.nodeName&&(o=i(o,t)),(0,l.hasClass)(o,"hide")||(o.className=""),o.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,r,o);return o}},{key:"adjustColumnWidths",value:function(e){var t=0,n=this.wot.cloneSource?this.wot.cloneSource:this.wot,o=n.wtTable.holder,r=this.wot.getSetting("defaultColumnWidth"),i=this.wot.getSetting("rowHeaderWidth");if(o.scrollHeight>o.offsetHeight&&(t=(0,l.getScrollbarWidth)()),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t),null!=(i=this.instance.getSetting("onModifyRowHeaderWidth",i)))for(var s=0;this.rowHeaderCount>s;s++){var a=Array.isArray(i)?i[s]:i;a=null==a?r:a,this.COLGROUP.childNodes[s].style.width=a+"px"}for(var u=0;e>u;u++){this.COLGROUP.childNodes[u+this.rowHeaderCount].style.width=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(u))+"px"}}},{key:"appendToTbody",value:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength++}},{key:"getOrCreateTrForRow",value:function(e,t){var n=void 0;return this.wtTable.tbodyChildrenLength>e?n=0===e?this.TBODY.firstChild:t.nextSibling:(n=this.createRow(),this.appendToTbody(n)),n.className&&n.removeAttribute("class"),n}},{key:"createRow",value:function(){for(var e=document.createElement("TR"),t=0;this.rowHeaderCount>t;t++)e.appendChild(document.createElement("TH"));return e}},{key:"renderRowHeader",value:function(e,t,n){n.className="",n.removeAttribute("style"),this.rowHeaders[t](e,n,t)}},{key:"renderRowHeaders",value:function(e,t){for(var n=t.firstChild,o=0;this.rowHeaderCount>o;o++)n?"TD"==n.nodeName&&(n=r(n,t)):(n=document.createElement("TH"),t.appendChild(n)),this.renderRowHeader(e,o,n),n=n.nextSibling}},{key:"adjustAvailableNodes",value:function(){this.adjustColGroups(),this.adjustThead()}},{key:"renderColumnHeaders",value:function(){if(this.columnHeaderCount)for(var e=this.wtTable.getRenderedColumnsCount(),t=0;this.columnHeaderCount>t;t++)for(var n=this.getTrForColumnHeaders(t),o=-1*this.rowHeaderCount;e>o;o++){var r=this.columnFilter.renderedToSource(o);this.renderColumnHeader(t,r,n.childNodes[o+this.rowHeaderCount])}}},{key:"adjustColGroups",value:function(){for(var e=this.wtTable.getRenderedColumnsCount();e+this.rowHeaderCount>this.wtTable.colgroupChildrenLength;)this.COLGROUP.appendChild(document.createElement("COL")),this.wtTable.colgroupChildrenLength++;for(;this.wtTable.colgroupChildrenLength>e+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--;this.rowHeaderCount&&(0,l.addClass)(this.COLGROUP.childNodes[0],"rowHeader")}},{key:"adjustThead",value:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var n=0,o=this.columnHeaders.length;o>n;n++){for(t=this.THEAD.childNodes[n],t||(t=document.createElement("TR"),this.THEAD.appendChild(t)),this.theadChildrenLength=t.childNodes.length;e+this.rowHeaderCount>this.theadChildrenLength;)t.appendChild(document.createElement("TH")),this.theadChildrenLength++;for(;this.theadChildrenLength>e+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength--}var r=this.THEAD.childNodes.length;if(r>this.columnHeaders.length)for(var i=this.columnHeaders.length;r>i;i++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&(0,l.empty)(t)}},{key:"getTrForColumnHeaders",value:function(e){return this.THEAD.childNodes[e]}},{key:"renderColumnHeader",value:function(e,t,n){return n.className="",n.removeAttribute("style"),this.columnHeaders[e](t,n,e)}},{key:"adjustColumns",value:function(e,t){for(var n=e.childNodes.length;t>n;){e.appendChild(document.createElement("TD")),n++}for(;n>t;)e.removeChild(e.lastChild),n--}},{key:"removeRedundantColumns",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--}}]),e}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(0),a=n(2),l=n(6),u=o(l),c=n(175),h=o(c),f=n(176),d=o(f);t.default=function(){function e(t){var n=this;r(this,e),this.wot=t,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new u.default(this.wot),this.eventManager.addEventListener(window,"resize",function(){n.clientHeight=n.getWorkspaceHeight()})}return i(e,[{key:"getWorkspaceHeight",value:function(){var e=this.instance.wtOverlays.topOverlay.trimmingContainer,t=void 0,n=0;return e===window?n=document.documentElement.clientHeight:(t=(0,s.outerHeight)(e),n=t>0&&e.clientHeight>0?e.clientHeight:1/0),n}},{key:"getWorkspaceWidth",value:function(){var e=void 0,t=this.wot.getSetting("totalColumns"),n=this.instance.wtOverlays.leftOverlay.trimmingContainer,o=void 0,r=this.wot.getSetting("stretchH"),i=document.documentElement.offsetWidth;return this.wot.getSetting("preventOverflow")?(0,s.outerWidth)(this.instance.wtTable.wtRootElement):(e=this.wot.getSetting("freezeOverlays")?Math.min(i-this.getWorkspaceOffset().left,i):Math.min(this.getContainerFillWidth(),i-this.getWorkspaceOffset().left,i),n===window&&t>0&&this.sumColumnWidths(0,t-1)>e?document.documentElement.clientWidth:n===window||"scroll"!=(o=(0,s.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"))&&"hidden"!=o&&"auto"!=o?"none"!==r&&r?e:Math.max(e,(0,s.outerWidth)(this.instance.wtTable.TABLE)):Math.max(e,n.clientWidth))}},{key:"hasVerticalScroll",value:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(e,t){for(var n=0;t>e;)n+=this.wot.wtTable.getColumnWidth(e),e++;return n}},{key:"getContainerFillWidth",value:function(){if(this.containerWidth)return this.containerWidth;var e=this.instance.wtTable.holder,t=void 0,n=void 0;return n=document.createElement("div"),n.style.width="100%",n.style.height="1px",e.appendChild(n),t=n.offsetWidth,this.containerWidth=t,e.removeChild(n),t}},{key:"getWorkspaceOffset",value:function(){return(0,s.offset)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualHeight",value:function(){return(0,s.outerHeight)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualWidth",value:function(){return(0,s.outerWidth)(this.wot.wtTable.TABLE)||(0,s.outerWidth)(this.wot.wtTable.TBODY)||(0,s.outerWidth)(this.wot.wtTable.THEAD)}},{key:"getColumnHeaderHeight",value:function(){return isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wot.wtTable.THEAD)),this.columnHeaderHeight}},{key:"getViewportHeight",value:function(){var e=this.getWorkspaceHeight(),t=void 0;return e===1/0?e:(t=this.getColumnHeaderHeight(),t>0&&(e-=t),e)}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var n=0,o=t.length;o>n;n++)this.rowHeaderWidth+=e[n]||e}if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth))if(t.length){var r=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var i=0,a=t.length;a>i;i++)r?(this.rowHeaderWidth+=(0,s.outerWidth)(r),r=r.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.instance.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth}},{key:"getViewportWidth",value:function(){var e=this.getWorkspaceWidth(),t=void 0;return e===1/0?e:(t=this.getRowHeaderWidth(),t>0?e-t:e)}},{key:"createRowsCalculator",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=void 0,o=void 0,r=void 0,i=void 0,a=void 0,l=void 0,u=void 0;return this.rowHeaderWidth=NaN,n=this.wot.wtSettings.settings.renderAllRows&&!t?1/0:this.getViewportHeight(),o=this.wot.wtOverlays.topOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset(),0>o&&(o=0),r=this.wot.getSetting("fixedRowsTop"),a=this.wot.getSetting("fixedRowsBottom"),u=this.wot.getSetting("totalRows"),r&&(l=this.wot.wtOverlays.topOverlay.sumCellSizes(0,r),o+=l,n-=l),a&&this.wot.wtOverlays.bottomOverlay.clone&&(l=this.wot.wtOverlays.bottomOverlay.sumCellSizes(u-a,u),n-=l),i=this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight?0:(0,s.getScrollbarWidth)(),new d.default(n,o,this.wot.getSetting("totalRows"),function(t){return e.wot.wtTable.getRowHeight(t)},t?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,t,i)}},{key:"createColumnsCalculator",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getViewportWidth(),o=void 0,r=void 0;if(this.columnHeaderHeight=NaN,o=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.leftOverlay.getTableParentOffset(),0>o&&(o=0),r=this.wot.getSetting("fixedColumnsLeft")){var i=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,r);o+=i,n-=i}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)()),new h.default(n,o,this.wot.getSetting("totalColumns"),function(t){return e.wot.wtTable.getColumnWidth(t)},t?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,t,this.wot.getSetting("stretchH"),function(t,n){return e.wot.getSetting("onBeforeStretchingColumnWidth",t,n)})}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){var t=this.createRowsCalculator(!0),n=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(n)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){return!!this.rowsVisibleCalculator&&(!(this.rowsRenderCalculator.startRow>e.startRow||e.startRow===this.rowsRenderCalculator.startRow&&e.startRow>0)&&!(e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1))}},{key:"areAllProposedVisibleColumnsAlreadyRendered",value:function(e){return!!this.columnsVisibleCalculator&&(!(this.columnsRenderCalculator.startColumn>e.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&e.startColumn>0)&&!(e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1))}},{key:"resetHasOversizedColumnHeadersMarked",value:function(){(0,a.objectEach)(this.hasOversizedColumnHeadersMarked,function(e,t,n){n[t]=void 0})}}]),e}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),l=n(12),u=n(2),c=n(27),h=n(6),f=o(h),d=n(54),p=o(d),g=n(35);o(g);t.default=function(){function e(t,n){r(this,e),n&&(this.eventManager=new f.default(t),this.instance=t,this.wot=t,this.settings=n,this.mouseDown=!1,this.main=null,this.top=null,this.left=null,this.bottom=null,this.right=null,this.topStyle=null,this.leftStyle=null,this.bottomStyle=null,this.rightStyle=null,this.cornerDefaultStyle={width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(n),this.registerListeners())}return s(e,[{key:"registerListeners",value:function(){var e=this;this.eventManager.addEventListener(document.body,"mousedown",function(){return e.onMouseDown()}),this.eventManager.addEventListener(document.body,"mouseup",function(){return e.onMouseUp()});for(var t=0,n=this.main.childNodes.length;n>t;t++)!function(t,n){e.eventManager.addEventListener(e.main.childNodes[t],"mouseenter",function(n){return e.onMouseEnter(n,e.main.childNodes[t])})}(t)}},{key:"onMouseDown",value:function(){this.mouseDown=!0}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onMouseEnter",value:function(e,t){function n(e){return e.clientY<Math.floor(i.top)||(e.clientY>Math.ceil(i.top+i.height)||(e.clientX<Math.floor(i.left)||(e.clientX>Math.ceil(i.left+i.width)||void 0)))}function o(e){n(e)&&(r.eventManager.removeEventListener(document.body,"mousemove",o),t.style.display="block")}if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),(0,l.stopImmediatePropagation)(e);var r=this,i=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",o)}}},{key:"createBorders",value:function(e){this.main=document.createElement("div");var t=["top","left","bottom","right","corner"],n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(var o=0;5>o;o++){var r=t[o],i=document.createElement("div");i.className="wtBorder "+(this.settings.className||""),this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),n=i.style,n.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,n.height=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",n.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.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.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,c.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear(),this.wot.wtTable.bordersHolder||(this.wot.wtTable.bordersHolder=document.createElement("div"),this.wot.wtTable.bordersHolder.className="htBorders",this.wot.wtTable.spreader.appendChild(this.wot.wtTable.bordersHolder)),this.wot.wtTable.bordersHolder.insertBefore(this.main,this.wot.wtTable.bordersHolder.firstChild)}},{key:"createMultipleSelectorHandles",value:function(){this.selectionHandles={topLeft:document.createElement("DIV"),topLeftHitArea:document.createElement("DIV"),bottomRight:document.createElement("DIV"),bottomRightHitArea:document.createElement("DIV")};this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var e={position:"absolute",height:"40px",width:"40px","border-radius":parseInt(40/1.5,10)+"px"};for(var t in e)(0,u.hasOwnProperty)(e,t)&&(this.selectionHandles.styles.bottomRightHitArea[t]=e[t],this.selectionHandles.styles.topLeftHitArea[t]=e[t]);var n={position:"absolute",height:"10px",width:"10px","border-radius":parseInt(10/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};for(var o in n)(0,u.hasOwnProperty)(n,o)&&(this.selectionHandles.styles.bottomRight[o]=n[o],this.selectionHandles.styles.topLeft[o]=n[o]);this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)}},{key:"isPartRange",value:function(e,t){var n=this.wot.selections.createOrGetArea();return!(!n.cellRange||e==n.cellRange.to.row&&t==n.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,t,n,o,r,i){var s=parseInt(this.selectionHandles.styles.topLeft.width,10),a=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(n-s,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(o-s,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(n-a/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(o-a/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(n+i,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(o+r,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(n+i-a/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(o+r-a/4,10)+"px",this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e==this.wot.wtSettings.getSetting("fixedRowsTop")||t==this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")}},{key:"appear",value:function(e){if(!this.disabled){for(var t=void 0,n=void 0,o=void 0,r=void 0,s=this.wot.wtTable.getRenderedRowsCount(),l=0;s>l;l+=1){var u=this.wot.wtTable.rowFilter.renderedToSource(l);if(u>=e[0]&&e[2]>=u){t=u;break}}for(var h=s-1;h>=0;h-=1){var f=this.wot.wtTable.rowFilter.renderedToSource(h);if(f>=e[0]&&e[2]>=f){n=f;break}}for(var d=this.wot.wtTable.getRenderedColumnsCount(),g=0;d>g;g+=1){var v=this.wot.wtTable.columnFilter.renderedToSource(g);if(v>=e[1]&&e[3]>=v){o=v;break}}for(var y=d-1;y>=0;y-=1){var m=this.wot.wtTable.columnFilter.renderedToSource(y);if(m>=e[1]&&e[3]>=m){r=m;break}}if(void 0===t||void 0===o)return void this.disappear();var w=this.wot.wtTable.getCell(new p.default(t,o)),C=t!==n||o!==r,b=C?this.wot.wtTable.getCell(new p.default(n,r)):w,E=(0,a.offset)(w),S=C?(0,a.offset)(b):E,O=(0,a.offset)(this.wot.wtTable.TABLE),T=E.top,_=E.left,R=_-O.left-1,k=S.left+(0,a.outerWidth)(b)-_;if(this.isEntireColumnSelected(t,n)){var M=this.getDimensionsFromHeader("columns",o,r,O),A=null;if(M){var N=i(M,3);A=N[0],R=N[1],k=N[2]}A&&(w=A)}var P=T-O.top-1,H=S.top+(0,a.outerHeight)(b)-T;if(this.isEntireRowSelected(o,r)){var L=this.getDimensionsFromHeader("rows",t,n,O),D=null;if(L){var x=i(L,3);D=x[0],P=x[1],H=x[2]}D&&(w=D)}var I=(0,a.getComputedStyle)(w);parseInt(I.borderTopWidth,10)>0&&(P+=1,H=H>0?H-1:0),parseInt(I.borderLeftWidth,10)>0&&(R+=1,k=k>0?k-1:0),this.topStyle.top=P+"px",this.topStyle.left=R+"px",this.topStyle.width=k+"px",this.topStyle.display="block",this.leftStyle.top=P+"px",this.leftStyle.left=R+"px",this.leftStyle.height=H+"px",this.leftStyle.display="block";var j=Math.floor(this.settings.border.width/2);this.bottomStyle.top=P+H-j+"px",this.bottomStyle.left=R+"px",this.bottomStyle.width=k+"px",this.bottomStyle.display="block",this.rightStyle.top=P+"px",this.rightStyle.left=R+k-j+"px",this.rightStyle.height=H+1+"px",this.rightStyle.display="block";var B=this.settings.border.cornerVisible;B="function"==typeof B?B(this.settings.layerLevel):B;var F=this.wot.getSetting("onModifyGetCellCoords",n,r),W=n,V=r;if(F&&Array.isArray(F)){var U=i(F,4);W=U[2],V=U[3]}if((0,c.isMobileBrowser)()||!B||this.isPartRange(W,V))this.cornerStyle.display="none";else{this.cornerStyle.top=P+H-4+"px",this.cornerStyle.left=R+k-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var z=(0,a.getTrimmingContainer)(this.wot.wtTable.TABLE);if(r===this.wot.getSetting("totalColumns")-1){b.offsetLeft+(0,a.outerWidth)(b)+parseInt(this.cornerDefaultStyle.width,10)/2>=(0,a.innerWidth)(z)&&(this.cornerStyle.left=Math.floor(R+k-3-parseInt(this.cornerDefaultStyle.width,10)/2)+"px",this.cornerStyle.borderRightWidth=0)}if(n===this.wot.getSetting("totalRows")-1){b.offsetTop+(0,a.outerHeight)(b)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,a.innerHeight)(z)&&(this.cornerStyle.top=Math.floor(P+H-3-parseInt(this.cornerDefaultStyle.height,10)/2)+"px",this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,c.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,r,P,R,k,H)}}},{key:"isEntireColumnSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,t,n,o){var r=this,i=this.wot.wtTable.wtRootElement.parentNode,s=null,l=null,u=null,c=null,h=null,f=null,d=null,p=null;switch(e){case"rows":s=function(){var e;return(e=r.wot.wtTable).getRowHeader.apply(e,arguments)},l=function(){return a.outerHeight.apply(void 0,arguments)},u="ht__selection--rows",f="top";break;case"columns":s=function(){var e;return(e=r.wot.wtTable).getColumnHeader.apply(e,arguments)},l=function(){return a.outerWidth.apply(void 0,arguments)},u="ht__selection--columns",f="left"}if(i.className.includes(u)){var g=this.wot.getSetting("columnHeaders").length;if(d=s(t,g-1),p=s(n,g-1),!d||!p)return!1;var v=(0,a.offset)(d),y=(0,a.offset)(p);return d&&p&&(c=v[f]-o[f]-1,h=y[f]+l(p)-v[f]),[d,c,h]}return!1}},{key:"disappear",value:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",(0,c.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}}]),e}()},function(e,t,n){"use strict";function o(e){f=!1;var t=this.getActiveEditor();if((0,r.isPrintableChar)(e.keyCode)||e.keyCode===r.KEY_CODES.BACKSPACE||e.keyCode===r.KEY_CODES.DELETE||e.keyCode===r.KEY_CODES.INSERT){var n=0;if(e.keyCode===r.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;t.isOpened()||(n+=10),t.htEditor&&t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value),f=!0},n))}}t.__esModule=!0;var r=n(21),i=n(16),s=n(36),a=n(1),l=n(0),u=n(189),c=function(e){return e&&e.__esModule?e:{default:e}}(u),h=c.default.prototype.extend();h.prototype.init=function(){c.default.prototype.init.apply(this,arguments),this.query=null,this.strippedChoices=[],this.rawChoices=[]},h.prototype.getValue=function(){var e=this,t=this.rawChoices.find(function(t){return e.stripValueIfNeeded(t)===e.TEXTAREA.value});return(0,i.isDefined)(t)?t:this.TEXTAREA.value},h.prototype.createElements=function(){c.default.prototype.createElements.apply(this,arguments),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===window.navigator.platform.indexOf("Mac")?"":"htMacScroll")};var f=!1;h.prototype.prepare=function(){this.instance.addHook("beforeKeyDown",o),c.default.prototype.prepare.apply(this,arguments)},h.prototype.open=function(){this.TEXTAREA_PARENT.style.overflow="auto",c.default.prototype.open.apply(this,arguments),this.TEXTAREA_PARENT.style.overflow="";var e=this.htEditor.getInstance(),t=this,n=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.TEXTAREA.style.visibility="visible",this.focus(),e.updateSettings({colWidths:n?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:n?(0,l.outerWidth)(this.TEXTAREA)+(0,l.getScrollbarWidth)()+2:void 0,afterRenderer:function(e,n,o,r,s,a){var l=t.cellProperties,u=l.filteringCaseSensitive,c=l.allowHtml,h=void 0,f=void 0;s=(0,i.stringify)(s),s&&!c&&-1!==(h=!0===u?s.indexOf(this.query):s.toLowerCase().indexOf(t.query.toLowerCase()))&&(f=s.substr(h,t.query.length),s=s.replace(f,"<strong>"+f+"</strong>")),e.innerHTML=s},autoColumnSize:!0,modifyColWidth:function(e,t){var o=this.getPlugin("autoColumnSize").widths;return o[t]&&(e=o[t]),n?e:e+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=(0,l.getScrollbarWidth)()+2+"px",f&&(f=!1),t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value)},0))},h.prototype.close=function(){c.default.prototype.close.apply(this,arguments)},h.prototype.queryChoices=function(e){var t=this;this.query=e;var n=this.cellProperties.source;"function"==typeof n?n.call(this.cellProperties,e,function(e){t.rawChoices=e,t.updateChoicesList(t.stripValuesIfNeeded(e))}):Array.isArray(n)?(this.rawChoices=n,this.updateChoicesList(this.stripValuesIfNeeded(n))):this.updateChoicesList([])},h.prototype.updateChoicesList=function(e){var t=(0,l.getCaretPosition)(this.TEXTAREA),n=(0,l.getSelectionEndPosition)(this.TEXTAREA),o=this.cellProperties.sortByRelevance,r=this.cellProperties.filter,i=null,s=null;o&&(i=h.sortByRelevance(this.stripValueIfNeeded(this.getValue()),e,this.cellProperties.filteringCaseSensitive));var u=Array.isArray(i)?i.length:0;if(!1===r)u&&(s=i[0]);else{for(var c=[],f=0,d=e.length;d>f&&(!o||f<u);f++)c.push(u?e[i[f]]:e[f]);s=0,e=c}this.strippedChoices=e,this.htEditor.loadData((0,a.pivot)([e])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(s),this.instance.listen(!1),(0,l.setCaretPosition)(this.TEXTAREA,t,t===n?void 0:n)},h.prototype.flipDropdownIfNeeded=function(){var e=(0,l.offset)(this.TEXTAREA),t=(0,l.outerHeight)(this.TEXTAREA),n=this.getDropdownHeight(),o=(0,l.getTrimmingContainer)(this.instance.view.wt.wtTable.TABLE),r=o.scrollTop,i=(0,l.outerHeight)(this.instance.view.wt.wtTable.THEAD),s={row:0,col:0};o!==window&&(s=(0,l.offset)(o));var a=e.top-s.top-i+r,u=o.scrollHeight-a-i-t,c=n>u&&a>u;return c?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(c?a:u,n),c},h.prototype.limitDropdownIfNeeded=function(e,t){if(t>e){var n=0,o=0,r=0,i=null;do{r=this.htEditor.getRowHeight(o)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,n+=r,o++}while(e>n);i=n-r,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(n-r)}},h.prototype.flipDropdown=function(e){var t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0},h.prototype.unflipDropdown=function(){var e=this.htEditor.rootElement.style;"absolute"===e.position&&(e.position="",e.top=""),this.htEditor.flipped=void 0},h.prototype.updateDropdownHeight=function(){var e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)()+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},h.prototype.setDropdownHeight=function(e){this.htEditor.updateSettings({height:e})},h.prototype.finishEditing=function(e){e||this.instance.removeHook("beforeKeyDown",o),c.default.prototype.finishEditing.apply(this,arguments)},h.prototype.highlightBestMatchingChoice=function(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()},h.sortByRelevance=function(e,t,n){var o=[],r=void 0,a=e.length,l=void 0,u=void 0,c=[],h=void 0,f=t.length;if(0===a){for(h=0;f>h;h++)c.push(h);return c}for(h=0;f>h;h++)r=(0,s.stripTags)((0,i.stringify)(t[h])),-1!==(l=n?r.indexOf(e):r.toLowerCase().indexOf(e.toLowerCase()))&&(u=r.length-l-a,o.push({baseIndex:h,index:l,charsLeft:u,value:r}));for(o.sort(function(e,t){if(-1===t.index)return-1;if(-1===e.index)return 1;if(t.index>e.index)return-1;if(e.index>t.index)return 1;if(e.index===t.index){if(t.charsLeft>e.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0}),h=0,f=o.length;f>h;h++)c.push(o[h].baseIndex);return c},h.prototype.getDropdownHeight=function(){var e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return t>this.strippedChoices.length?this.strippedChoices.length*e+8:t*e},h.prototype.stripValueIfNeeded=function(e){return this.stripValuesIfNeeded([e])[0]},h.prototype.stripValuesIfNeeded=function(e){var t=this.cellProperties.allowHtml,n=(0,a.arrayMap)(e,function(e){return(0,i.stringify)(e)});return(0,a.arrayMap)(n,function(e){return t?e:(0,s.stripTags)(e)})},h.prototype.allowKeyEventPropagation=function(e){var t=this.htEditor.getSelectedRangeLast(),n={row:t?t.from.row:-1},o=!1;return e===r.KEY_CODES.ARROW_DOWN&&n.row>0&&n.row<this.htEditor.countRows()-1&&(o=!0),e===r.KEY_CODES.ARROW_UP&&n.row>-1&&(o=!0),o},h.prototype.discardEditor=function(e){c.default.prototype.discardEditor.apply(this,arguments),this.instance.view.render()},t.default=h},function(e,t,n){"use strict";t.__esModule=!0;var o=n(21),r=n(2),i=n(0),s=n(12),a=n(57),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=l.default.prototype.extend();u.prototype.createElements=function(){l.default.prototype.createElements.apply(this,arguments);var e=document.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()},u.prototype.prepare=function(e,t,n,o,i,s){l.default.prototype.prepare.apply(this,arguments);var a=this,u={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,afterOnCellMouseDown:function(e,t){var n=this.getSourceData(t.row,t.col);void 0!==n&&a.setValue(n),a.instance.destroyEditor()}};this.cellProperties.handsontable&&(0,r.extend)(u,s.handsontable),this.htOptions=u};var c=function(e){if(!(0,s.isImmediatePropagationStopped)(e)){var t,n,r=this.getActiveEditor(),i=r.htEditor.getInstance();if(e.keyCode==o.KEY_CODES.ARROW_DOWN)if(i.getSelectedLast()||i.flipped){if(i.getSelectedLast())if(i.flipped)t=i.getSelectedLast()[0]+1;else if(!i.flipped){n=i.getSelectedLast()[0];var a=i.countRows()-1;t=Math.min(a,n+1)}}else t=0;else e.keyCode==o.KEY_CODES.ARROW_UP&&(!i.getSelectedLast()&&i.flipped?t=i.countRows()-1:i.getSelectedLast()&&(i.flipped?(n=i.getSelectedLast()[0],t=Math.max(0,n-1)):(n=i.getSelectedLast()[0],t=n-1)));void 0!==t&&(0>t||i.flipped&&t>i.countRows()-1?i.deselectCell():i.selectCell(t,0),i.getData().length&&(e.preventDefault(),(0,s.stopImmediatePropagation)(e),r.instance.listen(),r.TEXTAREA.focus()))}};u.prototype.open=function(){this.instance.addHook("beforeKeyDown",c),l.default.prototype.open.apply(this,arguments),this.htEditor&&this.htEditor.destroy(),this.htEditor=new this.instance.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.TEXTAREA.style.visibility="hidden"):(this.htEditor.deselectCell(),this.TEXTAREA.style.visibility="visible"),(0,i.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length)},u.prototype.close=function(){this.instance.removeHook("beforeKeyDown",c),this.instance.listen(),l.default.prototype.close.apply(this,arguments)},u.prototype.focus=function(){this.instance.listen(),l.default.prototype.focus.apply(this,arguments)},u.prototype.beginEditing=function(e){var t=this.instance.getSettings().onBeginEditing;t&&!1===t()||l.default.prototype.beginEditing.apply(this,arguments)},u.prototype.finishEditing=function(e,t){if(this.htEditor&&this.htEditor.isListening()&&this.instance.listen(),this.htEditor&&this.htEditor.getSelectedLast()){var n=this.htEditor.getInstance().getValue();void 0!==n&&this.setValue(n)}return l.default.prototype.finishEditing.apply(this,arguments)},u.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",function(){e.htEditor&&e.htEditor.destroy()})},t.default=u},function(e,t,n){"use strict";function o(e){var t=new Date(e);return isNaN(new Date(e+"T00:00").getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}t.__esModule=!0,t.getNormalizedDate=o},function(e,t,n){"use strict";!function(e){function n(e){return e.split('"').length-1}var o={parse:function(e){var t,o,r,i,s,a,l,u=[],c=0;for(r=e.split("\n"),r.length>1&&""===r[r.length-1]&&r.pop(),t=0,o=r.length;o>t;t+=1){for(r[t]=r[t].split("\t"),i=0,s=r[t].length;s>i;i+=1)u[c]||(u[c]=[]),a&&0===i?(l=u[c].length-1,u[c][l]=u[c][l]+"\n"+r[t][0],a&&1&n(r[t][0])&&(a=!1,u[c][l]=u[c][l].substring(0,u[c][l].length-1).replace(/""/g,'"'))):i===s-1&&0===r[t][i].indexOf('"')&&1&n(r[t][i])?(u[c].push(r[t][i].substring(1).replace(/""/g,'"')),a=!0):(u[c].push(r[t][i].replace(/""/g,'"')),a=!1);a||(c+=1)}return u},stringify:function(e){var t,n,o,r,i,s="";for(t=0,n=e.length;n>t;t+=1){for(r=e[t].length,o=0;r>o;o+=1)o>0&&(s+="\t"),i=e[t][o],"string"==typeof i?i.indexOf("\n")>-1?s+='"'+i.replace(/"/g,'""')+'"':s+=i:s+=null===i||void 0===i?"":i;t!==n-1&&(s+="\n")}return s}};t.parse=o.parse,t.stringify=o.stringify}(window)},function(e,t,n){"use strict";function o(e){var t=e.isShiftKey,n=e.isLeftClick,o=e.isRightClick,r=e.coords,i=e.selection,s=e.controller,l=i.isSelected()?i.getSelectedRange().current():null,u=i.isSelectedByCorner(),c=i.isSelectedByRowHeader();i.isSelectedByColumnHeader();if(t&&l)0>r.row||0>r.col||s.cells?!u&&!c||0>r.row||0>r.col||s.cells?u&&0>r.row&&!s.column?i.setRangeEnd(new a.CellCoords(l.to.row,r.col)):c&&0>r.col&&!s.row?i.setRangeEnd(new a.CellCoords(r.row,l.to.col)):(!u&&!c&&0>r.col||u&&0>r.col)&&!s.row?i.selectRows(l.from.row,r.row):(!u&&!c&&0>r.row||c&&0>r.row)&&!s.column&&i.selectColumns(l.from.col,r.col):i.setRangeEnd(new a.CellCoords(r.row,r.col)):i.setRangeEnd(r);else{var h=new a.CellCoords(r.row,r.col);0>h.row&&(h.row=0),0>h.col&&(h.col=0);var f=!i.inInSelection(h),d=n||o&&f;r.row>=0||0>r.col||s.column?r.col>=0||0>r.row||s.row?0>r.col||0>r.row||s.cells?0>r.col&&0>r.row&&i.setRangeStart(r):d&&i.setRangeStart(r):d&&i.selectRows(r.row):d&&i.selectColumns(r.col)}}function r(e){var t=e.isLeftClick,n=e.coords,o=e.selection,r=e.controller;if(t){var i=o.isSelectedByRowHeader(),s=o.isSelectedByColumnHeader(),l=o.tableProps.countCols(),u=o.tableProps.countRows();s&&!r.column?o.setRangeEnd(new a.CellCoords(u-1,n.col)):i&&!r.row?o.setRangeEnd(new a.CellCoords(n.row,l-1)):r.cell||o.setRangeEnd(n)}}function i(e,t){var n=t.coords,o=t.selection,r=t.controller;l.get(e.type)({coords:n,selection:o,controller:r,isShiftKey:e.shiftKey,isLeftClick:(0,s.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,s.isRightClick)(e)})}t.__esModule=!0,t.mouseDown=o,t.mouseOver=r,t.handleMouseEvent=i;var s=n(12),a=n(4),l=new Map([["mousedown",o],["mouseover",r],["touchstart",o]])},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){h.set(e,t)}function i(e){var t=void 0;if(!(e instanceof l.default)){if(!h.has(e))throw Error("Record translator was not registered for this object identity");e=h.get(e)}return f.has(e)?t=f.get(e):(t=new c(e),f.set(e,t)),t}t.__esModule=!0,t.RecordTranslator=void 0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.registerIdentity=r,t.getTranslator=i;var a=n(88),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=n(2),c=function(){function e(t){o(this,e),this.hot=t}return s(e,[{key:"toVisualRow",value:function(e){return this.hot.runHooks("unmodifyRow",e)}},{key:"toVisualColumn",value:function(e){return this.hot.runHooks("unmodifyCol",e)}},{key:"toVisual",value:function(e,t){return(0,u.isObject)(e)?{row:this.toVisualRow(e.row),column:this.toVisualColumn(e.column)}:[this.toVisualRow(e),this.toVisualColumn(t)]}},{key:"toPhysicalRow",value:function(e){return this.hot.runHooks("modifyRow",e)}},{key:"toPhysicalColumn",value:function(e){return this.hot.runHooks("modifyCol",e)}},{key:"toPhysical",value:function(e,t){return(0,u.isObject)(e)?{row:this.toPhysicalRow(e.row),column:this.toPhysicalColumn(e.column)}:[this.toPhysicalRow(e),this.toPhysicalColumn(t)]}}]),e}();t.RecordTranslator=c;var h=new WeakMap,f=new WeakMap},function(e,t,n){"use strict";function o(e){s.set(e,!0)}function r(e){return e===a}function i(e){return s.has(e)}t.__esModule=!0,t.registerAsRootInstance=o,t.hasValidParameter=r,t.isRootInstance=i;var s=t.holder=new WeakMap,a=t.rootInstanceSymbol=Symbol("rootInstance")},function(e,t,n){"use strict";function o(){}t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=n(16),s=n(2);o.prototype={licenseKey:"trial",data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:void 0,colHeaders:null,colWidths:void 0,rowHeights:void 0,columns:void 0,cells:void 0,cell:[],comments:!1,customBorders:!1,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,allowInsertRow:!0,allowInsertColumn:!0,allowRemoveRow:!0,allowRemoveColumn:!0,selectionMode:"multiple",fillHandle:!0,fixedRowsTop:0,fixedRowsBottom:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!1,autoWrapCol:!1,persistentState:void 0,currentRowClassName:void 0,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",activeHeaderClassName:"ht__active_highlight",className:void 0,tableClassName:void 0,stretchH:"none",isEmptyRow:function(e){var t,n,o,a;for(t=0,n=this.countCols();n>t;t++)if(""!==(o=this.getDataAtCell(e,t))&&null!==o&&(0,i.isDefined)(o))return"object"===(void 0===o?"undefined":r(o))&&(a=this.getCellMeta(e,t),(0,s.isObjectEqual)(this.getSchema()[a.prop],o));return!0},isEmptyCol:function(e){var t,n,o;for(t=0,n=this.countRows();n>t;t++)if(""!==(o=this.getDataAtCell(t,e))&&null!==o&&(0,i.isDefined)(o))return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,allowEmpty:!0,invalidCellClassName:"htInvalid",placeholder:!1,placeholderCellClassName:"htPlaceholder",readOnlyCellClassName:"htDimmed",renderer:void 0,commentedCellClassName:"htCommentCell",fragmentSelection:!1,readOnly:!1,skipColumnOnPaste:!1,search:!1,type:"text",copyable:!0,editor:void 0,autoComplete:void 0,visibleRows:10,trimDropdown:!0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,copyPaste:!0,undo:void 0,columnSorting:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,mergeCells:!1,viewportRowRenderingOffset:"auto",viewportColumnRenderingOffset:"auto",validator:void 0,disableVisualSelection:!1,sortIndicator:void 0,manualColumnFreeze:void 0,trimWhitespace:!0,settings:void 0,source:void 0,title:void 0,checkedTemplate:void 0,uncheckedTemplate:void 0,label:void 0,numericFormat:void 0,language:void 0,selectOptions:void 0,autoColumnSize:void 0,autoRowSize:void 0,dateFormat:void 0,correctFormat:!1,defaultDate:void 0,strict:void 0,allowHtml:!1,renderAllRows:void 0,preventOverflow:!1,bindRowsWithHeaders:void 0,collapsibleColumns:void 0,columnSummary:void 0,dropdownMenu:void 0,filters:void 0,formulas:void 0,ganttChart:void 0,headerTooltips:void 0,hiddenColumns:void 0,hiddenRows:void 0,nestedHeaders:void 0,trimRows:void 0,rowHeaderWidth:void 0,columnHeaderHeight:void 0,observeChanges:void 0,sortFunction:void 0,sortByRelevance:!0,filter:!0,filteringCaseSensitive:!1,dragToScroll:!0},t.default=o},function(e,t,n){"use strict";function o(e,t,n){var o=(0,s.getLanguageDictionary)(e);if(null===o)return null;var i=o[t];if((0,l.isUndefined)(i))return null;var a=r(i,n);return Array.isArray(a)?a[0]:a}function r(e,t){var n=e;return(0,i.arrayEach)((0,a.getPhraseFormatters)(),function(o){n=o(e,t)}),n}t.__esModule=!0,t.getTranslatedPhrase=o;var i=n(1),s=n(71),a=n(270),l=n(16)},function(e,t,n){"use strict";function o(e,t){return(0,c.objectEach)(t,function(t,n){(0,u.isUndefined)(e[n])&&(e[n]=t)}),e}function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;if(e>t){var r=[o,n];n=r[0],o=r[1]}return n+"-"+o}function i(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/,n=t.exec(e);return n?n[1].toLowerCase()+"-"+n[2].toUpperCase():e}function s(e,t){var n=i(t);(0,d.hasLanguageDictionary)(n)?e.language=n:(e.language=d.DEFAULT_LANGUAGE_CODE,a(t))}function a(e){(0,u.isDefined)(e)&&(0,h.error)((0,f.toSingleLine)(l,e))}t.__esModule=!0;var l=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.'],['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.']);t.extendNotExistingKeys=o,t.createCellHeadersRange=r,t.normalizeLanguageCode=i,t.applyLanguageSetting=s,t.warnUserAboutLanguageRegistration=a;var u=n(16),c=n(2),h=n(56),f=n(41),d=n(71)},function(e,t,n){"use strict";function o(){0===p&&(f.addEventListener(document,"keydown",function(e){d.has(e.keyCode)||d.add(e.keyCode)}),f.addEventListener(document,"keyup",function(e){d.has(e.keyCode)&&d.delete(e.keyCode)}),f.addEventListener(document,"visibilitychange",function(){document.hidden&&d.clear()})),p+=1}function r(){p>0&&(p-=1),0===p&&i()}function i(){f.clearEvents(),d.clear(),p=0}function s(e){return Array.from(d.values()).some(function(t){return(0,h.isKey)(t,e)})}function a(){return Array.from(d.values()).some(function(e){return(0,h.isCtrlMetaKey)(e)})}function l(){return p}t.__esModule=!0,t.stopObserving=t.startObserving=t.isPressedCtrlKey=t.isPressed=t._resetState=t._getRefCount=void 0;var u=n(6),c=function(e){return e&&e.__esModule?e:{default:e}}(u),h=n(21),f=(n(1),new c.default),d=new Set,p=0;t._getRefCount=l,t._resetState=i,t.isPressed=s,t.isPressedCtrlKey=a,t.startObserving=o,t.stopObserving=r},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0,t.HEADER_TYPE=t.FILL_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(273),a=n(1),l=t.ACTIVE_HEADER_TYPE="active-header",u=t.AREA_TYPE="area",c=t.CELL_TYPE="cell",h=t.FILL_TYPE="fill",f=t.HEADER_TYPE="header";t.default=function(){function e(t){r(this,e),this.options=t,this.layerLevel=0,this.cell=(0,s.createHighlight)(c,t),this.fill=(0,s.createHighlight)(h,t),this.areas=new Map,this.headers=new Map,this.activeHeaders=new Map,this.borders=[]}return i(e,[{key:"isEnabledFor",value:function(e){var t=this.options.disableHighlight;return"current"===e&&(e=c),"string"==typeof t&&(t=[t]),!1===t||Array.isArray(t)&&!t.includes(e)}},{key:"useLayerLevel",value:function(){return this.layerLevel=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var e=this.layerLevel,t=void 0;return this.areas.has(e)?t=this.areas.get(e):(t=(0,s.createHighlight)(u,Object.assign({layerLevel:e},this.options)),this.areas.set(e,t)),t}},{key:"getAreas",value:function(){return[].concat(o(this.areas.values()))}},{key:"createOrGetHeader",value:function(){var e=this.layerLevel,t=void 0;return this.headers.has(e)?t=this.headers.get(e):(t=(0,s.createHighlight)(f,Object.assign({},this.options)),this.headers.set(e,t)),t}},{key:"getHeaders",value:function(){return[].concat(o(this.headers.values()))}},{key:"createOrGetActiveHeader",value:function(){var e=this.layerLevel,t=void 0;return this.activeHeaders.has(e)?t=this.activeHeaders.get(e):(t=(0,s.createHighlight)(l,Object.assign({},this.options)),this.activeHeaders.set(e,t)),t}},{key:"getActiveHeaders",value:function(){return[].concat(o(this.activeHeaders.values()))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),(0,a.arrayEach)(this.areas.values(),function(e){return void e.clear()}),(0,a.arrayEach)(this.headers.values(),function(e){return void e.clear()}),(0,a.arrayEach)(this.activeHeaders.values(),function(e){return void e.clear()})}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat(o(this.areas.values()),o(this.headers.values()),o(this.activeHeaders.values()),o(this.borders))[Symbol.iterator]()}}]),e}()},function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(2),a=n(5),l=n(16);t.default=function(){function e(t){r(this,e),this.samples=null,this.dataFactory=t,this.customSampleCount=null,this.allowDuplicates=!1}return i(e,null,[{key:"SAMPLE_COUNT",get:function(){return 3}}]),i(e,[{key:"getSampleCount",value:function(){return this.customSampleCount?this.customSampleCount:e.SAMPLE_COUNT}},{key:"setSampleCount",value:function(e){this.customSampleCount=e}},{key:"setAllowDuplicates",value:function(e){this.allowDuplicates=e}},{key:"generateRowSamples",value:function(e,t){return this.generateSamples("row",t,e)}},{key:"generateColumnSamples",value:function(e,t){return this.generateSamples("col",t,e)}},{key:"generateSamples",value:function(e,t,n){var o=this,r=new Map;return"number"==typeof n&&(n={from:n,to:n}),(0,a.rangeEach)(n.from,n.to,function(n){var i=o.generateSample(e,t,n);r.set(n,i)}),r}},{key:"generateSample",value:function(e,t,n){var r=this,i=new Map,u=[],c=void 0;return(0,a.rangeEach)(t.from,t.to,function(t){var a=void 0;if("row"===e)a=r.dataFactory(n,t);else{if("col"!==e)throw Error("Unsupported sample type");a=r.dataFactory(t,n)}c=(0,s.isObject)(a)?Object.keys(a).length:Array.isArray(a)?a.length:(0,l.stringify)(a).length,i.has(c)||i.set(c,{needed:r.getSampleCount(),strings:[]});var h=i.get(c);if(h.needed){if(!(u.indexOf(a)>-1)||r.allowDuplicates){h.strings.push(o({value:a},"row"===e?"col":"row",t)),u.push(a),h.needed--}}}),i}}]),e}()},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}t.__esModule=!0;var r=n(1),i=n(2),s=n(5),a={_arrayMap:[],getValueByIndex:function(e){var t=this._arrayMap.length,n=null;return t>e&&(n=this._arrayMap[e]),n},getIndexByValue:function(e){var t=void 0;return-1===(t=this._arrayMap.indexOf(e))?null:t},insertItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=(0,r.arrayMax)(this._arrayMap)+1,i=[];return(0,s.rangeEach)(n-1,function(n){i.push(t._arrayMap.splice(e+n,0,o+n))}),i},removeItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=[];if(Array.isArray(e)){var i=[].concat(this._arrayMap);e.sort(function(e,t){return t-e}),o=(0,r.arrayReduce)(e,function(e,n){return t._arrayMap.splice(n,1),e.concat(i.slice(n,n+1))},[])}else o=this._arrayMap.splice(e,n);return o},unshiftItems:function(e){function t(e){return(0,r.arrayReduce)(o,function(t,n){return e>n&&t++,t},0)}var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=this.removeItems(e,n);this._arrayMap=(0,r.arrayMap)(this._arrayMap,function(e,n){var o=t(e);return o&&(e-=o),e})},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=(0,r.arrayMap)(this._arrayMap,function(t){return e>t||(t+=n),t}),(0,s.rangeEach)(n-1,function(n){t._arrayMap.splice(e+n,0,e+n)})},swapIndexes:function(e,t){var n;(n=this._arrayMap).splice.apply(n,[t,0].concat(o(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,i.defineGetter)(a,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1}),t.default=a},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(5),s=0;t.default=function(){function e(t){o(this,e),this.hot=t,this._element=null,this.state=s}return r(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=document.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=s}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{key:"setPosition",value:function(e,t){(0,i.isNumeric)(e)&&(this._element.style.top=e+"px"),(0,i.isNumeric)(t)&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){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}}},{key:"setSize",value:function(e,t){(0,i.isNumeric)(e)&&(this._element.style.width=e+"px"),(0,i.isNumeric)(t)&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){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}}},{key:"setOffset",value:function(e,t){(0,i.isNumeric)(e)&&(this._element.style.marginTop=e+"px"),(0,i.isNumeric)(t)&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){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}}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=0;t.default=function(){function e(t){o(this,e),this.hot=t,this._element=null,this.state=i}return r(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=document.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=i}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{key:"setPosition",value:function(e,t){void 0!==e&&(this._element.style.top=e+"px"),void 0!==t&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){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}}},{key:"setSize",value:function(e,t){e&&(this._element.style.width=e+"px"),t&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){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}}},{key:"setOffset",value:function(e,t){e&&(this._element.style.marginTop=e+"px"),t&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){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}}}]),e}()},function(e,t,n){"use strict";function o(e,t,n,o){t?t.row===n&&t.col===o?(e.setAttribute("rowspan",""+t.rowspan),e.setAttribute("colspan",""+t.colspan)):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}t.__esModule=!0,t.applySpanProperties=o},function(e,t,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){function n(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=Error;!function(e){function t(e,n){switch(void 0===e?"undefined":r(e)){case"undefined":case"boolean":case"string":case"number":return e===n;case"object":if(null===e)return null===n;if(R(e)){if(!R(n)||e.length!==n.length)return!1;for(var o=0,i=e.length;i>o;o++)if(!t(e[o],n[o]))return!1;return!0}var s=C(n),a=s.length;if(C(e).length!==a)return!1;for(var o=0;a>o;o++)if(!t(e[o],n[o]))return!1;return!0;default:return!1}}function n(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function o(e){for(var t=0,n=O.length;n>t;t++)if(O[t].obj===e)return O[t]}function a(e,t){for(var n=0,o=e.observers.length;o>n;n++)if(e.observers[n].callback===t)return e.observers[n].observer}function l(e,t){for(var n=0,o=e.observers.length;o>n;n++)if(e.observers[n].observer===t)return void e.observers.splice(n,1)}function u(e,t){t.unobserve()}function c(e){return"object"===(void 0===e?"undefined":r(e))?JSON.parse(JSON.stringify(e)):e}function h(e,t){var n,r=[],i=o(e);if(i?n=a(i,t):(i=new T(e),O.push(i)),n)return n;if(n={},i.value=c(e),t){n.callback=t,n.next=null;var u=this.intervals||[100,1e3,1e4,6e4];if(void 0===u.push)throw new s("jsonpatch.intervals must be an array");var h=0,d=function(){f(n)},p=function(){clearTimeout(n.next),n.next=setTimeout(function(){d(),h=0,n.next=setTimeout(g,u[h++])},0)},g=function e(){d(),h==u.length&&(h=u.length-1),n.next=setTimeout(e,u[h++])};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mousedown",p),window.addEventListener("mouseup",p),window.addEventListener("keydown",p)):(document.documentElement.attachEvent("onmousedown",p),document.documentElement.attachEvent("onmouseup",p),document.documentElement.attachEvent("onkeydown",p))),n.next=setTimeout(g,u[h++])}return n.patches=r,n.object=e,n.unobserve=function(){f(n),clearTimeout(n.next),l(i,n),"undefined"!=typeof window&&(window.removeEventListener?(window.removeEventListener("mousedown",p),window.removeEventListener("mouseup",p),window.removeEventListener("keydown",p)):(document.documentElement.detachEvent("onmousedown",p),document.documentElement.detachEvent("onmouseup",p),document.documentElement.detachEvent("onkeydown",p)))},i.observers.push(new _(t,n)),n}function f(e){for(var t,n=0,o=O.length;o>n;n++)if(O[n].obj===e.object){t=O[n];break}d(t.value,e.object,e.patches,""),e.patches.length&&g(t.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function d(e,t,o,i){for(var s=C(t),a=C(e),l=!1,u=a.length-1;u>=0;u--){var h=a[u],f=e[h];if(t.hasOwnProperty(h)){var p=t[h];"object"==(void 0===f?"undefined":r(f))&&null!=f&&"object"==(void 0===p?"undefined":r(p))&&null!=p?d(f,p,o,i+"/"+n(h)):f!=p&&(!0,o.push({op:"replace",path:i+"/"+n(h),value:c(p)}))}else o.push({op:"remove",path:i+"/"+n(h)}),l=!0}if(l||s.length!=a.length)for(var u=0;s.length>u;u++){var h=s[u];e.hasOwnProperty(h)||o.push({op:"add",path:i+"/"+n(h),value:c(t[h])})}}function p(e){for(var t,n=0,o=e.length;o>n;){t=e.charCodeAt(n);{if(48>t||t>57)return!1;n++}}return!0}function g(e,t,n){for(var o,r,i=!1,s=0,a=t.length;a>s;){o=t[s],s++;for(var l=o.path||"",u=l.split("/"),c=e,h=1,f=u.length,d=void 0;;){if(r=u[h],n&&void 0===d&&(void 0===c[r]?d=u.slice(0,h).join("/"):h==f-1&&(d=o.path),void 0!==d&&this.validator(o,s-1,e,d)),h++,void 0===r&&h>=f){i=S[o.op].call(o,c,r,e);break}if(R(c)){if("-"===r)r=c.length;else{if(n&&!p(r))throw new k("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s-1,o.path,o);r=parseInt(r,10)}if(h>=f){if(n&&"add"===o.op&&r>c.length)throw new k("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s-1,o.path,o);i=E[o.op].call(o,c,r,e);break}}else if(r&&-1!=r.indexOf("~")&&(r=r.replace(/~1/g,"/").replace(/~0/g,"~")),h>=f){i=b[o.op].call(o,c,r,e);break}c=c[r]}}return i}function v(e,t){var n=[];return d(e,t,n,""),n}function y(e){if(void 0===e)return!0;if("array"==typeof e||"object"==(void 0===e?"undefined":r(e)))for(var t in e)if(y(e[t]))return!0;return!1}function m(t,n,o,i){if("object"!==(void 0===t?"undefined":r(t))||null===t||R(t))throw new k("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,t,o);if(!b[t.op])throw new k("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,o);if("string"!=typeof t.path)throw new k("Operation `path` property is not a string","OPERATION_PATH_INVALID",n,t,o);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new k("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,o);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new k("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,o);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&y(t.value))throw new k("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,o);if(o)if("add"==t.op){var s=t.path.split("/").length,a=i.split("/").length;if(s!==a+1&&s!==a)throw new k("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,o)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==i)throw new k("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,o)}else if("move"===t.op||"copy"===t.op){var l={op:"_get",path:t.from,value:void 0},u=e.validate([l],o);if(u&&"OPERATION_PATH_UNRESOLVABLE"===u.name)throw new k("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,o)}}function w(e,t){try{if(!R(e))throw new k("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),g.call(this,t,e,!0);else for(var n=0;e.length>n;n++)this.validator(e[n],n)}catch(e){if(e instanceof k)return e;throw e}}var C=function(e){if(R(e)){for(var t=Array(e.length),n=0;t.length>n;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var t=[];for(var o in e)e.hasOwnProperty(o)&&t.push(o);return t},b={add:function(e,t){return e[t]=this.value,!0},remove:function(e,t){return delete e[t],!0},replace:function(e,t){return e[t]=this.value,!0},move:function(e,t,n){var o={op:"_get",path:this.from};return g(n,[o]),g(n,[{op:"remove",path:this.from}]),g(n,[{op:"add",path:this.path,value:o.value}]),!0},copy:function(e,t,n){var o={op:"_get",path:this.from};return g(n,[o]),g(n,[{op:"add",path:this.path,value:o.value}]),!0},test:function(e,n){return t(e[n],this.value)},_get:function(e,t){this.value=e[t]}},E={add:function(e,t){return e.splice(t,0,this.value),!0},remove:function(e,t){return e.splice(t,1),!0},replace:function(e,t){return e[t]=this.value,!0},move:b.move,copy:b.copy,test:b.test,_get:b._get},S={add:function(e){S.remove.call(this,e);for(var t in this.value)this.value.hasOwnProperty(t)&&(e[t]=this.value[t]);return!0},remove:function(e){for(var t in e)e.hasOwnProperty(t)&&b.remove.call(this,e,t);return!0},replace:function(e){return g(e,[{op:"remove",path:this.path}]),g(e,[{op:"add",path:this.path,value:this.value}]),!0},move:b.move,copy:b.copy,test:function(e){return JSON.stringify(e)===JSON.stringify(this.value)},_get:function(e){this.value=e}},O=[],T=function(){function e(e){this.observers=[],this.obj=e}return e}(),_=function(){function e(e,t){this.callback=e,this.observer=t}return e}();e.unobserve=u,e.observe=h,e.generate=f;var R;R=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},e.apply=g,e.compare=v;var k=function(e){function t(t,n,o,r,i){e.call(this,t),this.message=t,this.name=n,this.index=o,this.operation=r,this.tree=i}return i(t,e),t}(s);e.JsonPatchError=k,e.Error=k,e.validator=m,e.validate=w}(o||(o={})),t.apply=o.apply,t.observe=o.observe,t.unobserve=o.unobserve,t.generate=o.generate,t.compare=o.compare,t.validate=o.validate,t.validator=o.validator,t.JsonPatchError=o.JsonPatchError,t.Error=o.Error},function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n=new h.default(e,t||{},Z.rootInstanceSymbol);return n.init(),n}t.__esModule=!0,n(96),n(111),n(112),n(116),n(117),n(119),n(122),n(123),n(124),n(125),n(126),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(141),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(85),n(156),n(157),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(167),n(168),n(169),n(172),n(173),n(174),n(225),n(226),n(227);var s=n(17),a=n(13),l=n(28),u=n(87),c=n(88),h=r(c),f=n(282),d=r(f),p=n(6),g=r(p),v=n(15),y=r(v),m=n(92),w=r(m),C=n(1),b=o(C),E=n(27),S=o(E),O=n(90),T=o(O),_=n(190),R=o(_),k=n(40),M=o(k),A=n(42),N=o(A),P=n(16),H=o(P),L=n(5),D=o(L),x=n(2),I=o(x),j=n(89),B=o(j),F=n(36),W=o(F),V=n(21),U=o(V),z=n(0),Y=o(z),G=n(12),K=o(G),X=n(283),q=o(X),J=n(8),Q=n(195),$=r(Q),Z=n(194),ee=n(196),te=n(7),ne=o(te),oe=n(71);(0,d.default)(i),i.Core=h.default,i.DefaultSettings=$.default,i.EventManager=g.default,i._getListenersCounter=p.getListenersCounter,i.buildDate="10/04/2018 11:41:59",i.packageName="handsontable",i.version="2.0.0";i.hooks=y.default.getSingleton(),i.__GhostTable=w.default;var re=[b,S,T,R,M,N,H,D,I,B,W,U],ie=[Y,K];i.helper={},i.dom={},b.arrayEach(re,function(e){b.arrayEach(Object.getOwnPropertyNames(e),function(t){"_"!==t.charAt(0)&&(i.helper[t]=e[t])})}),b.arrayEach(ie,function(e){b.arrayEach(Object.getOwnPropertyNames(e),function(t){"_"!==t.charAt(0)&&(i.dom[t]=e[t])})}),i.cellTypes={},b.arrayEach((0,u.getRegisteredCellTypeNames)(),function(e){i.cellTypes[e]=(0,u.getCellType)(e)}),i.cellTypes.registerCellType=u.registerCellType,i.cellTypes.getCellType=u.getCellType,i.editors={},b.arrayEach((0,s.getRegisteredEditorNames)(),function(e){i.editors[W.toUpperCaseFirst(e)+"Editor"]=(0,s.getEditor)(e)}),i.editors.registerEditor=s.registerEditor,i.editors.getEditor=s.getEditor,i.renderers={},b.arrayEach((0,a.getRegisteredRendererNames)(),function(e){var t=(0,a.getRenderer)(e);"base"===e&&(i.renderers.cellDecorator=t),i.renderers[W.toUpperCaseFirst(e)+"Renderer"]=t}),i.renderers.registerRenderer=a.registerRenderer,i.renderers.getRenderer=a.getRenderer,i.validators={},b.arrayEach((0,l.getRegisteredValidatorNames)(),function(e){i.validators[W.toUpperCaseFirst(e)+"Validator"]=(0,l.getValidator)(e)}),i.validators.registerValidator=l.registerValidator,i.validators.getValidator=l.getValidator,i.plugins={},b.arrayEach(Object.getOwnPropertyNames(q),function(e){var t=q[e];"Base"===e?i.plugins[e+"Plugin"]=t:i.plugins[e]=t}),i.plugins.registerPlugin=J.registerPlugin,i.languages={},i.languages.dictionaryKeys=ne,i.languages.getLanguageDictionary=oe.getLanguageDictionary,i.languages.getLanguagesDictionaries=oe.getLanguagesDictionaries,i.languages.registerLanguageDictionary=oe.registerLanguageDictionary,i.languages.getTranslatedPhrase=function(){return ee.getTranslatedPhrase.apply(void 0,arguments)},t.default=i},function(e,t,n){var o=n(20),r=n(18),i=n(37);e.exports=n(22)?Object.defineProperties:function(e,t){r(e);for(var n,s=i(t),a=s.length,l=0;a>l;)o.f(e,n=s[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(74),r=n(49),i=n(51),s={};n(31)(s,n(11)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=o(s,{next:r(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var o=n(9),r=n(110).set;e.exports=function(e,t,n){var i,s=t.constructor;return s!==n&&"function"==typeof s&&(i=s.prototype)!==n.prototype&&o(i)&&r&&r(e,i),e}},function(e,t,n){var o=n(211);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){var o=n(9),r=n(113),i=n(11)("species");e.exports=function(e){var t;return r(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!r(t.prototype)||(t=void 0),o(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var o=n(18),r=n(62),i=n(11)("species");e.exports=function(e,t){var n,s=o(e).constructor;return void 0===s||void 0==(n=o(s)[i])?t:r(n)}},function(e,t){e.exports=function(e,t,n){var o=void 0===n;switch(t.length){case 0:return o?e():e.call(n);case 1:return o?e(t[0]):e.call(n,t[0]);case 2:return o?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var o=n(14),r=n(80).set,i=o.MutationObserver||o.WebKitMutationObserver,s=o.process,a=o.Promise,l="process"==n(43)(s);e.exports=function(){var e,t,n,u=function(){var o,r;for(l&&(o=s.domain)&&o.exit();e;){r=e.fn,e=e.next;try{r()}catch(o){throw e?n():t=void 0,o}}t=void 0,o&&o.enter()};if(l)n=function(){s.nextTick(u)};else if(!i||o.navigator&&o.navigator.standalone)if(a&&a.resolve){var c=a.resolve();n=function(){c.then(u)}}else n=function(){r.call(o,u)};else{var h=!0,f=document.createTextNode("");new i(u).observe(f,{characterData:!0}),n=function(){f.data=h=!h}}return function(o){var r={fn:o,next:void 0};t&&(t.next=r),e||(e=r,n()),t=r}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var o=n(18),r=n(9),i=n(118);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var o=n(14),r=n(44),i=n(65),s=n(120),a=n(20).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},function(e,t,n){var o=n(37),r=n(69),i=n(52);e.exports=function(e){var t=o(e),n=r.f;if(n)for(var s,a=n(e),l=i.f,u=0;a.length>u;)l.call(e,s=a[u++])&&t.push(s);return t}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var o=n(59),r=n(38);e.exports=function(e){return function(t,n){var i,s,a=r(t)+"",l=o(n),u=a.length;return 0>l||l>=u?e?"":void 0:(i=a.charCodeAt(l),55296>i||i>56319||l+1===u||56320>(s=a.charCodeAt(l+1))||s>57343?e?a.charAt(l):i:e?a.slice(l,l+2):s-56320+(i-55296<<10)+65536)}}},function(e,t,n){"use strict";var o=n(18);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o=n(33),r=n(60),i=n(25);e.exports=[].copyWithin||function(e,t){var n=o(this),s=i(n.length),a=r(e,s),l=r(t,s),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?s:r(u,s))-l,s-a),h=1;for(a>l&&l+c>a&&(h=-1,l+=c-1,a+=c-1);c-- >0;)l in n?n[a]=n[l]:delete n[a],a+=h,l+=h;return n}},function(e,t,n){"use strict";var o=n(33),r=n(60),i=n(25);e.exports=function(e){for(var t=o(this),n=i(t.length),s=arguments.length,a=r(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,u=void 0===l?n:r(l,n);u>a;)t[a++]=e;return t}},function(e,t,n){var o=n(81),r=n(69),i=n(18),s=n(14).Reflect;e.exports=s&&s.ownKeys||function(e){var t=o.f(i(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(0),a=n(35),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(l.default.CLONE_DEBUG),n.clone.wtTable.holder.style.opacity=.4,n.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",(0,s.addClass)(n.clone.wtTable.holder.parentNode,"wtDebugVisible"),n}return i(t,e),t}(l.default);l.default.registerOverlay(l.default.CLONE_DEBUG,u),t.default=u},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),l=n(35),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(u.default.CLONE_LEFT),n}return i(t,e),s(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||n&&"horizontal"===n)t=this.getScrollPosition(),(0,a.resetCssTransform)(e);else{var o=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(o.left),i=Math.ceil(o.right),s=void 0,l=void 0;l=this.wot.wtTable.hider.style.top,l=""===l?0:l,s=0>r&&i-e.offsetWidth>0?-r:0,t=s,s+="px",(0,a.setOverlayPosition)(e,s,l)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){this.mainTableScrollableElement===window?window.scrollTo(e,(0,a.getWindowScrollTop)()):this.mainTableScrollableElement.scrollLeft=e}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=0,o=this.wot.wtSettings.defaultColumnWidth;t>e;)n+=this.wot.wtTable.getStretchedColumnWidth(e)||o,e++;return n}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientHeight===e.offsetHeight?0:(0,a.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode,o=n.style,r=this.wot.getSetting("preventOverflow"),i=void 0;if(this.trimmingContainer!==window||"vertical"===r){var s=this.wot.wtViewport.getWorkspaceHeight()-t;s=Math.min(s,(0,a.innerHeight)(this.wot.wtTable.wtRootElement)),o.height=s+"px"}else o.height="";this.clone.wtTable.holder.style.height=o.height,i=(0,a.outerWidth)(this.clone.wtTable.TABLE),o.width=(0===i?i:i+4)+"px"}},{key:"adjustRootChildrenSize",value:function(){var e=(0,a.getScrollbarWidth)();this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width=parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e+"px"}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){this.clone.wtTable.spreader.style.top="number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,r=o.wtTable.holder,i=0;t&&r.offsetWidth!==r.clientWidth&&(i=(0,a.getScrollbarWidth)()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){var e=this.wot.getSetting("preventOverflow"),t=0;return e||this.trimmingContainer!==window||(t=this.wot.wtTable.holderOffset.left),t}},{key:"getScrollPosition",value:function(){return(0,a.getScrollLeft)(this.mainTableScrollableElement)}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode,n=this.wot.getSetting("rowHeaders"),o=this.wot.getSetting("fixedColumnsLeft");if(this.wot.getSetting("totalRows")?(0,a.removeClass)(t,"emptyRows"):(0,a.addClass)(t,"emptyRows"),o&&!n.length)(0,a.addClass)(t,"innerBorderLeft");else if(!o&&n.length){var r=(0,a.hasClass)(t,"innerBorderLeft");e?(0,a.addClass)(t,"innerBorderLeft"):(0,a.removeClass)(t,"innerBorderLeft"),(!r&&e||r&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}]),t}(u.default);u.default.registerOverlay(u.default.CLONE_LEFT,c),t.default=c},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),l=n(1),u=n(35),c=function(e){return e&&e.__esModule?e:{default:e}}(u),h=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(c.default.CLONE_TOP),n}return i(t,e),s(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||n&&"vertical"===n)t=this.getScrollPosition(),(0,a.resetCssTransform)(e);else{var o=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(o.top),i=Math.ceil(o.bottom),s=void 0,l=void 0;s=this.wot.wtTable.hider.style.left,s=""===s?0:s,l=0>r&&i-e.offsetHeight>0?-r:0,t=l,l+="px",(0,a.setOverlayPosition)(e,s,l)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){this.mainTableScrollableElement===window?window.scrollTo((0,a.getWindowScrollLeft)(),e):this.mainTableScrollableElement.scrollTop=e}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=0,o=this.wot.wtSettings.settings.defaultRowHeight;t>e;){var r=this.wot.wtTable.getRowHeight(e);n+=void 0===r?o:r,e++}return n}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot.wtTable.holder,t=e.clientWidth===e.offsetWidth?0:(0,a.getScrollbarWidth)(),n=this.clone.wtTable.holder.parentNode,o=n.style,r=this.wot.getSetting("preventOverflow"),i=void 0;if(this.trimmingContainer!==window||"horizontal"===r){var s=this.wot.wtViewport.getWorkspaceWidth()-t;s=Math.min(s,(0,a.innerWidth)(this.wot.wtTable.wtRootElement)),o.width=s+"px"}else o.width="";this.clone.wtTable.holder.style.width=o.width,i=(0,a.outerHeight)(this.clone.wtTable.TABLE),o.height=(0===i?i:i+4)+"px"}},{key:"adjustRootChildrenSize",value:function(){var e=(0,a.getScrollbarWidth)();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height=parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e+"px"}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){this.clone.wtTable.spreader.style.left="number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,r=o.wtTable.holder,i=0;if(t&&r.offsetHeight!==r.clientHeight&&(i=(0,a.getScrollbarWidth)()),t){var s=this.wot.getSetting("fixedRowsBottom"),l=(this.wot.getSetting("fixedRowsTop"),this.wot.getSetting("totalRows"));n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight()-this.sumCellSizes(l-s,l),n+=1}else n+=this.sumCellSizes(this.wot.getSetting("fixedRowsTop"),e);n+=i,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,a.getScrollTop)(this.mainTableScrollableElement)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange){var t=e.getBorder(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var e=this,t=this.wot.selections;this.redrawSelectionBorders(t.getCell()),(0,l.arrayEach)(t.getAreas(),function(t){e.redrawSelectionBorders(t)}),this.redrawSelectionBorders(t.getFill()),this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh()}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode;if(this.wot.getSetting("totalColumns")?(0,a.removeClass)(t,"emptyColumns"):(0,a.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=(0,a.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?(0,a.addClass)(t,"innerBorderTop"):(0,a.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var o=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(o)for(var r=0;o.length>r;r++)o[r].style["border-left-width"]=0}}}]),t}(c.default);c.default.registerOverlay(c.default.CLONE_TOP,h),t.default=h},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(0),l=n(35),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.clone=n.makeClone(u.default.CLONE_TOP_LEFT_CORNER),n}return i(t,e),s(t,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length||!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.updateTrimmingContainer(),this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=(0,a.outerHeight)(this.clone.wtTable.TABLE),n=(0,a.outerWidth)(this.clone.wtTable.TABLE),o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer===window){var r=this.wot.wtTable.hider.getBoundingClientRect(),i=Math.ceil(r.top),s=Math.ceil(r.left),l=Math.ceil(r.bottom),u=Math.ceil(r.right),c="0",h="0";o&&"vertical"!==o||0>s&&u-e.offsetWidth>0&&(c=-s+"px"),o&&"horizontal"!==o||0>i&&l-e.offsetHeight>0&&(h=-i+"px"),(0,a.setOverlayPosition)(e,c,h)}else(0,a.resetCssTransform)(e);e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===n?n:n+4)+"px"}}}]),t}(u.default);u.default.registerOverlay(u.default.CLONE_TOP_LEFT_CORNER,c),t.default=c},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(0),u=n(187),c=o(u),h=n(54),f=o(h),d=n(86),p=o(d);t.default=function(){function e(t,n){r(this,e),this.settings=t,this.cellRange=n||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}return a(e,[{key:"getBorder",value:function(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new c.default(e,this.settings)),this.instanceBorders[e.guid]}},{key:"isEmpty",value:function(){return null===this.cellRange}},{key:"add",value:function(e){return this.isEmpty()?this.cellRange=new p.default(e):this.cellRange.expand(e),this}},{key:"replace",value:function(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}},{key:"clear",value:function(){return this.cellRange=null,this}},{key:"getCorners",value:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]}},{key:"addClassAtCoords",value:function(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=e.wtTable.getCell(new f.default(t,n));return"object"===(void 0===i?"undefined":s(i))&&(r&&(o=this.classNameGenerator(i),this.classNames.includes(o)||this.classNames.push(o)),(0,l.addClass)(i,o)),this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(o){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===r)return e;var i=0>r?t:r,s=e;(i-=1,(0,l.hasClass)(o,0===i?e:e+"-"+i))?s=e+"-"+(i+1):s=n(o,i);return s}}},{key:"draw",value:function(e){if(this.isEmpty())return void(this.settings.border&&this.getBorder(e).disappear());for(var t=e.wtTable.getRenderedRowsCount(),n=e.wtTable.getRenderedColumnsCount(),o=this.getCorners(),r=i(o,4),s=r[0],a=r[1],u=r[2],c=r[3],h=0;n>h;h+=1){var f=e.wtTable.columnFilter.renderedToSource(h);if(f>=a&&c>=f){var d=e.wtTable.getColumnHeader(f);if(d){var p=[];this.settings.highlightHeaderClassName&&p.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&p.push(this.settings.highlightColumnClassName),(0,l.addClass)(d,p)}}}for(var g=0;t>g;g+=1){var v=e.wtTable.rowFilter.renderedToSource(g);if(v>=s&&u>=v){var y=e.wtTable.getRowHeader(v);if(y){var m=[];this.settings.highlightHeaderClassName&&m.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&m.push(this.settings.highlightRowClassName),(0,l.addClass)(y,m)}}for(var w=0;n>w;w+=1){var C=e.wtTable.columnFilter.renderedToSource(w);s>v||v>u||a>C||C>c?s>v||v>u?a>C||C>c||this.settings.highlightColumnClassName&&this.addClassAtCoords(e,v,C,this.settings.highlightColumnClassName):this.settings.highlightRowClassName&&this.addClassAtCoords(e,v,C,this.settings.highlightRowClassName):this.settings.className&&this.addClassAtCoords(e,v,C,this.settings.className,this.settings.markIntersections);var b=e.getSetting("onAfterDrawSelection",v,C,o,this.settings.layerLevel);"string"==typeof b&&this.addClassAtCoords(e,v,C,b)}}e.getSetting("onBeforeDrawBorders",o,this.settings.className),this.settings.border&&this.getBorder(e).appear(o)}}]),e}()},function(e,t,n){"use strict";function o(){function e(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}var t,n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},o=document.body,r=document.createTextNode(""),i=document.createElement("SPAN"),s=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n,!1)},a=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},l=function(s){var a,l;s?/^[a-zA-Z \.,\\\/\|0-9]$/.test(s)||(s="."):s="",void 0!==r.textContent?r.textContent=t.value+s:r.data=t.value+s,i.style.fontSize=e(t).fontSize,i.style.fontFamily=e(t).fontFamily,i.style.whiteSpace="pre",o.appendChild(i),a=i.clientWidth+2,o.removeChild(i),t.style.height=n.minHeight+"px",t.style.width=n.minWidth>a?n.minWidth+"px":a>n.maxWidth?n.maxWidth+"px":a+"px",l=t.scrollHeight?t.scrollHeight-1:0,n.minHeight>l?t.style.height=n.minHeight+"px":l>n.maxHeight?(t.style.height=n.maxHeight+"px",t.style.overflowY="visible"):t.style.height=l+"px"},u=function(){window.setTimeout(l,0)},c=function(e){if(e&&e.minHeight)if("inherit"==e.minHeight)n.minHeight=t.clientHeight;else{var o=parseInt(e.minHeight);isNaN(o)||(n.minHeight=o)}if(e&&e.maxHeight)if("inherit"==e.maxHeight)n.maxHeight=t.clientHeight;else{var s=parseInt(e.maxHeight);isNaN(s)||(n.maxHeight=s)}if(e&&e.minWidth)if("inherit"==e.minWidth)n.minWidth=t.clientWidth;else{var a=parseInt(e.minWidth);isNaN(a)||(n.minWidth=a)}if(e&&e.maxWidth)if("inherit"==e.maxWidth)n.maxWidth=t.clientWidth;else{var l=parseInt(e.maxWidth);isNaN(l)||(n.maxWidth=l)}i.firstChild||(i.className="autoResize",i.style.display="inline-block",i.appendChild(r))},h=function(e,o,r){t=e,c(o),"TEXTAREA"==t.nodeName&&(t.style.resize="none",t.style.overflowY="",t.style.height=n.minHeight+"px",t.style.minWidth=n.minWidth+"px",t.style.maxWidth=n.maxWidth+"px",t.style.overflowY="hidden"),r&&(s(t,"change",l),s(t,"cut",u),s(t,"paste",u),s(t,"drop",u),s(t,"keydown",u),s(t,"focus",l)),l()};return{init:function(e,t,n){h(e,t,n)},unObserve:function(){a(t,"change",l),a(t,"cut",u),a(t,"paste",u),a(t,"drop",u),a(t,"keydown",u),a(t,"focus",l)},resize:l}}e.exports=o},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(53),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=n(0);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"beginEditing",value:function(e,t){if("mouseup"===t.type){var n=this.TD.querySelector('input[type="checkbox"]');(0,u.hasClass)(n,"htBadValue")||n.click()}}},{key:"finishEditing",value:function(){}},{key:"init",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"focus",value:function(){}}]),t}(l.default)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(55),c=o(u),h=n(236),f=o(h);n(237);var d=n(0),p=n(2),g=n(6),v=o(g),y=n(21),m=n(12),w=n(57),C=o(w);t.default=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.defaultDateFormat="DD/MM/YYYY",n.isCellEdited=!1,n.parentDestroyed=!1,n}return s(t,e),a(t,[{key:"init",value:function(){var e=this;if("function"!=typeof c.default)throw Error("You need to include moment.js to your project.");if("function"!=typeof f.default)throw Error("You need to include Pikaday to your project.");l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",function(){e.parentDestroyed=!0,e.destroyElements()})}},{key:"createElements",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"createElements",this).call(this),this.datePicker=document.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,(0,d.addClass)(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new f.default(this.getDatePickerConfig()),new v.default(this).addEventListener(this.datePicker,"mousedown",function(e){return(0,m.stopPropagation)(e)}),this.hideDatepicker()}},{key:"destroyElements",value:function(){this.$datePicker.destroy()}},{key:"prepare",value:function(e,n,o,r,i,s){this._opened=!1,l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepare",this).call(this,e,n,o,r,i,s)}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout(setTimeout(function(){e.instance._refreshBorders()},0)),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var o=this.originalValue;void 0!==o&&this.setValue(o)}this.hideDatepicker(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t=this.TD.getBoundingClientRect(),n=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.$datePicker.config(),r=void 0,i=this.instance.view.isMouseDown(),s=!!e&&(0,y.isMetaKey)(e.keyCode);this.datePickerStyle.top=window.pageYOffset+t.top+(0,d.outerHeight)(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+t.left+"px",this.$datePicker._onInputFocus=function(){},o.format=n,this.originalValue?(r=this.originalValue,(0,c.default)(r,n,!0).isValid()&&this.$datePicker.setMoment((0,c.default)(r,n),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||i||this.setValue("")):this.cellProperties.defaultDate?(r=this.cellProperties.defaultDate,o.defaultDate=r,(0,c.default)(r,n,!0).isValid()&&this.$datePicker.setMoment((0,c.default)(r,n),!0),s||i||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var e=this,t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,p.deepExtend)(n,this.cellProperties.datePickerConfig);var o=n.onSelect,r=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.format=n.format||this.defaultDateFormat,n.reposition=n.reposition||!1,n.onSelect=function(t){isNaN(t.getTime())||(t=(0,c.default)(t).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(t),e.hideDatepicker(),o&&o()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),r&&r()},n}}]),t}(C.default)},function(e,t){e.exports=n},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(188),c=o(u),h=n(15),f=o(h),d=function(e){function t(){return r(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),a(t,[{key:"prepare",value:function(e,n,o,r,i,s){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepare",this).call(this,e,n,o,r,i,s),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}]),t}(c.default);f.default.getSingleton().add("beforeValidate",function(e,t,n,o){var r=this.getCellMeta(t,this.propToCol(n));r.editor===d&&void 0===r.strict&&(r.filter=!1,r.strict=!0)}),t.default=d},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=n(57),a=function(e){return e&&e.__esModule?e:{default:e}}(s);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),t}(a.default)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=n(0),u=n(57),c=function(e){return e&&e.__esModule?e:{default:e}}(u);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"createElements",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"createElements",this).call(this),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,l.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}]),t}(c.default)},function(e,t,n){"use strict";t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=n(0),i=n(12),s=n(21),a=n(53),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=l.default.prototype.extend();u.prototype.init=function(){this.select=document.createElement("SELECT"),(0,r.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement.appendChild(this.select),this.registerHooks()},u.prototype.registerHooks=function(){var e=this;this.instance.addHook("afterScrollHorizontally",function(){return e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){return e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){return e.refreshDimensions()}),this.instance.addHook("afterRowResize",function(){return e.refreshDimensions()})},u.prototype.prepare=function(){l.default.prototype.prepare.apply(this,arguments);var e,t=this.cellProperties.selectOptions;e=this.prepareOptions("function"==typeof t?t(this.row,this.col,this.prop):t),(0,r.empty)(this.select);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=document.createElement("OPTION");o.value=n,(0,r.fastInnerHTML)(o,e[n]),this.select.appendChild(o)}},u.prototype.prepareOptions=function(e){var t={};if(Array.isArray(e))for(var n=0,r=e.length;r>n;n++)t[e[n]]=e[n];else"object"==(void 0===e?"undefined":o(e))&&(t=e);return t},u.prototype.getValue=function(){return this.select.value},u.prototype.setValue=function(e){this.select.value=e};var c=function(e){var t=this,n=t.getActiveEditor();switch(e.keyCode){case s.KEY_CODES.ARROW_UP:var o=n.select.selectedIndex-1;0>o||(n.select[o].selected=!0),(0,i.stopImmediatePropagation)(e),e.preventDefault();break;case s.KEY_CODES.ARROW_DOWN:var r=n.select.selectedIndex+1;r>n.select.length-1||(n.select[r].selected=!0),(0,i.stopImmediatePropagation)(e),e.preventDefault()}};u.prototype.open=function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.instance.addHook("beforeKeyDown",c)},u.prototype.close=function(){this._opened=!1,this.select.style.display="none",this.instance.removeHook("beforeKeyDown",c)},u.prototype.focus=function(){this.select.focus()},u.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},u.prototype.refreshDimensions=function(){if(this.state===a.EditorState.EDITING){if(!(this.TD=this.getEditedCell()))return void this.close();var e,t=(0,r.outerWidth)(this.TD)+1,n=(0,r.outerHeight)(this.TD)+1,o=(0,r.offset)(this.TD),i=(0,r.offset)(this.instance.rootElement),s=(0,r.getScrollableElement)(this.TD),l=o.top-i.top-1-(s.scrollTop||0),u=o.left-i.left-1-(s.scrollLeft||0),c=this.checkEditorSection();this.instance.getSettings();switch(c){case"top":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":e=(0,r.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelectedLast()[0]&&(l+=1),0===this.instance.getSelectedLast()[1]&&(u+=1);var h=this.select.style;e&&-1!=e?h[e[0]]=e[1]:(0,r.resetCssTransform)(this.select);var f=(0,r.getComputedStyle)(this.TD);parseInt(f.borderTopWidth,10)>0&&(n-=1),parseInt(f.borderLeftWidth,10)>0&&(t-=1),h.height=n+"px",h.minWidth=t+"px",h.top=l+"px",h.left=u+"px",h.margin="0px"}},u.prototype.getEditedCell=function(){var e,t=this.checkEditorSection();switch(t){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.select.style.zIndex=""}return-1!=e&&-2!=e?e:void 0},t.default=u},function(e,t,n){"use strict";function o(e,t,n,o,i,s,a){var l=[],u=[];a.className&&(t.className=t.className?t.className+" "+a.className:a.className),a.readOnly&&l.push(a.readOnlyCellClassName),!1===a.valid&&a.invalidCellClassName?l.push(a.invalidCellClassName):u.push(a.invalidCellClassName),!1===a.wordWrap&&a.noWordWrapClassName&&l.push(a.noWordWrapClassName),!s&&a.placeholder&&l.push(a.placeholderCellClassName),(0,r.removeClass)(t,u),(0,r.addClass)(t,l)}t.__esModule=!0;var r=n(0);t.default=o},function(e,t,n){"use strict";function o(e,t,n,o,i,h,f){var d=(u.cloneNode(!0),c.cloneNode(!0));if(f.allowHtml?(0,l.getRenderer)("html").apply(this,arguments):(0,l.getRenderer)("text").apply(this,arguments),t.appendChild(d),(0,r.addClass)(t,"htAutocomplete"),t.firstChild||t.appendChild(document.createTextNode(String.fromCharCode(160))),!e.acArrowListener){var p=new s.default(e);e.acArrowListener=function(i){(0,r.hasClass)(i.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new a.CellCoords(n,o),t)},p.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",function(){p.destroy()})}}t.__esModule=!0;var r=n(0),i=n(6),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=n(4),l=n(13),u=document.createElement("DIV");u.className="htAutocompleteWrapper";var c=document.createElement("DIV");c.className="htAutocompleteArrow",c.appendChild(document.createTextNode(String.fromCharCode(9660)));t.default=o},function(e,t,n){"use strict";function o(e,t,n,o,a,l,u){function c(e){var t=(0,v.partial)(g.isKey,e.keyCode);t("SPACE|ENTER|DELETE|BACKSPACE")&&!(0,y.isImmediatePropagationStopped)(e)&&p(function(){(0,y.stopImmediatePropagation)(e),e.preventDefault()}),t("SPACE|ENTER")&&d(),t("DELETE|BACKSPACE")&&d(!0)}function d(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.getSelectedRangeLast();if(n){for(var o=n.getTopLeftCorner(),r=o.row,i=o.col,s=n.getBottomRightCorner(),a=s.row,l=s.col,u=[],c=r;a>=c;c+=1)for(var h=i;l>=h;h+=1){var f=e.getCellMeta(c,h);if("checkbox"!==f.type)return;if(!0!==f.readOnly){void 0===f.checkedTemplate&&(f.checkedTemplate=!0),void 0===f.uncheckedTemplate&&(f.uncheckedTemplate=!1);var d=e.getDataAtCell(c,h);!1===t?[f.checkedTemplate,""+f.checkedTemplate].includes(d)?u.push([c,h,f.uncheckedTemplate]):[f.uncheckedTemplate,""+f.uncheckedTemplate,null,void 0].includes(d)&&u.push([c,h,f.checkedTemplate]):u.push([c,h,f.uncheckedTemplate])}}u.length>0&&e.setDataAtCell(u)}}function p(t){var n=e.getSelectedRangeLast();if(n)for(var o=n.getTopLeftCorner(),r=n.getBottomRightCorner(),i=o.row;r.row>=i;i++)for(var s=o.col;r.col>=s;s++){var a=e.getCellMeta(i,s);if("checkbox"!==a.type)return;var l=e.getCell(i,s);if(null==l)t(i,s,a);else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!a.readOnly&&t(u)}}}(0,m.getRenderer)("base").apply(this,arguments);var C=(r(e),i()),E=u.label,S=!1;if(void 0===u.checkedTemplate&&(u.checkedTemplate=!0),void 0===u.uncheckedTemplate&&(u.uncheckedTemplate=!1),(0,h.empty)(t),l===u.checkedTemplate||(0,f.equalsIgnoreCase)(l,u.checkedTemplate)?C.checked=!0:l===u.uncheckedTemplate||(0,f.equalsIgnoreCase)(l,u.uncheckedTemplate)?C.checked=!1:null===l?(0,h.addClass)(C,"noValue"):(C.style.display="none",(0,h.addClass)(C,b),S=!0),C.setAttribute("data-row",n),C.setAttribute("data-col",o),!S&&E){var O="";E.value?O="function"==typeof E.value?E.value.call(this,n,o,a,l):E.value:E.property&&(O=e.getDataAtRowProp(n,E.property));var T=s(O);"before"===E.position?T.appendChild(C):T.insertBefore(C,T.firstChild),C=T}t.appendChild(C),S&&t.appendChild(document.createTextNode("#bad-value#")),w.has(e)||(w.set(e,!0),e.addHook("beforeKeyDown",c))}function r(e){var t=C.get(e);return t||(t=new p.default(e),t.addEventListener(e.rootElement,"click",function(t){return l(t,e)}),t.addEventListener(e.rootElement,"mouseup",function(t){return a(t,e)}),t.addEventListener(e.rootElement,"change",function(t){return u(t,e)}),C.set(e,t)),t}function i(){var e=document.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("autocomplete","off"),e.setAttribute("tabindex","-1"),e.cloneNode(!1)}function s(e){var t=document.createElement("label");return t.className="htCheckboxRendererLabel",t.appendChild(document.createTextNode(e)),t.cloneNode(!0)}function a(e,t){c(e.target)&&setTimeout(t.listen,10)}function l(e,t){if(!c(e.target))return!1;t.getCellMeta(parseInt(e.target.getAttribute("data-row"),10),parseInt(e.target.getAttribute("data-col"),10)).readOnly&&e.preventDefault()}function u(e,t){if(!c(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),o=parseInt(e.target.getAttribute("data-col"),10),r=t.getCellMeta(n,o);if(!r.readOnly){var i=null;i=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(n,o,i)}}function c(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}t.__esModule=!0;var h=n(0),f=n(36),d=n(6),p=function(e){return e&&e.__esModule?e:{default:e}}(d),g=n(21),v=n(42),y=n(12),m=n(13),w=new WeakMap,C=new WeakMap,b="htBadValue";t.default=o},function(e,t,n){"use strict";function o(e,t,n,o,s,a,l){(0,i.getRenderer)("base").apply(this,arguments),null!==a&&void 0!==a||(a=""),(0,r.fastInnerHTML)(t,a)}t.__esModule=!0;var r=n(0),i=n(13);t.default=o},function(e,t,n){"use strict";function o(e,t,n,o,r,l,u){if((0,a.isNumeric)(l)){var c=u.numericFormat,h=c&&c.culture,f=c&&c.pattern,d=u.className||"",p=d.length?d.split(" "):[];void 0!==h&&i.default.culture(h),l=(0,i.default)(l).format(f||"0"),0>p.indexOf("htLeft")&&0>p.indexOf("htCenter")&&0>p.indexOf("htRight")&&0>p.indexOf("htJustify")&&p.push("htRight"),0>p.indexOf("htNumeric")&&p.push("htNumeric"),u.className=p.join(" ")}(0,s.getRenderer)("text")(e,t,n,o,r,l,u)}t.__esModule=!0;var r=n(247),i=function(e){return e&&e.__esModule?e:{default:e}}(r),s=n(13),a=n(5);t.default=o},function(e,n){e.exports=t},function(e,t,n){"use strict";function o(e,t,n,o,a,l,u){(0,i.getRenderer)("text").apply(this,arguments),l=t.innerHTML;var c=u.hashLength||l.length,h=u.hashSymbol||"*",f="";(0,s.rangeEach)(c-1,function(){f+=h}),(0,r.fastInnerHTML)(t,f)}t.__esModule=!0;var r=n(0),i=n(13),s=n(5);t.default=o},function(e,t,n){"use strict";function o(e,t,n,o,a,l,u){(0,s.getRenderer)("base").apply(this,arguments),!l&&u.placeholder&&(l=u.placeholder);var c=(0,i.stringify)(l);if(e.getSettings().trimWhitespace||(c=c.replace(/ /g,String.fromCharCode(160))),u.rendererTemplate){(0,r.empty)(t);var h=document.createElement("TEMPLATE");h.setAttribute("bind","{{}}"),h.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(h),h.model=e.getSourceDataAtRow(n),t.appendChild(h)}else(0,r.fastInnerText)(t,c)}t.__esModule=!0;var r=n(0),i=n(16),s=n(13);t.default=o},function(e,t,n){"use strict";function o(e,t){if(null==e&&(e=""),this.allowEmpty&&""===e)return void t(!0);this.strict&&this.source?"function"==typeof this.source?this.source(e,r(e,t)):r(e,t)(this.source):t(!0)}function r(e,t){var n=e;return function(e){for(var o=!1,r=0,i=e.length;i>r;r++)if(n===e[r]){o=!0;break}t(o)}}t.__esModule=!0,t.default=o},function(e,t,n){"use strict";function o(e,t){var n=!0,o=(0,l.getEditorInstance)("date",this.instance);null==e&&(e="");var i=(0,s.default)(new Date(e)).isValid()||(0,s.default)(e,o.defaultDateFormat).isValid(),a=(0,s.default)(e,this.dateFormat||o.defaultDateFormat,!0).isValid();if(this.allowEmpty&&""===e&&(i=!0,a=!0),i||(n=!1),!i&&a&&(n=!0),i&&!a)if(!0===this.correctFormat){var u=r(e,this.dateFormat),c=this.instance.runHooks("unmodifyRow",this.row),h=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(c,h,u,"dateValidator"),n=!0}else n=!1;t(n)}function r(e,t){var n=(0,s.default)((0,a.getNormalizedDate)(e)),o=(0,s.default)(e,t),r=e.search(/[A-z]/g)>-1,i=void 0;return i=n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||r?n:o,i.format(t)}t.__esModule=!0,t.default=o,t.correctFormat=r;var i=n(55),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=n(190),l=n(17)},function(e,t,n){"use strict";function o(e,t){null==e&&(e=""),t(this.allowEmpty&&""===e?!0:""===e?!1:/^-?\d*(\.|,)?\d*$/.test(e))}t.__esModule=!0,t.default=o},function(e,t,n){"use strict";function o(e,t){var n=!0,o=this.timeFormat||"h:mm:ss a";null===e&&(e=""),e=/^\d{3,}$/.test(e)?parseInt(e,10):e;var r=/^\d{1,2}$/.test(e);r&&(e+=":00");var a=(0,i.default)(e,s,!0).isValid()?(0,i.default)(e):(0,i.default)(e,o),l=a.isValid(),u=(0,i.default)(e,o,!0).isValid()&&!r;if(this.allowEmpty&&""===e&&(l=!0,u=!0),l||(n=!1),!l&&u&&(n=!0),l&&!u)if(!0===this.correctFormat){var c=a.format(o),h=this.instance.runHooks("unmodifyRow",this.row),f=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(h,f,c,"timeValidator"),n=!0}else n=!1;t(n)}t.__esModule=!0,t.default=o;var r=n(55),i=function(e){return e&&e.__esModule?e:{default:e}}(r),s=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"]},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13),i=n(28);t.default={editor:(0,o.getEditor)("autocomplete"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13);t.default={editor:(0,o.getEditor)("checkbox"),renderer:(0,r.getRenderer)("checkbox")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13),i=n(28);t.default={editor:(0,o.getEditor)("date"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("date")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13),i=n(28);t.default={editor:(0,o.getEditor)("dropdown"),renderer:(0,r.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13);t.default={editor:(0,o.getEditor)("handsontable"),renderer:(0,r.getRenderer)("autocomplete")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13),i=n(28);t.default={editor:(0,o.getEditor)("numeric"),renderer:(0,r.getRenderer)("numeric"),validator:(0,i.getValidator)("numeric"),dataType:"number"}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13);n(28);t.default={editor:(0,o.getEditor)("password"),renderer:(0,r.getRenderer)("password"),copyable:!1}},function(e,t,n){"use strict";t.__esModule=!0;var o=(n(27),n(17)),r=n(13);t.default={editor:(0,o.getEditor)("text"),renderer:(0,r.getRenderer)("text")}},function(e,t,n){"use strict";t.__esModule=!0;var o=n(17),r=n(13),i=n(28);t.default={editor:(0,o.getEditor)("text"),renderer:(0,r.getRenderer)("text"),validator:(0,i.getValidator)("time")}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){var o=this;this.instance=e,this.priv=t,this.GridSettings=n,this.dataSource=this.instance.getSettings().data,this.cachedLength=null,this.skipCache=!1,this.latestSourceRowsCount=0,this.duckSchema=this.dataSource&&this.dataSource[0]?this.recursiveDuckSchema(this.dataSource[0]):{},this.createMap(),this.interval=d.default.create(function(){return o.clearLengthCache()},"15fps"),this.instance.addHook("skipLengthCache",function(e){return o.onSkipLengthCache(e)}),this.onSkipLengthCache(500)}t.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(191),a=o(s),l=n(90),u=n(89),c=n(2),h=n(1),f=n(264),d=o(f),p=n(5),g=n(265),v=o(g),y=n(15);o(y);r.prototype.DESTINATION_RENDERER=1,r.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,r.prototype.recursiveDuckSchema=function(e){return(0,c.duckSchema)(e)},r.prototype.recursiveDuckColumns=function(e,t,n){var o,r;if(void 0===t&&(t=0,n=""),"object"===(void 0===e?"undefined":i(e))&&!Array.isArray(e))for(r in e)(0,c.hasOwnProperty)(e,r)&&(null===e[r]?(o=n+r,this.colToPropCache.push(o),this.propToColCache.set(o,t),t++):t=this.recursiveDuckColumns(e[r],t,r+"."));return t},r.prototype.createMap=function(){var e=void 0,t=this.getSchema();if(void 0===t)throw Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new v.default;var n=this.instance.getSettings().columns;if(n){var o=this.instance.getSettings().maxCols,r=Math.min(o,n.length),i=0,s=!1,a=(0,c.deepObjectSize)(t);for("function"==typeof n&&(r=a>0?a:this.instance.countSourceCols(),s=!0),e=0;r>e;e++){var l=s?n(e):n[e];if((0,c.isObject)(l)){if(void 0!==l.data){var u=s?i:e;this.colToPropCache[u]=l.data,this.propToColCache.set(l.data,u)}i++}}}else this.recursiveDuckColumns(t)},r.prototype.colToProp=function(e){return e=this.instance.runHooks("modifyCol",e),!isNaN(e)&&this.colToPropCache&&void 0!==this.colToPropCache[e]?this.colToPropCache[e]:e},r.prototype.propToCol=function(e){var t;return t=void 0===this.propToColCache.get(e)?e:this.propToColCache.get(e),t=this.instance.runHooks("unmodifyCol",t)},r.prototype.getSchema=function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema},r.prototype.createRow=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments[2],r=0;if("number"==typeof e&&e<this.instance.countSourceRows()||(e=this.instance.countSourceRows()),!1===this.instance.runHooks("beforeCreateRow",e,n,o))return 0;for(var i=this.instance.getSettings().maxRows,s=this.instance.countCols();n>r&&this.instance.countSourceRows()<i;)!function(){var n=null;"array"===t.instance.dataType?t.instance.getSettings().dataSchema?n=(0,c.deepClone)(t.getSchema()):(n=[],(0,p.rangeEach)(s-1,function(){return n.push(null)})):"function"===t.instance.dataType?n=t.instance.getSettings().dataSchema(e):(n={},(0,c.deepExtend)(n,t.getSchema())),e===t.instance.countSourceRows()?t.dataSource.push(n):t.spliceData(e,0,n),r++}();return this.instance.runHooks("afterCreateRow",e,r,o),this.instance.forceFullRender=!0,r},r.prototype.createCol=function(e,t,n){if(!this.instance.isColumnModificationAllowed())throw 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.");var o,r,i=this.instance.countSourceRows(),s=this.dataSource,a=0;t||(t=1),"number"==typeof e&&e<this.instance.countCols()||(e=this.instance.countCols()),this.instance.runHooks("beforeCreateCol",e,t,n),r=e;for(var l=this.instance.getSettings().maxCols;t>a&&this.instance.countCols()<l;){if(o=(0,u.columnFactory)(this.GridSettings,this.priv.columnsSettingConflicts),"number"==typeof e&&e<this.instance.countCols()){for(var c=0;i>c;c++)s[c].splice(r,0,null);this.priv.columnSettings.splice(r,0,o)}else{if(i>0)for(var h=0;i>h;h++)void 0===s[h]&&(s[h]=[]),s[h].push(null);else s.push([null]);this.priv.columnSettings.push(o)}a++,r++}return this.instance.runHooks("afterCreateCol",e,a,n),this.instance.forceFullRender=!0,a},r.prototype.removeRow=function(e,t,n){t||(t=1),"number"!=typeof e&&(e=-t),t=this.instance.runHooks("modifyRemovedAmount",t,e),e=(this.instance.countSourceRows()+e)%this.instance.countSourceRows();var o=this.visualRowsToPhysical(e,t);if(!1!==this.instance.runHooks("beforeRemoveRow",e,t,o,n)){var r=this.dataSource,i=void 0;i=this.filterData(e,t),i&&(r.length=0,Array.prototype.push.apply(r,i)),this.instance.runHooks("afterRemoveRow",e,t,o,n),this.instance.forceFullRender=!0}},r.prototype.removeCol=function(e,t,n){if("object"===this.instance.dataType||this.instance.getSettings().columns)throw Error("cannot remove column with object data source or columns option specified");t||(t=1),"number"!=typeof e&&(e=-t),e=(this.instance.countCols()+e)%this.instance.countCols();var o=this.visualColumnsToPhysical(e,t),r=o.slice(0).sort(function(e,t){return t-e});if(!1!==this.instance.runHooks("beforeRemoveCol",e,t,o,n)){for(var i=!0,s=r.length,a=this.dataSource,l=0;s>l;l++)i&&o[0]!==o[l]-l&&(i=!1);if(i)for(var u=0,c=this.instance.countSourceRows();c>u;u++)a[u].splice(o[0],t);else{for(var h=0,f=this.instance.countSourceRows();f>h;h++)for(var d=0;s>d;d++)a[h].splice(r[d],1);for(var p=0;s>p;p++)this.priv.columnSettings.splice(o[p],1)}this.instance.runHooks("afterRemoveCol",e,t,o,n),this.instance.forceFullRender=!0}},r.prototype.spliceCol=function(e,t,n){var o=4>arguments.length?[]:[].slice.call(arguments,3),r=this.instance.getDataAtCol(e),i=r.slice(t,t+n),s=r.slice(t+n);(0,h.extendArray)(o,s);for(var a=0;n>a;)o.push(null),a++;return(0,h.to2dArray)(o),this.instance.populateFromArray(t,e,o,null,null,"spliceCol"),i},r.prototype.spliceRow=function(e,t,n){var o=4>arguments.length?[]:[].slice.call(arguments,3),r=this.instance.getSourceDataAtRow(e),i=r.slice(t,t+n),s=r.slice(t+n);(0,h.extendArray)(o,s);for(var a=0;n>a;)o.push(null),a++;return this.instance.populateFromArray(e,t,[o],null,null,"spliceRow"),i},r.prototype.spliceData=function(e,t,n){!1!==this.instance.runHooks("beforeDataSplice",e,t,n)&&this.dataSource.splice(e,t,n)},r.prototype.filterData=function(e,t){var n=this.visualRowsToPhysical(e,t);if(!1!==this.instance.runHooks("beforeDataFilter",e,t,n))return this.dataSource.filter(function(e,t){return-1==n.indexOf(t)})},r.prototype.get=function(e,t){e=this.instance.runHooks("modifyRow",e);var n=this.dataSource[e],o=this.instance.runHooks("modifyRowData",e);n=isNaN(o)?o:n;var r=null;if(n&&n.hasOwnProperty&&(0,c.hasOwnProperty)(n,t))r=n[t];else if("string"==typeof t&&t.indexOf(".")>-1){var i=t.split("."),s=n;if(!s)return null;for(var a=0,l=i.length;l>a;a++)if(void 0===(s=s[i[a]]))return null;r=s}else"function"==typeof t&&(r=t(this.dataSource.slice(e,e+1)[0]));if(this.instance.hasHook("modifyData")){var u=(0,c.createObjectPropListener)(r);this.instance.runHooks("modifyData",e,this.propToCol(t),u,"get"),u.isTouched()&&(r=u.value)}return r};var m=(0,l.cellMethodLookupFactory)("copyable",!1);r.prototype.getCopyable=function(e,t){return m.call(this.instance,e,this.propToCol(t))?this.get(e,t):""},r.prototype.set=function(e,t,n,o){e=this.instance.runHooks("modifyRow",e,o||"datamapGet");var r=this.dataSource[e],i=this.instance.runHooks("modifyRowData",e);if(r=isNaN(i)?i:r,this.instance.hasHook("modifyData")){var s=(0,c.createObjectPropListener)(n);this.instance.runHooks("modifyData",e,this.propToCol(t),s,"set"),s.isTouched()&&(n=s.value)}if(r&&r.hasOwnProperty&&(0,c.hasOwnProperty)(r,t))r[t]=n;else if("string"==typeof t&&t.indexOf(".")>-1){var a=t.split("."),l=r,u=0,h=void 0;for(u=0,h=a.length-1;h>u;u++)void 0===l[a[u]]&&(l[a[u]]={}),l=l[a[u]];l[a[u]]=n}else"function"==typeof t?t(this.dataSource.slice(e,e+1)[0],n):r[t]=n},r.prototype.visualRowsToPhysical=function(e,t){for(var n,o=this.instance.countSourceRows(),r=(o+e)%o,i=[],s=t;o>r&&s;)n=this.instance.runHooks("modifyRow",r),i.push(n),s--,r++;return i},r.prototype.visualColumnsToPhysical=function(e,t){for(var n=this.instance.countCols(),o=(n+e)%n,r=[],i=t;n>o&&i;){r.push(this.instance.runHooks("modifyCol",o)),i--,o++}return r},r.prototype.clear=function(){for(var e=0;e<this.instance.countSourceRows();e++)for(var t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")},r.prototype.clearLengthCache=function(){this.cachedLength=null},r.prototype.getLength=function(){var e=this,t=void 0,n=this.instance.getSettings().maxRows;t=0>n||0===n?0:n||1/0;var o=this.instance.countSourceRows();if(this.instance.hasHook("modifyRow")){var r=this.skipCache;this.interval.start(),o!==this.latestSourceRowsCount&&(r=!0),this.latestSourceRowsCount=o,null===this.cachedLength||r?((0,p.rangeEach)(o-1,function(t){null===(t=e.instance.runHooks("modifyRow",t))&&--o}),this.cachedLength=o):o=this.cachedLength}else this.interval.stop();return Math.min(o,t)},r.prototype.getAll=function(){var e={row:0,col:0},t={row:Math.max(this.instance.countSourceRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,r.prototype.DESTINATION_RENDERER):[]},r.prototype.getRange=function(e,t,n){var o,r,i,s,a,l=[],u=this.instance.getSettings().maxRows,c=this.instance.getSettings().maxCols;if(0===u||0===c)return[];var h=n===this.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get;for(r=Math.min(Math.max(u-1,0),Math.max(e.row,t.row)),s=Math.min(Math.max(c-1,0),Math.max(e.col,t.col)),o=Math.min(e.row,t.row);r>=o;o++){a=[];var f=this.instance.runHooks("modifyRow",o);for(i=Math.min(e.col,t.col);s>=i&&null!==f;i++)a.push(h.call(this,o,this.colToProp(i)));null!==f&&l.push(a)}return l},r.prototype.getText=function(e,t){return a.default.stringify(this.getRange(e,t,this.DESTINATION_RENDERER))},r.prototype.getCopyableText=function(e,t){return a.default.stringify(this.getRange(e,t,this.DESTINATION_CLIPBOARD_GENERATOR))},r.prototype.onSkipLengthCache=function(e){var t=this;this.skipCache=!0,setTimeout(function(){t.skipCache=!1},e)},r.prototype.destroy=function(){this.interval.stop(),this.interval=null,this.instance=null,this.priv=null,this.GridSettings=null,this.dataSource=null,this.cachedLength=null,this.duckSchema=null},t.default=r},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e){return"string"==typeof e&&/fps$/.test(e)&&(e=1e3/parseInt(e.replace("fps","")||0,10)),e}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.parseDelay=r;var s=n(40);t.default=function(){function e(t,n){var i=this;o(this,e),this.timer=null,this.func=t,this.delay=r(n),this.stopped=!0,this._then=null,this._callback=function(){return i.__callback()}}return i(e,null,[{key:"create",value:function(t,n){return new e(t,n)}}]),i(e,[{key:"start",value:function(){return this.stopped&&(this._then=Date.now(),this.stopped=!1,this.timer=(0,s.requestAnimationFrame)(this._callback)),this}},{key:"stop",value:function(){return this.stopped||(this.stopped=!0,(0,s.cancelAnimationFrame)(this.timer),this.timer=null),this}},{key:"__callback",value:function(){if(this.timer=(0,s.requestAnimationFrame)(this._callback),this.delay){var e=Date.now(),t=e-this._then;t>this.delay&&(this._then=e-t%this.delay,this.func())}else this.func()}}]),e}()},function(e,t,n){"use strict";function o(){function e(e){return null!==e&&!n(e)&&("string"==typeof e||"number"==typeof e)}function t(e){return null!==e&&("object"==(void 0===e?"undefined":r(e))||"function"==typeof e)}function n(e){return e!==e}var o={arrayMap:[],weakMap:new WeakMap};return{get:function(n){return e(n)?o.arrayMap[n]:t(n)?o.weakMap.get(n):void 0},set:function(n,r){if(e(n))o.arrayMap[n]=r;else{if(!t(n))throw Error("Invalid key type");o.weakMap.set(n,r)}},delete:function(n){e(n)?delete o.arrayMap[n]:t(n)&&o.weakMap.delete(n)}}}t.__esModule=!0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=o},function(e,t,n){"use strict";function o(e,t,n){function o(e){var o="function"==typeof t.settings.enterMoves?t.settings.enterMoves(event):t.settings.enterMoves;e?n.transformStart(-o.row,-o.col):n.transformStart(o.row,o.col,!0)}function l(e){e?n.transformEnd(-1,0):n.transformStart(-1,0)}function h(e){e?n.transformEnd(1,0):n.transformStart(1,0)}function f(e){e?n.transformEnd(0,1):n.transformStart(0,1)}function d(e){e?n.transformEnd(0,-1):n.transformStart(0,-1)}function p(a){if(e.isListening()&&(e.runHooks("beforeKeyDown",a),!m&&!(0,s.isImmediatePropagationStopped)(a)&&(t.lastKeyCode=a.keyCode,n.isSelected()))){var u=(a.ctrlKey||a.metaKey)&&!a.altKey;if(v&&!v.isWaiting()&&!((0,i.isMetaKey)(a.keyCode)||(0,i.isCtrlMetaKey)(a.keyCode)||u||y.isEditorOpened()))return void y.openEditor("",a);var p=a.shiftKey?n.setRangeEnd:n.setRangeStart,g=void 0;switch(a.keyCode){case i.KEY_CODES.A:!y.isEditorOpened()&&u&&(e.selectAll(),a.preventDefault(),(0,s.stopPropagation)(a));break;case i.KEY_CODES.ARROW_UP:y.isEditorOpened()&&!v.isWaiting()&&y.closeEditorAndSaveChanges(u),l(a.shiftKey),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.ARROW_DOWN:y.isEditorOpened()&&!v.isWaiting()&&y.closeEditorAndSaveChanges(u),h(a.shiftKey),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.ARROW_RIGHT:y.isEditorOpened()&&!v.isWaiting()&&y.closeEditorAndSaveChanges(u),f(a.shiftKey),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.ARROW_LEFT:y.isEditorOpened()&&!v.isWaiting()&&y.closeEditorAndSaveChanges(u),d(a.shiftKey),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.TAB:g="function"==typeof t.settings.tabMoves?t.settings.tabMoves(a):t.settings.tabMoves,a.shiftKey?n.transformStart(-g.row,-g.col):n.transformStart(g.row,g.col,!0),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.BACKSPACE:case i.KEY_CODES.DELETE:e.emptySelectedCells(),y.prepareEditor(),a.preventDefault();break;case i.KEY_CODES.F2:y.openEditor(null,a),v&&v.enableFullEditMode(),a.preventDefault();break;case i.KEY_CODES.ENTER:y.isEditorOpened()?(v&&v.state!==c.EditorState.WAITING&&y.closeEditorAndSaveChanges(u),o(a.shiftKey)):e.getSettings().enterBeginsEditing?(y.openEditor(null,a),v&&v.enableFullEditMode()):o(a.shiftKey),a.preventDefault(),(0,s.stopImmediatePropagation)(a);break;case i.KEY_CODES.ESCAPE:y.isEditorOpened()&&y.closeEditorAndRestoreOriginalValue(u),a.preventDefault();break;case i.KEY_CODES.HOME:a.ctrlKey||a.metaKey?p.call(n,new r.CellCoords(0,n.selectedRange.current().from.col)):p.call(n,new r.CellCoords(n.selectedRange.current().from.row,0)),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.END:a.ctrlKey||a.metaKey?p.call(n,new r.CellCoords(e.countRows()-1,n.selectedRange.current().from.col)):p.call(n,new r.CellCoords(n.selectedRange.current().from.row,e.countCols()-1)),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.PAGE_UP:n.transformStart(-e.countVisibleRows(),0),a.preventDefault(),(0,s.stopPropagation)(a);break;case i.KEY_CODES.PAGE_DOWN:n.transformStart(e.countVisibleRows(),0),a.preventDefault(),(0,s.stopPropagation)(a)}}}var g,v,y=this,m=!1,w=!1;g=new u.default(e),this.lockEditor=function(){w=!0},this.unlockEditor=function(){w=!1},this.destroyEditor=function(e){w||this.closeEditor(e)},this.getActiveEditor=function(){return v},this.prepareEditor=function(){if(!w){var t,n,o,r,i,s,l;if(v&&v.isWaiting())return void this.closeEditor(!1,!1,function(e){e&&y.prepareEditor()});t=e.selection.selectedRange.current().highlight.row,n=e.selection.selectedRange.current().highlight.col,o=e.colToProp(n),r=e.getCell(t,n),i=e.getSourceDataAtCell(e.runHooks("modifyRow",t),n),s=e.getCellMeta(t,n),l=e.getCellEditor(s),l?(v=(0,a.getEditorInstance)(l,e),v.prepare(t,n,o,r,i,s)):v=void 0}},this.isEditorOpened=function(){return v&&v.isOpened()},this.openEditor=function(e,t){v&&!v.cellProperties.readOnly?v.beginEditing(e,t):v&&v.cellProperties.readOnly&&t&&t.keyCode===i.KEY_CODES.ENTER&&o()},this.closeEditor=function(e,t,n){v?v.finishEditing(e,t,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(e){return this.closeEditor(!1,e)},this.closeEditorAndRestoreOriginalValue=function(e){return this.closeEditor(!0,e)},this.destroy=function(){m=!0},function(){function t(e,t,n){"TD"===n.nodeName&&(y.openEditor(null,e),v&&v.enableFullEditMode())}e.addHook("afterDocumentKeyDown",p),g.addEventListener(document.documentElement,"keydown",function(t){m||e.runHooks("afterDocumentKeyDown",t)}),e.view.wt.update("onCellDblClick",t)}()}t.__esModule=!0;var r=n(4),i=n(21),s=n(12),a=n(17),l=n(6),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(53),h=new WeakMap;o.getInstance=function(e,t,n,r){var i=h.get(e);return i||(i=new o(e,t,n,r),h.set(e,i)),i},t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){var t=this,n=this;this.eventManager=new l.default(e),this.instance=e,this.settings=e.getSettings(),this.selectionMouseDown=!1;var o=e.rootElement.getAttribute("style");o&&e.rootElement.setAttribute("data-originalstyle",o),(0,s.addClass)(e.rootElement,"handsontable");var r=document.createElement("TABLE");(0,s.addClass)(r,"htCore"),e.getSettings().tableClassName&&(0,s.addClass)(r,e.getSettings().tableClassName),this.THEAD=document.createElement("THEAD"),r.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),r.appendChild(this.TBODY),e.table=r,e.container.insertBefore(r,e.container.firstChild),this.eventManager.addEventListener(e.rootElement,"mousedown",function(e){this.selectionMouseDown=!0,n.isTextSelectionAllowed(e.target)||(a(),e.preventDefault(),window.focus())}),this.eventManager.addEventListener(e.rootElement,"mouseup",function(e){this.selectionMouseDown=!1}),this.eventManager.addEventListener(e.rootElement,"mousemove",function(e){this.selectionMouseDown&&!n.isTextSelectionAllowed(e.target)&&(a(),e.preventDefault())}),this.eventManager.addEventListener(document.documentElement,"keyup",function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()});var i;this.isMouseDown=function(){return i},this.eventManager.addEventListener(document.documentElement,"mouseup",function(t){e.selection.isInProgress()&&(0,u.isLeftClick)(t)&&e.selection.finish(),i=!1,((0,s.isOutsideInput)(document.activeElement)||!e.selection.isSelected()&&!(0,u.isRightClick)(t))&&e.unlisten()}),this.eventManager.addEventListener(document.documentElement,"mousedown",function(t){var o=t.target,r=t.target,a=t.x||t.clientX,l=t.y||t.clientY;if(!i&&e.rootElement){if(r===e.view.wt.wtTable.holder){var u=(0,s.getScrollbarWidth)();if(document.elementFromPoint(a+u,l)!==e.view.wt.wtTable.holder||document.elementFromPoint(a,l+u)!==e.view.wt.wtTable.holder)return}else for(;r!==document.documentElement;){if(null===r){if(t.isTargetWebComponent)break;return}if(r===e.rootElement)return;r=r.parentNode}("function"==typeof n.settings.outsideClickDeselects?n.settings.outsideClickDeselects(o):n.settings.outsideClickDeselects)?e.deselectCell():e.destroyEditor()}}),this.eventManager.addEventListener(r,"selectstart",function(e){n.settings.fragmentSelection||(0,s.isInput)(e.target)||e.preventDefault()});var a=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},c={debug:function(){return n.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:r,preventOverflow:function(){return t.settings.preventOverflow},stretchH:function(){return n.settings.stretchH},data:e.getDataAtCell,totalRows:function(){return e.countRows()},totalColumns:function(){return e.countCols()},fixedColumnsLeft:function(){return n.settings.fixedColumnsLeft},fixedRowsTop:function(){return n.settings.fixedRowsTop},fixedRowsBottom:function(){return n.settings.fixedRowsBottom},minSpareRows:function(){return n.settings.minSpareRows},renderAllRows:n.settings.renderAllRows,rowHeaders:function(){var t=[];return e.hasRowHeaders()&&t.push(function(e,t){n.appendRowHeader(e,t)}),e.runHooks("afterGetRowHeaderRenderers",t),t},columnHeaders:function(){var t=[];return e.hasColHeaders()&&t.push(function(e,t){n.appendColHeader(e,t)}),e.runHooks("afterGetColumnHeaderRenderers",t),t},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(e,t,o){var r=n.instance.getCellMeta(e,t),i=n.instance.colToProp(t),s=n.instance.getDataAtRowProp(e,i);n.instance.hasHook("beforeValueRender")&&(s=n.instance.runHooks("beforeValueRender",s,r)),n.instance.runHooks("beforeRenderer",o,e,t,i,s,r),n.instance.getCellRenderer(r)(n.instance,o,e,t,i,s,r),n.instance.runHooks("afterRenderer",o,e,t,i,s,r)},selections:n.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return n.settings.fragmentSelection},onCellMouseDown:function(t,o,r,s){var a={row:!1,column:!1,cell:!1};e.listen(),n.activeWt=s,i=!0,e.runHooks("beforeOnCellMouseDown",t,o,r,a),(0,u.isImmediatePropagationStopped)(t)||((0,f.handleMouseEvent)(t,{coords:o,selection:e.selection,controller:a}),e.runHooks("afterOnCellMouseDown",t,o,r),n.activeWt=n.wt)},onCellMouseOut:function(t,o,r,i){n.activeWt=i,e.runHooks("beforeOnCellMouseOut",t,o,r),(0,u.isImmediatePropagationStopped)(t)||(e.runHooks("afterOnCellMouseOut",t,o,r),n.activeWt=n.wt)},onCellMouseOver:function(t,o,r,s){var a={row:!1,column:!1,cell:!1};n.activeWt=s,e.runHooks("beforeOnCellMouseOver",t,o,r,a),(0,u.isImmediatePropagationStopped)(t)||(i&&(0,f.handleMouseEvent)(t,{coords:o,selection:e.selection,controller:a}),e.runHooks("afterOnCellMouseOver",t,o,r),n.activeWt=n.wt)},onCellMouseUp:function(t,o,r,i){n.activeWt=i,e.runHooks("beforeOnCellMouseUp",t,o,r),e.runHooks("afterOnCellMouseUp",t,o,r),n.activeWt=n.wt},onCellCornerMouseDown:function(t){t.preventDefault(),e.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:function(t){t.preventDefault(),e.runHooks("afterOnCellCornerDblClick",t)},beforeDraw:function(e,t){n.beforeRender(e,t)},onDraw:function(e){n.onDraw(e)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return e.runHooks("beforeRemoveCellClassNames")},onAfterDrawSelection:function(t,n,o,r){return e.runHooks("afterDrawSelection",t,n,o,r)},onBeforeDrawBorders:function(t,n){e.runHooks("beforeDrawBorders",t,n)},onBeforeTouchScroll:function(){e.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){e.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(t,n){return e.runHooks("beforeStretchingColumnWidth",t,n)},onModifyRowHeaderWidth:function(t){return e.runHooks("modifyRowHeaderWidth",t)},onModifyGetCellCoords:function(t,n,o){return e.runHooks("modifyGetCellCoords",t,n,o)},viewportRowCalculatorOverride:function(t){var o=e.countRows(),r=n.settings.viewportRowRenderingOffset;if("auto"===r&&n.settings.fixedRowsTop&&(r=10),"number"==typeof r&&(t.startRow=Math.max(t.startRow-r,0),t.endRow=Math.min(t.endRow+r,o-1)),"auto"===r){var i=t.startRow+t.endRow-t.startRow,s=Math.ceil(i/o*12);t.startRow=Math.max(t.startRow-s,0),t.endRow=Math.min(t.endRow+s,o-1)}e.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var o=e.countCols(),r=n.settings.viewportColumnRenderingOffset;if("auto"===r&&n.settings.fixedColumnsLeft&&(r=10),"number"==typeof r&&(t.startColumn=Math.max(t.startColumn-r,0),t.endColumn=Math.min(t.endColumn+r,o-1)),"auto"===r){var i=t.startColumn+t.endColumn-t.startColumn,s=Math.ceil(i/o*12);t.startRow=Math.max(t.startColumn-s,0),t.endColumn=Math.min(t.endColumn+s,o-1)}e.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:function(){return n.settings.rowHeaderWidth},columnHeaderHeight:function(){var t=e.runHooks("modifyColumnHeaderHeight");return n.settings.columnHeaderHeight||t}};e.runHooks("beforeInitWalkontable",c),this.wt=new h.default(c),this.activeWt=this.wt,this.eventManager.addEventListener(n.wt.wtTable.spreader,"mousedown",function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,u.stopPropagation)(e)}),this.eventManager.addEventListener(n.wt.wtTable.spreader,"contextmenu",function(e){e.target===n.wt.wtTable.spreader&&3===e.which&&(0,u.stopPropagation)(e)}),this.eventManager.addEventListener(document.documentElement,"click",function(){n.settings.observeDOMVisibility&&n.wt.drawInterrupted&&(n.instance.forceFullRender=!0,n.render())})}t.__esModule=!0;var i=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=n(0),a=(n(27),n(6)),l=o(a),u=n(12),c=n(4),h=o(c),f=n(192);r.prototype.isTextSelectionAllowed=function(e){if((0,s.isInput)(e))return!0;var t=(0,s.isChildOf)(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))},r.prototype.isSelectedOnlyCell=function(){var e=this.instance.getSelectedLast()||[],t=i(e,4),n=t[0],o=t[1],r=t[2],s=t[3];return void 0!==n&&n===r&&o===s},r.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},r.prototype.beforeRender=function(e,t){e&&this.instance.runHooks("beforeRender",this.instance.forceFullRender,t)},r.prototype.onDraw=function(e){e&&this.instance.runHooks("afterRender",this.instance.forceFullRender)},r.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},r.prototype.getCellAtCoords=function(e,t){var n=this.wt.getCell(e,t);return 0>n?null:n},r.prototype.scrollViewport=function(e){this.wt.scrollViewport(e)},r.prototype.appendRowHeader=function(e,t){if(t.firstChild){var n=t.firstChild;if(!(0,s.hasClass)(n,"relative"))return(0,s.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{var o=document.createElement("div"),r=document.createElement("span");o.className="relative",r.className="rowHeader",this.updateCellHeader(r,e,this.instance.getRowHeader),o.appendChild(r),t.appendChild(o)}this.instance.runHooks("afterGetRowHeader",e,t)},r.prototype.appendColHeader=function(e,t){if(t.firstChild){var n=t.firstChild;(0,s.hasClass)(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,this.instance.getColHeader):((0,s.empty)(t),this.appendColHeader(e,t))}else{var o=document.createElement("div"),r=document.createElement("span");o.className="relative",r.className="colHeader",this.updateCellHeader(r,e,this.instance.getColHeader),o.appendChild(r),t.appendChild(o)}this.instance.runHooks("afterGetColHeader",e,t)},r.prototype.updateCellHeader=function(e,t,n){var o=t,r=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&((0,s.hasClass)(e,"colHeader")?o=r.wtTable.columnFilter.sourceToRendered(t):(0,s.hasClass)(e,"rowHeader")&&(o=r.wtTable.rowFilter.sourceToRendered(t))),o>-1?(0,s.fastInnerHTML)(e,n(t)):((0,s.fastInnerText)(e,String.fromCharCode(160)),(0,s.addClass)(e,"cornerHeader"))},r.prototype.maximumVisibleElementWidth=function(e){var t=this.wt.wtViewport.getWorkspaceWidth(),n=t-e;return n>0?n:0},r.prototype.maximumVisibleElementHeight=function(e){var t=this.wt.wtViewport.getWorkspaceHeight(),n=t-e;return n>0?n:0},r.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},r.prototype.destroy=function(){this.wt.destroy(),this.eventManager.destroy()},t.default=r},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(2),s=n(1),a=n(5);t.default=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];o(this,e),this.hot=t,this.data=n,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}return r(e,[{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data;return e&&(t=this.getByRange({row:0,col:0},{row:Math.max(this.countRows()-1,0),col:Math.max(this.countColumns()-1,0)},!0)),t}},{key:"setData",value:function(e){this.data=e}},{key:"getAtColumn",value:function(e){var t=this,n=[];return(0,s.arrayEach)(this.data,function(o){var r=t.colToProp(e);o="string"==typeof r?(0,i.getProperty)(o,r):o[r],n.push(o)}),n}},{key:"getAtRow",value:function(e){return this.data[e]}},{key:"getAtCell",value:function(e,t){var n=null,o=this.hot.runHooks("modifyRowData",e),r=isNaN(o)?o:this.data[e];if(r){var s=this.colToProp(t);n="string"==typeof s?(0,i.getProperty)(r,s):"function"==typeof s?s(this.data.slice(e,e+1)[0]):r[s]}return n}},{key:"getByRange",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Math.min(e.row,t.row),i=Math.min(e.col,t.col),s=Math.max(e.row,t.row),l=Math.max(e.col,t.col),u=[];return(0,a.rangeEach)(r,s,function(e){var t=n.getAtRow(e),r=void 0;"array"===n.dataType?r=t.slice(i,l+1):"object"===n.dataType&&(r=o?[]:{},(0,a.rangeEach)(i,l,function(e){var i=n.colToProp(e);o?r.push(t[i]):r[i]=t[i]})),u.push(r)}),u}},{key:"countRows",value:function(){return Array.isArray(this.data)?this.data.length:0}},{key:"countColumns",value:function(){var e=0;return Array.isArray(this.data)&&("array"===this.dataType?e=this.data[0].length:"object"===this.dataType&&(e=Object.keys(this.data[0]).length)),e}},{key:"destroy",value:function(){this.data=null,this.hot=null}}]),e}()},function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.__esModule=!0;var r,i=n(7),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i);t.default=(r={languageCode:"en-US"},o(r,s.CONTEXTMENU_ITEMS_ROW_ABOVE,"Insert row above"),o(r,s.CONTEXTMENU_ITEMS_ROW_BELOW,"Insert row below"),o(r,s.CONTEXTMENU_ITEMS_INSERT_LEFT,"Insert column left"),o(r,s.CONTEXTMENU_ITEMS_INSERT_RIGHT,"Insert column right"),o(r,s.CONTEXTMENU_ITEMS_REMOVE_ROW,["Remove row","Remove rows"]),o(r,s.CONTEXTMENU_ITEMS_REMOVE_COLUMN,["Remove column","Remove columns"]),o(r,s.CONTEXTMENU_ITEMS_UNDO,"Undo"),o(r,s.CONTEXTMENU_ITEMS_REDO,"Redo"),o(r,s.CONTEXTMENU_ITEMS_READ_ONLY,"Read only"),o(r,s.CONTEXTMENU_ITEMS_CLEAR_COLUMN,"Clear column"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT,"Alignment"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT,"Left"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER,"Center"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT,"Right"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY,"Justify"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_TOP,"Top"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE,"Middle"),o(r,s.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM,"Bottom"),o(r,s.CONTEXTMENU_ITEMS_FREEZE_COLUMN,"Freeze column"),o(r,s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN,"Unfreeze column"),o(r,s.CONTEXTMENU_ITEMS_BORDERS,"Borders"),o(r,s.CONTEXTMENU_ITEMS_BORDERS_TOP,"Top"),o(r,s.CONTEXTMENU_ITEMS_BORDERS_RIGHT,"Right"),o(r,s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM,"Bottom"),o(r,s.CONTEXTMENU_ITEMS_BORDERS_LEFT,"Left"),o(r,s.CONTEXTMENU_ITEMS_REMOVE_BORDERS,"Remove border(s)"),o(r,s.CONTEXTMENU_ITEMS_ADD_COMMENT,"Add comment"),o(r,s.CONTEXTMENU_ITEMS_EDIT_COMMENT,"Edit comment"),o(r,s.CONTEXTMENU_ITEMS_REMOVE_COMMENT,"Delete comment"),o(r,s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT,"Read-only comment"),o(r,s.CONTEXTMENU_ITEMS_MERGE_CELLS,"Merge cells"),o(r,s.CONTEXTMENU_ITEMS_UNMERGE_CELLS,"Unmerge cells"),o(r,s.CONTEXTMENU_ITEMS_COPY,"Copy"),o(r,s.CONTEXTMENU_ITEMS_CUT,"Cut"),o(r,s.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD,"Insert child row"),o(r,s.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD,"Detach from parent"),o(r,s.CONTEXTMENU_ITEMS_HIDE_COLUMN,["Hide column","Hide columns"]),o(r,s.CONTEXTMENU_ITEMS_SHOW_COLUMN,["Show column","Show columns"]),o(r,s.CONTEXTMENU_ITEMS_HIDE_ROW,["Hide row","Hide rows"]),o(r,s.CONTEXTMENU_ITEMS_SHOW_ROW,["Show row","Show rows"]),o(r,s.FILTERS_CONDITIONS_NONE,"None"),o(r,s.FILTERS_CONDITIONS_EMPTY,"Is empty"),o(r,s.FILTERS_CONDITIONS_NOT_EMPTY,"Is not empty"),o(r,s.FILTERS_CONDITIONS_EQUAL,"Is equal to"),o(r,s.FILTERS_CONDITIONS_NOT_EQUAL,"Is not equal to"),o(r,s.FILTERS_CONDITIONS_BEGINS_WITH,"Begins with"),o(r,s.FILTERS_CONDITIONS_ENDS_WITH,"Ends with"),o(r,s.FILTERS_CONDITIONS_CONTAINS,"Contains"),o(r,s.FILTERS_CONDITIONS_NOT_CONTAIN,"Does not contain"),o(r,s.FILTERS_CONDITIONS_GREATER_THAN,"Greater than"),o(r,s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,"Greater than or equal to"),o(r,s.FILTERS_CONDITIONS_LESS_THAN,"Less than"),o(r,s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,"Less than or equal to"),o(r,s.FILTERS_CONDITIONS_BETWEEN,"Is between"),o(r,s.FILTERS_CONDITIONS_NOT_BETWEEN,"Is not between"),o(r,s.FILTERS_CONDITIONS_AFTER,"After"),o(r,s.FILTERS_CONDITIONS_BEFORE,"Before"),o(r,s.FILTERS_CONDITIONS_TODAY,"Today"),o(r,s.FILTERS_CONDITIONS_TOMORROW,"Tomorrow"),o(r,s.FILTERS_CONDITIONS_YESTERDAY,"Yesterday"),o(r,s.FILTERS_VALUES_BLANK_CELLS,"Blank cells"),o(r,s.FILTERS_DIVS_FILTER_BY_CONDITION,"Filter by condition"),o(r,s.FILTERS_DIVS_FILTER_BY_VALUE,"Filter by value"),o(r,s.FILTERS_LABELS_CONJUNCTION,"And"),o(r,s.FILTERS_LABELS_DISJUNCTION,"Or"),o(r,s.FILTERS_BUTTONS_SELECT_ALL,"Select all"),o(r,s.FILTERS_BUTTONS_CLEAR,"Clear"),o(r,s.FILTERS_BUTTONS_OK,"OK"),o(r,s.FILTERS_BUTTONS_CANCEL,"Cancel"),o(r,s.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,"Search"),o(r,s.FILTERS_BUTTONS_PLACEHOLDER_VALUE,"Value"),o(r,s.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE,"Second value"),r)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){h(e,t)}function i(){return f()}t.__esModule=!0,t.getPhraseFormatters=t.registerPhraseFormatter=void 0,t.register=r,t.getAll=i;var s=n(39),a=o(s),l=n(271),u=o(l),c=(0,a.default)("phraseFormatters"),h=c.register,f=c.getValues;t.registerPhraseFormatter=r,t.getPhraseFormatters=i,r("pluralize",u.default)},function(e,t,n){"use strict";function o(e,t){return Array.isArray(e)&&Number.isInteger(t)?e[t]:e}t.__esModule=!0,t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Selection=t.Highlight=t.handleMouseEvent=void 0;var r=n(199),i=o(r),s=n(279),a=o(s);t.handleMouseEvent=n(192).handleMouseEvent,t.Highlight=i.default,t.Selection=a.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){return w(e)(t)}t.__esModule=!0,t.createHighlight=void 0;var i=n(39),s=o(i),a=n(274),l=o(a),u=n(275),c=o(u),h=n(276),f=o(h),d=n(277),p=o(d),g=n(278),v=o(g),y=(0,s.default)("highlight/types"),m=y.register,w=y.getItem;m("active-header",l.default),m("area",c.default),m("cell",f.default),m("fill",p.default),m("header",v.default),t.createHighlight=r},function(e,t,n){"use strict";function o(e){return new r.Selection({highlightHeaderClassName:e.activeHeaderClassName})}t.__esModule=!0;var r=n(4);t.default=o},function(e,t,n){"use strict";function o(e){var t=e.layerLevel,n=e.areaCornerVisible;return new r.Selection({className:"area",markIntersections:!0,layerLevel:Math.min(t,7),border:{width:1,color:"#4b89ff",cornerVisible:n}})}t.__esModule=!0;var r=n(4);t.default=o},function(e,t,n){"use strict";function o(e){return new r.Selection({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:e.cellCornerVisible}})}t.__esModule=!0;var r=n(4);t.default=o},function(e,t,n){"use strict";function o(){return new r.Selection({className:"fill",border:{width:1,color:"#ff0000"}})}t.__esModule=!0;var r=n(4);t.default=o},function(e,t,n){"use strict";function o(e){return new r.Selection({className:"highlight",highlightHeaderClassName:e.headerClassName,highlightRowClassName:e.rowClassName,highlightColumnClassName:e.columnClassName})}t.__esModule=!0;var r=n(4);t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["Unsupported format of the selection ranges was passed. To select cells pass \n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, columnEnd/columnPropEnd]]) \n or as an array of CellRange objects."],["Unsupported format of the selection ranges was passed. To select cells pass\\x20\n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, columnEnd/columnPropEnd]])\\x20\n or as an array of CellRange objects."]),l=n(199),u=o(l),c=n(280),h=o(c),f=n(4),d=n(198),p=n(2),g=n(16),v=n(1),y=n(58),m=o(y),w=n(281),C=o(w),b=n(91),E=n(41),S=function(){function e(t,n){var o=this;r(this,e),this.settings=t,this.tableProps=n,this.inProgress=!1,this.selectedByCorner=!1,this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,this.selectedRange=new h.default,this.highlight=new u.default({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.currentColClassName,disableHighlight:this.settings.disableVisualSelection,cellCornerVisible:function(){return o.isCellCornerVisible.apply(o,arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible.apply(o,arguments)}}),this.transformation=new C.default(this.selectedRange,{countRows:function(){return o.tableProps.countRows()},countCols:function(){return o.tableProps.countCols()},fixedRowsBottom:function(){return t.fixedRowsBottom},minSpareRows:function(){return t.minSpareRows},minSpareCols:function(){return t.minSpareCols},autoWrapRow:function(){return t.autoWrapRow},autoWrapCol:function(){return t.autoWrapCol}}),this.transformation.addLocalHook("beforeTransformStart",function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["beforeModifyTransformStart"].concat(t))}),this.transformation.addLocalHook("afterTransformStart",function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["afterModifyTransformStart"].concat(t))}),this.transformation.addLocalHook("beforeTransformEnd",function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["beforeModifyTransformEnd"].concat(t))}),this.transformation.addLocalHook("afterTransformEnd",function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["afterModifyTransformEnd"].concat(t))}),this.transformation.addLocalHook("insertRowRequire",function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["insertRowRequire"].concat(t))}),this.transformation.addLocalHook("insertColRequire",function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return o.runLocalHooks.apply(o,["insertColRequire"].concat(t))})}return s(e,[{key:"getSelectedRange",value:function(){return this.selectedRange}},{key:"begin",value:function(){this.inProgress=!0}},{key:"finish",value:function(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}},{key:"isInProgress",value:function(){return this.inProgress}},{key:"setRangeStart",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="multiple"===this.settings.selectionMode,r=(0,g.isUndefined)(t)?(0,d.isPressedCtrlKey)():t,i=0>e.row,s=0>e.col,a=i&&s;i&&(e.row=0),s&&(e.col=0),this.selectedByCorner=a,this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),e),(!o||o&&!r&&(0,g.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!a&&s&&this.selectedByRowHeader.add(this.getLayerLevel()),!a&&i&&this.selectedByColumnHeader.add(this.getLayerLevel()),n||this.setRangeEnd(e)}},{key:"setRangeStartOnly",value:function(e,t){this.setRangeStart(e,t,!0)}},{key:"setRangeEnd",value:function(e){if(!this.selectedRange.isEmpty()){this.runLocalHooks("beforeSetRangeEnd",e),this.begin();var t=this.selectedRange.current();"single"!==this.settings.selectionMode&&t.setTo(new f.CellCoords(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(l.CELL_TYPE)&&this.highlight.getCell().add(this.selectedRange.current().highlight);var n=this.getLayerLevel();this.highlight.layerLevel>n&&((0,v.arrayEach)(this.highlight.getAreas(),function(e){return void e.clear()}),(0,v.arrayEach)(this.highlight.getHeaders(),function(e){return void e.clear()}),(0,v.arrayEach)(this.highlight.getActiveHeaders(),function(e){return void e.clear()})),this.highlight.useLayerLevel(n);var o=this.highlight.createOrGetArea(),r=this.highlight.createOrGetHeader(),i=this.highlight.createOrGetActiveHeader();if(o.clear(),r.clear(),i.clear(),!this.highlight.isEnabledFor(l.AREA_TYPE)||!this.isMultiple()&&1>n||(o.add(t.from).add(t.to),1===n&&(this.highlight.useLayerLevel(n-1).createOrGetArea().add(this.selectedRange.previous().from),this.highlight.useLayerLevel(n))),this.highlight.isEnabledFor(l.HEADER_TYPE)&&("single"===this.settings.selectionMode?r.add(t.highlight):r.add(t.from).add(t.to)),this.isSelectedByRowHeader()){this.tableProps.countCols()===t.getWidth()&&i.add(new f.CellCoords(t.from.row,-1)).add(new f.CellCoords(t.to.row,-1))}if(this.isSelectedByColumnHeader()){this.tableProps.countRows()===t.getHeight()&&i.add(new f.CellCoords(-1,t.from.col)).add(new f.CellCoords(-1,t.to.col))}this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=(0,p.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}},{key:"transformStart",value:function(e,t,n){this.setRangeStart(this.transformation.transformStart(e,t,n))}},{key:"transformEnd",value:function(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}},{key:"getLayerLevel",value:function(){return this.selectedRange.size()-1}},{key:"isSelected",value:function(){return!this.selectedRange.isEmpty()}},{key:"isSelectedByRowHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e)}},{key:"isSelectedByColumnHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)}},{key:"isSelectedByCorner",value:function(){return this.selectedByCorner}},{key:"inInSelection",value:function(e){return this.selectedRange.includes(e)}},{key:"isCellCornerVisible",value:function(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}},{key:"isAreaCornerVisible",value:function(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}},{key:"clear",value:function(){this.selectedRange.clear(),this.highlight.clear()}},{key:"deselect",value:function(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}},{key:"selectAll",value:function(){this.clear(),this.setRangeStart(new f.CellCoords(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new f.CellCoords(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var t=this,n=(0,b.detectSelectionType)(e);if(n===b.SELECTION_TYPE_EMPTY)return!1;if(n===b.SELECTION_TYPE_UNRECOGNIZED)throw Error((0,E.toSingleLine)(a));var o=(0,b.normalizeSelectionFactory)(n,{propToCol:function(e){return t.tableProps.propToCol(e)},keepDirection:!0}),r=this.tableProps.countRows(),s=this.tableProps.countCols(),l=!e.some(function(e){var t=o(e),n=i(t,4),a=n[0],l=n[1],u=n[2],c=n[3];return!((0,b.isValidCoord)(a,r)&&(0,b.isValidCoord)(l,s)&&(0,b.isValidCoord)(u,r)&&(0,b.isValidCoord)(c,s))});return l&&(this.clear(),(0,v.arrayEach)(e,function(e){var n=o(e),r=i(n,4),s=r[0],a=r[1],l=r[2],u=r[3];t.setRangeStartOnly(new f.CellCoords(s,a),!1),t.setRangeEnd(new f.CellCoords(l,u)),t.finish()})),l}},{key:"selectColumns",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e="string"==typeof e?this.tableProps.propToCol(e):e,t="string"==typeof t?this.tableProps.propToCol(t):t;var n=this.tableProps.countCols(),o=(0,b.isValidCoord)(e,n)&&(0,b.isValidCoord)(t,n);return o&&(this.setRangeStartOnly(new f.CellCoords(-1,e)),this.setRangeEnd(new f.CellCoords(this.tableProps.countRows()-1,t)),this.finish()),o}},{key:"selectRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.tableProps.countRows(),o=(0,b.isValidCoord)(e,n)&&(0,b.isValidCoord)(t,n);return o&&(this.setRangeStartOnly(new f.CellCoords(e,-1)),this.setRangeEnd(new f.CellCoords(t,this.tableProps.countCols()-1)),this.finish()),o}}]),e}();(0,p.mixin)(S,m.default),t.default=S},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(4);t.default=function(){function e(){o(this,e),this.ranges=[]}return r(e,[{key:"isEmpty",value:function(){return 0===this.size()}},{key:"set",value:function(e){return this.clear(),this.ranges.push(new i.CellRange(e)),this}},{key:"add",value:function(e){return this.ranges.push(new i.CellRange(e)),this}},{key:"current",value:function(){return this.peekByIndex(0)}},{key:"previous",value:function(){return this.peekByIndex(-1)}},{key:"includes",value:function(e){return this.ranges.some(function(t){return t.includes(e)})}},{key:"clear",value:function(){return this.ranges.length=0,this}},{key:"size",value:function(){return this.ranges.length}},{key:"peekByIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.size()+e-1,n=void 0;return 0>t||(n=this.ranges[t]),n}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(4),s=n(2),a=n(58),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(){function e(t,n){o(this,e),this.range=t,this.options=n}return r(e,[{key:"transformStart",value:function(e,t,n){var o=new i.CellCoords(e,t);this.runLocalHooks("beforeTransformStart",o);var r=this.options.countRows(),s=this.options.countCols(),a=this.options.fixedRowsBottom(),l=this.options.minSpareRows(),u=this.options.minSpareCols(),c=this.options.autoWrapRow(),h=this.options.autoWrapCol(),f=this.range.current().highlight;f.row+e>r-1?n&&l>0&&(!a||r-a-1>f.row)?(this.runLocalHooks("insertRowRequire",r),r=this.options.countRows()):h&&(o.row=1-r,o.col=f.col+o.col==s-1?1-s:1):h&&0>f.row+o.row&&f.col+o.col>=0&&(o.row=r-1,o.col=f.col+o.col==0?s-1:-1),f.col+o.col>s-1?n&&u>0?(this.runLocalHooks("insertColRequire",r),s=this.options.countCols()):c&&(o.row=f.row+o.row==r-1?1-r:1,o.col=1-s):c&&0>f.col+o.col&&f.row+o.row>=0&&(o.row=f.row+o.row==0?r-1:-1,o.col=s-1);var d=new i.CellCoords(f.row+o.row,f.col+o.col),p=0,g=0;return 0>d.row?(p=-1,d.row=0):d.row>0&&d.row>=r&&(p=1,d.row=r-1),0>d.col?(g=-1,d.col=0):d.col>0&&d.col>=s&&(g=1,d.col=s-1),this.runLocalHooks("afterTransformStart",d,p,g),d}},{key:"transformEnd",value:function(e,t){var n=new i.CellCoords(e,t);this.runLocalHooks("beforeTransformEnd",n);var o=this.options.countRows(),r=this.options.countCols(),s=this.range.current(),a=new i.CellCoords(s.to.row+n.row,s.to.col+n.col),l=0,u=0;return 0>a.row?(l=-1,a.row=0):a.row>0&&a.row>=o&&(l=1,a.row=o-1),0>a.col?(u=-1,a.col=0):a.col>0&&a.col>=r&&(u=1,a.col=r-1),this.runLocalHooks("afterTransformEnd",a,l,u),a}}]),e}();(0,s.mixin)(u,l.default),t.default=u},function(e,t,n){"use strict";function o(e){var t="undefined"!=typeof window&&window.jQuery;t&&(t.fn.handsontable=function(t){var n=this.first(),o=n.data("handsontable");if("string"!=typeof t){var r=t||{};return o?o.updateSettings(r):(o=new e.Core(n[0],r),n.data("handsontable",o),o.init()),n}var i=[],s=void 0;if(arguments.length>1)for(var a=1,l=arguments.length;l>a;a++)i.push(arguments[a]);if(o){if(void 0===o[t])throw Error("Handsontable do not provide action: "+t);s=o[t].apply(o,i),"destroy"===t&&n.removeData()}return s})}t.__esModule=!0,t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Base=t.UndoRedo=t.TouchScroll=t.Search=t.PersistentState=t.ObserveChanges=t.MultipleSelectionHandles=t.MergeCells=t.ManualRowResize=t.ManualRowMove=t.ManualColumnResize=t.ManualColumnMove=t.ManualColumnFreeze=t.DragToScroll=t.CustomBorders=t.CopyPaste=t.ContextMenu=t.Comments=t.ColumnSorting=t.AutoRowSize=t.AutoFill=t.AutoColumnSize=void 0;var r=n(284),i=o(r),s=n(286),a=o(s),l=n(287),u=o(l),c=n(289),h=o(c),f=n(290),d=o(f),p=n(293),g=o(p),v=n(297),y=o(v),m=n(314),w=o(m),C=n(321),b=o(C),E=n(327),S=o(E),O=n(328),T=o(O),_=n(332),R=o(_),k=n(337),M=o(k),A=n(338),N=o(A),P=n(343),H=o(P),L=n(344),D=o(L),x=n(350),I=o(x),j=n(351),B=o(j),F=n(354),W=o(F),V=n(355),U=o(V),z=n(356),Y=o(z),G=n(10),K=o(G);t.AutoColumnSize=a.default,t.AutoFill=u.default,t.AutoRowSize=h.default,t.ColumnSorting=d.default,t.Comments=g.default,t.ContextMenu=y.default,t.CopyPaste=w.default,t.CustomBorders=b.default,t.DragToScroll=S.default,t.ManualColumnFreeze=T.default,t.ManualColumnMove=R.default,t.ManualColumnResize=M.default,t.ManualRowMove=N.default,t.ManualRowResize=H.default,t.MergeCells=D.default,t.MultipleSelectionHandles=I.default,t.ObserveChanges=B.default,t.PersistentState=i.default,t.Search=W.default,t.TouchScroll=U.default,t.UndoRedo=Y.default,t.Base=K.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(8),f=n(285),d=o(f),p=n(15),g=o(p);g.default.getSingleton().register("persistentStateSave"),g.default.getSingleton().register("persistentStateLoad"),g.default.getSingleton().register("persistentStateReset");var v=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storage=void 0,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().persistentState}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.storage||(this.storage=new d.default(this.hot.rootElement.id)),this.addHook("persistentStateSave",function(t,n){return e.saveValue(t,n)}),this.addHook("persistentStateLoad",function(t,n){return e.loadValue(t,n)}),this.addHook("persistentStateReset",function(){return e.resetValue()}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.storage=void 0,l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"loadValue",value:function(e,t){t.value=this.storage.loadValue(e)}},{key:"saveValue",value:function(e,t){this.storage.saveValue(e,t)}},{key:"resetValue",value:function(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}},{key:"destroy",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,h.registerPlugin)("persistentState",v),t.default=v},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(1);t.default=function(){function e(t){o(this,e),this.prefix=t,this.savedKeys=[],this.loadSavedKeys()}return r(e,[{key:"saveValue",value:function(e,t){window.localStorage.setItem(this.prefix+"_"+e,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}},{key:"loadValue",value:function(e,t){e=void 0===e?t:e;var n=window.localStorage.getItem(this.prefix+"_"+e);return null===n?void 0:JSON.parse(n)}},{key:"reset",value:function(e){window.localStorage.removeItem(this.prefix+"_"+e)}},{key:"resetAll",value:function(){var e=this;(0,i.arrayEach)(this.savedKeys,function(t,n){window.localStorage.removeItem(e.prefix+"_"+e.savedKeys[n])}),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var e=window.localStorage.getItem(this.prefix+"__persistentStateKeys"),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}},{key:"saveSavedKeys",value:function(){window.localStorage.setItem(this.prefix+"__persistentStateKeys",JSON.stringify(this.savedKeys))}},{key:"clearSavedKeys",value:function(){this.savedKeys.length=0,this.saveSavedKeys()}}]),e}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(10),h=o(c),f=n(1),d=n(40),p=n(0),g=n(92),v=o(g),y=n(2),m=n(5),w=n(8),C=n(200),b=o(C),E=n(36),S=n(4),O=new WeakMap,T=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return O.set(n,{cachedColumnHeaders:[]}),n.widths=[],n.ghostTable=new v.default(n.hot),n.samplesGenerator=new b.default(function(e,t){return n.hot.getCellMeta(e,t).spanned?"":n.hot.getDataAtCell(e,t)}),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeColumnResize",function(e,t,o){return n.onBeforeColumnResize(e,t,o)}),n}return s(t,e),u(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 50}}]),u(t,[{key:"isEnabled",value:function(){return!1!==this.hot.getSettings().autoColumnSize&&!this.hot.getSettings().colWidths}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().autoColumnSize;n&&null!=n.useHeaders&&this.ghostTable.setSetting("useHeaders",n.useHeaders),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("modifyColWidth",function(t,n){return e.getColumnWidth(n,t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.findColumnsWhereHeaderWasChanged();e.length&&this.clearCache(e),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateColumnsWidth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"number"==typeof e&&(e={from:e,to:e}),"number"==typeof n&&(n={from:n,to:n}),(0,m.rangeEach)(e.from,e.to,function(e){if(o||void 0===t.widths[e]&&!t.hot._getColWidthFromSettings(e)){t.samplesGenerator.generateColumnSamples(e,n).forEach(function(e,n){return t.ghostTable.addColumn(n,e)})}}),this.ghostTable.columns.length&&(this.ghostTable.getWidths(function(e,n){t.widths[e]=n}),this.ghostTable.clean())}},{key:"calculateAllColumnsWidth",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},o=0,r=this.hot.countCols()-1,i=null;this.inProgress=!0;this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateColumnsWidth({from:0,to:this.getSyncCalculationLimit()},n),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),r>o?function s(){if(!e.hot)return(0,d.cancelAnimationFrame)(i),void(e.inProgress=!1);e.calculateColumnsWidth({from:o,to:Math.min(o+t.CALCULATION_STEP,r)},n),o=o+t.CALCULATION_STEP+1,r>o?i=(0,d.requestAnimationFrame)(s):((0,d.cancelAnimationFrame)(i),e.inProgress=!1,e.hot.view.wt.wtOverlays.adjustElementsSize(!0),e.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&e.hot.view.wt.wtOverlays.leftOverlay.clone.draw())}():this.inProgress=!1}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoColumnSize,t=e&&(0,y.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoColumnSize.samplingRatio:void 0,n=e&&(0,y.hasOwnProperty)(e,"allowSampleDuplicates")?this.hot.getSettings().autoColumnSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}},{key:"recalculateAllColumnsWidth",value:function(){this.hot.view&&(0,p.isVisible)(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllColumnsWidth())}},{key:"getSyncCalculationLimit",value:function(){var e=t.SYNC_CALCULATION_LIMIT,n=this.hot.countCols()-1;return(0,y.isObject)(this.hot.getSettings().autoColumnSize)&&(e=this.hot.getSettings().autoColumnSize.syncLimit,(0,E.isPercentValue)(e)?e=(0,m.valueAccordingPercent)(n,e):e>>=0),Math.min(e,n)}},{key:"getColumnWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=2>=arguments.length||void 0===arguments[2]||arguments[2],o=t;return void 0===o&&(o=this.widths[e],n&&"number"==typeof o&&(o=Math.max(o,S.ViewportColumnsCalculator.DEFAULT_WIDTH))),o}},{key:"getFirstVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getFirstVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getFirstRenderedColumn():-1}},{key:"getLastVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getLastVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getLastRenderedColumn():-1}},{key:"findColumnsWhereHeaderWasChanged",value:function(){var e=this.hot.getColHeader(),t=O.get(this),n=t.cachedColumnHeaders;return(0,f.arrayReduce)(e,function(e,t,o){var r=n.length;return(o>r-1||n[o]!==t)&&e.push(o),o>r-1?n.push(t):n[o]=t,e},[])}},{key:"clearCache",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.length?(0,f.arrayEach)(t,function(t){e.widths[t]=void 0}):this.widths.length=0}},{key:"isNeedRecalculate",value:function(){return!!(0,f.arrayFilter)(this.widths,function(e){return void 0===e}).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall;this.hot.countRows()&&(this.calculateColumnsWidth({from:this.getFirstVisibleColumn(),to:this.getLastVisibleColumn()},void 0,e),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth())}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout(function(){e.hot&&e.recalculateAllColumnsWidth()},0)}},{key:"onBeforeChange",value:function(e){var t=this;this.clearCache((0,f.arrayMap)(e,function(e){var n=a(e,2);return t.hot.propToCol(n[1])}))}},{key:"onBeforeColumnResize",value:function(e,t,n){return n&&(this.calculateColumnsWidth(e,void 0,!0),t=this.getColumnWidth(e,void 0,!1)),t}},{key:"onAfterInit",value:function(){O.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"destroy",value:function(){this.ghostTable.clean(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,w.registerPlugin)("autoColumnSize",T),t.default=T},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},c=n(10),h=o(c),f=n(15),d=o(f),p=n(0),g=n(6),v=o(g),y=n(8),m=n(4),w=n(288);d.default.getSingleton().register("modifyAutofillRange"),d.default.getSingleton().register("beforeAutofill");var C=function(e){function t(e){i(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new v.default(n),n.addingStarted=!1,n.mouseDownOnCellCorner=!1,n.mouseDragOutside=!1,n.handleDraggedCells=0,n.directions=[],n.autoInsertRow=!1,n}return a(t,e),l(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().fillHandle}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",function(t){return e.onAfterCellCornerMouseDown(t)}),this.addHook("afterOnCellCornerDblClick",function(t){return e.onCellCornerDblClick(t)}),this.addHook("beforeOnCellMouseOver",function(t,n,o){return e.onBeforeCellMouseOver(n)}),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.clearMappedSettings(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"getSelectionData",value:function(){var e={from:this.hot.getSelectedRangeLast().from,to:this.hot.getSelectedRangeLast().to};return this.hot.getData(e.from.row,e.from.col,e.to.row,e.to.col)}},{key:"fillIn",value:function(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;var e=this.hot.selection.highlight.getFill().getCorners();this.resetSelectionOfDraggedArea();var t=this.getCornersOfSelectedCells();e=this.hot.runHooks("modifyAutofillRange",e,t);var n=(0,w.getDragDirectionAndRange)(t,e),o=n.directionOfDrag,r=n.startOfDragCoords,i=n.endOfDragCoords;if(r&&r.row>-1&&r.col>-1){var s=this.getSelectionData();this.hot.runHooks("beforeAutofill",r,i,s);var a=(0,w.getDeltas)(r,i,s,o),l=s;if(["up","left"].indexOf(o)>-1){l=[];var u=null,c=null;if("up"===o){u=i.row-r.row+1,c=u%s.length;for(var h=0;u>h;h++)l.push(s[(h+(s.length-c))%s.length])}else{u=i.col-r.col+1,c=u%s[0].length;for(var f=0;s.length>f;f++){l.push([]);for(var d=0;u>d;d++)l[f].push(s[f][(d+(s[f].length-c))%s[f].length])}}}this.hot.populateFromArray(r.row,r.col,l,i.row,i.col,this.pluginName+".fill",null,o,a),this.setSelection(e)}else this.hot._refreshBorders();return!0}},{key:"reduceSelectionAreaIfNeeded",value:function(e){return 0>e.row&&(e.row=0),0>e.col&&(e.col=0),e}},{key:"getCoordsOfDragAndDropBorders",value:function(e){var t=this.hot.getSelectedRangeLast().getTopLeftCorner(),n=this.hot.getSelectedRangeLast().getBottomRightCorner(),o=void 0;if(this.directions.includes(w.DIRECTIONS.vertical)&&(e.row>n.row||t.row>e.row))o=new m.CellCoords(e.row,n.col);else{if(!this.directions.includes(w.DIRECTIONS.horizontal))return;o=new m.CellCoords(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(o)}},{key:"showBorder",value:function(e){var t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}},{key:"addRow",value:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.alter("insert_row",void 0,1,e.pluginName+".fill"),e.addingStarted=!1},200))}},{key:"addNewRowIfNeeded",value:function(){if(this.hot.selection.highlight.getFill().cellRange&&!1===this.addingStarted&&this.autoInsertRow){var e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getCorners(),n=this.hot.countRows();n-1>e[2]&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}},{key:"getCornersOfSelectedCells",value:function(){return this.hot.selection.isMultiple()?this.hot.selection.highlight.createOrGetArea().getCorners():this.hot.selection.highlight.getCell().getCorners()}},{key:"getIndexOfLastAdjacentFilledInRow",value:function(e){for(var t=this.hot.getData(),n=this.hot.countRows(),o=void 0,r=e[2]+1;n>r;r++){for(var i=e[1];e[3]>=i;i++){if(t[r][i])return-1}var s=t[r][e[1]-1],a=t[r][e[3]+1];(s||a)&&(o=r)}return o}},{key:"addSelectionFromStartAreaToSpecificRowIndex",value:function(e,t){this.hot.selection.highlight.getFill().clear().add(new m.CellCoords(e[0],e[1])).add(new m.CellCoords(t,e[3]))}},{key:"setSelection",value:function(e){var t;(t=this.hot).selectCell.apply(t,r(e).concat([!1,!1]))}},{key:"selectAdjacent",value:function(){var e=this.getCornersOfSelectedCells(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}},{key:"resetSelectionOfDraggedArea",value:function(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}},{key:"redrawBorders",value:function(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e),this.hot.view.render()}},{key:"getIfMouseWasDraggedOutside",value:function(e){var t=(0,p.offset)(this.hot.table).top-(window.pageYOffset||document.documentElement.scrollTop)+(0,p.outerHeight)(this.hot.table),n=(0,p.offset)(this.hot.table).left-(window.pageXOffset||document.documentElement.scrollLeft)+(0,p.outerWidth)(this.hot.table);return e.clientY>t&&n>=e.clientX}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()}),this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)})}},{key:"onCellCornerDblClick",value:function(){this.selectAdjacent()&&this.fillIn()}},{key:"onAfterCellCornerMouseDown",value:function(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}},{key:"onBeforeCellMouseOver",value:function(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells++,this.showBorder(e),this.addNewRowIfNeeded())}},{key:"onMouseUp",value:function(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}},{key:"onMouseMove",value:function(e){var t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}},{key:"clearMappedSettings",value:function(){this.directions.length=0,this.autoInsertRow=!1}},{key:"mapSettings",value:function(){var e=(0,w.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}},{key:"destroy",value:function(){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,y.registerPlugin)("autofill",C),t.default=C},function(e,t,n){"use strict";function o(e,t,n,o){var r=n.length,i=n?n[0].length:0,s=[],a=t.row-e.row,l=t.col-e.col;if(-1!==["down","up"].indexOf(o)){for(var u=[],c=0;l>=c;c++){var h=parseInt(n[0][c],10),f=parseInt(n[r-1][c],10);u.push(("down"===o?f-h:h-f)/(r-1)||0)}s.push(u)}if(-1!==["right","left"].indexOf(o))for(var d=0;a>=d;d++){var p=parseInt(n[d][0],10),g=parseInt(n[d][i-1],10),v=("right"===o?g-p:p-g)/(i-1)||0;s.push([v])}return s}function r(e,t){var n=void 0,o=void 0,r=void 0;return t[0]===e[0]&&e[1]>t[1]?(r="left",n=new l.CellCoords(t[0],t[1]),o=new l.CellCoords(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(r="right",n=new l.CellCoords(t[0],e[3]+1),o=new l.CellCoords(t[2],t[3])):e[0]>t[0]&&t[1]===e[1]?(r="up",n=new l.CellCoords(t[0],t[1]),o=new l.CellCoords(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(r="down",n=new l.CellCoords(e[2]+1,t[1]),o=new l.CellCoords(t[2],t[3])),{directionOfDrag:r,startOfDragCoords:n,endOfDragCoords:o}}function i(e){var t={};return!0===e?(t.directions=Object.keys(u),t.autoInsertRow=!0):(0,s.isObject)(e)?(t.autoInsertRow=!!(0,a.isDefined)(e.autoInsertRow)&&(e.direction!==u.horizontal&&e.autoInsertRow),t.directions=(0,a.isDefined)(e.direction)?[e.direction]:Object.keys(u)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}t.__esModule=!0,t.DIRECTIONS=void 0,t.getDeltas=o,t.getDragDirectionAndRange=r,t.getMappedFillHandleSetting=i;var s=n(2),a=n(16),l=n(4),u=t.DIRECTIONS={horizontal:"horizontal",vertical:"vertical"}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(10),c=o(u),h=n(1),f=n(40),d=n(0),p=n(92),g=o(p),v=n(2),y=n(5),m=n(8),w=n(200),C=o(w),b=n(36),E=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.heights=[],n.ghostTable=new g.default(n.hot),n.samplesGenerator=new C.default(function(e,t){return 0>e?-1===e?n.hot.getColHeader(t):null:n.hot.getDataAtCell(e,t)}),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeRowResize",function(e,t,o){return n.onBeforeRowResize(e,t,o)}),n}return s(t,e),l(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),l(t,[{key:"isEnabled",value:function(){return!0===this.hot.getSettings().autoRowSize||(0,v.isObject)(this.hot.getSettings().autoRowSize)}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeColumnMove",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnResize",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnSort",function(){return e.clearCache()}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("beforeRowMove",function(t,n){return e.onBeforeRowMove(t,n)}),this.addHook("modifyRowHeight",function(t,n){return e.getRowHeight(n,t)}),this.addHook("modifyColumnHeaderHeight",function(){return e.getColumnHeaderHeight()}),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateRowsHeight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"==typeof e&&(e={from:e,to:e}),"number"==typeof n&&(n={from:n,to:n}),null!==this.hot.getColHeader(0)){this.ghostTable.addColumnHeadersRow(this.samplesGenerator.generateRowSamples(-1,n).get(-1))}(0,y.rangeEach)(e.from,e.to,function(e){if(o||void 0===t.heights[e]){t.samplesGenerator.generateRowSamples(e,n).forEach(function(e,n){t.ghostTable.addRow(n,e)})}}),this.ghostTable.rows.length&&(this.ghostTable.getHeights(function(e,n){t.heights[e]=n}),this.ghostTable.clean())}},{key:"calculateAllRowsHeight",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},o=0,r=this.hot.countRows()-1,i=null;this.inProgress=!0;this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateRowsHeight({from:0,to:this.getSyncCalculationLimit()},n),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),r>o?function s(){if(!e.hot)return(0,f.cancelAnimationFrame)(i),void(e.inProgress=!1);e.calculateRowsHeight({from:o,to:Math.min(o+t.CALCULATION_STEP,r)},n),o=o+t.CALCULATION_STEP+1,r>o?i=(0,f.requestAnimationFrame)(s):((0,f.cancelAnimationFrame)(i),e.inProgress=!1,e.hot.view.wt.wtOverlays.adjustElementsSize(!0),e.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&e.hot.view.wt.wtOverlays.leftOverlay.clone.draw())}():(this.inProgress=!1,this.hot.view.wt.wtOverlays.adjustElementsSize(!1))}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoRowSize,t=e&&(0,v.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoRowSize.samplingRatio:void 0,n=e&&(0,v.hasOwnProperty)(e,"allowSampleDuplicates")?this.hot.getSettings().autoRowSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}},{key:"recalculateAllRowsHeight",value:function(){(0,d.isVisible)(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}},{key:"getSyncCalculationLimit",value:function(){var e=t.SYNC_CALCULATION_LIMIT,n=this.hot.countRows()-1;return(0,v.isObject)(this.hot.getSettings().autoRowSize)&&(e=this.hot.getSettings().autoRowSize.syncLimit,(0,b.isPercentValue)(e)?e=(0,y.valueAccordingPercent)(n,e):e>>=0),Math.min(e,n)}},{key:"getRowHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t;return void 0!==this.heights[e]&&this.heights[e]>(t||0)&&(n=this.heights[e]),n}},{key:"getColumnHeaderHeight",value:function(){return this.heights[-1]}},{key:"getFirstVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}},{key:"getLastVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}},{key:"clearCache",value:function(){this.heights.length=0,this.heights[-1]=void 0}},{key:"clearCacheByRange",value:function(e){var t=this;"number"==typeof e&&(e={from:e,to:e}),(0,y.rangeEach)(Math.min(e.from,e.to),Math.max(e.from,e.to),function(e){t.heights[e]=void 0})}},{key:"isNeedRecalculate",value:function(){return!!(0,h.arrayFilter)(this.heights,function(e){return void 0===e}).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall;this.calculateRowsHeight({from:this.getFirstVisibleRow(),to:this.getLastVisibleRow()},void 0,e);var t=this.hot.getSettings().fixedRowsBottom;if(t){var n=this.hot.countRows()-1;this.calculateRowsHeight({from:n-t,to:n})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}},{key:"onBeforeRowMove",value:function(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()}},{key:"onBeforeRowResize",value:function(e,t,n){return n&&(this.calculateRowsHeight(e,void 0,!0),t=this.getRowHeight(e)),t}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout(function(){e.hot&&e.recalculateAllRowsHeight()},0)}},{key:"onBeforeChange",value:function(e){var t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}},{key:"destroy",value:function(){this.ghostTable.clean(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,m.registerPlugin)("autoRowSize",E),t.default=E},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},h=n(55),f=o(h),d=n(0),p=n(1),g=n(16),v=n(2),y=n(10),m=o(y),w=n(8),C=n(291),b=o(C),E=n(15),S=o(E);S.default.getSingleton().register("beforeColumnSort"),S.default.getSingleton().register("afterColumnSort");var O=function(e){function t(e){i(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.sortIndicators=[],n.lastSortedColumn=null,n.sortEmptyCells=!1,n}return a(t,e),u(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().columnSorting}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.setPluginOptions();var n=this;this.hot.sortIndex=[],this.hot.sort=function(){var e=Array.prototype.slice.call(arguments);return n.sortByColumn.apply(n,r(e))},void 0===this.hot.getSettings().observeChanges&&this.enableObserveChangesPlugin(),this.addHook("afterTrimRow",function(t){return e.sort()}),this.addHook("afterUntrimRow",function(t){return e.sort()}),this.addHook("modifyRow",function(t){return e.translateRow(t)}),this.addHook("unmodifyRow",function(t){return e.untranslateRow(t)}),this.addHook("afterUpdateSettings",function(){return e.onAfterUpdateSettings()}),this.addHook("afterGetColHeader",function(t,n){return e.getColHeader(t,n)}),this.addHook("afterOnCellMouseDown",function(t,n){return e.onAfterOnCellMouseDown(t,n)}),this.addHook("afterCreateRow",function(){n.afterCreateRow.apply(n,arguments)}),this.addHook("afterRemoveRow",function(){n.afterRemoveRow.apply(n,arguments)}),this.addHook("afterInit",function(){return e.sortBySettings()}),this.addHook("afterLoadData",function(){e.hot.sortIndex=[],e.hot.view&&e.sortBySettings()}),this.hot.view&&this.sortBySettings(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){this.hot.sort=void 0,c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"onAfterUpdateSettings",value:function(){this.sortBySettings()}},{key:"sortBySettings",value:function(){var e=this.hot.getSettings().columnSorting,t=this.loadSortingState(),n=void 0,o=void 0;void 0===t?(n=e.column,o=e.sortOrder):(n=t.sortColumn,o=t.sortOrder),"number"==typeof n&&(this.lastSortedColumn=n,this.sortByColumn(n,o))}},{key:"setSortingColumn",value:function(e,t){if(void 0===e)return this.hot.sortColumn=void 0,void(this.hot.sortOrder=void 0);this.hot.sortOrder=this.hot.sortColumn===e&&void 0===t?!1===this.hot.sortOrder?void 0:!this.hot.sortOrder:void 0===t||t,this.hot.sortColumn=e}},{key:"sortByColumn",value:function(e,t){if(this.setSortingColumn(e,t),void 0!==this.hot.sortColumn){!1!==this.hot.runHooks("beforeColumnSort",this.hot.sortColumn,this.hot.sortOrder)&&this.sort(),this.updateOrderClass(),this.updateSortIndicator(),this.hot.runHooks("afterColumnSort",this.hot.sortColumn,this.hot.sortOrder),this.hot.render(),this.saveSortingState()}}},{key:"saveSortingState",value:function(){var e={};void 0!==this.hot.sortColumn&&(e.sortColumn=this.hot.sortColumn),void 0!==this.hot.sortOrder&&(e.sortOrder=this.hot.sortOrder),((0,v.hasOwnProperty)(e,"sortColumn")||(0,v.hasOwnProperty)(e,"sortOrder"))&&this.hot.runHooks("persistentStateSave","columnSorting",e)}},{key:"loadSortingState",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","columnSorting",e),e.value}},{key:"updateOrderClass",value:function(){var e=void 0;!0===this.hot.sortOrder?e="ascending":!1===this.hot.sortOrder&&(e="descending"),this.sortOrderClass=e}},{key:"enableObserveChangesPlugin",value:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.updateSettings({observeChanges:!0})},0))}},{key:"defaultSort",value:function(e,t){return function(n,o){return"string"==typeof n[1]&&(n[1]=n[1].toLowerCase()),"string"==typeof o[1]&&(o[1]=o[1].toLowerCase()),n[1]===o[1]?0:(0,g.isEmpty)(n[1])?(0,g.isEmpty)(o[1])?0:t.columnSorting.sortEmptyCells&&e?-1:1:(0,g.isEmpty)(o[1])?(0,g.isEmpty)(n[1])?0:t.columnSorting.sortEmptyCells&&e?1:-1:isNaN(n[1])&&!isNaN(o[1])?e?1:-1:!isNaN(n[1])&&isNaN(o[1])?e?-1:1:(isNaN(n[1])||isNaN(o[1])||(n[1]=parseFloat(n[1]),o[1]=parseFloat(o[1])),o[1]>n[1]?e?-1:1:n[1]>o[1]?e?1:-1:0)}}},{key:"dateSort",value:function(e,t){return function(n,o){if(n[1]===o[1])return 0;if((0,g.isEmpty)(n[1]))return(0,g.isEmpty)(o[1])?0:t.columnSorting.sortEmptyCells&&e?-1:1;if((0,g.isEmpty)(o[1]))return(0,g.isEmpty)(n[1])?0:t.columnSorting.sortEmptyCells&&e?1:-1;var r=(0,f.default)(n[1],t.dateFormat),i=(0,f.default)(o[1],t.dateFormat);return r.isValid()?i.isValid()?i.isAfter(r)?e?-1:1:i.isBefore(r)?e?1:-1:0:-1:1}}},{key:"numericSort",value:function(e,t){return function(n,o){var r=parseFloat(n[1]),i=parseFloat(o[1]);if(r===i||isNaN(r)&&isNaN(i))return 0;if(t.columnSorting.sortEmptyCells){if((0,g.isEmpty)(n[1]))return e?-1:1;if((0,g.isEmpty)(o[1]))return e?1:-1}return isNaN(r)?1:isNaN(i)?-1:i>r?e?-1:1:r>i?e?1:-1:0}}},{key:"sort",value:function(){if(void 0===this.hot.sortOrder)return void(this.hot.sortIndex.length=0);var e=this.hot.getCellMeta(0,this.hot.sortColumn),t=this.hot.countEmptyRows(),n=void 0,o=void 0;this.hot.sortingEnabled=!1,this.hot.sortIndex.length=0,void 0===e.columnSorting.sortEmptyCells&&(e.columnSorting={sortEmptyCells:this.sortEmptyCells}),o=this.hot.getSettings().maxRows===Number.POSITIVE_INFINITY?this.hot.countRows()-this.hot.getSettings().minSpareRows:this.hot.countRows()-t;for(var r=0,i=o;i>r;r++)this.hot.sortIndex.push([r,this.hot.getDataAtCell(r,this.hot.sortColumn)]);if(e.sortFunction)n=e.sortFunction;else switch(e.type){case"date":n=this.dateSort;break;case"numeric":n=this.numericSort;break;default:n=this.defaultSort}(0,b.default)(this.hot.sortIndex,n(this.hot.sortOrder,e));for(var s=this.hot.sortIndex.length;s<this.hot.countRows();s++)this.hot.sortIndex.push([s,this.hot.getDataAtCell(s,this.hot.sortColumn)]);this.hot.sortingEnabled=!0}},{key:"updateSortIndicator",value:function(){if(void 0!==this.hot.sortOrder){this.sortIndicators[this.hot.sortColumn]=this.hot.getCellMeta(0,this.hot.sortColumn).sortIndicator}}},{key:"translateRow",value:function(e){return this.hot.sortingEnabled&&void 0!==this.hot.sortOrder&&this.hot.sortIndex&&this.hot.sortIndex.length&&this.hot.sortIndex[e]?this.hot.sortIndex[e][0]:e}},{key:"untranslateRow",value:function(e){if(this.hot.sortingEnabled&&this.hot.sortIndex&&this.hot.sortIndex.length)for(var t=0;this.hot.sortIndex.length>t;t++)if(this.hot.sortIndex[t][0]==e)return t}},{key:"getColHeader",value:function(e,t){if(0>e||!t.parentNode)return!1;var n=t.querySelector(".colHeader"),o=(t.getAttribute("colspan"),t.parentNode.parentNode.childNodes),r=Array.prototype.indexOf.call(o,t.parentNode);r-=o.length,n&&(this.hot.getSettings().columnSorting&&e>=0&&-1===r&&(0,d.addClass)(n,"columnSorting"),(0,d.removeClass)(n,"descending"),(0,d.removeClass)(n,"ascending"),this.sortIndicators[e]&&e===this.hot.sortColumn&&("ascending"===this.sortOrderClass?(0,d.addClass)(n,"ascending"):"descending"===this.sortOrderClass&&(0,d.addClass)(n,"descending")))}},{key:"isSorted",value:function(){return void 0!==this.hot.sortColumn}},{key:"afterCreateRow",value:function(e,t){if(this.isSorted()){for(var n=0;this.hot.sortIndex.length>n;n++)e>this.hot.sortIndex[n][0]||(this.hot.sortIndex[n][0]+=t);for(var o=0;t>o;o++)this.hot.sortIndex.splice(e+o,0,[e+o,this.hot.getSourceData()[e+o][this.hot.sortColumn+this.hot.colOffset()]]);this.saveSortingState()}}},{key:"afterRemoveRow",value:function(e,t){function n(e){return(0,p.arrayReduce)(o,function(t,n){return e>n&&t++,t},0)}if(this.isSorted()){var o=this.hot.sortIndex.splice(e,t);o=(0,p.arrayMap)(o,function(e){return e[0]}),this.hot.sortIndex=(0,p.arrayMap)(this.hot.sortIndex,function(e,t){var o=n(e[0]);return o&&(e[0]-=o),e}),this.saveSortingState()}}},{key:"setPluginOptions",value:function(){var e=this.hot.getSettings().columnSorting;this.sortEmptyCells="object"===(void 0===e?"undefined":l(e))&&(e.sortEmptyCells||!1)}},{key:"onAfterOnCellMouseDown",value:function(e,t){t.row>-1||(0,d.hasClass)(e.realTarget,"columnSorting")&&(t.col!==this.lastSortedColumn&&(this.hot.sortOrder=!0),this.lastSortedColumn=t.col,this.sortByColumn(t.col))}}]),t}(m.default);(0,w.registerPlugin)("columnSorting",O),t.default=O},function(e,t,n){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(1>=Math.abs(i-n))return[];var s=Math.ceil((n+i)/2);return o(e,t,n,s),o(e,t,s,i),r(e,t,n,s,i)}function r(e,t,n,o,r){for(var i=new s.default,a=new s.default,l=o-n,u=r-o,c=Math.max(l,u),h=r-n,f=0;c>f;f+=1)l>f&&i.push(e[n+f]),u>f&&a.push(e[o+f]);for(var d=0;h>d;)e[n+d]=i.first&&a.first?t(i.first.data,a.first.data)>0?a.shift().data:i.shift().data:i.first?i.shift().data:a.shift().data,d+=1;return e}t.__esModule=!0,t.default=o,t.merge=r;var i=n(292),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=function(e,t){var n=""+e,o=""+t;return n===o?0:o>n?-1:1}},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function e(t){o(this,e),this.data=t,this.next=null,this.prev=null},s=function(){function e(){o(this,e),this.first=null,this.last=null}return r(e,[{key:"push",value:function(e){var t=new i(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.last;this.last=t,t.prev=n,n.next=t}}},{key:"unshift",value:function(e){var t=new i(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.first;this.first=t,t.next=n,n.prev=t}}},{key:"inorder",value:function(e){for(var t=this.first;t;)e(t),t=t.next}},{key:"remove",value:function(e){if(null===this.first)return!1;for(var t=this.first,n=void 0,o=void 0;t;){if(t.data===e)return n=t.next,o=t.prev,n&&(n.prev=o),o&&(o.next=n),t===this.first&&(this.first=n),t===this.last&&(this.last=o),!0;t=t.next}return!1}},{key:"hasCycle",value:function(){for(var e=this.first,t=this.first;;){if(null===e)return!1;if(null===(e=e.next))return!1;if(e=e.next,t=t.next,e===t)return!0}}},{key:"pop",value:function(){if(null===this.last)return null;var e=this.last;return this.last=this.last.prev,e}},{key:"shift",value:function(){if(null===this.first)return null;var e=this.first;return this.first=this.first.next,e}},{key:"recursiveReverse",value:function(){function e(t,n){n&&(e(n,n.next),n.next=t)}if(this.first){e(this.first,this.first.next),this.first.next=null;var t=this.first;this.first=this.last,this.last=t}}},{key:"reverse",value:function(){if(this.first&&this.first.next){for(var e=this.first.next,t=this.first,n=void 0;e;)n=e.next,e.next=t,t.prev=e,t=e,e=n;this.first.next=null,this.last.prev=null,n=this.first,this.first=t,this.last=n}}}]),e}();t.NodeStructure=i,t.default=s},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},c=n(0),h=n(2),f=n(6),d=o(f),p=n(4),g=n(8),v=n(10),y=o(v),m=n(294),w=o(m),C=n(19),b=n(295),E=o(b),S=n(7),O=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(S);n(296);var T=new WeakMap,_=function(e){function t(e){i(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.editor=null,n.displaySwitch=null,n.eventManager=null,n.range={},n.mouseDown=!1,n.contextMenuEvent=!1,n.timer=null,T.set(n,{tempEditorDimensions:{},cellBelowCursor:null}),n}return a(t,e),l(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().comments}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.editor||(this.editor=new w.default),this.eventManager||(this.eventManager=new d.default(this)),this.displaySwitch||(this.displaySwitch=new E.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",function(t){return e.addToContextMenu(t)}),this.addHook("afterRenderer",function(t,n,o,r,i,s){return e.onAfterRenderer(t,s)}),this.addHook("afterScrollHorizontally",function(){return e.hide()}),this.addHook("afterScrollVertically",function(){return e.hide()}),this.addHook("afterBeginEditing",function(t){return e.onAfterBeginEditing(t)}),this.displaySwitch.addLocalHook("hide",function(){return e.hide()}),this.displaySwitch.addLocalHook("show",function(t,n){return e.showAtCell(t,n)}),this.registerListeners(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this),this.displaySwitch.updateDelay(this.getDisplayDelaySetting())}},{key:"disablePlugin",value:function(){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"registerListeners",value:function(){var e=this;this.eventManager.addEventListener(document,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(document,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(document,"mouseup",function(t){return e.onMouseUp(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(t){return e.onEditorBlur(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mousedown",function(t){return e.onEditorMouseDown(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mouseup",function(t){return e.onEditorMouseUp(t)})}},{key:"setRange",value:function(e){this.range=e}},{key:"clearRange",value:function(){this.range={}}},{key:"targetIsCellWithComment",value:function(e){var t=(0,c.closest)(e.target,"TD","TBODY");return!!(t&&(0,c.hasClass)(t,"htCommentCell")&&(0,c.closest)(t,[this.hot.rootElement]))}},{key:"targetIsCommentTextArea",value:function(e){return this.editor.getInputElement()===e.target}},{key:"setComment",value:function(e){if(!this.range.from)throw Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var t=this.editor.getValue(),n="";null!=e?n=e:null!=t&&(n=t),this.updateCommentMeta(this.range.from.row,this.range.from.col,r({},"value",n)),this.hot.render()}},{key:"setCommentAtCell",value:function(e,t,n){this.setRange({from:new p.CellCoords(e,t)}),this.setComment(n)}},{key:"removeComment",value:function(){var e=0>=arguments.length||void 0===arguments[0]||arguments[0];if(!this.range.from)throw Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,"comment",void 0),e&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(e,t){var n=2>=arguments.length||void 0===arguments[2]||arguments[2];this.setRange({from:new p.CellCoords(e,t)}),this.removeComment(n)}},{key:"getComment",value:function(){return this.getCommentMeta(this.range.from.row,this.range.from.col,"value")}},{key:"getCommentAtCell",value:function(e,t){return this.getCommentMeta(e,t,"value")}},{key:"show",value:function(){if(!this.range.from)throw Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditor(!0),this.editor.setValue(e.comment?e.comment.value:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,t){return this.setRange({from:new p.CellCoords(e,t)}),this.show()}},{key:"hide",value:function(){this.editor.hidden||this.editor.hide()}},{key:"refreshEditor",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&this.editor.isVisible()){var e=(0,c.getScrollableElement)(this.hot.view.wt.wtTable.TABLE),t=this.hot.view.wt.wtTable.getCell(this.range.from),n=this.range.from.row,o=this.range.from.col,r=(0,c.offset)(t),i=this.hot.view.wt.wtTable.getStretchedColumnWidth(o),s=0>r.top?0:r.top,a=r.left;this.hot.view.wt.wtViewport.hasVerticalScroll()&&e!==window&&(s-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition()),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&e!==window&&(a-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition());var l=a+i,u=s,h=this.getCommentMeta(n,o,"style"),f=this.getCommentMeta(n,o,"readOnly");h?this.editor.setSize(h.width,h.height):this.editor.resetSize(),this.editor.setReadOnlyState(f),this.editor.setPosition(l,u)}}},{key:"checkSelectionCommentsConsistency",value:function(){var e=this.hot.getSelectedRangeLast();if(!e)return!1;var t=!1,n=e.from;return this.getCommentMeta(n.row,n.col,"value")&&(t=!0),t}},{key:"updateCommentMeta",value:function(e,t,n){var o=this.hot.getCellMeta(e,t).comment,r=void 0;o?(r=(0,h.deepClone)(o),(0,h.deepExtend)(r,n)):r=n,this.hot.setCellMeta(e,t,"comment",r)}},{key:"getCommentMeta",value:function(e,t,n){var o=this.hot.getCellMeta(e,t);if(o.comment)return o.comment[n]}},{key:"onMouseDown",value:function(e){if(this.mouseDown=!0,this.hot.view&&this.hot.view.wt){if(!this.contextMenuEvent&&!this.targetIsCommentTextArea(e)){var t=(0,c.closest)(e.target,"TD","TBODY"),n=null;t&&(n=this.hot.view.wt.wtTable.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}this.contextMenuEvent=!1}}},{key:"onMouseOver",value:function(e){var t=T.get(this);if(t.cellBelowCursor=document.elementFromPoint(e.clientX,e.clientY),!(this.mouseDown||this.editor.isFocused()||(0,c.hasClass)(e.target,"wtBorder")||t.cellBelowCursor!==e.target)&&this.editor)if(this.targetIsCellWithComment(e)){var n=this.hot.view.wt.wtTable.getCoords(e.target),o={from:new p.CellCoords(n.row,n.col)};this.displaySwitch.show(o)}else(0,c.isChildOf)(e.target,document)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(e){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,t){t.comment&&t.comment.value&&(0,c.addClass)(e,t.commentedCellClassName)}},{key:"onEditorBlur",value:function(e){this.setComment()}},{key:"onEditorMouseDown",value:function(e){T.get(this).tempEditorDimensions={width:(0,c.outerWidth)(e.target),height:(0,c.outerHeight)(e.target)}}},{key:"onEditorMouseUp",value:function(e){var t=T.get(this),n=(0,c.outerWidth)(e.target),o=(0,c.outerHeight)(e.target);n===t.tempEditorDimensions.width+1&&o===t.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,r({},"style",{width:n,height:o}))}},{key:"onContextMenuAddComment",value:function(){var e=this;this.displaySwitch.cancelHiding();var t=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout(function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())},10)}},{key:"onContextMenuRemoveComment",value:function(){this.contextMenuEvent=!0;for(var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to,o=t.row;n.row>=o;o++)for(var r=t.col;n.col>=r;r++)this.removeCommentAtCell(o,r,!1);this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){this.contextMenuEvent=!0;for(var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to,o=t.row;n.row>=o;o++)for(var i=t.col;n.col>=i;i++){var s=!!this.getCommentMeta(o,i,"readOnly");this.updateCommentMeta(o,i,r({},"readOnly",!s))}}},{key:"addToContextMenu",value:function(e){var t=this;e.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return t.hot.getTranslatedPhrase(t.checkSelectionCommentsConsistency()?O.CONTEXTMENU_ITEMS_EDIT_COMMENT:O.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!(this.getSelectedLast()&&!this.selection.isSelectedByCorner())}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(O.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback:function(){return t.onContextMenuRemoveComment()},disabled:function(){return t.hot.selection.isSelectedByCorner()}},{key:"commentsReadOnly",name:function(){var e=this,t=this.getTranslatedPhrase(O.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,C.checkSelectionConsistency)(this.getSelectedRangeLast(),function(t,n){var o=e.getCellMeta(t,n).comment;if(o&&(o=o.readOnly),o)return!0})&&(t=(0,C.markLabelAsSelected)(t)),t},callback:function(){return t.onContextMenuMakeReadOnly()},disabled:function(){return t.hot.selection.isSelectedByCorner()||!t.checkSelectionCommentsConsistency()}})}},{key:"getDisplayDelaySetting",value:function(){var e=this.hot.getSettings().comments;if((0,h.isObject)(e))return e.displayDelay}},{key:"onAfterBeginEditing",value:function(e,t){this.hide()}},{key:"destroy",value:function(){this.editor&&this.editor.destroy(),this.displaySwitch&&this.displaySwitch.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(y.default);(0,g.registerPlugin)("comments",_),t.default=_},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0);t.default=function(){function e(){o(this,e),this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()}return r(e,null,[{key:"CLASS_EDITOR_CONTAINER",get:function(){return"htCommentsContainer"}},{key:"CLASS_EDITOR",get:function(){return"htComments"}},{key:"CLASS_INPUT",get:function(){return"htCommentTextArea"}},{key:"CLASS_CELL",get:function(){return"htCommentCell"}}]),r(e,[{key:"setPosition",value:function(e,t){this.editorStyle.left=e+"px",this.editorStyle.top=t+"px"}},{key:"setSize",value:function(e,t){if(e&&t){var n=this.getInputElement();n.style.width=e+"px",n.style.height=t+"px"}}},{key:"resetSize",value:function(){var e=this.getInputElement();e.style.width="",e.style.height=""}},{key:"setReadOnlyState",value:function(e){this.getInputElement().readOnly=e}},{key:"show",value:function(){this.editorStyle.display="block",this.hidden=!1}},{key:"hide",value:function(){this.editorStyle.display="none",this.hidden=!0}},{key:"isVisible",value:function(){return"block"===this.editorStyle.display}},{key:"setValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=e||"",this.getInputElement().value=e}},{key:"getValue",value:function(){return this.getInputElement().value}},{key:"isFocused",value:function(){return document.activeElement===this.getInputElement()}},{key:"focus",value:function(){this.getInputElement().focus()}},{key:"createEditor",value:function(){var t=document.querySelector("."+e.CLASS_EDITOR_CONTAINER),n=void 0,o=void 0;return t||(t=document.createElement("div"),(0,i.addClass)(t,e.CLASS_EDITOR_CONTAINER),document.body.appendChild(t)),n=document.createElement("div"),(0,i.addClass)(n,e.CLASS_EDITOR),o=document.createElement("textarea"),(0,i.addClass)(o,e.CLASS_INPUT),n.appendChild(o),t.appendChild(n),n}},{key:"getInputElement",value:function(){return this.editor.querySelector("."+e.CLASS_INPUT)}},{key:"destroy",value:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(42),s=n(2),a=n(58),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=function(){function e(t){o(this,e),this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}return r(e,[{key:"hide",value:function(){var e=this;this.wasLastActionShow=!1,this.hidingTimer=setTimeout(function(){!1===e.wasLastActionShow&&e.runLocalHooks("hide")},250)}},{key:"show",value:function(e){this.wasLastActionShow=!0,this.showDebounced(e)}},{key:"cancelHiding",value:function(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}},{key:"updateDelay",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,i.debounce)(function(t){e.wasLastActionShow&&e.runLocalHooks("show",t.from.row,t.from.col)},t)}},{key:"destroy",value:function(){this.clearLocalHooks()}}]),e}();(0,s.mixin)(u,l.default),t.default=u},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=n(10),c=o(u),h=n(15),f=o(h),d=n(1),p=n(298),g=o(p),v=n(6),y=o(v),m=n(299),w=o(m),C=n(311),b=o(C),E=n(8),S=n(12),O=n(0),T=n(94);n(313),f.default.getSingleton().register("afterContextMenuDefaultOptions"),f.default.getSingleton().register("beforeContextMenuShow"),f.default.getSingleton().register("afterContextMenuShow"),f.default.getSingleton().register("afterContextMenuHide"),f.default.getSingleton().register("afterContextMenuExecute");var _=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new y.default(n),n.commandExecutor=new g.default(n.hot),n.itemsFactory=null,n.menu=null,n}return s(t,e),l(t,null,[{key:"DEFAULT_ITEMS",get:function(){return[T.ROW_ABOVE,T.ROW_BELOW,T.SEPARATOR,T.COLUMN_LEFT,T.COLUMN_RIGHT,T.SEPARATOR,T.REMOVE_ROW,T.REMOVE_COLUMN,T.SEPARATOR,T.UNDO,T.REDO,T.SEPARATOR,T.READ_ONLY,T.SEPARATOR,T.ALIGNMENT]}}]),l(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().contextMenu}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.itemsFactory=new w.default(this.hot,t.DEFAULT_ITEMS);var n=this.hot.getSettings().contextMenu,o={items:this.itemsFactory.getItems(n)};this.registerEvents(),"function"==typeof n.callback&&this.commandExecutor.setCommonCallback(n.callback),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this);var r=function(){if(e.hot){e.hot.runHooks("afterContextMenuDefaultOptions",o),e.itemsFactory.setPredefinedItems(o.items);var t=e.itemsFactory.getItems(n);e.menu=new b.default(e.hot,{className:"htContextMenu",keepInViewport:!0}),e.hot.runHooks("beforeContextMenuSetItems",t),e.menu.setMenuItems(t),e.menu.addLocalHook("beforeOpen",function(){return e.onMenuBeforeOpen()}),e.menu.addLocalHook("afterOpen",function(){return e.onMenuAfterOpen()}),e.menu.addLocalHook("afterClose",function(){return e.onMenuAfterClose()}),e.menu.addLocalHook("executeCommand",function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];return e.executeCommand.apply(e,n)}),(0,d.arrayEach)(t,function(t){return e.commandExecutor.registerCommand(t.key,t)})}};this.callOnPluginsReady(function(){e.isPluginsReady?setTimeout(r,0):r()})}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"contextmenu",function(t){return e.onContextMenu(t)})}},{key:"open",value:function(e){this.menu&&(this.menu.open(),this.menu.setPosition({top:parseInt((0,S.pageY)(e),10)-(0,O.getWindowScrollTop)(),left:parseInt((0,S.pageX)(e),10)-(0,O.getWindowScrollLeft)()}),this.menu.hotMenu.isHotTableEnv=this.hot.isHotTableEnv)}},{key:"close",value:function(){this.menu&&this.menu.close()}},{key:"executeCommand",value:function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];this.commandExecutor.execute.apply(this.commandExecutor,t)}},{key:"onContextMenu",value:function(e){var t=this.hot.getSettings(),n=t.rowHeaders,o=t.colHeaders,r=e.realTarget;this.close(),(0,O.hasClass)(r,"handsontableInput")||(e.preventDefault(),(0,S.stopPropagation)(e),(n||o||function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(r)||(0,O.hasClass)(r,"current")&&(0,O.hasClass)(r,"wtBorder"))&&this.open(e))}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeContextMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterContextMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);_.SEPARATOR={name:T.SEPARATOR},(0,E.registerPlugin)("contextMenu",_),t.default=_},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){var n=void 0;return(0,s.arrayEach)(t,function(t){var o=t.key?t.key.split(":"):null;if(Array.isArray(o)&&o[1]===e)return n=t,!1}),n}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(1),a=n(2);t.default=function(){function e(t){o(this,e),this.hot=t,this.commands={},this.commonCallback=null}return i(e,[{key:"registerCommand",value:function(e,t){this.commands[e]=t}},{key:"setCommonCallback",value:function(e){this.commonCallback=e}},{key:"execute",value:function(e){for(var t=this,n=arguments.length,o=Array(n>1?n-1:0),i=1;n>i;i++)o[i-1]=arguments[i];var l=e.split(":");e=l[0];var u=2===l.length?l[1]:null,c=this.commands[e];if(!c)throw Error("Menu command '"+e+"' not exists.");if(u&&c.submenu&&(c=r(u,c.submenu.items)),!0!==c.disabled&&("function"!=typeof c.disabled||!0!==c.disabled.call(this.hot))&&!(0,a.hasOwnProperty)(c,"submenu")){var h=[];"function"==typeof c.callback&&h.push(c.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),o.unshift(l.join(":")),(0,s.arrayEach)(h,function(e){return e.apply(t.hot,o)})}}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[];return e&&e.items?e=e.items:Array.isArray(e)||(e=t),(0,s.isObject)(e)?(0,s.objectEach)(e,function(e,t){var r=n["string"==typeof e?e:t];r||(r=e),(0,s.isObject)(e)?(0,s.extend)(r,e):"string"==typeof r&&(r={name:r}),void 0===r.key&&(r.key=t),o.push(r)}):(0,a.arrayEach)(e,function(e,t){var r=n[e];(r||0>l.ITEMS.indexOf(e))&&(r||(r={name:e,key:""+t}),(0,s.isObject)(e)&&(0,s.extend)(r,e),void 0===r.key&&(r.key=t),o.push(r))}),o}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(2),a=n(1),l=n(94);t.default=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;o(this,e),this.hot=t,this.predefinedItems=(0,l.predefinedItems)(),this.defaultOrderPattern=n}return i(e,[{key:"setPredefinedItems",value:function(e){var t=this,n={};this.defaultOrderPattern.length=0,(0,s.objectEach)(e,function(e,o){var r="";e.name===l.SEPARATOR?(n[l.SEPARATOR]=e,r=l.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,n[o]=e,r=e.key):(n[e.key]=e,r=e.key),t.defaultOrderPattern.push(r)}),this.predefinedItems=n}},{key:"getItems",value:function(){return r(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}]),e}()},function(e,t,n){"use strict";function o(){return{key:l,name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:l+":left",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htLeft"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htLeft"),(0,r.align)(t,"horizontal","htLeft",function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),this.render()},disabled:!1},{key:l+":center",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htCenter"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(e,t){var n=this,o=this.getSelectedRange(),i=(0,r.getAlignmentClasses)(o,function(e,t){return n.getCellMeta(e,t).className});this.runHooks("beforeCellAlignment",i,o,"horizontal","htCenter"),(0,r.align)(o,"horizontal","htCenter",function(e,t){return n.getCellMeta(e,t)},function(e,t,o,r){return n.setCellMeta(e,t,o,r)}),this.render()},disabled:!1},{key:l+":right",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htRight"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htRight"),(0,r.align)(t,"horizontal","htRight",function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),this.render()},disabled:!1},{key:l+":justify",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htJustify"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"horizontal","htJustify"),(0,r.align)(t,"horizontal","htJustify",function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),this.render()},disabled:!1},{name:i.KEY},{key:l+":top",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htTop"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"vertical","htTop"),(0,r.align)(t,"vertical","htTop",function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),this.render()},disabled:!1},{key:l+":middle",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htMiddle"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"vertical","htMiddle"),(0,r.align)(t,"vertical","htMiddle",function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),this.render()},disabled:!1},{key:l+":bottom",name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;if(o&&-1!==o.indexOf("htBottom"))return!0})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.getAlignmentClasses)(t,function(t,n){return e.getCellMeta(t,n).className});this.runHooks("beforeCellAlignment",n,t,"vertical","htBottom"),(0,r.align)(t,"vertical","htBottom",function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),this.render()},disabled:!1}]}}}t.__esModule=!0,t.KEY=void 0,t.default=o;var r=n(19),i=n(93),s=n(7),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),l=t.KEY="alignment"},function(e,t,n){"use strict";function o(){return{key:l,name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback:function(e,t){var n=t[0].start.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled:function(){var e=(0,i.getValidSelection)(this);if(!e)return!0;var t=r(e[0],4),n=t[0],o=t[1],s=t[2],a=[n,0,s,this.countCols()-1],l=a.join(",")===e.join(",");return 0>o||this.countCols()>=this.getSettings().maxCols||l}}}t.__esModule=!0,t.KEY=void 0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(19),s=n(7),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),l=t.KEY="clear_column"},function(e,t,n){"use strict";function o(){return{key:l,name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback:function(e,t){this.alter("insert_col",t[Math.max(t.length-1,0)].start.col,1,"ContextMenu.columnLeft")},disabled:function(){var e=(0,i.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=r(e[0],4),n=t[0],o=t[1],s=t[2],a=[n,0,s,this.countCols()-1],l=a.join(",")===e.join(","),u=1===this.countCols();return 0>o||this.countCols()>=this.getSettings().maxCols||!u&&l},hidden:function(){return!this.getSettings().allowInsertColumn}}}t.__esModule=!0,t.KEY=void 0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(19),s=n(7),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),l=t.KEY="col_left"},function(e,t,n){"use strict";function o(){return{key:l,name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback:function(e,t){this.alter("insert_col",t[Math.max(t.length-1,0)].end.col+1,1,"ContextMenu.columnRight")},disabled:function(){var e=(0,i.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=r(e[0],4),n=t[0],o=t[1],s=t[2],a=[n,0,s,this.countCols()-1],l=a.join(",")===e.join(","),u=1===this.countCols();return 0>o||this.countCols()>=this.getSettings().maxCols||!u&&l},hidden:function(){return!this.getSettings().allowInsertColumn}}}t.__esModule=!0,t.KEY=void 0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(19),s=n(7),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),l=t.KEY="col_right"},function(e,t,n){"use strict";function o(){return{key:l,name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_READ_ONLY);return(0,r.checkSelectionConsistency)(this.getSelectedRange(),function(t,n){return e.getCellMeta(t,n).readOnly})&&(t=(0,r.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,r.checkSelectionConsistency)(t,function(t,n){return e.getCellMeta(t,n).readOnly});(0,i.arrayEach)(t,function(t){t.forAll(function(t,o){e.setCellMeta(t,o,"readOnly",!n)})}),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())}}}t.__esModule=!0,t.KEY=void 0,t.default=o;var r=n(19),i=n(1),s=n(7),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(s),l=t.KEY="make_read_only"},function(e,t,n){"use strict";function o(){return{key:s,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REDO)},callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}}t.__esModule=!0,t.KEY=void 0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=t.KEY="redo"},function(e,t,n){"use strict";function o(){return{key:u,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)t=1;else{var n=r(e[0],4),o=n[1],i=n[3];o-i!=0&&(t=1)}return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback:function(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this.getSelected()),null,"ContextMenu.removeColumn")},disabled:function(){var e=(0,i.getValidSelection)(this),t=this.countCols();return!e||(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner()||!this.isColumnModificationAllowed()||!t)},hidden:function(){return!this.getSettings().allowRemoveColumn}}}t.__esModule=!0,t.KEY=void 0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(19),s=(n(1),n(91)),a=n(7),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a),u=t.KEY="remove_col"},function(e,t,n){"use strict";function o(){return{key:u,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)t=1;else{var n=r(e[0],3),o=n[0],i=n[2];o-i!=0&&(t=1)}return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback:function(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this.getSelected()),null,"ContextMenu.removeRow")},disabled:function(){var e=(0,i.getValidSelection)(this),t=this.countRows();return!e||(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner()||!t)},hidden:function(){return!this.getSettings().allowRemoveRow}}}t.__esModule=!0,t.KEY=void 0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(19),s=(n(1),n(91)),a=n(7),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(a),u=t.KEY="remove_row"},function(e,t,n){"use strict";function o(){return{key:a,name:function(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback:function(e,t){this.alter("insert_row",t[Math.max(t.length-1,0)].start.row,1,"ContextMenu.rowAbove")},disabled:function(){return!(0,r.getValidSelection)(this)||this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}}t.__esModule=!0,t.KEY=void 0,t.default=o;var r=n(19),i=n(7),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=t.KEY="row_above"},function(e,t,n){"use strict";function o(){return{key:a,name:function(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_BELOW)},callback:function(e,t){this.alter("insert_row",t[Math.max(t.length-1,0)].end.row+1,1,"ContextMenu.rowBelow")},disabled:function(){return!(0,r.getValidSelection)(this)||this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}}t.__esModule=!0,t.KEY=void 0,t.default=o;var r=n(19),i=n(7),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=t.KEY="row_below"},function(e,t,n){"use strict";function o(){return{key:s,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_UNDO)},callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}}}t.__esModule=!0,t.KEY=void 0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=t.KEY="undo"},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(88),a=o(s),l=n(0),u=n(1),c=n(312),h=o(c),f=n(6),d=o(f),p=n(2),g=n(16),v=n(42),y=n(19),m=n(21),w=n(58),C=o(w),b=n(94),E=n(12),S=215,O=function(){function e(t,n){r(this,e),this.hot=t,this.options=n||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:S},this.eventManager=new d.default(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()}return i(e,[{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousedown",function(t){return e.onDocumentMouseDown(t)})}},{key:"setMenuItems",value:function(e){this.menuItems=e}},{key:"setOffset",value:function(e){this.offset[e]=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}},{key:"isSubMenu",value:function(){return null!==this.parentMenu}},{key:"open",value:function(){var e=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var t=(0,v.debounce)(function(t){return e.openSubMenu(t)},300),n=this.options.minWidth||S,o=(0,u.arrayFilter)(this.menuItems,function(t){return(0,y.isItemHidden)(t,e.hot)});o=(0,y.filterSeparators)(o,b.SEPARATOR);var r={data:o,colHeaders:!1,autoColumnSize:!0,modifyColWidth:function(e){return(0,g.isDefined)(e)&&n>e?n:e},autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:function(t,n,o,r,i,s){return e.menuItemRenderer(t,n,o,r,i,s)}}],renderAllRows:!0,fragmentSelection:"cell",disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(n,o,r){e.isAllSubMenusClosed()?t(o.row):e.openSubMenu(o.row)},rowHeights:function(e){return o[e].name===b.SEPARATOR?1:23}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new a.default(this.container,r),this.hotMenu.addHook("afterInit",function(){return e.onAfterInit()}),this.hotMenu.addHook("afterSelection",function(){return e.onAfterSelection.apply(e,arguments)}),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}},{key:"openSubMenu",value:function(t){if(!this.hotMenu)return!1;var n=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!n||!(0,y.hasSubMenu)(n))return!1;var o=this.hotMenu.getSourceDataAtRow(t),r=new e(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0});return r.setMenuItems(o.submenu.items),r.open(),r.setPosition(n.getBoundingClientRect()),this.hotSubMenus[o.key]=r,r}},{key:"closeSubMenu",value:function(e){var t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];n&&(n.destroy(),delete this.hotSubMenus[t.key])}},{key:"closeAllSubMenus",value:function(){var e=this;(0,u.arrayEach)(this.hotMenu.getData(),function(t,n){return e.closeSubMenu(n)})}},{key:"isAllSubMenusClosed",value:function(){return 0===Object.keys(this.hotSubMenus).length}},{key:"destroy",value:function(){this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy()}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hotMenu.getSelectedLast()){var t=this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]);if(this.runLocalHooks("select",t,e),!1!==t.isCommand&&t.name!==b.SEPARATOR){var n=this.hot.getSelectedRange(),o=n?(0,y.normalizeSelection)(n):[],r=!0;(!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(this.hot)||t.submenu)&&(r=!1),this.runLocalHooks("executeCommand",t.key,o,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,o,e),r&&this.close(!0)}}}},{key:"setPosition",value:function(e){var t=new h.default(e);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),t.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(t):this.setPositionOnLeftOfCursor(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))}},{key:"setPositionAboveCursor",value:function(e){var t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top=t+"px"}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top;this.isSubMenu()&&(t=e.top-1),this.container.style.top=t+"px"}},{key:"setPositionOnRightOfCursor",value:function(e){var t=void 0;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left=t+"px"}},{key:"setPositionOnLeftOfCursor",value:function(e){this.container.style.left=this.offset.left+e.left-this.container.offsetWidth+(0,l.getScrollbarWidth)()+4+"px"}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,y.isSeparator)(e)||(0,y.isDisabled)(e)||(0,y.isSelectionDisabled)(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);(0,y.isSeparator)(t)||(0,y.isDisabled)(t)||(0,y.isSelectionDisabled)(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,o=n<this.hotMenu.countRows()?this.hotMenu.getCell(n,t):null;o&&((0,y.isSeparator)(o)||(0,y.isDisabled)(o)||(0,y.isSelectionDisabled)(o)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,o=0>n?null:this.hotMenu.getCell(n,t);o&&((0,y.isSeparator)(o)||(0,y.isDisabled)(o)||(0,y.isSelectionDisabled)(o)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,o,r,i){var s=this,a=e.getSourceDataAtRow(n),u=document.createElement("div"),c=function(e){return e.disableSelection};"function"==typeof i&&(i=i.call(this.hot)),(0,l.empty)(t),(0,l.addClass)(u,"htItemWrapper"),t.appendChild(u),!function(e){return RegExp(b.SEPARATOR,"i").test(e.name)}(a)?"function"==typeof a.renderer?((0,l.addClass)(t,"htCustomMenuRenderer"),t.appendChild(a.renderer(e,u,n,o,r,i))):(0,l.fastInnerHTML)(u,i):(0,l.addClass)(t,"htSeparator"),!function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(s.hot)}(a)?c(a)?((0,l.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):!function(e){return(0,p.hasOwnProperty)(e,"submenu")}(a)?((0,l.removeClass)(t,"htSubmenu"),(0,l.removeClass)(t,"htDisabled"),c(a)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(n,o,void 0,void 0,!1,!1)})):((0,l.addClass)(t,"htSubmenu"),c(a)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(n,o,void 0,void 0,!1,!1)})):((0,l.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}))}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=void 0;return e?((0,v.isFunction)(e)&&(e=e.call(this.hot),e=null===e||(0,g.isUndefined)(e)?"":""+e),e=e.replace(/[^A-z0-9]/g,"_"),e=this.options.className+"Sub_"+e,t=document.querySelector("."+this.options.className+"."+e)):t=document.querySelector("."+this.options.className),t||(t=document.createElement("div"),(0,l.addClass)(t,"htMenu "+this.options.className),e&&(0,l.addClass)(t,e),document.getElementsByTagName("body")[0].appendChild(t)),t}},{key:"blockMainTableCallbacks",value:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}},{key:"releaseMainTableCallbacks",value:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}},{key:"onBeforeKeyDown",value:function(e){var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case m.KEY_CODES.ESCAPE:this.close(),n=!0;break;case m.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case m.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case m.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case m.KEY_CODES.ARROW_RIGHT:if(t){var o=this.openSubMenu(t[0]);o&&o.selectFirstCell()}n=!0;break;case m.KEY_CODES.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),(0,E.stopImmediatePropagation)(e)),this.keyEvent=!1}},{key:"onAfterInit",value:function(){var e=this.hotMenu.getSettings().data,t=this.hotMenu.view.wt.wtTable.hider.style,n=this.hotMenu.view.wt.wtTable.holder.style,o=parseInt(t.width,10),r=(0,u.arrayReduce)(e,function(e,t){return e+(t.name===b.SEPARATOR?1:26)},0);n.width=o+22+"px",n.height=r+4+"px",t.height=n.height}},{key:"onAfterSelection",value:function(e,t,n,o,r){!1===this.keyEvent&&(r.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.container&&(0,l.isChildOf)(e.target,this.container)&&this.executeCommand(e),this.options.standalone&&this.hotMenu&&!(0,l.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):(this.isAllSubMenusClosed()||this.isSubMenu())&&!(0,l.isChildOf)(e.target,".htMenu")&&(0,l.isChildOf)(e.target,document)&&this.close(!0))}}]),e}();(0,p.mixin)(O,C.default),t.default=O},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),s=n(12);t.default=function(){function e(t){o(this,e);var n=(0,i.getWindowScrollTop)(),r=(0,i.getWindowScrollLeft)(),a=void 0,l=void 0,u=void 0,c=void 0,h=void 0,f=void 0;this.type=this.getSourceType(t),"literal"===this.type?(a=parseInt(t.top,10),u=parseInt(t.left,10),h=t.height||0,f=t.width||0,l=a,c=u,a+=n,u+=r):"event"===this.type&&(a=parseInt((0,s.pageY)(t),10),u=parseInt((0,s.pageX)(t),10),h=t.target.clientHeight,f=t.target.clientWidth,l=a-n,c=u-r),this.top=a,this.topRelative=l,this.left=u,this.leftRelative=c,this.scrollTop=n,this.scrollLeft=r,this.cellHeight=h,this.cellWidth=f}return r(e,[{key:"getSourceType",value:function(e){var t="literal";return e instanceof Event&&(t="event"),t}},{key:"fitsAbove",value:function(e){return this.topRelative>=e.offsetHeight}},{key:"fitsBelow",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerHeight)>=this.topRelative+e.offsetHeight}},{key:"fitsOnRight",value:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.innerWidth)>=this.leftRelative+this.cellWidth+e.offsetWidth}},{key:"fitsOnLeft",value:function(e){return this.leftRelative>=e.offsetWidth}}]),e}()},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},c=n(10),h=o(c),f=n(15),d=o(f),p=n(191),g=o(p),v=n(4),y=n(0),m=n(1),w=n(5),C=n(8),b=n(315),E=o(b),S=n(316),O=o(S),T=n(317),_=o(T),R=n(6),k=o(R),M=n(318),A=o(M);n(320),d.default.getSingleton().register("afterCopyLimit"),d.default.getSingleton().register("modifyCopyableRange"),d.default.getSingleton().register("beforeCut"),d.default.getSingleton().register("afterCut"),d.default.getSingleton().register("beforePaste"),d.default.getSingleton().register("afterPaste"),d.default.getSingleton().register("beforeCopy"),d.default.getSingleton().register("afterCopy");var N=1e3,P=1e3,H=new WeakMap,L=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new k.default(n),n.columnsLimit=P,n.copyableRanges=[],n.pasteMode="overwrite",n.rowsLimit=N,n.textarea=void 0,H.set(n,{isTriggeredByCopy:!1,isTriggeredByCut:!1,isBeginEditing:!1,isFragmentSelectionEnabled:!1}),n}return s(t,e),l(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().copyPaste}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings(),o=H.get(this);this.textarea=E.default.getSingleton(),o.isFragmentSelectionEnabled=n.fragmentSelection,"object"===a(n.copyPaste)&&(this.pasteMode=n.copyPaste.pasteMode||this.pasteMode,this.rowsLimit=n.copyPaste.rowsLimit||this.rowsLimit,this.columnsLimit=n.copyPaste.columnsLimit||this.columnsLimit),this.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.addHook("afterSelectionEnd",function(){return e.onAfterSelectionEnd()}),this.registerEvents(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.textarea&&this.textarea.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"setCopyableText",value:function(){var e=this.hot.getSelectedRangeLast();if(e){var t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),o=t.row,r=t.col,i=n.row,s=n.col,a=Math.min(i,o+this.rowsLimit-1),l=Math.min(s,r+this.columnsLimit-1);this.copyableRanges.length=0,this.copyableRanges.push({startRow:o,startCol:r,endRow:a,endCol:l}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges),i===a&&s===l||this.hot.runHooks("afterCopyLimit",i-o+1,s-r+1,this.rowsLimit,this.columnsLimit)}}},{key:"getRangedCopyableData",value:function(e){var t=this,n=[],o=[],r=[];return(0,m.arrayEach)(e,function(e){(0,w.rangeEach)(e.startRow,e.endRow,function(e){-1===o.indexOf(e)&&o.push(e)}),(0,w.rangeEach)(e.startCol,e.endCol,function(e){-1===r.indexOf(e)&&r.push(e)})}),(0,m.arrayEach)(o,function(e){var o=[];(0,m.arrayEach)(r,function(n){o.push(t.hot.getCopyableData(e,n))}),n.push(o)}),g.default.stringify(n)}},{key:"getRangedData",value:function(e){var t=this,n=[],o=[],r=[];return(0,m.arrayEach)(e,function(e){(0,w.rangeEach)(e.startRow,e.endRow,function(e){-1===o.indexOf(e)&&o.push(e)}),(0,w.rangeEach)(e.startCol,e.endCol,function(e){-1===r.indexOf(e)&&r.push(e)})}),(0,m.arrayEach)(o,function(e){var o=[];(0,m.arrayEach)(r,function(n){o.push(t.hot.getCopyableData(e,n))}),n.push(o)}),n}},{key:"copy",value:function(){H.get(this).isTriggeredByCopy=!0,this.textarea.select(),document.execCommand("copy")}},{key:"cut",value:function(){H.get(this).isTriggeredByCut=!0,this.textarea.select(),document.execCommand("cut")}},{key:"paste",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=new A.default;t.clipboardData.setData("text/plain",e),this.onPaste(t)}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(this.textarea.element,"paste",function(t){return e.onPaste(t)}),this.eventManager.addEventListener(this.textarea.element,"cut",function(t){return e.onCut(t)}),this.eventManager.addEventListener(this.textarea.element,"copy",function(t){return e.onCopy(t)})}},{key:"onCopy",value:function(e){var t=H.get(this);if(this.hot.isListening()||t.isTriggeredByCopy){this.setCopyableText(),t.isTriggeredByCopy=!1;var n=this.getRangedData(this.copyableRanges),o=!!this.hot.runHooks("beforeCopy",n,this.copyableRanges),r="";o&&(r=g.default.stringify(n),e&&e.clipboardData?e.clipboardData.setData("text/plain",r):"undefined"==typeof ClipboardEvent&&window.clipboardData.setData("Text",r),this.hot.runHooks("afterCopy",n,this.copyableRanges)),e.preventDefault()}}},{key:"onCut",value:function(e){var t=H.get(this);if(this.hot.isListening()||t.isTriggeredByCut){this.setCopyableText(),t.isTriggeredByCut=!1;var n=this.getRangedData(this.copyableRanges),o=!!this.hot.runHooks("beforeCut",n,this.copyableRanges),r=void 0;o&&(r=g.default.stringify(n),e&&e.clipboardData?e.clipboardData.setData("text/plain",r):"undefined"==typeof ClipboardEvent&&window.clipboardData.setData("Text",r),this.hot.emptySelectedCells(),this.hot.runHooks("afterCut",n,this.copyableRanges)),e.preventDefault()}}},{key:"onPaste",value:function(e){var t=this;if(this.hot.isListening()){e&&e.preventDefault&&e.preventDefault();var n=void 0;if(e&&void 0!==e.clipboardData?this.textarea.setValue(e.clipboardData.getData("text/plain")):"undefined"==typeof ClipboardEvent&&void 0!==window.clipboardData&&this.textarea.setValue(window.clipboardData.getData("Text")),n=g.default.parse(this.textarea.getValue()),this.textarea.setValue(" "),0!==n.length){if(!!this.hot.runHooks("beforePaste",n,this.copyableRanges)){var o=this.hot.getSelectedLast(),r=new v.CellCoords(o[0],o[1]),i=new v.CellCoords(o[2],o[3]),s=new v.CellRange(r,r,i),a=s.getTopLeftCorner(),l=s.getBottomRightCorner(),u=a,c=new v.CellCoords(Math.max(l.row,n.length-1+a.row),Math.max(l.col,n[0].length-1+a.col)),h=i.row-r.row>=n.length-1,f=i.col-r.col>=n[0].length-1;this.hot.addHookOnce("afterChange",function(e){var n=e?e.length:0;if(n){var o={row:0,col:0},r=-1;(0,m.arrayEach)(e,function(t,i){var s=n>i+1?e[i+1]:null;s&&(h||(o.row+=Math.max(s[0]-t[0]-1,0)),!f&&t[1]>r&&(r=t[1],o.col+=Math.max(s[1]-t[1]-1,0)))}),t.hot.selectCell(u.row,u.col,c.row+o.row,c.col+o.col)}}),this.hot.populateFromArray(u.row,u.col,n,c.row,c.col,"CopyPaste.paste",this.pasteMode),this.hot.runHooks("afterPaste",n,this.copyableRanges)}}}}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:"---------"},(0,O.default)(this),(0,_.default)(this))}},{key:"onAfterSelectionEnd",value:function(){var e=H.get(this),t=this.hot.getActiveEditor();t&&void 0!==t.isOpened&&t.isOpened()||e.isFragmentSelectionEnabled&&!this.textarea.isActive()&&(0,y.getSelectionText)()||(this.setCopyableText(),this.textarea.select())}},{key:"destroy",value:function(){this.textarea&&this.textarea.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,C.registerPlugin)("CopyPaste",L),t.default=L},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=function(){function e(){o(this,e),this.element=void 0,this.isAppended=!1,this.refCounter=0}return r(e,null,[{key:"getSingleton",value:function(){return s.append(),s}}]),r(e,[{key:"append",value:function(){this.hasBeenDestroyed()&&this.create(),this.refCounter++,!this.isAppended&&document.body&&document.body&&(this.isAppended=!0,document.body.appendChild(this.element))}},{key:"create",value:function(){this.element=document.createElement("textarea"),this.element.id="HandsontableCopyPaste",this.element.className="copyPaste",this.element.tabIndex=-1,this.element.autocomplete="off",this.element.wrap="hard",this.element.value=" "}},{key:"deselect",value:function(){this.element===document.activeElement&&document.activeElement.blur()}},{key:"destroy",value:function(){this.refCounter--,this.refCounter=0>this.refCounter?0:this.refCounter,this.hasBeenDestroyed()&&this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.element=null,this.isAppended=!1)}},{key:"getValue",value:function(){return this.element.value}},{key:"hasBeenDestroyed",value:function(){return 1>this.refCounter}},{key:"isActive",value:function(){return this.element===document.activeElement}},{key:"select",value:function(){this.element.focus(),this.element.select()}},{key:"setValue",value:function(e){this.element.value=e}}]),e}(),s=new i;t.default=i},function(e,t,n){"use strict";function o(e){return{key:"copy",name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_COPY)},callback:function(){e.copy()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r)},function(e,t,n){"use strict";function o(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_CUT)},callback:function(){e.cut()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=n(319),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function e(){o(this,e),this.clipboardData=new i.default}},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();t.default=function(){function e(){o(this,e),this.data={}}return r(e,[{key:"setData",value:function(e,t){this.data[e]=t}},{key:"getData",value:function(e){return this.data[e]||void 0}}]),e}()},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(8),f=n(2),d=n(5),p=n(4),g=n(15),v=(o(g),n(1)),y=n(7),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(y),w=n(322),C=o(w),b=n(323),E=o(b),S=n(324),O=o(S),T=n(325),_=o(T),R=n(326),k=o(R),M=n(47),A=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.savedBorderSettings=void 0,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().customBorders}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearBorders(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"getSettingIndex",value:function(e){var t=-1;return(0,v.arrayEach)(this.hot.selection.highlight.borders,function(n,o){if(n.settings.className===e)return t=o,!1}),t}},{key:"insertBorderIntoSettings",value:function(e){var t={row:e.row,col:e.col},n=new p.Selection(e,new p.CellRange(t,t,t)),o=this.getSettingIndex(e.className);0>o?this.hot.selection.highlight.borders.push(n):this.hot.selection.highlight.borders[o]=n}},{key:"prepareBorderFromCustomAdded",value:function(e,t,n){var o=(0,M.createEmptyBorders)(e,t);o=(0,M.extendDefaultBorder)(o,n),this.hot.setCellMeta(e,t,"borders",o),this.insertBorderIntoSettings(o)}},{key:"prepareBorderFromCustomAddedRange",value:function(e){var t=this,n=e.range;(0,d.rangeEach)(n.from.row,n.to.row,function(o){(0,d.rangeEach)(n.from.col,n.to.col,function(r){var i=(0,M.createEmptyBorders)(o,r),s=0;o===n.from.row&&(s+=1,(0,f.hasOwnProperty)(e,"top")&&(i.top=e.top)),o===n.to.row&&(s+=1,(0,f.hasOwnProperty)(e,"bottom")&&(i.bottom=e.bottom)),r===n.from.col&&(s+=1,(0,f.hasOwnProperty)(e,"left")&&(i.left=e.left)),r===n.to.col&&(s+=1,(0,f.hasOwnProperty)(e,"right")&&(i.right=e.right)),s>0&&(t.hot.setCellMeta(o,r,"borders",i),t.insertBorderIntoSettings(i))})})}},{key:"removeBordersFromDom",value:function(e){var t=this.hot.rootElement.querySelectorAll("."+e+":not(td)");(0,d.rangeEach)(0,t.length-1,function(e){var n=t[e].parentNode;n.parentNode&&n.parentNode.removeChild(n)})}},{key:"removeAllBorders",value:function(e,t){this.removeBordersFromDom((0,M.createClassName)(e,t)),this.hot.removeCellMeta(e,t,"borders")}},{key:"setBorder",value:function(e,t,n,o){var r=this.hot.getCellMeta(e,t).borders;r&&void 0!==r.border||(r=(0,M.createEmptyBorders)(e,t)),r[n]=o?(0,M.createSingleEmptyBorder)():(0,M.createDefaultCustomBorder)(),this.hot.setCellMeta(e,t,"borders",r),this.removeBordersFromDom((0,M.createClassName)(e,t)),this.insertBorderIntoSettings(r),this.hot.render()}},{key:"prepareBorder",value:function(e,t,n){var o=this;(0,v.arrayEach)(e,function(e){var r=e.start,i=e.end;if(r.row===i.row&&r.col===i.col)"noBorders"===t?o.removeAllBorders(r.row,r.col):o.setBorder(r.row,r.col,t,n);else switch(t){case"noBorders":(0,d.rangeEach)(r.col,i.col,function(e){(0,d.rangeEach)(r.row,i.row,function(t){o.removeAllBorders(t,e)})});break;case"top":(0,d.rangeEach)(r.col,i.col,function(e){o.setBorder(r.row,e,t,n)});break;case"right":(0,d.rangeEach)(r.row,i.row,function(e){o.setBorder(e,i.col,t,n)});break;case"bottom":(0,d.rangeEach)(r.col,i.col,function(e){o.setBorder(i.row,e,t,n)});break;case"left":(0,d.rangeEach)(r.row,i.row,function(e){o.setBorder(e,r.col,t,n)})}})}},{key:"createCustomBorders",value:function(e){var t=this;(0,d.rangeEach)(0,e.length-1,function(n){e[n].range?t.prepareBorderFromCustomAddedRange(e[n]):t.prepareBorderFromCustomAdded(e[n].row,e[n].col,e[n])}),this.hot.render(),this.hot.view.wt.draw(!0)}},{key:"onAfterContextMenuDefaultOptions",value:function(e){this.hot.getSettings().customBorders&&e.items.push({name:"---------"},{key:"borders",name:function(){return this.getTranslatedPhrase(m.CONTEXTMENU_ITEMS_BORDERS)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[(0,k.default)(this),(0,_.default)(this),(0,C.default)(this),(0,E.default)(this),(0,O.default)(this)]}})}},{key:"clearBorders",value:function(){var e=this,t=this.hot.rootElement.querySelectorAll('td[class^="border"]');(0,d.rangeEach)(0,t.length-1,function(n){e.removeBordersFromDom(t[n].className)})}},{key:"changeBorderSettings",value:function(){var e=this.hot.getSettings().customBorders;if(e)if(Array.isArray(e))this.savedBorderSettings=e,this.createCustomBorders(e);else if(void 0!==e){var t=this.savedBorderSettings?this.savedBorderSettings:e;this.createCustomBorders(t)}}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,h.registerPlugin)("customBorders",A),t.default=A},function(e,t,n){"use strict";function o(e){return{key:"borders:bottom",name:function(){var e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,s.checkSelectionBorders)(this,"bottom")&&(e=(0,s.markSelected)(e)),e},callback:function(t,n){var o=(0,s.checkSelectionBorders)(this,"bottom");e.prepareBorder(n,"bottom",o)}}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=n(47)},function(e,t,n){"use strict";function o(e){return{key:"borders:left",name:function(){var e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,s.checkSelectionBorders)(this,"left")&&(e=(0,s.markSelected)(e)),e},callback:function(t,n){var o=(0,s.checkSelectionBorders)(this,"left");e.prepareBorder(n,"left",o)}}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=n(47)},function(e,t,n){"use strict";function o(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback:function(t,n){e.prepareBorder(n,"noBorders")},disabled:function(){return!(0,s.checkSelectionBorders)(this)}}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=n(47)},function(e,t,n){"use strict";function o(e){return{key:"borders:right",name:function(){var e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,s.checkSelectionBorders)(this,"right")&&(e=(0,s.markSelected)(e)),e},callback:function(t,n){var o=(0,s.checkSelectionBorders)(this,"right");e.prepareBorder(n,"right",o)}}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=n(47)},function(e,t,n){"use strict";function o(e){return{key:"borders:top",name:function(){var e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,s.checkSelectionBorders)(this,"top")&&(e=(0,s.markSelected)(e)),e},callback:function(t,n){var o=(0,s.checkSelectionBorders)(this,"top");e.prepareBorder(n,"top",o)}}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=n(47)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(6),f=o(h),d=n(8),p=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.eventManager=new f.default(n),n.boundaries=null,n.callback=null,n.listening=!1,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().dragToScroll}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterOnCellMouseDown",function(){return e.setupListening()}),this.addHook("afterOnCellCornerMouseDown",function(){return e.setupListening()}),this.registerEvents(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.unregisterEvents(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"setBoundaries",value:function(e){this.boundaries=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"check",value:function(e,t){var n=0,o=0;this.boundaries.top>t?o=t-this.boundaries.top:t>this.boundaries.bottom&&(o=t-this.boundaries.bottom),this.boundaries.left>e?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,o)}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document,"mouseup",function(){return e.onMouseUp()}),this.eventManager.addEventListener(document,"mousemove",function(t){return e.onMouseMove(t)})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(){var e=this.hot.view.wt.wtTable.holder;e!==window&&(this.setBoundaries(e.getBoundingClientRect()),this.setCallback(function(t,n){0>t?e.scrollLeft-=50:t>0&&(e.scrollLeft+=50),0>n?e.scrollTop-=20:n>0&&(e.scrollTop+=20)}),this.listening=!0)}},{key:"onMouseMove",value:function(e){this.listening&&this.check(e.clientX,e.clientY)}},{key:"onMouseUp",value:function(){this.listening=!1}},{key:"destroy",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,d.registerPlugin)("dragToScroll",p),t.default=p},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(8),f=n(1),d=n(329),p=o(d),g=n(330),v=o(g);n(331);var y=new WeakMap,m=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return y.set(n,{moveByFreeze:!1,afterFirstUse:!1}),n.frozenColumnsBasePositions=[],n.manualColumnMovePlugin=void 0,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnFreeze}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(t){return e.addContextMenuEntry(t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),this.addHook("beforeColumnMove",function(t,n){return e.onBeforeColumnMove(t,n)}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=y.get(this);e.afterFirstUse=!1,e.moveByFreeze=!1,l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"freezeColumn",value:function(e){var t=y.get(this),n=this.hot.getSettings();t.afterFirstUse||(t.afterFirstUse=!0),n.fixedColumnsLeft!==this.hot.countCols()&&e>n.fixedColumnsLeft-1&&(t.moveByFreeze=!0,e!==this.getMovePlugin().columnsMapper.getValueByIndex(e)&&(this.frozenColumnsBasePositions[n.fixedColumnsLeft]=e),this.getMovePlugin().moveColumn(e,n.fixedColumnsLeft++))}},{key:"unfreezeColumn",value:function(e){var t=y.get(this),n=this.hot.getSettings();if(t.afterFirstUse||(t.afterFirstUse=!0),n.fixedColumnsLeft>0&&n.fixedColumnsLeft-1>=e){var o=this.getBestColumnReturnPosition(e);t.moveByFreeze=!0,n.fixedColumnsLeft--,this.getMovePlugin().moveColumn(e,o+1)}}},{key:"getMovePlugin",value:function(){return this.manualColumnMovePlugin||(this.manualColumnMovePlugin=this.hot.getPlugin("manualColumnMove")),this.manualColumnMovePlugin}},{key:"getBestColumnReturnPosition",value:function(e){var t=this.getMovePlugin(),n=this.hot.getSettings(),o=n.fixedColumnsLeft,r=t.columnsMapper.getValueByIndex(o),i=void 0;if(null===this.frozenColumnsBasePositions[e]||void 0===this.frozenColumnsBasePositions[e])for(i=t.columnsMapper.getValueByIndex(e);null!==r&&i>=r;)o++,r=t.columnsMapper.getValueByIndex(o);else{for(i=this.frozenColumnsBasePositions[e],this.frozenColumnsBasePositions[e]=void 0;null!==r&&i>=r;)o++,r=t.columnsMapper.getValueByIndex(o);o=r}return o-1}},{key:"addContextMenuEntry",value:function(e){e.items.push({name:"---------"},(0,p.default)(this),(0,v.default)(this))}},{key:"onAfterInit",value:function(){this.getMovePlugin().isEnabled()||this.getMovePlugin().enablePlugin()}},{key:"onBeforeColumnMove",value:function(e,t){var n=y.get(this);if(n.afterFirstUse&&!n.moveByFreeze){var o=this.hot.getSettings().fixedColumnsLeft,r=o>t;if(r||(0,f.arrayEach)(e,function(e,t,n){if(o>e)return r=!0,!1}),r)return!1}n.moveByFreeze&&(n.moveByFreeze=!1)}},{key:"destroy",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,h.registerPlugin)("manualColumnFreeze",m),t.default=m},function(e,t,n){"use strict";function o(e){return{key:"freeze_column",name:function(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback:function(t,n){var o=r(n,1);e.freezeColumn(o[0].start.col),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:e.length>1?t=!0:e[0].from.col===e[0].to.col&&e[0].from.col>this.getSettings().fixedColumnsLeft-1||(t=!0),t}}}t.__esModule=!0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(7),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i)},function(e,t,n){"use strict";function o(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback:function(t,n){var o=r(n,1);e.unfreezeColumn(o[0].start.col),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:e.length>1?t=!0:e[0].from.col===e[0].to.col&&e[0].from.col<this.getSettings().fixedColumnsLeft||(t=!0),t}}}t.__esModule=!0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var i=n(7),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i)},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},c=n(10),h=o(c),f=n(15),d=o(f),p=n(1),g=n(0),v=n(5),y=n(6),m=o(y),w=n(8),C=n(333),b=o(C),E=n(334),S=o(E),O=n(335),T=o(O);n(4);n(336),d.default.getSingleton().register("beforeColumnMove"),d.default.getSingleton().register("afterColumnMove"),d.default.getSingleton().register("unmodifyCol");var _=new WeakMap,R=function(e){function t(e){i(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return _.set(n,{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,disallowMoving:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0}}),n.removedColumns=[],n.columnsMapper=new b.default(n),n.eventManager=new m.default(n),n.backlight=new S.default(e),n.guideline=new T.default(e),n}return a(t,e),l(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnMove}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(t,n,o,r){return e.onBeforeOnCellMouseDown(t,n,o,r)}),this.addHook("beforeOnCellMouseOver",function(t,n,o,r){return e.onBeforeOnCellMouseOver(t,n,o,r)}),this.addHook("afterScrollVertically",function(){return e.onAfterScrollVertically()}),this.addHook("modifyCol",function(t,n){return e.onModifyCol(t,n)}),this.addHook("beforeRemoveCol",function(t,n){return e.onBeforeRemoveCol(t,n)}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol()}),this.addHook("afterCreateCol",function(t,n){return e.onAfterCreateCol(t,n)}),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("unmodifyCol",function(t){return e.onUnmodifyCol(t)}),this.registerEvents(),(0,g.addClass)(this.hot.rootElement,"ht__manualColumnMove"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)&&this.columnsMapper.clearMap(),(0,g.removeClass)(this.hot.rootElement,"ht__manualColumnMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"moveColumn",value:function(e,t){this.moveColumns([e],t)}},{key:"moveColumns",value:function(e,t){var n=this,o=[].concat(r(e)),i=_.get(this),s=this.hot.runHooks("beforeColumnMove",o,t);i.disallowMoving=!s,!1!==s&&((0,p.arrayEach)(e,function(e,t,o){o[t]=n.columnsMapper.getValueByIndex(e)}),(0,p.arrayEach)(e,function(e,o){var r=n.columnsMapper.getIndexByValue(e);r!==t&&n.columnsMapper.moveColumn(r,t+o)}),this.columnsMapper.clearNull()),this.hot.runHooks("afterColumnMove",o,t)}},{key:"changeSelection",value:function(e,t){this.hot.selectColumns(e,t)}},{key:"getColumnsWidth",value:function(e,t){for(var n=0,o=e;t>o;o++){var r=0;r=0>o?this.hot.view.wt.wtViewport.getRowHeaderWidth()||0:this.hot.view.wt.wtTable.getStretchedColumnWidth(o)||0,n+=r}return n}},{key:"initialSettings",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)?this.moveColumns(e,0):void 0!==e&&this.persistentStateLoad()}},{key:"isFixedColumnsLeft",value:function(e){return e<this.hot.getSettings().fixedColumnsLeft}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.columnsMapper._arrayMap)}},{key:"persistentStateLoad",value:function(){var e={};this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value&&(this.columnsMapper._arrayMap=e.value)}},{key:"prepareColumnsToMoving",value:function(e,t){var n=[];return(0,v.rangeEach)(e,t,function(e){n.push(e)}),n}},{key:"refreshPositions",value:function(){var e=_.get(this),t=this.hot.view.wt.wtTable.getFirstVisibleColumn(),n=this.hot.view.wt.wtTable.getLastVisibleColumn(),o=this.hot.view.wt.wtTable,r=this.hot.view.wt.wtOverlays.scrollableElement,i="number"==typeof r.scrollX?r.scrollX:r.scrollLeft,s=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.coordsColumn),a=e.target.eventPageX-(e.rootElementOffset-(void 0===r.scrollX?i:0)),l=o.hider.offsetWidth,u=o.TBODY.offsetLeft,c=this.backlight.getOffset().left,h=this.backlight.getSize().width,f=0;if(e.target.eventPageX>e.rootElementOffset+o.holder.offsetWidth+i&&e.countCols>e.coordsColumn&&e.coordsColumn++,e.hasRowHeaders&&(f=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsLeft(e.coordsColumn)&&(s+=i),s+=f,0>e.coordsColumn)e.target.col=e.fixedColumns>0?0:t>0?t-1:t;else if(a<e.target.TD.offsetWidth/2+s)(e.target.col=e.coordsColumn)>t||e.fixedColumns>e.target.col||this.hot.scrollViewportTo(void 0,t-1);else{var d=e.countCols>e.coordsColumn?e.coordsColumn:e.countCols-1;e.target.col=d+1,s+=e.target.TD.offsetWidth,e.target.col>n&&this.hot.scrollViewportTo(void 0,n+1,void 0,!0)}e.target.col>t||e.fixedColumns>e.target.col||this.hot.scrollViewportTo(void 0,t-1);var p=a,g=s;l>a+h+c?u+f>a+c&&(p=u+f+Math.abs(c)):p=l-h-c,l-1>s?0===g?g=1:void 0!==r.scrollX&&e.fixedColumns>e.coordsColumn&&(g-=e.rootElementOffset>r.scrollX?0:e.rootElementOffset):g=l-1,this.backlight.setPosition(null,p),this.guideline.setPosition(null,g)}},{key:"updateColumnsMapper",value:function(){var e=this.hot.countSourceCols(),t=this.columnsMapper._arrayMap.length;if(0===t)this.columnsMapper.createMap(e||this.hot.getSettings().startCols);else if(e>t){var n=e-t;this.columnsMapper.insertItems(t,n)}else if(t>e){var o=e-1,r=[];(0,p.arrayEach)(this.columnsMapper._arrayMap,function(e,t){e>o&&r.push(t)}),this.columnsMapper.removeItems(r)}}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,o){var r=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),s=this.hot.getSelectedRangeLast(),a=_.get(this),l=e.realTarget.className.indexOf("columnSorting")>-1;if(!s||!i||a.pressed||0!==e.button||l)return a.pressed=!1,a.columnsToMove.length=0,void(0,g.removeClass)(this.hot.rootElement,["on-moving--columns","show-ui"]);var u=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();u&&c&&(this.guideline.appendTo(r.hider),this.backlight.appendTo(r.hider));var h=s.from,f=s.to,d=Math.min(h.col,f.col),p=Math.max(h.col,f.col);if(0<=t.row||t.col<d||p<t.col)(0,g.removeClass)(this.hot.rootElement,"after-selection--columns"),a.pressed=!1,a.columnsToMove.length=0;else{o.column=!0,a.pressed=!0,a.target.eventPageX=e.pageX,a.coordsColumn=t.col,a.target.TD=n,a.target.col=t.col,a.columnsToMove=this.prepareColumnsToMoving(d,p),a.hasRowHeaders=!!this.hot.getSettings().rowHeaders,a.countCols=this.hot.countCols(),a.fixedColumns=this.hot.getSettings().fixedColumnsLeft,a.rootElementOffset=(0,g.offset)(this.hot.rootElement).left;var v=a.hasRowHeaders?-1:0,y=r.holder.scrollTop+r.getColumnHeaderHeight(0)+1,m=a.fixedColumns>t.col,w=this.hot.view.wt.wtOverlays.scrollableElement,C=w.scrollX?w.scrollX-a.rootElementOffset:0,b=e.layerX-(m?C:0),E=Math.abs(this.getColumnsWidth(d,t.col)+b);this.backlight.setPosition(y,this.getColumnsWidth(v,d)+E),this.backlight.setSize(this.getColumnsWidth(d,p+1),r.hider.offsetHeight-y),this.backlight.setOffset(null,-1*E),(0,g.addClass)(this.hot.rootElement,"on-moving--columns")}}},{key:"onMouseMove",value:function(e){var t=_.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout(function(){this.backlight.setPosition(n)})}t.target.eventPageX=e.pageX,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,o){var r=this.hot.getSelectedRangeLast(),i=_.get(this);r&&i.pressed&&(i.columnsToMove.indexOf(t.col)>-1?(0,g.removeClass)(this.hot.rootElement,"show-ui"):(0,g.addClass)(this.hot.rootElement,"show-ui"),o.row=!0,o.column=!0,o.cell=!0,i.coordsColumn=t.col,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=_.get(this);if(e.coordsColumn=void 0,e.pressed=!1,e.backlightWidth=0,(0,g.removeClass)(this.hot.rootElement,["on-moving--columns","show-ui","after-selection--columns"]),this.hot.selection.isSelectedByColumnHeader()&&(0,g.addClass)(this.hot.rootElement,"after-selection--columns"),e.columnsToMove.length>=1&&void 0!==e.target.col&&-1>=e.columnsToMove.indexOf(e.target.col)){if(this.moveColumns(e.columnsToMove,e.target.col),this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),!e.disallowMoving){this.changeSelection(this.columnsMapper.getIndexByValue(e.columnsToMove[0]),this.columnsMapper.getIndexByValue(e.columnsToMove[e.columnsToMove.length-1]))}e.columnsToMove.length=0}}},{key:"onAfterScrollVertically",value:function(){var e=this.hot.view.wt.wtTable,t=e.getColumnHeaderHeight(0)+1,n=e.holder.scrollTop,o=t+n;this.backlight.setPosition(o),this.backlight.setSize(null,e.hider.offsetHeight-o)}},{key:"onAfterCreateCol",value:function(e,t){this.columnsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveCol",value:function(e,t){var n=this;this.removedColumns.length=0,!1!==e&&(0,v.rangeEach)(e,e+t-1,function(e){n.removedColumns.push(n.hot.runHooks("modifyCol",e,n.pluginName))})}},{key:"onAfterRemoveCol",value:function(){this.columnsMapper.unshiftItems(this.removedColumns)}},{key:"onAfterLoadData",value:function(){this.updateColumnsMapper()}},{key:"onModifyCol",value:function(e,t){if(t!==this.pluginName){var n=this.columnsMapper.getValueByIndex(e);e=null===n?e:n}return e}},{key:"onUnmodifyCol",value:function(e){var t=this.columnsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateColumnsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,w.registerPlugin)("ManualColumnMove",R),t.default=R},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(201),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=n(1),l=n(2),u=n(5),c=function(){function e(t){o(this,e),this.manualColumnMove=t}return r(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,u.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}},{key:"moveColumn",value:function(e,t){var n=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,n)}},{key:"clearNull",value:function(){this._arrayMap=(0,a.arrayFilter)(this._arrayMap,function(e){return null!==e})}}]),e}();(0,l.mixin)(c,s.default),t.default=c},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=n(202),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(0);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"build",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,c.addClass)(this._element,"ht__manualColumnMove--backlight")}}]),t}(u.default)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=n(202),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(0);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"build",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,c.addClass)(this._element,"ht__manualColumnMove--guideline")}}]),t}(u.default)},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(0),f=n(6),d=o(f),p=n(12),g=n(1),v=n(5),y=n(8),m=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.currentTH=null,n.currentCol=null,n.selectedCols=[],n.currentWidth=null,n.newSize=null,n.startY=null,n.startWidth=null,n.startOffset=null,n.handle=document.createElement("DIV"),n.guide=document.createElement("DIV"),n.eventManager=new d.default(n),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.manualColumnWidths=[],(0,h.addClass)(n.handle,"manualColumnResizer"),(0,h.addClass)(n.guide,"manualColumnResizerGuide"),n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualColumnResize}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.manualColumnWidths=[];var n=this.hot.getSettings().manualColumnResize,o=this.loadManualColumnWidths();this.addHook("modifyColWidth",function(t,n){return e.onModifyColWidth(t,n)}),this.addHook("beforeStretchingColumnWidth",function(t,n){return e.onBeforeStretchingColumnWidth(t,n)}),this.addHook("beforeColumnResize",function(t,n,o){return e.onBeforeColumnResize(t,n,o)}),this.manualColumnWidths=void 0!==o?o:Array.isArray(n)?n:[],this.bindEvents(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().manualColumnResize;Array.isArray(e)?this.manualColumnWidths=e:e||(this.manualColumnWidths=[])}},{key:"disablePlugin",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"saveManualColumnWidths",value:function(){this.hot.runHooks("persistentStateSave","manualColumnWidths",this.manualColumnWidths)}},{key:"loadManualColumnWidths",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualColumnWidths",e),e.value}},{key:"setupHandlePosition",value:function(e){var t=this;if(!e.parentNode)return!1;this.currentTH=e;var n=this.hot.view.wt.wtTable.getCoords(e).col,o=(0,h.outerHeight)(this.currentTH);if(n>=0){var r=this.currentTH.getBoundingClientRect();if(this.currentCol=n,this.selectedCols=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByColumnHeader()){var i=this.hot.getSelectedRangeLast(),s=i.from,a=i.to,l=s.col,u=a.col;u>l||(l=a.col,u=s.col),l>this.currentCol||this.currentCol>u?this.selectedCols.push(this.currentCol):(0,v.rangeEach)(l,u,function(e){return t.selectedCols.push(e)})}else this.selectedCols.push(this.currentCol);this.startOffset=r.left-6,this.startWidth=parseInt(r.width,10),this.handle.style.top=r.top+"px",this.handle.style.left=this.startOffset+this.startWidth+"px",this.handle.style.height=o+"px",this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.left=this.startOffset+this.currentWidth+"px"}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,h.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,h.addClass)(this.handle,"active"),(0,h.addClass)(this.guide,"active"),this.guide.style.top=t+"px",this.guide.style.left=this.handle.style.left,this.guide.style.height=n-e+"px",this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.left=this.handle.style.left}},{key:"hideHandleAndGuide",value:function(){(0,h.removeClass)(this.handle,"active"),(0,h.removeClass)(this.guide,"active")}},{key:"checkIfColumnHeader",value:function(e){if(e!=this.hot.rootElement){var t=e.parentNode;return"THEAD"===t.tagName||this.checkIfColumnHeader(t)}return!1}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfColumnHeader(e.target)){var t=this.getTHFromTargetElement(e.target);if(!t)return;var n=t.getAttribute("colspan");!t||null!==n&&1!==n||this.pressed||this.setupHandlePosition(t)}}},{key:"afterMouseDownTimeout",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,o){var r=e.hot.runHooks("beforeColumnResize",n,e.newSize,!0);void 0!==r&&(e.newSize=r),"all"===e.hot.getSettings().stretchH?e.clearManualSize(n):e.setManualSize(n,e.newSize),o&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize,!0)};if(this.dblclick>=2){this.selectedCols.length>1?((0,g.arrayEach)(this.selectedCols,function(e){n(e)}),t()):(0,g.arrayEach)(this.selectedCols,function(e){n(e,!0)})}this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,h.hasClass)(e.target,"manualColumnResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick++,this.startX=(0,p.pageX)(e),this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+((0,p.pageX)(e)-this.startX),(0,g.arrayEach)(this.selectedCols,function(e){t.newSize=t.setManualSize(e,t.currentWidth)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(e){var t=this,n=function(){t.hot.forceFullRender=!0,t.hot.view.render(),t.hot.view.wt.wtOverlays.adjustElementsSize(!0)},o=function(e,o){t.hot.runHooks("beforeColumnResize",e,t.newSize),o&&n(),t.saveManualColumnWidths(),t.hot.runHooks("afterColumnResize",e,t.newSize)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!=this.startWidth){this.selectedCols.length>1?((0,g.arrayEach)(this.selectedCols,function(e){o(e)}),n()):(0,g.arrayEach)(this.selectedCols,function(e){o(e,!0)})}this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(window,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(window,"mouseup",function(t){return e.onMouseUp(t)})}},{key:"setManualSize",value:function(e,t){return t=Math.max(t,20),e=this.hot.runHooks("modifyCol",e),this.manualColumnWidths[e]=t,t}},{key:"clearManualSize",value:function(e){e=this.hot.runHooks("modifyCol",e),this.manualColumnWidths[e]=void 0}},{key:"onModifyColWidth",value:function(e,t){return this.enabled&&(t=this.hot.runHooks("modifyCol",t),this.hot.getSettings().manualColumnResize&&this.manualColumnWidths[t])?this.manualColumnWidths[t]:e}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=this.manualColumnWidths[t];return void 0===n&&(n=e),n}},{key:"onBeforeColumnResize",value:function(){this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked={}}}]),t}(c.default);(0,y.registerPlugin)("manualColumnResize",m),t.default=m},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),u=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},c=n(10),h=o(c),f=n(15),d=o(f),p=n(1),g=n(0),v=n(5),y=n(6),m=o(y),w=n(8),C=n(339),b=o(C),E=n(340),S=o(E),O=n(341),T=o(O);n(4);n(342),d.default.getSingleton().register("beforeRowMove"),d.default.getSingleton().register("afterRowMove"),d.default.getSingleton().register("unmodifyRow");var _=new WeakMap,R=function(e){function t(e){i(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return _.set(n,{rowsToMove:[],pressed:void 0,disallowMoving:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0}}),n.removedRows=[],n.rowsMapper=new b.default(n),n.eventManager=new m.default(n),n.backlight=new S.default(e),n.guideline=new T.default(e),n}return a(t,e),l(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualRowMove}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(t,n,o,r){return e.onBeforeOnCellMouseDown(t,n,o,r)}),this.addHook("beforeOnCellMouseOver",function(t,n,o,r){return e.onBeforeOnCellMouseOver(t,n,o,r)}),this.addHook("afterScrollHorizontally",function(){return e.onAfterScrollHorizontally()}),this.addHook("modifyRow",function(t,n){return e.onModifyRow(t,n)}),this.addHook("beforeRemoveRow",function(t,n){return e.onBeforeRemoveRow(t,n)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow()}),this.addHook("afterCreateRow",function(t,n){return e.onAfterCreateRow(t,n)}),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeColumnSort",function(t,n){return e.onBeforeColumnSort(t,n)}),this.addHook("unmodifyRow",function(t){return e.onUnmodifyRow(t)}),this.registerEvents(),(0,g.addClass)(this.hot.rootElement,"ht__manualRowMove"),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualRowMove;Array.isArray(e)&&this.rowsMapper.clearMap(),(0,g.removeClass)(this.hot.rootElement,"ht__manualRowMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"moveRow",value:function(e,t){this.moveRows([e],t)}},{key:"moveRows",value:function(e,t){var n=this,o=[].concat(r(e)),i=_.get(this);i.disallowMoving=!1===this.hot.runHooks("beforeRowMove",o,t),i.disallowMoving||((0,p.arrayEach)(e,function(e,t,o){o[t]=n.rowsMapper.getValueByIndex(e)}),(0,p.arrayEach)(e,function(e,o){var r=n.rowsMapper.getIndexByValue(e);r!==t&&n.rowsMapper.moveRow(r,t+o)}),this.rowsMapper.clearNull()),this.hot.runHooks("afterRowMove",o,t)}},{key:"changeSelection",value:function(e,t){this.hot.selectRows(e,t)}},{key:"getRowsHeight",value:function(e,t){for(var n=0,o=e;t>o;o++){n+=this.hot.view.wt.wtTable.getRowHeight(o)||23}return n}},{key:"initialSettings",value:function(){var e=this.hot.getSettings().manualRowMove;if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){var t=this.persistentStateLoad();t.length&&this.moveRows(t,0)}}},{key:"isFixedRowTop",value:function(e){return e<this.hot.getSettings().fixedRowsTop}},{key:"isFixedRowBottom",value:function(e){return e>this.hot.getSettings().fixedRowsBottom}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualRowMove",this.rowsMapper._arrayMap)}},{key:"persistentStateLoad",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}},{key:"prepareRowsToMoving",value:function(){var e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;var n=e.from,o=e.to,r=Math.min(n.row,o.row),i=Math.max(n.row,o.row);return(0,v.rangeEach)(r,i,function(e){t.push(e)}),t}},{key:"refreshPositions",value:function(){var e=_.get(this),t=e.target.coords,n=this.hot.view.wt.wtTable.getFirstVisibleRow(),o=this.hot.view.wt.wtTable.getLastVisibleRow(),r=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();r>t.row&&n>0&&this.hot.scrollViewportTo(n-1),t.row>=o&&i>o&&this.hot.scrollViewportTo(o+1,void 0,!0);var s=this.hot.view.wt.wtTable,a=e.target.TD,l=(0,g.offset)(this.hot.rootElement),u=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row),c=e.target.eventPageY-l.top+s.holder.scrollTop,h=s.hider.offsetHeight,f=s.TBODY.offsetTop,d=this.backlight.getOffset().top,p=this.backlight.getSize().height;this.isFixedRowTop(t.row)&&(u+=s.holder.scrollTop),0>t.row?e.target.row=n>0?n-1:n:a.offsetHeight/2+u>c?e.target.row=t.row:(e.target.row=t.row+1,u+=0===t.row?a.offsetHeight-1:a.offsetHeight);var v=c,y=u;h>c+p+d?f>c+d&&(v=f+Math.abs(d)):v=h-p-d,h-1>u||(y=h-1);var m=0;this.hot.view.wt.wtOverlays.topOverlay&&(m=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=r&&m>y-s.holder.scrollTop&&this.hot.scrollViewportTo(t.row),this.backlight.setPosition(v),this.guideline.setPosition(y)}},{key:"updateRowsMapper",value:function(){var e=this.hot.countSourceRows(),t=this.rowsMapper._arrayMap.length;if(0===t)this.rowsMapper.createMap(e||this.hot.getSettings().startRows);else if(e>t){var n=e-t;this.rowsMapper.insertItems(t,n)}else if(t>e){var o=e-1,r=[];(0,p.arrayEach)(this.rowsMapper._arrayMap,function(e,t){e>o&&r.push(t)}),this.rowsMapper.removeItems(r)}}},{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeColumnSort",value:function(e,t){_.get(this).disallowMoving=void 0!==t}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,o){var r=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByRowHeader(),s=this.hot.getSelectedRangeLast(),a=_.get(this);if(!s||!i||a.pressed||0!==e.button)return a.pressed=!1,a.rowsToMove.length=0,void(0,g.removeClass)(this.hot.rootElement,["on-moving--rows","show-ui"]);var l=this.guideline.isBuilt()&&!this.guideline.isAppended(),u=this.backlight.isBuilt()&&!this.backlight.isAppended();l&&u&&(this.guideline.appendTo(r.hider),this.backlight.appendTo(r.hider));var c=s.from,h=s.to,f=Math.min(c.row,h.row),d=Math.max(c.row,h.row);if(0<=t.col||t.row<f||d<t.row)(0,g.removeClass)(this.hot.rootElement,"after-selection--rows"),a.pressed=!1,a.rowsToMove.length=0;else{o.row=!0,a.pressed=!0,a.target.eventPageY=e.pageY,a.target.coords=t,a.target.TD=n,a.rowsToMove=this.prepareRowsToMoving();var p=r.holder.scrollLeft+this.hot.view.wt.wtViewport.getRowHeaderWidth();this.backlight.setPosition(null,p),this.backlight.setSize(r.hider.offsetWidth-p,this.getRowsHeight(f,d+1)),this.backlight.setOffset(-1*(this.getRowsHeight(f,t.row)+e.layerY),null),(0,g.addClass)(this.hot.rootElement,"on-moving--rows"),this.refreshPositions()}}},{key:"onMouseMove",value:function(e){var t=_.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout(function(){this.backlight.setPosition(null,n)})}t.target.eventPageY=e.pageY,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,o){var r=this.hot.getSelectedRangeLast(),i=_.get(this);r&&i.pressed&&(i.rowsToMove.indexOf(t.row)>-1?(0,g.removeClass)(this.hot.rootElement,"show-ui"):(0,g.addClass)(this.hot.rootElement,"show-ui"),o.row=!0,o.column=!0,o.cell=!0,i.target.coords=t,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=_.get(this),t=e.target.row,n=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,g.removeClass)(this.hot.rootElement,["on-moving--rows","show-ui","after-selection--rows"]),this.hot.selection.isSelectedByRowHeader()&&(0,g.addClass)(this.hot.rootElement,"after-selection--rows"),n>=1&&void 0!==t&&-1>=e.rowsToMove.indexOf(t)&&e.rowsToMove[n-1]!==t-1){if(this.moveRows(e.rowsToMove,t),this.persistentStateSave(),this.hot.render(),!e.disallowMoving){this.changeSelection(this.rowsMapper.getIndexByValue(e.rowsToMove[0]),this.rowsMapper.getIndexByValue(e.rowsToMove[n-1]))}e.rowsToMove.length=0}}},{key:"onAfterScrollHorizontally",value:function(){var e=this.hot.view.wt.wtTable,t=this.hot.view.wt.wtViewport.getRowHeaderWidth(),n=e.holder.scrollLeft,o=t+n;this.backlight.setPosition(null,o),this.backlight.setSize(e.hider.offsetWidth-o)}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,v.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e,n.pluginName))})}},{key:"onAfterRemoveRow",value:function(){this.rowsMapper.unshiftItems(this.removedRows)}},{key:"onAfterLoadData",value:function(){this.updateRowsMapper()}},{key:"onModifyRow",value:function(e,t){if(t!==this.pluginName){var n=this.rowsMapper.getValueByIndex(e);e=null===n?e:n}return e}},{key:"onUnmodifyRow",value:function(e){var t=this.rowsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateRowsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,w.registerPlugin)("ManualRowMove",R),t.default=R},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(201),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=n(1),l=n(2),u=n(5),c=function(){function e(t){o(this,e),this.manualRowMove=t}return r(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,(0,u.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}},{key:"moveRow",value:function(e,t){var n=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,n)}},{key:"clearNull",value:function(){this._arrayMap=(0,a.arrayFilter)(this._arrayMap,function(e){return null!==e})}}]),e}();(0,l.mixin)(c,s.default),t.default=c},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=n(203),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(0);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"build",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,c.addClass)(this._element,"ht__manualRowMove--backlight")}}]),t}(u.default)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=n(203),u=function(e){return e&&e.__esModule?e:{default:e}}(l),c=n(0);t.default=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"build",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"build",this).call(this),(0,c.addClass)(this._element,"ht__manualRowMove--guideline")}}]),t}(u.default)},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(0),f=n(6),d=o(f),p=n(12),g=n(1),v=n(5),y=n(8),m=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.currentTH=null,n.currentRow=null,n.selectedRows=[],n.currentHeight=null,n.newSize=null,n.startY=null,n.startHeight=null,n.startOffset=null,n.handle=document.createElement("DIV"),n.guide=document.createElement("DIV"),n.eventManager=new d.default(n),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.manualRowHeights=[],(0,h.addClass)(n.handle,"manualRowResizer"),(0,h.addClass)(n.guide,"manualRowResizerGuide"),n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualRowResize}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.manualRowHeights=[];var n=this.hot.getSettings().manualRowResize,o=this.loadManualRowHeights();this.manualRowHeights=void 0!==o?o:Array.isArray(n)?n:[],this.addHook("modifyRowHeight",function(t,n){return e.onModifyRowHeight(t,n)}),this.bindEvents(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().manualRowResize;Array.isArray(e)?this.manualRowHeights=e:e||(this.manualRowHeights=[])}},{key:"disablePlugin",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"saveManualRowHeights",value:function(){this.hot.runHooks("persistentStateSave","manualRowHeights",this.manualRowHeights)}},{key:"loadManualRowHeights",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowHeights",e),e.value}},{key:"setupHandlePosition",value:function(e){var t=this;this.currentTH=e;var n=this.hot.view.wt.wtTable.getCoords(e).row,o=(0,h.outerWidth)(this.currentTH);if(n>=0){var r=this.currentTH.getBoundingClientRect();if(this.currentRow=n,this.selectedRows=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByRowHeader()){var i=this.hot.getSelectedRangeLast(),s=i.from,a=i.to,l=s.row,u=a.row;u>l||(l=a.row,u=s.row),l>this.currentRow||this.currentRow>u?this.selectedRows.push(this.currentRow):(0,v.rangeEach)(l,u,function(e){return t.selectedRows.push(e)})}else this.selectedRows.push(this.currentRow);this.startOffset=r.top-6,this.startHeight=parseInt(r.height,10),this.handle.style.left=r.left+"px",this.handle.style.top=this.startOffset+this.startHeight+"px",this.handle.style.width=o+"px",this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.top=this.startOffset+this.currentHeight+"px"}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,h.outerWidth)(this.handle),10),t=parseInt(this.handle.style.left,10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,h.addClass)(this.handle,"active"),(0,h.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left=t+"px",this.guide.style.width=n-e+"px",this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.top=this.handle.style.top}},{key:"hideHandleAndGuide",value:function(){(0,h.removeClass)(this.handle,"active"),(0,h.removeClass)(this.guide,"active")}},{key:"checkIfRowHeader",value:function(e){if(e!=this.hot.rootElement){var t=e.parentNode;return"TBODY"===t.tagName||this.checkIfRowHeader(t)}return!1}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfRowHeader(e.target)){var t=this.getTHFromTargetElement(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}},{key:"afterMouseDownTimeout",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,o){var r=e.hot.runHooks("beforeRowResize",n,e.newSize,!0);void 0!==r&&(e.newSize=r),e.setManualSize(n,e.newSize),o&&t(),e.hot.runHooks("afterRowResize",n,e.newSize,!0)};if(this.dblclick>=2){this.selectedRows.length>1?((0,g.arrayEach)(this.selectedRows,function(e){n(e)}),t()):(0,g.arrayEach)(this.selectedRows,function(e){n(e,!0)})}this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,h.hasClass)(e.target,"manualRowResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null==this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick++,this.startY=(0,p.pageY)(e),this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+((0,p.pageY)(e)-this.startY),(0,g.arrayEach)(this.selectedRows,function(e){t.newSize=t.setManualSize(e,t.currentHeight)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(e){var t=this,n=function(){t.hot.forceFullRender=!0,t.hot.view.render(),t.hot.view.wt.wtOverlays.adjustElementsSize(!0)},o=function(e,o){t.hot.runHooks("beforeRowResize",e,t.newSize),o&&n(),t.saveManualRowHeights(),t.hot.runHooks("afterRowResize",e,t.newSize)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!=this.startHeight){this.selectedRows.length>1?((0,g.arrayEach)(this.selectedRows,function(e){o(e)}),n()):(0,g.arrayEach)(this.selectedRows,function(e){o(e,!0)})}this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(window,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(window,"mouseup",function(t){return e.onMouseUp(t)})}},{key:"setManualSize",value:function(e,t){return e=this.hot.runHooks("modifyRow",e),this.manualRowHeights[e]=t,t}},{key:"onModifyRowHeight",value:function(e,t){if(this.enabled){var n=this.hot.getPlugin("autoRowSize"),o=n?n.heights[t]:null;t=this.hot.runHooks("modifyRow",t);var r=this.manualRowHeights[t];if(void 0!==r&&(r===o||r>(e||0)))return r}return e}}]),t}(c.default);(0,y.registerPlugin)("manualRowResize",m),t.default=m},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},h=n(10),f=o(h),d=n(15),p=o(d),g=n(8),v=n(12),y=n(4),m=n(345),w=o(m),C=n(95),b=o(C),E=n(346),S=o(E),O=n(347),T=o(O),_=n(348),R=o(_),k=n(1),M=n(2),A=n(56),N=n(5),P=n(204);n(349),p.default.getSingleton().register("beforeMergeCells"),p.default.getSingleton().register("afterMergeCells"),p.default.getSingleton().register("beforeUnmergeCells"),p.default.getSingleton().register("afterUnmergeCells");var H=new WeakMap,L=function(e){function t(e){i(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return H.set(n,{lastDesiredCoords:null}),n.mergedCellsCollection=null,n.autofillCalculations=null,n.selectionCalculations=null,n}return a(t,e),u(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().mergeCells}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mergedCellsCollection=new w.default(this),this.autofillCalculations=new S.default(this),this.selectionCalculations=new T.default(this),this.addHook("afterInit",function(){return e.onAfterInit.apply(e,arguments)}),this.addHook("beforeKeyDown",function(){return e.onBeforeKeyDown.apply(e,arguments)}),this.addHook("modifyTransformStart",function(){return e.onModifyTransformStart.apply(e,arguments)}),this.addHook("afterModifyTransformStart",function(){return e.onAfterModifyTransformStart.apply(e,arguments)}),this.addHook("modifyTransformEnd",function(){return e.onModifyTransformEnd.apply(e,arguments)}),this.addHook("modifyGetCellCoords",function(){return e.onModifyGetCellCoords.apply(e,arguments)}),this.addHook("beforeSetRangeEnd",function(){return e.onBeforeSetRangeEnd.apply(e,arguments)}),this.addHook("afterIsMultipleSelection",function(){return e.onAfterIsMultipleSelection.apply(e,arguments)}),this.addHook("afterRenderer",function(){return e.onAfterRenderer.apply(e,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return e.addMergeActionsToContextMenu.apply(e,arguments)}),this.addHook("afterGetCellMeta",function(){return e.onAfterGetCellMeta.apply(e,arguments)}),this.addHook("afterViewportRowCalculatorOverride",function(){return e.onAfterViewportRowCalculatorOverride.apply(e,arguments)}),this.addHook("afterViewportColumnCalculatorOverride",function(){return e.onAfterViewportColumnCalculatorOverride.apply(e,arguments)}),this.addHook("modifyAutofillRange",function(){return e.onModifyAutofillRange.apply(e,arguments)}),this.addHook("afterCreateCol",function(){return e.onAfterCreateCol.apply(e,arguments)}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol.apply(e,arguments)}),this.addHook("afterCreateRow",function(){return e.onAfterCreateRow.apply(e,arguments)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow.apply(e,arguments)}),this.addHook("afterChange",function(){return e.onAfterChange.apply(e,arguments)}),this.addHook("beforeDrawBorders",function(){return e.onBeforeDrawAreaBorders.apply(e,arguments)}),this.addHook("afterDrawSelection",function(){return e.onAfterDrawSelection.apply(e,arguments)}),this.addHook("beforeRemoveCellClassNames",function(){return e.onBeforeRemoveCellClassNames.apply(e,arguments)}),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearCollections(),this.hot.render(),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().mergeCells;this.clearCollections(),this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),c(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"validateSetting",value:function(e){var t=!0;return!!e&&(b.default.containsNegativeValues(e)?((0,A.warn)(b.default.NEGATIVE_VALUES_WARNING(e)),t=!1):b.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,A.warn)(b.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):b.default.isSingleCell(e)?((0,A.warn)(b.default.IS_SINGLE_CELL(e)),t=!1):b.default.containsZeroSpan(e)&&((0,A.warn)(b.default.ZERO_SPAN_WARNING(e)),t=!1),t)}},{key:"generateFromSettings",value:function(e){var t=this;if(Array.isArray(e)){var n,o=[];(0,k.arrayEach)(e,function(e){if(t.validateSetting(e)){var n=new y.CellCoords(e.row,e.col),r=new y.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=new y.CellRange(n,n,r);o.push(t.mergeRange(i,!0,!0))}}),o=o.filter(function(e){return!0!==e});var i=this.getBulkCollectionData(o);(n=this.hot).populateFromArray.apply(n,r(i))}}},{key:"getBulkCollectionData",value:function(e){var t,n=this.getBulkCollectionDataRange(e),o=(t=this.hot).getData.apply(t,r(n)),i=o.splice(0);return(0,k.arrayEach)(e,function(e){var t=l(e,3),o=t[0],r=t[1];(0,k.arrayEach)(t[2],function(e,t){(0,k.arrayEach)(e,function(e,s){i[o-n[0]+t][r-n[1]+s]=e})})}),[n[0],n[1],i]}},{key:"getBulkCollectionDataRange",value:function(e){var t=[0,0],n=[0,0],o=null,r=null,i=null;return(0,k.arrayEach)(e,function(e){o=e[0],r=e[1],i=e[2],t[0]=Math.min(o,t[0]),t[1]=Math.min(r,t[1]),n[0]=Math.max(o+i.length-1,n[0]),n[1]=Math.max(r+i[0].length-1,n[1])}),[].concat(t,n)}},{key:"clearCollections",value:function(){this.mergedCellsCollection.clear()}},{key:"canMergeRange",value:function(e){return!(1>=arguments.length||void 0===arguments[1]||!arguments[1])||this.validateSetting(e)}},{key:"toggleMergeOnSelection",value:function(){var e=this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var t=e.from,n=e.to;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"mergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var t=e.from,n=e.to;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"unmergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){var t=e.from,n=e.to;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"mergeRange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.getTopLeftCorner(),i=e.getBottomRightCorner(),s={row:r.row,col:r.col,rowspan:i.row-r.row+1,colspan:i.col-r.col+1},a=[],l=null;return!!this.canMergeRange(s,n)&&(this.hot.runHooks("beforeMergeCells",e,n),(0,N.rangeEach)(0,s.rowspan-1,function(e){(0,N.rangeEach)(0,s.colspan-1,function(n){var o=null;a[e]||(a[e]=[]),0===e&&0===n?o=t.hot.getDataAtCell(s.row,s.col):t.hot.setCellMeta(s.row+e,s.col+n,"hidden",!0),a[e][n]=o})}),this.hot.setCellMeta(s.row,s.col,"spanned",!0),!this.mergedCellsCollection.add(s)||(o?l=[s.row,s.col,a]:this.hot.populateFromArray(s.row,s.col,a,void 0,void 0,this.pluginName),this.hot.runHooks("afterMergeCells",e,s,n),l))}},{key:"unmergeRange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,n),(0,k.arrayEach)(o,function(e){t.mergedCellsCollection.remove(e.row,e.col),(0,N.rangeEach)(0,e.rowspan-1,function(n){(0,N.rangeEach)(0,e.colspan-1,function(o){t.hot.removeCellMeta(e.row+n,e.col+o,"hidden")})}),t.hot.removeCellMeta(e.row,e.col,"spanned")}),this.hot.render(),this.hot.runHooks("afterUnmergeCells",e,n))}},{key:"toggleMerge",value:function(e){var t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}},{key:"merge",value:function(e,t,n,o){var r=new y.CellCoords(e,t),i=new y.CellCoords(n,o);this.mergeRange(new y.CellRange(r,r,i))}},{key:"unmerge",value:function(e,t,n,o){var r=new y.CellCoords(e,t),i=new y.CellCoords(n,o);this.unmergeRange(new y.CellRange(r,r,i))}},{key:"onAfterInit",value:function(){this.generateFromSettings(this.hot.getSettings().mergeCells),this.hot.render()}},{key:"onBeforeKeyDown",value:function(e){(e.ctrlKey||e.metaKey)&&!e.altKey&&77===e.keyCode&&(this.toggleMerge(this.hot.getSelectedRangeLast()),this.hot.render(),(0,v.stopImmediatePropagation)(e))}},{key:"onAfterIsMultipleSelection",value:function(e){if(e)for(var t=this.mergedCellsCollection.mergedCells,n=this.hot.getSelectedRangeLast(),o=0;t.length>o;o+=1)if(n.highlight.row===t[o].row&&n.highlight.col===t[o].col&&n.to.row===t[o].row+t[o].rowspan-1&&n.to.col===t[o].col+t[o].colspan-1)return!1;return e}},{key:"onModifyTransformStart",value:function(e){var t=H.get(this),n=this.hot.getSelectedRangeLast(),o={row:e.row,col:e.col},r=null,i=new y.CellCoords(n.highlight.row,n.highlight.col),s=this.mergedCellsCollection.get(i.row,i.col);if(t.lastDesiredCoords||(t.lastDesiredCoords=new y.CellCoords(null,null)),s){var a=new y.CellCoords(s.row,s.col),l=new y.CellCoords(s.row+s.rowspan-1,s.col+s.colspan-1);new y.CellRange(a,a,l).includes(t.lastDesiredCoords)||(t.lastDesiredCoords=new y.CellCoords(null,null)),o.row=t.lastDesiredCoords.row?t.lastDesiredCoords.row-i.row:o.row,o.col=t.lastDesiredCoords.col?t.lastDesiredCoords.col-i.col:o.col,e.row>0?o.row=s.row+s.rowspan-1-i.row+e.row:0>e.row&&(o.row=i.row-s.row+e.row),e.col>0?o.col=s.col+s.colspan-1-i.col+e.col:0>e.col&&(o.col=i.col-s.col+e.col)}r=new y.CellCoords(n.highlight.row+o.row,n.highlight.col+o.col);var u=this.mergedCellsCollection.get(r.row,r.col);u&&(t.lastDesiredCoords=r,o={row:u.row-i.row,col:u.col-i.col}),0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}},{key:"onModifyTransformEnd",value:function(e){var t=this,n=this.hot.getSelectedRangeLast(),o=(0,M.clone)(e),r=this.selectionCalculations.getUpdatedSelectionRange(n,e),i=(0,M.clone)(o),s=this.mergedCellsCollection.getWithinRange(r,!0);do{i=(0,M.clone)(o),this.selectionCalculations.getUpdatedSelectionRange(n,o),(0,k.arrayEach)(s,function(e){t.selectionCalculations.snapDelta(o,n,e)})}while(o.row!==i.row||o.col!==i.col);e.row=o.row,e.col=o.col}},{key:"onModifyGetCellCoords",value:function(e,t){var n=this.mergedCellsCollection.get(e,t);return n?[n.row,n.col,n.row+n.rowspan-1,n.col+n.colspan-1]:void 0}},{key:"addMergeActionsToContextMenu",value:function(e){e.items.push({name:"---------"},(0,R.default)(this))}},{key:"onAfterRenderer",value:function(e,t,n){var o=this.mergedCellsCollection.get(t,n);(0,P.applySpanProperties)(e,o,t,n)}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this.hot.getSelectedRangeLast();t.highlight=new y.CellCoords(t.highlight.row,t.highlight.col),t.to=e;var n=!1;if(!(0===t.from.row&&t.to.row===this.hot.countRows()-1||0===t.from.col&&t.to.col===this.hot.countCols()-1))do{n=!1;for(var o=0;this.mergedCellsCollection.mergedCells.length>o;o+=1){var r=this.mergedCellsCollection.mergedCells[o],i=r.getRange();t.expandByRange(i)&&(e.row=t.to.row,e.col=t.to.col,n=!0)}}while(n)}},{key:"onAfterGetCellMeta",value:function(e,t,n){var o=this.mergedCellsCollection.get(e,t);!o||o.row===e&&o.col===t||(n.copyable=!1)}},{key:"onAfterViewportRowCalculatorOverride",value:function(e){var t=this,n=this.hot.countCols(),o=void 0;(0,N.rangeEach)(0,n-1,function(n){if((o=t.mergedCellsCollection.get(e.startRow,n))&&e.startRow>o.row)return e.startRow=o.row,t.onAfterViewportRowCalculatorOverride.call(t,e);if(o=t.mergedCellsCollection.get(e.endRow,n)){var r=o.row+o.rowspan-1;if(r>e.endRow)return e.endRow=r,t.onAfterViewportRowCalculatorOverride.call(t,e)}return!0})}},{key:"onAfterViewportColumnCalculatorOverride",value:function(e){var t=this,n=this.hot.countRows(),o=void 0;(0,N.rangeEach)(0,n-1,function(n){if((o=t.mergedCellsCollection.get(n,e.startColumn))&&e.startColumn>o.col)return e.startColumn=o.col,t.onAfterViewportColumnCalculatorOverride.call(t,e);if(o=t.mergedCellsCollection.get(n,e.endColumn)){var r=o.col+o.colspan-1;if(r>e.endColumn)return e.endColumn=r,t.onAfterViewportColumnCalculatorOverride.call(t,e)}return!0})}},{key:"onModifyAutofillRange",value:function(e,t){this.autofillCalculations.correctSelectionAreaSize(t);var n=this.autofillCalculations.getDirection(t,e);if(this.autofillCalculations.dragAreaOverlapsCollections(t,e,n))return e=t;var o=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return o?e=this.autofillCalculations.snapDragArea(t,e,n,o):e}},{key:"onAfterCreateCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}},{key:"onAfterRemoveCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}},{key:"onAfterCreateRow",value:function(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}},{key:"onAfterChange",value:function(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}},{key:"onBeforeDrawAreaBorders",value:function(e,t){if(t&&"area"===t){var n=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(n);(0,k.arrayEach)(o,function(t){n.getBottomRightCorner().row===t.getLastRow()&&n.getBottomRightCorner().col===t.getLastColumn()&&(e[2]=t.row,e[3]=t.col)})}}},{key:"onAfterModifyTransformStart",value:function(e,t,n){if(this.enabled){var o=this.mergedCellsCollection.get(e.row,e.col);if(o){var r=t>0,i=0>t,s=0>n,a=n>0,l=o.row+o.rowspan-1==this.hot.countRows()-1,u=0===o.row,c=o.col+o.colspan-1==this.hot.countCols()-1,h=0===o.col;(r&&l||i&&u||a&&c||s&&h)&&(e.row=o.row,e.col=o.col)}}}},{key:"onAfterDrawSelection",value:function(e,t,n,o){return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,o)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}]),t}(f.default);(0,g.registerPlugin)("mergeCells",L),t.default=L},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["The merged cell declared at [",", ","] overlaps with the other declared merged \n cell. The overlapping merged cell was not added to the table, please fix your setup."],["The merged cell declared at [",", ","] overlaps with the other declared merged \n cell. The overlapping merged cell was not added to the table, please fix your setup."]),a=n(95),l=function(e){return e&&e.__esModule?e:{default:e}}(a),u=n(4),c=n(5),h=n(56),f=n(1),d=n(204),p=n(41);t.default=function(){function e(t){r(this,e),this.plugin=t,this.mergedCells=[],this.hot=t.hot}return i(e,[{key:"get",value:function(e,t){var n=this.mergedCells,o=!1;return(0,f.arrayEach)(n,function(n){return n.row>e||e>n.row+n.rowspan-1||n.col>t||t>n.col+n.colspan-1||(o=n,!1)}),o}},{key:"getByRange",value:function(e){var t=this.mergedCells,n=!1;return(0,f.arrayEach)(t,function(t){return t.row>e.from.row||e.to.row>t.row+t.rowspan-1||t.col>e.from.col||e.to.col>t.col+t.colspan-1||(n=t)}),n}},{key:"getWithinRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.mergedCells,o=[];if(!e.includesRange){var r=new u.CellCoords(e.from.row,e.from.col),i=new u.CellCoords(e.to.row,e.to.col);e=new u.CellRange(r,r,i)}return(0,f.arrayEach)(n,function(n){var r=new u.CellCoords(n.row,n.col),i=new u.CellCoords(n.row+n.rowspan-1,n.col+n.colspan-1),s=new u.CellRange(r,r,i);t?e.overlaps(s)&&o.push(n):e.includesRange(s)&&o.push(n)}),!!o.length&&o}},{key:"add",value:function(t){var n=this.mergedCells,o=t.row,r=t.col,i=t.rowspan,s=t.colspan,a=new l.default(o,r,i,s),u=this.get(o,r),c=this.isOverlapping(a);return u||c?((0,h.warn)(e.IS_OVERLAPPING_WARNING(a)),!1):(this.hot&&a.normalize(this.hot),n.push(a),a)}},{key:"remove",value:function(e,t){var n=this.mergedCells,o=this.get(e,t),r=o?this.mergedCells.indexOf(o):null;return!(!o||!1===r)&&(n.splice(r,1),o)}},{key:"clear",value:function(){var e=this,t=this.mergedCells,n=[],r=[];(0,f.arrayEach)(t,function(t){n.push([e.hot.getCell(t.row,t.col),e.get(t.row,t.col),t.row,t.col])}),this.mergedCells.length=0,(0,f.arrayEach)(n,function(t,o){(0,c.rangeEach)(0,t.rowspan-1,function(n){(0,c.rangeEach)(0,t.colspan-1,function(o){0===o&&0===n||r.push([e.hot.getCell(t.row+n,t.col+o),null,null,null])})}),n[o][1]=null}),(0,f.arrayEach)(n,function(e){d.applySpanProperties.apply(void 0,o(e))}),(0,f.arrayEach)(r,function(e){d.applySpanProperties.apply(void 0,o(e))})}},{key:"isOverlapping",value:function(e){var t=new u.CellRange(null,new u.CellCoords(e.row,e.col),new u.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)),n=!1;return(0,f.arrayEach)(this.mergedCells,function(e){return!new u.CellRange(null,new u.CellCoords(e.row,e.col),new u.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(n=!0,!1)}),n}},{key:"isMergedParent",value:function(e,t){var n=this.mergedCells,o=!1;return(0,f.arrayEach)(n,function(n){return n.row!==e||n.col!==t||(o=!0,!1)}),o}},{key:"shiftCollections",value:function(e,t,n){var o=this,r=[0,0];switch(e){case"right":r[0]+=n;break;case"left":r[0]-=n;break;case"down":r[1]+=n;break;case"up":r[1]-=n}(0,f.arrayEach)(this.mergedCells,function(e){e.shift(r,t)}),(0,c.rangeEachReverse)(this.mergedCells.length-1,0,function(e){var t=o.mergedCells[e];t&&t.removed&&o.mergedCells.splice(o.mergedCells.indexOf(t),1)})}}],[{key:"IS_OVERLAPPING_WARNING",value:function(e){return(0,p.toSingleLine)(s,e.row,e.col)}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(2),a=n(4),l=n(1);t.default=function(){function e(t){o(this,e),this.plugin=t,this.mergedCellsCollection=this.plugin.mergedCellsCollection,this.currentFillData=null}return i(e,[{key:"correctSelectionAreaSize",value:function(e){if(e[0]===e[2]&&e[1]===e[3]){var t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}},{key:"getDirection",value:function(e,t){return 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"}},{key:"snapDragArea",value:function(e,t,n,o){var i=t.slice(0),s=this.getAutofillSize(e,t,n),a=r(e,4),l=a[0],u=a[1],c=a[2],h=a[3],f=["up","down"].indexOf(n)>-1,d=f?c-l+1:h-u+1,p=Math.floor(s/d)*d,g=s-p,v=this.getFarthestCollection(e,t,n,o);if(v)if("down"===n){var y=v.row+v.rowspan-l-g,m=i[2]+y;m<this.plugin.hot.countRows()?i[2]+=g?y:0:i[2]-=g}else if("right"===n){var w=v.col+v.colspan-u-g,C=i[3]+w;C<this.plugin.hot.countCols()?i[3]+=g?w:0:i[3]-=g}else if("up"===n){var b=c-g-v.row+1,E=i[0]+b;0>E?i[0]+=g:i[0]-=g?b:0}else if("left"===n){var S=h-g-v.col+1,O=i[1]+S;0>O?i[1]+=g:i[1]-=g?S:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:o,fillSize:s,dragArea:i,cycleLength:d}),i}},{key:"updateCurrentFillCache",value:function(e){this.currentFillData||(this.currentFillData={}),(0,s.extend)(this.currentFillData,e)}},{key:"getAutofillSize",value:function(e,t,n){var o=r(e,4),i=o[0],s=o[1],a=o[2],l=o[3],u=r(t,4),c=u[0],h=u[1],f=u[2],d=u[3];switch(n){case"up":return i-c;case"down":return f-a;case"left":return s-h;case"right":return d-l;default:return null}}},{key:"getDragArea",value:function(e,t,n){var o=r(e,4),i=o[0],s=o[1],a=o[2],l=o[3],u=r(t,4),c=u[0],h=u[1],f=u[2],d=u[3];switch(n){case"up":return[c,h,i-1,l];case"down":return[a+1,s,f,l];case"left":return[c,h,a,s-1];case"right":return[i,l+1,f,d];default:return null}}},{key:"getFarthestCollection",value:function(e,t,n,o){var i=r(e,4),s=i[0],a=i[1],u=i[2],c=i[3],h=["up","down"].indexOf(n)>-1,f=h?u:c,d=h?s:a,p=this.getAutofillSize(e,t,n),g=h?u-s+1:c-a+1,v=Math.floor(p/g)*g,y=p-v,m=null,w=null,C=null;switch(n){case"up":m="includesVertically",C=f-y+1;break;case"left":m="includesHorizontally",C=f-y+1;break;case"down":m="includesVertically",C=d+y-1;break;case"right":m="includesHorizontally",C=d+y-1}return(0,l.arrayEach)(o,function(e){e[m](C)&&e.isFarther(w,n)&&(w=e)}),w}},{key:"recreateAfterDataPopulation",value:function(e){if(this.currentFillData){var t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,o=this.currentFillData.dragDirection,r=function(e,n){switch(o){case"up":return e.row-n>=t.from.row;case"down":return t.to.row>=e.row+e.rowspan-1+n;case"left":return e.col-n>=t.from.column;case"right":return t.to.column>=e.col+e.colspan-1+n;default:return null}},i=0,s=null,a=1;do{for(var l=0;n.length>l;l+=1){if(s=n[l],i=a*this.currentFillData.cycleLength,r(s,i))switch(o){case"up":this.plugin.mergedCellsCollection.add({row:s.row-i,rowspan:s.rowspan,col:s.col,colspan:s.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+i,rowspan:s.rowspan,col:s.col,colspan:s.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col-i,colspan:s.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+i,colspan:s.colspan})}l===n.length-1&&(a+=1)}}while(r(s,i));this.currentFillData=null,this.plugin.hot.render()}}},{key:"getRangeFromChanges",value:function(e){var t={min:null,max:null},n={min:null,max:null};return(0,l.arrayEach)(e,function(e){(null===t.min||t.min>e[0])&&(t.min=e[0]),(null===t.max||e[0]>t.max)&&(t.max=e[0]),(null===n.min||n.min>e[1])&&(n.min=e[1]),(null===n.max||e[1]>n.max)&&(n.max=e[1])}),{from:{row:t.min,column:n.min},to:{row:t.max,column:n.max}}}},{key:"dragAreaOverlapsCollections",value:function(e,t,n){var o=this.getDragArea(e,t,n),i=r(o,4),s=i[0],l=i[1],u=i[2],c=i[3],h=new a.CellCoords(s,l),f=new a.CellCoords(u,c);return!!this.mergedCellsCollection.getWithinRange(new a.CellRange(h,h,f),!0)}}]),e}()},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var r=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(4);t.default=function(){function e(t){o(this,e),this.plugin=t,this.fullySelectedMergedCellClassName="fullySelectedMergedCell"}return i(e,[{key:"snapDelta",value:function(e,t,n){var o=t.to,r=o.row+e.row,i=o.col+e.col;e.row?this.jumpOverMergedCell(e,n,r):e.col&&this.jumpOverMergedCell(e,n,i)}},{key:"jumpOverMergedCell",value:function(e,t,n){var o=e.row||e.col,r=null,i=null,s=null;e.row?(r=t.includesVertically(n),i=t.row,s=t.getLastRow()):e.col&&(r=t.includesHorizontally(n),i=t.col,s=t.getLastColumn()),0!==o&&(o>0?r&&n!==i&&(o+=s-n+1):r&&n!==s&&(o-=n-i+1),e.row?e.row=o:e.col&&(e.col=o))}},{key:"getUpdatedSelectionRange",value:function(e,t){return new s.CellRange(e.highlight,e.from,new s.CellCoords(e.to.row+t.row,e.to.col+t.col))}},{key:"getSelectedMergedCellClassName",value:function(e,t,n,o){var i=r(n,4),s=i[0],a=i[1],l=i[2],u=i[3];if(void 0!==o&&!(s>e||e>l||a>t||t>u)){if(!this.plugin.mergedCellsCollection.isMergedParent(e,t))return;var c=this.plugin.mergedCellsCollection.get(e,t);if(!c)return;if(l>=c.row+c.rowspan-1&&u>=c.col+c.colspan-1)return this.fullySelectedMergedCellClassName+"-"+o;if(this.plugin.selectionCalculations.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange()))return this.fullySelectedMergedCellClassName+"-multiple"}}},{key:"isMergeCellFullySelected",value:function(e,t){var n=[];if(!t||!e)return!1;for(var o=0;e.rowspan>o;o+=1)for(var r=0;e.colspan>r;r+=1)n.push(new s.CellCoords(e.row+o,e.col+r));for(var i=0;n.length>i;i+=1){for(var a=[],l=0;t.length>l;l+=1)a[l]=t[l].includes(n[i]);if(!a.includes(!0))return!1}return!0}},{key:"getSelectedMergedCellClassNameToRemove",value:function(){for(var e=[],t=0;7>=t;t+=1)e.push(this.fullySelectedMergedCellClassName+"-"+t);return e.push(this.fullySelectedMergedCellClassName+"-multiple"),e}}]),e}()},function(e,t,n){"use strict";function o(e){return{key:"mergeCells",name:function(){var t=this.getSelectedLast();if(t){var n=e.mergedCellsCollection.get(t[0],t[1]);if(n.row===t[0]&&n.col===t[1]&&n.row+n.rowspan-1===t[2]&&n.col+n.colspan-1===t[3])return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback:function(){e.toggleMergeOnSelection()},disabled:function(){var e=this.getSelectedLast();return!e||(a.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner())},hidden:!1}}t.__esModule=!0,t.default=o;var r=n(7),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(r),s=n(95),a=function(e){return e&&e.__esModule?e:{default:e}}(s)},function(e,t){},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(15),c=(o(u),n(0)),h=n(27),f=n(10),d=o(f),p=n(6),g=o(p),v=n(8),y=n(4),m=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.dragged=[],n.eventManager=null,n.lastSetCell=null,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return(0,h.isMobileBrowser)()}},{key:"enablePlugin",value:function(){this.enabled||(this.eventManager||(this.eventManager=new g.default(this)),this.registerListeners(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"registerListeners",value:function(){function e(e){if(1===t.dragged.length)return t.dragged.splice(0,t.dragged.length),!0;var n=t.dragged.indexOf(e);if(-1==n)return!1;0===n?t.dragged=t.dragged.slice(0,1):1==n&&(t.dragged=t.dragged.slice(-1))}var t=this;this.eventManager.addEventListener(this.hot.rootElement,"touchstart",function(e){var n=void 0;return(0,c.hasClass)(e.target,"topLeftSelectionHandle-HitArea")?(n=t.hot.getSelectedRangeLast(),t.dragged.push("topLeft"),t.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},e.preventDefault(),!1):(0,c.hasClass)(e.target,"bottomRightSelectionHandle-HitArea")?(n=t.hot.getSelectedRangeLast(),t.dragged.push("bottomRight"),t.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchend",function(n){return(0,c.hasClass)(n.target,"topLeftSelectionHandle-HitArea")?(e.call(t,"topLeft"),t.touchStartRange=void 0,n.preventDefault(),!1):(0,c.hasClass)(n.target,"bottomRightSelectionHandle-HitArea")?(e.call(t,"bottomRight"),t.touchStartRange=void 0,n.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchmove",function(e){var n=(0,c.getWindowScrollTop)(),o=(0,c.getWindowScrollLeft)(),r=void 0,i=void 0,s=void 0,a=void 0,l=void 0,u=void 0,h=void 0;0!==t.dragged.length&&(r=document.elementFromPoint(e.touches[0].screenX-o,e.touches[0].screenY-n))&&r!==t.lastSetCell&&("TD"!=r.nodeName&&"TH"!=r.nodeName||(i=t.hot.getCoords(r),-1==i.col&&(i.col=0),s=t.hot.getSelectedRangeLast(),a=s.getWidth(),l=s.getHeight(),u=s.getDirection(),1==a&&1==l&&t.hot.selection.setRangeEnd(i),h=t.getCurrentRangeCoords(s,i,t.touchStartRange.direction,u,t.dragged[0]),null!==h.start&&t.hot.selection.setRangeStart(h.start),t.hot.selection.setRangeEnd(h.end),t.lastSetCell=r),e.preventDefault())})}},{key:"getCurrentRangeCoords",value:function(e,t,n,o,r){var i=e.getTopLeftCorner(),s=e.getBottomRightCorner(),a=e.getBottomLeftCorner(),l=e.getTopRightCorner(),u={start:null,end:null};switch(n){case"NE-SW":switch(o){case"NE-SW":case"NW-SE":u="topLeft"==r?{start:new y.CellCoords(t.row,e.highlight.col),end:new y.CellCoords(a.row,t.col)}:{start:new y.CellCoords(e.highlight.row,t.col),end:new y.CellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"==r&&(u={start:new y.CellCoords(s.row,t.col),end:new y.CellCoords(t.row,i.col)})}break;case"NW-SE":switch(o){case"NE-SW":"topLeft"==r?u={start:t,end:a}:u.end=t;break;case"NW-SE":"topLeft"==r?u={start:t,end:s}:u.end=t;break;case"SE-NW":"topLeft"==r?u={start:t,end:i}:u.end=t;break;case"SW-NE":"topLeft"==r?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(o){case"NW-SE":u="bottomRight"==r?{start:new y.CellCoords(t.row,i.col),end:new y.CellCoords(a.row,t.col)}:{start:new y.CellCoords(i.row,t.col),end:new y.CellCoords(t.row,s.col)};break;case"SW-NE":u="topLeft"==r?{start:new y.CellCoords(e.highlight.row,t.col),end:new y.CellCoords(t.row,s.col)}:{start:new y.CellCoords(t.row,i.col),end:new y.CellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"==r?u={start:new y.CellCoords(t.row,l.col),end:new y.CellCoords(i.row,t.col)}:"topLeft"==r&&(u={start:a,end:t})}break;case"SE-NW":switch(o){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"==r&&(u.end=t);break;case"SE-NW":"topLeft"==r?u.end=t:u={start:t,end:i}}}return u}},{key:"isDragged",value:function(){return this.dragged.length>0}}]),t}(d.default);(0,v.registerPlugin)("multipleSelectionHandles",m),t.default=m},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=o(u),h=n(205),f=(o(h),n(352)),d=o(f),p=n(1),g=n(8),v=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.observer=null,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().observeChanges}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.observer||(this.observer=new d.default(this.hot.getSourceData()),this._exposePublicApi()),this.observer.addLocalHook("change",function(t){return e.onDataChange(t)}),this.addHook("afterCreateRow",function(){return e.onAfterTableAlter()}),this.addHook("afterRemoveRow",function(){return e.onAfterTableAlter()}),this.addHook("afterCreateCol",function(){return e.onAfterTableAlter()}),this.addHook("afterRemoveCol",function(){return e.onAfterTableAlter()}),this.addHook("afterChange",function(t,n){return e.onAfterTableAlter(n)}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.observer&&(this.observer.destroy(),this.observer=null,this._deletePublicApi()),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"onDataChange",value:function(e){var t=this;if(!this.observer.isPaused()){var n=this.pluginName+".change",o={add:function(e){isNaN(e.col)?t.hot.runHooks("afterCreateRow",e.row,1,n):t.hot.runHooks("afterCreateCol",e.col,1,n)},remove:function(e){isNaN(e.col)?t.hot.runHooks("afterRemoveRow",e.row,1,n):t.hot.runHooks("afterRemoveCol",e.col,1,n)},replace:function(e){t.hot.runHooks("afterChange",[[e.row,e.col,null,e.value]],n)}};(0,p.arrayEach)(e,function(e){o[e.op]&&o[e.op](e)}),this.hot.render()}this.hot.runHooks("afterChangesObserved")}},{key:"onAfterTableAlter",value:function(e){var t=this;"loadData"!==e&&(this.observer.pause(),this.hot.addHookOnce("afterChangesObserved",function(){return t.observer.resume()}))}},{key:"onAfterLoadData",value:function(e){e||this.observer.setObservedData(this.hot.getSourceData())}},{key:"destroy",value:function(){this.observer&&(this.observer.destroy(),this._deletePublicApi()),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_exposePublicApi",value:function(){var e=this,t=this.hot;t.pauseObservingChanges=function(){return e.observer.pause()},t.resumeObservingChanges=function(){return e.observer.resume()},t.isPausedObservingChanges=function(){return e.observer.isPaused()}}},{key:"_deletePublicApi",value:function(){var e=this.hot;delete e.pauseObservingChanges,delete e.resumeObservingChanges,delete e.isPausedObservingChanges}}]),t}(c.default);t.default=v,(0,g.registerPlugin)("observeChanges",v)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var i=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(205),a=o(s),l=n(58),u=o(l),c=n(2),h=n(353),f=function(){function e(t){r(this,e),this.observedData=null,this.observer=null,this.paused=!1,this.setObservedData(t)}return i(e,[{key:"setObservedData",value:function(e){var t=this;this.observer&&a.default.unobserve(this.observedData,this.observer),this.observedData=e,this.observer=a.default.observe(this.observedData,function(e){return t.onChange(e)})}},{key:"isPaused",value:function(){return this.paused}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}},{key:"onChange",value:function(e){this.runLocalHooks("change",(0,h.cleanPatches)(e))}},{key:"destroy",value:function(){a.default.unobserve(this.observedData,this.observer),this.observedData=null,this.observer=null}}]),e}();(0,c.mixin)(f,u.default),t.default=f},function(e,t,n){"use strict";function o(e){var t=[];return e=(0,s.arrayFilter)(e,function(e){return!/[\/]length/gi.test(e.path)&&!!r(e.path)}),e=(0,s.arrayMap)(e,function(e){var t=r(e.path);return e.row=t.row,e.col=t.col,e}),e=(0,s.arrayFilter)(e,function(e){if(-1!==["add","remove"].indexOf(e.op)&&!isNaN(e.col)){if(-1!==t.indexOf(e.col))return!1;t.push(e.col)}return!0}),t.length=0,e}function r(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);if(!t)return null;var n=i(t,3),o=n[1],r=n[2];return{row:parseInt(o,10),col:/^\d*$/.test(r)?parseInt(r,10):r}}t.__esModule=!0;var i=function(){function e(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.cleanPatches=o,t.parsePath=r;var s=n(1)},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);e.length>t;t++)n[t]=e[t];return n}return Array.from(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},u=n(10),c=function(e){return e&&e.__esModule?e:{default:e}}(u),h=n(8),f=n(2),d=n(5),p=n(16),g="htSearchResult",v=function(e,t,n,o,r){e.getCellMeta(t,n).isSearchResult=r},y=function(e,t){return!((0,p.isUndefined)(e)||null===e||!e.toLowerCase||0===e.length)&&(!(0,p.isUndefined)(t)&&null!==t&&-1!==(""+t).toLowerCase().indexOf(e.toLowerCase()))},m=function(e){function t(e){r(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.callback=v,n.queryMethod=y,n.searchResultClass=g,n}return s(t,e),a(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().search}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){this.updatePluginSettings(this.hot.getSettings().search),this.addHook("beforeRenderer",function(){return e.onBeforeRenderer.apply(e,arguments)}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){var e=this,n=function(){return e.onBeforeRenderer.apply(e,arguments)};this.hot.addHook("beforeRenderer",n),this.hot.addHookOnce("afterRender",function(){e.hot.removeHook("beforeRenderer",n)}),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"query",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod(),r=this.hot.countRows(),i=this.hot.countCols(),s=[],a=this.hot;return(0,d.rangeEach)(0,r-1,function(r){(0,d.rangeEach)(0,i-1,function(i){var l=t.hot.getDataAtCell(r,i),u=t.hot.getCellMeta(r,i),c=u.search.callback||n,h=u.search.queryMethod||o,f=h(e,l);if(f){s.push({row:r,col:i,data:l})}c&&c(a,r,i,l,f)})}),s}},{key:"getCallback",value:function(){return this.callback}},{key:"setCallback",value:function(e){this.callback=e}},{key:"getQueryMethod",value:function(){return this.queryMethod}},{key:"setQueryMethod",value:function(e){this.queryMethod=e}},{key:"getSearchResultClass",value:function(){return this.searchResultClass}},{key:"setSearchResultClass",value:function(e){this.searchResultClass=e}},{key:"updatePluginSettings",value:function(e){(0,f.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}},{key:"onBeforeRenderer",value:function(e,t,n,r,i,s){var a=s.className||[],l=[];if("string"==typeof a)l=a.split(" ");else{var u;(u=l).push.apply(u,o(a))}this.isEnabled()&&s.isSearchResult?l.includes(this.searchResultClass)||l.push(""+this.searchResultClass):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),s.className=l.join(" ")}},{key:"destroy",value:function(){l(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,h.registerPlugin)("search",m),t.default=m},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var s=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=function e(t,n,o){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,o)}if("value"in r)return r.value;var s=r.get;if(void 0!==s)return s.call(o)},l=n(0),u=n(1),c=n(10),h=function(e){return e&&e.__esModule?e:{default:e}}(c),f=n(8),d=n(40),p=function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollbars=[],n.clones=[],n.lockedCollection=!1,n.freezeOverlays=!1,n}return i(t,e),s(t,[{key:"isEnabled",value:function(){return(0,d.isTouchSupported)()}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterRender",function(){return e.onAfterRender()}),this.registerEvents(),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.lockedCollection=!1,a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var e=this;this.addHook("beforeTouchScroll",function(){return e.onBeforeTouchScroll()}),this.addHook("afterMomentumScroll",function(){return e.onAfterMomentumScroll()})}},{key:"onAfterRender",value:function(){if(!this.lockedCollection){var e=this.hot.view.wt.wtOverlays,t=e.topOverlay,n=e.bottomOverlay,o=e.leftOverlay,r=e.topLeftCornerOverlay,i=e.bottomLeftCornerOverlay;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(t),n.clone&&this.scrollbars.push(n),this.scrollbars.push(o),r&&this.scrollbars.push(r),i&&i.clone&&this.scrollbars.push(i),this.clones.length=0,t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),r&&this.clones.push(r.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}}},{key:"onBeforeTouchScroll",value:function(){this.freezeOverlays=!0,(0,u.arrayEach)(this.clones,function(e){(0,l.addClass)(e,"hide-tween")})}},{key:"onAfterMomentumScroll",value:function(){var e=this;this.freezeOverlays=!1,(0,u.arrayEach)(this.clones,function(e){(0,l.removeClass)(e,"hide-tween"),(0,l.addClass)(e,"show-tween")}),setTimeout(function(){(0,u.arrayEach)(e.clones,function(e){(0,l.removeClass)(e,"show-tween")})},400),(0,u.arrayEach)(this.scrollbars,function(e){e.refresh(),e.resetFixedPosition()}),this.hot.view.wt.wtOverlays.syncScrollWithMaster()}}]),t}(h.default);(0,f.registerPlugin)("touchScroll",p),t.default=p},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){var t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,e.addHook("afterChange",function(e,n){e&&"UndoRedo.undo"!==n&&"UndoRedo.redo"!==n&&"MergeCells"!==n&&t.done(new s.ChangeAction(e))}),e.addHook("afterCreateRow",function(e,n,o){if("UndoRedo.undo"!==o&&"UndoRedo.undo"!==o&&"auto"!==o){var r=new s.CreateRowAction(e,n);t.done(r)}}),e.addHook("beforeRemoveRow",function(e,n,o,r){if("UndoRedo.undo"!==r&&"UndoRedo.redo"!==r&&"auto"!==r){var i=t.instance.getSourceDataArray();e=(i.length+e)%i.length;var a=(0,y.deepClone)(i.slice(e,e+n));t.done(new s.RemoveRowAction(e,a))}}),e.addHook("afterCreateCol",function(e,n,o){"UndoRedo.undo"!==o&&"UndoRedo.redo"!==o&&"auto"!==o&&t.done(new s.CreateColumnAction(e,n))}),e.addHook("beforeRemoveCol",function(n,o,r,i){if("UndoRedo.undo"!==i&&"UndoRedo.redo"!==i&&"auto"!==i){var a=t.instance.getSourceDataArray();n=(t.instance.countCols()+n)%t.instance.countCols();var l=[],u=[],c=[];(0,v.rangeEach)(a.length-1,function(t){var r=[],i=a[t];(0,v.rangeEach)(n,n+(o-1),function(t){r.push(i[e.runHooks("modifyCol",t)])}),l.push(r)}),(0,v.rangeEach)(o-1,function(t){c.push(e.runHooks("modifyCol",n+t))}),Array.isArray(e.getSettings().colHeaders)&&(0,v.rangeEach)(o-1,function(t){u.push(e.getSettings().colHeaders[e.runHooks("modifyCol",n+t)]||null)});var h=t.instance.getPlugin("manualColumnMove"),f=h.isEnabled()?h.columnsMapper.__arrayMap:[],d=new s.RemoveColumnAction(n,c,l,u,f);t.done(d)}}),e.addHook("beforeCellAlignment",function(e,n,o,r){var i=new s.CellAlignmentAction(e,n,o,r);t.done(i)}),e.addHook("beforeFilter",function(e){t.done(new s.FiltersAction(e))}),e.addHook("beforeRowMove",function(e,n){!1!==e&&t.done(new s.RowMoveAction(e,n))}),e.addHook("beforeMergeCells",function(n,o){o||t.done(new s.MergeCellsAction(e,n))}),e.addHook("afterUnmergeCells",function(n,o){o||t.done(new s.UnmergeCellsAction(e,n))})}function a(){var e=this;void 0===e.getSettings().undo||e.getSettings().undo?e.undoRedo||(e.undoRedo=new s(e),c(e),e.addHook("beforeKeyDown",l),e.addHook("afterChange",u)):e.undoRedo&&(delete e.undoRedo,h(e),e.removeHook("beforeKeyDown",l),e.removeHook("afterChange",u))}function l(e){var t=this;(e.ctrlKey||e.metaKey)&&!e.altKey&&(89===e.keyCode||e.shiftKey&&90===e.keyCode?(t.undoRedo.redo(),(0,m.stopImmediatePropagation)(e)):90===e.keyCode&&(t.undoRedo.undo(),(0,m.stopImmediatePropagation)(e)))}function u(e,t){var n=this;if("loadData"===t)return n.undoRedo.clear()}function c(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function h(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}t.__esModule=!0;var f=function(){function e(e,t){for(var n=0;t.length>n;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),d=n(15),p=function(e){return e&&e.__esModule?e:{default:e}}(d),g=n(1),v=n(5),y=n(2),m=n(12),w=(n(4),n(19));s.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},s.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop(),t=(0,y.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var o=this;e.undo(this.instance,function(){o.ignoreNewActions=!1,o.undoneActions.push(e)}),n.runHooks("afterUndo",t)}},s.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop(),t=(0,y.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var o=this;e.redo(this.instance,function(){o.ignoreNewActions=!1,o.doneActions.push(e)}),n.runHooks("afterRedo",t)}},s.prototype.isUndoAvailable=function(){return this.doneActions.length>0},s.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},s.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},s.Action=function(){},s.Action.prototype.undo=function(){},s.Action.prototype.redo=function(){},s.ChangeAction=function(e){this.changes=e,this.actionType="change"},(0,y.inherit)(s.ChangeAction,s.Action),s.ChangeAction.prototype.undo=function(e,t){for(var n=(0,y.deepClone)(this.changes),o=e.countEmptyRows(!0),r=e.countEmptyCols(!0),i=0,s=n.length;s>i;i++)n[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.undo");for(var a=0,l=n.length;l>a;a++)e.getSettings().minSpareRows&&n[a][0]+1+e.getSettings().minSpareRows===e.countRows()&&o===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(n[a][0]+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&n[a][1]+1+e.getSettings().minSpareCols===e.countCols()&&r===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(n[a][1]+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())},s.ChangeAction.prototype.redo=function(e,t){for(var n=(0,y.deepClone)(this.changes),o=0,r=n.length;r>o;o++)n[o].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.redo")},s.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,y.inherit)(s.CreateRowAction,s.Action),s.CreateRowAction.prototype.undo=function(e,t){var n=e.countRows(),o=e.getSettings().minSpareRows;this.index>=n&&n>this.index-o&&(this.index-=o),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},s.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index,this.amount,"UndoRedo.redo")},s.RemoveRowAction=function(e,t){this.index=e,this.data=t,this.actionType="remove_row"},(0,y.inherit)(s.RemoveRowAction,s.Action),s.RemoveRowAction.prototype.undo=function(e,t){e.alter("insert_row",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterRender",t),e.populateFromArray(this.index,0,this.data,void 0,void 0,"UndoRedo.undo")},s.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},s.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,y.inherit)(s.CreateColumnAction,s.Action),s.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},s.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index,this.amount,"UndoRedo.redo")},s.RemoveColumnAction=function(e,t,n,o,r){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=o,this.columnPositions=r.slice(0),this.actionType="remove_col"},(0,y.inherit)(s.RemoveColumnAction,s.Action),s.RemoveColumnAction.prototype.undo=function(e,t){var n=this,o=void 0,r=this.indexes.slice(0).sort(),i=function(e,t,o){return o[n.indexes.indexOf(r[t])]},s=[];(0,v.rangeEach)(this.data.length-1,function(e){s[e]=(0,g.arrayMap)(n.data[e],i)});var a=[];a=(0,g.arrayMap)(this.headers,i);var l=[];e.runHooks("beforeCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,v.rangeEach)(this.data.length-1,function(t){o=e.getSourceDataAtRow(t),(0,v.rangeEach)(r.length-1,function(e){o.splice(r[e],0,s[t][e]),l.push([t,r[e],null,s[t][e]])})}),e.getPlugin("formulas")&&e.getPlugin("formulas").onAfterSetDataAtCell(l),void 0!==this.headers&&(0,v.rangeEach)(a.length-1,function(t){e.getSettings().colHeaders.splice(r[t],0,a[t])}),e.getPlugin("manualColumnMove")&&(e.getPlugin("manualColumnMove").columnsMapper.__arrayMap=this.columnPositions),e.addHookOnce("afterRender",t),e.runHooks("afterCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),e.getPlugin("formulas")&&e.getPlugin("formulas").recalculateFull(),e.render()},s.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},s.CellAlignmentAction=function(e,t,n,o){this.stateBefore=e,this.range=t,this.type=n,this.alignment=o},s.CellAlignmentAction.prototype.undo=function(e,t){var n=this;(0,g.arrayEach)(this.range,function(t){for(var o=t.from,r=t.to,i=o.row;r.row>=i;i+=1)for(var s=o.col;r.col>=s;s+=1)e.setCellMeta(i,s,"className",n.stateBefore[i][s]||" htLeft")}),e.addHookOnce("afterRender",t),e.render()},s.CellAlignmentAction.prototype.redo=function(e,t){(0,w.align)(this.range,this.type,this.alignment,function(t,n){return e.getCellMeta(t,n)},function(t,n,o,r){return e.setCellMeta(t,n,o,r)}),e.addHookOnce("afterRender",t),e.render()},s.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,y.inherit)(s.FiltersAction,s.Action),s.FiltersAction.prototype.undo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),n.filter()},s.FiltersAction.prototype.redo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()},s.MergeCellsAction=function(e){function t(e,n){o(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.cellRange=n,i.rangeData=e.getData(n.from.row,n.from.col,n.to.row,n.to.col),i}return i(t,e),f(t,[{key:"undo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.unmergeRange(this.cellRange,!0),e.populateFromArray(this.cellRange.from.row,this.cellRange.from.col,this.rangeData,void 0,void 0,"MergeCells")}},{key:"redo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.mergeRange(this.cellRange)}}]),t}(s.Action),s.UnmergeCellsAction=function(e){function t(e,n){o(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.cellRange=n,i}return i(t,e),f(t,[{key:"undo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.mergeRange(this.cellRange,!0)}},{key:"redo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}]),t}(s.Action),s.RowMoveAction=function(e,t){this.rows=e.slice(),this.target=t},(0,y.inherit)(s.RowMoveAction,s.Action),s.RowMoveAction.prototype.undo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t);for(var o=this.target>this.rows[0]?-1*this.rows.length:0,r=this.rows[0]>this.target?this.rows[0]+this.rows.length:this.rows[0],i=[],s=this.rows.length+o,a=o;s>a;a+=1)i.push(this.target+a);n.moveRows(i.slice(),r),e.render(),e.selectCell(this.rows[0],0,this.rows[this.rows.length-1],e.countCols()-1,!1,!1)},s.RowMoveAction.prototype.redo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t),n.moveRows(this.rows.slice(),this.target),e.render();var o=this.target>this.rows[0]?this.target-this.rows.length:this.target;e.selectCell(o,0,o+this.rows.length-1,e.countCols()-1,!1,!1)};var C=p.default.getSingleton();C.add("afterInit",a),C.add("afterUpdateSettings",a),C.register("beforeUndo"),C.register("afterUndo"),C.register("beforeRedo"),C.register("afterRedo"),t.default=s}]).default});